Repository navigation
Conversation
This branch has not been deployed
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.
Description
Recover a complete Codex transcript when the local capture cursor survives but its deterministic OpenViking session has been removed.
The batch message endpoint auto-creates missing sessions. Previously, the plugin sliced the transcript at
capturedTurnCountbefore the write, so the new session could contain only the latest suffix while the local cursor advanced successfully. This change verifies continuity before an incremental append. A 404 or 410 resets the cursor durably and replays the complete readable transcript. Other lookup failures fail closed and preserve the cursor for a later retry.The gap was reproduced independently after investigating OpenAI Codex issue #54973. No external code was copied.
Human Involvement
Related Issue
Fixes #6231
Type of Change
Changes Made
Testing
Validation results:
node --check: passed for all changed JavaScript files.git diff --check: passed.Checklist
Screenshots (if applicable)
Not applicable.
Additional Notes
The continuity check runs under the existing per-session lock, so local capture writers remain serialized.
A server deletion between the successful continuity read and the append remains a narrow server-side race. Closing that race requires a conditional append or session-generation contract and is outside this focused plugin fix.
The Python server suite was not run. Its local environment began compiling the Rust storage extension and consumed about 1.5 GiB. That task-owned build output was removed. The unchanged server contract was verified from current source: GET uses
auto_create=False, while the batch write usesauto_create=True.