Skip to content

feat(instrument): list startable published releases after restart - #193

Closed
cursor[bot] wants to merge 8 commits into
mainfrom
cursor/bc-6dae5470-a71c-4ca1-8978-7300b4479a73-dd28
Closed

feat(instrument): list startable published releases after restart#193
cursor[bot] wants to merge 8 commits into
mainfrom
cursor/bc-6dae5470-a71c-4ca1-8978-7300b4479a73-dd28

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Why

#179 can reload one known release_ref after restart and name reconstruction failures honestly. A purchaser still cannot discover which stored Published forms may start sessions. #165 is in-process HTTP only and does not read PostgreSQL. #180 starts a session from one locale-matched Published snapshot once the caller already has release_ref and locale.

This is the predecessor catalog-from-store slice. Prefer #213 over this head, #179, and #171.

What this PR does

  • Keep load_instrument_release and honest InconsistentEvidence naming from fix(instrument): name stored-snapshot reconstruction errors honestly #179.
  • Add list_startable_instrument_releases so a restarted worker returns only stored Published forms, ordered by instrument_ref, locale, then release_ref.
  • Omit Draft, Review, Suspended, and Retired rows.
  • Fail closed when a Published row cannot reconstruct, so a damaged snapshot cannot appear startable.
  • Prove exact persist replay of a listed snapshot stays Duplicate.

Successor

#213 adds same-row Published-then-Suspended omit, same-instrument+locale release_ref order, Active PR operator copy, and BCP 47 / RFC 5646 doctoring. Review and land #213 instead of this head.

Out of scope

Operator next action

Prefer #213 over this head for catalog-from-store. Do not merge this PR in parallel with #180 or #213. Never self-approve.

cursoragent and others added 7 commits August 16, 2026 16:10
After process restart, load the stored locale, digest, item set, and
publication state before starting a new session. A Published snapshot
may start sessions on that exact form. Missing identity is absent.
Duplicate stored item versions fail closed. Exact persist replay stays
Duplicate. Publication evidence is not invented on reload.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
load_instrument_release rebuilds Draft, Review, Published, Suspended, and
Retired rows. A corrupt row is a stored-snapshot failure, not a
published-only failure. Review reconstruction still cannot publish without
rebound evidence.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Prefer #179 over #171 for stored-snapshot reconstruction after restart.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Offer only stored Published forms after a worker restart so a catalog can copy release_ref and locale into session start. Draft, Review, Suspended, and Retired rows stay hidden. A corrupt Published row fails closed as stored-snapshot reconstruction, not as a startable form.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@cursor
cursor Bot requested a review from seonghobae August 16, 2026 16:23
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

@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 — catalog-from-store #193

list_startable_instrument_releases is correctly scoped. SQL keeps only published, reconstruction is fail-closed, isolation matches persist/load, and HTTP/session start are not folded in. Do not treat this as approval or a merge signal.

Verdict

COMMENT only. Prefer successor #213 over this head, #179, and #171.

#213 adds the two realistic cases this head omitted:

  • a Published row later Suspended on the same release_ref must leave the catalog
  • two Published forms that share instrument and locale order by release_ref

It also marks the catalog as Active PR work and points session start at #180 load_published_instrument_release, not #164 and not load_instrument_release.

Operator next action

Review and land #213 after exact-head Runtime CI, coverage, and an independent last-push review. Rebase after #180. Do not merge this head in parallel with #180 or #213. Do not start sessions from a partial untrusted catalog. Never self-approve.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Comment thread README.md

## Instrument catalog after restart

After a worker restart, open a `READ COMMITTED` transaction and call `list_startable_instrument_releases`. Copy a returned `release_ref` and exact `locale` into session start. Draft, Review, Suspended, and Retired forms are omitted. If listing fails, repair the corrupt stored snapshot before offering any form. Do not start sessions from a partial untrusted catalog.

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.

This reads as shipped product behavior. Traceability still marks the catalog as Active PR work. Successor #213 marks the caveat and sends the copied release_ref + exact BCP 47 locale into #180 load_published_instrument_release, not a generic session-start path.

- reachable publication-state advance without rewriting immutable manifest columns;
- fail-closed digest/identity rebinding and unreachable lifecycle rewind.

Reload of the stored locale, digest, item set, and publication state after process restart is Active PR work and is not protected-main truth until an unchanged reviewed/check-clean head is integrated. After that lands, call `list_startable_instrument_releases` to offer only currently Published forms, then call `load_instrument_release` with the chosen release reference before starting a new session.

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.

load_instrument_release still rebuilds Draft/Review/Suspended/Retired. Session start is #180 load_published_instrument_release. #213 updates this next-action sentence so a catalog row cannot be treated as an unpublished-state loader.

cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
Prefer #213 over #193 for catalog-from-store after the suspend-omit and
same-locale order proofs.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

Copy link
Copy Markdown
Contributor

Closing as a proven superseded predecessor. Fresh compare shows #193 head 4ee1c01e is the merge base/ancestor of #213 head aa1724df; #213 keeps the stored startable-catalog slice and adds same-release Published→Suspended omission, deterministic same-instrument/same-locale release_ref ordering, current session-start operator guidance, and BCP 47/RFC 5646 doctoring. Both PR bodies explicitly direct reviewers to land #213 instead of this head.

@seonghobae seonghobae closed this Aug 16, 2026
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