[codex] Recover ACP runtime errors from snapshots#314
Merged
xintaofei merged 4 commits intoJul 13, 2026
Conversation
HYDRATE_FROM_SNAPSHOT's stale (event_seq <= lastAppliedSeq) path folded a snapshot's lastError back via `current.error ?? patch.lastError`. Since `error` is a current-state field cleared on a new prompt (STATUS_CHANGED -> prompting), a late stale snapshot generated between an error and the next prompt could resurrect an error the current turn already cleared, leaving a stale banner until the following prompt. Recover the snapshot error only on the fresh path, matching how status / configStale / backgroundOutstanding are already treated (current-state fields, fresh-path only).
…rection Lock in HYDRATE_FROM_SNAPSHOT error behavior: a fresh snapshot recovers a last_error the client missed live, and a stale snapshot must not resurrect an error the current turn already cleared. The stale case fails against the pre-fix reducer. Fixtures also set backgroundOutstanding for completeness.
581b8be to
a394661
Compare
The pi and kimi skill_storage_spec tests read the process-global $HOME while computing both the spec and the expected paths; a concurrent temp_env HOME-mutating test could flip $HOME between the two reads and fail the assertion. Wrap both in temp_env::with_vars to pin $HOME (and clear the PI_CODING_AGENT_DIR / KIMI_CODE_HOME overrides) so they serialize with those tests and read one consistent home. Expected paths stay derived from the production helpers, keeping them correct on Windows where dirs::home_dir ignores HOME.
Owner
|
感谢PR |
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.
Replaces #296. This replays the original ACP snapshot error recovery change onto latest xintaofei/codeg main (bbb28ee) and resolves the conflict in src/contexts/acp-connections-context.test.tsx against the newer hoisted snapshot-denormalize mock.
Validation:
Local note: pnpm install initially needed CI=true and a longer fetch timeout because this non-TTY Windows shell hit dependency purge/download timeouts; the code validation passed after dependencies were restored.