feat(instrument): list durable startable releases - #303
seonghobae wants to merge 27 commits into
Conversation
|
Warning Review limit reachedNext included review available in 6 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough게시된 instrument release를 PostgreSQL에서 비잠금 방식으로 조회하는 공개 catalog 함수를 추가했다. 저장된 증거를 snapshot으로 재구성하고, 상태 변경·손상 데이터·누락 테이블을 통합 테스트로 검증했다. 참조 식별자 검증 계약도 추가했다. ChangesPostgreSQL instrument catalog
Reference numeric literal contract
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🔵 Low · up to The PR adds a durable catalog query for startable releases and revalidates returned records. It is generally mergeable, but the query may hold locks until the caller's transaction ends and could temporarily delay lifecycle updates, so transaction scope should remain an explicit owner follow-up. Sequence Diagram(s)sequenceDiagram
participant Caller
participant list_startable_instrument_releases
participant PostgreSQL
participant SnapshotBuilder
Caller->>list_startable_instrument_releases: 시작 가능 release 목록 요청
list_startable_instrument_releases->>PostgreSQL: published release evidence 비잠금 조회
PostgreSQL-->>list_startable_instrument_releases: 정렬된 release 행 반환
list_startable_instrument_releases->>SnapshotBuilder: 각 행 snapshot 변환 및 검증
SnapshotBuilder-->>list_startable_instrument_releases: snapshot 또는 오류 반환
list_startable_instrument_releases-->>Caller: 전체 목록 또는 오류 반환
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Exact-head repair at d871470: hosted Rust format check rejected only rustfmt drift in the new PostgreSQL startable-catalog contract test. Applied cargo fmt without changing production behavior. Local cargo fmt --check, git diff --check, and cargo test --workspace --no-run --tests passed. Hosted checks are rerunning on this exact head. |
Protected main now enforces exact opaque item-reference spelling through schema constraints, so duplicated item references cannot be persisted. Update the corrupt-published-evidence regression to prove fail-closed at the deepest layer (constraint rejection) while both valid releases remain startable, and resolve TRACEABILITY/CHANGELOG conflicts against merged lanes.
| let next_cursor = if has_more { | ||
| releases | ||
| .last() | ||
| .map(StartableInstrumentReleaseCursor::from_snapshot) | ||
| } else { | ||
| None | ||
| }; |
There was a problem hiding this comment.
📝 Info: Cursor from manifest is safe because identity is validated against stored columns
The continuation cursor uses the last snapshot's manifest fields while the SQL keyset predicate uses raw stored columns. into_published_snapshot (postgres_instrument_release.rs) rejects any row whose manifest core identity diverges from stored instrument_ref, locale, and release_ref, so the two are guaranteed equal and pagination cannot skip or duplicate rows.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Superseded by #422, which replays this exact five-file durable catalog slice onto protected |
Adds a current-main PostgreSQL catalog query for persisted instrument releases that can start new sessions. The query returns only current Published rows in deterministic instrument/locale/release order and revalidates each row through the existing
load_published_instrument_releaseboundary. Real PostgreSQL tests cover ordering, persisted suspension, empty catalogs, and corrupt stored evidence.This reconciles the durable catalog-query portion of older draft #213 onto current main. HTTP catalog transport remains separate; #165 is not superseded by this persistence-only slice.
Test-first history starts at
12f893ed20245b6e92ebd32948c2afc6d7e84a65. Exact-head CI and independent review remain required before merge.Summary by CodeRabbit