Repository navigation
Conversation
OP2, OP3 and OP4 start side by side from this commit. They meet at one module: required inputs that name their source and status, the annual controls OP3's reader emits and OP4's law consumes, the exit-timing convention OP3's bridge and OP4's law share, and the roster columns and stream tags more than one part writes or reads. It also adds the four named refusals those parts raise (design §8). No projection reads this module yet, and it joins the reducer's exclusion list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
OP4's exit law reads a row's nativity, and build_entrant_schedule already writes foreign_born on entrants, so conventions.py names that column. The reachability test never named open_population, so nothing asserted that the reducer can't reach the package the exclusion list leaves out of its identity. The test now builds the module set from the package itself, as it does for graph, so a part's new module gets the check unasked. A second test fails by name when a module in the package misses the list. The list keeps exact files, as tests/track_u2/test_u2_isolation.py requires. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The conventions mutants left three survivors at 68df739, and each named a property no example reached: - `math.fsum` against `sum`: 3.14's built-in `sum` compensates, so no random table told them apart. Just past a tie the exact sum rounds up where a compensated total stops. - the share's coercion to a plain float. - the bound at the annual probability, which no search reached on this platform's `expm1`. A patched `expm1` that rounds one unit high shows the bound holding. Co-Authored-By: Claude Opus 5.5 <[email protected]>
OP2(a) of docs/design/open_population.md: each maternal birth appends a newborn with its mother, second-parent link or registered reason, sex from a tagged stream keyed on the mother, the mother's household and weights, birth order and out-of-domain markers. A GPT-6.1 Sol lane wrote the module and its tests on invented data; this commit adds the module to the reducer's exclusion lists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The reader now counts only the mother's roster year when the state carries a year column, and a test runs it on the sealed live-roster marital step. New tests pin the mutants the builder's sweep left alive, and the input frames, plain NumPy columns, known integer columns, the injected reader, the allocator after a refusal and the sealed mortality and aging steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The extra mutant sweep left these two alive. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review shared-r1 found that no test pinned entry_year_probability near zero: three mutants (log(1 - p) for log1p(-p), shares below 1e-10 read as zero, and results zeroed for annual risks below 1e-15) passed all 51 tests. Three regressions now pin it: - half of an annual risk of 2**-100 is exactly 2**-101; - a share of 2**-100 of an annual risk of 0.36 stays within one unit in the last place of a 200-digit Decimal oracle; - a certain exit stays certain at shares of 2**-1074, 2**-100, 0.25 and 1 - 2**-53. All 56 conventions tests pass, and each of the three mutants now fails. The implementation is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in fe90361, which adds tests to test_conventions.py only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review op2a-r1 returned REVISE at a94838c with three major findings. A Sol fix build (20261129-074116-op2a-fix-r1) wrote this commit's two files; the session hashed them before committing. - Exact IDs. read_second_parents read a state row with iloc, which mixed int64 and float columns into one float row, so a spouse ID of 2**53 + 1 came back as 2**53. Each state field is now read from its own column, with regressions at 2**53 and 2**53 + 1 for int64 and Int64. - Validation before conversion. _integers checks each scalar before it builds a nullable integer. Booleans and strings are refused everywhere. Roster person IDs, birth mother IDs, birth orders and allocated IDs need integer types. Other integer fields accept finite whole floats below 2**53 in magnitude, which convert exactly, since engine/steps.py:485-507 can leave them float. Each refusal test checks that the allocator has not moved. - Canonical parentage. append_newborn_packet always runs the canonical read_second_parents. An injected reader's link must equal the canonical link, it can't suppress one, and it can't add a link where the canonical reader finds none. It may pick another registered reason when both are unlinked. A malformed result (not a mapping, not a pair, or a nonscalar field) gets the named refusal before allocation. - The four mutant gaps the review named now each have a test. On the host: tests/open_population/test_newborn.py and test_conventions.py give 249 passed, and the seal module gives 14 passed. Black and Ruff are clean. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch was successfully deployed
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.
WIP. OP2(a) of
docs/design/open_population.md: the newborn entry packet. It's stacked on #599, whose commits show in this diff until that PR lands. Four files belong to this part:newborn.py,test_newborn.pyand one seal-list line in each of two files.What it adds
open_population/newborn.pyfills the fertility slot. For each maternal birth in the year, it appends a person row with:SexRatioPin;synthetic_entryand the five out-of-domain markers set, parity 0 for a girl and missing for a boy, andforeign_bornfalse;NEWBORN_G_FIELDSandNEWBORN_G_WORKER_LINKS, which declare the columns an assembly adapter maps into Track B's G.harness.pyalready wraps the slot inBirthEntryAdapter, so the packet writes neitherentry_kindnorentry_year, and the harness doesn't change. A GPT-6.1 Sol lane wrote the module and its tests on invented data. I then read them against the sealed code, changed the reader to count only the birth year of a dated state, and added tests.No real value enters.
SexRatioPinhas no default, and itssourcecarries aConventionStatus.NewbornPacketStep.require_frozenrefuses anything but a frozen source. §5.4 pins the real share from NCHS before any gate, and that step comes later.Readings to check
engine/loop.py:358–360), so the stream uses the mother's ordinal. The kernel gives each woman at most one birth a year, so the packet refuses a second birth to one mother in one year.marital.sim_yearsin the shape the sealed live-roster step hands over (cola_track_a/adapters.py:83–123):spouse_person_idandmarital_status, one row a person. A state with ayearcolumn counts only the mother's roster year, and two rows for her in that year refuse. The M6 kernel'ssim_years(engine/marital.py:435) holdsmarital_stateand no spouse link, so a mother in it readspartner_unknown. §2.4 explains why that kernel can't carry entrants.partner_unknown, even if the mother's roster row marks a spouse abroad. The marker counts only once she has a row in the authoritative state.engine/loop.py:297–316). The sealed live-roster step then marks the survivorwidowedand moves the link tolate_spouse_person_id, so the child readsunpartnered_mother. A state that keeps a link to someone off the roster readspartner_outside_roster. The design's list has no closer reason, and G's assembly adapter can readlate_spouse_person_idwhen a surviving child's benefit needs it.Invariants
Design §7's newborn-packet and determinism rows, each with a property-based test:
Differentials. The packet matches the sealed
materialize_maternal_births(engine/steps.py:451) in every column that fills, except sex.DirectRNGStreamsandProjectionRNGRegistrygive identical packets.Through
run_gate. Accounting reconciles every year, the adapter labels each birth, a newborn faces its first mortality draw the next year at age 0, and two runs give equal slices. A separate test runs packet rows through the sealedapply_mortalityandadvance_age, and another runs the reader on the sealedwidowhood_marital_step.Evidence
On the host at
a94838ca, one process:tests/open_population/test_newborn.pyandtest_conventions.py: 172 passed in 24.84 s, 121 of them intest_newborn.py.tests/estimates/test_birth_evidence_artifact.py: 14 passed.-l 79) and Ruff come back clean.Mutants, each under a 1.5 GiB cap with Hypothesis's explain phase off, after an unmutated control:
da7a59aa: 46 fail a test. New tests pin the other four.5e192802: 43 fail a test. New tests pin the other two.a94838ca: all of the builder's 50 and those two fail a test. The module hasn't changed since5e192802, and the tests have only grown, so all 95 stand killed at this head.Plan
op2a-r1, queued).Follow-up for the next design commit
The builder found that §6.1's G bullet cites
track_b/gross_benefits.py:1079–1095forBeneficiary. That class now starts at line 2253.🤖 Generated with Claude Code