Commit Graph
8541 Commits
Author SHA1 Message Date
Chinesezjc b45da8b67d Merge remote-tracking branch 'origin/master' into feat/py-types-code-mode 2026-08-02 17:49:48 +08:00
Chinesezjc 0d6191d0db test(tools): make the deep oneOf-object test a real quadratic tripwire
The 60k oneOf-object test had only one object node (the innermost), so the
pre-fix code called allocateClassName once — linear, never tripping the
timeout, so it did not cover the class-name Θ(depth²) it named. Give every
level an object branch (both oneOf arms are objects) so each level propagates
a one-segment-longer class name; the pre-fix rope slice is then Θ(depth²)
(~9.5s, past the 5s default) while the capped path stays linear. Also extract
the shared cap expression into capClassNameBase (used by allocateClassName and
childClassName). py-types.ts stays at 100% per-file coverage.
2026-08-02 17:48:33 +08:00
Ziya fff0172208 Merge pull request #1125 from deepseek-harness/agent/web-search-timeout-budget
fix(cli): give shipped web search a 60s budget
2026-08-02 05:42:41 -04:00
Tianyi Cui 089f921663 Merge pull request #983 from deepseek-harness/codex/install-pnpm-stderr
fix(install): show pnpm version errors
2026-08-02 17:41:43 +08:00
Chinesezjc 345375747e perf(tools): cap propagated class names so deep oneOf-object chains stay linear
The oneOf perf fix left a second Θ(depth²): a deep oneOf chain whose branches
are named objects propagated an ever-growing ConsString as the class-name
base, which allocateClassName then re-materialized (.length/.slice) at every
level. A childClassName helper now caps the base AT PROPAGATION, so each level
is O(1) and the walk is linear; the collision counter still makes truncated
bases unique. Also reword the oneOf comment (it said `+` but the code uses a
template literal — both are ConsString) and strengthen the tests: the deep
oneOf test now runs 100k levels (a quadratic regression trips the 5s timeout),
plus a 60k oneOf-object chain and a >120-char tool-name cap case. py-types.ts
stays at 100% per-file coverage.
2026-08-02 17:36:04 +08:00
Chinesezjc b0e405a679 perf(tools): keep py-types oneOf rendering linear in schema depth
A deep oneOf chain joined the accumulated union string at every level
(Array.join forces materialization), making it Theta(depth^2) — a
50,000-level chain took ~7.6s. Concatenate with `+` instead: V8 builds a
lazy ConsString that materializes once at the root, matching the array
arm's template-literal laziness and ts-types' composable-document approach.
The whole walk is now linear in depth. Adds a 20,000-level oneOf test
alongside the existing deep-array one; py-types.ts stays at 100% coverage.
2026-08-02 17:22:38 +08:00
Chinesezjc 282b0d7443 docs(tools): align SDK_RENDERERS comment with the note wording
The SDK_RENDERERS JSDoc kept the circular "a renderer here … plus the
renderer itself" phrasing the note already fixed, and its
{@link RUN_CODE_FLAVORS} pointed at a non-exported const in another module
(unresolvable). Reword to "an entry here and a RUN_CODE_FLAVORS entry in
code-mode.ts … plus the renderer function this table points at".
2026-08-02 17:11:36 +08:00
Chinesezjc 13f6af4949 docs(tools): reword the language-dispatch note's two-entries sentence
The Consequences sentence called one of the two table entries "a
SDK_RENDERERS renderer" — circular, since the entry is the renderer mapping.
Reword to "an SDK_RENDERERS entry and a RUN_CODE_FLAVORS entry, plus the
renderer function the former points at" in both languages.
2026-08-02 16:59:50 +08:00
Chinesezjc cabeaed1eb refactor(tools): type the py-types render frame and tighten the note
Follow-ups from the bot's review of the trusted-after-validation revert:
- renderType's Frame now carries JsonSchemaNode (the root schema is asserted
  before any frame is built), dropping the `as Record<string, unknown>` casts,
  the `node.oneOf as unknown[]` cast, and the runtime `required` filter — the
  same typed-frame shape as the sibling ts-types renderer, so the "symmetric
  with ts-types" claim holds structurally, not just behaviorally.
