Skip to content

fix(session): complete created-session persist evidence - #106

Closed
cursor[bot] wants to merge 29 commits into
mainfrom
cursor/bc-0fde950c-6462-4bc1-8145-3db3b1b7c940-c7d6
Closed

cursor[bot] wants to merge 29 commits into
mainfrom
cursor/bc-0fde950c-6462-4bc1-8145-3db3b1b7c940-c7d6

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

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:

Current 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 the claim_deadline_at COPY/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.

seonghobae and others added 28 commits August 14, 2026 10:46
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.
Treat landed PostgreSQL readiness as Implemented and keep #61 as the
Active created-session persist slice.
Treat landed migration rollback coverage as Implemented and keep #61
as the Active persist slice.
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>
@cursor
cursor Bot requested a review from seonghobae August 16, 2026 15:11
@seonghobae
seonghobae marked this pull request as ready for review August 16, 2026 15:11
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

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.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 under READ COMMITTED.
  • Rebinding participant, release, instrument_version_ref, digest, locale, state, or creation time fails closed.
  • Public persist contract names instrument_version_ref and states that AssessmentSession::new validates 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 0014 does not collide with #82 0020. 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::new would 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 head 60b090d and independent last-push approval is recorded. I am not approving on queued checks.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Successor

Head 60b090d remains 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.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Processing consumption rows now require claim_deadline_at after #81.
Seed the wall-clock deadline and prove binary restore preserves it.
@seonghobae

Copy link
Copy Markdown
Contributor

Exact-head RCA after 60b090d6: Runtime CI failed at postgres_recovery_invariants (integration_consumption_claim_deadline_shape). Head now includes the #81 recovery seed repair (claim_deadline_at) while keeping the created-session persist evidence on Active PR #61. Please perform a bounded independent current-head review of this exact SHA against protected main a7637351. Do not update the branch or merge.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_at on the processing recovery fixture is required after #81. maintain_inbox_claim_deadline is BEFORE UPDATE only, so a processing INSERT without that column violates integration_consumption_claim_deadline_shape.
  • Asserting exact source/restored claim_deadline_at equality after COPY ... FORMAT BINARY is 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 7f7ea0f or draft #100 (0020) over this slice.
  • Later-state lock landing remains #154. HTTP POST /v1/sessions stays #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.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

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.

2 participants