Repository navigation
Census: the pre-#13029 nested-if else reader against the positional one (492 sites corpus-wide, 89 in compile's import closure) - #13051
Conversation
…pr row
body_lower_if_else_capture_optional searched the if's capture and, at any left
element that was not `else`, recursed LEFT before right. For
`if b { if c { X } else { Y } } else { Z }` it entered the then-arm and answered
the nested if's `else { Y }` as the outer else: Z was dropped, Y lowered twice,
and normalize ACCEPTED the module (silent wrongness, DESIGN §5). It was loud only
when Y held a function value, whose binder occurrence then appeared twice:
dag/std/materialization_ladder.dag value_materialization refused as
normalize_reason_minted_occurrence_duplicated, one of the native seven's file
refusals. body_lower_if_then_arm_optional searched the same way.
Both arm readers are now projections of body_lower_if_row_arms_optional, which
reads the two if_expr grammar rows by position (block: if cond fn_body else
(if_expr | fn_body); then-form: if cond then expr else expr) and answers Absent
for any other capture. The dead searching helper
body_lower_if_fn_body_capture_optional is deleted. The arm contract is
unchanged: an `else if` is answered as its if_expr shell, any other arm as its
production's captured child.
Claims: v2.test.claim.body_lowering.if_arm_position (an atom count over the
normalized tree, plus the function-value forms). Row: the capture side is filed
on gunbc.recurring_failure_mode else_arm_lowered_as_an_if_nested_inside_it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first floor run (37073686904) refused all four claims over the new-witness enrolment margin (353k-687k eval steps against 72300): each claim frame paid its own tokenize -> parse -> normalize. iap_verdicts computes the four verdicts once into four Bools (portable: no Node, no closure), each claim reads its field, and the producer is enrolled WARM in v2.workflow.floor_pure_producer_share beside eam_outcomes, the same ground. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`if false { if true {1} else {2} } else {3}` is 3. The searching else reader took
the nested `else { 2 }` as the outer else, so a body lowered through it answers 2.
The mirror (`if true { if false {1} else {2} } else {3}` is 2) holds under either
reader and is the control. The module is import-free: the floor evaluates it
through the seed, and the native lane through the emitted compiler's own body
lowering, where it is the discriminating red. It is not yet merge-blocking
evidence for the v2 reader, since the native lane is not a required lane.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rm readers against the positional reader Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…it usage the door control pins is unchanged Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
landed) Resolves the floor_pure_producer_share conflict (both rows kept) and rewords #13029's if_arm_position enrolment note to name the budget authority instead of transcribing a run id and step counts (tidy-raven-393, promised on #13029 for review 74369). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… a closed coproduct The floor refused NonFoldResidueRosterDiverged at iard_arm_detail, iard_arm_differs and iard_location: each matched a closed coproduct (IardArmComparison, Locus) with a wildcard. The arms are enumerated, so a new variant refuses to compile here instead of being absorbed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…byte control calm-boar-904 (via tidy-raven-393): iard_line_of counted newlines in substring(source, 0, offset), but the offset is a UTF-8 octet count (the tokenizer's ByteRange) and the emitted substring indexes scalars, so any multibyte character before a site raised the reported line. No line-from-octet reader exists in the corpus, so the census reports the byte range only, which is the span index's own authority. New control: a nested if after 2-, 3- and 4-octet scalars, located at octet 237 (scalar 223). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t_operation The class #13051's review caught: an octet ByteRange offset handed to scalar-indexed substring. The specimen is repaired in this PR; a read of all ~486 substring calls in dag/ and src/v2 found no other site. Rung: no wall; trigger: a distinct octet-offset type for ByteRange. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ader was a lens's, not absent The earlier wording said no line-from-octet reader existed in the corpus. One did, private to v2.lens.text_string_importer_census (newline_offsets); swift-lynx-592 is moving it into v2.std.source_position. The census still reports octet ranges only until that authority lands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
floor_pure_producer_share.dag, resolved per region: keep this PR's reworded iap_verdicts comment (it names the floor's enrolment-margin instrument; main still carried the transcribed run id this PR exists to remove), and keep both independent rows and their comments: this PR's iard_fixture_censuses and #13010's alb_verdicts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Parse-refusal census, durable record (calm-boar-904's ask). Producer: the native Totals: files_read=7331, files_refused=118: 86 N7 critical path (the refusals inside the native seven's import closure, from the lane's own file_refusal rows):
|
Conflict in v2.workflow.floor_pure_producer_share: main (#13051) added one hand warm row (if_arm_reader_differential.iard_fixture_censuses) to the roster this PR deletes; resolved to this PR's side and recorded for disposition. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ough IfRowElse #13051 (now on main) read IfRowArms.else_part, which this branch replaced with else_slot: IfRowElse. The census's new-reader else now answers through body_lower_if_row_else_part_optional (IfRowNoElse -> Absent), the same explicit no-else the lowering readers use. emit-build at 7668231 refused 'no field else_part on type IfRowArms'. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#13051 census, one run on current main (nimble-koi-276, for tidy-raven-393 / stern-bear-500)Tree: the content of main at
BuildBuddy invocation
Two kinds of row that #13051's run did not have:
Population:
All 523 rows (file decl arm kind @site-bytes)109 refused files |
|
Note for readers of the census above: the |
Follow-up to #13029 (calm-boar-904's ruling, option (a)): a census of the nested-if else-arm miscompile. Stacked on #13029's branch; it retargets to main when #13029 lands.
What it is
v2.cli.if_arm_reader_differential: a census-only module. For everyif_exprcapture in an ingest, it asks two readers for each arm. One is a frozen copy of the pre-v2 body_lowering_fold: an if's arms are read at their slots, not searched (nested-if else arm silently dropped) #13029 searching readers:body_lower_if_else_capture_optional,_if_fn_body_capture_optional,_if_then_arm_optionaland_if_then_fn_body_optional. They are main's text with only the names changed, and every helper they call is byte-identical on main and on v2 body_lowering_fold: an if's arms are read at their slots, not searched (nested-if else arm silently dropped) #13029. The other is v2 body_lowering_fold: an if's arms are read at their slots, not searched (nested-if else arm silently dropped) #13029's positionalbody_lower_if_row_arms_optional.v2.lens.text_string_importer_censusnewline_offsets); swift-lynx-592 is moving it intov2.std.source_position, and lines can return through that later. Deriving lines withsubstring(which counts characters) put them too high on non-ASCII files. See the correction under Evidence.if_arm_reader_differential_dissolve: the module, its readers and the verb are deleted together once the population is dispositioned.body_lowering_fold's readers are unchanged.v2.cli.compile_cli(NativeCliDriver). That door already acquires its plan's source roots natively throughgunbc.source_root_read, so no new driver kind and no seed Rust are needed. The verb isif-arm-reader-differential --source-root <dir>..., named narrowly so it does not read as the general census (silent-stag-648's lane owns that, on the native driver). It has its own usage line; the emit usage line the door's refusal control checks verbatim is unchanged.Evidence
Fixture claims (
v2.test.claim.cli.if_arm_reader_differential, enrolled warm), 5/5 PASS viaclaim_batchon this head:if a { if b {1} else {2} } else {3}. Exactly one site differs, on the else arm, with the row naming the declaration, line 7, old answer at line 8 and new at line 9. A census reporting 0 therefore cannot hide a broken comparator.else ifchain and an if nested in the else arm. All 4 sites agree.The run:
gunbc test //gunbc/instruments:v2-native-cli(built cleanly: exit 0, 0 warnings), then the kept generation-one binary withif-arm-reader-differential --source-root dag --source-root src/v2. It took 12m18s natively.v2.compiler.compile's transitive import closure (217 files, 4 of them refused). This is an offline approximation of the reference-derived closure: theemitthat would list the exact members did not finish within the dispatch deadline.parse_g0_tokens_remain). Their sites are unknown, so the population is a floor, not a total.dag/extdeps/accounting/budget.dagbudget_balance, line 39,if spent<=ceiling { if ceiling<=spent {Balanced} else {Surplus} } else {Deficit}. The old reader answered{Surplus}(line 40) for the outer else; the real one isDeficit(line 41).materialization_laddervalue_materialization, andtarget_model) are both in the population.The per-site list is posted on #13029.
Correction (calm-boar-904's objection)
The first run's rows carried
line=, derived by counting newlines insubstring(source, 0, byte_offset). The emittedsubstringcounts characters, so any multibyte character before a site pushed its line too high: 250 of 492 rows, in 144 files. The counts were never affected.if/{token.gunbc.recurring_failure_modeoctet_offset_consumed_by_a_scalar_indexed_text_operation. A read of all ~486substringcalls indag/andsrc/v2/found no other site passing a byte offset.ByteRange, whichsubstringwould not accept.Not in this PR
gunbc testinstrument row. DESIGN "Building & checks" says a new measurement is a row, and silent-stag-648 suggested one. But the verb is run from the binary thev2-native-cliinstrument already keeps, and a row of its own needs a producer arm in the seed. calm-boar-904's ruling chose the verb over a row. Flagging it for the reviewer.🤖 Generated with Claude Code