Skip to content

Scheduled region orders on balanced frames: conditional κ = 5.2111890493145e-5 - #92

Closed
maxime-fleury wants to merge 9 commits into
CrocSwap:mainfrom
maxime-fleury:research/envelope-scheduled-order
Closed

maxime-fleury wants to merge 9 commits into
CrocSwap:mainfrom
maxime-fleury:research/envelope-scheduled-order

Conversation

@maxime-fleury

@maxime-fleury maxime-fleury commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Dependency

This branch is composed on top of the open #82 head (3410b94), so its diff against main includes that PR's content, exactly as #82 itself composes the pinned PR76/PR79 archive. The candidate added by this PR is the fourteen files under research/envelope-scheduled/ plus .github/workflows/envelope-scheduled.yml.

What this composes

The pinned envelope-balanced witness fixes one region order per axis through
balanced_split_graph.configuration(h)['schedule'] (cover-core at h23,
reverse-node at h25). This candidate keeps every other setting — groups
[1,1,2], anchors, half-plane versus row coarse sums, future-compatible
completion, 0 versus 3 carry-exchange passes, exact next-use profile costs, the
coordinate-conjugated oracle pricing at h25, the PR74 scalar-envelope
reordering, and the pinned coordinate orders order-23.json / order-25.json
— and changes only the region order: node-asc at h23, width-node at h25.

Result

Quantity Pinned witness This candidate
kappa (1e-18 grid) 5.2032798885190e-05 5.2111890493145e-05
Bit saving 5.2035506438388e-05 5.2114606283958e-05
h23 / h25 auxiliary roles 27075 / 35500 27032 / 35431
Physical width W 133289600 133068501

kappa = 10422378098629/200000000000000000, which is 15818321591/200000000000000000
absolute (+0.152%) above the pinned 5203279888519/100000000000000000, and
+0.72% above PR76's 5.1738676045141e-05. The improvement also survives on the
coarser 1e-11 grid (5.211188e-05, still above the pinned fine-grid value).

The candidate is narrower than the pin and has fewer auxiliary roles, so
this is not a width effect: the region order changes which rank-one blocks the
profiler extracts from the same physical path, and the moment inequality
sum_t count_t (t/m)^(1-s) / W < 1 is decided by that profile shape.

How the orders were selected

Region orders were scored by recompiling axes and evaluating the unchanged
exact arithmetic: 12 h23 orders (9 keys plus 4 hash-seeded random orders, with
cover-core reproducing the pinned axis-23 word byte for byte) crossed with 10
h25 orders, 120 pairs in total, at 8-20 minutes of compilation per axis. The
best pair is node-asc with width-node; at h25 the node-asc and
width-node keys happen to produce the same order.

Coordinate relabelling was searched separately as an independent lever: more
than 500 hill-climbing and random relabel draws on the pinned words never beat
the identity relabel, so the pinned order-23.json and order-25.json are
retained unchanged. Only the region order moved the number.

What is verified

research/envelope-scheduled/verify.py replays both words (XOR word, dirty
basis, frame incidence), rebuilds the transition and fixed-basis profile
receipts, recomputes the profile of each axis exactly against the shipped
profiles-23.json / profiles-25.json, rebuilds the complete
child-multiplicity profile, re-derives the 1e-18 grid saving with the inherited
rational binary search, checks both moment enclosures, the independent
log-enclosure audit bound, the fixed-width bridge and the balanced assembly,
and asserts all 47 strict inequalities, the seven margins, the next-grid kappa
rejection and the independent-bound separation. --regenerate recompiles both
axes through this directory's compiler.py (role counts 27032 and 35431) and
asserts the regenerated words are byte-identical to the shipped ones; the
recorded run is regen.log. test_controls.py adds 15 controls: a duplicated
coordinate, an inconsistent mapping, unrelabelled source values or outputs, a
missing terminal synthesis, an aliased terminal, an unknown region order, a
region order that breaks the topological or carrier constraints, and a stale
bridge field are all rejected, while the recorded kappa is accepted and its
next 1e-18 grid value is rejected. CI runs both in the same three Python
versions as the pinned workflow.

Scope and limits

The arithmetic downstream of the words is inherited unchanged: the PR48
rational logarithm enclosures, the PR65 moment/assembly/audit code, the
fixed-tape transfer, routing and recovery interfaces, prime selection and the
all-size compiler argument. Only heuristic selection among legal region orders
changed, under the same topological and carrier-candidate assertions. Nothing
in research/envelope-balanced/ is modified; compiler.py and
flag_engine.py are copies of the pinned files in this directory, and the
copied flag engine keeps the pinned check_flag_engine assertion. The one
harness difference is that the oracle subprocess is awaited with a generous
timeout instead of ten seconds, because the pinned ten-second wait aborts an
already completed compilation at its shutdown step under parallel load,
before the word is written; it cannot change the word, which is fully
determined before that step.

This remains a conditional finite witness: no global optimality over region
orders and no measured practical speedup is claimed.

Region-order selection and verification with Codebuff (Buffy) assistance.
Inherited sources, notices and licenses remain unchanged.

chafreaky and others added 9 commits October 8, 2026 23:06
…45e-05

The pinned envelope-balanced witness fixes one region order per axis. This
composes the same compiler with node-asc at h23 and width-node at h25, keeping
the pinned coordinate orders unchanged, and lifts kappa from 5.203279888519e-05
to 5.2111890493145e-05 (+0.152%). The candidate is narrower than the pin, so
the gain comes from the child-multiplicity profile the region order selects,
not from the physical width.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@maxime-fleury maxime-fleury changed the title Scheduled region orders on balanced frames: conditional kappa = 5.2111890493145e-5 Scheduled region orders on balanced frames: conditional κ = 5.2111890493145e-5 Oct 10, 2026
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Thank you @maxime-fleury. This contribution is now recorded on main in the scoped reconciliation review and contributor credits.

Contribution: Dependency-valid region ordering and saved-word resynthesis.

Review and limits: Exact-head CI evidence; actual DAG compatibility retained.

The complete original source, proof/research notes, notices and relevant replay/CI evidence are retained through the pinned source archive. The review distinguishes fresh runs, exact-head historical CI and prior integration evidence. Closing this historical PR as reconciled; its obsolete headline does not replace the current selected bound, and draft/retracted claims retain their explicit qualifications.

Reviewed head: 2b4dca843b7a719512595896aab29de28bc4ea1f. Publication: b84ba67156a01f9c2cb34fe1e3cb1dcdeab00d9c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants