Round shares down and ages up, so a round trip never pays

M4.4 turns whole members of a cohort back into identified individuals, and does
nothing else: no habitat transfer, no persistence, no resolution-equivalence
claim. Materialization is instantaneous at the cohort's current tick, because
advancing time is M4.3's interval.

The named risk is that re-materialization becomes free healing, and it has two
separable sources. The arithmetic one is closed outright. A drawn member gets its
class share by integer division rounded down, because rounding up would create
biomass, and a class drawn empty hands over everything it held because a class
with no members may keep no reserve. A residual is never drawable, so an expected
density cannot become an individual.

Age is taken as the oldest the class admits. The exact age is unrecoverable, so
the question is only which direction to be wrong in, and every other answer makes
oscillation profitable: a member re-materialized at the bottom of its class is
younger than it was, and repeating that is immortality. Taking the top means a
round trip can only age someone. Both of these are the risk rather than ordinary
validation, and both mutations are detected: rounding the share up, and drawing
the age from the class floor.

The second source is the declared resolution itself and is stated rather than
mitigated. Members inside a class are indistinguishable by construction, so
collapsing a starving member with a well-provisioned one and materializing both
returns two average members, healing the first at the second's expense. The tests
demonstrate both halves instead of only the flattering one: a round trip is exact
when each class holds one member, and a coarse class conserves the total while
averaging the individuals. Conservation of the total is not evidence that any
individual is right, and the mitigation is the caller's choice of classes when it
collapses, not anything this code can recover.

Materialization produces exactly the record a collapse consumes, so the two
compose and are tested against each other rather than described as inverses. The
oscillation test runs twelve cycles and asserts every cycle that the conserved
total never moves, nobody holds more than the richest starting member held, and
nobody is younger than last cycle; it ends by asserting everyone has been pushed
to a class ceiling, which records the cost of the age rule rather than claiming
it away.

Release 37/37, analysis, ASan 37/37 and clang-format all ran and passed here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-24 15:41:49 -04:00
co-authored by Claude Opus 5
parent cabada70c4
commit 380d609f06
10 changed files with 1095 additions and 3 deletions
+35
View File
@@ -227,3 +227,38 @@ structure is supplied by the caller and is not verified to be what ageing would
produce, because ageing across a class boundary needs the within-class
distribution the declared resolution discards. And emigration escrows into a
reservoir nothing settles with, because `TransferPopulation` does not exist.
## Implemented M4.4 materialization
[ADR-0039](../adr/0039-materialize-representatives.md) implements
`PlanMaterialize` and `CommitMaterialize` for one cohort in one process.
`TransferPopulation` remains a contract nothing implements, and no
resolution-equivalence claim is made here.
Representatives are debited cohort shares, as this document requires, and never
anything else. A drawn member receives its class share by integer division rounded
down; rounding up would create biomass. A class drawn empty hands over everything
it held, because a class with no members may keep no reserve. A residual is never
drawable, so an expected fractional density stays distinct from an available
individual.
Age is carried, not reset, in the only direction that is safe when the exact value
is unrecoverable: a member materializes at the oldest age its class admits. Every
other rule lets an adversary who chooses when to convert roll back towards youth,
and repeating that is immortality. A round trip can therefore only age someone, so
oscillation is strictly lossy rather than free. This is a defence, not a model of
ageing, and under repeated conversion it will make a population look older than it
is.
What the declared resolution discards is stated rather than mitigated. Within one
class members are indistinguishable, so collapsing a starving member together with
a well-provisioned one and materializing both returns two average members, healing
the first at the second's expense. Conservation of the total is not evidence that
any individual is right. A round trip is exact when each class holds one member,
and the mitigation available to a caller is to declare narrower classes when it
collapses; nothing here can recover what a coarse class threw away.
A materialized member carries the cohort's genome, its habitat and a fresh
identity, and nothing else. It has no parentage, no history and no condition,
because a cohort never carried them, and none of that may later be invented from a
statistical membership.