Skip to content

feat(api): create and reload in-process sessions over HTTP - #149

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/bc-466d2ab0-853e-434f-8973-93e8c61194c7-d503
Closed

feat(api): create and reload in-process sessions over HTTP#149
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/bc-466d2ab0-853e-434f-8973-93e8c61194c7-d503

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Why

A purchaser still cannot start an assessment over HTTP. Domain session creation exists on protected main, but TRD POST /v1/sessions / GET /v1/sessions/{session_ref} were Target. Session persist stays on the #125/#129 lineage; this slice does not add assessment_session.

Scope

  • src/session_http.rs mints a Created session bound to one cataloged published locale-specific release.
  • Exact Idempotency-Key replay returns the original session without minting a second identity.
  • Unpublished releases, locale mismatch, missing/conflicting idempotency, and unknown JSON fail closed with RFC 9457 problem details.
  • openapi/sessions.yaml (OpenAPI 3.2.0) lists only these two operations.
  • In-process store only. Process-restart durability remains a later persist slice.

Out of scope

Test plan

  • cargo test --test session_http_contract --test session_http_listener_contract --test documentation_architecture_contract
  • cargo test --lib session_http
  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings

Do not merge until exact-head checks and independent last-push approval are satisfied. Never self-approve.

Open in Web View Automation 

Add POST /v1/sessions and GET /v1/sessions/{session_ref} so a purchaser
can start an assessment against a published locale-specific release.
The server mints the session reference, pins provenance, and returns
the same Created session for an exact Idempotency-Key replay.
Unpublished releases and locale mismatches fail closed with RFC 9457
problem details. OpenAPI 3.2 lists only these two operations.
Process-restart durability remains a later persist slice.

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.

First public session HTTP family

Head c590b5e adds in-process POST /v1/sessions and GET /v1/sessions/{session_ref} with server-minted opaque refs, exact Idempotency-Key replay, RFC 9457 problems, and OpenAPI 3.2 limited to those two operations.

Create pins one cataloged published locale-specific release through AssessmentSession::new. Unpublished, locale mismatch, missing/conflicting idempotency, and unknown JSON fail closed. This slice does not add assessment_session persistence.

Residuals (documented, not a reason to open a second HTTP PR):

  • In-process store only; restart durability stays on the persist landing (#146, not #129).
  • No anonymous credential / resource authorization yet (#84/#86/#144).
  • GET is capability-URL by opaque session_ref; do not mint guessable refs in a hosted bind.
  • Does not import #87 ApiProblem; wire shape matches operator health HTTP.

Do not mix persist or auth stacks onto this branch. Independent last-push approval and exact-head required checks remain required. This review does not approve.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
Traceability and architecture views now cite #151 so agents do not
duplicate response-snapshot reload or fold it into #140, #137, or #149.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
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 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>

Copy link
Copy Markdown
Contributor

Closing as superseded, not merged. #232 is the current public-session HTTP landing: it implements the same POST /v1/sessions / GET /v1/sessions/{session_ref} family and OpenAPI contract on top of the durable sealed persistence/start path rather than this in-process-only store. Fresh comparison confirms #232 carries the HTTP files plus the required persistence/session-start stack. Keeping #149 open would preserve a weaker competing transport line.

@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