ada77fd761e3fb3e1bef937bca35ea22940f00a3
11
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c237e4da97 | Measure aggregate cost and fidelity across scarcity scenarios | ||
|
|
b4c3da56e9 |
Four of five runs conserve perfectly; three are ecologically worthless
M4.5 closes M4 by measuring what aggregation costs, and adds no library code except one defect fix the measurement found. One rule is written once and applied at both resolutions. The control is what makes the rest mean anything: with one member per class a class average is that member, so the two runs must agree exactly, and they do, tick by tick, in every channel. A deliberate one-unit drift in the aggregate rule is caught by it, so the instrument is verified rather than assumed. Without it a measured gap would be indistinguishable from a transcription mistake in one of the two runs. The result is reported, not smoothed into a tolerance. At class widths ten and fifty the aggregate population survives ten thousand ticks within 375 parts per thousand on population and 43 on energy. At twenty-five, one hundred and two hundred it dies out entirely while the individual run sustains seventy-five members: a false extinction caused by resolution alone, because a whole class starves the moment its average cannot pay upkeep, where individuals starve a few at a time and the survivors keep the shared per-capita share up. The collapse is not monotone in class width. Twenty-five destroys the population and fifty sustains it. An earlier version of the test asserted that coarser is never better; the measurement refuted it, so the assertion went rather than the widths being chosen to make it hold. The non-monotonicity is asserted now, because it is surprising and because the warning written around it could otherwise become wrong without failing. A tier policy cannot assume degradation worsens smoothly as classes widen, and M4.6 inherits that. Conservation was exact at every tick on both sides of all five runs, including the three that died out. That is the clearest available demonstration of the thing ECOLOGY_MODEL keeps saying: conservation is not ecological evidence. Two flaws in my own experiment were found before any number was believed. The aggregate model had been producing overlapping classes, so the model measured was not one a cohort could represent; newborns now extend the youngest class while it is narrower than the width, and every step is checked to construct a valid Cohort. The first figures were discarded. The comparison also found a real M4.3 defect, which is what a validation milestone is for. plan_advance checked affordability with arrivals added before losses were taken, but emitted the ledger legs outflows-first, so an interval affordable as a whole underflowed leg by leg and was refused at commit. A fifty-tick interval shedding 10,480 against 6,950 held while drawing 13,080 in reproduced it. Arrivals are the first leg now, matching the order the arithmetic was checked in, with a regression and a corrected escrow expectation in an existing test. Release 38/38, analysis, ASan 38/38 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
cabada70c4 |
Account for the interval a model proposes; never clamp it
M4.3 advances a cohort over one declared interval and deliberately does not model one. ECOLOGY_MODEL keeps population maths an experiment and asks for several candidates to be compared, so choosing one here would turn a recommendation into a locked rule. A model proposes fluxes; this checks the declared result is exactly what they imply, for counts and for every inventory channel. Nothing is clamped. A loss larger than what is there refuses the interval and says whether it was the population or the biomass, so a caller can subdivide; subtraction is checked against what is present rather than performed and repaired, so a negative population is never constructed. That is the answer to the named risk: a clamp is how an interval a model could not integrate becomes a plausible result, and how a false extinction arrives. Both clamp mutations are detected by the tests. Counts carry whole members and owed fractions as one quantity, so a population below one member is a number rather than a rounding decision. Biomass has no birth term at all, so a birth cannot bring inventory in and newborns are necessarily funded from what the cohort holds. Immigration draws from a reservoir that already held it, so a late transfer is not new production. Conservation runs through the ledger as one atomic transaction; an interval where nothing moves submits none. Two amendments to M4.1 were forced, not chosen. A cohort records the reservoir backing it, because an advance cannot otherwise know where the inventory is and passing it alongside would let a caller advance one cohort against another's store, which comparing balances cannot detect between equal reserves; the registry now refuses two cohorts sharing one. And a cohort may be vacant, through a separate factory so vacancy stays deliberate, because a decline to exactly zero was otherwise unrepresentable and the only way through would have been the clamp this milestone exists to refuse. A vacant cohort is not an extinction: the record, its genome, its habitat and its provenance remain and it stays installed. Fourteen guards confirmed load-bearing by removing each and rerunning. Two of my own expectations were wrong rather than the code: escrow arithmetic in the migration test, and a dwindling case that shed all but one femtogram while declaring a result holding none. The second surfaced a real tension now recorded in ADR-0038 rather than worked around: a class reduced to a fraction of a member may hold no reserve, because reserve belongs to members and a fraction is not one yet, so that biomass has to go somewhere the same interval. Closure is checked and stability is not, so an interval whose arithmetic balances and whose ecology is nonsense is accepted. The declared age structure is not verified to be what ageing would produce, because that needs the within-class distribution the record discards. Release 36/36, analysis, ASan 36/36 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
0697895e25 |
A cohort's reserve is the whole of its reservoir, not a part of it
Commit proved the destination reservoir existed and that the registry slot was free, but never that the reservoir was empty. Gathering into an occupied reservoir therefore succeeded and mixed inventory the conversion had never sampled into the cohort's backing store: the cohort's recorded reserve understated what backed it, and the surplus belonged to nobody. Reproduced against the unfixed code rather than taken on trust. Gathering into reservoir 5, which the fixture already seeds with seven picojoules, commits and leaves the ledger holding 67 against a cohort recording 60, exactly as reported. A destination holding anything is refused now. The success test also asserts the destination balance equals the installed cohort's reserve, so the equality is checked rather than assumed, and the regression asserts the refusal leaves the balances, the action counter and the registry as they were, then that emptying the reservoir first makes the same plan committable. The check runs after the staleness loop rather than beside the other destination checks. Both run before anything moves, so it is a reporting choice: replaying a committed plan into a fresh registry would be refused by either, and that the members no longer hold what was sampled says more than that the reservoir is occupied. The guard was confirmed load-bearing by removing it alone. An earlier attempt at that reported it as not load-bearing; that result was void and discarded, because a heredoc had mangled the mutation script and nothing was ever mutated. Second time this quirk has produced a false negative in a sweep, and both times the printed output rather than the exit status is what caught it. Release 35/35, analysis, ASan 35/35 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
1a59b63c7a |
Refuse the whole conversion rather than drop the inconvenient member
M4.2 moves individuals into the M4.1 record and does only that: no advance, no materialization back, no transfer between habitats, no persistence. Collapse is two phases over one sample. plan_collapse reads the members once and returns an immutable plan that already carries a validated cohort; commit applies exactly that plan and derives nothing, so replaying a committed sample cannot resample, and a record that would not validate fails during planning rather than after the ledger has moved. A controlled, suspended, dead or unsettled member refuses the whole plan instead of being skipped. Filtering would let a caller obtain a plan by omitting whoever was inconvenient, and the result would be indistinguishable from an honest conversion, which is the adversarial selection the model forbids. Ages are carried into declared classes and a member fitting none refuses the plan, so nobody is quietly moved or dropped for having nowhere to go. Reserves are summed per class and never redistributed, so the distribution M4.1 exists to keep survives the move. Conservation runs through the ledger rather than beside it: one atomic transaction, one leg per member, each moving that member's entire reserve, so the conserved total is unchanged by construction. Dual representation is closed from both ends. A member must be emptied exactly, and a reservoir holding anything other than what was sampled makes the plan stale rather than partly applicable. The destination is proved available before anything moves, so no rejection can strand biomass in a reservoir nothing owns. Reversing that order is detected by the tests, which is the point: the ordering prevents the failure rather than a comment claiming it cannot happen. Two gaps are stated rather than implied covered. This cannot tell whether the members offered were all there were, so completeness is the caller's obligation. And emptying a reservoir is not withdrawing the right to use it, because the ledger has no removal. ReservoirId and Transfer gain the defaulted comparisons every other value type here already has, so a plan's legs can be compared. Additive, and ADR-0037 says so rather than claiming no M1 change. All ten guards were confirmed load-bearing by removing each and rerunning. One of my own expectations was wrong rather than the code: a replayed commit reported stale_plan where I expected destination_occupied. Both are pure checks made before anything moves, so only the diagnosis differed; the destination check runs first now, because "this already happened" says more about a replay. Release 35/35, analysis, ASan 35/35 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
5a4c34a903 |
An epoch cannot order two writes an owner makes inside it
Two defects from review of
|
||
|
|
1c8b292147 |
Keep a distribution, because a mean cannot say who survives
M4.1 defines the tier 2 record and who may act on it, and nothing else: no collapse transaction, no population advance, no materialization, no habitat geometry. Those are M4.2 to M4.4 and each needs its own decision. The named risk for this step is that population averages hide viable outliers, which is a property of the record rather than of the maths applied to it later, so it is answered here. Age classes each carry their own count and their own reserve. A count with a mean reserve cannot tell a provisioned cohort from one where half the members hold nothing, and nothing downstream can recover what that discarded. Within a class members are indistinguishable; that is the declared resolution and a stated loss. No accessor returns a mean, because an average that is easy to reach becomes the authority. Totals are summed from the classes rather than stored beside them, following the archive's rule that a second tally is a thing that can disagree. Lineage is not a field at all: ancestry is resolved from the genome through the archive, so a cohort cannot contradict it or invent parentage from membership. Residuals are integer numerators strictly below one member and are never added to a count. Ownership is enforced rather than described. One record per habitat and genome makes no-inventory-spendable-in-two-tiers unrepresentable instead of forbidden, and replacement is refused under a different worker or an older epoch. That is a single-process invariant; fencing between workers is M7 and M10. The approximation bound is carried and never computed, since carrying a bound is not meeting one. All nine guards were confirmed load-bearing by removing each and rerunning. An earlier sweep reporting none of them load-bearing was wrong and discarded: it wrote to /tmp, which Git Bash and PowerShell resolve differently, so nothing was ever mutated. Release 34/34, analysis, ASan 34/34 and clang-format all ran and passed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
eaf58f2b85 |
Drive the energy cycle with measured ecosystem episodes
Close M2 with a deterministic driver that owns one community and one seeded stream, holds no inventory and emits only the terminal, feeding and reproduction intents the earlier increments already accept. No simulation contract changed to make the cycle run unattended. Two limits shaped the design. Identities are never reused and slots are capped, so one community supports a bounded number of consumer lifetimes and is not a population. No maintenance cost exists, so a consumer that is never eaten never dies, and inventing a starvation rule here would settle a question ENERGY_MODEL leaves open inside a measurement harness. The harness therefore measures many bounded episodes, taking mortality from predation and from a configured lifespan delivered as an ADR-0027 host terminal fact. Lifespan bounds an episode; it is not senescence. The driver must never submit a batch the community rejects, so it probes a discarded copy each tick to size bites against the state feeding will actually see, claims each target for one feeder, and excludes a bitten consumer from acting. A rejected tick is reported as a driver defect rather than absorbed as ecology. Across 64 seeds the suite steps tick by tick, requiring exact conserved totals at every tick and an identical report on replay, and covers both mortality paths, slot exhaustion, tick-limit termination, lineage attribution, episode independence and configuration rejection. evo-sim --ecosystem reports seeded ensembles: 3,000 episodes advanced 1,093,007 ticks, all reaching extinction, with deaths reconciling exactly against founders plus births. That demonstrates arithmetic and turnover, not ecological plausibility; strategy constants are chosen inputs. Native Release, clang-tidy analysis, ASan and format checks pass 11/11; golden d61ad5bf0c928c76 is unchanged. Linux CI has not run yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
d5b4bd068e |
Initial commit: architecture docs and headless engineering proof
Aeternalis Evolution, a custom-engine persistent evolutionary MMO. This first commit establishes the project skeleton: - Architecture and design docs: project vision, system overview, engineering constitution, roadmap, 19 ADRs, and the simulation, world, network, persistence and infrastructure architectures. - Headless engineering proof: deterministic synthetic particles, component lifecycle, explicit PRNG streams, canonical snapshots and restored execution. - Build and tooling: CMake 3.28+ / Ninja presets, C++23 feature check, clang-format and clang-tidy config, format check script, Windows check script, and a Docker build context. - Tests: unit tests, benchmarks, a snapshot fuzz target and CLI integration wiring. No gameplay, renderer, network service or running deployment yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |