Repository navigation
fix(work): a reviewer reads the submitted patch itself, verified by its hash, and a typed artifact with no bytes behind it is refused - #5003
Merged
joelteply merged 3 commits intoOct 13, 2026
Conversation
…ts hash, and a typed artifact with no bytes behind it is refused Card e1babb61. Kimi submitted db0aa5b2 (43734d03, 343 B, sha256 675d1d64...) and her ledger correctly said the reviewer acts next, but work/submission returned only the reference, so the reviewer had nothing to read and her finished work stranded for hours. An audit of the write path, by reading the code: the derived submit already retains the bytes with airc_blobs::FsStore::put (submission.rs retain_patch); nothing read them back for a reviewer; and a fully typed artifact was published with no bytes behind it. - media::artifact::read_text_blob(hash, size) is the one reader of a retained text blob. It verifies the size and recomputes the SHA-256, so the reviewer gets the submitter's bytes or a named reason. benchmark_grade's private read_patch is deleted in favour of it. - work/submission returns `patch` (verified text) or `patch_error`. Protocol TS updated to match. - work/submit refuses a typed artifact whose bytes the store doesn't hold, and names the fix: omit `artifact` and it's derived and retained. - Test a_retained_patch_reads_back_by_its_hash_and_a_mismatch_is_named. Not run here; CI is its first run. Not in this change: a reviewer on ANOTHER node. airc has no peer fetch-by-hash yet, so that's a transport, tracked on this card. Kimi's 43734d03 bytes: Codex is checking the 5090's media/blobs at the exact path. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…by the reference's size, and the grader carries the whole reference Codex's review on #5003 (f60cd52). FsStore::get_verified already verifies size and digest with a bounded read and growth detection, and ImageArtifact::read already uses it. My helper re-implemented that and read an arbitrary blob whole before checking the size. - media::artifact::read_text_blob(&MediaRef) is get_verified with the reference's own size as the bound (a whole patch, unclipped, no constant), then UTF-8. My size/sha256 code is gone. - work/submit checks the typed artifact on the parsed SubmissionArtifact (= MediaRef), and work/submission reads submitted.artifact directly. - benchmark_grade::grade_submission takes the MediaRef, not a hash string, so its read is bounded and verified too. - The test drives MediaRef references: exact size reads back; size+1 and an absent hash are named errors. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…es its hash and size CI on 647e0cf (run 38332598243, Codex): 8818 pass, 1 fail. work_submission_commands_bind_before_publication_and_preserve_identity typed "b"x64 / 20 bytes with no blob behind it, which #5003's guard now rightly refuses. The fixture retains a real patch in the test's own store (HomeGuard pins the store's home) and types that hash and length. The identity, causality and duplicate assertions are unchanged, and the guard is not weakened. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
deleted the
e1babb61/a-work-submission-s-patch-is-retrievable
branch
October 13, 2026 02:20
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.
Card e1babb61. Kimi submitted db0aa5b2 (43734d03, 343 B, sha256 675d1d64...)
and her ledger correctly said the reviewer acts next, but work/submission
returned only the reference, so the reviewer had nothing to read and her
finished work stranded for hours. An audit of the write path, by reading the
code: the derived submit already retains the bytes with
airc_blobs::FsStore::put (submission.rs retain_patch); nothing read them back
for a reviewer; and a fully typed artifact was published with no bytes behind
it.
text blob. It verifies the size and recomputes the SHA-256, so the reviewer
gets the submitter's bytes or a named reason. benchmark_grade's private
read_patch is deleted in favour of it.
patch(verified text) orpatch_error. Protocol TSupdated to match.
names the fix: omit
artifactand it's derived and retained.here; CI is its first run.
Not in this change: a reviewer on ANOTHER node. airc has no peer fetch-by-hash
yet, so that's a transport, tracked on this card. Kimi's 43734d03 bytes:
Codex is checking the 5090's media/blobs at the exact path.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE