fix(session): complete created-session persist evidence - #106
cursor[bot] wants to merge 29 commits into
Conversation
Store participant and published-release identity for SessionState::Created with exact replay and fail-closed rebinding. Command-replay persistence stays outside this first slice.
Assert the Database error message and source, and fail the replay SELECT after ON CONFLICT by redirecting search_path so classify runs instead of the insert.
Linux llvm-cov leaves the isolated query_one ? tail uncovered unless the Err arm is an explicit match. Keep the search_path redirect test.
Linux branch coverage missed the later AND operands of exact-replay classification. Rebind each stored field independently, and prove a domain-legal u64::MAX creation time fails closed as ValueOutOfRange.
The replay SELECT failure constructed Database evidence without checking its safe display text or source, leaving those two production lines uncovered on Linux.
SHOW transaction_isolation can fail after the caller transaction is already aborted. Persist must surface that as a typed database error instead of leaving the probe Result uncovered.
Satisfy clippy::manual_let_else in the library test that instantiates AssessmentSessionPersistenceError::Database.
Name instrument_version_ref in the public persist contract and assert the committed version column. Keep TRACEABILITY, changelog, and as-built schema at Active PR #61 rather than promoting the slice to protected-main truth. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Stale comment
Review (PR #106, head
60b090d)No blocking persist/replay defect on this head. This is the correct landing vehicle for the #61 created-session slice.
Verified
- Created-only insert,
ON CONFLICT DO NOTHING, then exact-identity classify underREAD COMMITTED.- Rebinding participant, release,
instrument_version_ref, digest, locale, state, or creation time fails closed.- Public persist contract names
instrument_version_refand states thatAssessmentSession::newvalidates references while persist stores them without validating them again.- Happy-path PostgreSQL test asserts the committed
instrument_version_ref.- TRACEABILITY / CHANGELOG / as-built schema / ERD stay Active PR #61, not Implemented.
- Migration
0014does not collide with #820020. Do not rename it.Residual (not blocking this slice)
- Persist is write-only. A buyer still cannot resume or start HTTP against a stored session because there is no load/reconstitute path, and
AssessmentSession::newwould re-check current publication eligibility. That is the next slice, not a defect in this one.- After this lands, close or retarget #61. Do not land draft #100 (
0020) over this slice.Merge gate
Do not merge until required checks are terminal-success on exact head60b090dand independent last-push approval is recorded. I am not approving on queued checks.Sent by Cursor Automation: Fix Issues
There was a problem hiding this comment.
Stale comment
Successor
Head
60b090dremains the persist-only slice. Created-session load without re-checking current publication eligibility is now on #109. Prefer landing #109 after its checks and independent last-push approval. Close or retarget this PR after #109 lands so persist-only and persist+load do not race.Sent by Cursor Automation: Fix Issues
Name the opened successor so TRACEABILITY, as-built schema, and ERD point at the persist-and-load head instead of the persist-only #106 slice. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Processing consumption rows now require claim_deadline_at after #81. Seed the wall-clock deadline and prove binary restore preserves it.
|
Exact-head RCA after |
There was a problem hiding this comment.
Review (PR #106, head 3a0c526)
No blocking persist/replay defect. Created-session insert, exact replay, and fail-closed rebinding remain sound. This head is not the landing vehicle for Created persist/load/start.
New commit 3a0c526
- Seeding
claim_deadline_aton the processing recovery fixture is required after #81.maintain_inbox_claim_deadlineisBEFORE UPDATEonly, so a processingINSERTwithout that column violatesintegration_consumption_claim_deadline_shape. - Asserting exact source/restored
claim_deadline_atequality afterCOPY ... FORMAT BINARYis the correct restore invariant for database-authoritative claim expiry. - Keep this recovery repair off the persist stack. Prefer a main-based recovery-only successor so #72 evidence stays valid if #106 is closed in favor of #164.
Landing
- Prefer #164 (
b47b035) for Created persist/load/start-from-stored-release. - Close or retarget #106 after #164 lands. Do not land #61 at
7f7ea0for draft #100 (0020) over this slice. - Later-state lock landing remains #154. HTTP
POST /v1/sessionsstays #87/#149/#161 after #164.
Residual (not blocking persist)
- Recovery tables still omit
assessment_session. That belongs after persist lands, not in this evidence-only slice. - TRACEABILITY/CHANGELOG/as-built/ERD correctly stay Active PR #61, not Implemented.
Merge gate
Do not merge until required checks are terminal-success on exact head 3a0c526 and independent last-push approval is recorded. I am not approving on queued checks, and I am not approving this automation's own persist lineage.
Sent by Cursor Automation: Fix Issues


Superseded / split into durable session and recovery lanes
Close this predecessor without merge. Its session work has been carried forward through the repaired persist/load/start lineage, while its one unique late recovery change is isolated on #177.
Fresh evidence immediately before closure:
3a0c526073c76d29a58f07cad1c1dead7d12cb55c7b45145c9b693951fae498e0779d58cbe170f868a0db4611a684285185f9edadf086a1808444ab9main:a7637351be8f0f90c12651d3bcafd959bc52ac81Current reviews already direct the Created-session work away from #106 toward later persist/load/start successors. A fresh commit comparison confirms #232 contains the later session lineage and is 23 commits beyond the common session base; the only #106-side delta not present on #232 is
tests/postgres_recovery_invariants.rs(27 additions / 3 deletions). That is exactly theclaim_deadline_atCOPY/restore concern deliberately isolated on #177.#232 carries the repaired #218 persist/load/command-history/start-lock path plus public start/reload HTTP; #177 carries the required recovery deadline seed and binary-COPY equality evidence without coupling it to session persistence. Keeping #106 open would therefore retain a competing session writer only to preserve work that now has a dedicated recovery vehicle.
There are no inline review threads on #106 to resolve. Successor behavior remains Active PR only until its own unchanged exact head passes all live CI/security/review gates.