Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions docs/plans/2026-10-09-global-h0-selector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Complete periodic field and exact global H0 selector implementation plan

> **For agentic workers:** Use superpowers:subagent-driven-development for scoped implementation and distinct source review. Preserve the reports and recovery ledger for this research increment. Standing owner authorization supplies execution authority; it supplies no successful test or proof.

**Goal:** Execute the full periodic surgery formula and derive its global H0 barcode by exact root and component incidence certificates on the eighteen predeclared controls.

**Architecture:** `surgery_field.py` owns interval primitives, the shared budget and full field evaluation. `global_h0_selector.py` owns exact polynomial algebra, critical roots, regular-level components and the elder graph. The driver retains full certificates and compares the fixed literal predictions only after selection and verification.

**Tech Stack:** Python 3.12 standard library; `Fraction`; unchanged `finite_certificate.py` and `gaussian_tail.py` interval dependencies.

**Spec:** `experiments/universality/two_parameter_cusp_population/GLOBAL_SELECTOR_CONTRACT.md`, predeclared before implementation from the reviewed exact dbc0 planning draft.

## Global constraints

- Keep all existing proofs, reviews, controlled population code, population results and workflows unchanged.
- Mathematical inputs are exact `Fraction`; floats, bools, reversed intervals and invalid controls are rejected.
- Use 128 outward bits, the fixed 64-term stable sine recurrence and its stated remainder, and the unchanged 256-bit exponential engine.
- Root full width is at most `2^-160` or an exact rational value; at most 256 midpoint splits per root branch.
- At most 100000 polynomial evaluations per fixture, 4096 field calls and 32768 primitive requests per whole attempt; 900 seconds includes verification, source hashing, serialization, writes and flush.
- Selector inputs are only `(u,v)` and the shared Budget. No old population pairing, root fixture, CDF or lifetime oracle is imported.
- Tied actual bars and the population exclusion projection are separate outputs. Overlap never proves equality or sign.
- Use one exclusive result directory; retain failures and partial records; no overwrite, scientific retry, precision increase or count retuning.
- Bind exact accepted analytic source and review identities; field calls cannot prove the analytic global premises.
- Same-team/source-exposed technical review earns zero organizational or blind independence credit; the full landmark objective remains active.

## Review focus

- Transition and seam inputs must execute the full formula and preserve exact periodic representatives.
- Multiple roots and roots at interval endpoints must retain multiplicity without being counted twice.
- Irrational spatial roots with equal exact heights must be batched by a polynomial equality witness.
- A tampered component or elder edge must fail verification even if producer PASS flags remain.
- Final source drift or budget exhaustion must withdraw every nested acceptance while retaining computed numeric evidence.

## Task 1: Complete field evaluator and shared budget

**Files:** Create `surgery_field.py` and `test_surgery_field.py` in the cusp-population directory.

**Interfaces:** Produce `Budget`, `Inconclusive`, `torus_field_bounds`, `chart_field_bounds`, `guard_certificate` and exact model constants as specified by the contract. Additional interval helpers stay module-local or are explicitly named in the task report for the selector.

- [ ] Write meaningful tests for signed multiplication, crossing-zero squares, denominator rejection, sine at zero and nonzero rational arguments, step plateaus and transition, exact core values, seed collar and seam translations, domain/type rejection, accepted guard identities and reduced counters.
- [ ] Run the tests against the absent module; retain the actual RED command and complete output. An import error demonstrates module absence, followed by behavioral RED for any skeletal interface; never call an import failure a proved behavioral defect.
- [ ] Implement the contract's full formula and stable recurrence. Each field call records input, canonical representative or chart box, branch, returned interval and model binding.
- [ ] Run focused normal and optimized tests, record exact commands/counts and source identities, then self-review all changed source. No eighteen-fixture scientific driver run.
- [ ] Commit only this task's two sources after local verification. A distinct reviewer checks the complete diff for spec compliance and source quality before Task 2 depends on it.

## Task 2: Exact roots, connectivity and independent verifier

**Files:** Create `global_h0_selector.py` and `test_global_h0_selector.py` in the same directory.

**Interfaces:** Consume Task 1's Budget and guard binding; produce `isolate_roots`, `select_h0` and `verify_h0` with the frozen tuple/dict record schemas. All polynomial arithmetic is exact and charged.

