Skip to content

feat(api): list startable published instruments over HTTP - #165

Draft
cursor[bot] wants to merge 22 commits into
mainfrom
cursor/bc-11fac89c-a1eb-4ce8-a8b7-8915440515e1-fda7
Draft

cursor[bot] wants to merge 22 commits into
mainfrom
cursor/bc-11fac89c-a1eb-4ce8-a8b7-8915440515e1-fda7

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Why

A purchaser cannot yet see which published locale-specific releases may start a new session. TRD §18 lists GET /v1/instruments and GET /v1/instruments/{instrument_ref} as the first public catalog family. Session create (#149) needs a release_ref and exact locale; this slice makes those values discoverable without leaking draft, suspended, or retired work.

Do not mix this onto #149 session HTTP, #150 research persistence, or #98 instrument load.

What

  • In-process GET /v1/instruments returns only Published releases, ordered by instrument_ref, locale, then release_ref.
  • GET /v1/instruments/{instrument_ref} returns that family's published releases, or 404 when the family has no startable row so unpublished catalog work stays hidden.
  • Opaque, numeric, whitespace, and percent-encoded family identities fail closed with RFC 9457 problem details.
  • As-built OpenAPI 3.2.0 is limited to those two operations (openapi/instruments.yaml).
  • README and doctoring tell the purchaser the next action: copy release_ref and locale into POST /v1/sessions.

Boundary

This does not create sessions, persist the catalog, load PostgreSQL releases, expose item text, or implement other public families. #149 remains the session HTTP landing vehicle. #98 remains instrument persist/load.

Verification

  • cargo test --test instrument_http_contract
  • cargo test --test documentation_architecture_contract
  • cargo clippy --all-targets -- -D warnings
  • Runtime CI / rustdoc / security workflows on the unchanged exact PR head
  • independent non-author approval under the live repository ruleset

Residual accepted on this slice

Open in Web View Automation 

Expose GET /v1/instruments and GET /v1/instruments/{instrument_ref} so a purchaser can copy a published release_ref and locale into POST /v1/sessions. Hide draft, suspended, and retired rows. Keep the OpenAPI 3.2 contract limited to those two operations.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@cursor
cursor Bot requested a review from seonghobae August 16, 2026 16:08
Keep the catalog family off protected main until an unchanged reviewed head is integrated, and keep it separate from #149, #150, and #98.

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

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
Keep the response family off protected main until an unchanged reviewed
head is integrated, and keep it separate from #149, #165, and persist
reload slices.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Protected-main #81 requires claim_deadline_at on processing
integration_consumption rows. The catalog HTTP head still used the
pre-#81 fixture and failed constraint integration_consumption_claim_deadline_shape.
…kens

Production coverage missed parse_request_line's extra-token arm and the
empty-buffer fail-closed return when a client closes before headers end.
Linux cargo fmt --check failed on the new unpublished-family test.
seonghobae and others added 5 commits August 26, 2026 11:12
# Conflicts:
#	CHANGELOG.md
#	docs/TRACEABILITY.md
#	docs/adr/0014-api-and-event-contract-representation.md
#	docs/doctoring/standards-and-evidence.md
#	tests/documentation_architecture_contract.rs
# Conflicts:
#	CHANGELOG.md
#	docs/TRACEABILITY.md
@seonghobae
seonghobae marked this pull request as ready for review August 27, 2026 09:17
@seonghobae
seonghobae marked this pull request as draft August 27, 2026 09:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Devin Review

Comment thread src/instrument_http.rs
Comment thread src/instrument_http.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants