Commit Graph
4373 Commits
Author SHA1 Message Date
Tianyi Cui eac927e143 test(scripts): cover preparation cancellation and an abandoned client
Both are failure paths the registry owns: a signal that stops packing must
report as a cancellation rather than as a pack failure, and a client that
disconnects mid-tarball must not stop later requests. execa reports the first
either as a resolved canceled result or as a thrown error, so the packing step
now names both.
2026-10-07 14:07:27 +08:00
Tianyi Cui 73d853a9ae feat(scripts): serve locally built Official bundles from a loopback registry
A packaged application installs an Official on-demand bundle as
`name@<running DSH version>`, and the plugin manager asks a custom registry
alone, so the unsigned test DMG cannot install a locally built provider before
its release reaches npm: each packed manifest still names the rest of the
repository by version, and ordinary bundle tarballs therefore resolve against
a registry that does not have them yet.

`pnpm run dev:bundle-registry` validates the Official catalog and the workspace
inventory, builds the official artifacts, packs the catalog's complete local
dependency closure with the release families' own payload and manifest checks,
records the run in `dist/test-bundles/<run-id>/bundle-registry.json` as its
completion marker, and only then serves it from 127.0.0.1 on an allocated port
under a fresh namespace. Repository-owned names are answered from this run or
refused locally; third-party packages keep npm's real metadata and bytes
through a fixed redirect. The run publishes nothing, changes no global
npm/pnpm configuration, and leaves DMG packaging untouched.

The packed installer rehearsal now installs that closure into an isolated
profile with no `file:` override, checkout link, ignore list, or scoped
registry standing in for a package the registry should answer, and it asserts a
transitive repository package served only by this run.
2026-10-07 14:07:27 +08:00
Tianyi Cui c4bda67252 test(python): own dynamic tool fixture instructions and homes 2026-10-07 14:06:44 +08:00
Tianyi Cui 19d36f602b test(python): isolate dynamic tool snapshots from log export 2026-10-07 13:53:19 +08:00
Tianyi Cui a46412bd53 fix(scripts): keep Python runtime deployment isolated and deduplicated 2026-10-07 13:51:48 +08:00
Tianyi Cui 5529a5014a fix(ci): skip the verification install when rebuilding Linux node-pty
pnpm 11.28.5 runs verifyDepsBeforeRun before a script, so `pnpm run install`
inside the installed node-pty directory first installed node-pty's own
dependencies into the package and ran its `prepare` build. Both reached the
packaged payload: the SEA blob then carried a node-gyp tree and tripled pkg's
file records, and postject aborted while injecting it. The step now runs the
package's install script alone, as it did with pnpm 11.7.0.
2026-10-07 13:10:09 +08:00
Tianyi Cui 4260fd2451 fix(scripts): keep the Python runtime payload out of its own deploy root
pnpm's legacy deploy links the deployed project into the target's node_modules
when the target sits inside that project. Materializing that link copies the
payload into itself and fails with ERR_FS_CP_EINVAL, which broke the
release-shaped Python runtime matrix on Linux and Windows. The staged payload
never carries the project source, so the staging tree's owner drops the entry
and leaves the deploy root's files alone.
2026-10-07 12:58:25 +08:00
Tianyi Cui e9a68b2484 fix(plugin): clarify on-demand recovery and preserve package diagnostics 2026-10-07 01:26:00 +08:00
Tianyi Cui f730199b94 test(plugin): classify on-demand composition and document mock events 2026-10-07 01:26:00 +08:00
Tianyi Cui 8ed0b530ed feat(plugins): offer official bundles through on-demand installation 2026-10-07 01:26:00 +08:00
Tianyi Cui 2b0dd1567d fix(plugins): preserve Creator drafts and refresh bundle validation 2026-10-06 23:48:59 +08:00
Tianyi Cui 55dfd3bab1 fix(plugins): narrow optional bundles and create fresh session agents 2026-10-06 23:48:59 +08:00
Tianyi Cui fbb95c0f16 fix(plugin): preserve final pinned composition and browser inventories 2026-10-06 23:48:59 +08:00
Tianyi Cui 07136d1752 fix(plugin): preserve established optional capability selectors 2026-10-06 23:48:59 +08:00
Tianyi Cui d68ae3bf51 fix(plugin): preserve bundled resource identity in executables 2026-10-06 23:48:59 +08:00
Tianyi Cui de27882007 test(plugin): refresh optional bundle inventory and browser evidence 2026-10-06 23:48:59 +08:00
Tianyi Cui 8a9767c25e feat(plugin): validate optional bundle lifecycles and session output 2026-10-06 23:48:58 +08:00
Tianyi Cui 3aa1cab43a feat(plugin): compose optional bundles inside agent presets 2026-10-06 23:48:58 +08:00
Tianyi Cui 4da62dc8f4 test(release): include experimental session search tools 2026-10-06 23:45:22 +08:00
Tianyi Cui c2d528bb6d refactor(experimental): classify optional session search tools 2026-10-06 23:20:51 +08:00
Tianyi Cui 582c9ab7b7 fix(experimental): retain published names and centralize identity policy 2026-10-06 16:42:25 +08:00
Tianyi Cui 5990ccbb4a fix(experimental): align package guidance and platform source ownership 2026-10-06 16:41:35 +08:00
Tianyi Cui 7bc0b972f8 test(experimental): preserve platform and installed-profile coverage 2026-10-06 16:41:34 +08:00
Tianyi Cui b7ed2a5e85 test(experimental): resolve optional fixtures from their owners 2026-10-06 16:41:04 +08:00
Tianyi Cui b48384223a refactor(experimental)!: classify optional packages and move prototypes 2026-10-06 16:41:04 +08:00
Tianyi Cui b98b76c9a5 feat(translator): add opt-in native DeepSeek Flash translation 2026-10-06 15:38:24 +08:00
Tianyi Cui cfc6be809c feat(reasoning): persist opt-in machine translations 2026-10-06 15:36:14 +08:00
Dudu-0223 bf1c4e01ba Merge pull request #4394 from deepseek-harness/refactor/subagent
refactor(subagent): unify activations and reuse parent catalog
2026-10-06 15:08:30 +08:00
Tianyi Cui 1103b0277b fix(session): await natural migration verifier worker exit
A successful verifier message was treated as terminal even though the
Worker Thread was still alive. The parent immediately terminated the
worker and detached cancellation, so an error, nonzero exit, or caller
cancellation after that message could be ignored and verification could
resolve successfully.