- [ ] Write tests for repeated and endpoint roots, exact Sturm counts, strict height grouping, irrational exact ties, the hostile right-younger control, no-positive-bar degeneracies, and actual versus projected tied bars.
- [ ] Add tampering tests for multiplicity, omitted component, changed sign witness and swapped elder decision; reduced-budget tests retain partial records and withhold barcode acceptance.
- [ ] Retain genuine RED before implementing each behavior. Implement square-free/gcd factors and Sturm chains, then derive regular-level positive intervals and certified incidence before applying the elder rule.
- [ ] Verify producer certificates by replaying supplied exact algebra, signs, incidence and elder decisions. Do not call `select_h0` from the verifier or trust success flags.
- [ ] Run the complete focused normal and optimized tests, record source/exposure identities and self-review. Do not invoke the frozen eighteen-fixture driver.
- [ ] Commit only this task's two sources after verification. A distinct reviewer reads their full diff and checks the math/ABI; address substantive findings before Task 3.

## Task 3: Frozen driver and withdrawal semantics

**Files:** Create `run_global_h0_selector.py` and `test_global_h0_runner.py` in the same directory.

**Interfaces:** Consume Task 1/2 public functions and exact records. Produce canonical `RUN.json`, `CERTIFICATE.json`, `RESULTS.md` only in a new exclusive `results/global_selector_1/` directory. Expose small pure helpers for canonical encoding, frozen fixture construction, expected-value comparison after verification, source manifests and nested withdrawal.

- [ ] Write RED tests for canonical rational serialization with float rejection, exactly eighteen controls, post-selection expectation comparison, exclusive output creation and retained nested withdrawal on source drift/final deadline failure.
- [ ] Implement the fixed fixtures and anchors, shared budget, accepted premise binding, source bytes frozen before scientific imports, final source comparisons and full retained certificates. Literal expected bars are used only after sound selection and verification.
- [ ] Make driver failure disposition explicit. Preserve computed statuses in `computed_status_before_withdrawal`; no nested acceptance remains CERTIFIED/PASS after global drift or deadline withdrawal.
- [ ] Run focused normal and optimized tests without writing `global_selector_1`. Commit only this task's two files; obtain fresh complete changed-source review.

## Task 4: One frozen attempt and delivery

**Files:** Create exactly the three declared result artifacts; ordinary external logs, review reports and custody receipts remain outside the checkout.

- [ ] Root reads every changed source and resolves all reviewer findings. Run one complete applicable focused normal and optimized verification on the final frozen cut; broaden only for an identified changed concern.
- [ ] Use the recorded bundled Python 3.12 runtime. An outside subprocess recorder invokes the exact command with a 900-second hard timeout and records command, stdout, stderr, start/end, exit and whole wall time.
- [ ] Execute the declared eighteen-fixture scientific attempt once. Do not rerun, overwrite or adjust its frozen budgets after any result.
- [ ] A distinct results reviewer replays retained certificates and source/result identities without rerunning the whole campaign. Keep full-field execution and exact-selector execution as separate dispositions.
- [ ] Commit the retained results, publish a scoped draft stacked on the guard delivery, attach it, and verify complete native bodies/commit parents/tree identities. Hosted evidence binds only its actual revision/checkout.
- [ ] Deliver one canonical private receipt through existing Drive/R17 surfaces, verify full bytes and metadata, append actual delivery and explicit release, and retain the broader NOT_RUN scopes and active landmark goal.

## Controller rulings and recovery

The current direct standing owner instruction supersedes skill prompts asking for renewed approval of this plan, routine implementation choices, dependencies, publication or integration. Exact source ownership and substantive acceptance still apply. Task-scoped ordinary briefs, full reports and a persistent ledger will live beside this plan outside the checkout, preserving research failures and recovery paths rather than deleting them at skill completion. Root claimed the exact tracked plan, contract, six executable/test paths and three result paths before tracked writes under native307/6087579322 and R17 Work Events1359/eventf87f892a-7031-4624-9cba-592b081181ea. The existing manual isolated worktree is suitable and will be reused on a new additive branch; no main-owner window is acquired.

Plan self-check: Tasks 1→2 share only the specified Budget/guard ABI; Tasks 1/2→3 share the fixed public record schemas; Task 3→4 shares the frozen exclusive outputs and complete-command disposition. Each source task owns disjoint files, its tests cover its own production behavior, and Task 4 consumes only reviewed frozen source. No implementation or scientific execution has occurred at this plan's first cut.

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions experiments/universality/results/global_selector_1/RESULTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Complete periodic field and exact global H0 selector

Driver disposition: **CERTIFIED**.

Full-field execution: CERTIFIED.
Global selector/replay execution: CERTIFIED.

Conditional on the bound historical analytic guards. Source-exposed same-team review; organizational and blind credit zero.

