Stop calling the end of watching a death
Three defects from review of 89ad95b.
An organism still alive when an episode stopped was recorded dead. A one-tick
run reported no extinctions while writing terminal records for founders that had
not died, and their watched time was added to the same total as completed
lifetimes. Observation ending is a fact about the run, not about the organism,
and ADR-0034 makes a recorded death terminal, so there was nothing to be
terminal about. Survivors stay living now and are counted apart, with their
watched time as the lower bound it is; lived_ticks and observed_ticks answer
different questions and are never summed together.
A genome without the reproduction capability derives a zero investment, which
the driver refused outright, so seeds 10, 12 and 15 failed the whole run.
Filtering those variants out before sampling would have been the worse repair:
the measured set would then be the fertile subset a guard approved of, and being
unable to reproduce is a result rather than grounds for exclusion. The driver
runs such a strategy and proposes no birth for it. ADR-0029 is amended rather
than quietly contradicted.
A half's thermal shortfall was assigned where it was documented as a total, so
two episodes at 15,000 reported 15,000.
Only configurations the driver already rejected behave differently, so the M2.6
pin 2cd4a15f9fbe9949 was checked rather than assumed and still holds. The
ensemble pin moved because the reported facts changed, not to pass a test; the
reason sits beside it. Each fix was confirmed load-bearing by reverting it alone.
Release 33/33, analysis, ASan 33/33 and clang-format all ran and passed here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -214,18 +214,25 @@ void invalid_configuration_is_rejected() {
|
||||
auto oversized = config;
|
||||
oversized.capacity = static_cast<std::uint32_t>(max_consumers);
|
||||
CHECK(!EcosystemEpisode::create(oversized, founders, 1));
|
||||
for (auto broken : {0U, 1U, 2U}) {
|
||||
for (auto broken : {0U, 1U}) {
|
||||
auto invalid = founders[0];
|
||||
if (broken == 0) {
|
||||
invalid.lifespan = 0;
|
||||
} else if (broken == 1) {
|
||||
invalid.investment = {};
|
||||
} else {
|
||||
invalid.assimilation_per_thousand = 1001;
|
||||
}
|
||||
const std::array rejected{invalid};
|
||||
CHECK(!EcosystemEpisode::create(config, rejected, 1));
|
||||
}
|
||||
// A strategy with nothing to invest does not reproduce, which is a genome a
|
||||
// mutation can produce. It is run rather than refused, and it leaves nothing.
|
||||
auto barren = founders[0];
|
||||
barren.investment = {};
|
||||
const std::array sterile{barren};
|
||||
auto episode = EcosystemEpisode::create(config, sterile, 1);
|
||||
CHECK(episode);
|
||||
const auto summary = episode->run();
|
||||
CHECK(summary && summary->births == 0);
|
||||
}
|
||||
} // namespace
|
||||
int main() try {
|
||||
|
||||
Reference in New Issue
Block a user