313 Commits
Author SHA1 Message Date
Yichen Jiang 59f2e3be33 Merge release/dsh-0.1.5 version 0.1.5-rc.2 into master sync branch 2026-09-10 21:53:53 +08:00
Yichen Jiang a305303422 release(dsh): 0.1.5-rc.2 2026-09-10 21:38:20 +08:00
turtle1999 989b3d4390 Merge hosted-image test fixes for Blacksmith CI 2026-09-10 17:53:36 +08:00
Chinesezjc df709f442c test(subprocess): align the teardown race with the settlement contract
`disposal contains a spawn-failure rejection that races teardown` asserted one
winner of the race. A bootstrap that publishes its pre-exec failure rejects with
that failure, and a teardown that stops the bootstrap first settles as the
requested termination — the recorded failure only outranks the stop when it was
published before the stop landed. Assert the contract instead: a rejection
carries the failure, a stop carries SIGTERM, which only the Linux scope records
because the win32 job owner and the fallback launcher both reject the start.

The two terminal cases that drive a mocked PTY exit state why they pin
`internals.platform`: under the host's native scope the mocked exit races the
scope bootstrap and fails as `terminal scope exited before its bootstrap
consumed the launch request`.
2026-09-10 17:36:14 +08:00
turtle1999 aaa02a3970 fix(subprocess): settle a Linux scope left active with no processes
Range observation waited for an active transient scope to leave `active`
before it would prove the managed range empty. systemd ends a scope only when
it observes the populated-to-empty transition, so a payload killed before the
manager placed it in the scope's cgroup leaves the unit active with an empty
cgroup forever. `waitForExit()` then polled a unit that could not change, and
`LocalSubprocessRuntime.disposeManagedProcesses()` awaited it without bound —
teardown hung for any command cancelled immediately after spawn.

Each state query now also reads the unit's process count. Once termination was
requested and the launcher has exited, a still-active unit reporting no
processes is the empty range: the launcher forked every process it will ever
fork, so nothing later joins that cgroup. The owner stops the leftover unit so
transient units cannot accumulate, and an unreported or `[not set]` count
stays unknown and keeps waiting.

The race needs a live user-systemd manager, so it stayed dormant wherever the
native scope path was unavailable and surfaced once CI routed lanes onto the
Blacksmith hosted image, whose runners accept that path. Ten repetitions of
`local.spec.ts > disposal kills still-running processes and awaits their exit`
in a Linux container with a user manager failed seven times before the change
and passed ten times after it.
2026-09-10 17:27:52 +08:00
07akioni 9f27a45408 test: preserve immediate disposal and observe automatic terminal cleanup 2026-09-10 15:49:57 +08:00
07akioni 6becec9502 Merge master and retain its strict Linux startup cancellation handling 2026-09-10 15:13:38 +08:00
Yichen Jiang b79a227cec fix(subprocess): preserve Linux cancellation before bootstrap consumption 2026-09-10 14:45:45 +08:00
07akioni 4c024cf252 fix: preserve early process cancellation and sample stream markers promptly 2026-09-10 14:28:18 +08:00
j-xiang 4ddf777ad8 Merge master into README proofreading branch 2026-09-10 10:42:13 +08:00
imccyu 1ef9c1fa9a release(dsh): 0.1.5-rc.1 2026-09-10 09:13:14 +08:00
j-xiang 267e8b933b docs(i18n): address README review feedback 2026-09-10 02:03:18 +08:00
j-xiang b5578ae46a Merge master into README proofreading branch 2026-09-10 01:29:37 +08:00
j-xiang 8e8fb2fc62 docs(i18n): proofread bilingual README corpus 2026-09-10 00:21:32 +08:00
imccyu dd393c1820 release(dsh): 0.1.5-alpha.2 2026-09-09 22:02:09 +08:00
imccyu 2faa751be9 release(dsh): 0.1.5-alpha.1 2026-09-08 23:06:34 +08:00
Turtle f1c1ff5a08 docs: constrain package README summaries 2026-09-08 13:52:40 +08:00
Yichen Jiang e379fa8bdd release(dsh): 0.1.3-alpha.2 2026-09-07 19:27:06 +08:00
pku-xht e9f1b6c53e Merge remote-tracking branch 'origin/master' into codex/subprocess-native-containment
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-16-explicit-turn-cancellation.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-16-explicit-turn-cancellation.md
#	.agents/notes/implemented/architecture/2026-07-16-explicit-turn-cancellation.zh.md
#	.agents/notes/implemented/architecture/2026-09-05-canonical-feedback-log.i18n.yaml
#	.agents/notes/implemented/architecture/2026-09-05-nonofficial-feedback-otel.i18n.yaml
#	.agents/notes/implemented/architecture/2026-09-06-embedded-stream-record-readers.i18n.yaml
#	.agents/notes/implemented/bug-fix/2026-09-03-normalized-unread-fs-tool-diagnostic.i18n.yaml
#	.agents/notes/implemented/bug-fix/2026-09-06-windows-python-console-spawn-wait.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-26-generic-file-upload.i18n.yaml
#	.agents/notes/implemented/feature/2026-09-07-model-switch-notice.i18n.yaml
#	.agents/notes/implemented/process/2026-09-03-semantic-issue-templates-and-policy.i18n.yaml
#	packages/shell/bash-local/tests/executor.spec.ts
#	packages/subprocess/subprocess-local/README.i18n.yaml
#	packages/subprocess/subprocess-local/README.md
#	packages/subprocess/subprocess-local/README.zh.md
#	packages/subprocess/subprocess-local/src/spawn.ts
#	packages/subprocess/subprocess-local/tests/spawn.spec.ts
#	packages/subprocess/win32-process/package.json
2026-09-07 17:43:45 +08:00
Tianyi Cui a7a5be1703 docs(notes): archive low-future-value Agent Notes
Run the dsh-archive-agent-notes audit over every active Agent Note on
current master, judging each record by whether its rationale still guides
work rather than by size or age.

- Archive 453 implemented bilingual triplets (417,882 English words):
  completed UI chrome, narrow adapters, closed bug fixes, implementation
  walkthroughs whose package READMEs, docs pages, generators, or successor
  notes now carry the useful behavior, and 51 records fully superseded by
  a later active note. Keep 201 implemented notes whose ownership rules,
  negative guarantees, durable or wire semantics, security rules,
  reintroduction conditions, or still-tempting rejected alternatives
  remain useful.
- Reject 7 proposals whose premise is gone or whose work shipped in
  amended form under other records; delete 2 rejected notes that no
  longer prevent a plausible mistake.
- Retarget every remaining inbound link to the archived path, and repair
  active prose that named an archived record as the owner of a live fact:
  parenthetical citations drop, ownership sentences redirect to the
  README, docs page, or active note that states the fact, and history
  citations say so. Chinese files link the English archived path because
  the pairing gate treats the frozen tree as outside the bilingual corpus.
- Seal 1,359 new frozen artifacts; existing seals are unchanged and
  outbound links from archived notes are neither inspected nor repaired.
- Regenerate docs/config-catalog.md after the hook-bridge comment edits
  shifted two source line numbers.
2026-09-05 14:37:32 +08:00
Yichen Jiang ed67c22496 release(dsh): 0.1.3-alpha.1 2026-09-04 15:38:55 +08:00
Chinesezjc 1f0a87eb06 Merge remote-tracking branch 'origin/master' into fix/test-tmp-teardown-self-clean
# Conflicts:
#	packages/subprocess/subprocess-local/tests/spawn.spec.ts
2026-09-04 11:58:16 +08:00
pku-xht e82e5ffd7a fix(subprocess): normalize PTY scope launcher environment 2026-09-04 02:58:09 +08:00
pku-xht d82fd86c5c fix(subprocess): isolate native runner bootstrap 2026-09-04 00:24:52 +08:00
pku-xht d79f5c04e8 Merge master into codex/subprocess-native-containment 2026-09-03 21:46:02 +08:00
pku-xht 423412b7bf fix(runtime): simplify executable entry dispatch 2026-09-03 21:18:27 +08:00
Turtle a05b5fbe79 fix(subprocess): hide Windows cleanup helpers 2026-09-03 19:01:30 +08:00
Chinesezjc c8fc38541f test: own the default spill dir in subprocess specs; correct retention wording
Second review round (ds-review-bot v4p/v5/v6): the exit cleanup claim that
collectors unlink their spill files on dispose was wrong — completed spill
files are retained (seal() only closes, discardSpill() is the only unlink),
so the exit removal only ever applies to directories that never spilled.
Reword the JSDoc, README, and Agent Note accordingly, drop the redundant
readdirSync precheck (rmdirSync ENOTEMPTY is caught anyway), and recount the
v8-ignore window. The spawn.spec default-spill test now records the default
per-process directory it created and removes it in afterAll, so a completed
spill file is never left behind by the unit suite.
2026-09-03 17:29:21 +08:00
Chinesezjc 1bc330ce01 docs: cross-link the spill retention decision from the teardown note
The Agent Note now links the 2026-07-17 local-spill-startup-cleanup note it
builds on, and the privateSpillDir JSDoc documents the empty-dir exit
removal alongside the directory's creation contract.
2026-09-03 17:07:43 +08:00
Chinesezjc 29e6669e3c test: narrow process-exit spill cleanup to empty dirs; drop spill-store deletion
Review (ds-review-bot) found the exit-time deletion of per-process spill
roots conflicts with the documented retention decision: spill artifacts are
model-visible locators that resumed or forked sessions may still reference
(2026-07-17-local-spill-startup-cleanup), and an exception thrown from an
'exit' listener can change the process exit code.

