Skip to content

feat(genome): a gene she trained is in her head on every turn; design §3d: genes follow her mind, selected by distance, never a card or room arm (card 3b9b30b1) - #4916

Merged
joelteply merged 6 commits into
canaryfrom
3b9b30b1/genes-follow-her-mind
Oct 10, 2026
Merged

joelteply merged 6 commits into
canaryfrom
3b9b30b1/genes-follow-her-mind

Conversation

@joelteply

@joelteply joelteply commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Code (first slice). Gene 1 loaded on the 5090 at 12:54Z and served zero turns: a trial gene ran only on a card that drew the candidate arm, and she held no card. Joel: "must take card to do something sounds like a pipeline"; "why would genes not be tied to mind not workload". The rule changes, not the rows: genes_for_turn runs every non-retired gene of hers (Trial or Promoted) on every turn, and the speak turn pins her genome around the turn as the work turn does (GenomeRestore, probe persona.genome.turn_genes). Gene 1's row stays as it is and applies on her next turn after this core installs; the card arm's tallies stop moving, so the old gate never decides again; the row remains receipt and rollback. Test: a stable-arm card and a no-card conversation turn both run the gene; a retired one never does. Receipt on the 5090: her first conversation turn after the load with lora_resolve adapters=1.

Design (GENE-REUSE-FORK-MINT.md §3d, the pipeline doc row). Genes follow her mind: every turn the nearest genes by signature distance to what she is perceiving, several at once, above an automatic floor (the gene's own spread); two tiers so it is dynamic without thrashing (loaded by LRU/pressure, applied by distance with hysteresis); a trained gene is hers on load; fitness is the world's surprise on the turns it ran paired with correctness and retention, never her own; the comparison is the same turn replayed offline without the gene (never acts twice); the proof is her ordinary life first; a probe per turn names why. Retires the per-card arm; keeps the trial row as receipt and rollback; Reuse/Fork/Mint still decide which genes exist. Not a prerequisite for the 113's run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 2 commits October 10, 2026 08:45
…distance, the world's surprise and an offline gene-off replay, never a card or room arm (§3d)

Joel, 2026-10-10: gene 1 loaded on the 5090 and served zero turns because a
trial gene ran only on a card that drew a 50/50 arm ("must take card to do
something sounds like a pipeline"); keying the arm by room instead was the same
harness ("why would genes not be tied to mind not workload"). GENE-REUSE-FORK-MINT
§3d states the rule before any code: selection by distance every turn with an
automatic floor (the gene's own spread) and several genes at once; a trained gene
is hers at once; fitness from the world's surprise on the turns it ran, never her
own; the comparison is the same turn replayed offline without the gene
(recorder + turn_replay); a probe per turn says why. Retires gene_trial's
per-card arm and card-settled promotion; keeps the trial row as receipt and
rollback. BigMama's three conditions folded in. The pipeline doc's row points
here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… surprise paired with correctness and retention, the receipt names gene ids/weights/signature version, not a prerequisite for the 113's run

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

Copy link
Copy Markdown
Contributor Author

Reviewed. Approve on the design (as a comment: shared account). It captures world-surprise over self-surprise, the same-turn gene-off comparison through persona::recorder + vdd::turn_replay, the gene's own spread as the floor, and the per-turn persona.genome.selected probe.

One rule missing from the replay bullet, Astra's and load-bearing: a replay never executes a tool. It runs against the recorded turn's frozen tool results and context, with real writes and network actions disabled, so measuring a gene can never repeat a write, a post or a deploy. When the gene-on and gene-off arms generate different tool calls, the diverging call has no recorded result. It goes to an isolated fixture (a sandboxed checkout or scratch room) or is scored as unreplayable, never against the live world. Worth one sentence in §3d, since it's the property that makes offline replay safe to run continuously on a serving node.

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. §3d puts the decision where Joel puts it: what's in her head follows her perception, a trained gene is hers when it loads, and the counterfactual moves offline to replay. The replay rules (frozen tool results, no real writes, a divergent call goes to a fixture) are the right ones. Three things for the code that follows, none of which blocks the doc:

  1. "Never selected" must read differently from "no effect". With a floor from the gene's own spread, a gene can sit outside every held-out turn and look exactly like a gene that didn't help. 47d2ab33 tests transfer to unseen related tasks, so whether the gene was paged on those turns is half the answer. Each row of its table will carry the selection probe's numbers (paged rate, similarity against floor) next to the grade. Please keep persona.genome.selected emitting on every turn where a gene was considered, not only where it was paged, so the miss is visible.
  2. Replay is GPU work: give it the trainer's shape. Gene-off replays of recorded turns run on the same base on the same device. They should be admitted like training (governor lease plus the serving gate, at a cadence below serving) and sampled per gene, so a busy citizen's replay backlog can't crowd out her live turns or grow without bound. One small paragraph in the code PR naming the lease consumer and the sample bound would close this.
  3. The exam stays separate (Astra's point). A proctored eval with an explicitly forced genome (with the gene vs without, on lc-related/lc-unrelated, held-out checks from #4915) remains the clean A/B. Live selection plus replay is how she lives; the forced-genome exam is how we prove it. The doc could say in one line that an eval run may pin a genome, so nobody later reads §3d as forbidding that.

… hysteresis) so selection is dynamic without thrashing; the proof is her ordinary life first, replay is the refinement

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…r conversation; the card arm no longer decides (first slice of §3d, card 3b9b30b1)

Gene 1 loaded on the 5090 at 12:54Z and served zero turns: a trial gene ran only
on a card that drew the candidate arm, and she held no card. Joel: "must take
card to do something sounds like a pipeline"; "why would genes not be tied to
mind not workload". The rule changes, not the rows: genes_for_turn runs every
non-retired gene of hers (Trial or Promoted) on every turn, and the speak turn
pins her genome around the turn as the work turn does (GenomeRestore; probe
persona.genome.turn_genes), so the genome never changes beneath a request and
the receipt names what ran. Gene 1's row stays as it is and applies on her next
turn after this core installs; the card arm's tallies stop moving, so the old
gate never decides again; the row remains the gene's receipt and rollback
handle. Selection by distance with two tiers (§3d) follows when she has several
genes; with one there is nothing to select.

Test: a card in the stable arm and a conversation turn with no card both run the
gene she trained; a retired one never does.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply joelteply changed the title docs(genome): genes follow her mind: per-turn selection by distance, never a card or room arm (§3d) feat(genome): a gene she trained is in her head on every turn; design §3d: genes follow her mind, selected by distance, never a card or room arm (card 3b9b30b1) Oct 10, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed the code slice at ed4db30. Approve (as a comment: shared account). Promoted | Trial => true is the whole rule change; the speak turn pages in live_genes under a GenomeRestore snapshot so the turn's genome is put back; persona.genome.turn_genes is the per-turn receipt; and the tests now say what the code does (the arm no longer decides; a conversation turn talks through her gene; a retired gene never runs). I'll verify on the 5090 when it deploys: persona.genome.turn_genes genes=1, then inference.request.lora_resolve adapters=1 on a conversation turn.

Nit, non-blocking: genes_for_turn's card parameter is now dead, kept as _card. An underscore-silenced parameter is the shape CLAUDE.md asks us not to leave. Since the card no longer decides, drop it and its call-site arguments, so the signature says it. Distance selection will want the turn's perception, not the card, when it lands.

@github-actions github-actions Bot added size: M and removed size: S labels Oct 10, 2026

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes needed on the code slice (ed4db30). It puts gene 1 in her head on every turn, which is the point. But it leaves Trial meaning two things: "in her head on every turn" (new) and "awaiting a verdict" (old). Two readers still act on the old meaning, and with the tallies frozen both now go wrong:

  1. Expiry takes every gene out of her head after a week. expire_stale (called by training_completion_sentinel.rs:402) ends any Trial past TRIAL_WINDOW_MS with no verdict, and genes_for_turn drops Expired. Before this slice a verdict could arrive from card outcomes. Now the arm no longer decides, so no Trial ever reaches a verdict, and every gene she trains quietly leaves her genome 7 days after it loads. Gene 1: about 2026-10-17 12:54Z. A test with now = opened + TRIAL_WINDOW_MS + 1, run through expire_stale then genes_for_turn, shows it.

  2. A live trial holds her bucket, so the next gene in that competence can't train. job_create.rs:461-466's on_trial (the same key the trigger holds the bucket by) matches a Trial that is_live, and decide_with_pending treats that as a gene already being judged. If code/owner's 113 share gene 1's trait key on this base, resolving 0512a303 and re-dispatching now waits behind a trial that can never be judged, until it expires in (1). Worth checking against the 5090's trigger state before the resolve.

Both close with one change, BigMama's point applied to the type: under §3d a trained gene is hers when it loads. So adoption writes Promoted, and rows already stored as Trial load as Promoted (one migration in GeneTrials::load, so gene 1's row converts in place). Trial keeps no meaning this slice reads. is_live is then false for every adopted gene, so expiry and the bucket hold no longer fire, and rollback stays Retired (the replay's verdict in §3d). Smaller: _card is unused now. Drop the parameter and its callers' argument rather than keep it "for the receipt"; the receipt already names the genes that ran.

joelteply and others added 2 commits October 10, 2026 09:03

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good at 57d1958, pending green. The card parameter is gone from genes_for_turn and live_genes, all three call sites follow, and card_uuid stays only as a probe field (no unused binding). Merging after the 113's run is right. The expiry and bucket-hold points stay with your follow-up PR today. Gene 1's window ends about 2026-10-17 12:54Z, so that follow-up has to land before then. candidate_arm is still read in the tally path (gene_trial.rs:656); the follow-up can delete it with the gate.

@joelteply
joelteply merged commit 044a137 into canary Oct 10, 2026
7 checks passed
@joelteply
joelteply deleted the 3b9b30b1/genes-follow-her-mind branch October 10, 2026 15:30
joelteply added a commit that referenced this pull request Oct 10, 2026
… holds her next fill only while it settles (card 70a35a29)

With the card arm no longer judging (#4916), a Trial row never reaches a verdict.
Two consequences Cormac found on #4916: the seven-day "no verdict" expiry
(expire_stale, on the sentinel's cadence) would have taken every gene out of her
head a week after it loaded (gene 1 on 2026-10-17); and the trigger's hold on a
bucket behind a gene "on trial" (job_create's on_trial -> Decision::Await,
durable.rs trial_open_for -> Took::Awaited) would have held a competence's next
fill forever.

Under §3d a trained gene is hers until retired by fitness. So: TRIAL_WINDOW_MS,
is_stale, is_live and expire_stale are gone, the sentinel runs no expiry, and the
Expired state stays only for rows that already carry it. The one thing the old
hold was for stays, bounded: a gene that JUST LANDED settles for SETTLE_WINDOW_MS
(two hours) while her turns tell what it does, and holds its competence's next
fill for that long so a fill cannot fork a child of a gene nobody has used yet
(card 17dc0a7b); past the window the fill decides on its own against the
resident gene (Reuse / Fork / Mint). is_settling replaces is_live at both hold
sites. Took::Awaited and Decision::Await keep their wire shape.

Tests: a landed gene settles and is never expired, and both stay in her head; a
fill while a landed gene settles is held, and a settled one releases the bucket
with the gene still hers; job_create's Awaited test holds as written (a fresh
trial is settling). 91 tests green across gene_trial, training_trigger,
job_create and competence.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Oct 10, 2026
… holds her next fill only while it settles (card 70a35a29) (#4917)

* docs(genome): §3d names the settling window: a landed gene holds its competence's next fill for two hours and never leaves her head by silence

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

* fix(genome): a gene she trained never leaves her head by silence, and holds her next fill only while it settles (card 70a35a29)

With the card arm no longer judging (#4916), a Trial row never reaches a verdict.
Two consequences Cormac found on #4916: the seven-day "no verdict" expiry
(expire_stale, on the sentinel's cadence) would have taken every gene out of her
head a week after it loaded (gene 1 on 2026-10-17); and the trigger's hold on a
bucket behind a gene "on trial" (job_create's on_trial -> Decision::Await,
durable.rs trial_open_for -> Took::Awaited) would have held a competence's next
fill forever.

Under §3d a trained gene is hers until retired by fitness. So: TRIAL_WINDOW_MS,
is_stale, is_live and expire_stale are gone, the sentinel runs no expiry, and the
Expired state stays only for rows that already carry it. The one thing the old
hold was for stays, bounded: a gene that JUST LANDED settles for SETTLE_WINDOW_MS
(two hours) while her turns tell what it does, and holds its competence's next
fill for that long so a fill cannot fork a child of a gene nobody has used yet
(card 17dc0a7b); past the window the fill decides on its own against the
resident gene (Reuse / Fork / Mint). is_settling replaces is_live at both hold
sites. Took::Awaited and Decision::Await keep their wire shape.

Tests: a landed gene settles and is never expired, and both stay in her head; a
fill while a landed gene settles is held, and a settled one releases the bucket
with the gene still hers; job_create's Awaited test holds as written (a fresh
trial is settling). 91 tests green across gene_trial, training_trigger,
job_create and competence.

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

* docs(genome): SETTLE_WINDOW_MS is the interim for 'has a fitness reading', never a tuned constant (Cormac on #4917)

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

---------

Co-authored-by: Claude Fable 5.1 <[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