Files
dingoandClaude Opus 5.5 f77956e579 Send the owner its outstanding mutation offer over v10
Session protocol v10 adds type 26: the life's earned offer with its unranked
candidates in operator order and each successor's capability value,
maintenance and total mass. The cellular bridge sends it when the offer or the
owner's session changes and clears a consumed offer; the client keeps the
latest one for the maintainer's choice UI (ADR-0121, 11.4d server half).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:07:50 -04:00

98 lines
7.0 KiB
Markdown

# M11.4: Apply earned mutation choices through development
M11.4 connects the accepted M3 seeded candidate generator and immutable lineage
archive to a living player organism. The game rule authority is ADR-0098; the
first funded transition is ADR-0118. Candidate counts, event cadence, eligibility
thresholds and resource targets remain trial values until informed by the 11.3
probe and later repeated-life tests. No class tree, candidate ranking or automatic
wildlife mutation is introduced.
## Boundaries
Read PROJECT_VISION, ENGINEERING_CONSTITUTION, GENOME_MODEL,
ADR-0030 through ADR-0034, ADR-0098, ADR-0108 through
ADR-0110 and the cellular checkpoint schema before changing the owner. Preserve
the M3 pure generator's seed/context rules and genome v1/v2 compatibility. The
headless biology library must not acquire transport, UI, database or Kubernetes
dependencies. Every accepted choice must be one durable action whose outcome,
successor genome, body transfer and life revision recover together.
The 11.3 hands-on probe is now executable in the engineering client. Its human
notes remain the design input for tuning mutation timing and eligibility. The
maintainer has explicitly authorized continuing M11 work while those notes are
pending; no gameplay balance is treated as final by this plan.
## Segments
| Segment | Affected modules | Acceptance evidence |
|---|---|---|
| 11.4a: funded transition proposal | Biology mutation/development public API and implementation; mutation tests; ADR-0118 | Deterministic selection revalidation; exact per-channel body/reserve closure; construction energy charge; insufficient-channel refusal with no partial result; `NDEBUG` tests |
| 11.4b: earned eligibility and offer identity | Cellular life state, tick intake accounting, offer context, profile-4 v2 codec/schema | One offer per 60 seconds of retained fed energy (trial), requesting up to three unranked candidates; exact retry returns the same offer; mismatched offer identity or changed genome/context refuses stale selection; ordinary ticks do not expire an offer; no free rerolls; restore preserves eligibility and offer identity |
| 11.4c: durable mutation publication | Cellular host/session, SQL migration/action parser, replay, crash tests | One action atomically publishes debit, genome successor, organism revision, archive and result; duplicate retry is exact; uncertain commit and process restart have one outcome |
| 11.4d: player choice and review | Engineering client trial UI, replication, playtest notes | Owner sees unranked candidates and actual tradeoffs; choice/refusal/recovery is readable; playtest verifies the choice follows useful feeding rather than appearing at spawn |
## Required checks
- All current M3 mutation and archive tests remain unchanged and pass.
- Test equal inputs and retry after process restore, wrong/stale offers,
unaffordable candidates in each individual channel, overflow, and exact body +
reserve conservation.
- Exercise two candidates that trade construction, maintenance, movement,
ingestion and membrane defense without rendering a ranked score.
- Profile-4 PostgreSQL publication, crash/restart and Linux CI evidence are
required before claiming a live mutation path.
- Record the exploratory 11.3 probe feedback and revisit tuning before widening
candidate options or setting an event cadence.
## Progress
- 11.4a implementation is complete: `fund_mutation` returns a detached,
channel-conserving transition under ADR-0118. CI run 275 passed all 10 jobs
on the current branch, including the configured checks and PostgreSQL jobs.
- The ADR-0108 profile-version conflict is resolved by
[ADR-0119](../adr/0119-cellular-profile-version-migration.md): an explicit,
leased, no-tick v1-to-v2 representation migration initializes mutation state
empty and preserves the complete existing region closure. [ADR-0120](../adr/0120-cellular-mutation-eligibility-trial.md)
defines the first versioned eligibility/offer trial. Their owner and persistence
implementation is the current 11.4b work after the 11.4a CI gate.
- 11.4b implementation now includes version-2 owner snapshots, fed-energy
eligibility, stable offers, manifest/schema admission, the no-tick migration
publisher, immutable migration record, and migration-aware recovery/replay.
Runs 274 and 275 later passed all 10 jobs on the current branch, superseding
the unavailable result from run 261 and validating these changes in CI.
- [ADR-0122](../adr/0122-append-only-cellular-genome-revisions.md) resolves the
archive/current-genome conflict with an append-only revision chain, preserving
birth-genome history, and a cellular-v3 no-tick migration. [ADR-0121](../adr/0121-durable-cellular-mutation-selection.md)
then defines selection and atomic publication. Affected modules are biology
archive API/codec, cellular life owner/snapshot, checkpoint version
bundle/migration, replay trace, SQL action publication, host/session and
crash/retry tests. The archive API/codec, owner v3 snapshot and explicit
no-tick v2-to-v3 manifest/SQL migration are implemented. The current 11.4c
slice adds schema v29's fenced, idempotent mutation reservation and
lease-fenced pending-action recovery API. Selection is still not admitted by
the region host: exact offers, replayed action records, atomic
biology/archive publication and crash recovery remain. No 11.4c or live
mutation path is claimed complete until those pieces pass CI (see
[validation log](VALIDATION.md)).
- 11.4c-1 (ADR-0121, schema v35): a checkpoint whose trace carries mutation
selections publishes through `publish_cellular_mutation_checkpoint` with its
canonical 64-byte mutation block and one result byte per choice. SQL checks
block order, one reserved choice of this region per trace selection (same
tick, life, offer, operator and successor identity), binds each to the commit
with its result, refuses another commit's binding and checks exact retries;
the four-argument publisher now refuses traces with selections. C++
publication takes its results from its own replay, and recovery reloads the
bound choices and requires the replay's results to equal them. Host and
session admission (11.4c-2) remain.
- 11.4c-2 (ADR-0121 implementation notes): the region host admits a v10 choice
of the exact outstanding offer, reserves it for the next tick and publishes
it with that tick; the owner receives the receipt and final outcome over the
session. SQL now refuses a checkpoint that skips a reserved choice, and the
host reloads pending reservations after uncertainty or restart. 11.4c is
complete once CI passes; 11.4d's server half (offer replication to the
owner) is next, and the choice UI stays with the maintainer.- 11.4d server half: v10 type 26 sends the owner its outstanding offer, with
unranked candidates in operator order and each successor's capability value,
maintenance and total mass, when the offer or the session changes; the
engineering client keeps the latest offer. The choice and review UI and the
11.4d playtest notes remain with the maintainer.