deepseek-harness/apps/cli/tests
Yichen Jiang 03b534de16 feat(credentials): move the store to .credentials.yaml and layer $DSH_HOME/.env
$DSH_HOME/.env carried two incompatible jobs. As credentials-local's writable
secret store it could not be hoisted into process.env — hoisting makes every
stored key read as a read-only launch override and blocks rotation from the
TUI and the web page. But its name and dotenv format promise an environment
file, so a DEEPSEEK_BASE_URL sitting beside a working DEEPSEEK_API_KEY in the
same file was silently ignored: only the credential provider read the
document, and it addresses credential references alone.

Split the two jobs into two files.

.credentials.yaml is the provider-managed store: a strict YAML mapping of
CredentialRef to non-empty string, no version field, no wrapper level. Because
it holds credentials and nothing else, a non-mapping root, a non-identifier
key, a non-string value, an empty string, a duplicate key, and malformed YAML
are all rejections rather than skipped entries — loud at boot and at a write,
warn-and-keep-last-good on a live reload. The dotenv physical-line editor
gives way to a patch of the parsed document, so comments and untouched entries
keep their formatting and any string value round-trips, multi-line included.
Writer lock, read-modify-write, atomic 0600 write under a 0700 directory,
watcher, self-write suppression, and quiescent disposal are unchanged.

$DSH_HOME/.env becomes the user's ordinary environment layer. app-boot's new
loadLayeredEnv loads the invoking directory's .env then the Harness home's,
giving user < project < inherited; the home resolves from the inherited
environment first, so a project .env cannot redirect it.

Credential precedence is unchanged: the live environment still wins read-only
over the file, and shadowed writes still reject. Whether a provider-managed
store should instead win over the environment is a separate decision.

No migration: a key already in $DSH_HOME/.env keeps resolving through the new
environment layer, as a read-only env source that shadows the stored one.
2026-08-04 14:50:38 +08:00
..
fixtures Merge remote-tracking branch 'origin/master' into worktree/fix-multi-select-custom-answer 2026-08-03 16:09:17 +08:00
snapshots test(tui): refresh queued compaction help snapshot 2026-08-03 16:06:51 +08:00
tui-first-run-snapshots fix(tui): address onboarding review feedback 2026-07-31 17:47:07 +08:00
args.spec.ts feat: rename experimental-meta/-upgrade to meta/upgrade behind --experimental gate 2026-07-31 23:37:53 +08:00
built-bin.e2e.ts fix(cli): give shipped web search a 60s budget 2026-08-01 06:15:16 -07:00
install-script.spec.ts Merge remote-tracking branch 'origin/master' into feature/installer-adopt-checkout 2026-08-01 19:44:12 +08:00
lazy-search-startup.compat.spec.ts Merge remote-tracking branch 'origin/master' into mergebot/pr711 2026-07-31 01:28:15 +08:00
memory-mcp-configs.spec.ts fix(examples): keep memory configs provider-owned 2026-07-31 02:34:52 -07:00
pty-harness.ts fix(tui): address onboarding review feedback 2026-07-31 17:47:07 +08:00
shipped-composition.e2e.ts test(cli): include list_agents in shipped catalog 2026-08-02 12:51:09 +08:00
source-launch.compat.spec.ts feat(cli): launch dsh source through the tsx ESM hook 2026-07-29 13:15:24 +08:00
telemetry-switch.spec.ts fix(web): review round 1 — loud opt-out, headless drain, scaffold isolation, docs 2026-07-31 01:34:42 +08:00
trusted-hosts.spec.ts fix(cli): sample LAN addresses once — trust and the printed LAN URL share the snapshot 2026-07-28 17:47:56 +08:00
tui-first-run-welcome.spec.ts fix(tui): address onboarding review feedback 2026-07-31 17:47:07 +08:00
tui-keyless-smoke.e2e.ts feat(credentials): move the store to .credentials.yaml and layer $DSH_HOME/.env 2026-08-04 14:50:38 +08:00
tui.snapshot.ts Merge remote-tracking branch 'origin/master' into fix/checkout-workdir-prompt 2026-08-01 00:04:49 +08:00
web-prompt-context.spec.ts Merge remote-tracking branch 'origin/fix/web-agent-runtime-context' into worktree/pr830-retarget-review-20260801 2026-08-02 00:56:14 +08:00