| Fixture | Disposition | Computed positive finite lifetimes | Population count | Comparison |
| --- | --- | --- | --- | --- |
| fixture_01 | CERTIFIED | 1/75557863725914323419136 | 1 | PASS |
| fixture_02 | CERTIFIED | 1/75557863725914323419136 | 1 | PASS |
| fixture_03 | CERTIFIED | 1/9444732965739290427392 | 1 | PASS |
| fixture_04 | CERTIFIED | 1/9444732965739290427392 | 1 | PASS |
| fixture_05 | CERTIFIED | 27/75557863725914323419136 | 1 | PASS |
| fixture_06 | CERTIFIED | 27/75557863725914323419136 | 1 | PASS |
| fixture_07 | CERTIFIED | none computed | 0 | PASS |
| fixture_08 | CERTIFIED | none computed | 0 | PASS |
| fixture_09 | CERTIFIED | 1/1180591620717411303424 | 0 | PASS |
| fixture_10 | CERTIFIED | 1/1180591620717411303424 | 0 | PASS |
| fixture_11 | CERTIFIED | none computed | 0 | PASS |
| fixture_12 | CERTIFIED | none computed | 0 | PASS |
| fixture_13 | CERTIFIED | 3/18889465931478580854784 | 1 | PASS |
| fixture_14 | CERTIFIED | 3/18889465931478580854784 | 1 | PASS |
| fixture_15 | CERTIFIED | none computed | 0 | PASS |
| fixture_16 | CERTIFIED | none computed | 0 | PASS |
| fixture_17 | CERTIFIED | none computed | 0 | PASS |
| fixture_18 | CERTIFIED | 9/295147905179352825856 | 0 | PASS |

Computed evidence and withdrawn prior statuses remain in CERTIFICATE.json. RUN.json binds the two other artifacts.

The outside recorder must establish exit zero and complete-command wall time under 900 seconds, including writes and flush.

