Repository navigation
[split-1066] U12(1+2) - task save-stage semantics + finalize open partial tool ask #1933
Copy link
Copy link
Closed
Description
Unit U12 of the PR #1066 split (1/6).
Split plan: #703
PR: #1927
Content source of record: tag pr1066-source = 46d1d218701f0ce2d675b1b315489bacb6b0f77d (easonLiangWorldedtech/Zoo-Code).
Unit contract
Task.saveClineMessages() reports the message-write stage independently of the metadata / task-history stage, and Task.finalizePartialToolAsk() closes an open partial tool ask by type + text.
Why this unit exists on its own
Single provider group (Task persistence) + single gate scope. Planned as two units (U1 stage semantics, U2 finalize) and merged because the stage-semantics tests call finalizePartialToolAsk() — the test blocks cannot be split without orphaning them (test-block atomicity).
Boundary
- base:
72143527fd33(main / merge base of fix(write-to-file): address partial filesystem error review #1066) - head:
cf5abe64d6e8 - chain: (first) -> U12 -> U4
- merge order is fixed: U12 -> U4 -> U5 -> U3 -> U6 -> U7/FINAL; the FINAL integration PR (fix(write-to-file): clean partial state on missing-param and rooignore denial + integrate the #1066 split series (6/6 + FINAL) #1928) is the sole merge target.
Files and budget
src/core/task/Task.ts+75/-5 — byte-identical to sourcesrc/core/task/__tests__/Task.spec.ts+400/-0 — byte-identical to sourcesrc/core/assistant-message/__tests__/presentAssistantMessage-custom-tool.spec.ts+1/-0 — allowNew: one mock line, no source change- budget: 481 a+d / 3 files — SOFT-OVERSHOOT (rationale: single provider group + single gate scope; under the 1000 hard cap)
- mutation gate: 41 changed executable lines (extension package) — under the 500 cap; valid mutants for the whole PR are 116 / 400, so no directive was added by this unit.
Verification (must pass by once, binary)
zdt split verify --contract U12.json --worktree <wt> --head cf5abe64d6e8— PASS (every changed file is a content subset of the source of record, or an explicitly sanctionedallowNewfile).- Tests: 218 passed / 5 skipped, exit 0 (narrowest relevant suites:
Task.spec.ts,writeToFileTool.spec.ts,writeToFileTool-partial-state-cleanup.spec.ts,removeClineFromStack-delegation.spec.ts,presentAssistantMessage-custom-tool.spec.ts). - Changed-line coverage: 18 covered / 0 uncovered — PASS.
- ESLint
--prune-suppressions --max-warnings=0: clean on every touched file; suppression counts unchanged. - No
.changesetfile, no CHANGELOG edit (AGENTS.md).
Deviations recorded
- U1 + U2 merged into this unit (test-block atomicity).
Reproduce
git fetch https://github.com/easonLiangWorldedtech/Zoo-Code p1066/u1-task-save-stages-and-partial-ask
node zdt.mjs split verify --contract U12.json --worktree <wt> --head cf5abe64d6e8
node zdt.mjs split measure --worktree <wt> --base 72143527fd33 --head cf5abe64d6e8
pnpm --dir src exec eslint --prune-suppressions --max-warnings=0 <touched file>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-][split-1066] U12 - task save-stage semantics + finalize open partial tool ask[/-][+][split-1066] U12(1+2) - task save-stage semantics + finalize open partial tool ask[/+]