9a13e796f1fed393aef466370d48fdcb7cd1abdd
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
14e0c1af5e |
An empty reservoir is not an unowned one
Two defects from review of |
||
|
|
380d609f06 |
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> |