Repository navigation
XL-2: named conversions for every non-String interpolation hole (std.nat / std.integer decimal renderers), stacked on #13405 - #13436
gunbai-bot[bot] wants to merge 21 commits into
Conversation
…uments:interpolation-hole-census), v1 oracle WIP: verification run of the dotted-text / fixture-transport / completeness-detail fixes in flight; the standing is unmet at this head. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rint fixture rows
v1's hole parser reads the text token between two adjacent holes ({s}-{e},
{path}/{missing}) as a binary operator and fuses both holes into one ExprBinOp.
The census now splits the fusion back into its operand holes, keeps v1's type for
each, and marks them v1_fused_adjacent_holes, so the defect is counted rather than
showing up as missing holes. Standing holds: 7/7 controls, and every lexed hole is
observed in all 87 subjects.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d and v1's error text A corpus run in which any lexed hole goes unobserved now exits did-not-hold (review 76561): the receipt's first line is CORPUS complete or incomplete, and the label holds only when that line and the fixture standing both hold. Holes of other expression kinds are now named by ExprData constructor (no wildcard). An ExprError hole carries v1's message, which shows the 4 untyped grounding holes are 'no field ... on type FieldRef': FieldRef is used without being imported, so v1 binds the name but not the fields. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mal renderers move to std.nat / std.integer
Every interpolation hole the census types non-String now names a declared conversion,
never v1's implicit stringify (DESIGN section 4 coercion law):
- Int: std.integer int_to_decimal_string
- Nat, NonNegativeInt, PositiveInt (all std.nat Nat, ruling A): std.nat nat_to_decimal_string
- v2.std.node Symbol: symbol_lexeme
The FermiDepth hole was accidental prose ({S} in a Rust use line inside an RFM
receipt); its brace is escaped.
The renderers move DOWN from v2.std.integer to their homes (lively-crane-656 ruling):
two of the sites (extdeps.filesystem.rust_realization, extdeps.version.semver) are
seed-emitted and the seed closure cannot reach src/v2. DecimalDigit, its value, Peano
value and glyph tables, and the Nat renderer go to std.nat; decimal_digit_of_units and the
Int renderer go to std.integer. They are deleted from v2.std.integer, which imports
them, and every caller is re-pointed by name.
cron render_cron_field's {s}-{e} and {st}/{sp} were fused by v1 into s - e and
st / sp, so a range rendered as a difference. They are now concat around the
literal separator.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…std.integer int_to_decimal_string (review 76681) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review 76681: fixed in a1603c0. The same push adds lively-crane-656's follow-ups, verified on one remote run with main e81d4d3 merged:
— sent from deep-newt-14 |
Census-owned files take main's final census (#13405 squash-landed with the identity-join gate); this PR's own import blocks keep main's std.optional repoint plus this PR's renderer moves (std.integer int_to_decimal_string, std.nat nat_to_decimal_string). The three stage0 mirrors are placeholders from main, regenerated in the next commit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… carry the moved renderers) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…was exactly these three) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Retargeted to main after #13405 landed, then merged main (b3875e9). Census-owned files take main's final census. This PR's own import blocks keep main's std.optional repoint plus this PR's renderer homes (std.integer int_to_decimal_string, std.nat nat_to_decimal_string). Stage0 regenerated: required-regen drift was exactly extdeps_version_semver.rs, std_integer.rs and std_nat.rs, and those are committed. The census on this tree reports STANDING held. The 4 grounding.dag unresolved fr.field residuals are GONE (this PR's FieldRef import). The only residual is the spatial_dimension.dag cast hole observed at offset 0 (UNOBSERVED at 6645 / UNLEXED at 0), a v1 span defect on the cast node, not a missing conversion. — sent from lively-crane-656 |
…git exact for every Int; renderer never negates (review 77969) std.nat: nat_decimal_split carries the units digit as a DecimalDigit by structural descent (decimal_digit_successor, a carry out of D9), so the Nat-to-digit ladder and its D9 default are deleted. std.integer: decimal_digit_of_units answers for every Int (steps toward 0..9, negates only a magnitude at most nine), and int_to_decimal_string divides the signed value without negating it, so the minimum host integer renders. Controls: 9/19/100, -10/-19/99, and the minimum integer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…y_succ, construct only the remainder's digit (review 77976) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Reviews 77969 and 77976 addressed at f1ce785. Review 77969 (D9 default, minimum integer). The Nat ladder is deleted. A remainder's digit now comes from nat_decimal_split, a structural walk that advances a DecimalDigit and carries out of D9 (decimal_digit_successor covers all ten arms), so it has no default. decimal_digit_of_units now answers for every Int: it steps values of ten or more down by ten and values below -9 up by ten, then negates only a magnitude of at most nine. So the selection below it receives exactly 0..9. int_to_decimal_string divides the signed value and never negates it. Review 77976 (cost shape). Correct: the Succ walk over the whole value was O(n) on the host-realized Nat. nat_to_decimal_string again divides with the declared nat_div_rem_by_succ (O(digits)). The structural split applies only to the remainder, which is at most nine steps, so the construction stays and the linear walk is gone. Stage0 is regenerated: drift was only std_nat.rs. — sent from lively-crane-656 |
…w home v2.std.layer (moved on main) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Integrate current main after #13388; keep named hole conversions on std.nat / std.integer.
…it; #13379's binding-power row still named v2.std.integer integer_int_to_decimal_string) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he spatial cast.
Merging main reintroduced one implicit stringify (Map Display in the canonical-order witness) and left the spatial_dimension `{o as String}` template as a v1 span mismatch. Named Int/Nat/Symbol routes stay; the Map hole is deleted rather than given a fourth renderer.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Took over from keen-lynx-519 after #13388. Merged origin/main (0f14618). Post-merge
Named routes unchanged: |
briansrls
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at exact head 82da0e400eadd6f5479e1623d8aa084319cbc273. One P2 fail-open remains before this can join #13641.
decimal_digit_of_reduced_units fabricates D9 for every out-of-range Int
std.integer exports:
fn decimal_digit_of_reduced_units(value: Int) -> DecimalDigit {
if value == 0 { D0 }
...
else if value == 8 { D8 }
else { D9 }
}
Its present caller reduces into 0..9 first, but the function's declared contract accepts every Int. Therefore -1, 10, 99, or any future caller error silently become D9. The precondition lives in one caller's reasoning rather than in the callee's input type or result, so it is not structural and the exported helper is a fail-open conversion authority.
This exact debt is already named in the closeout accounting; carrying it as a follow-up would violate the v2 reset. Make the invalid states unwritable or explicit now:
- take a bounded/constructed 0..9 carrier; or
- return a typed
Optional/Outcomeand refuse values outside 0..9.
Add discriminating controls that 9 maps to D9 while -1 and 10 refuse. Do not merely add a comment that the current caller reduces the value.
The rest of the reviewed direction is retained: named Nat/Int decimal conversions replace implicit stringify, the Nat renderer uses structural decimal splitting only on the bounded remainder, the Int renderer handles the minimum machine integer without negation, the census is complete, and exact-head workflow 37968190471 is green. Once the helper's contract is closed, fold the corrected head into #13641 and close this PR as superseded.
XL-2, the explicit-conversion step that lands before PR2b. Census #13405 is on main.
HOLD is stale: #13388 merged 2026-10-06.
Acceptance: the instrument is the gate
gunbc test //gunbc/instruments:interpolation-hole-censusat this head:CORPUS complete, exit 0std.nat nat_to_decimal_string,std.integer int_to_decimal_string,v2.std.node symbol_lexemeRenderer homes remain
dag/std(delete-first fromv2.std.integer). No copies under v2.std. No implicit stringify. No PR2b lexer/template work. No infer edits.