Repository navigation
test: Phase 4 exit-criteria sweep and long-run hardening (Phase 4, PR 5/5) - #101
Merged
Merged
Conversation
Phase 4 PR 5, test-only. Closes the phase by checking every roadmap exit criterion end to end on a real running world, and by hardening the long-run determinism suite for genomes and lineage. phase4-exit-criteria.test.ts audits births by stepping a world tick by tick and remembering every living genome from the previous tick, so each child's parents are known exactly as they were at conception even if they die later. Over 6,000 ticks it checks, per birth: scalar genes lie within the blend of the parents' values plus mutation; brain weights come from both parents; the parents' architecture and weight count are kept; the genome is valid; the child is closer to each parent than the parents are to each other, and its brain far closer than unrelated founders' brains are; roughly 95% of its weights are its parents' own and essentially none match a freshly drawn brain; and lineage records survive parent death. The learning-inheritance mode is configurable, accepts all three modes, rejects others, and produces three different results. Long-run suite additions: chunked and direct runs now also match on the lineage store (which is deliberately not hashed); genomes stay valid and every trait mean stays within 0.35 of its range width of baseline over 100,000 ticks (measured worst case on two seeds: 0.20); genomes stay valid under ten times the default mutation rate and strength; and after extinction the whole lineage stays queryable and does not change over 80,000 more ticks. docs/genetics/genome.md gains a map from each guarantee to the test that checks it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fifth and final Phase 4 PR. Test-only: no source changes, no behavior changes, no golden changes. It closes the phase by checking every roadmap exit criterion end to end on a real running world, and by hardening the long-run determinism suite for genomes and lineage.
Exit-criteria sweep (
phase4-exit-criteria.test.ts, 17 checks)Births are audited by stepping a world one tick at a time and remembering every living genome from the previous tick, so each child's parents are known exactly as they were at conception even if they die later. Over 6,000 ticks (25+ audited births) it checks, per birth:
partial/0.15, all three modes accepted, anything else rejected, and the three modes give three different results.The eighth criterion (broad unit-test coverage) is the contents of
tests/genetics/,lineage.test.tsandtraits.test.ts;docs/genetics/genome.mdnow has a table mapping each guarantee to the test that checks it.Long-run additions (determinism suite, 4 new tests)
Test plan
pnpm format:checkclean in a fresh clonepnpm checkgreen in a fresh clone: 7 contracts, 55 config, 441 simulationpnpm buildgreen (all 8 packages/apps)pnpm test:determinism: 21/21 (17 existing plus 4 new)This completes Phase 4 (genetics and inheritance).
🤖 Generated with Claude Code