fix(compat): reject unfingerprinted continuation writes - #1063
Merged
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — defense-in-depth hardening on the SQLite continuation ledger with no blocking or medium findings.
Checked:
- No no-auto-approve team match; gated_paths is false; review_decision REVIEW_REQUIRED (informational only — gated_paths=false, so row 2 does not fire).
- high_risk=true only because
src/adcp/compat/sqlite_continuation_store.pyis (modified) — no medium-or-higher finding on it, so it is presumed safe (row 5 requires a medium finding, none exist). - Two new BEFORE triggers reject NULL-fingerprint INSERTs and fingerprint downgrades on modern rows; happy path unchanged (INSERT always supplies a fingerprint; continuation UPDATE only touches claimed_operation_id). Legacy NULL rows remain readable/updatable via OLD IS NOT NULL guard. Trigger names added to _REPLAY_FENCE_TRIGGER_NAMES and _REPLAY_FENCE_SCHEMA for atomic/idempotent migration. Docs match behavior; tests cover both guards and the legacy-row replay path.
No rows 1–8 fired → row 9 approve.
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.
Summary
Validation
uv run pytest -q tests/test_purchase_continuation.py(120 passed)uv run pytest -q(6,876 passed, 40 skipped, 9 deselected, 1 xfailed)