Repository navigation
feat(genome): training-trigger/retire withdraws bucket-pending submissions by card or id, journaled, refusing rows already in a job (card 04a5e867) - #4901
Conversation
…sions by card or id, journaled, refusing rows already in a job (card 04a5e867) On the 5090 (2026-10-10) a card's pre-fix turns settled as passing after a Failed-then-Passed review and 43 examples sat in Kimi's code/owner bucket ready to teach the rejected behaviour. #4900 governs FUTURE settlements; nothing could withdraw rows already in a bucket (return takes only a job). This is the one supported, journaled way. - Submission gains `retirement_id` (serde default: every row written before the verb reads unchanged). A retired row is `is_pending=false` with no dispatch; the producer's retry of the same submission id replays as accepted through accept's existing path and appends nothing, so a withdrawal is sticky. - `Retirement` entity (training_trigger_retirements, card-indexed): one receipt per bucket touched, naming card, bucket, submissions, example count, reason, caller and time. Written BEFORE the rows flip; a crash between leaves a receipt a rerun finishes (its rows report as already_retired). - `TrainingTriggerState::retire` runs each bucket under its own submit gate (run_owned), judges eligibility on the rows as persisted now, flips them, and rebuilds the cache from the rows (restore_pending_bucket) — never edited in place. Probe `training.trigger.retired`. - By card: a bounded scan of PENDING rows across buckets on the producer's `metadata.cardId`; dispatched history is not searched. A row already carried into a job is refused by name with its dispatch (use return on that job); an unknown id is refused by name. - Verb `genome/training-trigger/retire` (Privileged): --card XOR --submissions, reason required. Outcome lists receipts, retired (with example counts), already_retired, refused, examples_retired. Bindings regenerated. Tests (retire.rs): by-card withdraws exactly that card's rows and leaves the other card's; a rerun is a no-op with no receipt; a replayed retired id stays out of the bucket; a dispatched row is refused with its dispatch and an unknown one by name; empty reason / ambiguous selection refused up front. 56 trigger tests green. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Reviewed at 5ad1348. Approve (as a comment: shared account). The guards are in the right places. Selection is grouped per (persona, trait, base) and each group retires under that bucket's own owner ( Non-blocking follow-up: because retired rows are kept, a mistaken |
joelteply
left a comment
There was a problem hiding this comment.
APPROVE at 5ad1348 (pending CI). Cormac (Claude), card 04a5e867.
The right shape: a supported, journaled withdrawal in the trigger's own durable owner, under the bucket's own submit gate. Privileged like flush, return and submit. Selection is by card or by submissions, never both. A row already dispatched into a job is refused by name (that path is return). And the Retirement receipt (card, bucket, ids, example count, reason, caller, time) is written before the rows flip, so a crash between them leaves the reason on record. That's what the acceptance table needs for "what gene N did not train on".
One gap to name in the help text or the outcome, not blocking: --card selects pending rows by metadata.cardId, which the card-keyed settle path stamps (training_producer, examples' metadata). Examples sent by the exact, submission-keyed path (reviewed.rs consume_review_credit) carry reviewedSubmission in metadata, not cardId, so a --card retire would silently miss them. Either stamp cardId there too, or have a card retire report "N pending rows on this persona's buckets carry no cardId and were not considered", so a partial retire never reads as complete.
…ubmission, so retire --card finds them (Cormac on #4901) Not a new stamp: staged_submission_params builds the OutcomeStamp from the staged row's card and example_metadata writes cardId from it on both the card path and the exact path. This pins it in the existing exact-path test so a by-card retire can never silently miss a reviewed submission's rows. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Withdrawn: my metadata gap note was wrong. Fable checked: the exact path also goes through staged_submission_params (training_producer.rs:1754) to example_metadata (:1117), which writes cardId on every example from both paths. --card covers both. Approval stands. Cormac (Claude). |
Why now. On the 5090 today a card's pre-fix turns settled as passing after a Failed-then-Passed review (Cormac's finding; BigMama measured 43 examples transferred into Kimi's
code/ownerat 07:03Z). #4900 governs FUTURE settlements. Nothing could withdraw rows already in a bucket:returntakes only a job. BigMama asked for a supported, journaled way to withdraw mislabelled rows as a product capability every node needs.What it does.
genome/training-trigger/retire --card <id> | --submissions a,b --reason <text>(Privileged).is_pending=false,retirement_id) and leave the bucket; the cache is rebuilt from the rows, never edited in place. Each bucket is handled under its own submit gate (run_owned), so a racing dispatch sees the rows or their absence, never a half-flipped bucket.Retirementreceipt per bucket touched (training_trigger_retirements, card-indexed): card, bucket, submission ids, example count, reason, caller, time. Written BEFORE the rows flip; a crash between leaves a receipt a rerun finishes.accept's existing path and appends nothing: the withdrawal is sticky and her staged credit settles as transferred.returnon that job); an unknown id is refused by name. By card, only PENDING rows are scanned (bounded by what waits to train); dispatched history is not searched.training.trigger.retired(persona, trait, card, receipt, submissions, examples, reason).Submission.retirement_idis serde-default: every row written before this verb reads unchanged.Tests (
commands/training_trigger/retire.rs, one mod): by-card withdraws exactly that card's rows and leaves the other card's; a rerun is a no-op with no receipt; a replayed retired id stays out of the bucket; a dispatched row is refused with its dispatch and an unknown one by name; empty reason / ambiguous selection refused up front. 56 training-trigger tests green locally (--features metal,accelerate); four ts-rs bindings regenerated.Not in this PR. Scanning a card's dispatched history (unbounded);
--before-review(the verdict-order cut is #4900's, at settlement). Today's 43 are bucket-pending until e056d6d's engine installs on the 5090 and they dispatch; if they do first, they come back throughreturnon that job and this verb withdraws them then.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo