feat(api): Stage I owner-only views and stateless Responses - #382
feat(api): Stage I owner-only views and stateless Responses#382hanakannzashi wants to merge 5 commits into
Conversation
🧭 IronLoop Run · ReviewThis comment updates in place as the Run moves through its stages. 🟩 Final result · Completed
Automatic trigger · attempt 1 of 3 · completed in 1m 2s IronLoop completed the review and posted it to GitHub. 🔗 Result |
Review:
|
There was a problem hiding this comment.
🔍 IronLoop review
The stateless proxy mostly implements the retirement boundary, but it unnecessarily removes stateless function calling.
Findings: 🟠 Medium 1
🟠 Medium · Allow client-managed function calling
Inline on crates/api/src/routes/api.rs:428. See the inline comment for details.
Validation
- ✅ Stateless boundary inspection — Traced request validation and normalization through the Responses proxy and confirmed that function definitions and their client-managed outputs are rejected before reaching Cloud API.
Review details
- Run:
c7095235-fe44-429d-92ac-9750953d2312 - Workflow: Review
- Attempts: 1
|
Follow-up fixes are in 34e9024.
Validation: |
|
Fixed the failed CI fixture in 7a15469: the test now establishes an active subscription before asserting the handler’s local 400 response. Production authentication and subscription middleware ordering are unchanged. |
Stage I clarification — owner-only viewsThe Stage I read window retains only authenticated owner Conversation and File views. Sharing is not an export dependency: the entire sharing namespace, including its GET routes, and optional-auth/public shared Conversation reads are This PR therefore preserves the three Conversation and three File owner views, blocks all writes and sharing routes, and keeps Responses stateless without author injection or local tracking. Client-managed custom Final removal of the remaining owner views and wiring is deliberately deferred to Stage III. |
|
Update: final head |
Closes #386
Closes #387
Closes #388
Closes #389
Summary
This PR implements the Stage I owner-only read contract in #385. It preserves the existing authenticated owner views needed for migration/export, disables ordinary Conversation/File and all sharing routes, and keeps the Responses proxy stateless.
Stage I API contract
This table covers the Private Chat stateful surface only. Other inference APIs remain outside this migration scope.
POST /v1/responsesCache-Control: no-store. A non-empty body must be an identity-encoded JSON object. Chat rejectsstore: true, non-nullconversation, non-nullprevious_response_id, andbackground: true; it normalizes valid JSON requests tostore: false. It does not inject author metadata, perform Conversation ACL/tracking, execute tools, or run an agent loop.tools: [{type:"function"}]and replayedinputitems/v1/responses400for unsupported capabilities. This does not affect the separate root MCP proxy below.GET /v1/conversationsGET /v1/conversations/{conversation_id}GET /v1/conversations/{conversation_id}/itemsCache-Control: no-store.GET /v1/filesGET /v1/files/{file_id}GET /v1/files/{file_id}/contentCache-Control: no-store./v1/conversationsand/v1/files, including create, update, browser-facing delete, item creation, upload, pin/unpin, archive/unarchive, clone, external/v1/conversations/batch, unsupported methods, and unknown descendants410 GonewithCache-Control: no-store; it does not mutate local Private Chat state or forward a Cloud mutation.GET, under/v1/conversations/{conversation_id}/sharesand descendants,/v1/share-groupsand descendants, and/v1/shared-with-meand descendants410 GonewithCache-Control: no-store. Optional-auth/public shared-Conversation reads are not mounted.DELETE /v1/users/meDELETE /v1/conversations/{id}andDELETE /v1/files/{id}before local finalization. This is not a retained browser-facing Conversation/File proxy DELETE route.POST /mcp/v1/chat/completions,/v1/images/*, model/signature routesOut of scope
No schema/migration/data cleanup, no new export API, and no removal of temporary owner-view wiring. #380 tracks account-deletion compatibility; final route/runtime removal remains Stage III work under #377 and #390–#392.
Validation
09902665head: Test Suite, Rust CodeQL, cargo deny, and CodeQL actionscargo fmt --all -- --checkgit diff --checkcargo clippy --all-targets --all-features -- -D warningscargo test --lib --bins --features testcargo test --features test -- --test-threads=1passed (one intentional real-agent test ignored)