Skip to content

feat(tools): per-write checkpoint + change card for edit & search_replace tools (B3a v2-8b, epic #1375) - #51

Open
easonLiangWorldedtech wants to merge 1 commit into
feat/fws-v2-8a-applydiff-wiringfrom
feat/fws-v2-8b-editsearch-wiring
Open

easonLiangWorldedtech wants to merge 1 commit into
feat/fws-v2-8a-applydiff-wiringfrom
feat/fws-v2-8b-editsearch-wiring

Conversation

@easonLiangWorldedtech

@easonLiangWorldedtech easonLiangWorldedtech commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

What this PR does

Companion to #50 (v2-8a, apply_diff wiring). Threads the per-step change card through the remaining per-write file tools:

  • EditFileTool, WriteToFileTool: the per-write checkpoint write now threads diffStats, the verbatim approval diff, and autoApproved (B3a) so checkpointSave can force the compact change card.
  • EditTool, SearchReplaceTool: same threading for the edit / search_replace tools.
  • New editSearchReplaceTool.changeCard.spec.ts: shared change-card threading coverage for the edit/search_replace pair.
  • ApplyPatchTool: awaits the patch checkpoint (no more fire-and-forget .catch(() => {})), threads per-file diffStats/diff/autoApproved into the whole-patch journal write, and retains approval diff/stats per change.

This completes the B3a tool-wiring slice of epic Zoo-Code-Org#1375.

Line count / split rationale

789 changed lines (755+/34-) across 11 files — above the 400 soft design target, below the 1000 hard cap, and close to the ~750 pre-estimate planned for this unit (plan B10); the growth over the estimate is the added per-branch auto-approval threading tests. The five tools share one wiring shape (checkpoint write + change-card threading) and the specs are the tests of that wiring; splitting by tool would fragment one inseparable behaviour into five PRs with duplicated setup.

Not included here (later v2 PRs)

  • Settings/UI round trip (CheckpointSettings, SettingsView, locales) — v2-9.
  • Rollback core + service — v2-10 / v2-11.
  • Rollback UI + remaining epic work — v2-12..v2-15.

Local gates

  • Vitest (6 touched suites): 148 passed, 5 skipped.
  • ESLint --prune-suppressions --max-warnings=0 on all 11 files: clean, suppression counts unchanged.
  • Prettier: clean.
  • Stryker diff gate (base 60c76ff13): 84 mutants across the 5 changed files — 82 Killed, 2 Ignored (the two documented Stryker disable next-line StringLiteral exclusions in WriteToFileTool.ts), 0 Survived, 0 NoCoverage.

Rebase note (round 23)

Rebased onto the current v2-8a head 2f6cb0acb (was 60c76ff13). This PR's diff content is byte-identical across the rebase, and the Stryker diff gate mutates only changed diff lines — the outcome above therefore stands; no re-run required.

@easonLiangWorldedtech easonLiangWorldedtech added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: Required CI passed. Waiting for automated review of the latest commit.

If automated review does not start, a maintainer must restart it.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active and removed coderabbit-review-active Required CI passed; CodeRabbit review is active labels Sep 6, 2026
@easonLiangWorldedtech
easonLiangWorldedtech force-pushed the feat/fws-v2-8a-applydiff-wiring branch from 60c76ff to 2f6cb0a Compare September 6, 2026 00:55
@easonLiangWorldedtech
easonLiangWorldedtech force-pushed the feat/fws-v2-8b-editsearch-wiring branch from e6133eb to 4945207 Compare September 6, 2026 00:55
@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active and removed coderabbit-review-active Required CI passed; CodeRabbit review is active labels Sep 6, 2026
@easonLiangWorldedtech
easonLiangWorldedtech force-pushed the feat/fws-v2-8a-applydiff-wiring branch from 2f6cb0a to 77c435f Compare September 6, 2026 02:30
@easonLiangWorldedtech
easonLiangWorldedtech force-pushed the feat/fws-v2-8b-editsearch-wiring branch from 4945207 to 63d9b09 Compare September 6, 2026 02:30
@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active and removed coderabbit-review-active Required CI passed; CodeRabbit review is active labels Sep 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit coderabbit-review-active Required CI passed; CodeRabbit review is active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants