Commit Graph
3 Commits
Author SHA1 Message Date
dingoandClaude Opus 5 36ee71cfe9 Decide affordability where composition is known
A construction transition could require more of an element than was
available, because the check compared net mass. A step growing a body
from 13 to 14 femtograms nets one femtogram but acquires a carbon and a
nitrogen while freeing one of other, and released other pays for neither.
Matching totals let one element silently fund another.

Net mass was never the right question, and the layer asking it could not
ask a better one: plan_development has no composition. A single scalar
pool could not carry the answer either, since it cannot say that carbon
is plentiful while nitrogen is not. The environment now states what is
available per ledger channel.

plan_development keeps a total-mass bound, which is sound because net
never exceeds gross, but it is a proposal rather than an authority.
metabolic_budget narrows it to the largest step whose own intake fits
channel by channel, and reports the growth that step actually funds. That
revises ADR-0031 on this point, recorded in both ADRs.

The tests place a single femtogram in each channel in turn and require
that no step needing a different element is funded, that nothing is
acquired beyond what is present, and that the mass-only plan would have
admitted the step; a carbon and a nitrogen together then fund it exactly.
Across six target sizes by seven growth fractions by four stock levels,
every reported intake fits the availability channel by channel and never
exceeds the proposed step. Confirmed to fail with the check removed.

The releasing case moved to a target of 20 femtograms, where the step
occurs at the full rule step rather than depending on a scarce supply
that the corrected plan no longer bounds the same way.

Native Release, clang-tidy analysis, ASan and format checks pass 19/19.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 13:02:44 -04:00
dingoandClaude Opus 5 e0fd4680f6 Make construction reproduce the body it claims to build
Construction composed the mass difference instead of differencing the two
composed bodies. Those are not the same: composing the difference throws
away the rounding the existing body already carries, so the budget summed
to the right total while funding individual channels short or over. At
target mass 1001 growing from 10 to 60 it funded C25 N7 P2 other16,
leaving nitrogen and phosphorus one short each and other two over, so
spending it could not produce the body the same rules derive.

Construction is now the per-channel difference between the composed
bodies, which funds C25 N8 P3 other14 for that case.

That difference can be negative on a channel, because the remainder rule
is not monotone: a body growing from 13 to 14 femtograms sees other fall
from 6 to 5. Construction is therefore a transition with an intake and a
release rather than a single requirement, and the release is a rounding
artifact bounded by a few femtograms, not excretion.

The invariant held + intake - release == reached is asserted per channel
for the reported case, for the releasing case, across six target sizes by
seven growth fractions by four material budgets, and across a forty-step
walk from nothing to full growth where accumulated intake and release are
checked against the whole history. The net of every transition is also
asserted to equal what a plan charges material for. These tests were
confirmed to fail against the previous implementation.

Native Release, clang-tidy analysis, ASan and format checks pass 19/19.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 12:26:40 -04:00
dingoandClaude Opus 5 be71d4f441 Give capability a cost without giving it a multiplier
M3.3 turns a phenotype into the budgets a ledger can hold: body
composition, maintenance, movement, the next construction step, the
per-tick intake limit and the reproduction investment. metabolism is the
single place the genome's description of capability becomes accounting
quantities, so the record itself stays free of those types and M3.1's
boundary is crossed once, explicitly.

The named risk is reintroducing RPG modifiers, where a capability
parameter becomes a flat percentage over every budget. Each budget is
therefore derived from a different phenotype quantity: maintenance from
mass plus membrane upkeep, movement from mass and speed, intake from
surface, construction from the mass a growth step adds, investment from
the body a parent already has. One parameter moves some budgets and not
others, by different amounts. Doubling membrane thickness costs more
matter to build, more energy to hold and more to haul, while leaving
uptake, speed, assimilation and structural mass identical, and the mass
and maintenance ratios differ, so no single multiplier could produce it.
The test asserts that non-uniformity rather than describing it.

Composition is declared per compartment, and membrane is the carbon-rich
one, so a thicker membrane changes what a body is made of and not only
how much. A split assigns the first three channels by share and gives the
remainder to the last, so parts always sum back to the whole and a
derived body can be spent through the ledger without a rounding leak.
That is checked at four awkward masses where every share floors.

processes::consumer_for is the first path from a genome into the M2
fixtures. Opening inventory stays the caller's: a genome says what an
organism can do, never what it holds, and a derived config that invented
an opening balance would create matter. A derived consumer is shown
driving a real feeding tick with the ledger conserving exactly, and a
bite one femtogram past the derived cap refused by the M2.3 contract.

Every budget is asserted as a hand-calculated literal. The constants are
chosen so budgets are of comparable magnitude, which is legibility for
tests and not tuning. No existing fixture reads genomes, and no organism
spends any budget: there is still no starvation, death or repair rule.

Native Release, clang-tidy analysis, ASan and format checks pass 19/19;
every existing golden and fingerprint is unchanged. Linux CI has not run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 11:31:01 -04:00