Skip to content

Integer interval decode reads the module's data rows; the 2^n ladder and digit primitives are carried tables (stage 1 of #11741's rewire program) - #11784

Merged
briansrls merged 7 commits into
mainfrom
session/merry-fox-260-stage1
Sep 20, 2026
Merged

briansrls merged 7 commits into
mainfrom
session/merry-fox-260-stage1

Conversation

@briansrls

@briansrls briansrls commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

What

Stage 1 of the rewire program behind #11741 (option-A ruling): the top within-claim recurrence on the required floor with the eval-frame memo retired.

integer_standard_integer_type_interval_spec called integer_machine_interval_spec on every demand — a second way to compute a bound beside the int8_interval_spec … uint128_interval_spec data rows that already carry each spec once per frame (their own annotation says the fn "remains the single derivation authority; these rows are its applications" — the fn had never been pointed at them). integer_standard_integer_type_from_node folded that fn over all ten standard types per decode, so one integer-node decode re-derived 2^127 and its nine siblings (a 127-step decimal-doubling ladder each). std.materialization_ladder rule 1: one computation identity, carried, never re-derived.

Now: the projection matches the type to its row; the decoder compares against a once-per-frame table of (type, interval node) derived by list_map from the one roster. integer_machine_interval_spec stays the single derivation authority; nothing new computes a bound.

One more carry in the same ladder, found by re-measuring after the first: integer_pow2_magnitude walks a once-per-frame ladder of 2^0..2^128 (built by the same doubling the recursion performs; index n IS 2^n by construction) so the ten widths share one chain's prefix instead of climbing ten ladders. The walk is structural — the nth Cons is 2^n, running off the end continues doubling from the last carried power — so there is no indexed lookup and no miss arm inside the carried range (review 68908). The digit primitives (decimal_digit_value and its inverse, decimal_digit_double) are deliberately untouched: making the inverse direction a second hand-authored table was refused as a §3 re-mint, and the right shape — one digit↔value row set with both directions derived — is its own change.

Semantics-preserving on its face

Same value by construction — each row's body is integer_machine_interval_spec(signedness: S, width_bits: W) with the literal S/W the two total matches produce for that type — and by execution: interval_derivation_matches_all_legacy_spelled_bounds (all ten types against hand-spelled bounds, an oracle independent of both the old and the new route) and from_node_round_trips_all_standard_types hold on the memo-on and the memo-retired binary. A direct old-vs-new equality claim was written, measured at 1.87M eval steps (it re-runs the ladder it exists to retire), and not enrolled: the legacy-bounds claim is the independent receipt. Memo-on cost of the first-touching claim per frame rises slightly (41k → 49k steps) because the ladder table is built to 2^128 once regardless of which widths a frame demands; every other claim falls.

Matched before/after on the claims it names

claim_batch --claim-run, same three modules, same session host; "before" is origin/main at dfa4644000, "after" is this head; measured under both realizations (memo-on = today's floor; memo-retired = the #11741 head).

claim memo-on before → after (eval_steps) memo-retired before → after (eval_steps)
interval_derivation_matches_all_legacy_spelled_bounds 41,146 → 48,318 941,846 → 379,036
derivation_discriminates_planted_off_by_one 1,631 → 258 2,465 → 319
pow2_digit_shapes_hold 34,407 → 1,814 337,172 → 1,826
interval_min_not_above_max_for_all_standard_types 37,728 → 275 933,618 → 275
from_node_round_trips_all_standard_types 43,189 → 6,286 7,631,294 → 16,334
well_formed_unbounded_carrier_still_decodes 238 → 238 244 → 244
decode_refusals_carry_distinct_reason_symbols 43,764 → 51,083 942,502 → 379,839
producer_fault_refusals_retain_the_lookup_cause 42,612 → 537 941,183 → 561
cross_language_compile_python_to_typescript_round_trip_holds 136,926 → 136,926 487,690 → 487,690
translate_refuses_underived_conj_holds 2,476 → 2,476 4,590 → 4,590
translate_refuses_underived_disj_holds 2,443 → 2,443 2,532 → 2,532
translate_refuses_underived_value_holds 2,446 → 2,446 2,535 → 2,535
translate_refuses_underived_bodied_arrow_holds 22,158 → 22,158 99,762 → 99,762
translate_refuses_underived_grammar_match_holds 16,009 → 48,567 45,734 → 365,936
translate_refuses_mixed_derived_root_underived_child_holds 37,564 → 37,564 3,852,779 → 3,852,779
translate_refuses_absent_parent_underived_child_holds 15,989 → 15,989 32,859 → 32,859
translate_refuses_bodyless_emission_root_with_poison_child_holds 15,906 → 15,906 1,502,339 → 1,502,339
translate_refuses_bodied_arrow_shortcut_underived_descendant_holds 7,666 → 7,666 17,369 → 17,369
translate_refuses_projection_absent_fold_bodied_arrow_underived_descendant_holds 7,908 → 7,908 17,745 → 17,745
translate_accepts_synthetic_empty_facts_tree_holds 9,462 → 9,462 14,687 → 14,687
translate_accepts_derived_corpus_module_holds 92,537 → 64,597 1,837,523 → 954,561
translate_derived_emit_byte_identical_to_before_holds 78,833 → 78,833 790,717 → 790,717
rust_binop_vep_emit_core_catalog_holds 88,462 → 95,684 1,711,850 → 1,149,090
rust_binop_vep_emit_discriminates_from_add 41,334 → 41,334 646,283 → 646,283
rust_binop_vep_emit_wrong_token_discriminates 29,803 → 29,803 60,588 → 60,588
rust_binop_vep_emit_missing_catalog_rejects 1,144 → 1,144 1,318 → 1,318
rust_binop_producer_emit_sub_holds 117,846 → 117,846 309,054 → 309,054
rust_binop_producer_emit_sub_discriminates_from_add 116,031 → 116,031 293,064 → 293,064
rust_binop_producer_emit_mul_holds 116,034 → 116,034 292,950 → 292,950
rust_binop_producer_emit_eq_holds 115,974 → 115,974 293,065 → 293,065
totals (30 claims) 1,319,666 → 1,195,600 24,047,357 → 11,969,947

Terminal results: 30/30 PASS before and after under both realizations — floor population unchanged, no claim moved its verdict. The translate_* / rust_binop_* rows are unchanged by design: their memo-retired cost has a different root (the formal_production_* grammar lookup family, ranks 2–10 of the floor census), which is stage 2.

Instrument for re-derivation: required_floor_cross_claim_demand.tsv of the run, within-claim repeats = evals − claims per producer row; the ranking is on #11741.

Generated-artifact side effects

The two non-.dag hunks (.gitattributes, docs/design-rung-drops.md) are the CI auto-heal regenerating projections that were stale on this branch's merge base. The removal of the POSTSCRIPT, 2026-09-20 line in docs/design-rung-drops.md is not this PR dropping operator text: that line was a hand-edit to the generated file (never in the .dag row), main itself removed it in #11789, and origin/main carries zero occurrences today; this PR's file is byte-identical to main's.

🤖 Generated with Claude Code

…riving the 2^n ladder per candidate

integer_standard_integer_type_interval_spec called integer_machine_interval_spec
on every demand, a second way to compute a bound beside the int8..uint128
data rows that already carry each spec once per frame; the node decoder
folded it over all ten standard types per decode, so one integer-node
decode re-derived 2^127 and its siblings. On the required floor with the
eval-frame memo retired (run 35466872753) integer_pow2_magnitude was the
top within-claim recurrence: 22,715 repeats across 44 claims.

The projection now matches the type to its row (std.materialization_ladder
rule 1: one computation identity, carried), and the decoder compares
against a once-per-frame table of (type, interval node). Same value by
construction -- each row's body is integer_machine_interval_spec with the
literal signedness and width the matches produced -- and by execution:
interval_derivation_matches_all_legacy_spelled_bounds still holds against
hand-spelled bounds, from_node_round_trips_all_standard_types still holds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brian Searls and others added 3 commits September 20, 2026 03:22
Ledger-Repair-Judged: docs/design-rung-drops.md
Ledger-Rows-Repaired: docs/design-rung-drops.md namespace_wave_admission_wall_removed
Heal-Candidate-Run: 35486408641
… the pow2 ladder; digit primitives as tables

- integer_standard_integer_type_interval_nodes is list_map over
  integer_standard_integer_type_roster: one enumeration of the closed set.
- The annotation names the instrument (the floor's demand census) and
  transcribes no figure.
- integer_pow2_magnitude reads a once-per-frame ladder table for
  exponents up to 128 (built by the same doubling the recursion performs)
  so the ten widths share one chain's prefix instead of ten ladders.
- decimal_digit_of_units and nonzero_decimal_digit_of_positive_units are
  direct tables instead of roster scans; decimal_digit_double is its own
  twenty-row truth table. Same values: pow2_digit_shapes_hold and the
  hand-spelled legacy bounds still hold on both realizations.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title Seed eval memo keys every pure call before admission (O(n^2) on large string args) Integer interval decode reads the module's data rows; the 2^n ladder and digit primitives are carried tables (stage 1 of #11741's rewire program) Sep 20, 2026
@gunbai-bot

gunbai-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Reply to review 68856 (REQUEST_CHANGES), both findings verified and fixed in b4e9aa8: the annotation now names the instrument (the floor's demand census, within-claim repeats = evals − claims) and carries no transcribed figure; the decode table is list_map over integer_standard_integer_type_roster, so the closed set is enumerated once (an eleventh variant reaches the decoder through the roster, and the exhaustive match refuses if the row is missing). The PR title was the dashboard's session title, now replaced. Re-measuring after the first fix surfaced three more carries in the same ladder (pow2 table shared across widths; digit primitives as tables) — before/after table on the PR updated; the first-touching claim per frame is now 87k eval steps memo-retired (was 941k) and 49k memo-on (was 41k).

@gunbai-bot

gunbai-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Reply to review 68885 (REQUEST_CHANGES), which reviewed the auto-heal head b227fd9e4c. (1) The transcribed figures were already removed in b4e9aa8c39 (the annotation names the floor's demand census and carries no count or run id) — grep 22,715 src/v2/std/integer.dag is empty on the current head. (2) The rung-drop postscript: verified, and it is not this PR's deletion to carry. The POSTSCRIPT was a hand-edit to the generated docs/design-rung-drops.md on main (added by 77b62fc, never in the .dag row), and main's own regeneration in #11789 (d482860844) removed it the same way the auto-heal here did; after merging current main this PR's docs/design-rung-drops.md is byte-identical to origin/main's (git diff origin/main -- docs/design-rung-drops.md is empty). Restoring it belongs in the row gunbc.rung_drop.namespace_wave_admission_wall_removed on its own change by that lane; I am flagging it to the parent rather than folding an unrelated authority edit into stage 1. — sent from merry-fox-260

…git primitives stay as they were

The carried ladder is read by walking its Cons chain -- the nth Cons is
2^n by construction, running off the end continues doubling from the
last carried power -- so there is no indexed lookup and no miss arm
inside the carried range to absorb a deficit. The hand-authored digit
tables (decimal_digit_of_units, nonzero_decimal_digit_of_positive_units,
decimal_digit_double) are reverted: they re-minted the digit<->value
authority as a second table beside decimal_digit_value, and their
siblings still derived from it. One digit<->value row set with both
directions derived is its own change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Reply to review 68908 (REQUEST_CHANGES), all three findings verified and fixed in f5ca0df. (1)+(2) The digit primitives are reverted to main's derivations: the twenty-row doubling table and the hand-written inverses re-minted the digit↔value authority beside decimal_digit_value while decimal_digit_sub_borrow / decimal_nonzero_double still derived from it — agreed, a §3 fork; the one-row-set-both-directions shape is its own change and is not attempted here. (3) The 2^n ladder is now walked by structure (nth Cons is 2^n; running off the end continues doubling from the last carried power), so there is no list_at_optional and no miss arm inside the carried range — nothing to absorb. Re-measured: first-touching claim 941k → 379k eval steps memo-retired, 41k → 48k memo-on; 30/30 PASS both sides; before/after table on the PR updated.

…-stage1

# Conflicts:
#	docs/design-rung-drops.md
@briansrls
briansrls added this pull request to the merge queue Sep 20, 2026
Merged via the queue into main with commit d9e5b40 Sep 20, 2026
4 checks passed
@briansrls
briansrls deleted the session/merry-fox-260-stage1 branch September 20, 2026 16:24
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.

1 participant