Keep the first successful response pending until an observed natural exit
with code 0. A missing response or nonzero exit rejects after the worker
has already exited. Error and abort callbacks retain the existing
terminate-and-join path, including its first-error and AggregateError
behavior. The scheduler stays unchanged: its permit remains held until
the verification promise settles, now after successful worker quiescence.
The worker already closes its parent port in finally, so success needs
neither a forced stop nor another protocol message.

Replace success-termination expectations with deterministic message/exit
barriers and cover post-response errors, nonzero exit, cancellation, and
permit handoff. Remove the obsolete hand-written termination thenable and
its retired unknown-assertion baseline entry. Add real source workers for
plain and Zstandard input, and require the built plain-Node migration smoke
to complete with zero termination calls. Document the settlement condition.

Native Windows CI recorded process access violation 0xC0000005 while a
migration fixture was active. Removing unnecessary successful-worker
termination is consistent with that evidence, but this commit does not
claim that the native faulting module or mechanism has been established.
The deterministic regressions prove the lifecycle defect independently;
the next native CI run must assess whether the observed crash recurs.

Validation:
- Original source failed all new message-to-exit regression scenarios;
  the updated focused lifecycle file passes 19 tests with 100% coverage.
- Node 24 owning package: 19 files, 741 passed, 1 skipped; every included
  package source file reaches 100% statements/branches/functions/lines.
- Real source workers passed for none/zstd; built plain-Node smoke passed
  with zero terminate calls and no timeout or process signal.
- Exact Node 22.19 source-mode none/zstd workers naturally exited 0 with
  zero terminate calls, exercising the async Module.register fallback.
- Host TypeScript build, focused lint, no-new-unknown-assertion gate,
  README translation pairing, and all 42 doc-sync gates passed.

Related to #4387 and #4394.
2026-10-06 11:29:17 +08:00
Tianyi Cui 8f3959a196 Merge branch 'master' into worktree/client-control/cli-help-reference 2026-10-06 10:59:23 +08:00
Tianyi Cui a3cb678875 Merge master current-directory support into subagent activations
Integrate the observed master checkpoint 7ab215e23e5d977aae7eb5d4fb91782d39969dbb without rewriting the earlier published checkpoints. Master adds current-directory events, directory-aware consumers, and retained Git worktrees; its old subagent startup paths overlapped the unified activation implementation.

Resolve directory selection within managed startup after acquiring parent ownership. Preserve the original Session origin while setting each new local child directory, retain persisted directory state on cold resume, and pass a required absolute cwd to external providers. Keep unified local/external ownership, full completion notices, parked-input host completion, SDK wait/error/shutdown behavior, and ACP cancellation semantics. Retain removal of the old in-process driver and continuation managers.

Combine SDK wait with the new directory requests, preserve the new master directory/worktree fixtures, regenerate derived catalogs from the combined sources, and refresh only the four stale prompt/schema sidecars. Preserve every protected historical schema, archived note, catalog-v2 acknowledgement, and recorded predecessor input.

Validation: full build; 59 CI static gates; 855 subagent tests with 100% coverage on changed core/external sources; affected consumer suites including 119 repaired-fixture tests; SDK 11 and headless 16 recorded scenarios; two local headless expected cases; six built nested SDK/ACP cases; lint, strict cast inventory, workspace constraints, and whitespace checks. Native Windows worker diagnostics remain additive and require the next CI run to classify the original crash.
2026-10-06 10:52:35 +08:00
Tianyi CuiandChinesezjc 9bc34fa962 ci: reuse reviewed coverage fork exit diagnostics
Repeated native Windows coverage runs stopped a Vitest fork while a JSONL
migration suite was unfinished. Vitest's generic unexpected-exit error
discarded the process exit code and signal, preventing classification of
the failure despite identifying the missing test file from the inventory.

Reuse the public ForksPoolWorker diagnostic implementation and protocol
fixtures from independently reviewed PR #4388, pinned at
77e215ff76711ec75ed8aa08aa5b414780e539ae. The runtime helper is unchanged.
It reports PID, project, worker identity, outstanding file request, code,
and signal before stock Vitest reports the original failure. It clears
ownership only on the typed testfileFinished response, suppresses expected
stop, and leaves cancellation and failure handling with the original pool.

Wire that existing pool into generated coverage partition configs. Keep
the original worker counts, partition scheduling, test timeouts, coverage
thresholds, and failure verdicts. No environment, raw argv, or test object
is serialized. This commit adds diagnostic evidence; it does not claim to
repair the still-unidentified Windows crash. PR #4388 remains the separate
reviewable owner; no duplicate diagnostic framework or PR is introduced.

Adapt the copied fixtures to the current no-new-unknown-assertions rule:
declare the private preload exit function, validate consumed logger fields
with the public logger type, and assign matcher/rejection values to typed
unknown locals without assertions. Add a concise bilingual testing note.

Validation:
- Diagnostic suite: 10 passed, including a real configured Vitest fork
  exiting 23, stock-pool negative control, successful silent shutdown,
  unexpected exit 0, early exit, independent forks, and signal metadata.
- Coverage coordinator suite: 51 passed.
- Targeted lint and focused strict TypeScript check passed.
- pnpm exec tsc -b tsconfig.host.json passed.
- verify-no-unknown-casts passed; 1430 existing assertions unchanged.
- doc-sync passed 40 gates; the two initially failing gates were repaired
  and rerun successfully: doc-typecheck and verify-doc-budgets.
- Translation pairing and git diff --check passed.

Refs #4387, #4388, #4394.

Co-authored-by: Chinesezjc <[email protected]>
2026-10-06 10:17:44 +08:00
Tianyi Cui acf7949db0 test(sdk): replace the cast context with typed runtime services
The cwd regression used a fake Context cast through unknown. Updating its service lookup for descendant shutdown changed the exact legacy assertion fingerprint, which the no-new-unknown-casts CI gate correctly rejected.

Exercise initialize, prompt, and wait with the real Context, Agent registry, Session store, and a scripted LLM adapter. Spy on the real service methods to keep the cwd, reasoning effort, and token-limit assertions. Remove both obsolete unknown assertions and prune only their recorded allowances; do not add or broaden an exception.

Validation: the cwd regression passes; all 54 SDK server tests pass with 100% server coverage. The full check:ci:static aggregate passes 59/59, including the strict unknown-cast inventory. No production behavior changes.
2026-10-06 03:23:56 +08:00
Tianyi Cui a1363f7f47 fix(worktree): offer GUI opt-in through official plugins 2026-10-06 01:39:47 +08:00
Tianyi Cui 171cf5d70f fix(experimental): align worktree fixtures and catalogs with current runtime 2026-10-06 01:39:47 +08:00
Tianyi Cui d299d3b966 test(experimental): verify worktree release and sandbox behavior 2026-10-06 01:39:46 +08:00
Tianyi Cui c67a2d6fdf feat(experimental): create and enter retained Git worktrees 2026-10-06 01:39:46 +08:00
Tianyi Cui e1fe956928 test(sdk): reuse directory fixture mapping for recovery 2026-10-06 01:31:51 +08:00
Tianyi Cui c6aad8c433 test(sdk): refresh released runtime directory context outputs 2026-10-06 01:31:51 +08:00
Tianyi Cui bad0ce8311 test(session): align global directory tool expectations 2026-10-06 01:31:51 +08:00
Tianyi Cui 0c6b1ef7bb fix(session): port directory consumers and fixtures to current runtime 2026-10-06 01:31:51 +08:00
Tianyi Cui b446e2e290 fix(web): start sidebar terminals in the session directory 2026-10-06 01:27:55 +08:00
Tianyi Cui 6f23c5dfd1 fix(session): align rebased documentation and SDK series output 2026-10-06 01:27:55 +08:00
Tianyi Cui 92713fcdbd fix(session): complete working directory consumers and validation 2026-10-06 01:27:54 +08:00
Tianyi Cui 79bd3d8da7 feat(session): centralize working directories and directory context 2026-10-06 01:27:54 +08:00
Tianyi Cui 9dcc8fa985 Merge master into unified subagent activations
Integrate master 78ae4fc2d4d8ecaebb4b674028f781a358b92cc9 after the four
independent review fixes. Keep this base update separate from those fixes
and from subsequent review changes so the integration is independently
reviewable and the observed-master checkpoint remains preserved.

