Repository navigation
docs(executor): record Phase 3b turn-boundary rollback as resolved by PR #139 - #141
Merged
Merged
Conversation
… PR #139 PRD line 160 intent ("snapshot before executor call, rollback on failure") is already satisfied by PR #139's in-band per-command auto-rollback (buildRequest sends auto_rollback_policy; executor snapshots at call-start, rolls back on exit!=0 + file-damage diff>0). The file-damage guard is safer than PRD's blind retry-3x (only reverts when files are damaged, not on legit edit-test-fail). The client-orchestrated whole-turn variant (explicit snapshot_create/rollback RPC + turn lifecycle wiring) is architecturally inferior: loses the model's good edits, needs a new failure counter in query.ts, and the REPL query loop discards the terminal return value (no capture path). Recording this as an explicit decision, not backlog. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Records the Phase 3b turn-boundary snapshot/rollback (PRD line 160) defer item as resolved by PR #139, not as pending backlog.
Context
PRD line 160 specifies: "调用 fusion-executor 前生成 Git/内存快照,若重试 3 次仍然失败,自动触发 executor.rollback()" — snapshot before executor call, rollback on failure.
PR #139 already satisfies this intent via in-band per-command auto-rollback:
buildRequestsendsauto_rollback_policy(opt-inFUSION_CODE_EXECUTOR_AUTO_ROLLBACK, default off)exit_code != 0+ file-damage diff > 0auto_rolled_back = true; model sees<note>Working tree auto-reverted…</note>The file-damage diff guard is safer than PRD's blind retry-3x — it only reverts when files were damaged, not on a legit edit-test-fail loop, preserving the model's valid edits.
Why not the whole-turn variant
The deferred client-orchestrated whole-turn revert (explicit
executor.snapshot_create/executor.rollbackRPC + turn-lifecycle wiring) is architecturally inferior, not merely large:query.ts— no consecutive-tool-failure counter exists in the loopState; onlyconsecutiveFailures(compaction) andmlxModelOomCount(MLX OOM).for await (const event of query({...}))(REPL.tsx:3841) consumes the generator but discards the terminal return value; surfacingreasoninto REPL needs new plumbing.Change
Doc-only update to
docs/model-providers.md§ "Scope-creep(显式 defer)": rewrites the Phase 3b bullet from "pending large PR" to an explicit resolved-by-PR #139 decision with the rationale above.Verification
Doc-only change; no code, build, or test impact.
Co-Authored-By: Claude Fable 5 [email protected]