Skip to content

A reviewed credit the training trigger refused is kept, named, and retried at her next staging (card 99b2773a) - #5531

Merged
joelteply merged 5 commits into
canaryfrom
99b2773a/a-reviewed-credit-whose-training-submit
Oct 27, 2026
Merged

joelteply merged 5 commits into
canaryfrom
99b2773a/a-reviewed-credit-whose-training-submit

Conversation

@joelteply

@joelteply joelteply commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

Plan path step 3 (Learning, goal 8): a reviewed correction has to reach her training. On the 5090 on 2026-10-27, Kimi's submission 28087ebb got further than any before it, and then stopped. Codex read the store and logs:

consume_review_credit persists the decision, then calls genome/training-trigger/submit. The submit answered (consume returned Ok) without an acceptance. Every accepted path in submit.rs, dispatch failure included, sets one, so the trigger refused before accepting: either BucketHeldFull, or one of state.accept's refusals (RecoveryRequired, PersistenceUnavailable, PersistenceFailed, SubmissionConflict, InconsistentBucket). That answer was returned once and kept nowhere. The credit read awaiting_acceptance with no error, nothing said which refusal it was, and nothing retries until another review event or her next registration.

What

  • reviewed::CreditSubmitRefusal (credit_submit_refusal), one row per submission:
    • kept when the submit returns no acceptance for this revision, with probe training.credit.submit_refused naming error_kind and error;
    • deleted in the acceptance's own batch, so an accepted credit never keeps one.
  • credit_status reports it as the destination of a decided, unaccepted credit, so work/submission's credit_error names the refusal.
  • Retry owner: after staging, the producer asks for one more pass of her reviews while a refused credit waits (refused_credit_waiting), through the same coalesced redrive held reviews already use. That's event-driven by her own acts, with no new tick or cross-crate edge. The submit replays under the same submissionId, so a retry the trigger already holds comes back AlreadyAccepted, never a second batch.
  • Registered in register_substrate_orm_entities, SUBSTRATE_ORM_COLLECTIONS and ensure_storage.

Verified (enrico, 2026-10-27, head 8fb5c81)

  • Ratchets against origin/canary: exit 0, all 68 pass.
  • New fixture refused_submit::a_refused_reviewed_credit_is_kept_named_and_accepted_on_the_next_pass:
    • on the existing exact-review setup, the trigger first refuses with RecoveryRequired;
    • the credit stays AwaitingAcceptance, its status names RecoveryRequired, and refused_credit_waiting is true;
    • a second pass that the trigger accepts reaches Accepted and clears the refusal.
  • Not built locally: continuum-mind and continuum-core. enrico serves residents and IntelMac's builds go to CI, so CI is the compile. Mutation in CI after green: dropping clear_refusal fails the last assertion, and dropping record_refusal fails the status assertion.

Measured after deploy

Owner Cormac: on the 5090, after this deploys, 28087ebb is retried at Kimi's next staging. Then either credit_submit_refusal names the refusal, or credit_review_acceptance exists, followed by the trigger job and its ledger row.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

joelteply and others added 2 commits October 27, 2026 09:39
…tried at her next staging (card 99b2773a)

Kimi's 28087ebb on the 5090 (2026-10-27): bound, passed by Sahar, decision
persisted 13:19:04Z, and the trigger answered without an acceptance. That
answer was returned once and kept nowhere: the credit read awaiting_acceptance
with no error and waited for another review event or her next registration.

- reviewed::CreditSubmitRefusal (credit_submit_refusal), one row per
  submission: kept when the submit returns no matching acceptance
  (training.credit.submit_refused), deleted in the acceptance's own batch.
- credit_status names it as the destination of a decided, unaccepted credit,
  so work/submission's credit_error is no longer silently null.
- After staging, the producer asks for one more pass of her reviews while a
  refused credit waits (refused_credit_waiting), through the same coalesced
  redrive held reviews use. The submit replays under the same submission id,
  so a retry the trigger already holds is AlreadyAccepted.

Fixture: refused_submit::a_refused_reviewed_credit_is_kept_named_and_accepted_on_the_next_pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…r region, with no turn, review or registration (Codex on #5531)

Staging was the wrong owner: an idle citizen stages nothing, and the trigger's
holds lift as time passes, not at an event. reconcile_reviews is not an owner
either: it walks only cards she still holds, and drops an AwaitingAcceptance
replay without a word.

- reviewed::settle_passed: the post-decision settlement (provenance, lived
  calls, reservation, decision, submit, acceptance or kept refusal), moved out
  of consume_review_credit unchanged, so the two callers cannot drift.
- reviewed::retry_decided: settles a decided credit again from its binding and
  its recorded decision, under the same submission id.
- reviewed::decided_unaccepted: one bounded page of her decisions, in id order
  from a cursor, returning those with no acceptance (pre-upgrade decisions with
  no refusal row included).
- CreditAcceptanceRegion, ticked per resident by the existing SubstrateGovernor
  beside the digest and dream regions: settles the owed credits of one page,
  Slower while one waits, Hold while pages remain, Sleep otherwise (re-checked
  every 30 passes). Her store connection carries her own identity.
- The staging hook and refused_credit_waiting are gone; the refusal row stays
  as the named reason.

Fixture: the_region_settles_a_refused_decided_credit_with_no_turn_review_or_registration
(refused, refusal row removed as a pre-upgrade decision, region tick refused
-> Slower and named, region tick accepted -> Accepted with the same
submissionId, a further tick submits nothing and sleeps).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply force-pushed the 99b2773a/a-reviewed-credit-whose-training-submit branch from 8fb5c81 to ae37b4f Compare October 27, 2026 14:43
@github-actions github-actions Bot added size: L and removed size: M labels Oct 27, 2026
joelteply and others added 2 commits October 27, 2026 09:51
…budget, and pages by row key (Codex on #5531)

The cursor moved to the end of an eight-row page before any settle ran, so a
decision whose settle always outlasted the governor's 5 s tick starved every
decision after it; and one malformed row stopped decided_unaccepted where it
stood.

- decided_page reads each row's key, whatever its data holds; owed_acceptance
  checks one id. The region records the cursor before awaiting each settle,
  and bounds the tick by half the governor's REGION_TICK_TIMEOUT (now
  pub(crate), the one owner of that bound): a settle cut by the budget is named
  (training.credit.retry_slow) and tried again under the same submission id
  when the scan comes round.
- A decision that settles to anything but a pending credit is named, not
  silently waited on. Probe texts no longer mention the removed staging hook.

Fixture a_bad_or_hanging_decision_never_starves_the_rest: a malformed decision
row ahead of hers, and her settle hanging on the first pass; the first tick
ends within the budget, and a later pass settles her credit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…he next (Codex on #5531)

Two ordinary submissions on her card, both passed while the trigger refused.
The region's trigger never answers a submit for the one first in id order; the
other is accepted with no review event, registration or turn, and the first
still waits.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@github-actions github-actions Bot added size: XL and removed size: L labels Oct 27, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

PASS at 1258075. Decided credits without acceptance now have an existing-governor owner independent of new work, review events or registration; this includes pre-upgrade decisions without a refusal row. Refusals remain inspectable, retries use the recorded review/persona and same submission ID, and accepted credits are skipped. Per-attempt cursor progress and bounded work prevent a malformed or permanently hanging decision from starving later credits. Reviewed the actual region fixtures, including two real submissions with a permanently hung first decision; independently verified all exact-head checks pass/skip, including core and mind. This establishes tested retry behavior, not deployment, actual Kimi acceptance or trained-artifact recovery.

@joelteply
joelteply merged commit 6133b1e into canary Oct 27, 2026
15 checks passed
@joelteply
joelteply deleted the 99b2773a/a-reviewed-credit-whose-training-submit branch October 27, 2026 15:28
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