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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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]>
2 of 5 tasks
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]>
2 of 5 tasks
Review shared-r2 approved fe90361 with one minor finding and one nit. The minor: two more shortcuts in entry_year_probability passed all 56 tests. One returned p * share for p below 1e-8; the other returned p for p above 1 - 1e-12. Two tests now pin them. - test_entry_year_probability_tracks_the_formula_across_a_grid checks 2,478 invented pairs against the 200-digit oracle at eight units of rounding: 118 annual risks (2**-1 to 2**-60, 1 - 2**-1 to 1 - 2**-53, and seven ordinary values) for each of 21 shares (2**-100 to one-half, 1 - 2**-2 to 1 - 2**-53, and four ordinary values). The host's worst over the grid is two units; eight leaves room for another platform's log1p and expm1. - test_half_share_matches_the_square_root checks shared-r2's pairs, (2**-30, 0.5) and (1 - 2**-53, 0.5), against 1 - sqrt(1 - p), a second oracle that takes no logarithm. On the host, the module gives 79 passed. Ten numeric mutants each fail it: shared-r1's three, shared-r2's two, and five more (shares near one treated as one, 1 - exp in place of -expm1, the power form, a first-order hazard for small shares, and a float32 hazard). The square-root test alone kills shared-r2's two. The nit: the tiny-risk test's docstring now says its result rounds exactly to half. The implementation is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master changed three of this PR's files since 02897ed: the exclusion lists in scripts/first_estimates_birth_evidence.py and tests/estimates/test_birth_evidence_artifact.py, and the two tier files. Git merged them with no conflict. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master's files read unit 26,654, artifact 7,141 and total 36,123. This PR's two test modules, collected by name under each marker at 987c42c, add 79 unit tests (tests/open_population/test_conventions.py, new) and 1 artifact test (test_every_open_population_module_is_an_exact_exclusion in tests/estimates/test_birth_evidence_artifact.py, which has 13 tests on master and 14 here). The counts become unit 26,733, artifact 7,142 and total 36,203. Both modules pass on the host at 987c42c: 93 passed. 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. This is the first commit of the open-population lane's demographic phase, under d1925. OP2(a), OP2(b), OP3 and OP4 start side by side from this branch, on new files, and this PR lands before any of them.
What changes
OP0.1's six records stay in draft, and its coordinator questions say no provisional choice freezes itself. So each part takes a convention as a required input with no default.
open_population/conventions.pygives those parts one place to meet:ConventionSourcenames an input's record and status (invented, proposed or frozen), andrequire_frozenrefuses by a named condition.ComponentControlsholds annual controls in thousands by named component, with a direction and a universe. OP3's reader emits them, and OP4's law consumes them.ExitTimingConventionholds the one share OP3's bridge and OP4's law read: how much of a year's exit risk an entrant faces in its entry year.FOREIGN_BORN_COLUMNnames the nativity column OP4's law reads, whichbuild_entrant_schedulealready writes on entrants.errors.pygains four refusals from design §8:CONTROL_SOURCE_UNAVAILABLE,UNIVERSE_BRIDGE_UNRESOLVED,TIMING_BRIDGE_UNRESOLVEDandEXTRAPOLATION_UNDECLARED. No projection reads the new module yet.The reducer's seal now covers the package.
conventions.pyjoins both exclusion lists, as design §2.10 asks. Reading those lists turned up a gap:test_post_review_exclusions_are_unreachable_from_birth_evidencenever namedopen_population, so nothing on master asserted that the reducer can't reach the package the tuple leaves out of its identity. So this PR makes two more changes intests/estimates/test_birth_evidence_artifact.py:graph, so a part's new module gets the check unasked.test_every_open_population_module_is_an_exact_exclusionfails by name when a module in the package misses the tuple.The tuple keeps exact files. A package prefix would have saved each part a line, but
tests/track_u2/test_u2_isolation.py:252–255requires "Exact files, never directories". Parts instead insert after separate lines in OP1's block, so they merge without touching each other.git merge-fileon copies of both files merged all six with no conflict.Invariants
require_frozen.totalrounds the exact sum once.for_yearreturns every component the table names or refuses, so a known zero differs from a missing row.entry_year_probabilitylies in[0, annual], even if a platform'sexpm1rounds high. It returns each end exactly, rises with the annual figure and the share (to one unit of rounding), and reads the annual figure as a constant hazard. The share reads as a plain float.FOREIGN_BORN_COLUMNnames the columnbuild_entrant_schedulewrites.open_populationis reachable from the reducer, and each one is an exact entry in the tuple.tests/open_population/test_conventions.pyholds 1 to 7, with Hypothesis properties for 2, 3 and 5 and a differential for 6, on invented values only.tests/estimates/test_birth_evidence_artifact.pyholds 8.Evidence
All on the host, in one process, with a one-minute load under 130.
e6e96cd4. It merges master331ae7de(987c42cc, tree equal togit merge-tree's, no conflict) and recounts the tier files: unit 26,654 → 26,733 and artifact 7,141 → 7,142, total 36,203. The PR's two test modules, collected by name under each marker, add 79 unit tests and 1 artifact test. At987c42ccthey gave 93 passed in 7.71 s, and against master the PR still changes its five files plus the two tier files.60c2ba2a. It answers review shared-r2's minor and nit, intests/open_population/test_conventions.pyonly. A grid test checks 2,478 invented (annual, share) pairs against the 200-digit oracle at eight units of rounding; the host's worst is two. A second test checks shared-r2's two pairs against1 - sqrt(1 - p). The module gave 79 passed in 4.97 s. Ten numeric mutants each die, among them shared-r2's two survivors:p * sharefor risks below 1e-8, andpfor risks above 1 - 1e-12.fe903613. It adds three regressions near zero totests/open_population/test_conventions.py, and changes nothing else. That module gave 56 passed in 8.07 s. Review shared-r1's three surviving mutants each die now:log(1 - p)forlog1p(-p), shares below 1e-10 read as zero, and results zeroed for annual risks below 1e-15.eb5b6851. Thetests/open_populationmodules other than the stream scan gave 306 passed and 1 xfailed in 34.23 s, and the seal module gave 14 passed in 7.43 s. Black and Ruff pass on the PR's Python files.68df7397. All five died: three that make the package reachable and two that drop a module from the tuple.68df7397. 31 of 34 died. The head adds a test for each of the three survivors, and each now dies:math.fsumbecomingsum. Python 3.14's built-insumcompensates, so 2 million random tables never told the two apart. Just past a tie, the exact sum rounds up where a compensated total stops.expm1. The test patchesnp.expm1to round one unit high, and the bound holds.The commit after
68df7397changestests/open_population/test_conventions.pyonly.Plan
shared-r1, ateb5b6851: REVISE, one major finding. No test pinned the exit share's accuracy near zero.fe903613answers it.shared-r2, atfe903613: APPROVE, with one minor finding and one nit, both on test coverage.60c2ba2aanswers them.shared-r3, at60c2ba2a(running).331ae7deand recount the tier files, ate6e96cd4.🤖 Generated with Claude Code