Gaussian universality, random/blind campaigns, same-field spatial Poisson, higher homology, Lean/kernel and scientific promotion remain NOT_RUN.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"blind_independence_credit":0,"command":"python3 -B -S experiments/universality/two_parameter_cusp_population/run_global_h0_selector.py","complete_command_acceptance":"REQUIRES_EXTERNAL_RECORDER_EXIT_ZERO_AND_UNDER_900_SECONDS","elapsed_before_writes_seconds":"4.860869834","model_id":"explicit_periodic_cusp_v1","organization_independence_credit":0,"outputs":{"CERTIFICATE.json":{"bytes":4431203,"sha256":"c53200208da0b829847739514ae3f62d63855b7fd5769f05d2db78f06961988f"},"RESULTS.md":{"bytes":1910,"sha256":"79333482104fea7374706e668875c32cdfbaecf064c8ae98eec10dba922ba624"}},"platform":"macOS-15.7.4-arm64-arm-64bit","python_executable":"/Users/dylanroy/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3","python_version":"3.12.14 (main, Aug 25 2026, 13:50:33) [Clang 22.1.3 ]","schema_version":1,"source_drift":[],"sources_after":{"docs/plans/2026-10-09-global-h0-selector.md":{"bytes":10216,"sha256":"f1e05d5ebd7fef5e7c2b1cf11e90d59c7f9f4fbda4db78cdb467c9108d620595"},"experiments/periodic_h0/finite_certificate.py":{"bytes":14843,"sha256":"0674a2621dff6c040cbb24cc0b6e6df7847541ebc171ebdb28070afa05e04e6b"},"experiments/periodic_h0/gaussian_tail.py":{"bytes":4688,"sha256":"07e55a62ed0bb6da6a9395762e2e0c033126f83b46abd48db4c24df710779db8"},"experiments/universality/two_parameter_cusp_population/ANALYTIC_GUARDS.md":{"bytes":10494,"sha256":"2f87cafba115a314e44d04d784701aebcebdc123feced7f22540063fa7570db9"},"experiments/universality/two_parameter_cusp_population/CONTROLLED_FALSIFICATION.md":{"bytes":15296,"sha256":"a23f88801e678dd1af484cac8f5564801d9d410d835b560a280c0ea6dfc8996e"},"experiments/universality/two_parameter_cusp_population/GLOBAL_SELECTOR_CONTRACT.md":{"bytes":27262,"sha256":"553e06924f8640803ab397d5dee1474d1cf376fcda42c78325e2531d1e0bf1a4"},"experiments/universality/two_parameter_cusp_population/PROOF.md":{"bytes":38350,"sha256":"9e8caa52b6448e23e465e646ca98d6e42e0cd71442ad4118b59145ee849e1326"},"experiments/universality/two_parameter_cusp_population/global_h0_selector.py":{"bytes":41329,"sha256":"d11bbdca7c3c5fb90235f975e099ae6a3c17a680767a2925662d1e97ffb33876"},"experiments/universality/two_parameter_cusp_population/run_global_h0_selector.py":{"bytes":33281,"sha256":"8e696aa0f179149193a6d0c2d772f0c4b602c30d837a6679b5cf9f793a072681"},"experiments/universality/two_parameter_cusp_population/surgery_field.py":{"bytes":22239,"sha256":"c4b8584d5e9ca07da9a316256ec7cee07c4a73d07e9eb71b3738d8860157619e"},"experiments/universality/two_parameter_cusp_population/test_global_h0_runner.py":{"bytes":49290,"sha256":"a4026e3317c4cb38db4c01c31a00e802d292d81381c6f296f199c08b56e3e85b"},"experiments/universality/two_parameter_cusp_population/test_global_h0_selector.py":{"bytes":34204,"sha256":"5c914ba7bdf3641c8835431a7278a71e6fba23432c94f8bb9dd962552069d163"},"experiments/universality/two_parameter_cusp_population/test_surgery_field.py":{"bytes":20858,"sha256":"c36eea4e97a646ae897edbbfc06954530aec0ce59cf11f98062ff1e19cee36cb"}},"sources_before":{"docs/plans/2026-10-09-global-h0-selector.md":{"bytes":10216,"sha256":"f1e05d5ebd7fef5e7c2b1cf11e90d59c7f9f4fbda4db78cdb467c9108d620595"},"experiments/periodic_h0/finite_certificate.py":{"bytes":14843,"sha256":"0674a2621dff6c040cbb24cc0b6e6df7847541ebc171ebdb28070afa05e04e6b"},"experiments/periodic_h0/gaussian_tail.py":{"bytes":4688,"sha256":"07e55a62ed0bb6da6a9395762e2e0c033126f83b46abd48db4c24df710779db8"},"experiments/universality/two_parameter_cusp_population/ANALYTIC_GUARDS.md":{"bytes":10494,"sha256":"2f87cafba115a314e44d04d784701aebcebdc123feced7f22540063fa7570db9"},"experiments/universality/two_parameter_cusp_population/CONTROLLED_FALSIFICATION.md":{"bytes":15296,"sha256":"a23f88801e678dd1af484cac8f5564801d9d410d835b560a280c0ea6dfc8996e"},"experiments/universality/two_parameter_cusp_population/GLOBAL_SELECTOR_CONTRACT.md":{"bytes":27262,"sha256":"553e06924f8640803ab397d5dee1474d1cf376fcda42c78325e2531d1e0bf1a4"},"experiments/universality/two_parameter_cusp_population/PROOF.md":{"bytes":38350,"sha256":"9e8caa52b6448e23e465e646ca98d6e42e0cd71442ad4118b59145ee849e1326"},"experiments/universality/two_parameter_cusp_population/global_h0_selector.py":{"bytes":41329,"sha256":"d11bbdca7c3c5fb90235f975e099ae6a3c17a680767a2925662d1e97ffb33876"},"experiments/universality/two_parameter_cusp_population/run_global_h0_selector.py":{"bytes":33281,"sha256":"8e696aa0f179149193a6d0c2d772f0c4b602c30d837a6679b5cf9f793a072681"},"experiments/universality/two_parameter_cusp_population/surgery_field.py":{"bytes":22239,"sha256":"c4b8584d5e9ca07da9a316256ec7cee07c4a73d07e9eb71b3738d8860157619e"},"experiments/universality/two_parameter_cusp_population/test_global_h0_runner.py":{"bytes":49290,"sha256":"a4026e3317c4cb38db4c01c31a00e802d292d81381c6f296f199c08b56e3e85b"},"experiments/universality/two_parameter_cusp_population/test_global_h0_selector.py":{"bytes":34204,"sha256":"5c914ba7bdf3641c8835431a7278a71e6fba23432c94f8bb9dd962552069d163"},"experiments/universality/two_parameter_cusp_population/test_surgery_field.py":{"bytes":20858,"sha256":"c36eea4e97a646ae897edbbfc06954530aec0ce59cf11f98062ff1e19cee36cb"}},"status":"CERTIFIED","utc_before_writes":"2026-10-09T20:31:50.741300+00:00"}
Loading
Loading