- The language-dispatch note broadens the trusted-input argument to cover all
  real sources (first-party defineTool/raw registration and wire-derived plain
  JSON), and the zh side uses full-width punctuation per translation-rules.md.
py-types.ts stays at 100% per-file coverage.
2026-08-02 16:42:32 +08:00
Chinesezjc f61b138e08 refactor(tools): restore py-types to the ts-types trusted-after-validation stance
Rounds 6-9 of the bot review kept finding adjacent hostile-getter variants
(post-validation cycles, TOCTOU on const/enum/oneOf, self-referential
functions) because the renderer had grown per-shape runtime defenses the
sibling ts-types renderer does not have. Those inputs are unreachable: the
schema is a first-party defineTool object literal that already passed
assertSupportedJsonSchema, and per AGENTS.md "Trust TypeScript at typed
same-process seams" a typed same-process seam does not add hostile-input
handling for values the static interface forbids.

renderType now validates the whole tree once and trusts it, wrapping the walk
in one try/catch that degrades to Any — byte-for-byte the stance of the
ts-types sibling. This removes the cycle-tracking (activeSchemas/hasIdentity),
the const/enum/oneOf read snapshots, the isPyScalar re-check, the typing
rollback, and the pyScalar null->None re-read handling; the corresponding
hostile-getter tests are removed. Behavior fixes that hold for legitimate
input are kept: RESERVED soft-keyword exclusion, closed-empty-object TypedDict,
class-name cap + per-base collision counter, BigInt digits for beyond-safe
integers. py-types.ts stays at 100% per-file coverage.

The language-dispatch Agent Note documents the stance and its symmetry with
ts-types so the boundary is not re-litigated.
2026-08-02 16:25:01 +08:00
Chinesezjc 7518a5cb65 fix(tools): snapshot const/enum/oneOf reads to close stateful-getter TOCTOU
Address ds-review-bot v5/v6 review round 8. The prior guards re-read a
stateful getter's value between the check and the spelling, so a getter
returning different values across reads could still emit invalid Python:
- renderConstrainedScalar reads node.const ONCE into a local, then checks and
  spells that snapshot; a third-read switch can no longer produce
  Literal[[object Object]].
- The enum path snapshots via [...raw] (reading each element exactly once,
  covering accessor-property elements) and requires the snapshot be a non-empty
  all-scalar array; an emptied re-read no longer spells Literal[], and a
  non-array re-read degrades.
- The oneOf branch build guards a non-array or empty re-read to Any instead of
  joining to '' (a missing type).
- pyScalar spells null as None; its JSDoc no longer claims null cannot reach it.
Tests cover each re-read shape; py-types.ts stays at 100% coverage.
2026-08-02 15:51:23 +08:00
Chinesezjc 51189a650c fix(tools): track functions in cycle detection and guard scalar re-reads
Address ds-review-bot v5/v6 review round 7:
- The render-walk cycle guard tracked only plain objects; a function has
  typeof 'function' yet carries own properties and can reference itself, so a
  post-validation getter returning a self-referential function bypassed the
  guard and looped forever. A hasIdentity() helper now covers objects AND
  functions, applied symmetrically at the three sites (root add, finish remove,
  child check).
- renderConstrainedScalar re-reads const/enum at render time; a stateful getter
  that validated as a scalar could return an object, spelling the invalid
  Literal[[object Object]]. It now degrades to the broad type when the re-read
  value is not a scalar (or the enum not an all-scalar array).
- The activeSchemas comment notes the out-of-scope boundary: a getter
  fabricating a fresh node per read never repeats an ancestor and is
  indistinguishable from a legitimately unbounded-depth schema.
Tests cover the function cycle and non-scalar const/enum re-reads; py-types.ts
stays at 100% per-file coverage.
2026-08-02 15:35:19 +08:00
Chinesezjc 96a2e38fa3 fix(tools): detect render-phase cycles and fix class-name JSDoc placement
Address ds-review-bot v5/v6 review round 6:
- renderType tracks the active ancestor schemas by object identity (the frame
  stack is the DFS path). A stateful getter can mutate the graph after
  validation so a child returns an ancestor at render time; without this the
  walk pushed frames forever instead of degrading. A repeated ancestor now
  degrades to Any, honoring the never-throw contract; distinct nodes in a
  legitimately deep chain are different objects, so it stays O(1) per push and
  O(depth) memory.
- The multiline allocateClassName JSDoc was still attached to the
  MAX_CLASS_NAME_BASE constant (a self-referential @link, and the function had
  no doc). Move the doc onto the function and give the constant its own
  one-liner.
- Tests cover the post-validation cycle and a non-object render-time child;
  py-types.ts stays at 100% per-file coverage.
2026-08-02 15:24:10 +08:00
Chinesezjc 55224387d9 Merge remote-tracking branch 'origin/master' into feat/py-types-code-mode 2026-08-02 14:54:01 +08:00
Wenlu Wang 677f7bc530 Merge pull request #1147 from deepseek-harness/codex/todo-goal-queue-layout
fix(web): align composer context stack
2026-08-02 14:53:26 +08:00
Chinesezjc 1614f19686 fix(tools): amortize class-name allocation and tighten py-types render contract
Address ds-review-bot v5/v6 review round 5:
- allocateClassName: keep a per-base collision counter (state.nextClassCounter)
  so a deep single-field chain sharing one capped base allocates in amortized
  O(1) instead of rescanning from 2 each time (Theta(depth^2) time); remove the
  stale one-line JSDoc left above the multiline one and attach the doc to the
  function, not the constant.
- renderType's catch rolls back the typing symbols the discarded subtree added
  (not just the classes) so the import line still lists exactly the symbols the
  surviving output uses; the comment now names that the same path also degrades
  this module's internal-invariant throws to Any, the trade for never throwing.
- README (both languages) no longer describes an installable
  dsh-code-runtime-python package: the Python renderer is built in and drives
  any runtime reporting language: 'python'; the first-party backend ships
  separately.
- Tests: assert the render-phase degrade on the first call, assert the import
  line after rollback, and cover the collision-skip loop; py-types.ts stays at
  100% per-file coverage.
2026-08-02 14:50:01 +08:00
kingwl cf70a52dcc Merge origin/master into codex/todo-goal-queue-layout 2026-08-02 14:34:13 +08:00
Chinesezjc d7b4b014eb fix(tools): make py-types render total and bound deep class names
Address ds-review-bot v5/v6 review round 4:
- renderType now holds the no-throw contract across the whole walk, not
  just root validation: a stateful getter that passes validation and then
  throws in the render phase degrades the node to Any, rolling back any
  classes the call had begun emitting, instead of escaping.
- allocateClassName caps the accumulated base name. Child class names
  derive from their parent's, so an unbounded single-field object chain
  grew the sum of names to Theta(depth^2) (a 5000-deep schema produced a
  ~25MB SDK); the cap keeps total emitted text linear, the collision
  counter still makes truncated bases unique.
- The language-dispatch note's Consequences first sentence and the zh
  guard paragraph are corrected: two table entries (not one), and
  full-width Chinese punctuation per translation-rules.md.
2026-08-02 14:32:35 +08:00
Chinesezjc 26a94b56f6 docs(tools): regenerate cordis catalog and event graph for shifted lines
The index.ts JSDoc edits shifted source line numbers referenced by the
generated cordis catalog and event-producer-consumer graph. Regenerate
both so the static doc gates pass.
2026-08-02 13:58:20 +08:00
Chinesezjc 59affddfc5 docs(tools): align Code Mode docs with multi-language dispatch; py-types notes
Address ds-review-bot v5/v6 review round 3:
- Config.mode JSDoc and the regenerated config-catalog no longer claim Code
  Mode requires a TypeScript runtime; both now say a language with a
  registered SDK renderer.
- The active 2026-06-15-code-mode base note (both languages) follows shipped
  reality: the SDK renders the loaded runtime's language, dsh-tools accepts
  any language with a renderer and run_code flavor, and it cross-links the
  language-dispatch note.
- The language-dispatch note distinguishes the two Object.hasOwn guards'
  reachability and documents the peekRuntime no-runtime degrade vs the
  rejected silent fallback.
