deepseek-harness/packages/core/tools/tests
Tianyi Cui f9cc62266c fix(tools): single ordered driver lane for the sub-dispatch scheduler; validate the cap
Responding to ds-review-bot round 2 on #658 (three critical findings, one
warning — all rooted in the pump/commit split racing ordered stages):

- ONE driver lane now owns every ordered stage: the start append, prepare
  (pre-execute/guards), and the head-of-line commit (post-execute, context
  deferral, settle append). start() is awaited before the next entry can
  start, so concurrent submissions can no longer run pre-execute pipelines
  concurrently; only the around-dispatch/body stage overlaps, matching the
  native loop's fillPool sequencing.
- An exclusive call's barrier now holds through its COMMIT: later starts
  wait for the exclusive pipeline (post-execute included) to finish, the
  native exclusive-group semantics.
- drainDispatches() awaits the driver run itself, so a commit already
  mid-flight when the program returns is drained before run_code closes
  the turn — the settle event and deferred contexts land inside it.
- maxParallelSubCalls is resolved and validated at construction (positive
  integer), so direct construction can no longer wedge the pool with 0.

New tests: overlapping-submission ordered-prepare, barrier-through-commit,
drain-mid-commit, cap rejection. 96 keyless snapshots replay unchanged;
Agent Note updated (both languages).
2026-07-26 15:26:52 +08:00
..
code-mode.spec.ts fix(tools): single ordered driver lane for the sub-dispatch scheduler; validate the cap 2026-07-26 15:26:52 +08:00
execution-mode.spec.ts Merge branch 'codex/tool-json-schema-dsl' into codex/canonical-tool-output 2026-07-21 23:39:03 +08:00
execution-signal-types.spec.ts Merge branch 'codex/tool-json-schema-dsl' into codex/canonical-tool-output 2026-07-21 23:39:03 +08:00
gen-tool-catalog.spec.ts fix session-query CI invariants 2026-07-24 15:42:24 +08:00
invariant.spec.ts Merge branch 'codex/tool-json-schema-dsl' into codex/canonical-tool-output 2026-07-21 23:39:03 +08:00
json-schema.spec.ts fix(schema): align projected and enforced declarations 2026-07-23 01:05:41 +08:00
properties.spec.ts test(tools): cover adversarial JSON containers 2026-07-21 18:20:18 +08:00
schema.spec.ts fix(schema): align projected and enforced declarations 2026-07-23 01:05:41 +08:00
scoped.spec.ts Merge branch 'codex/tool-json-schema-dsl' into codex/canonical-tool-output 2026-07-22 17:05:38 +08:00
tools.spec.ts Trim redundant source comments 2026-07-25 13:02:37 +08:00
ts-types.spec.ts feat(tools): live dispatch lifecycle + native-contract parallel sub-calls in Code Mode 2026-07-26 06:02:36 +08:00