feat(instrument): list startable published releases after restart - #193
feat(instrument): list startable published releases after restart#193cursor[bot] wants to merge 8 commits into
Conversation
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>
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>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
There was a problem hiding this comment.
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_refmust 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.
Sent by Cursor Automation: Fix Issues
|
|
||
| ## 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. |
There was a problem hiding this comment.
| - 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. |
|
Closing as a proven superseded predecessor. Fresh compare shows #193 head |


Why
#179 can reload one known
release_refafter 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 hasrelease_refand locale.This is the predecessor catalog-from-store slice. Prefer #213 over this head, #179, and #171.
What this PR does
load_instrument_releaseand honestInconsistentEvidencenaming from fix(instrument): name stored-snapshot reconstruction errors honestly #179.list_startable_instrument_releasesso a restarted worker returns only stored Published forms, ordered byinstrument_ref,locale, thenrelease_ref.Successor
#213 adds same-row Published-then-Suspended omit, same-instrument+locale
release_reforder, Active PR operator copy, and BCP 47 / RFC 5646 doctoring. Review and land #213 instead of this head.Out of scope
fast-mlsirm)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.