You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit acd8b26
Browse filesBrowse the repository at this point in the historyBrowse files
fix(replay): add resume.alternateFrom so caution/manual dual-path never advertises a --from the daemon refuses (#1262)
The dual-path text guidance offered `--from N + 1` whenever resuming AT `N`
was allowed, but `--from N + 1` needs its OWN preflight — which additionally
requires the diverged step `N` to be skip-safe. When `N` is a runScript
(outputEnv producer) or inside runtime control flow, preflight(N) passes
while preflight(N+1) fails, so the text advertised a command the daemon then
refused (the text-vs-structured disagreement #1260 blocker 2 banned).
- Add optional `resume.alternateFrom` to the decision-4 wire shape
(`ReplayDivergenceResume`). The daemon populates it (`N + 1`) for
caution/manual ONLY when `evaluateReplayResumePreflight({ from: N + 1 })`
passes — the same acceptance condition on both the mid-plan (un-gated,
in range) and last-step (watermark-stamp) paths. Its checked range is a
strict superset of `from`'s, so alternateFrom present implies allowed.
- The text renderer gates the `N + 1` command on `alternateFrom`'s PRESENCE
and renders its value verbatim, never re-deriving resumability — so text
and the structured wire can never disagree on the advertised next command.
- This also closes a parity gap: a JSON/MCP caller now gets both ordinals
(previously the dual-path was text-only, structured callers saw only `from`).
- ADR-0012 decision-4 documents alternateFrom as additive/optional; projection
and trigger tests cover both positions (runScript/control-flow → no
alternateFrom, no `--from N + 1`; skip-safe → alternateFrom present).
0 commit comments