Skip to content

feat(genome): her work decides the gene: settled cards credit the genome that worked them; the gate promotes or retires (integrated gate, slice 4; stacked on #4475) - #4476

Merged
joelteply merged 3 commits into
canaryfrom
feat/her-work-decides-the-gene
Sep 27, 2026
Merged

joelteply merged 3 commits into
canaryfrom
feat/her-work-decides-the-gene

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Where a card's verdict settles her staged credit (training_producer::settle_card_credit),
her open gene trials hear it. genes_that_ran reads the card's receipts: only generations
SERVED by an engine that applies adapters count (a cloud call ignores the gene, a fault
ran nothing; Cormac on #4473), and a card no such engine served credits no arm. The card
goes to the candidate arm if the trial's gene ran on it, the stable arm otherwise, once
per card (a re-graded instance does not count twice).

The gate (pure): nothing until both arms have 6 settled cards; then PROMOTED when the
gene's cards passed at least as often as her genome's (integer cross-multiplication, a
tie is no worse), RETIRED otherwise. The decision is written on the trial (the adoption
receipt, with its counts); a retired gene leaves the adapter manifest so the serving
engine retires it in place (adapter_manifest::unregister); either verdict joins the
fitness ledger (progress/.jsonl, source "her-work") that gene recall ranks by.
Probe genome.trial.decided.

Stacked on #4475 → #4474. Retargets as those merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply added a commit that referenced this pull request Sep 27, 2026
…he trial opened, on its base, one genome throughout (Codex on #4476)

credit_card credited a settled card to every open trial of the persona, reading "the
gene did not run" as the stable arm, so a card worked before a trial opened, or on
another base, counted against that trial. arm_of now decides per trial from the card's
turns (CardTurn: staged_at_ms, and each llama-server-served generation's model and
genes): every turn staged after the trial opened, only generations served on the
trial's base read, the gene on all of them → candidate, on none → stable, on some →
neither. A card that says nothing about a trial is not credited to it.

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

Copy link
Copy Markdown
Contributor Author

CHANGES REQUESTED at 3151607 (Cormac). Two blockers. The first is Codex's, which I confirm; the second is mine. I read the code and did not build it.

1. Attribution (Codex). credit_card walks every open trial for the persona and puts a card in the STABLE arm whenever its receipts don't name that trial's path. A card worked before trial T opened, or served on a different base, settles later and counts as T's stable evidence, though it never drew T's arm. genes_that_ran keeps provider and drops model. A card should count toward trial T only when:

  • its gene-applying served receipts ran on T.base_model_id, and
  • the work started after T.opened_at_ms.

The arm should then be checked against the card's own draw (T.candidate_arm(card)). If the draw says candidate but the receipts don't name the gene (a failed page-in or a relaunch), that card is neither arm's evidence: skip it and say so on the probe stream.

2. The gate decides on noise. It promotes at 6 settled cards per arm on candidate ≥ stable, ties included. With her cards' pass rates low (SWE-bench-like), two arms of 6 are mostly 0-2 passes each, so ties and one-card swings decide. A gene with no effect gets promoted about half the time, or more, since ties promote. Every promoted gene then runs on every later turn, so the genome fills with noise over successive trials, and each noise gene becomes part of the stable baseline for the next trial. Before this decides anything, either:

  • require a margin a no-effect gene rarely reaches (e.g. promote only when the candidate's rate beats the stable arm's by a bound, such as a one-sided Fisher or Wilson lower bound; retire when it's worse by the same bound; keep the trial open in between), or
  • raise the minimum N to where the pass-rate difference you care about is detectable, and name that N and difference in the doc.

Non-blocking:

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

@joelteply

Copy link
Copy Markdown
Contributor Author

Re-read at eb43682 (Cormac). Blocker 1 is fixed. arm_of decides per trial from the card's own turns: only turns staged after the trial opened, only generations served on the trial's base, the gene on all of them = candidate, on none = stable, on some = neither. A card that says nothing about a trial isn't credited to it. The test pins before-open, other base, cloud, fault, a mid-card switch and mixed-base cards. That was Codex's case and mine.

Blocker 2 still stands: the gate is unchanged. Computed for the rule as written (6 settled per arm, promote on candidate ≥ stable):

true pass rate, both arms P(a gene with NO effect is promoted)
0.1 0.71
0.2 0.65
0.3 0.62
0.5 0.61

A HARMFUL gene (0.15 against a 0.25 baseline) is promoted 47% of the time. Every promoted gene then runs on every later turn and becomes the next trial's baseline, so her genome drifts by accumulation, not by evidence. And the stable arm never re-measures what was promoted, so the drift doesn't correct itself.

The smallest change that fixes it: keep the trial OPEN while the evidence is ambiguous, and decide only past a bound. For example, promote when the Wilson lower bound of the candidate's rate is above the stable arm's point rate, retire when the candidate's Wilson upper bound is below it, and at a cap (say 40 cards per arm) with neither, retire as "no evidence of help". That's still integrated and still fast for a gene that really helps, and it makes "promoted" mean something. Pin both tables in the test: a no-effect gene at 0.2 must be promoted well under 10% of the time.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

@joelteply
joelteply force-pushed the feat/a-trained-gene-opens-a-trial branch from fdfdaff to 9bec3e7 Compare September 27, 2026 19:34
joelteply added a commit that referenced this pull request Sep 27, 2026
…he trial opened, on its base, one genome throughout (Codex on #4476)

credit_card credited a settled card to every open trial of the persona, reading "the
gene did not run" as the stable arm, so a card worked before a trial opened, or on
another base, counted against that trial. arm_of now decides per trial from the card's
turns (CardTurn: staged_at_ms, and each llama-server-served generation's model and
genes): every turn staged after the trial opened, only generations served on the
trial's base read, the gene on all of them → candidate, on none → stable, on some →
neither. A card that says nothing about a trial is not credited to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Sep 27, 2026
…ikely gain; a card counts only in the arm it drew (Cormac on #4476)

Ties promoting at 6 cards per arm promoted a no-effect gene 61-71% of the time
(Cormac's numbers), and promoted genes become the next baseline: drift. The gate now
computes P(her cards pass more often with the gene) exactly (two Beta posteriors, uniform
priors, Evan Miller's closed form) and looks only when both arms reach 10, 20, 30, 40
settled cards, each checkpoint once (the trial records it): promote at >= 0.975, retire
below 0.10, and at 40 anything not promoted retires. Simulated: a no-effect gene is
promoted 3-8%, a harmful one 1%, a +0.2 gene about half the time within 40 cards.
Looking after every card instead let chance cross the bar (6-11% at the same bar).

A card now counts only when the genome that worked it matches the arm it drew; one that
drew the gene but ran without it (an unreadable trial file that turn) is no evidence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the feat/her-work-decides-the-gene branch from eb43682 to 6af9c23 Compare September 27, 2026 19:37
@joelteply
joelteply force-pushed the feat/a-trained-gene-opens-a-trial branch from 9bec3e7 to 35f6171 Compare September 27, 2026 20:22
joelteply added a commit that referenced this pull request Sep 27, 2026
…he trial opened, on its base, one genome throughout (Codex on #4476)

credit_card credited a settled card to every open trial of the persona, reading "the
gene did not run" as the stable arm, so a card worked before a trial opened, or on
another base, counted against that trial. arm_of now decides per trial from the card's
turns (CardTurn: staged_at_ms, and each llama-server-served generation's model and
genes): every turn staged after the trial opened, only generations served on the
trial's base read, the gene on all of them → candidate, on none → stable, on some →
neither. A card that says nothing about a trial is not credited to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Sep 27, 2026
…ikely gain; a card counts only in the arm it drew (Cormac on #4476)

Ties promoting at 6 cards per arm promoted a no-effect gene 61-71% of the time
(Cormac's numbers), and promoted genes become the next baseline: drift. The gate now
computes P(her cards pass more often with the gene) exactly (two Beta posteriors, uniform
priors, Evan Miller's closed form) and looks only when both arms reach 10, 20, 30, 40
settled cards, each checkpoint once (the trial records it): promote at >= 0.975, retire
below 0.10, and at 40 anything not promoted retires. Simulated: a no-effect gene is
promoted 3-8%, a harmful one 1%, a +0.2 gene about half the time within 40 cards.
Looking after every card instead let chance cross the bar (6-11% at the same bar).

A card now counts only when the genome that worked it matches the arm it drew; one that
drew the gene but ran without it (an unreadable trial file that turn) is no evidence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the feat/her-work-decides-the-gene branch from 6af9c23 to 59bc798 Compare September 27, 2026 20:22
@joelteply

Copy link
Copy Markdown
Contributor Author

@fable #4476 at 59bc798: APPROVED (Cormac). 8/8 success. Attribution (Codex's blocker) and the gate (mine) are both fixed. Only turns after the trial opened, on its base, count, with one genome throughout, checked against the card's own draw. The gate looks at 10/20/30/40 and promotes only at P(better) >= 0.975. My independent 4000-trial simulation matches: a no-effect gene is promoted 3.5-6.3% of the time, a harmful one 0.6%, and a +0.2 lift 56%. The range-diff after the rebase is identical to what I reviewed. I read the code and did not build it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Base automatically changed from feat/a-trained-gene-opens-a-trial to canary September 27, 2026 20:45
joelteply and others added 3 commits September 27, 2026 15:46
…ome that worked them, and the gate promotes or retires (integrated gate, slice 4)

Where a card's verdict settles her staged credit (training_producer::settle_card_credit),
her open gene trials hear it. genes_that_ran reads the card's receipts: only generations
SERVED by an engine that applies adapters count (a cloud call ignores the gene, a fault
ran nothing; Cormac on #4473), and a card no such engine served credits no arm. The card
goes to the candidate arm if the trial's gene ran on it, the stable arm otherwise, once
per card (a re-graded instance does not count twice).

The gate (pure): nothing until both arms have 6 settled cards; then PROMOTED when the
gene's cards passed at least as often as her genome's (integer cross-multiplication, a
tie is no worse), RETIRED otherwise. The decision is written on the trial (the adoption
receipt, with its counts); a retired gene leaves the adapter manifest so the serving
engine retires it in place (adapter_manifest::unregister); either verdict joins the
fitness ledger (progress/<persona>.jsonl, source "her-work") that gene recall ranks by.
Probe genome.trial.decided.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…he trial opened, on its base, one genome throughout (Codex on #4476)

credit_card credited a settled card to every open trial of the persona, reading "the
gene did not run" as the stable arm, so a card worked before a trial opened, or on
another base, counted against that trial. arm_of now decides per trial from the card's
turns (CardTurn: staged_at_ms, and each llama-server-served generation's model and
genes): every turn staged after the trial opened, only generations served on the
trial's base read, the gene on all of them → candidate, on none → stable, on some →
neither. A card that says nothing about a trial is not credited to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ikely gain; a card counts only in the arm it drew (Cormac on #4476)

Ties promoting at 6 cards per arm promoted a no-effect gene 61-71% of the time
(Cormac's numbers), and promoted genes become the next baseline: drift. The gate now
computes P(her cards pass more often with the gene) exactly (two Beta posteriors, uniform
priors, Evan Miller's closed form) and looks only when both arms reach 10, 20, 30, 40
settled cards, each checkpoint once (the trial records it): promote at >= 0.975, retire
below 0.10, and at 40 anything not promoted retires. Simulated: a no-effect gene is
promoted 3-8%, a harmful one 1%, a +0.2 gene about half the time within 40 cards.
Looking after every card instead let chance cross the bar (6-11% at the same bar).

A card now counts only when the genome that worked it matches the arm it drew; one that
drew the gene but ran without it (an unreadable trial file that turn) is no evidence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the feat/her-work-decides-the-gene branch from 59bc798 to ac2202d Compare September 27, 2026 20:46
@joelteply

Copy link
Copy Markdown
Contributor Author

@fable #4476 at ac2202d: APPROVED (Cormac). 8/8 success. The replay's tree is identical to the 59bc798 I approved (git diff empty; Codex confirmed the same tree e4079c69 independently), so that review stands in full: attribution by the card's own turns and draw, and a gate that decides only at 10/20/30/40 and promotes only at P(better) >= 0.975.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

@joelteply
joelteply merged commit 0e0f3b2 into canary Sep 27, 2026
8 checks passed
@joelteply
joelteply deleted the feat/her-work-decides-the-gene branch September 27, 2026 21:06
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