Repository navigation
integer.dag §2 remodel: derive all interval bounds from the width axis; decode chain -> roster fold - #6313
Conversation
CI red @ f1752a4 investigated — systemic compile-wall, no fix to pushRun 28805933233: rust_tests PASS (32m); sole red is the Step log breakdown:
This is the same wall as every open PR and main today (compare #6314 receipt run 28798100556: 72m resolve + 51m batch-1). This PR's diff is not implicated; the f1752a4 head is just a main-integration merge picking up #6321. Fix vehicles, both open: #6326 (interim floor budget 135→195, receipt-backed) and #6315 (structural: affected-set-scoped compile-clean gate). Note for the budget re-derivation: resolve on this tree is now ~78m (up from 72m), so the wall grows with the corpus — the structural fix remains the real dissolution. No push; PR remains 2×-approved and mergeable. |
|
CI red @ c82a8d3 (auto-refresh merge of main): ci job killed at 10m17s — the by-design #6323 job-level kill (operator re-ruling 2026-07-06), not a defect; rust_tests in flight. Correction to my previous comment: #6326 (interim budget raise) was closed as superseded by #6323; the remaining fix vehicle for the wall is #6315 (affected-set-scoped compile-clean) plus the census-cliff parse work. Under the era-4 regime this PR's merge basis is approvals on HEAD + rust_tests green + mergeable — ci will stay dark by design until the wall dissolves. No push. |
integer.dag §2 remodel — every interval bound derived, zero hand-spelled constants
The exemplar PR for the "reduce repeated patterns to folds/modeling" lane (operator request 2026-07-06). Survey of the ailment across the corpus (signature scan: dense constructor-list literals, numbered fn families, else-if chains, duplicate fn bodies modulo digits) ranked
src/v2/std/integer.dagthe top real offender (score 35: 9 dense digit-lists + 2 numbered fn families). The remainder class (authorization pending this PR):extdeps/languages/{rust,ecmascript,wasm,python}.dag(5–11 near-identical stamped fn bodies each),realization_width.dag,cpp_abi.dag,dag/std/integer.dag.What dissolved
2^7−1…2^128−1as digit Cons-lists — int128's 38-digit magnitude spelled twice, ~8.7KB, 287 digit tokens). Every bound now derives from the width axis the Compose rows already declare:integer_machine_interval_spec(signedness, width_bits)=pow2by repeated decimal doubling +sub_oneby borrow fold. §5 upgrade: a transcription-wrong bound is now unwritable — nothing verified those digit strings before; now they cannot exist.from_node, each arm reconstructing a spec) → one fold overinteger_standard_integer_type_roster(chain order preserved).signedness/width_bitstables — the name↔axis facts).decimal_digit_valuebijection + two roster-fold inverses (decimal_digit_of_units,nonzero_decimal_digit_of_positive_units). All fns total; no impossible match arms (nonzero-ness carried structurally byNonZeroDoubleLead); noOutcomenoise.Honest size accounting
integer.dag: 782 → 946 lines (26.0 → 29.4KB). Hand-authored authority shrank massively (20 unverifiable constants → 0); raw lines grew because the file gains a genuinely new capability the substrate lacked: arbitrary-precision decimal arithmetic (double / sub-one / pow2 / canonicalize), ~200 lines, reusable (integer-literal rendering, emit lanes). integer.dag's repetition was constants needing an engine; the remainder files' repetition is fn-family stamping needing only dedup — those will show raw negative diffs.
Verification (all by execution, exact function named per receipt)
claim_batch --source-root src/v2 --entry src/v2/test/claim/integer/interval_derivation_test.dag --function <f>, release build @ afcbc5a, all PASS:interval_derivation_matches_all_legacy_spelled_bounds— the migration oracle: all 20 pre-remodel spelled bounds frozen VERBATIM as data rows in the witness; derived == legacy for all 10 specs (both bounds), 107ms.derivation_discriminates_planted_off_by_one— red control: a planted Int8 max=128 row is rejected (the oracle can go red).pow2_digit_shapes_hold— pow2(0)=1, pow2(7)=128, pow2(127) has 39 digits.interval_min_not_above_max_for_all_standard_types— roster property.from_node_round_trips_all_standard_types— decode(spec_node(t)) == Accepted(t), all 10.Consumers re-run green on final tree:
mvp_int_cross_target_coercion_test.dag::witness_cross_target_rust_i32_to_python_int_accepts(PASS, 7.7s — exercises Int32 bounds live through rust.dag emit + coercion_widening via the new derivation),staging_test.dag(5 PASS),byte_cardinality_grounding_test.dag(2 PASS).cargo test --workspacereceipt in comment below.Named follow-ups (not this PR, scope discipline)
decimal.dagsplit: the decimal-numeral vocabulary (~330 lines) is §3-honestly its own std concept, but its compares needint_compare, which lives in integer.dag (importers: typescript.dag, swift.dag) — re-homingint_compare(algebra.dag besideOrdering/OrderedRing?) is a §3 placement decision to make first.RustIntKindvsSignednessconstructor-name collision (Signed/Unsignedboth) — the Constructor-owner ruling (§1c): binding-edge resolution, collision wall, scan deleted — the engine PR #6235 wall forbids importing integer's constructors there; dissolves with the RustIntKind de-fork (31-duplicate census lane).integer_interval_bound_compare+ pointer-width tables) was deliberately NOT refactored: pointer-width symbolic comparisons encode semantic choices (e.g. Signed×Unsigned ⇒ Less regardless of endpoint) that a rank-projection rewrite could silently change; behavior preservation wins.🤖 Generated with Claude Code