Retain activation-owned execution, caller-independent local discovery,
and unconditional parent final-answer delivery. Preserve master's preset
scoped scheduling tools and all delegated-child schedule deny rules. Move
the new scheduling regression from the removed driver package into the
surviving subagent package and run it through a real Spawn activation.

Preserve master's removal of runtime invariant plugins, dependencies,
exports, and test mounts. Keep context disposal before fixture directory
cleanup. Combine Python workflow ordering with activation/catalog events
without inventing unsupported source-plane import paths.

Keep all frozen Agent Note archives byte-for-byte identical to master;
do not accept Git's automatic edits to renamed archived notes. Retain
current lifecycle and delivery facts in active documentation, repair its
links, and regenerate catalogs/persistence schemas from merged source.
All 62 master persistence roots remain; only subagent/catalog gains the
PR's external membership extension. Keep master's third-party lock graph
and update only workspace dependency changes.

Validation before this checkpoint: 683 focused tests passed, seven
Windows-only cases skipped; 2,772 archived artifacts verified. Generated
catalog and active-pair checks passed. Fresh artifact build and remaining
build-dependent documentation checks continue before publication.
2026-10-05 23:49:47 +08:00
Tianyi Cui 63c1ea3491 fix(subagent): preserve caller-owned local child discovery
Caller delivery previously suppressed both settlement messages and local
catalog membership. Workflows therefore stopped publishing the durable
parent-child edge that the parent header and recursive discovery require.
The workflow panel only opens running members, and the ordinary sidebar
hides subagent Sessions, so completed workflow transcripts had no normal
navigation path even though their logs still existed.

Record every successfully admitted local child in its parent's catalog,
independently of the result recipient. Membership answers which local
Sessions belong to the parent; delivery answers who consumes this activation's
result. Keeping those decisions separate restores completed-child and
descendant discovery without duplicating workflow completion messages or
adding return guidance to caller-owned work. Publication failures retain
the existing rollback transaction for both delivery modes.

These local children intentionally retain the unified continuable mode:
list_agents includes them, the parent catalog opens their transcripts after
reload, and the existing direct-parent controls can cold-resume them. No
one-shot execution path or additional lifecycle state is introduced.
Caller-owned external executions still use their consumer's membership
records because they have no local Session to open.

Update the existing bilingual service/workflow documentation and decision
records, refresh the owning workflow/Ralph/advanced Session recordings and
Python SDK event expectations, and preserve unrelated recorded stream times.

Validation:
- Full repository build passed.
- 443 subagent, workflow-host, and Ralph tests; 14 list_agents tests passed.
- Four focused headless workflow/advanced snapshot refreshes and replays passed.
- Three shipped-Web workflow tests passed, including completed-child catalog
  navigation after reload and the continuable composer.
- Python SDK advanced and scheduler-recovery snapshots refreshed and replayed
  through the built dsh CLI with Python 3.12.
- Three discovery regressions fail with the original catalog exclusion and
  pass after restoring this fix.
- test:docs (20 gates), doc-sync (42 gates), lint:contracts-ready, Host and
  Client TypeScript builds, and git diff --check passed.
2026-10-05 23:32:33 +08:00
Tianyi Cui 8a7d5014bf Merge pull request #5716 from deepseek-harness/worktree/pr-ci-speed-independent-20261005
perf(ci): reduce repeated compilation without raising concurrency
2026-10-05 19:35:09 +08:00
Tianyi Cui 9e9a95f8dc perf(ci): start runtime checks within the existing job ceiling 2026-10-05 18:21:54 +08:00
Tianyi Cui c954a07535 docs(session): separate experimental persistence catalogue 2026-10-05 18:09:01 +08:00