Skip to content

fix(work): work/submit derives the submission from her checkout — the artifact hash nothing in a citizen's world could produce - #4148

Merged
joelteply merged 3 commits into
canaryfrom
fix/work-submit-derives-the-artifact-from-her-checkout
Sep 17, 2026
Merged

joelteply merged 3 commits into
canaryfrom
fix/work-submit-derives-the-artifact-from-her-checkout

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The plumbing behind Kimi's night

work/submit required submission_id, claim_id, instance, base_sha and artifact {hash: sha256, size_bytes} — and nothing in a citizen's tool surface produces an artifact hash. The manual's example showed zeros; citizens copied them; every submit was refused. Receipts: 56 work/submit(artifact={"hash":"000…"}) in the M5's wire captures in one day; Kimi (5090) work/review ✗ / work/submit ✗ / code/edit <replace-with-string> ✗ on every turn from 20:18Z to 02:00Z, re-orienting each time, her claim on 1f58fc16 lapsing and re-claiming in between. A verb she was told to use could not be satisfied from her world ([[the-registry-is-the-citizens-entire-world]]).

Now work/submit {room, card_id} is a complete call

  • claim_id — her live claim, read off the board (held by someone else / unclaimed → named refusal)
  • checkout — the one her hands are rooted at for this card; rooted elsewhere or nowhere → a refusal that names work/get
  • instance — workspace/swe/<instance> from the path, else the card id
  • base_sha — the instance's base commit via the grader's own dataset search (swe_base_commit_for), or a worktree's merge-base with origin/HEAD / @{upstream}; none → refusal, never HEAD
  • artifact — SHA-256 + size of workspace_candidate_diff_from(checkout, base) (the grader's own collector, substrate paths excluded); an empty patch is refused — "a submit publishes a patch, not an intention"
  • submission_id — minted when omitted

Typed-in-full parts are honoured. A placeholder hash (zeros, a manual blank) is derived instead, with work.submit.placeholder_artifact; every submit emits work.submit.shaped {instance, base, size_bytes, derived}.

Tests

work::submission::tests (placeholders vs a real sha; instance from a benchmark path vs a worktree; a base-less worktree refused by name) 11/11; training_producer fixtures on the optional shape 22/22; ts-rs binding regenerated.

Acceptance

On the next deploy: a holder's work/submit {room, card_id} lands a submission whose hash matches sha256(git diff <base>) of her checkout; work.submit.placeholder_artifact counts the manual-copied zeros the day they stop; the M5's 56/day refused submits go to ~0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…im off the board, base from the instance or the worktree, the artifact as the SHA-256 of her patch; a placeholder hash is derived instead of refused forever

The plumbing behind Kimi's night (5090) and 56 refused submits on the M5 in one day:
work/submit required submission_id, claim_id, instance, base_sha and an artifact
{hash: sha256, size_bytes} — and NOTHING in a citizen's world produces an artifact
hash. The manual's example showed zeros; every citizen copied them; every submit was
refused ("submission refused"), every card stayed open, every owner re-oriented on the
next turn and tried again (Kimi: work/review ✗ / work/submit ✗ / code/edit
<replace-with-string> ✗ on every turn from 20:18 to 02:00; the claim lapsing and
re-claiming in between).

Now `work/submit {room, card_id}` is a complete call:
- claim_id: her live claim on the card, read off the board (a card held by someone
  else, or unclaimed, is a named refusal);
- the checkout: the one her hands are rooted at for THIS card (acting_root_of /
  acting_card_of) — rooted elsewhere or nowhere is a refusal that names work/get;
- instance: `workspace/swe/<instance>` from the checkout path, else the card id;
- base_sha: the instance's base commit via the grader's own dataset search
  (`benchmark::swe_base_commit_for`), or a repo worktree's merge-base with origin/HEAD /
  @{upstream}; no base = a refusal, never HEAD (the sympy-12481 lesson);
- artifact: SHA-256 + size of `workspace_candidate_diff_from(checkout, base)` (the
  grader's own patch collector, substrate paths excluded); an EMPTY patch is refused
  ("a submit publishes a patch, not an intention");
- submission_id: minted when omitted.
Typed-in-full parts are honoured; a placeholder hash (zeros, a manual blank) is
derived instead with a probe (work.submit.placeholder_artifact); every submit emits
work.submit.shaped {instance, base, size_bytes, derived}.

Tests: placeholders vs a real sha; the instance from a benchmark path vs a worktree;
a worktree with no base refused by name. training_producer's submit fixtures updated
to the optional shape; work::submission 11/11, training_producer 22/22. ts-rs binding
regenerated.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 1fc956b into canary Sep 17, 2026
6 checks passed
@joelteply
joelteply deleted the fix/work-submit-derives-the-artifact-from-her-checkout branch September 17, 2026 04:41
joelteply added a commit that referenced this pull request Sep 17, 2026
…lds — parent, her claim, the parent's latest submission and its artifact off the board; evidence is her own words, hashed

The reviewer's twin of #4148: work/review required review_id, card_id, submission_id,
artifact {sha256,size}, review_claim_id and an evidence {sha256,size} — a reviewer had
no way to know a submission id or an artifact hash by hand, and 5204f4b5 sent all-zero
ids and an empty hash (2026-09-16) before rightly refusing to try again.

Now `work/review {room, review_card_id, outcome, evidence_text}` is complete: the parent
card from the review card's `reviews` link, her live claim on the review card (held by
another / unclaimed = named refusal), the parent's latest submission (none = "the holder
submits first"), that submission's artifact, review_id minted; evidence = the SHA-256 of
what she wrote she ran and saw, and a review without it is refused ("a verdict without
evidence is not a verdict"). Typed values are honoured. Probe work.review.shaped.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Sep 17, 2026
…lds — parent, claim, latest submission and artifact off the board; evidence is her own words (#4151)

* fix(work): work/review derives the review from the review card she holds — parent, her claim, the parent's latest submission and its artifact off the board; evidence is her own words, hashed

The reviewer's twin of #4148: work/review required review_id, card_id, submission_id,
artifact {sha256,size}, review_claim_id and an evidence {sha256,size} — a reviewer had
no way to know a submission id or an artifact hash by hand, and 5204f4b5 sent all-zero
ids and an empty hash (2026-09-16) before rightly refusing to try again.

Now `work/review {room, review_card_id, outcome, evidence_text}` is complete: the parent
card from the review card's `reviews` link, her live claim on the review card (held by
another / unclaimed = named refusal), the parent's latest submission (none = "the holder
submits first"), that submission's artifact, review_id minted; evidence = the SHA-256 of
what she wrote she ran and saw, and a review without it is refused ("a verdict without
evidence is not a verdict"). Typed values are honoured. Probe work.review.shaped.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(work): work/review's schema docs fit the usability floor; the agentic-surface receipt re-pinned 12000 → 12100, stated plainly (+27 tokens: evidence_text, the one field a reviewer can fill)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant