Repository navigation
feat: read-only /@user/receipts projection of stored OperationResults - #184
Merged
LIghtJUNction merged 1 commit intoSep 29, 2026
Merged
Conversation
…ults Design 154 requires a /@user/receipts/ view. The signed OperationResult rows the executor already persists in `results` (subject, request_id) are the real receipt facts, so this adds communication.receipt_list / receipt_get as pure reads over them instead of a new receipt table, state machine or writable resource. Stored result bytes and signatures are never rewritten. Only the path subject can read: other subjects get permission_denied (even for their own or unknown request IDs), anonymous callers get authentication_required. The projection is request_id, operation, status, committed_at, currently readable resources, a signed flag and error_code; data/output/cli_url are omitted because they can carry delivered credentials. Listing uses the inbox-style limit (1..200) and an HMAC cursor bound to the subject, ordered by request_id. Reads write nothing. Co-authored-by: Cursor <cursoragent@cursor.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
LIghtJUNction
merged commit Sep 29, 2026
8b4c807
into
integrate/all-open-20260929
11 of 15 checks passed
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/DESIGN_CONTRACT_INVENTORY.md: design 154 requires a/@user/receipts/read-only view. The signedOperationResultrows the executor already persists inresults(keyed bysubject, request_id) are the real receipt facts, so this only projects them. There is no new table, no receipt state machine and no writable receipt resource. Stored result bytes and signatures are never rewritten.communication.receipt_list(limit1..200,cursor) andcommunication.receipt_get(request_id), botheffect='read', registered alongside the other communication ops (new plugin modulesrc/msg/plugins/receipts.py). Existing short codes are untouched; the new ops get codes the same way other ops missing from the packaged snapshot do.GET/HEAD /@handle/receipts[/json]and/@handle/receipts/<request_id>[/json]. Pagination uses the inbox convention (limit/cursor). Any other query parameter is rejected, and so is any query on the detail path.Access and projection
permission_denied(403), even when asking about its own request ID or an unknown one, so existence is never revealed. Anonymous callers getauthentication_required(401). An unknown ID for the owner returnsnot_found.request_id,operation,status,committed_at,resources(only references the caller can read now),signed(a boolean) anderror_codewhen there is one.data,output,cli_url, actor/subject and the raw signature are omitted, becausedatacan carry delivered credentials, and the signature can't be verified without the full result bytes anyway.request_id. The cursor is HMAC-bound to the subject, so reusing one under another subject fails withcursor_query_mismatch.results, no events, audit entries, jobs or messages, and no generation changes.Not included:
communication.receipt_*is not added toTEMPORARY_OPERATIONS, so temporary identities cannot use the view yet.DESIGN_CONTRACT_INVENTORY.mdis left as the audit snapshot it is.Test plan
tests/test_subject_receipts.py(2 tests): owner list and detail (including/json, HEAD, ETag 304), exact projection keys, other subject denied (their own, the owner's and unknown IDs), anonymous denied, unknown IDnot_found, bad query or limit rejected, POST rejected,limit=1paging that visits each row exactly once in order, a cursor reused by another subject rejected, and table row counts plus a digest ofresultsunchanged after all reads. Also checks that resources whose access was revoked drop out of the projection while the stored result bytes stay identical.issue_78_80, …): 483 passed. The only 2 failures,test_read_entry_contract_matrix[discovery.read_query-*], also fail on the base commit without this change.test_hosting_runtime_isolation(it needssudo/cross-UID socket access on this machine) andtest_legacy_ledger_snapshot(it needsMSG_TEST_LEGACY_SOURCE). Both are environment requirements unrelated to this change.Made with Cursor