deepseek-harness/docs/rfc/implemented/feature
imccyu fe4da9244f fix(tool-cordis): validate a dynamic tool's execute return shape after the realm round-trip
The sandbox execute wrapper JSON round-tripped the return and blindly cast it
to ToolExecuteReturn. A JSON-valid but wrong-shape return — a bare string,
{ content: 'ok' }, blocks without a type tag — sailed through: the registry
spreads result.content, so { content: 'ok' } became ['o','k'], passed the
session log's isJsonValue gate, and the DeepSeek serializer then flattened it
to '(no output)' — silent corruption of the next model request and every
replay, instead of a contained tool error.

The round-tripped value is now shape-checked against the two ToolExecuteReturn
forms (array of content blocks, or { content: blocks, meta? }); block checks
are structural only (plain object + string type tag) because the ContentBlock
union is merge-extensible. A wrong shape — and the formerly cryptic
forgot-return/bare-string cases — fails that one call with a teaching error
echoing a truncated preview of what was returned and the two valid forms.
New specs pin the object-form pass-through (meta included), six rejection
shapes, and the preview truncation; per-file 100% coverage holds.
2026-07-09 22:12:30 +08:00
..
2026-06-17-filesystem-tool-schemas.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-18-acp-terminal-and-tool-rendering.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-18-compaction-capability-seam.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-21-subagent-capability-seam.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-22-acp-subagent-backend.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-25-ask-user-question.md refactor: colocate user interaction with ui packages 2026-07-09 17:59:02 +08:00
2026-06-29-todo-write-tool.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-30-hook-bridges.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-30-hook-protocol-lib.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-30-interception-seams.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-06-30-session-store-fork-api.md Inline session fork parameters 2026-07-07 09:04:49 +08:00
2026-06-30-subagent-observe-enrich.md docs(rfc): define and enforce a uniform RFC format; adopt it across the corpus 2026-07-05 22:58:25 +08:00
2026-07-06-explicit-tool-order.md feat: add assembly-time validation rejects placeholder 2026-07-07 22:03:12 +08:00
2026-07-08-repeat-tool-guard.md fix review finding: cap the detailed reminder's argument payload 2026-07-08 14:40:08 +08:00
2026-07-08-self-referential-cordis-toolset.md fix(tool-cordis): validate a dynamic tool's execute return shape after the realm round-trip 2026-07-09 22:12:30 +08:00