- dsh-spill-local: revert the exit handler entirely; its default root is
  already owned by the package's 30-day startup sweep.
- dsh-subprocess-local/spawn: remove the per-process spill dir at a
  JavaScript-observable exit only while it is EMPTY (collectors unlink
  their spill files on dispose), best-effort with a named swallow so a
  Windows-held handle never changes the exit code; dirs holding spill
  files keep them for external cleanup.
- Document the empty-dir exit removal in the package README and the Agent
  Note, and re-record both bilingual pairs.
2026-09-03 17:06:48 +08:00
Turtle cc8099dc5f fix(subprocess): hide Windows child windows 2026-09-03 17:05:18 +08:00
Chinesezjc 6d9776a3b0 test: exempt process-exit spill cleanup from the per-file coverage gate
The exit listener runs after the coverage dump, so its body can never be
measured by the unit coverage lane; mark it v8-ignore with the reason, as
with other process-exit-only code paths.
2026-09-03 16:35:45 +08:00
Chinesezjc 0364343a7e test: remove dsh-* temp dirs created by unit tests at teardown
Spec files that create /tmp/dsh-* directories via mkdtemp now track and
delete them in afterEach/afterAll; module-scope fixture dirs (executor
spill dirs) are removed in afterAll. The file list came from the
observed-residue inventory on the self-hosted CI host: only specs whose
dirs actually accumulated were leak sources (issue #3134), superseding
the kept-but-unmerged CI sweep branch per the #3233 review decision.

Product per-process spill roots (dsh-subprocess-local spawn,
dsh-spill-local store) register a process-exit handler that removes the
memoized dir, so processes that used the spawn/spill path clean up on
normal exit. A SIGKILLed process cannot run in-process teardown; the
machine-side timer remains the backstop for that path.

Agent Note: .agents/notes/implemented/process/2026-08-28-test-temp-dir-self-cleanup.md
2026-09-03 16:19:18 +08:00
Yichen Jiang 7169660d33 Merge pull request #3198 from deepseek-harness/worktree/deepseek-harness-proxy-config-2f5b4a
feat(net): route every outbound request through the configured proxy
2026-09-03 13:19:19 +08:00
pku-xht ed25d4e15b docs(subprocess): correct probe and terminal failure contracts 2026-09-03 08:58:31 +08:00
pku-xht 0652b7b4d7 fix(subprocess): close containment review gaps 2026-09-03 06:18:21 +08:00
pku-xht 14c16012fb fix(subprocess): preserve post-commit runner errors 2026-09-03 04:07:57 +08:00
pku-xht ff6a49660f fix(subprocess): tighten native containment settlement 2026-09-03 03:26:42 +08:00
imccyu a66e470204 release(dsh): 0.1.2-rc.1 2026-09-03 02:27:19 +08:00
pku-xht bc681d7a54 fix(subprocess): harden cancellation settlement 2026-09-03 01:18:40 +08:00
pku-xht 05b6789425 fix(subprocess): preserve clean range after start errors 2026-09-03 00:59:07 +08:00
pku-xht fe873955b4 Merge master@313ac567 into subprocess native containment 2026-09-02 23:00:02 +08:00
pku-xht ac1a5891c2 fix(subprocess): close remaining native containment findings 2026-09-02 22:49:46 +08:00
Yichen Jiang 5eb499ed35 Merge remote-tracking branch 'origin/master' into worktree/deepseek-harness-proxy-config-2f5b4a 2026-09-02 21:14:16 +08:00
imccyu db6bdc3576 release(dsh): 0.1.2-alpha.5 2026-09-02 15:48:33 +08:00
Yichen Jiang e7170b05a1 Merge remote-tracking branch 'origin/master' into worktree/deepseek-harness-proxy-config-2f5b4a 2026-09-02 10:28:17 +08:00
imccyu a9e185f205 release(dsh): 0.1.2-alpha.4 2026-09-01 23:19:57 +08:00
Yichen Jiang 8470ddef1d refactor(http-proxy): converge the proxy API on four functions
The package exported six functions, four of them shaped by one SDK's
transport each: a dispatcher factory, a `node:http` agent factory, a
proxy-URL lookup, and a policy accessor. Review asked whether the call
sites could converge instead of the package growing an export per SDK.

They could, and each removal took a whole shape with it:

- The OTLP exporter moves to the SDK's `fetch` delegate, retiring
  `createNodeHttpAgent`. Its Node-version floor goes too: `proxyEnv` on
  an `http.Agent` needs 22.21 or 24.5, inside the engines range, so
  telemetry was direct on 22.19, 22.20, and 24.0-24.4. The cost is
  `compression`, a Node-transport option; the plugin now refuses it,
  `keepAlive`, and `httpAgentOptions` at load instead of ignoring them.
- `web-fetch-http` builds its own address-pinning agent under an
  annotated `proxy-exempt:` exemption, retiring `createDispatcher`.
  Pinning is per-request state a process-wide dispatcher cannot hold.
- E2B reads `route.proxy`, retiring `proxyUrlFor`.

What remains is `installProxyFromEnvironment`, `proxyRouteFor`,
`proxyEnvironmentForChild`, and `clearedProxyEnv` — one per way a caller
can need the policy. Installation absorbs resolution and diagnostic
reporting, which no caller needed apart.

`proxyRouteFor` also closes a defect the old accessor made expressible:
`web-fetch-http` read the policy to decide whether to pin, then read it
again to build a transport, so an unmount between the two returned a
direct, unpinned agent for a URL the first read had cleared as proxied.
A route carries the answer and the transport that answer assumed.

Every egress spec now installs through `installProxyFromEnvironment`, so
no test asserts a policy object a real launch could not produce.
2026-09-01 21:15:04 +08:00
Yichen Jiang f878545358 Merge remote-tracking branch 'origin/master' into worktree/deepseek-harness-proxy-config-2f5b4a
Master moved 212 commits. Conflicts were eight `package.json` and nine
`tsconfig.json` files, all dependency-and-reference unions: master dropped the
`runtime-diagnostics/invariants` reference across packages while this branch
added `util/http-proxy`. The lockfile, `tsconfig.base.json`, and the module
graph were regenerated rather than merged by hand.

Master also brought `verify-package-invariants`, which rejects an empty
invariant companion. This package's companion was empty by design, so it is
gone with its publication wiring — the export, the `files` entry, the project
reference, the `dsh-invariants` peer, and the test. Master did the same across
`util/`. The README carries the reason sentence that gate requires.

Carried in the same commit, because the review arrived while the merge was open:
`e2bApiUrl` moves out of the `dsh-e2b` entry into `src/api-url.ts`. Code Entropy
flagged it as a public name with no consumer outside its own package; the seam
keeps its URL-precedence test, which is worth having directly — getting that
order wrong hands a proxy the control-plane traffic and its API key.
2026-09-01 13:39:50 +08:00
Turtle d68ff7e66f Merge remote-tracking branch 'origin/master' into turtle/omit-unneeded-invariants
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/session/session-projection/src/invariant.ts
#	tsconfig.base.json
2026-09-01 11:18:11 +08:00