Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63402cbc3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let history = session.clone_history().await; | ||
| let transcript_entries = collect_guardian_transcript_entries(history.raw_items()); | ||
| let history_items = session_history::raw_items(&history); | ||
| let transcript_entries = collect_guardian_transcript_entries(&history_items); | ||
| let transcript_cursor = GuardianTranscriptCursor { | ||
| parent_history_version: history.history_version(), | ||
| parent_history_version: session.history_version().await, |
There was a problem hiding this comment.
Read history version from same snapshot lock
build_guardian_prompt_items captures transcript entries from clone_history() and then awaits session.history_version() separately. If history is rewritten between those awaits, the cursor can pair an old transcript with a new version. A later delta review may treat rewritten entries as already reviewed and omit them, giving guardian an incomplete/mismatched transcript.
Useful? React with 👍 / 👎.
| if failure.is_none() | ||
| && let Err(err) = append_entries(&mut writer, entries.as_slice()).await | ||
| { | ||
| failure = Some(err); |
There was a problem hiding this comment.
Reject appends after persistent writer failure
After any append I/O/serialization failure, run_worker sets failure and then silently skips all later Command::Append writes. enqueue still returns Ok(()) because sends succeed, so callers can keep "successfully" enqueueing entries that are dropped until a later flush/shutdown reports the error.
Useful? React with 👍 / 👎.
No description provided.