- SDK_RENDERERS comment: adding a language is two table entries, not one.
- py-types: document the deliberate PEP 586 deviation for float Literals;
  add oneOf-object-branch tests (named union classes and context-free
  degrade), keeping py-types.ts at 100% per-file coverage.
2026-08-02 13:55:28 +08:00
Chinesezjc 938ee4e2eb Merge remote-tracking branch 'origin/master' into feat/py-types-code-mode 2026-08-02 13:34:27 +08:00
kingwl 6332b5b952 fix(web): align context cards on narrow screens 2026-08-02 13:26:08 +08:00
imccyu ab320ba991 Merge pull request #1114 from deepseek-harness/codex/gui-subagents-navigation
fix(web): preserve nested subagent navigation
2026-08-02 13:03:32 +08:00
imccyu 23680e838b fix(web): synchronize subagent navigation state 2026-08-02 12:51:11 +08:00
imccyu b94d2f9c1d fix(web): stabilize nested subagent navigation 2026-08-02 12:51:11 +08:00
imccyu 53ae9abea2 style(web): polish subagent and bash chrome 2026-08-02 12:51:11 +08:00
imccyu ca1d838afc style(web): refine subagent navigation chrome 2026-08-02 12:51:11 +08:00
imccyu 42d34473af fix(web): allow follow-ups to running subagents 2026-08-02 12:51:11 +08:00
imccyu 130410bb98 fix(web): preserve subagent navigation and fork grouping 2026-08-02 12:51:11 +08:00
imccyu 8c9cd4c15d feat: optimize subagent list children query 2026-08-02 12:51:11 +08:00
imccyu 5d56019d22 feat: revert crumbs navigation for subagents 2026-08-02 12:51:11 +08:00
Dudu-0223 431fb4b035 feat(subagent): add explicit child reports 2026-08-02 12:51:10 +08:00
imccyu a1b3bebb61 fix(subagent): scope drains and soften final flush 2026-08-02 12:51:10 +08:00
imccyu d7153768f5 test(web): cover post-fork subagent continuation 2026-08-02 12:51:10 +08:00
Dudu-0223 9a7be21b7f fix(host): preserve subagent continuation ownership 2026-08-02 12:51:10 +08:00
imccyu 1aedb23ca6 test(web): align subagent access mode golden 2026-08-02 12:51:09 +08:00
imccyu 6a02570e8f test(web): close rebased subagent coverage gaps 2026-08-02 12:51:09 +08:00
imccyu 5ef5feb01a fix(web): reconcile rebased subagent contracts 2026-08-02 12:51:09 +08:00
imccyu d950150cdc fix(persistence): preserve subagent session origin 2026-08-02 12:51:09 +08:00
imccyu 9d77a50c23 test(cli): include list_agents in shipped catalog 2026-08-02 12:51:09 +08:00
imccyu b8be3583e0 test(cordis): refresh session origin API snapshot 2026-08-02 12:51:09 +08:00
imccyu 5113b831e8 test(client): align card fixtures with subagent session state 2026-08-02 12:51:09 +08:00
Dudu-0223 8a518e353b feat(web): rewrite subagent conversations for FIFO activation 2026-08-02 12:51:09 +08:00
Dudu-0223 f0ab04273d fix(web): deduplicate subagent navigation 2026-08-02 12:51:09 +08:00
Dudu-0223 16ffd63115 feat(web): add nested subagent conversations 2026-08-02 12:51:09 +08:00
Dudu-0223 a27492507d feat(web): add subagent conversation transport 2026-08-02 12:51:09 +08:00
imccyu 9adfc576da chore(knip): include subagent settlement fixture 2026-08-02 12:51:09 +08:00
Dudu-0223 a977ef30ee fix(subagent): preserve published run failures 2026-08-02 12:51:09 +08:00
Dudu-0223 8b0a7a5d8d fix(subagent): close stacked catalog integration gaps 2026-08-02 12:51:09 +08:00
Dudu-0223 a967f5174a test(snapshot): update unlabeled workflow children 2026-08-02 12:51:09 +08:00