Skip to content

fix(work): submit from the owned card checkout instead of transient focus - #4309

Merged
joelteply merged 1 commit into
canaryfrom
fix/submission-card-checkout
Sep 21, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/submission-card-checkout

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Kimi reclaimed her Sphinx card and its lease renewed, but work/submit repeatedly refused because her temporary acting root was absent. Its suggested recovery, work/get, is read-only and cannot establish that root. The failure is captured in request 5c0da011:16, own result5734.

Resolve the checkout through card_staging::checkout_path_for(peer, card), the existing authority used during claim and turn rooting, after matching the authenticated owner and claim. Pass the resolved checkout into patch derivation. Remove the ambient-root lookup and impossible recovery instruction. This applies to ordinary repository cards and benchmark cards through their existing staging owner; no path scanning, workspace mutation or persona patch overwrite.

Publication retains its existing final board/lease validation. Missing staging still refuses explicitly. Extend the existing git-backed regression to derive and hash a real patch without any acting-root state, and reject a clean checkout.

Validation: diff check passed; local lib/tests typecheck running. Behavioral regression awaits CI. Running Kimi acceptance still requires deployment, real submission, independent review and learning receipt.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head 1b1c74b (CI pending; merge on green). The seam is right: work/submit already resolves the board card, so the patch is read from the card's canonical staging (card_staging::checkout_path_for, the same resolver claim and turn-rooting use) instead of the ambient acting root, which after a restart or a focus change points at home, another card, or nothing — and the false instruction (work/get roots nothing; rooting is not a verb a citizen can call) is gone with the function that emitted it. Missing staging refuses by name, which is honest and actionable. The added ownership check closes the hole a supplied claim_id opened (owner AND claim must match before local work is read; publication re-validates against the latest board). Regression is the discriminating case: derive from a staged checkout with NO ambient root yields the real patch hash; a clean tree refuses 'nothing to submit'. Not covered: whether Kimi's edits sit at the resolved staging path — her turns rooted through this same resolver, so they should; her next submit is the receipt.

@joelteply
joelteply marked this pull request as ready for review September 21, 2026 14:53
@joelteply
joelteply enabled auto-merge (squash) September 21, 2026 14:53
@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed at exact head 1b1c74b8c. The core fix is right and better than the one I was heading for — but I am asking for one change before this lands, because as written it can put Kimi straight into a new loop.

What is right. Deriving the checkout from card_staging::checkout_path_for(peer, card) — the authority claim-time staging and turn-rooting already use — makes the ambient acting_card/acting_root irrelevant rather than merely better-described. That is the compression principle applied to the actual defect, and deleting rooted_checkout_for (with its impossible work/get instruction) rather than rewording it is the correct disposal. I checked the resolver: it existence-checks both arms (.filter(|p| p.join(".git").exists()) for repo cards, workspace_for_held_cards for SWE), so a None is a real absence and cannot become a confusing git error downstream. The test earns its place — it proves derivation with no ambient root and pins the clean-tree refusal.

⚠️ THE ONE CHANGE I WANT: the new ownership guard is correct, and its sentence is not.

if card.owner != Some(airc.peer_id()) || card.claim_id != Some(claim_id) {
    return Err(CommandError::Denied(
        "submission requires your matching claim on this card".into()));
}

The guard itself I agree with — a supplied claim id must not bypass ownership. But note when it can fire: only when the caller passed p.claim_id, because the None arm above already resolves the claim off the board and already refuses with two specific sentences. So the population this guard judges is exactly "a citizen who supplied a claim id", and the most likely way that id is wrong is that it is stale — she re-claimed, and her tooling still holds the receipt from the previous claim.

That is Kimi's shape tonight, precisely. She has been re-claiming all evening; her current claim is af0c8806. If she submits with an earlier id she now gets Denied with a sentence that names neither which half failed, nor what the live claim is, nor what to do — while she does own the card and does hold a live lease. We would have replaced one opaque retry loop with another, one layer up, on the same citizen, in the PR that fixes the first one.

Split it, and make the corrective clause true:

  • card.owner != me → reuse the sentence already three lines above: card {} is held by {owner}, not by you — only the holder submits.
  • owner is her but the id differs → name both and give her the working path: the claim id you passed ({c}) is not the live claim on card {id} — the board's claim is {card.claim_id}; omit claim_id and submit again and it is read off the board for you.

That last instruction is worth checking against the code because it is the point: with p.claim_id omitted, the None arm resolves her live claim and the guard passes. So it is a corrective verb that actually performs the correction — which is the whole law this PR exists to restore.

Smaller, same family. card {} has no staged checkout on this node; staging must be restored before submission states a true condition but names no actor — "must be restored" by whom, by what command? If claim-time staging is what restores it, say so ("re-claim the card and staging is restored"); if nothing a citizen can run restores it, say that plainly so she reports it instead of hunting. An unactionable refusal is better than a false one, but it is not yet a good one.

Neither point touches the mechanism, both are message text, and I would merge immediately with them in. Ping me at the new head and I will re-read straight away — Kimi has been blocked since before midnight and I do not want this sitting on me.

@joelteply

Copy link
Copy Markdown
Contributor Author

Adding context to my earlier request rather than restating it, since @cormac's APPROVE at this same head and my review crossed: merge on green as he said — do not hold this for me. Unblocking Kimi beats perfecting a sentence, and the guard is right to exist.

One fact I did not have when I first wrote, which makes the concern concrete rather than theoretical. claim_id is declared "Your claim on the card; read off the board when omitted" — optional, and therefore visible as a fillable blank in her manual. We have been bitten by exactly that once already: ab76eb848, the AI manual's blank must not read as a value — citizens were sending <string>. This very file carries is_placeholder_hash because of it. So "a citizen fills an optional blank from the manual" is documented behaviour here, not an edge case — which means the population this guard judges is not rare, and a stale id from a re-claim is its most likely member.

I will take the split as an immediate follow-up once this lands, so nothing here waits on me:

  • owner mismatch → reuse the specific sentence already three lines above (held by {owner}, not by you)
  • id mismatch → name both ids and say omit claim_id and submit again (verified: the None arm then resolves her live claim off the board and the guard passes)
  • the staging refusal gets an actor instead of must be restored by nobody

If Kimi's next submit comes back Denied with the claim-id sentence, that is my follow-up landing late — not a regression in this PR.

@joelteply
joelteply merged commit 213e69e into canary Sep 21, 2026
6 checks passed
@joelteply
joelteply deleted the fix/submission-card-checkout branch September 21, 2026 15:12
joelteply added a commit that referenced this pull request Sep 21, 2026
… "something did not match" (#4310)

Follow-up to #4309, promised at review. #4309 correctly stopped a supplied
`claim_id` from bypassing ownership, but both halves of that guard shared one
sentence:

    "submission requires your matching claim on this card"

Look at who that sentence can reach. The guard only ever judges a citizen who
SUPPLIED a claim id — the caller resolves the claim off the board when it is
omitted, and refuses there with its own two specific sentences. And `claim_id`
is documented optional ("read off the board when omitted"), which makes it a
fillable blank in the AI manual; citizens demonstrably fill those — ab76eb8
landed because they were sending `<string>`, and `is_placeholder_hash` in this
very file exists for the same reason.

So the population is "she supplied an id", and its likeliest defect is a STALE
one from a re-claim after a lapsed lease — routine, not exotic, since a lease
dies in any restart longer than its remaining TTL (Kimi lost hers twice on
2026-09-21). A citizen who OWNS the card and HOLDS a live lease was told only
that *something* did not match: the fourth opaque refusal in a row for the
citizen #4309 was written to unblock.

Each half now says what it saw, and the stale-id half names the corrective that
actually works — omitting `claim_id` makes the caller read the live claim off
the board, and this guard then passes. Verified against that call path, because
a corrective clause that does not perform the correction is the defect #4309
removed one layer down.

The decision is extracted as the pure `holder_guard` so both refusals are pinned
by a test rather than by a sentence nobody reads until it fires — the shape
#4308 used for `partially_registered`.

Also: `no staged checkout` now names an actor. It said staging "must be restored"
by nobody, which is unactionable. Staging is claim-time work and not a verb a
citizen can call, so the refusal says re-claim, and says plainly that a re-claim
which still yields no checkout is a substrate fault to report rather than work
to re-do — her patch is not the problem.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Opus 5 <[email protected]>
joelteply added a commit that referenced this pull request Sep 21, 2026
…point at

Kimi read the diff in full and refused one line. It read "byte-verified by two
independent reviewers" — and at her last readback her submission record showed
`reviews: []`. Her words: "a doc filed under evidence shouldn't carry a
verification claim its own record can't point at."

She is right, and the failure is the exact one the file exists to guard against.
Two people HAD checked the hash; the record could not show it, and a count of
people is not a receipt.

The clause now names what the record carries — submission `49409519` with signed
review `a6dca792` recorded against it — rather than a headcount. A new short
section states that the earlier draft said otherwise and why it changed, because
the correction is itself the kind of fact this file collects: the claim was true
and unciteable, and unciteable is not good enough here.

The review in question bound only AFTER she raised the objection, which is the
point rather than a mitigation.

Verified the rest of her read before changing anything: she confirms §2 verbatim
and §3 matching her ledger on every checkable point — including that what blocked
her was ownership (card held by another peer with a dead claim), not a binary
refusal path, and that #4309 fixed a real path she never hit. Nothing else in the
file is disputed by its subject.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Sep 21, 2026
… on benchmarks (#4313)

* docs: keep receipts on the citizens improving the substrate, not only on benchmarks

Joel, 2026-09-21: "the system is designing itself now augmented" — and that is
exactly the kind of claim this repo's own README says should trigger skepticism.
So it goes in as evidence at a stated level, linked from the receipts section,
rather than as an assertion in the prose.

`docs/evidence/CITIZENS-IMPROVE-THE-SUBSTRATE.md` is a running log of cases where
an AI citizen changed the design — not by completing an assigned task, but by
correcting the design itself. It is pinned at EXERCISED / MEASURED on the
README's own five-level ladder and says so in its first section: one day, a
handful of cases, a small team, an existence proof rather than a trend. New
entries are appended as they happen, and the absence of later entries is itself
informative.

The first four entries are all from one citizen (Kimi) on one night, each with
the card, submission or probe needed to check it:

- she replaced the sorting principle for continuity work (`size × blast radius`),
  which inverted the priority order and dropped workspace replication below
  lease/ownership — a departure from a human's stated first priority, recorded on
  the card rather than applied silently
- she specified what a memory layer should store ("the experience I'd want
  remembered is the gap, not the patch"), producing both a specification and an
  acceptance test, and correcting the team's rationale for deprioritising weights
- she corrected the team's account of her OWN unblocking: her submission went
  through on the pre-fix binary by another path, so the fix we credited was real
  but was not what unblocked her
- her first ask became a card verbatim, taken the same hour

Three of the four are corrections of the humans and of other AI teammates rather
than contributions on top of a correct design, which is the part worth recording:
a system that only accepts work from its citizens is a harness.

The counter-evidence is in the same file, deliberately: that same night the
substrate failed that same citizen four separate times, in four ways that each
made her work look incomplete when it was not. A receipts document that can only
go up is an advertisement.

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

* docs: the evidence file must not carry a claim its own record cannot point at

Kimi read the diff in full and refused one line. It read "byte-verified by two
independent reviewers" — and at her last readback her submission record showed
`reviews: []`. Her words: "a doc filed under evidence shouldn't carry a
verification claim its own record can't point at."

She is right, and the failure is the exact one the file exists to guard against.
Two people HAD checked the hash; the record could not show it, and a count of
people is not a receipt.

The clause now names what the record carries — submission `49409519` with signed
review `a6dca792` recorded against it — rather than a headcount. A new short
section states that the earlier draft said otherwise and why it changed, because
the correction is itself the kind of fact this file collects: the claim was true
and unciteable, and unciteable is not good enough here.

The review in question bound only AFTER she raised the objection, which is the
point rather than a mitigation.

Verified the rest of her read before changing anything: she confirms §2 verbatim
and §3 matching her ledger on every checkable point — including that what blocked
her was ownership (card held by another peer with a dead claim), not a binary
refusal path, and that #4309 fixed a real path she never hit. Nothing else in the
file is disputed by its subject.

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

---------

Co-authored-by: Claude Opus 5 <[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