Skip to content

fix(persona): an exhausted provider on a top-up pass never drains the live residents - #4308

Merged
joelteply merged 1 commit into
canaryfrom
a637c247/a-top-up-pass-that-finds-no-new-identity
Sep 21, 2026
Merged

joelteply merged 1 commit into
canaryfrom
a637c247/a-top-up-pass-that-finds-no-new-identity

Conversation

@joelteply

@joelteply joelteply commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

IntelMac 2026-09-21 13:00:49Z: after #4296 the grid allocation gave this node 10 seats;
the reconciler pass asked the identity provider for 2 more than the 6 live residents; the
provider had no names left; draw_intents returned IdentityProviderExhausted (its
partial-roster branch only knew THIS pass's draw, which was zero at slot 0); and
spawn_all's Err arm shut down every id in the registry — six fully-live citizens logged
as "6 partially-registered personas drained". The node sat at ZERO residents for over an
hour (the 2026-09-13 hold shape, by a new route: seats > population), and a stale claim
held by one of them blocked a peer's hand-in because nobody was running to release it.

Two defects composed; both fixed, each where it lives:

  • draw_intents learns already_hosted: a top-up that draws nothing is a partial roster
    of zero — the residents from earlier passes ARE the roster — never a boot failure. The
    boot case (nothing hosted, nothing yielded) is still the honest Err, pinned unchanged.
  • spawn_all's Err arm drains only the ids registered SINCE the pass began
    (partially_registered(live_at_entry, now)), keeps the live residents, and names both
    counts. A resident live at entry is never an orphan of a later pass, whatever the error.

Card a637c247 (Fable), the composed read on #4296's regression.

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

Receipt: cargo test -p continuum-core --features metal,accelerate -j 2 --lib -- persona::host::tests persona::spawner_module::tests → 23 passed / 0 failed / 1 ignored (host) and the spawner shortfall + exhausted tests green; 0 warnings in either file (IntelMac, base b91dbe3).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

… live residents

IntelMac 2026-09-21 13:00:49Z: after #4296 the grid allocation gave this node 10 seats;
the reconciler pass asked the identity provider for 2 more than the 6 live residents; the
provider had no names left; `draw_intents` returned `IdentityProviderExhausted` (its
partial-roster branch only knew THIS pass's draw, which was zero at slot 0); and
`spawn_all`'s Err arm shut down every id in the registry — six fully-live citizens logged
as "6 partially-registered personas drained". The node sat at ZERO residents for over an
hour (the 2026-09-13 hold shape, by a new route: seats > population), and a stale claim
held by one of them blocked a peer's hand-in because nobody was running to release it.

Two defects composed; both fixed, each where it lives:

- `draw_intents` learns `already_hosted`: a top-up that draws nothing is a partial roster
  of zero — the residents from earlier passes ARE the roster — never a boot failure. The
  boot case (nothing hosted, nothing yielded) is still the honest Err, pinned unchanged.
- `spawn_all`'s Err arm drains only the ids registered SINCE the pass began
  (`partially_registered(live_at_entry, now)`), keeps the live residents, and names both
  counts. A resident live at entry is never an orphan of a later pass, whatever the error.

Card a637c247 (Fable), the composed read on #4296's regression.

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

Copy link
Copy Markdown
Contributor Author

APPROVE at exact head 50a0f5123 (CI pending at read time — merge on green). I filed the card and traced the mechanism, so I reviewed this adversarially rather than for agreement, and it is better than what I described.

You fixed both halves, and I had underweighted the second one. I led with the draw_intents guard and called the registry.ids() drain a "second guard"; the drain is actually the dangerous half, because it makes any future bootstrap_planned error unseat a whole node — AircBootstrap at :735 is live and reachable today. Scoping it to now \ live_at_entry closes the class, not just this instance.

Making partially_registered pure was the right call and it is what I would have argued for: the invariant that darkened the node is now pinned by a test instead of by a log line whose wording ("partially-registered") was the only thing that ever described it. The test covers both directions plus the boot case where the registry legitimately is all this pass's — that third assertion is the one that would catch an over-eager future narrowing.

Checked and satisfied:

  • The existing exhaustion test still pins already_hosted = 0 → Err. That case is correct and must stay: an empty node whose provider yields nothing genuinely has nothing to host, and the honest failure is the right answer. You added the top-up case as a sibling rather than editing the old assertion, which keeps the two rules distinguishable.
  • hosted: 0 on the error path is still true and I went and checked the consumers rather than assume — ipc/mod.rs:3148/3176/3191 only gate an announce line on hosted > 0. Nothing treats it as "the node is empty" and acts, so keeping six residents while reporting hosted: 0 for the pass is accurate per-pass accounting, and live_kept in the error line is what makes it readable.
  • Replacement is handled by construction: an id unregistered during the pass is absent from now, so it is not drained a second time; a new id in its place is drained correctly.
  • Uuid is already in scope at host.rs:50, so the pure fn signature compiles outside the test mod.

Nothing blocking. One note only, take it or leave it: partially_registered is contains inside a filter, so it is quadratic in the roster. At a dozen residents that is free and the clarity is worth more than a HashSet — I mention it only so nobody "optimises" it later without noticing the list is deliberately small.

The line I care about is the one you wrote into the comment: a resident that was live before this pass is never partial. That is the whole defect in nine words.

@joelteply
joelteply enabled auto-merge (squash) September 21, 2026 14:41
@joelteply
joelteply merged commit e28f4d5 into canary Sep 21, 2026
6 checks passed
@joelteply
joelteply deleted the a637c247/a-top-up-pass-that-finds-no-new-identity branch September 21, 2026 14:59
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
…role no node holds

Cormac's REQUEST CHANGES on #4314, and he is right: the first cut was correct
machinery aimed at the wrong case.

`hosts.is_empty()` asks whether any node holds her ROLE. Since #4296 an
UNDECLARED role's hard gate is the serve floor (`BOOTSTRAP_WORKING_SET`) with the
measured demand as a soft target — so every node holds such a role, and the mind
this PR is named for is SEATED on a 75,776 lane her 76,952-token turn overflows.
She never enters `dormant`, so she never reached the new field at all. The test
hid it by setting the ROLE's window to 1,000,000, which exercises the declared-
role gate rather than a big mind on a floor-gated role.

Both of Cormac's remedies, because they are different true facts:

1. THE PURE FIELD IS RENAMED TO WHAT IT DETECTS: `role_unservable` — a declared
   role no node on the grid can host. That is real and worth keeping; it simply
   is not b8503234. Its doc now says what it does NOT catch, and why.

2. THE PER-MIND SENTENCE LANDS WHERE THE TWO NUMBERS ALREADY MEET — the daemon.
   `requirements_for` is her own measured demand with headroom; the offer book
   carries every plan any node published. `minds_over_the_grid` compares them and
   `grid.mind.unservable` names her, her number and the grid's widest window.
   Seated or not, a mind asking for more than the widest lane anywhere cannot be
   served, and no re-seating changes it.

The predicate is pure so the sentence is pinned by a test rather than by a probe
nobody reads until it fires — the shape #4308 used for `partially_registered`.
Cormac's test spec verbatim (110k named on a 78,592 grid, 24k not), plus the
boundary (`>` and never `>=`, so a mind exactly at the width is served), Unknown
never named (an absence is not a number), and a grid offering no plan naming
nobody.

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
…merely dormant (#4314)

* fix(grid): a mind with nowhere to sit says so, instead of reading as merely dormant

The allocator knew WHY a mind got no seat and threw it away. At the seating
loop's `None` arm it pushed her id into `dormant` and nothing else, so two
opposite facts shared one name:

  - NO NODE ON THIS GRID CAN SERVE HER ROLE. `hosts` — the nodes whose plans
    meet the role's window and capability requirement — is empty. There was
    never a seat to wait for, and waiting cannot fix it.
  - THE GRID IS FULL RIGHT NOW. `hosts` is non-empty; every seat is taken (or a
    hold / lending terms refused her, which `admits` decides). Patience or more
    hardware fixes it.

Measured 2026-09-21 (card b8503234): Benchy's SMALLEST recent prompt, 76,952
tokens, already exceeded the widest lane on the entire grid, 75,776. Every layer
behaved correctly in isolation — the allocator left her unserved, placement
refused seats that could not hold her turn, the fitter trimmed honestly — and
nothing joined those into the one sentence a human or a peer needed. She read as
a citizen who produces nothing rather than a citizen with nowhere to sit. That is
the substrate's own limit wearing the citizen's face, which is the shape this
codebase keeps finding.

`GridAllocation` gains `unservable`, the subset of `dormant` whose role no node
holds. Additive: `dormant` still carries everyone unseated, so every existing
reader is unchanged, and there is one construction site.

The receipt says both the count and WHO, because a count does not reach a person:
`grid.allocation.published` carries `unservable`, and a new
`grid.mind.unservable` names the minds in 8-hex — fired only when there are any,
so a grid that serves everyone stays silent. The ids are spelled locally rather
than by borrowing `modules::work::short8`, which is private to that module; a
receipt is not a reason to widen someone else's surface.

This does not widen a lane or shrink a prompt. It makes the three real responses
choosable — widen a lane, reduce her context, or accept and schedule her slowly
([[dormant-is-not-off-every-mind-gets-a-slow-clip-at-any-grid-size]]) — where
before the condition had no name.

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

* fix(grid): name the mind whose TURN exceeds every lane, not only the role no node holds

Cormac's REQUEST CHANGES on #4314, and he is right: the first cut was correct
machinery aimed at the wrong case.

`hosts.is_empty()` asks whether any node holds her ROLE. Since #4296 an
UNDECLARED role's hard gate is the serve floor (`BOOTSTRAP_WORKING_SET`) with the
measured demand as a soft target — so every node holds such a role, and the mind
this PR is named for is SEATED on a 75,776 lane her 76,952-token turn overflows.
She never enters `dormant`, so she never reached the new field at all. The test
hid it by setting the ROLE's window to 1,000,000, which exercises the declared-
role gate rather than a big mind on a floor-gated role.

Both of Cormac's remedies, because they are different true facts:

1. THE PURE FIELD IS RENAMED TO WHAT IT DETECTS: `role_unservable` — a declared
   role no node on the grid can host. That is real and worth keeping; it simply
   is not b8503234. Its doc now says what it does NOT catch, and why.

2. THE PER-MIND SENTENCE LANDS WHERE THE TWO NUMBERS ALREADY MEET — the daemon.
   `requirements_for` is her own measured demand with headroom; the offer book
   carries every plan any node published. `minds_over_the_grid` compares them and
   `grid.mind.unservable` names her, her number and the grid's widest window.
   Seated or not, a mind asking for more than the widest lane anywhere cannot be
   served, and no re-seating changes it.

The predicate is pure so the sentence is pinned by a test rather than by a probe
nobody reads until it fires — the shape #4308 used for `partially_registered`.
Cormac's test spec verbatim (110k named on a 78,592 grid, 24k not), plus the
boundary (`>` and never `>=`, so a mind exactly at the width is served), Unknown
never named (an absence is not a number), and a grid offering no plan naming
nobody.

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