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:
@@ -1134,3 +1134,61 @@ The proof golden `d61ad5bf0c928c76`, the ecosystem fingerprint
|
||||
genome fixture are unchanged, and the other 33 tests pass untouched. No deployment
|
||||
manifest or image pin changed. Linux validation is pending; no Gitea result is
|
||||
claimed since `b01a824`.
|
||||
|
||||
## M4.4 materialization
|
||||
|
||||
Executed on this Windows host (2026-09-24): Release configure, build and `ctest`
|
||||
37/37; the analysis preset (clang-tidy 19, warnings as errors) built clean; the
|
||||
ASan preset configured, built and ran 37/37; `clang-format` 19.1.5 reported no
|
||||
violations. All four checks ran and passed on the committed tree. No Clang or GCC
|
||||
compile happens on this host, so Linux CI remains the first such result.
|
||||
|
||||
`evo-materialize-tests` covers ten properties: that a drawn member receives the
|
||||
floor share while the rounding remainder stays with the class, that a class drawn
|
||||
empty hands over everything it held, that neither a residual nor a member that is
|
||||
not there can be drawn, that taking everyone leaves a vacant record rather than an
|
||||
extinction, that ages come from the top of a class and are stable when regathered,
|
||||
that a round trip is exact at one member per class, that a coarse class conserves
|
||||
the total while smoothing individuals, that repeated oscillation never pays, that
|
||||
malformed draws and stale views are refused without changing anything, and that a
|
||||
moved-from plan is whole.
|
||||
|
||||
The oscillation test runs twelve collapse and materialize cycles over three
|
||||
members of unequal reserve and asserts three things every cycle: the ledger's
|
||||
conserved total never moves, no member ever holds more than the largest starting
|
||||
member held, and no member is younger than the corresponding member of the
|
||||
previous cycle. Those three together are what stops a round trip being a way to
|
||||
heal or to reset age. It also ends by asserting every member has been pushed to a
|
||||
class ceiling, which records the cost of the conservative age rule rather than
|
||||
leaving it as a claim.
|
||||
|
||||
Eleven guards were confirmed load-bearing by removing each in turn and rerunning.
|
||||
Two of them are the named risk rather than ordinary validation, and both are
|
||||
detected: rounding the share up instead of down, which creates biomass, and
|
||||
drawing ages from the bottom of the class instead of the top, which returns
|
||||
members younger than they were and makes oscillation profitable.
|
||||
|
||||
The free-healing risk has two sources and only one is closed. The arithmetic
|
||||
source is prevented outright and tested. The other is the declared resolution
|
||||
itself: within a class members are indistinguishable, so a coarse class heals a
|
||||
starving member at a well-provisioned member's expense while conserving the total
|
||||
exactly. That is not fixable by accounting and is asserted rather than avoided,
|
||||
with a companion test showing a round trip is exact when each class holds one
|
||||
member. Reading conservation of the total as evidence that any individual is right
|
||||
would be a mistake this pair of tests exists to prevent.
|
||||
|
||||
Coverage limits. Materialization is not claimed to be the inverse of collapse and
|
||||
no test asserts that it is beyond the one-member-per-class case. Nothing checks
|
||||
that a proposed draw is ecologically sensible. A full draw yields at most one unit
|
||||
per member more than a partial one, which is an ordering artifact bounded by the
|
||||
class count and is not separately tested at every count. Injury, fertility and
|
||||
incubation are not reconstructed because a cohort never carried them. Ownership
|
||||
remains a single-process invariant, emigration escrow is still unsettled, and
|
||||
nothing is serialized. The overflow and ledger-failure branches are reachable only
|
||||
past bounds the tests do not build.
|
||||
|
||||
No existing behaviour changed. The proof golden `d61ad5bf0c928c76`, the ecosystem
|
||||
fingerprint `2cd4a15f9fbe9949`, the ensemble fingerprint `5ec59d390909b526` and
|
||||
the frozen genome fixture are unchanged, and the other 36 tests pass untouched. No
|
||||
deployment manifest or image pin changed. Linux validation is pending; no Gitea
|
||||
result is claimed since `b01a824`.
|
||||
|
||||
Reference in New Issue
Block a user