Skip to content

fix: add fingerprint guard to advance and finish commands - #17

Merged
cheshirecode merged 1 commit into
mainfrom
codex/advance-finish-fingerprint-guard
Jul 30, 2026
Merged

fix: add fingerprint guard to advance and finish commands#17
cheshirecode merged 1 commit into
mainfrom
codex/advance-finish-fingerprint-guard

Conversation

@cheshirecode

Copy link
Copy Markdown
Owner

Both advance and finish now use read_state_snapshot and pass the captured SHA-256 to write_state as expect_sha256, matching the defense-in-depth pattern already applied to annotate in PR #14.

This prevents silent state corruption when concurrent sessions race on the same state file. The existing test_annotate_rejects_stale_fingerprint_atomically test already validates that write_state with expect_sha256 rejects stale fingerprints.

Both advance and finish now use read_state_snapshot and pass the
captured SHA-256 to write_state as expect_sha256, matching the
defense-in-depth pattern already applied to annotate in PR #14.
This prevents silent state corruption when concurrent sessions
race on the same state file.
@cheshirecode
cheshirecode merged commit 55fa17f into main Jul 30, 2026
4 checks passed
@cheshirecode
cheshirecode deleted the codex/advance-finish-fingerprint-guard branch July 30, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant