diff --git a/dag/gunbc/recurring_failure_mode/emitted_field_carrier_diverges_from_the_dag_type_authored_against.dag b/dag/gunbc/recurring_failure_mode/emitted_field_carrier_diverges_from_the_dag_type_authored_against.dag new file mode 100644 index 00000000000..a7aab21206d --- /dev/null +++ b/dag/gunbc/recurring_failure_mode/emitted_field_carrier_diverges_from_the_dag_type_authored_against.dag @@ -0,0 +1,38 @@ +module gunbc.recurring_failure_mode.emitted_field_carrier_diverges_from_the_dag_type_authored_against + +import std.types { NonEmptyStr } +import std.decl_ref { DeclarationRef, WholeDeclaration } +import gunbc.recurring_failure_mode { RecurringFailureMode } + +data emitted_field_carrier_diverges_from_the_dag_type_authored_against: RecurringFailureMode = RecurringFailureMode { + identity: "emitted_field_carrier_diverges_from_the_dag_type_authored_against" as NonEmptyStr, + + receipts: [ + "**hand-authored target text binds an emitted field whose carrier the .dag declaration does not reveal** INVALID STATE: target-language text authored INSIDE an emitter template reads a field of a carrier type declared in `.dag`, and the field's emitted Rust carrier is decided by a whole-corpus analysis that is not reachable from the declaration the author is reading.", + + "The `.dag` side is accepted with zero diagnostics, the EMISSION of that declaration is correct, and the only thing wrong is the hand-authored text that binds it -- so nothing in the substrate refuses and the target compiler is the only wall.", + + "HARM: section 5 silent wrongness at the emitter's own authoring boundary, and it is paid in WALL TIME rather than in a wrong answer. The refusal is real and typed once rustc sees it, but rustc sees it only after the seed emits the whole closure and cargo builds it -- measured at roughly fifteen minutes on `--v2-native-route` before the first diagnostic -- so the feedback loop for a one-token mistake is an emit-and-build cycle.", + + "THE DISTINGUISHING FACT, and the reason this is not `accepted_source_emits_uncompilable_target`: THERE THE EMISSION IS WRONG, here the emission is RIGHT and the hand-authored consumer of it is wrong. That class files a `.dag` construction whose emitted form rustc refuses (a coproduct unit variant in a non-applied type position); this class files correct `.dag`, correct emission, and a template that guessed the carrier. A repair to the emitter's type lowering fixes that class and does nothing for this one.", + + "THE RULE THE AUTHOR CANNOT SEE, stated because the obvious summary of it is WRONG. `v1.compiler.emit_rust` `needs_box_wrapping` boxes a field whose type is in `recursive_types`, and an OPTIONAL-cardinality field inherits that decision from its inner type by recursing with required cardinality; `rust_field_carrier_final_type` then renders `Box`. So it is NOT 'an Optional field boxes' -- whether it boxes depends on whether its inner type rides a recursion cycle, which is a property of the WHOLE CORPUS and not of the declaration. Two fields spelled with the same cardinality in the same record can take different carriers, and neither spelling says so.", + + "SPECIMEN, gunbc PR 11206 (perf item C instrument, draft), 2026-09-12. A new carrier `v2.compiler.compile` `NativeTestFrontEnd` carries `residue: Diagnostics`, where `v2.std.diagnostic` `Diagnostics` is `Optional` and `NonEmptyDiagnostics` is recursive. The field emitted as `Box>>` while `v2.compiler.program_assembly` `program_assembly_phase_parse` takes `residue` by value, so the emitter template's `front_end.residue.clone()` cloned the Box: `error[E0308]: expected Option>, found Box>>` at `src/main.rs:407`, help `consider unboxing the value`. The sibling fields on the same carrier -- `lm: LanguageModel`, `prepared: PreparedGrammar` -- took `Rc<..>` and their `.clone()` was correct, which is exactly the per-field divergence this row names. Repair: `(*front_end.residue).clone()`.", + + "WHAT DID NOT CATCH IT, each checked rather than assumed: `gunbc run` typechecked both changed modules under the whole `dag` + `src/v2` closure and was green; `cargo fmt --all --check` passed; `claim_executor --required-regen` regenerated the emitter's own projection and adjudicated it, reaching `first_generation_equal` on the file CONTAINING the defective template text, because regen compares emitted BYTES against the authority and never compiles the program those bytes describe.", + + "RUNG FOUND AT: mitigatable. The failure is contained -- a typed, located rustc diagnostic naming file, line and the expected and found types -- and `--v2-native-route` refuses with `EmittedCompilerBuildFailed` rather than proceeding. Nothing is silently wrong at runtime. What is NOT contained is the cost of finding out, and nothing at the authoring boundary is typed or countable about the divergence.", + + "ATTAINABLE CEILING: structurally impossible, 4, and the reason is that both facts are already modelled and decidable. The field's `.dag` type is a declaration; the emitted carrier is a pure function of that declaration and the recursive-type set (`needs_box_wrapping`); so the carrier a template must write is DERIVABLE and the template should not be authoring a guess at it. A template that names the field and lets the emitter render the access has no constructor for the wrong carrier. No undecidable predicate is involved, so this is a wall after grounding rather than a ratchet.", + + "NEXT-RUNG TRIGGER, naming the CAPABILITY: emitter templates reference an emitted carrier's field through a producer that renders the access FROM the field's resolved type and the recursive-type set -- the same join `rust_field_carrier_final_type` already performs when it emits the struct -- sufficient that no hand-authored template can spell a field access whose carrier disagrees with the declaration. A trigger naming a lint over template text, a comment beside the field, or a one-off repair of this call site does NOT discharge it: those are artifacts that would contribute to the capability, and the population is every hand-authored field access in every emitter template, not this one.", + + "UNCERTAINTY CARRIED RATHER THAN ROUNDED OFF: one specimen, on one carrier, in one template, found by compiling rather than by a census. The size of the exposed population -- how many field accesses in `v1.compiler.emit_rust`'s rendered templates bind a field whose carrier is decided by `needs_box_wrapping` -- has NOT been counted, so this row does not claim a frequency.", + ], + + evidence: [ + DeclarationRef { module_path: "v1.compiler.emit_rust", decl_name: "needs_box_wrapping", field: WholeDeclaration }, + DeclarationRef { module_path: "v1.compiler.emit_rust", decl_name: "rust_field_carrier_final_type", field: WholeDeclaration }, + ], +} diff --git a/dag/gunbc/recurring_failure_mode/realization_respells_a_modeled_folds_sequencing_to_instrument_it.dag b/dag/gunbc/recurring_failure_mode/realization_respells_a_modeled_folds_sequencing_to_instrument_it.dag new file mode 100644 index 00000000000..b72b9363a9e --- /dev/null +++ b/dag/gunbc/recurring_failure_mode/realization_respells_a_modeled_folds_sequencing_to_instrument_it.dag @@ -0,0 +1,41 @@ +module gunbc.recurring_failure_mode.realization_respells_a_modeled_folds_sequencing_to_instrument_it + +import std.types { NonEmptyStr } +import std.decl_ref { DeclarationRef, WholeDeclaration } +import gunbc.recurring_failure_mode { RecurringFailureMode } + +data realization_respells_a_modeled_folds_sequencing_to_instrument_it: RecurringFailureMode = RecurringFailureMode { + identity: "realization_respells_a_modeled_folds_sequencing_to_instrument_it" as NonEmptyStr, + + receipts: [ + "**a realization re-spells a modeled fold's sequencing because the fold cannot be instrumented in place** INVALID STATE: a driver that owns a clock needs per-phase cost from a fold whose phases are modeled in `.dag`; `.dag` is pure and cannot read a clock, so the driver enters the phases one at a time and the ORDER and the DIAGNOSTIC PROPAGATION between them exist a second time, in the target language, equivalent to the modeled composition only by assertion.", + + "HARM: section 5 silent wrongness. Reordering the driver's phases, or dropping a diagnostic merge the modeled composition performs, produces a different result with nothing red -- the modeled fold still type-checks, the emitted crate still builds, and the receipt the driver prints is about cost rather than about agreement.", + + "THIS IS NOT `parallel_representation_debt`, and the difference decides the remedy. There the canonical route was USABLE and the duplicate was deletable -- a hand-authored `*_eq` beside the substrate's own `==`, removed once a probe showed `==` answers. Here the modeled route CANNOT answer the question asked of it: it yields one span for the whole fold, and the question is what each phase costs. Deleting the re-spelling deletes the measurement. The duplication is FORCED by a missing capability, which is why this row names that capability rather than prescribing a deletion.", + + "THE REMEDY THAT LOOKS OBVIOUS IS VACUOUS, AND THAT IS THE POINT OF FILING THIS. A witness comparing the modeled composition against the modeled phases cannot go red: the composition is DEFINED as the phase chain, so such a witness compares a definition with itself. DESIGN section 4b says to ask whether the check's RED is AUTHORABLE before writing the check, and here it is not -- the state that must be caught is a REORDERED TARGET-LANGUAGE TEMPLATE, which is not representable in `.dag` at all and so is unreachable by any `.dag` fixture. A green equivalence witness would therefore be a decoration that gets cited as coverage, which section 4b calls worse than absent.", + + "WHAT IS ALREADY SINGLE-AUTHORED, so the row is not read as wider than it is. Only the ordering and the inter-phase diagnostic merge are re-spelled. The absorbing half of the step -- the qualified-name read and the source-root index insertion -- stays one declaration that the driver calls (`v2.compiler.compile` `native_test_context_absorb`), the per-phase bodies are each one modeled declaration, and the unmeasured composition remains live and is executed by the SAME BINARY in its census mode, so the two spellings ship together rather than one replacing the other.", + + "SPECIMEN, gunbc PR 11219 (perf item C instrument), 2026-09-13, found by review 65068 rather than by a mechanism. `v2.compiler.program_assembly` `program_assembly_read_to_normalized_root_prepared` composes tokenize, parse and normalize in one declaration, each phase binding the previous phase's `Outcome`. The emitted `std.compiler_entry.SourceRootEvalDriver` opens that sequence as a Rust `for` loop over the ingest -- `program_assembly_phase_tokenize`, then `program_assembly_phase_parse_measured`, then `program_assembly_measured_outcome`, then `program_assembly_phase_normalize`, then `native_test_context_absorb` -- so that each call can be bracketed by `Instant::now()`. The diff's own comment asserted the equivalence in prose; nothing executed it.", + + "IT IS THE MODULE THAT OWNS THE ORDER THAT IS FORKED, AND AN EARLIER REVISION OF THIS ROW DID NOT REACH IT (review 65114). The row first argued only against `v2.compiler.program_assembly` `program_assembly_read_to_normalized_root_prepared`, the composition sitting beside the phases. The declared authority for the .dag front-end ORDER is `v2.compiler.staged_front_end`, whose own header names re-inlining its calls as the section-3 nickname class; a per-phase decomposition authored anywhere else is a second copy of THAT order, and saying so against the local composition understated the fork.", + + "WHY THE AUTHORITY CANNOT BE CONSUMED AS IT STANDS, measured rather than asserted: `run_front_end_to` calls `dag_language_model()` per call, and `front_end_parse_step` calls `parse_module` with a RAW grammar, so a fold routed through it re-derives the language model and re-runs `prepare_grammar` ONCE PER FILE -- the two per-file recomputes the context fold already hoisted, priced by the instrument that found this class at ONE call and 0.13 s for a 2243-file closure. It also runs a fourth stage (resolve) the context fold does not perform, and returns a whole FrontEndRun rather than stages a clock can sit between. So the fork is forced by the same missing capability this row names, one layer up.", + + "RUNG FOUND AT: mitigatable. What contains the class today is that every phase BODY is a single modeled declaration and the absorbed half is single-authored, so a drift can only be an ordering or a merge, not a divergent computation; and the composition stays live beside the re-spelling. Nothing is typed, located or countable about the agreement itself, and no mechanism would report a reordering.", + + "ATTAINABLE CEILING: structurally guaranteed, and deliberately NOT structural impossibility. With a realization seam that yields per-phase spans FROM a modeled fold, a driver needing per-phase cost names the fold and receives the spans, so an accepted program contains one sequencing and the second cannot be derived from it. It stops short of impossibility because the source could still describe a hand-rolled sequence in a target template -- the seam removes the REASON to re-spell, not the ability -- and claiming rung 4 for a state that stays authorable would be the rung inflation section 4b(1) names.", + + "NEXT-RUNG TRIGGER, naming the CAPABILITY: a realization seam that produces per-phase spans and counts from a modeled fold WITHOUT re-authoring its sequencing -- sufficient that a driver wanting the split calls the fold and receives the spans. FOR THE SPECIMEN THAT MEANS a prepared-grammar, resolve-free, per-stage entry on `v2.compiler.staged_front_end`, after which the phases in `v2.compiler.program_assembly` are projections of that authority and the divergence note beside them is deleted. Explicitly NOT discharged by: a witness comparing the modeled composition against its own phases (vacuous, see above); a comment asserting the two agree; a lint over template text; or repairing this one driver. The population is every clock-owning realization that wants a split of a modeled fold, not this instrument.", + + "UNCERTAINTY CARRIED RATHER THAN ROUNDED OFF: one specimen, one driver, one fold. Whether other emitted drivers already re-spell a modeled fold's sequencing to instrument it has NOT been counted, so this row claims no frequency.", + ], + + evidence: [ + DeclarationRef { module_path: "v2.compiler.program_assembly", decl_name: "program_assembly_read_to_normalized_root_prepared", field: WholeDeclaration }, + DeclarationRef { module_path: "v2.compiler.staged_front_end", decl_name: "run_front_end_to", field: WholeDeclaration }, + DeclarationRef { module_path: "v2.compiler.compile", decl_name: "native_test_context_absorb", field: WholeDeclaration }, + ], +} diff --git a/src/v1/05_emit_rust.dag b/src/v1/05_emit_rust.dag index 20269f66951..ccf34fbdc6a 100644 --- a/src/v1/05_emit_rust.dag +++ b/src/v1/05_emit_rust.dag @@ -17045,10 +17045,18 @@ fn emit_source_root_eval_driver_main_rs(crate_name: String, pipeline_module: Str " native_lane_module_resolution,", "\n", " native_lane_closure_ingest, native_lane_closure_modules, native_lane_closure_round_budget,", "\n", " native_lane_ingest_matches_closure, native_lane_ingest_receipt, native_lane_receipt,", "\n", - " native_lane_source_facts, native_lane_universe, native_test_context_from_ingest,", "\n", + " native_lane_source_facts, native_lane_universe, native_test_context_absorb,", "\n", + " native_test_context_finish, native_test_context_from_ingest, native_test_context_state_empty,", "\n", + " native_test_front_end_prepare,", "\n", " NativeLaneHostFacts, NativeLaneModulePreparation, NativeLaneModuleResolution,", "\n", " NativeRouteMemberRow,", "\n", "\};", "\n", + "use ", crate_name, "::v2_compiler_program_assembly::\{", "\n", + " program_assembly_measured_outcome, program_assembly_memo_hits,", "\n", + " program_assembly_memo_lookup_calls, program_assembly_memo_misses,", "\n", + " program_assembly_phase_normalize, program_assembly_phase_parse_measured,", "\n", + " program_assembly_phase_token_count, program_assembly_phase_tokenize,", "\n", + "\};", "\n", "use ", crate_name, "::gunbc_witness_v2_native_route::\{", "\n", " native_route_admission, native_route_admission_summary, native_route_admitted,", "\n", " native_route_file_refusal_tally,", "\n", @@ -17393,16 +17401,145 @@ fn emit_source_root_eval_driver_main_rs(crate_name: String, pipeline_module: Str " \}", "\n", " let universe_nanos = span_nanos(universe_started);", "\n", "", "\n", - " // the context row: the front-end fold -- tokenize, parse, normalize -- over the CLOSURE only.", "\n", + " // the context row: the front-end fold over the CLOSURE only, entered ONE PHASE AT A TIME.", "\n", + " // The driver owns the clock, so it is the only place a phase span can be read; the phases", "\n", + " // themselves are v2.compiler.program_assembly declarations and each binds the previous", "\n", + " // phase's Outcome, so each phase BODY is single-authored and only the ORDER and the", "\n", + " // inter-phase diagnostic merge exist twice -- here and in the modeled composition", "\n", + " // program_assembly_read_to_normalized_root_prepared.", "\n", + " //", "\n", + " // THAT SECOND SPELLING IS ADMITTED DEBT AND IS FILED, NOT ASSERTED AWAY (review 65068):", "\n", + " // gunbc.recurring_failure_mode.realization_respells_a_modeled_folds_sequencing_to_instrument_it.", "\n", + " // An earlier revision of this comment claimed the two are the same computation. Nothing", "\n", + " // executes that claim, and a .dag witness comparing the composition against its own phases", "\n", + " // CANNOT go red -- the composition is defined as the phase chain -- so the honest answer is", "\n", + " // the row and its trigger (a realization seam that yields per-phase spans FROM a modeled", "\n", + " // fold), not a green check. Reordering these calls or dropping the merge that", "\n", + " // program_assembly_phase_parse_measured performs would change the context with nothing red.", "\n", " let context_started = Instant::now();", "\n", - " let context = match &*native_test_context_from_ingest(closure_ingest) \{", "\n", + " // THE ONCE-PER-FOLD INVARIANT IS PAID ONCE, HERE, AND CARRIED INTO EVERY FILE. A second", "\n", + " // dag_language_model() or prepare_grammar() call inside the loop would re-introduce at the", "\n", + " // realization layer exactly the per-file recompute the fold hoisted out.", "\n", + " let front_end = match &*native_test_front_end_prepare() \{", "\n", " Outcome::Accepted \{ value, .. \} => value.clone(),", "\n", " Outcome::Rejected \{ diagnostics \} => \{", "\n", " eprintln!(\"CONTEXT-REFUSED: \{diagnostics:#?\}\");", "\n", " std::process::exit(1);", "\n", " \}", "\n", " \};", "\n", + " let front_end_nanos = span_nanos(context_started);", "\n", + " let mut context_state = native_test_context_state_empty();", "\n", + " let mut tokenize_nanos: u128 = 0;", "\n", + " let mut parse_nanos: u128 = 0;", "\n", + " let mut normalize_nanos: u128 = 0;", "\n", + " let mut absorb_nanos: u128 = 0;", "\n", + " let mut phase_calls: u64 = 0;", "\n", + " let mut token_total: u64 = 0;", "\n", + " let mut memo_hits_total: u64 = 0;", "\n", + " let mut memo_misses_total: u64 = 0;", "\n", + " let mut memo_lookups_total: u64 = 0;", "\n", + " let mut byte_total: u64 = 0;", "\n", + " let mut context_file_samples: Vec = Vec::new();", "\n", + " for read in closure_ingest.iter() \{", "\n", + " let file_started = Instant::now();", "\n", + " let tokenize_started = Instant::now();", "\n", + " let tokens = program_assembly_phase_tokenize(read.clone(), front_end.lm.clone());", "\n", + " let file_tokenize_nanos = span_nanos(tokenize_started);", "\n", + " // The COUNT the time is read against: a span alone cannot separate a large file from a", "\n", + " // per-file constant. Counted outside every phase span so it prices none of them.", "\n", + " let file_tokens = program_assembly_phase_token_count(tokens.clone());", "\n", + " let parse_started = Instant::now();", "\n", + " let measured = program_assembly_phase_parse_measured(", "\n", + " tokens.clone(),", "\n", + " front_end.prepared.clone(),", "\n", + " // The residue field is an Optional whose inner type rides a recursion cycle, so the", "\n", + " // emitted record BOXES it while the phase takes the option by value. Deref the box", "\n", + " // rather than clone it; the sibling fields above are Rc and clone correctly.", "\n", + " (*front_end.residue).clone(),", "\n", + " );", "\n", + " let file_parse_nanos = span_nanos(parse_started);", "\n", + " // The memo accounting rides BESIDE the outcome, so it reports on a refusal too --", "\n", + " // which is the expensive case this instrument exists to read. Counted outside every", "\n", + " // phase span so it prices none of them.", "\n", + " let file_memo_hits = program_assembly_memo_hits(measured.clone());", "\n", + " let file_memo_misses = program_assembly_memo_misses(measured.clone());", "\n", + " let file_memo_lookups = program_assembly_memo_lookup_calls(measured.clone());", "\n", + " let parsed = program_assembly_measured_outcome(measured);", "\n", + " let normalize_started = Instant::now();", "\n", + " let root = program_assembly_phase_normalize(parsed.clone());", "\n", + " let file_normalize_nanos = span_nanos(normalize_started);", "\n", + " // qualified-name read plus source-root index insertion: the half of the per-file step", "\n", + " // that is not the front end, timed separately because a quadratic accumulator would", "\n", + " // live here and nowhere else in this loop.", "\n", + " let absorb_started = Instant::now();", "\n", + " context_state = native_test_context_absorb(context_state.clone(), read.clone(), root.clone());", "\n", + " let file_absorb_nanos = span_nanos(absorb_started);", "\n", + " let file_nanos = span_nanos(file_started);", "\n", + " tokenize_nanos += file_tokenize_nanos;", "\n", + " parse_nanos += file_parse_nanos;", "\n", + " normalize_nanos += file_normalize_nanos;", "\n", + " absorb_nanos += file_absorb_nanos;", "\n", + " phase_calls += 1;", "\n", + " token_total += file_tokens.max(0) as u64;", "\n", + " memo_hits_total += file_memo_hits.max(0) as u64;", "\n", + " memo_misses_total += file_memo_misses.max(0) as u64;", "\n", + " memo_lookups_total += file_memo_lookups.max(0) as u64;", "\n", + " let file_bytes = read.source.carried.len() as u64;", "\n", + " byte_total += file_bytes;", "\n", + " context_file_samples.push(file_nanos);", "\n", + " eprintln!(", "\n", + " \"[native-context-split] {}\",", "\n", + " serde_json::json!(\{", "\n", + " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",", "\n", + " \"path\": read.compilation_unit.clone(),", "\n", + " \"bytes\": file_bytes,", "\n", + " \"tokens\": file_tokens,", "\n", + " \"tokenize_nanos\": file_tokenize_nanos,", "\n", + " \"parse_nanos\": file_parse_nanos,", "\n", + " \"normalize_nanos\": file_normalize_nanos,", "\n", + " \"absorb_nanos\": file_absorb_nanos,", "\n", + " \"file_nanos\": file_nanos,", "\n", + " \"memo_hits\": file_memo_hits,", "\n", + " \"memo_misses\": file_memo_misses,", "\n", + " \"memo_lookup_calls\": file_memo_lookups,", "\n", + " \}),", "\n", + " );", "\n", + " \}", "\n", + " let context = native_test_context_finish(context_state, closure_ingest.clone());", "\n", " let context_nanos = span_nanos(context_started);", "\n", + " context_file_samples.sort_unstable();", "\n", + " let context_phase_sum = front_end_nanos + tokenize_nanos + parse_nanos + normalize_nanos + absorb_nanos;", "\n", + " eprintln!(", "\n", + " \"[native-context-partition] {}\",", "\n", + " serde_json::json!(\{", "\n", + " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",", "\n", + " \"basis\": \"context_span\",", "\n", + " \"basis_note\": \"exclusive phase rows partition context_nanos; residual is loop overhead and the eprintln per file\",", "\n", + " \"context_nanos\": context_nanos,", "\n", + " \"front_end_prepare_nanos\": front_end_nanos,", "\n", + " \"tokenize_nanos\": tokenize_nanos,", "\n", + " \"parse_nanos\": parse_nanos,", "\n", + " \"normalize_nanos\": normalize_nanos,", "\n", + " \"absorb_nanos\": absorb_nanos,", "\n", + " \"sum_phase_nanos\": context_phase_sum,", "\n", + " \"residual_nanos\": context_nanos.saturating_sub(context_phase_sum),", "\n", + " \"files\": phase_calls,", "\n", + " \"tokenize_calls\": phase_calls,", "\n", + " \"parse_calls\": phase_calls,", "\n", + " \"normalize_calls\": phase_calls,", "\n", + " \"absorb_calls\": phase_calls,", "\n", + " \"front_end_prepare_calls\": 1,", "\n", + " \"tokens\": token_total,", "\n", + " \"memo_hits\": memo_hits_total,", "\n", + " \"memo_misses\": memo_misses_total,", "\n", + " \"memo_lookup_calls\": memo_lookups_total,", "\n", + " \"bytes\": byte_total,", "\n", + " \"file_refusals\": context.file_refusals.len(),", "\n", + " \"file_p50_nanos\": native_cost_quantile_nanos(&context_file_samples, 1, 2),", "\n", + " \"file_p95_nanos\": native_cost_quantile_nanos(&context_file_samples, 19, 20),", "\n", + " \"file_max_nanos\": context_file_samples.last().copied().unwrap_or(0),", "\n", + " \}),", "\n", + " );", "\n", "", "\n", " // the prepare and eval rows, entered separately per module so the number the profile", "\n", " // lane prices -- the eval row -- is the sum of native_lane_identity_row", "\n", diff --git a/src/v1/stage0/src/v1_compiler_emit_rust.rs b/src/v1/stage0/src/v1_compiler_emit_rust.rs index f4e4056a0ad..d124e419115 100644 --- a/src/v1/stage0/src/v1_compiler_emit_rust.rs +++ b/src/v1/stage0/src/v1_compiler_emit_rust.rs @@ -39384,7 +39384,7 @@ pub fn emit_source_root_eval_driver_main_rs( crate::v1_compiler_emit_core_support::module_to_filename(pipeline_module.clone()); Rc::new(TextFile { path: v1_rt::concat(v1_rt::concat(rust_source_root(), "main".to_string()), rust_source_ext()), - content: v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("// Generated by v1 compiler -- do not edit.".to_string(), "\n".to_string()), "\n".to_string()), "#![allow(unused_parens, clippy::all, clippy::disallowed_macros)]".to_string()), "\n".to_string()), "\n".to_string()), "use std::rc::Rc;".to_string()), "\n".to_string()), "use std::time::Instant;".to_string()), "\n".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::extdeps_communication_medium::{DecodeFidelity, Medium};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::gunbc_witness_v2_native_route::{NativeRouteEmittedBuild, NativeRouteMalformedControl, NativeRouteOldRouteControl};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::".to_string()), pipeline_mod.clone()), "::{".to_string()), "\n".to_string()), " native_lane_controls, native_lane_file_refusal_index, native_lane_identity_row,".to_string()), "\n".to_string()), " native_lane_module_inference,".to_string()), "\n".to_string()), " native_lane_module_resolution,".to_string()), "\n".to_string()), " native_lane_closure_ingest, native_lane_closure_modules, native_lane_closure_round_budget,".to_string()), "\n".to_string()), " native_lane_ingest_matches_closure, native_lane_ingest_receipt, native_lane_receipt,".to_string()), "\n".to_string()), " native_lane_source_facts, native_lane_universe, native_test_context_from_ingest,".to_string()), "\n".to_string()), " NativeLaneHostFacts, NativeLaneModulePreparation, NativeLaneModuleResolution,".to_string()), "\n".to_string()), " NativeRouteMemberRow,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::gunbc_witness_v2_native_route::{".to_string()), "\n".to_string()), " native_route_admission, native_route_admission_summary, native_route_admitted,".to_string()), "\n".to_string()), " native_route_file_refusal_tally,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_compiler_source_authority::{source_root_for_storage_path, DagSourceReadWitness};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_std_artifact::{Artifact, ArtifactKind};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_std_diagnostic::Outcome;".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::std_compiler_entry::{".to_string()), "\n".to_string()), " native_driver_cost_account, native_driver_cost_remainder_tolerance_nanos,".to_string()), "\n".to_string()), " native_driver_exclusive_sum, NativeDriverCostAccounting, NativeDriverExclusiveRows,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::std_measure::{nanosecond, nanosecond_count};".to_string()), "\n".to_string()), "\n".to_string()), "fn collect_dag_paths(dir: &std::path::Path, out: &mut Vec) -> Result<(), String> {".to_string()), "\n".to_string()), " let entries = match std::fs::read_dir(dir) {".to_string()), "\n".to_string()), " Ok(entries) => entries,".to_string()), "\n".to_string()), " Err(cause) => return Err(format!(\"could not walk source root {}: {cause}\", dir.display())),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " for entry in entries {".to_string()), "\n".to_string()), " let entry = match entry {".to_string()), "\n".to_string()), " Ok(entry) => entry,".to_string()), "\n".to_string()), " Err(cause) => return Err(format!(\"could not read entry under {}: {cause}\", dir.display())),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let path = entry.path();".to_string()), "\n".to_string()), " if path.is_dir() {".to_string()), "\n".to_string()), " collect_dag_paths(&path, out)?;".to_string()), "\n".to_string()), " } else if path.extension().map(|ext| ext == \"dag\").unwrap_or(false) {".to_string()), "\n".to_string()), " out.push(path.to_string_lossy().into_owned());".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " Ok(())".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn read_ingest(source_roots: &[String]) -> Vec> {".to_string()), "\n".to_string()), " if source_roots.is_empty() {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: no source roots given\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let mut paths: Vec = Vec::new();".to_string()), "\n".to_string()), " for root in source_roots {".to_string()), "\n".to_string()), " if let Err(cause) = collect_dag_paths(std::path::Path::new(root), &mut paths) {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: {cause}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " paths.sort();".to_string()), "\n".to_string()), " let mut reads: Vec> = Vec::new();".to_string()), "\n".to_string()), " for path in &paths {".to_string()), "\n".to_string()), " let text = match std::fs::read_to_string(path) {".to_string()), "\n".to_string()), " Ok(text) => text,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: could not read {path}: {cause}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " reads.push(Rc::new(DagSourceReadWitness {".to_string()), "\n".to_string()), " source: Rc::new(Medium {".to_string()), "\n".to_string()), " carried: text,".to_string()), "\n".to_string()), " fidelity: DecodeFidelity::Lossless,".to_string()), "\n".to_string()), " _phantom: std::marker::PhantomData,".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " artifact: Rc::new(Artifact {".to_string()), "\n".to_string()), " kind: ArtifactKind::SourceFile,".to_string()), "\n".to_string()), " id: path.clone(),".to_string()), "\n".to_string()), " file_path: path.clone(),".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " compilation_unit: path.clone(),".to_string()), "\n".to_string()), " source_root: source_root_for_storage_path(path.clone()),".to_string()), "\n".to_string()), " }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " reads".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn host_fact(facts: &std::collections::HashMap, key: &str) -> String {".to_string()), "\n".to_string()), " match facts.get(key) {".to_string()), "\n".to_string()), " Some(value) => value.clone(),".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: host facts file carries no {key} row\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn host_fact_int(facts: &std::collections::HashMap, key: &str) -> i64 {".to_string()), "\n".to_string()), " let value = host_fact(facts, key);".to_string()), "\n".to_string()), " match value.parse::() {".to_string()), "\n".to_string()), " Ok(parsed) => parsed,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: host fact {key} is not an integer: {value:?} ({cause})\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn read_host_facts(path: &str) -> NativeLaneHostFacts {".to_string()), "\n".to_string()), " let text = match std::fs::read_to_string(path) {".to_string()), "\n".to_string()), " Ok(text) => text,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: could not read host facts file {path}: {cause}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let mut facts: std::collections::HashMap = std::collections::HashMap::new();".to_string()), "\n".to_string()), " for line in text.lines() {".to_string()), "\n".to_string()), " if line.is_empty() {".to_string()), "\n".to_string()), " continue;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " match line.split_once('\\t') {".to_string()), "\n".to_string()), " Some((key, value)) if !key.is_empty() => {".to_string()), "\n".to_string()), " if facts.insert(key.to_string(), value.to_string()).is_some() {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: duplicate host fact row: {key}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " _ => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: malformed host fact line (expected keyvalue): {line}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let malformed_path = host_fact(&facts, \"malformed_control_path\");".to_string()), "\n".to_string()), " let malformed_reason = host_fact(&facts, \"malformed_control_reason\");".to_string()), "\n".to_string()), " let malformed_control = if malformed_path.is_empty() {".to_string()), "\n".to_string()), " NativeRouteMalformedControl::MalformedSpecimenAccepted".to_string()), "\n".to_string()), " } else {".to_string()), "\n".to_string()), " NativeRouteMalformedControl::MalformedSpecimenRefused {".to_string()), "\n".to_string()), " path: malformed_path,".to_string()), "\n".to_string()), " reason: malformed_reason,".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let old_route_disposition = host_fact(&facts, \"old_route_disposition\");".to_string()), "\n".to_string()), " let old_route_executable = host_fact(&facts, \"old_route_executable\");".to_string()), "\n".to_string()), " let old_route_control = match old_route_disposition.as_str() {".to_string()), "\n".to_string()), " \"withdrawn\" => NativeRouteOldRouteControl::OldRouteWithdrawn {".to_string()), "\n".to_string()), " withdrawn_executable: old_route_executable,".to_string()), "\n".to_string()), " },".to_string()), "\n".to_string()), " \"not_present_at_window\" => NativeRouteOldRouteControl::OldRouteNotPresentAtWindow {".to_string()), "\n".to_string()), " expected_executable: old_route_executable,".to_string()), "\n".to_string()), " },".to_string()), "\n".to_string()), " other => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: old_route_disposition names no control this route can record: {other} -- expected withdrawn or not_present_at_window\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " // The emitted build is the host's observation of the cargo spawn this binary is the".to_string()), "\n".to_string()), " // product of: six rows, the argv as one row per word under a length row. A count that".to_string()), "\n".to_string()), " // does not parse, or an index row it promises that is missing, refuses like any other".to_string()), "\n".to_string()), " // missing fact; nothing is defaulted.".to_string()), "\n".to_string()), " let cargo_argv_len = host_fact_int(&facts, \"cargo_argv_len\");".to_string()), "\n".to_string()), " let mut cargo_argv: Vec = Vec::new();".to_string()), "\n".to_string()), " for index in 0..cargo_argv_len {".to_string()), "\n".to_string()), " cargo_argv.push(host_fact(&facts, &format!(\"cargo_argv_{index}\")));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let emitted_build = NativeRouteEmittedBuild {".to_string()), "\n".to_string()), " cargo_argv: Rc::new(cargo_argv.into()),".to_string()), "\n".to_string()), " rustflags: host_fact(&facts, \"rustflags\"),".to_string()), "\n".to_string()), " compiler_path: host_fact(&facts, \"compiler_path\"),".to_string()), "\n".to_string()), " rustc_identity: host_fact(&facts, \"rustc_identity\"),".to_string()), "\n".to_string()), " exit_status: host_fact_int(&facts, \"exit_status\"),".to_string()), "\n".to_string()), " warning_count: host_fact_int(&facts, \"warning_count\"),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " NativeLaneHostFacts {".to_string()), "\n".to_string()), " tested_tree: host_fact(&facts, \"tested_tree\"),".to_string()), "\n".to_string()), " preparation_seed_identity: host_fact(&facts, \"preparation_seed_identity\"),".to_string()), "\n".to_string()), " emitted_closure_identity: host_fact(&facts, \"emitted_closure_identity\"),".to_string()), "\n".to_string()), " executable_path: host_fact(&facts, \"executable_path\"),".to_string()), "\n".to_string()), " executable_identity: host_fact(&facts, \"executable_identity\"),".to_string()), "\n".to_string()), " old_route_control: Rc::new(old_route_control),".to_string()), "\n".to_string()), " malformed_control: Rc::new(malformed_control),".to_string()), "\n".to_string()), " emitted_build: Rc::new(emitted_build),".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn run_census(source_roots: &[String]) {".to_string()), "\n".to_string()), " let reads = read_ingest(source_roots);".to_string()), "\n".to_string()), " let context = match &*native_test_context_from_ingest(Rc::new(reads.into())) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"CONTEXT-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " for refusal in context.file_refusals.iter() {".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"file_refusal\": refusal }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"_terminal\": \"complete\", \"mode\": \"census\", \"file_refusals\": context.file_refusals.len() }));".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn native_cost_quantile_nanos(sorted: &[u128], numer: usize, denom: usize) -> u128 {".to_string()), "\n".to_string()), " if sorted.is_empty() { return 0; }".to_string()), "\n".to_string()), " let idx = (sorted.len() - 1) * numer / denom;".to_string()), "\n".to_string()), " sorted[idx]".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// A SPAN IS READ ONCE, THROUGH A READER THAT REFUSES A CLOCK THAT WENT BACKWARDS.".to_string()), "\n".to_string()), "// Instant::elapsed is Instant::now().duration_since(earlier), and duration_since SATURATES:".to_string()), "\n".to_string()), "// a monotonic clock that is not actually monotonic -- which happens on some virtualised and".to_string()), "\n".to_string()), "// migrated hosts -- yields Duration::ZERO rather than an error. That is the fabricated zero".to_string()), "\n".to_string()), "// this receipt forbids, arriving by a quieter route than the saturating_sub it replaced: a".to_string()), "\n".to_string()), "// phase would report as having taken no time and the partition would balance for the wrong".to_string()), "\n".to_string()), "// reason. checked_duration_since returns None instead, so the impossible reading is".to_string()), "\n".to_string()), "// REPRESENTABLE and can be refused.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// AN EARLIER REVISION OF THIS FILE CLAIMED THE CLASS WAS STRUCTURALLY IMPOSSIBLE ONCE THE".to_string()), "\n".to_string()), "// subtraction was gone. That was wrong and is corrected rather than softened: deleting the".to_string()), "\n".to_string()), "// explicit subtraction removed the visible clamp, not the saturation underneath it. The".to_string()), "\n".to_string()), "// honest rung is MITIGATED BY A TYPED REFUSAL at a declared boundary -- the host clock is".to_string()), "\n".to_string()), "// external reality, which DESIGN section 4b keeps off the ladder rather than on its top rung.".to_string()), "\n".to_string()), "fn span_nanos(started: Instant) -> u128 {".to_string()), "\n".to_string()), " match Instant::now().checked_duration_since(started) {".to_string()), "\n".to_string()), " Some(d) => d.as_nanos(),".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: the monotonic clock went backwards between two reads, so no span is measurable\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// A SPAN THAT DOES NOT FIT REFUSES RATHER THAN SATURATING (review 64474 control). This was".to_string()), "\n".to_string()), "// i64::try_from(n).unwrap_or(i64::MAX), which turns a failed conversion into a FIGURE -- and a".to_string()), "\n".to_string()), "// fabricated figure on a receipt is the state DESIGN section 5 forbids outright, whether the".to_string()), "\n".to_string()), "// invented number is a zero that reports a phase as instant or a maximum that reports it as".to_string()), "\n".to_string()), "// three centuries. The saturating arm also chose the direction that hides best: i64::MAX would".to_string()), "\n".to_string()), "// push the exclusive sum past the parent and surface as NativeDriverCostOverAttributed, a cost".to_string()), "\n".to_string()), "// verdict naming the wrong cause.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// ON REACHABILITY, STATED RATHER THAN LEFT AS AN IMPLIED CLAIM: i64 nanoseconds is about 292".to_string()), "\n".to_string()), "// years, so no span this driver measures reaches it, and the refusal below is not expected to".to_string()), "\n".to_string()), "// fire. It is written because the alternative is not silence but a LIE -- the arm has to answer".to_string()), "\n".to_string()), "// something, and the only honest answers are a real number or a refusal.".to_string()), "\n".to_string()), "fn native_cost_i64(n: u128) -> i64 {".to_string()), "\n".to_string()), " match i64::try_from(n) {".to_string()), "\n".to_string()), " Ok(v) => v,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: a measured span does not fit the cost carrier, so no partition can be reported: {n} ({cause})\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// AN UNREADABLE /proc IS ABSENT, NOT ZERO (review 64181). A zero here was printed as".to_string()), "\n".to_string()), "// peak_rss_bytes / rss_bytes and read as a measurement: a run on a host without /proc, or with".to_string()), "\n".to_string()), "// the key renamed, reported a process using no memory. Absence is carried as None and rendered".to_string()), "\n".to_string()), "// as JSON null, so the receipt says it does not know instead of inventing a figure. This is".to_string()), "\n".to_string()), "// telemetry on no receipt field, so it is the one place an Absent is carried rather than".to_string()), "\n".to_string()), "// refused: the run is still a valid observation of everything else.".to_string()), "\n".to_string()), "fn proc_status_kib(key: &str) -> Option {".to_string()), "\n".to_string()), " let text = std::fs::read_to_string(\"/proc/self/status\").ok()?;".to_string()), "\n".to_string()), " for line in text.lines() {".to_string()), "\n".to_string()), " if let Some(rest) = line.strip_prefix(key) {".to_string()), "\n".to_string()), " return rest".to_string()), "\n".to_string()), " .trim_start_matches(':')".to_string()), "\n".to_string()), " .trim()".to_string()), "\n".to_string()), " .split_whitespace()".to_string()), "\n".to_string()), " .next()".to_string()), "\n".to_string()), " .and_then(|n| n.parse::().ok());".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " None".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// ONE CLOCK, AND IT IS THE MONOTONIC ONE (review 64474). Every exclusive phase span and the".to_string()), "\n".to_string()), "// parent span are read from Instant, so the partition compares readings from a single source.".to_string()), "\n".to_string()), "// They were split before this: the parent came from Instant while the phase spans came from".to_string()), "\n".to_string()), "// SystemTime, which is the wall clock and is free to step backwards under NTP or an operator".to_string()), "\n".to_string()), "// adjustment. A step between two phase reads could then push the exclusive sum past a parent".to_string()), "\n".to_string()), "// span that never moved, and the driver would refuse with NativeDriverCostOverAttributed --".to_string()), "\n".to_string()), "// a cost refusal whose real cause was the clock. That is a fabricated attribution: the numbers".to_string()), "\n".to_string()), "// would be wrong while the receipt read as a measurement.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// THE SUBTRACTION IS GONE RATHER THAN GUARDED, which is the point. A span used to be an".to_string()), "\n".to_string()), "// explicit saturating_sub of two readings, so a backwards step clamped the difference to zero".to_string()), "\n".to_string()), "// and reported a phase as having taken NO TIME -- the exact state the annotation beside it".to_string()), "\n".to_string()), "// forbade, reached by the arm meant to prevent it. Instant::elapsed cannot return a negative".to_string()), "\n".to_string()), "// duration, so there is no difference to clamp and no clamp to review: DESIGN section 5".to_string()), "\n".to_string()), "// construction over validation, and the class climbs from mitigated to structurally".to_string()), "\n".to_string()), "// impossible. The pre-epoch refusal that guarded the old wall-clock read is DELETED with it,".to_string()), "\n".to_string()), "// because the hazard it named cannot arise on this clock -- production handling dissolves on".to_string()), "\n".to_string()), "// the climb (DESIGN section 4b(4)); no evidence is retired here, since that arm had none.".to_string()), "\n".to_string()), "fn run_adjudication(facts_path: &str, source_roots: &[String]) {".to_string()), "\n".to_string()), " let driver_start = Instant::now();".to_string()), "\n".to_string()), " // A MISSING GITHUB_SHA IS ABSENT, NOT \"local\" (review 64181). The receipt line carries this".to_string()), "\n".to_string()), " // as the tree the measurement describes; the literal \"local\" is a plausible identity that".to_string()), "\n".to_string()), " // no reader can distinguish from a tree actually named local.".to_string()), "\n".to_string()), " let head: Option = std::env::var(\"GITHUB_SHA\").ok();".to_string()), "\n".to_string()), " let facts = read_host_facts(facts_path);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // the load row: reading the declared roots off disk. Its own exclusive row rather than a".to_string()), "\n".to_string()), " // field on another phase, so the IO is never mixed into a fold's number.".to_string()), "\n".to_string()), " let load_started = Instant::now();".to_string()), "\n".to_string()), " let reads = read_ingest(source_roots);".to_string()), "\n".to_string()), " let corpus_reads = reads.len();".to_string()), "\n".to_string()), " let ingest = Rc::new(im::vector::Vector::from(reads));".to_string()), "\n".to_string()), " let load_nanos = span_nanos(load_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // universe_derivation: the floor's own per-file discovery fold plus the module-header and".to_string()), "\n".to_string()), " // import scans, over EVERY read -- discovery is a corpus-wide question -- and then the".to_string()), "\n".to_string()), " // import closure of the universe's modules, which is all the front end is given.".to_string()), "\n".to_string()), " let universe_started = Instant::now();".to_string()), "\n".to_string()), " let source_facts = native_lane_source_facts(ingest.clone());".to_string()), "\n".to_string()), " let universe = match &*native_lane_universe(ingest.clone()) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"DERIVATION-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " // The walk's budget exhausting is a refusal of the whole derivation, never a truncated".to_string()), "\n".to_string()), " // closure: a narrowed ingest would surface only as unexplained resolve refusals later.".to_string()), "\n".to_string()), " let closure = match &*native_lane_closure_modules(".to_string()), "\n".to_string()), " source_facts.clone(),".to_string()), "\n".to_string()), " universe.clone(),".to_string()), "\n".to_string()), " native_lane_closure_round_budget(),".to_string()), "\n".to_string()), " ) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"CLOSURE-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let closure_ingest = native_lane_closure_ingest(ingest.clone(), source_facts.clone(), closure.clone());".to_string()), "\n".to_string()), " let closure_reads = closure_ingest.len();".to_string()), "\n".to_string()), " // The ingest receipt's identity join, asked by the route: every ingested source declares a".to_string()), "\n".to_string()), " // closure module and every closure module some source declares was ingested. A miss is the".to_string()), "\n".to_string()), " // hidden prepass (or a hidden narrowing) this receipt exists to refuse.".to_string()), "\n".to_string()), " let ingest_receipt = native_lane_ingest_receipt(source_facts.clone(), closure.clone(), closure_ingest.clone());".to_string()), "\n".to_string()), " // The join answers a typed refusal naming the offending identity, so the counts below are".to_string()), "\n".to_string()), " // context for it rather than the whole diagnostic: a reader gets the module and the path,".to_string()), "\n".to_string()), " // not a pair of totals to re-derive the offender from.".to_string()), "\n".to_string()), " match &*native_lane_ingest_matches_closure(source_facts.clone(), ingest_receipt.clone(), closure_ingest.clone()) {".to_string()), "\n".to_string()), " Outcome::Accepted { .. } => {}".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"INGEST-CLOSURE-REFUSED: {:#?} (scanned={} ingested={} closure_modules={})\",".to_string()), "\n".to_string()), " diagnostics,".to_string()), "\n".to_string()), " ingest_receipt.scanned_paths.len(),".to_string()), "\n".to_string()), " ingest_receipt.ingested_paths.len(),".to_string()), "\n".to_string()), " ingest_receipt.closure_modules.len(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let universe_nanos = span_nanos(universe_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // the context row: the front-end fold -- tokenize, parse, normalize -- over the CLOSURE only.".to_string()), "\n".to_string()), " let context_started = Instant::now();".to_string()), "\n".to_string()), " let context = match &*native_test_context_from_ingest(closure_ingest) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"CONTEXT-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let context_nanos = span_nanos(context_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // the prepare and eval rows, entered separately per module so the number the profile".to_string()), "\n".to_string()), " // lane prices -- the eval row -- is the sum of native_lane_identity_row".to_string()), "\n".to_string()), " // and nothing else: not ingest, not resolve, not infer.".to_string()), "\n".to_string()), " let mut population: Vec> = Vec::new();".to_string()), "\n".to_string()), " let mut prepare_total_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut evaluate_total_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut prepare_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " let mut eval_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " let mut prepare_ok: u64 = 0;".to_string()), "\n".to_string()), " let mut prepare_refused: u64 = 0;".to_string()), "\n".to_string()), " let mut module_release_nanos: u128 = 0;".to_string()), "\n".to_string()), " // The per-path refusal index is built ONCE here rather than per module: this loop is the".to_string()), "\n".to_string()), " // only place that knows a loop is about to happen, and the join it feeds was O(modules x".to_string()), "\n".to_string()), " // refusals) when each module scanned the refusal list for itself.".to_string()), "\n".to_string()), " let refusal_index = native_lane_file_refusal_index(context.file_refusals.clone());".to_string()), "\n".to_string()), " for entry in universe.modules.iter() {".to_string()), "\n".to_string()), " let prepare_started = Instant::now();".to_string()), "\n".to_string()), " let mut identities: usize = 0;".to_string()), "\n".to_string()), " let mut module_evaluate_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut module_infer_nanos: u128 = 0;".to_string()), "\n".to_string()), " // THE PREPARATION SPAN CLOSES WHEN THE PREPARATION OUTCOME IS ESTABLISHED, BEFORE ANY".to_string()), "\n".to_string()), " // DECLARATION IS EVALUATED. prepare and eval are exclusive rows of one partition, so a".to_string()), "\n".to_string()), " // prepare interval that contained its module's eval intervals would count that work".to_string()), "\n".to_string()), " // twice and inflate the sum against the parent.".to_string()), "\n".to_string()), " //".to_string()), "\n".to_string()), " // THE CLOSE IS THE ARM'S VALUE, NOT AN ASSIGNMENT INSIDE IT. Assigning an outer binding".to_string()), "\n".to_string()), " // from each arm left its initialiser dead, and a dead store is an ERROR in the emitted".to_string()), "\n".to_string()), " // crate (RUSTFLAGS=\"-D warnings\"); silencing it with an allow would be the escape hatch".to_string()), "\n".to_string()), " // DESIGN section 5 forbids. Each arm yields its own span instead, so there is one binding".to_string()), "\n".to_string()), " // site, nothing to overwrite, and the order control has a single spelling to assert on.".to_string()), "\n".to_string()), " let resolve_started = Instant::now();".to_string()), "\n".to_string()), " let resolution = native_lane_module_resolution(context.clone(), refusal_index.clone(), entry.clone());".to_string()), "\n".to_string()), " let module_resolve_nanos = span_nanos(resolve_started);".to_string()), "\n".to_string()), " let (outcome_label, module_prepare_nanos) = match &*resolution {".to_string()), "\n".to_string()), " NativeLaneModuleResolution::NativeLaneModuleContextRowsDecided { rows } => {".to_string()), "\n".to_string()), " let this_prepare = span_nanos(prepare_started);".to_string()), "\n".to_string()), " prepare_refused += 1;".to_string()), "\n".to_string()), " for row in rows.iter() {".to_string()), "\n".to_string()), " population.push(row.clone());".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"context_refused\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeLaneModuleResolution::NativeLaneModuleResolveRowsDecided { rows } => {".to_string()), "\n".to_string()), " let this_prepare = span_nanos(prepare_started);".to_string()), "\n".to_string()), " prepare_refused += 1;".to_string()), "\n".to_string()), " for row in rows.iter() {".to_string()), "\n".to_string()), " population.push(row.clone());".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"resolve_refused\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeLaneModuleResolution::NativeLaneModuleResolved { resolved } => {".to_string()), "\n".to_string()), " let infer_started = Instant::now();".to_string()), "\n".to_string()), " let preparation = native_lane_module_inference(entry.clone(), resolved.clone());".to_string()), "\n".to_string()), " module_infer_nanos = span_nanos(infer_started);".to_string()), "\n".to_string()), " let this_prepare = span_nanos(prepare_started);".to_string()), "\n".to_string()), " match &*preparation {".to_string()), "\n".to_string()), " NativeLaneModulePreparation::NativeLaneModuleRowsDecided { rows } => {".to_string()), "\n".to_string()), " prepare_refused += 1;".to_string()), "\n".to_string()), " for row in rows.iter() {".to_string()), "\n".to_string()), " population.push(row.clone());".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"infer_refused\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeLaneModulePreparation::NativeLaneModulePrepared { prepared } => {".to_string()), "\n".to_string()), " prepare_ok += 1;".to_string()), "\n".to_string()), " for declaration in entry.declarations.iter() {".to_string()), "\n".to_string()), " let evaluate_started = Instant::now();".to_string()), "\n".to_string()), " let row = native_lane_identity_row(".to_string()), "\n".to_string()), " prepared.clone(),".to_string()), "\n".to_string()), " entry.module.clone(),".to_string()), "\n".to_string()), " declaration.clone(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let this_eval = span_nanos(evaluate_started);".to_string()), "\n".to_string()), " module_evaluate_nanos += this_eval;".to_string()), "\n".to_string()), " eval_samples.push(this_eval);".to_string()), "\n".to_string()), " population.push(row);".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"accepted\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " prepare_total_nanos += module_prepare_nanos;".to_string()), "\n".to_string()), " evaluate_total_nanos += module_evaluate_nanos;".to_string()), "\n".to_string()), " prepare_samples.push(module_prepare_nanos);".to_string()), "\n".to_string()), " // RELEASE IS MEASURED, NOT LEFT TO SCOPE EXIT. The resolved tree this module built is".to_string()), "\n".to_string()), " // dropped HERE, inside a span, because dropping it at the end of the iteration paid real".to_string()), "\n".to_string()), " // time that no exclusive row covered -- the residual that refused the full corpus at".to_string()), "\n".to_string()), " // RemainderExceedsTolerance. An explicit drop makes the cost nameable; scope exit hides it.".to_string()), "\n".to_string()), " let release_started = Instant::now();".to_string()), "\n".to_string()), " drop(resolution);".to_string()), "\n".to_string()), " module_release_nanos += span_nanos(release_started);".to_string()), "\n".to_string()), " eprintln!(\"[native-prepare-split] module={} resolve_nanos={module_resolve_nanos} infer_nanos={module_infer_nanos} prepare_nanos={module_prepare_nanos} decls={} outcome={outcome_label}\", entry.module, identities);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // receipt_admission: minting the receipt and evaluating the authority's admission and summary".to_string()), "\n".to_string()), " // over it. The controls are executed here because they are receipt inputs, not universe members.".to_string()), "\n".to_string()), " let admission_started = Instant::now();".to_string()), "\n".to_string()), " let receipt = native_lane_receipt(".to_string()), "\n".to_string()), " context.clone(),".to_string()), "\n".to_string()), " universe.clone(),".to_string()), "\n".to_string()), " Rc::new(population.clone().into()),".to_string()), "\n".to_string()), " native_lane_controls(context.clone()),".to_string()), "\n".to_string()), " Rc::new(facts),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let admission = native_route_admission(receipt.clone());".to_string()), "\n".to_string()), " let summary = native_route_admission_summary(admission.clone());".to_string()), "\n".to_string()), " let file_refusal_tally: Vec = native_route_file_refusal_tally(receipt.clone())".to_string()), "\n".to_string()), " .iter()".to_string()), "\n".to_string()), " .map(|row| serde_json::json!(row))".to_string()), "\n".to_string()), " .collect();".to_string()), "\n".to_string()), " let admitted = native_route_admitted(admission.clone());".to_string()), "\n".to_string()), " let admission_nanos = span_nanos(admission_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // row_serialization: SERIALIZING THE OBSERVATIONS AND WRITING THEM, MEASURED (review".to_string()), "\n".to_string()), " // 64181 named this span; #11105 made leaving it unattributed fatal). Every row the".to_string()), "\n".to_string()), " // population carries is turned into JSON here and written to stdout, which is real work".to_string()), "\n".to_string()), " // no other row covers -- eval is the identity fold and nothing else. It is TIMED, never".to_string()), "\n".to_string()), " // derived as parent minus the others: a row defined as the remainder would force the".to_string()), "\n".to_string()), " // residual to zero and make the tolerance arm unfireable by construction.".to_string()), "\n".to_string()), " let serialization_started = Instant::now();".to_string()), "\n".to_string()), " for refusal in receipt.file_refusals.iter() {".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"file_refusal\": refusal }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " for row in population.iter() {".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::to_string(row).unwrap());".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let row_serialization_nanos = span_nanos(serialization_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // THE PARTITION, THROUGH THE ONE LAW. The rows are the row set std.compiler_entry owns and".to_string()), "\n".to_string()), " // verdict is native_driver_cost_account over them -- not a second reconcile. The two rows".to_string()), "\n".to_string()), " // this route pays that a driver handed a universe file does not (universe_derivation,".to_string()), "\n".to_string()), " // receipt_admission) are members of the same exclusive sum, so an over-attribution through".to_string()), "\n".to_string()), " // either is caught here rather than by a check of its own.".to_string()), "\n".to_string()), " prepare_samples.sort_unstable();".to_string()), "\n".to_string()), " eval_samples.sort_unstable();".to_string()), "\n".to_string()), " let parent_span_nanos = span_nanos(driver_start);".to_string()), "\n".to_string()), " let exclusive = Rc::new(NativeDriverExclusiveRows {".to_string()), "\n".to_string()), " load: nanosecond(native_cost_i64(load_nanos)),".to_string()), "\n".to_string()), " universe_derivation: nanosecond(native_cost_i64(universe_nanos)),".to_string()), "\n".to_string()), " context: nanosecond(native_cost_i64(context_nanos)),".to_string()), "\n".to_string()), " prepare: nanosecond(native_cost_i64(prepare_total_nanos)),".to_string()), "\n".to_string()), " eval: nanosecond(native_cost_i64(evaluate_total_nanos)),".to_string()), "\n".to_string()), " receipt_admission: nanosecond(native_cost_i64(admission_nanos)),".to_string()), "\n".to_string()), " row_serialization: nanosecond(native_cost_i64(row_serialization_nanos)),".to_string()), "\n".to_string()), " module_release: nanosecond(native_cost_i64(module_release_nanos)),".to_string()), "\n".to_string()), " });".to_string()), "\n".to_string()), " let exclusive_sum = nanosecond_count(native_driver_exclusive_sum(exclusive.clone())) as u128;".to_string()), "\n".to_string()), " let tolerance_nanos = nanosecond_count(native_driver_cost_remainder_tolerance_nanos()) as u128;".to_string()), "\n".to_string()), " let accounting = native_driver_cost_account(".to_string()), "\n".to_string()), " nanosecond(native_cost_i64(parent_span_nanos)),".to_string()), "\n".to_string()), " exclusive.clone(),".to_string()), "\n".to_string()), " native_driver_cost_remainder_tolerance_nanos(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " // The remainder is the residual the accounting itself returns, never parent minus sum: on".to_string()), "\n".to_string()), " // over-attributed arm there IS no remainder, and a clamped zero there would be a".to_string()), "\n".to_string()), " // plausible number standing where the measurement is incoherent.".to_string()), "\n".to_string()), " let (verdict, remainder_nanos) = match accounting.as_ref() {".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostOverAttributed { .. } =>".to_string()), "\n".to_string()), " (r#\"NativeDriverCostOverAttributed\"#, serde_json::Value::Null),".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostRemainderExceedsTolerance { residual, .. } =>".to_string()), "\n".to_string()), " (r#\"NativeDriverCostRemainderExceedsTolerance\"#, serde_json::json!(nanosecond_count(residual.clone()))),".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostReconciled { residual, .. } =>".to_string()), "\n".to_string()), " (r#\"NativeDriverCostReconciled\"#, serde_json::json!(nanosecond_count(residual.clone()))),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let identities = universe.identities.len() as u64;".to_string()), "\n".to_string()), " let eval_mean = if eval_samples.is_empty() { 0 } else { evaluate_total_nanos / eval_samples.len() as u128 };".to_string()), "\n".to_string()), " let prepare_mean = if prepare_samples.is_empty() { 0 } else { prepare_total_nanos / prepare_samples.len() as u128 };".to_string()), "\n".to_string()), " // THE ROWS ARE PROJECTED FROM THE VALUE, NOT RE-LISTED (review 64181). The field names".to_string()), "\n".to_string()), " // were written once to build NativeDriverExclusiveRows and again to render it, which is the".to_string()), "\n".to_string()), " // second spelling this file warns about for prose, applied to the emitted object: a driver".to_string()), "\n".to_string()), " // gaining a phase would have updated the struct and left the receipt short. Serializing the".to_string()), "\n".to_string()), " // value carries the row set from the type, so the JSON cannot disagree with the fold. The".to_string()), "\n".to_string()), " // rows therefore render as std.measure Nanosecond objects rather than bare integers -- the".to_string()), "\n".to_string()), " // unit travels with the number, which is the point of the type.".to_string()), "\n".to_string()), " // A NON-RECONCILED ARM IS A PROCESS REFUSAL (#11105, review 63891). The receipt is".to_string()), "\n".to_string()), " // printed first so the numbers that caused the refusal are on the wire, and THEN the".to_string()), "\n".to_string()), " // line stops: a verdict string with exit 0 is the inert lens DESIGN section 6 names.".to_string()), "\n".to_string()), " // The full-N run of this route refused here on 158600186 ns against a 50000000 ns".to_string()), "\n".to_string()), " // tolerance before row_serialization was a measured row, which is what put that row on".to_string()), "\n".to_string()), " // the type rather than a wider tolerance on this arm.".to_string()), "\n".to_string()), " eprintln!(\"[native-cost-partition] {}\", serde_json::json!({".to_string()), "\n".to_string()), " \"basis\": \"native_driver_wall\",".to_string()), "\n".to_string()), " \"basis_note\": \"single-threaded SourceRootEvalDriver wall; exclusive rows partition parent_span_nanos\",".to_string()), "\n".to_string()), " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",".to_string()), "\n".to_string()), " \"head\": head,".to_string()), "\n".to_string()), " \"mode\": \"adjudicate\",".to_string()), "\n".to_string()), " \"verdict\": verdict,".to_string()), "\n".to_string()), " \"tolerance_nanos\": tolerance_nanos,".to_string()), "\n".to_string()), " \"parent_span_nanos\": parent_span_nanos,".to_string()), "\n".to_string()), " \"exclusive\": exclusive,".to_string()), "\n".to_string()), " \"sum_exclusive_nanos\": exclusive_sum,".to_string()), "\n".to_string()), " \"remainder_nanos\": remainder_nanos,".to_string()), "\n".to_string()), " \"corpus_reads\": corpus_reads,".to_string()), "\n".to_string()), " \"closure_reads\": closure_reads,".to_string()), "\n".to_string()), " \"scanned_paths\": ingest_receipt.scanned_paths.len(),".to_string()), "\n".to_string()), " \"ingested_paths\": ingest_receipt.ingested_paths.len(),".to_string()), "\n".to_string()), " \"closure_modules\": closure.len(),".to_string()), "\n".to_string()), " \"identities\": identities,".to_string()), "\n".to_string()), " \"unique_modules\": universe.modules.len(),".to_string()), "\n".to_string()), " \"file_refusals\": receipt.file_refusals.len(),".to_string()), "\n".to_string()), " \"prepare_ok\": prepare_ok,".to_string()), "\n".to_string()), " \"prepare_refused\": prepare_refused,".to_string()), "\n".to_string()), " \"prepare_mean_nanos\": prepare_mean,".to_string()), "\n".to_string()), " \"prepare_p50_nanos\": native_cost_quantile_nanos(&prepare_samples, 1, 2),".to_string()), "\n".to_string()), " \"prepare_p95_nanos\": native_cost_quantile_nanos(&prepare_samples, 19, 20),".to_string()), "\n".to_string()), " \"prepare_max_nanos\": prepare_samples.last().copied().unwrap_or(0),".to_string()), "\n".to_string()), " \"eval_mean_nanos\": eval_mean,".to_string()), "\n".to_string()), " \"eval_p50_nanos\": native_cost_quantile_nanos(&eval_samples, 1, 2),".to_string()), "\n".to_string()), " \"eval_p95_nanos\": native_cost_quantile_nanos(&eval_samples, 19, 20),".to_string()), "\n".to_string()), " \"eval_max_nanos\": eval_samples.last().copied().unwrap_or(0),".to_string()), "\n".to_string()), " \"peak_rss_bytes\": proc_status_kib(\"VmHWM\").map(|kib| kib * 1024),".to_string()), "\n".to_string()), " \"rss_bytes\": proc_status_kib(\"VmRSS\").map(|kib| kib * 1024),".to_string()), "\n".to_string()), " }));".to_string()), "\n".to_string()), " match accounting.as_ref() {".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostReconciled { .. } => {}".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostOverAttributed { sum_exclusive, parent_span } => {".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"REFUSED: native driver cost OverAttributed {{ sum_exclusive_nanos: {}, parent_span_nanos: {} }}\",".to_string()), "\n".to_string()), " nanosecond_count(sum_exclusive.clone()) as u128,".to_string()), "\n".to_string()), " nanosecond_count(parent_span.clone()) as u128".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostRemainderExceedsTolerance { residual, tolerance } => {".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"REFUSED: native driver cost RemainderExceedsTolerance {{ residual_nanos: {}, tolerance_nanos: {} }} -- unattributed driver work; name the span, do not widen the tolerance\",".to_string()), "\n".to_string()), " nanosecond_count(residual.clone()) as u128,".to_string()), "\n".to_string()), " nanosecond_count(tolerance.clone()) as u128".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " println!(".to_string()), "\n".to_string()), " \"{}\",".to_string()), "\n".to_string()), " serde_json::json!({".to_string()), "\n".to_string()), " \"_terminal\": \"complete\",".to_string()), "\n".to_string()), " \"mode\": \"adjudicate\",".to_string()), "\n".to_string()), " \"rows\": population.len(),".to_string()), "\n".to_string()), " \"universe\": universe.identities.len(),".to_string()), "\n".to_string()), " \"file_refusals\": receipt.file_refusals.len(),".to_string()), "\n".to_string()), " \"file_refusal_tally\": file_refusal_tally,".to_string()), "\n".to_string()), " \"admitted\": admitted,".to_string()), "\n".to_string()), " \"summary\": summary,".to_string()), "\n".to_string()), " })".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " if admitted {".to_string()), "\n".to_string()), " std::process::exit(0);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "fn main() {".to_string()), "\n".to_string()), " let mut args = std::env::args().skip(1);".to_string()), "\n".to_string()), " let mode = match args.next() {".to_string()), "\n".to_string()), " Some(mode) => mode,".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: no mode given -- usage: ".to_string()), crate_name.clone()), " adjudicate ... | ".to_string()), crate_name.clone()), " census ...\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " if mode == \"census\" {".to_string()), "\n".to_string()), " let source_roots: Vec = args.collect();".to_string()), "\n".to_string()), " run_census(&source_roots);".to_string()), "\n".to_string()), " return;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " if mode == \"adjudicate\" {".to_string()), "\n".to_string()), " let facts_path = match args.next() {".to_string()), "\n".to_string()), " Some(path) => path,".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: adjudicate takes a host facts file before the source roots\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let source_roots: Vec = args.collect();".to_string()), "\n".to_string()), " run_adjudication(&facts_path, &source_roots);".to_string()), "\n".to_string()), " return;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: unknown mode {mode} -- expected adjudicate or census\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), + content: v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("// Generated by v1 compiler -- do not edit.".to_string(), "\n".to_string()), "\n".to_string()), "#![allow(unused_parens, clippy::all, clippy::disallowed_macros)]".to_string()), "\n".to_string()), "\n".to_string()), "use std::rc::Rc;".to_string()), "\n".to_string()), "use std::time::Instant;".to_string()), "\n".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::extdeps_communication_medium::{DecodeFidelity, Medium};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::gunbc_witness_v2_native_route::{NativeRouteEmittedBuild, NativeRouteMalformedControl, NativeRouteOldRouteControl};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::".to_string()), pipeline_mod.clone()), "::{".to_string()), "\n".to_string()), " native_lane_controls, native_lane_file_refusal_index, native_lane_identity_row,".to_string()), "\n".to_string()), " native_lane_module_inference,".to_string()), "\n".to_string()), " native_lane_module_resolution,".to_string()), "\n".to_string()), " native_lane_closure_ingest, native_lane_closure_modules, native_lane_closure_round_budget,".to_string()), "\n".to_string()), " native_lane_ingest_matches_closure, native_lane_ingest_receipt, native_lane_receipt,".to_string()), "\n".to_string()), " native_lane_source_facts, native_lane_universe, native_test_context_absorb,".to_string()), "\n".to_string()), " native_test_context_finish, native_test_context_from_ingest, native_test_context_state_empty,".to_string()), "\n".to_string()), " native_test_front_end_prepare,".to_string()), "\n".to_string()), " NativeLaneHostFacts, NativeLaneModulePreparation, NativeLaneModuleResolution,".to_string()), "\n".to_string()), " NativeRouteMemberRow,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_compiler_program_assembly::{".to_string()), "\n".to_string()), " program_assembly_measured_outcome, program_assembly_memo_hits,".to_string()), "\n".to_string()), " program_assembly_memo_lookup_calls, program_assembly_memo_misses,".to_string()), "\n".to_string()), " program_assembly_phase_normalize, program_assembly_phase_parse_measured,".to_string()), "\n".to_string()), " program_assembly_phase_token_count, program_assembly_phase_tokenize,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::gunbc_witness_v2_native_route::{".to_string()), "\n".to_string()), " native_route_admission, native_route_admission_summary, native_route_admitted,".to_string()), "\n".to_string()), " native_route_file_refusal_tally,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_compiler_source_authority::{source_root_for_storage_path, DagSourceReadWitness};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_std_artifact::{Artifact, ArtifactKind};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_std_diagnostic::Outcome;".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::std_compiler_entry::{".to_string()), "\n".to_string()), " native_driver_cost_account, native_driver_cost_remainder_tolerance_nanos,".to_string()), "\n".to_string()), " native_driver_exclusive_sum, NativeDriverCostAccounting, NativeDriverExclusiveRows,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::std_measure::{nanosecond, nanosecond_count};".to_string()), "\n".to_string()), "\n".to_string()), "fn collect_dag_paths(dir: &std::path::Path, out: &mut Vec) -> Result<(), String> {".to_string()), "\n".to_string()), " let entries = match std::fs::read_dir(dir) {".to_string()), "\n".to_string()), " Ok(entries) => entries,".to_string()), "\n".to_string()), " Err(cause) => return Err(format!(\"could not walk source root {}: {cause}\", dir.display())),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " for entry in entries {".to_string()), "\n".to_string()), " let entry = match entry {".to_string()), "\n".to_string()), " Ok(entry) => entry,".to_string()), "\n".to_string()), " Err(cause) => return Err(format!(\"could not read entry under {}: {cause}\", dir.display())),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let path = entry.path();".to_string()), "\n".to_string()), " if path.is_dir() {".to_string()), "\n".to_string()), " collect_dag_paths(&path, out)?;".to_string()), "\n".to_string()), " } else if path.extension().map(|ext| ext == \"dag\").unwrap_or(false) {".to_string()), "\n".to_string()), " out.push(path.to_string_lossy().into_owned());".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " Ok(())".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn read_ingest(source_roots: &[String]) -> Vec> {".to_string()), "\n".to_string()), " if source_roots.is_empty() {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: no source roots given\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let mut paths: Vec = Vec::new();".to_string()), "\n".to_string()), " for root in source_roots {".to_string()), "\n".to_string()), " if let Err(cause) = collect_dag_paths(std::path::Path::new(root), &mut paths) {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: {cause}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " paths.sort();".to_string()), "\n".to_string()), " let mut reads: Vec> = Vec::new();".to_string()), "\n".to_string()), " for path in &paths {".to_string()), "\n".to_string()), " let text = match std::fs::read_to_string(path) {".to_string()), "\n".to_string()), " Ok(text) => text,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: could not read {path}: {cause}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " reads.push(Rc::new(DagSourceReadWitness {".to_string()), "\n".to_string()), " source: Rc::new(Medium {".to_string()), "\n".to_string()), " carried: text,".to_string()), "\n".to_string()), " fidelity: DecodeFidelity::Lossless,".to_string()), "\n".to_string()), " _phantom: std::marker::PhantomData,".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " artifact: Rc::new(Artifact {".to_string()), "\n".to_string()), " kind: ArtifactKind::SourceFile,".to_string()), "\n".to_string()), " id: path.clone(),".to_string()), "\n".to_string()), " file_path: path.clone(),".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " compilation_unit: path.clone(),".to_string()), "\n".to_string()), " source_root: source_root_for_storage_path(path.clone()),".to_string()), "\n".to_string()), " }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " reads".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn host_fact(facts: &std::collections::HashMap, key: &str) -> String {".to_string()), "\n".to_string()), " match facts.get(key) {".to_string()), "\n".to_string()), " Some(value) => value.clone(),".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: host facts file carries no {key} row\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn host_fact_int(facts: &std::collections::HashMap, key: &str) -> i64 {".to_string()), "\n".to_string()), " let value = host_fact(facts, key);".to_string()), "\n".to_string()), " match value.parse::() {".to_string()), "\n".to_string()), " Ok(parsed) => parsed,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: host fact {key} is not an integer: {value:?} ({cause})\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn read_host_facts(path: &str) -> NativeLaneHostFacts {".to_string()), "\n".to_string()), " let text = match std::fs::read_to_string(path) {".to_string()), "\n".to_string()), " Ok(text) => text,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: could not read host facts file {path}: {cause}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let mut facts: std::collections::HashMap = std::collections::HashMap::new();".to_string()), "\n".to_string()), " for line in text.lines() {".to_string()), "\n".to_string()), " if line.is_empty() {".to_string()), "\n".to_string()), " continue;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " match line.split_once('\\t') {".to_string()), "\n".to_string()), " Some((key, value)) if !key.is_empty() => {".to_string()), "\n".to_string()), " if facts.insert(key.to_string(), value.to_string()).is_some() {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: duplicate host fact row: {key}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " _ => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: malformed host fact line (expected keyvalue): {line}\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let malformed_path = host_fact(&facts, \"malformed_control_path\");".to_string()), "\n".to_string()), " let malformed_reason = host_fact(&facts, \"malformed_control_reason\");".to_string()), "\n".to_string()), " let malformed_control = if malformed_path.is_empty() {".to_string()), "\n".to_string()), " NativeRouteMalformedControl::MalformedSpecimenAccepted".to_string()), "\n".to_string()), " } else {".to_string()), "\n".to_string()), " NativeRouteMalformedControl::MalformedSpecimenRefused {".to_string()), "\n".to_string()), " path: malformed_path,".to_string()), "\n".to_string()), " reason: malformed_reason,".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let old_route_disposition = host_fact(&facts, \"old_route_disposition\");".to_string()), "\n".to_string()), " let old_route_executable = host_fact(&facts, \"old_route_executable\");".to_string()), "\n".to_string()), " let old_route_control = match old_route_disposition.as_str() {".to_string()), "\n".to_string()), " \"withdrawn\" => NativeRouteOldRouteControl::OldRouteWithdrawn {".to_string()), "\n".to_string()), " withdrawn_executable: old_route_executable,".to_string()), "\n".to_string()), " },".to_string()), "\n".to_string()), " \"not_present_at_window\" => NativeRouteOldRouteControl::OldRouteNotPresentAtWindow {".to_string()), "\n".to_string()), " expected_executable: old_route_executable,".to_string()), "\n".to_string()), " },".to_string()), "\n".to_string()), " other => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: old_route_disposition names no control this route can record: {other} -- expected withdrawn or not_present_at_window\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " // The emitted build is the host's observation of the cargo spawn this binary is the".to_string()), "\n".to_string()), " // product of: six rows, the argv as one row per word under a length row. A count that".to_string()), "\n".to_string()), " // does not parse, or an index row it promises that is missing, refuses like any other".to_string()), "\n".to_string()), " // missing fact; nothing is defaulted.".to_string()), "\n".to_string()), " let cargo_argv_len = host_fact_int(&facts, \"cargo_argv_len\");".to_string()), "\n".to_string()), " let mut cargo_argv: Vec = Vec::new();".to_string()), "\n".to_string()), " for index in 0..cargo_argv_len {".to_string()), "\n".to_string()), " cargo_argv.push(host_fact(&facts, &format!(\"cargo_argv_{index}\")));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let emitted_build = NativeRouteEmittedBuild {".to_string()), "\n".to_string()), " cargo_argv: Rc::new(cargo_argv.into()),".to_string()), "\n".to_string()), " rustflags: host_fact(&facts, \"rustflags\"),".to_string()), "\n".to_string()), " compiler_path: host_fact(&facts, \"compiler_path\"),".to_string()), "\n".to_string()), " rustc_identity: host_fact(&facts, \"rustc_identity\"),".to_string()), "\n".to_string()), " exit_status: host_fact_int(&facts, \"exit_status\"),".to_string()), "\n".to_string()), " warning_count: host_fact_int(&facts, \"warning_count\"),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " NativeLaneHostFacts {".to_string()), "\n".to_string()), " tested_tree: host_fact(&facts, \"tested_tree\"),".to_string()), "\n".to_string()), " preparation_seed_identity: host_fact(&facts, \"preparation_seed_identity\"),".to_string()), "\n".to_string()), " emitted_closure_identity: host_fact(&facts, \"emitted_closure_identity\"),".to_string()), "\n".to_string()), " executable_path: host_fact(&facts, \"executable_path\"),".to_string()), "\n".to_string()), " executable_identity: host_fact(&facts, \"executable_identity\"),".to_string()), "\n".to_string()), " old_route_control: Rc::new(old_route_control),".to_string()), "\n".to_string()), " malformed_control: Rc::new(malformed_control),".to_string()), "\n".to_string()), " emitted_build: Rc::new(emitted_build),".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn run_census(source_roots: &[String]) {".to_string()), "\n".to_string()), " let reads = read_ingest(source_roots);".to_string()), "\n".to_string()), " let context = match &*native_test_context_from_ingest(Rc::new(reads.into())) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"CONTEXT-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " for refusal in context.file_refusals.iter() {".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"file_refusal\": refusal }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"_terminal\": \"complete\", \"mode\": \"census\", \"file_refusals\": context.file_refusals.len() }));".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), "fn native_cost_quantile_nanos(sorted: &[u128], numer: usize, denom: usize) -> u128 {".to_string()), "\n".to_string()), " if sorted.is_empty() { return 0; }".to_string()), "\n".to_string()), " let idx = (sorted.len() - 1) * numer / denom;".to_string()), "\n".to_string()), " sorted[idx]".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// A SPAN IS READ ONCE, THROUGH A READER THAT REFUSES A CLOCK THAT WENT BACKWARDS.".to_string()), "\n".to_string()), "// Instant::elapsed is Instant::now().duration_since(earlier), and duration_since SATURATES:".to_string()), "\n".to_string()), "// a monotonic clock that is not actually monotonic -- which happens on some virtualised and".to_string()), "\n".to_string()), "// migrated hosts -- yields Duration::ZERO rather than an error. That is the fabricated zero".to_string()), "\n".to_string()), "// this receipt forbids, arriving by a quieter route than the saturating_sub it replaced: a".to_string()), "\n".to_string()), "// phase would report as having taken no time and the partition would balance for the wrong".to_string()), "\n".to_string()), "// reason. checked_duration_since returns None instead, so the impossible reading is".to_string()), "\n".to_string()), "// REPRESENTABLE and can be refused.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// AN EARLIER REVISION OF THIS FILE CLAIMED THE CLASS WAS STRUCTURALLY IMPOSSIBLE ONCE THE".to_string()), "\n".to_string()), "// subtraction was gone. That was wrong and is corrected rather than softened: deleting the".to_string()), "\n".to_string()), "// explicit subtraction removed the visible clamp, not the saturation underneath it. The".to_string()), "\n".to_string()), "// honest rung is MITIGATED BY A TYPED REFUSAL at a declared boundary -- the host clock is".to_string()), "\n".to_string()), "// external reality, which DESIGN section 4b keeps off the ladder rather than on its top rung.".to_string()), "\n".to_string()), "fn span_nanos(started: Instant) -> u128 {".to_string()), "\n".to_string()), " match Instant::now().checked_duration_since(started) {".to_string()), "\n".to_string()), " Some(d) => d.as_nanos(),".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: the monotonic clock went backwards between two reads, so no span is measurable\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// A SPAN THAT DOES NOT FIT REFUSES RATHER THAN SATURATING (review 64474 control). This was".to_string()), "\n".to_string()), "// i64::try_from(n).unwrap_or(i64::MAX), which turns a failed conversion into a FIGURE -- and a".to_string()), "\n".to_string()), "// fabricated figure on a receipt is the state DESIGN section 5 forbids outright, whether the".to_string()), "\n".to_string()), "// invented number is a zero that reports a phase as instant or a maximum that reports it as".to_string()), "\n".to_string()), "// three centuries. The saturating arm also chose the direction that hides best: i64::MAX would".to_string()), "\n".to_string()), "// push the exclusive sum past the parent and surface as NativeDriverCostOverAttributed, a cost".to_string()), "\n".to_string()), "// verdict naming the wrong cause.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// ON REACHABILITY, STATED RATHER THAN LEFT AS AN IMPLIED CLAIM: i64 nanoseconds is about 292".to_string()), "\n".to_string()), "// years, so no span this driver measures reaches it, and the refusal below is not expected to".to_string()), "\n".to_string()), "// fire. It is written because the alternative is not silence but a LIE -- the arm has to answer".to_string()), "\n".to_string()), "// something, and the only honest answers are a real number or a refusal.".to_string()), "\n".to_string()), "fn native_cost_i64(n: u128) -> i64 {".to_string()), "\n".to_string()), " match i64::try_from(n) {".to_string()), "\n".to_string()), " Ok(v) => v,".to_string()), "\n".to_string()), " Err(cause) => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: a measured span does not fit the cost carrier, so no partition can be reported: {n} ({cause})\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// AN UNREADABLE /proc IS ABSENT, NOT ZERO (review 64181). A zero here was printed as".to_string()), "\n".to_string()), "// peak_rss_bytes / rss_bytes and read as a measurement: a run on a host without /proc, or with".to_string()), "\n".to_string()), "// the key renamed, reported a process using no memory. Absence is carried as None and rendered".to_string()), "\n".to_string()), "// as JSON null, so the receipt says it does not know instead of inventing a figure. This is".to_string()), "\n".to_string()), "// telemetry on no receipt field, so it is the one place an Absent is carried rather than".to_string()), "\n".to_string()), "// refused: the run is still a valid observation of everything else.".to_string()), "\n".to_string()), "fn proc_status_kib(key: &str) -> Option {".to_string()), "\n".to_string()), " let text = std::fs::read_to_string(\"/proc/self/status\").ok()?;".to_string()), "\n".to_string()), " for line in text.lines() {".to_string()), "\n".to_string()), " if let Some(rest) = line.strip_prefix(key) {".to_string()), "\n".to_string()), " return rest".to_string()), "\n".to_string()), " .trim_start_matches(':')".to_string()), "\n".to_string()), " .trim()".to_string()), "\n".to_string()), " .split_whitespace()".to_string()), "\n".to_string()), " .next()".to_string()), "\n".to_string()), " .and_then(|n| n.parse::().ok());".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " None".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "// ONE CLOCK, AND IT IS THE MONOTONIC ONE (review 64474). Every exclusive phase span and the".to_string()), "\n".to_string()), "// parent span are read from Instant, so the partition compares readings from a single source.".to_string()), "\n".to_string()), "// They were split before this: the parent came from Instant while the phase spans came from".to_string()), "\n".to_string()), "// SystemTime, which is the wall clock and is free to step backwards under NTP or an operator".to_string()), "\n".to_string()), "// adjustment. A step between two phase reads could then push the exclusive sum past a parent".to_string()), "\n".to_string()), "// span that never moved, and the driver would refuse with NativeDriverCostOverAttributed --".to_string()), "\n".to_string()), "// a cost refusal whose real cause was the clock. That is a fabricated attribution: the numbers".to_string()), "\n".to_string()), "// would be wrong while the receipt read as a measurement.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// THE SUBTRACTION IS GONE RATHER THAN GUARDED, which is the point. A span used to be an".to_string()), "\n".to_string()), "// explicit saturating_sub of two readings, so a backwards step clamped the difference to zero".to_string()), "\n".to_string()), "// and reported a phase as having taken NO TIME -- the exact state the annotation beside it".to_string()), "\n".to_string()), "// forbade, reached by the arm meant to prevent it. Instant::elapsed cannot return a negative".to_string()), "\n".to_string()), "// duration, so there is no difference to clamp and no clamp to review: DESIGN section 5".to_string()), "\n".to_string()), "// construction over validation, and the class climbs from mitigated to structurally".to_string()), "\n".to_string()), "// impossible. The pre-epoch refusal that guarded the old wall-clock read is DELETED with it,".to_string()), "\n".to_string()), "// because the hazard it named cannot arise on this clock -- production handling dissolves on".to_string()), "\n".to_string()), "// the climb (DESIGN section 4b(4)); no evidence is retired here, since that arm had none.".to_string()), "\n".to_string()), "fn run_adjudication(facts_path: &str, source_roots: &[String]) {".to_string()), "\n".to_string()), " let driver_start = Instant::now();".to_string()), "\n".to_string()), " // A MISSING GITHUB_SHA IS ABSENT, NOT \"local\" (review 64181). The receipt line carries this".to_string()), "\n".to_string()), " // as the tree the measurement describes; the literal \"local\" is a plausible identity that".to_string()), "\n".to_string()), " // no reader can distinguish from a tree actually named local.".to_string()), "\n".to_string()), " let head: Option = std::env::var(\"GITHUB_SHA\").ok();".to_string()), "\n".to_string()), " let facts = read_host_facts(facts_path);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // the load row: reading the declared roots off disk. Its own exclusive row rather than a".to_string()), "\n".to_string()), " // field on another phase, so the IO is never mixed into a fold's number.".to_string()), "\n".to_string()), " let load_started = Instant::now();".to_string()), "\n".to_string()), " let reads = read_ingest(source_roots);".to_string()), "\n".to_string()), " let corpus_reads = reads.len();".to_string()), "\n".to_string()), " let ingest = Rc::new(im::vector::Vector::from(reads));".to_string()), "\n".to_string()), " let load_nanos = span_nanos(load_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // universe_derivation: the floor's own per-file discovery fold plus the module-header and".to_string()), "\n".to_string()), " // import scans, over EVERY read -- discovery is a corpus-wide question -- and then the".to_string()), "\n".to_string()), " // import closure of the universe's modules, which is all the front end is given.".to_string()), "\n".to_string()), " let universe_started = Instant::now();".to_string()), "\n".to_string()), " let source_facts = native_lane_source_facts(ingest.clone());".to_string()), "\n".to_string()), " let universe = match &*native_lane_universe(ingest.clone()) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"DERIVATION-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " // The walk's budget exhausting is a refusal of the whole derivation, never a truncated".to_string()), "\n".to_string()), " // closure: a narrowed ingest would surface only as unexplained resolve refusals later.".to_string()), "\n".to_string()), " let closure = match &*native_lane_closure_modules(".to_string()), "\n".to_string()), " source_facts.clone(),".to_string()), "\n".to_string()), " universe.clone(),".to_string()), "\n".to_string()), " native_lane_closure_round_budget(),".to_string()), "\n".to_string()), " ) {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"CLOSURE-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let closure_ingest = native_lane_closure_ingest(ingest.clone(), source_facts.clone(), closure.clone());".to_string()), "\n".to_string()), " let closure_reads = closure_ingest.len();".to_string()), "\n".to_string()), " // The ingest receipt's identity join, asked by the route: every ingested source declares a".to_string()), "\n".to_string()), " // closure module and every closure module some source declares was ingested. A miss is the".to_string()), "\n".to_string()), " // hidden prepass (or a hidden narrowing) this receipt exists to refuse.".to_string()), "\n".to_string()), " let ingest_receipt = native_lane_ingest_receipt(source_facts.clone(), closure.clone(), closure_ingest.clone());".to_string()), "\n".to_string()), " // The join answers a typed refusal naming the offending identity, so the counts below are".to_string()), "\n".to_string()), " // context for it rather than the whole diagnostic: a reader gets the module and the path,".to_string()), "\n".to_string()), " // not a pair of totals to re-derive the offender from.".to_string()), "\n".to_string()), " match &*native_lane_ingest_matches_closure(source_facts.clone(), ingest_receipt.clone(), closure_ingest.clone()) {".to_string()), "\n".to_string()), " Outcome::Accepted { .. } => {}".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"INGEST-CLOSURE-REFUSED: {:#?} (scanned={} ingested={} closure_modules={})\",".to_string()), "\n".to_string()), " diagnostics,".to_string()), "\n".to_string()), " ingest_receipt.scanned_paths.len(),".to_string()), "\n".to_string()), " ingest_receipt.ingested_paths.len(),".to_string()), "\n".to_string()), " ingest_receipt.closure_modules.len(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let universe_nanos = span_nanos(universe_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // the context row: the front-end fold over the CLOSURE only, entered ONE PHASE AT A TIME.".to_string()), "\n".to_string()), " // The driver owns the clock, so it is the only place a phase span can be read; the phases".to_string()), "\n".to_string()), " // themselves are v2.compiler.program_assembly declarations and each binds the previous".to_string()), "\n".to_string()), " // phase's Outcome, so each phase BODY is single-authored and only the ORDER and the".to_string()), "\n".to_string()), " // inter-phase diagnostic merge exist twice -- here and in the modeled composition".to_string()), "\n".to_string()), " // program_assembly_read_to_normalized_root_prepared.".to_string()), "\n".to_string()), " //".to_string()), "\n".to_string()), " // THAT SECOND SPELLING IS ADMITTED DEBT AND IS FILED, NOT ASSERTED AWAY (review 65068):".to_string()), "\n".to_string()), " // gunbc.recurring_failure_mode.realization_respells_a_modeled_folds_sequencing_to_instrument_it.".to_string()), "\n".to_string()), " // An earlier revision of this comment claimed the two are the same computation. Nothing".to_string()), "\n".to_string()), " // executes that claim, and a .dag witness comparing the composition against its own phases".to_string()), "\n".to_string()), " // CANNOT go red -- the composition is defined as the phase chain -- so the honest answer is".to_string()), "\n".to_string()), " // the row and its trigger (a realization seam that yields per-phase spans FROM a modeled".to_string()), "\n".to_string()), " // fold), not a green check. Reordering these calls or dropping the merge that".to_string()), "\n".to_string()), " // program_assembly_phase_parse_measured performs would change the context with nothing red.".to_string()), "\n".to_string()), " let context_started = Instant::now();".to_string()), "\n".to_string()), " // THE ONCE-PER-FOLD INVARIANT IS PAID ONCE, HERE, AND CARRIED INTO EVERY FILE. A second".to_string()), "\n".to_string()), " // dag_language_model() or prepare_grammar() call inside the loop would re-introduce at the".to_string()), "\n".to_string()), " // realization layer exactly the per-file recompute the fold hoisted out.".to_string()), "\n".to_string()), " let front_end = match &*native_test_front_end_prepare() {".to_string()), "\n".to_string()), " Outcome::Accepted { value, .. } => value.clone(),".to_string()), "\n".to_string()), " Outcome::Rejected { diagnostics } => {".to_string()), "\n".to_string()), " eprintln!(\"CONTEXT-REFUSED: {diagnostics:#?}\");".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let front_end_nanos = span_nanos(context_started);".to_string()), "\n".to_string()), " let mut context_state = native_test_context_state_empty();".to_string()), "\n".to_string()), " let mut tokenize_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut parse_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut normalize_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut absorb_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut phase_calls: u64 = 0;".to_string()), "\n".to_string()), " let mut token_total: u64 = 0;".to_string()), "\n".to_string()), " let mut memo_hits_total: u64 = 0;".to_string()), "\n".to_string()), " let mut memo_misses_total: u64 = 0;".to_string()), "\n".to_string()), " let mut memo_lookups_total: u64 = 0;".to_string()), "\n".to_string()), " let mut byte_total: u64 = 0;".to_string()), "\n".to_string()), " let mut context_file_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " for read in closure_ingest.iter() {".to_string()), "\n".to_string()), " let file_started = Instant::now();".to_string()), "\n".to_string()), " let tokenize_started = Instant::now();".to_string()), "\n".to_string()), " let tokens = program_assembly_phase_tokenize(read.clone(), front_end.lm.clone());".to_string()), "\n".to_string()), " let file_tokenize_nanos = span_nanos(tokenize_started);".to_string()), "\n".to_string()), " // The COUNT the time is read against: a span alone cannot separate a large file from a".to_string()), "\n".to_string()), " // per-file constant. Counted outside every phase span so it prices none of them.".to_string()), "\n".to_string()), " let file_tokens = program_assembly_phase_token_count(tokens.clone());".to_string()), "\n".to_string()), " let parse_started = Instant::now();".to_string()), "\n".to_string()), " let measured = program_assembly_phase_parse_measured(".to_string()), "\n".to_string()), " tokens.clone(),".to_string()), "\n".to_string()), " front_end.prepared.clone(),".to_string()), "\n".to_string()), " // The residue field is an Optional whose inner type rides a recursion cycle, so the".to_string()), "\n".to_string()), " // emitted record BOXES it while the phase takes the option by value. Deref the box".to_string()), "\n".to_string()), " // rather than clone it; the sibling fields above are Rc and clone correctly.".to_string()), "\n".to_string()), " (*front_end.residue).clone(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let file_parse_nanos = span_nanos(parse_started);".to_string()), "\n".to_string()), " // The memo accounting rides BESIDE the outcome, so it reports on a refusal too --".to_string()), "\n".to_string()), " // which is the expensive case this instrument exists to read. Counted outside every".to_string()), "\n".to_string()), " // phase span so it prices none of them.".to_string()), "\n".to_string()), " let file_memo_hits = program_assembly_memo_hits(measured.clone());".to_string()), "\n".to_string()), " let file_memo_misses = program_assembly_memo_misses(measured.clone());".to_string()), "\n".to_string()), " let file_memo_lookups = program_assembly_memo_lookup_calls(measured.clone());".to_string()), "\n".to_string()), " let parsed = program_assembly_measured_outcome(measured);".to_string()), "\n".to_string()), " let normalize_started = Instant::now();".to_string()), "\n".to_string()), " let root = program_assembly_phase_normalize(parsed.clone());".to_string()), "\n".to_string()), " let file_normalize_nanos = span_nanos(normalize_started);".to_string()), "\n".to_string()), " // qualified-name read plus source-root index insertion: the half of the per-file step".to_string()), "\n".to_string()), " // that is not the front end, timed separately because a quadratic accumulator would".to_string()), "\n".to_string()), " // live here and nowhere else in this loop.".to_string()), "\n".to_string()), " let absorb_started = Instant::now();".to_string()), "\n".to_string()), " context_state = native_test_context_absorb(context_state.clone(), read.clone(), root.clone());".to_string()), "\n".to_string()), " let file_absorb_nanos = span_nanos(absorb_started);".to_string()), "\n".to_string()), " let file_nanos = span_nanos(file_started);".to_string()), "\n".to_string()), " tokenize_nanos += file_tokenize_nanos;".to_string()), "\n".to_string()), " parse_nanos += file_parse_nanos;".to_string()), "\n".to_string()), " normalize_nanos += file_normalize_nanos;".to_string()), "\n".to_string()), " absorb_nanos += file_absorb_nanos;".to_string()), "\n".to_string()), " phase_calls += 1;".to_string()), "\n".to_string()), " token_total += file_tokens.max(0) as u64;".to_string()), "\n".to_string()), " memo_hits_total += file_memo_hits.max(0) as u64;".to_string()), "\n".to_string()), " memo_misses_total += file_memo_misses.max(0) as u64;".to_string()), "\n".to_string()), " memo_lookups_total += file_memo_lookups.max(0) as u64;".to_string()), "\n".to_string()), " let file_bytes = read.source.carried.len() as u64;".to_string()), "\n".to_string()), " byte_total += file_bytes;".to_string()), "\n".to_string()), " context_file_samples.push(file_nanos);".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"[native-context-split] {}\",".to_string()), "\n".to_string()), " serde_json::json!({".to_string()), "\n".to_string()), " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",".to_string()), "\n".to_string()), " \"path\": read.compilation_unit.clone(),".to_string()), "\n".to_string()), " \"bytes\": file_bytes,".to_string()), "\n".to_string()), " \"tokens\": file_tokens,".to_string()), "\n".to_string()), " \"tokenize_nanos\": file_tokenize_nanos,".to_string()), "\n".to_string()), " \"parse_nanos\": file_parse_nanos,".to_string()), "\n".to_string()), " \"normalize_nanos\": file_normalize_nanos,".to_string()), "\n".to_string()), " \"absorb_nanos\": file_absorb_nanos,".to_string()), "\n".to_string()), " \"file_nanos\": file_nanos,".to_string()), "\n".to_string()), " \"memo_hits\": file_memo_hits,".to_string()), "\n".to_string()), " \"memo_misses\": file_memo_misses,".to_string()), "\n".to_string()), " \"memo_lookup_calls\": file_memo_lookups,".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let context = native_test_context_finish(context_state, closure_ingest.clone());".to_string()), "\n".to_string()), " let context_nanos = span_nanos(context_started);".to_string()), "\n".to_string()), " context_file_samples.sort_unstable();".to_string()), "\n".to_string()), " let context_phase_sum = front_end_nanos + tokenize_nanos + parse_nanos + normalize_nanos + absorb_nanos;".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"[native-context-partition] {}\",".to_string()), "\n".to_string()), " serde_json::json!({".to_string()), "\n".to_string()), " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",".to_string()), "\n".to_string()), " \"basis\": \"context_span\",".to_string()), "\n".to_string()), " \"basis_note\": \"exclusive phase rows partition context_nanos; residual is loop overhead and the eprintln per file\",".to_string()), "\n".to_string()), " \"context_nanos\": context_nanos,".to_string()), "\n".to_string()), " \"front_end_prepare_nanos\": front_end_nanos,".to_string()), "\n".to_string()), " \"tokenize_nanos\": tokenize_nanos,".to_string()), "\n".to_string()), " \"parse_nanos\": parse_nanos,".to_string()), "\n".to_string()), " \"normalize_nanos\": normalize_nanos,".to_string()), "\n".to_string()), " \"absorb_nanos\": absorb_nanos,".to_string()), "\n".to_string()), " \"sum_phase_nanos\": context_phase_sum,".to_string()), "\n".to_string()), " \"residual_nanos\": context_nanos.saturating_sub(context_phase_sum),".to_string()), "\n".to_string()), " \"files\": phase_calls,".to_string()), "\n".to_string()), " \"tokenize_calls\": phase_calls,".to_string()), "\n".to_string()), " \"parse_calls\": phase_calls,".to_string()), "\n".to_string()), " \"normalize_calls\": phase_calls,".to_string()), "\n".to_string()), " \"absorb_calls\": phase_calls,".to_string()), "\n".to_string()), " \"front_end_prepare_calls\": 1,".to_string()), "\n".to_string()), " \"tokens\": token_total,".to_string()), "\n".to_string()), " \"memo_hits\": memo_hits_total,".to_string()), "\n".to_string()), " \"memo_misses\": memo_misses_total,".to_string()), "\n".to_string()), " \"memo_lookup_calls\": memo_lookups_total,".to_string()), "\n".to_string()), " \"bytes\": byte_total,".to_string()), "\n".to_string()), " \"file_refusals\": context.file_refusals.len(),".to_string()), "\n".to_string()), " \"file_p50_nanos\": native_cost_quantile_nanos(&context_file_samples, 1, 2),".to_string()), "\n".to_string()), " \"file_p95_nanos\": native_cost_quantile_nanos(&context_file_samples, 19, 20),".to_string()), "\n".to_string()), " \"file_max_nanos\": context_file_samples.last().copied().unwrap_or(0),".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // the prepare and eval rows, entered separately per module so the number the profile".to_string()), "\n".to_string()), " // lane prices -- the eval row -- is the sum of native_lane_identity_row".to_string()), "\n".to_string()), " // and nothing else: not ingest, not resolve, not infer.".to_string()), "\n".to_string()), " let mut population: Vec> = Vec::new();".to_string()), "\n".to_string()), " let mut prepare_total_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut evaluate_total_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut prepare_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " let mut eval_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " let mut prepare_ok: u64 = 0;".to_string()), "\n".to_string()), " let mut prepare_refused: u64 = 0;".to_string()), "\n".to_string()), " let mut module_release_nanos: u128 = 0;".to_string()), "\n".to_string()), " // The per-path refusal index is built ONCE here rather than per module: this loop is the".to_string()), "\n".to_string()), " // only place that knows a loop is about to happen, and the join it feeds was O(modules x".to_string()), "\n".to_string()), " // refusals) when each module scanned the refusal list for itself.".to_string()), "\n".to_string()), " let refusal_index = native_lane_file_refusal_index(context.file_refusals.clone());".to_string()), "\n".to_string()), " for entry in universe.modules.iter() {".to_string()), "\n".to_string()), " let prepare_started = Instant::now();".to_string()), "\n".to_string()), " let mut identities: usize = 0;".to_string()), "\n".to_string()), " let mut module_evaluate_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut module_infer_nanos: u128 = 0;".to_string()), "\n".to_string()), " // THE PREPARATION SPAN CLOSES WHEN THE PREPARATION OUTCOME IS ESTABLISHED, BEFORE ANY".to_string()), "\n".to_string()), " // DECLARATION IS EVALUATED. prepare and eval are exclusive rows of one partition, so a".to_string()), "\n".to_string()), " // prepare interval that contained its module's eval intervals would count that work".to_string()), "\n".to_string()), " // twice and inflate the sum against the parent.".to_string()), "\n".to_string()), " //".to_string()), "\n".to_string()), " // THE CLOSE IS THE ARM'S VALUE, NOT AN ASSIGNMENT INSIDE IT. Assigning an outer binding".to_string()), "\n".to_string()), " // from each arm left its initialiser dead, and a dead store is an ERROR in the emitted".to_string()), "\n".to_string()), " // crate (RUSTFLAGS=\"-D warnings\"); silencing it with an allow would be the escape hatch".to_string()), "\n".to_string()), " // DESIGN section 5 forbids. Each arm yields its own span instead, so there is one binding".to_string()), "\n".to_string()), " // site, nothing to overwrite, and the order control has a single spelling to assert on.".to_string()), "\n".to_string()), " let resolve_started = Instant::now();".to_string()), "\n".to_string()), " let resolution = native_lane_module_resolution(context.clone(), refusal_index.clone(), entry.clone());".to_string()), "\n".to_string()), " let module_resolve_nanos = span_nanos(resolve_started);".to_string()), "\n".to_string()), " let (outcome_label, module_prepare_nanos) = match &*resolution {".to_string()), "\n".to_string()), " NativeLaneModuleResolution::NativeLaneModuleContextRowsDecided { rows } => {".to_string()), "\n".to_string()), " let this_prepare = span_nanos(prepare_started);".to_string()), "\n".to_string()), " prepare_refused += 1;".to_string()), "\n".to_string()), " for row in rows.iter() {".to_string()), "\n".to_string()), " population.push(row.clone());".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"context_refused\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeLaneModuleResolution::NativeLaneModuleResolveRowsDecided { rows } => {".to_string()), "\n".to_string()), " let this_prepare = span_nanos(prepare_started);".to_string()), "\n".to_string()), " prepare_refused += 1;".to_string()), "\n".to_string()), " for row in rows.iter() {".to_string()), "\n".to_string()), " population.push(row.clone());".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"resolve_refused\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeLaneModuleResolution::NativeLaneModuleResolved { resolved } => {".to_string()), "\n".to_string()), " let infer_started = Instant::now();".to_string()), "\n".to_string()), " let preparation = native_lane_module_inference(entry.clone(), resolved.clone());".to_string()), "\n".to_string()), " module_infer_nanos = span_nanos(infer_started);".to_string()), "\n".to_string()), " let this_prepare = span_nanos(prepare_started);".to_string()), "\n".to_string()), " match &*preparation {".to_string()), "\n".to_string()), " NativeLaneModulePreparation::NativeLaneModuleRowsDecided { rows } => {".to_string()), "\n".to_string()), " prepare_refused += 1;".to_string()), "\n".to_string()), " for row in rows.iter() {".to_string()), "\n".to_string()), " population.push(row.clone());".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"infer_refused\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeLaneModulePreparation::NativeLaneModulePrepared { prepared } => {".to_string()), "\n".to_string()), " prepare_ok += 1;".to_string()), "\n".to_string()), " for declaration in entry.declarations.iter() {".to_string()), "\n".to_string()), " let evaluate_started = Instant::now();".to_string()), "\n".to_string()), " let row = native_lane_identity_row(".to_string()), "\n".to_string()), " prepared.clone(),".to_string()), "\n".to_string()), " entry.module.clone(),".to_string()), "\n".to_string()), " declaration.clone(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let this_eval = span_nanos(evaluate_started);".to_string()), "\n".to_string()), " module_evaluate_nanos += this_eval;".to_string()), "\n".to_string()), " eval_samples.push(this_eval);".to_string()), "\n".to_string()), " population.push(row);".to_string()), "\n".to_string()), " identities += 1;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " (\"accepted\", this_prepare)".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " prepare_total_nanos += module_prepare_nanos;".to_string()), "\n".to_string()), " evaluate_total_nanos += module_evaluate_nanos;".to_string()), "\n".to_string()), " prepare_samples.push(module_prepare_nanos);".to_string()), "\n".to_string()), " // RELEASE IS MEASURED, NOT LEFT TO SCOPE EXIT. The resolved tree this module built is".to_string()), "\n".to_string()), " // dropped HERE, inside a span, because dropping it at the end of the iteration paid real".to_string()), "\n".to_string()), " // time that no exclusive row covered -- the residual that refused the full corpus at".to_string()), "\n".to_string()), " // RemainderExceedsTolerance. An explicit drop makes the cost nameable; scope exit hides it.".to_string()), "\n".to_string()), " let release_started = Instant::now();".to_string()), "\n".to_string()), " drop(resolution);".to_string()), "\n".to_string()), " module_release_nanos += span_nanos(release_started);".to_string()), "\n".to_string()), " eprintln!(\"[native-prepare-split] module={} resolve_nanos={module_resolve_nanos} infer_nanos={module_infer_nanos} prepare_nanos={module_prepare_nanos} decls={} outcome={outcome_label}\", entry.module, identities);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // receipt_admission: minting the receipt and evaluating the authority's admission and summary".to_string()), "\n".to_string()), " // over it. The controls are executed here because they are receipt inputs, not universe members.".to_string()), "\n".to_string()), " let admission_started = Instant::now();".to_string()), "\n".to_string()), " let receipt = native_lane_receipt(".to_string()), "\n".to_string()), " context.clone(),".to_string()), "\n".to_string()), " universe.clone(),".to_string()), "\n".to_string()), " Rc::new(population.clone().into()),".to_string()), "\n".to_string()), " native_lane_controls(context.clone()),".to_string()), "\n".to_string()), " Rc::new(facts),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let admission = native_route_admission(receipt.clone());".to_string()), "\n".to_string()), " let summary = native_route_admission_summary(admission.clone());".to_string()), "\n".to_string()), " let file_refusal_tally: Vec = native_route_file_refusal_tally(receipt.clone())".to_string()), "\n".to_string()), " .iter()".to_string()), "\n".to_string()), " .map(|row| serde_json::json!(row))".to_string()), "\n".to_string()), " .collect();".to_string()), "\n".to_string()), " let admitted = native_route_admitted(admission.clone());".to_string()), "\n".to_string()), " let admission_nanos = span_nanos(admission_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // row_serialization: SERIALIZING THE OBSERVATIONS AND WRITING THEM, MEASURED (review".to_string()), "\n".to_string()), " // 64181 named this span; #11105 made leaving it unattributed fatal). Every row the".to_string()), "\n".to_string()), " // population carries is turned into JSON here and written to stdout, which is real work".to_string()), "\n".to_string()), " // no other row covers -- eval is the identity fold and nothing else. It is TIMED, never".to_string()), "\n".to_string()), " // derived as parent minus the others: a row defined as the remainder would force the".to_string()), "\n".to_string()), " // residual to zero and make the tolerance arm unfireable by construction.".to_string()), "\n".to_string()), " let serialization_started = Instant::now();".to_string()), "\n".to_string()), " for refusal in receipt.file_refusals.iter() {".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"file_refusal\": refusal }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " for row in population.iter() {".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::to_string(row).unwrap());".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " let row_serialization_nanos = span_nanos(serialization_started);".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), " // THE PARTITION, THROUGH THE ONE LAW. The rows are the row set std.compiler_entry owns and".to_string()), "\n".to_string()), " // verdict is native_driver_cost_account over them -- not a second reconcile. The two rows".to_string()), "\n".to_string()), " // this route pays that a driver handed a universe file does not (universe_derivation,".to_string()), "\n".to_string()), " // receipt_admission) are members of the same exclusive sum, so an over-attribution through".to_string()), "\n".to_string()), " // either is caught here rather than by a check of its own.".to_string()), "\n".to_string()), " prepare_samples.sort_unstable();".to_string()), "\n".to_string()), " eval_samples.sort_unstable();".to_string()), "\n".to_string()), " let parent_span_nanos = span_nanos(driver_start);".to_string()), "\n".to_string()), " let exclusive = Rc::new(NativeDriverExclusiveRows {".to_string()), "\n".to_string()), " load: nanosecond(native_cost_i64(load_nanos)),".to_string()), "\n".to_string()), " universe_derivation: nanosecond(native_cost_i64(universe_nanos)),".to_string()), "\n".to_string()), " context: nanosecond(native_cost_i64(context_nanos)),".to_string()), "\n".to_string()), " prepare: nanosecond(native_cost_i64(prepare_total_nanos)),".to_string()), "\n".to_string()), " eval: nanosecond(native_cost_i64(evaluate_total_nanos)),".to_string()), "\n".to_string()), " receipt_admission: nanosecond(native_cost_i64(admission_nanos)),".to_string()), "\n".to_string()), " row_serialization: nanosecond(native_cost_i64(row_serialization_nanos)),".to_string()), "\n".to_string()), " module_release: nanosecond(native_cost_i64(module_release_nanos)),".to_string()), "\n".to_string()), " });".to_string()), "\n".to_string()), " let exclusive_sum = nanosecond_count(native_driver_exclusive_sum(exclusive.clone())) as u128;".to_string()), "\n".to_string()), " let tolerance_nanos = nanosecond_count(native_driver_cost_remainder_tolerance_nanos()) as u128;".to_string()), "\n".to_string()), " let accounting = native_driver_cost_account(".to_string()), "\n".to_string()), " nanosecond(native_cost_i64(parent_span_nanos)),".to_string()), "\n".to_string()), " exclusive.clone(),".to_string()), "\n".to_string()), " native_driver_cost_remainder_tolerance_nanos(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " // The remainder is the residual the accounting itself returns, never parent minus sum: on".to_string()), "\n".to_string()), " // over-attributed arm there IS no remainder, and a clamped zero there would be a".to_string()), "\n".to_string()), " // plausible number standing where the measurement is incoherent.".to_string()), "\n".to_string()), " let (verdict, remainder_nanos) = match accounting.as_ref() {".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostOverAttributed { .. } =>".to_string()), "\n".to_string()), " (r#\"NativeDriverCostOverAttributed\"#, serde_json::Value::Null),".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostRemainderExceedsTolerance { residual, .. } =>".to_string()), "\n".to_string()), " (r#\"NativeDriverCostRemainderExceedsTolerance\"#, serde_json::json!(nanosecond_count(residual.clone()))),".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostReconciled { residual, .. } =>".to_string()), "\n".to_string()), " (r#\"NativeDriverCostReconciled\"#, serde_json::json!(nanosecond_count(residual.clone()))),".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let identities = universe.identities.len() as u64;".to_string()), "\n".to_string()), " let eval_mean = if eval_samples.is_empty() { 0 } else { evaluate_total_nanos / eval_samples.len() as u128 };".to_string()), "\n".to_string()), " let prepare_mean = if prepare_samples.is_empty() { 0 } else { prepare_total_nanos / prepare_samples.len() as u128 };".to_string()), "\n".to_string()), " // THE ROWS ARE PROJECTED FROM THE VALUE, NOT RE-LISTED (review 64181). The field names".to_string()), "\n".to_string()), " // were written once to build NativeDriverExclusiveRows and again to render it, which is the".to_string()), "\n".to_string()), " // second spelling this file warns about for prose, applied to the emitted object: a driver".to_string()), "\n".to_string()), " // gaining a phase would have updated the struct and left the receipt short. Serializing the".to_string()), "\n".to_string()), " // value carries the row set from the type, so the JSON cannot disagree with the fold. The".to_string()), "\n".to_string()), " // rows therefore render as std.measure Nanosecond objects rather than bare integers -- the".to_string()), "\n".to_string()), " // unit travels with the number, which is the point of the type.".to_string()), "\n".to_string()), " // A NON-RECONCILED ARM IS A PROCESS REFUSAL (#11105, review 63891). The receipt is".to_string()), "\n".to_string()), " // printed first so the numbers that caused the refusal are on the wire, and THEN the".to_string()), "\n".to_string()), " // line stops: a verdict string with exit 0 is the inert lens DESIGN section 6 names.".to_string()), "\n".to_string()), " // The full-N run of this route refused here on 158600186 ns against a 50000000 ns".to_string()), "\n".to_string()), " // tolerance before row_serialization was a measured row, which is what put that row on".to_string()), "\n".to_string()), " // the type rather than a wider tolerance on this arm.".to_string()), "\n".to_string()), " eprintln!(\"[native-cost-partition] {}\", serde_json::json!({".to_string()), "\n".to_string()), " \"basis\": \"native_driver_wall\",".to_string()), "\n".to_string()), " \"basis_note\": \"single-threaded SourceRootEvalDriver wall; exclusive rows partition parent_span_nanos\",".to_string()), "\n".to_string()), " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",".to_string()), "\n".to_string()), " \"head\": head,".to_string()), "\n".to_string()), " \"mode\": \"adjudicate\",".to_string()), "\n".to_string()), " \"verdict\": verdict,".to_string()), "\n".to_string()), " \"tolerance_nanos\": tolerance_nanos,".to_string()), "\n".to_string()), " \"parent_span_nanos\": parent_span_nanos,".to_string()), "\n".to_string()), " \"exclusive\": exclusive,".to_string()), "\n".to_string()), " \"sum_exclusive_nanos\": exclusive_sum,".to_string()), "\n".to_string()), " \"remainder_nanos\": remainder_nanos,".to_string()), "\n".to_string()), " \"corpus_reads\": corpus_reads,".to_string()), "\n".to_string()), " \"closure_reads\": closure_reads,".to_string()), "\n".to_string()), " \"scanned_paths\": ingest_receipt.scanned_paths.len(),".to_string()), "\n".to_string()), " \"ingested_paths\": ingest_receipt.ingested_paths.len(),".to_string()), "\n".to_string()), " \"closure_modules\": closure.len(),".to_string()), "\n".to_string()), " \"identities\": identities,".to_string()), "\n".to_string()), " \"unique_modules\": universe.modules.len(),".to_string()), "\n".to_string()), " \"file_refusals\": receipt.file_refusals.len(),".to_string()), "\n".to_string()), " \"prepare_ok\": prepare_ok,".to_string()), "\n".to_string()), " \"prepare_refused\": prepare_refused,".to_string()), "\n".to_string()), " \"prepare_mean_nanos\": prepare_mean,".to_string()), "\n".to_string()), " \"prepare_p50_nanos\": native_cost_quantile_nanos(&prepare_samples, 1, 2),".to_string()), "\n".to_string()), " \"prepare_p95_nanos\": native_cost_quantile_nanos(&prepare_samples, 19, 20),".to_string()), "\n".to_string()), " \"prepare_max_nanos\": prepare_samples.last().copied().unwrap_or(0),".to_string()), "\n".to_string()), " \"eval_mean_nanos\": eval_mean,".to_string()), "\n".to_string()), " \"eval_p50_nanos\": native_cost_quantile_nanos(&eval_samples, 1, 2),".to_string()), "\n".to_string()), " \"eval_p95_nanos\": native_cost_quantile_nanos(&eval_samples, 19, 20),".to_string()), "\n".to_string()), " \"eval_max_nanos\": eval_samples.last().copied().unwrap_or(0),".to_string()), "\n".to_string()), " \"peak_rss_bytes\": proc_status_kib(\"VmHWM\").map(|kib| kib * 1024),".to_string()), "\n".to_string()), " \"rss_bytes\": proc_status_kib(\"VmRSS\").map(|kib| kib * 1024),".to_string()), "\n".to_string()), " }));".to_string()), "\n".to_string()), " match accounting.as_ref() {".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostReconciled { .. } => {}".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostOverAttributed { sum_exclusive, parent_span } => {".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"REFUSED: native driver cost OverAttributed {{ sum_exclusive_nanos: {}, parent_span_nanos: {} }}\",".to_string()), "\n".to_string()), " nanosecond_count(sum_exclusive.clone()) as u128,".to_string()), "\n".to_string()), " nanosecond_count(parent_span.clone()) as u128".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeDriverCostAccounting::NativeDriverCostRemainderExceedsTolerance { residual, tolerance } => {".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"REFUSED: native driver cost RemainderExceedsTolerance {{ residual_nanos: {}, tolerance_nanos: {} }} -- unattributed driver work; name the span, do not widen the tolerance\",".to_string()), "\n".to_string()), " nanosecond_count(residual.clone()) as u128,".to_string()), "\n".to_string()), " nanosecond_count(tolerance.clone()) as u128".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " println!(".to_string()), "\n".to_string()), " \"{}\",".to_string()), "\n".to_string()), " serde_json::json!({".to_string()), "\n".to_string()), " \"_terminal\": \"complete\",".to_string()), "\n".to_string()), " \"mode\": \"adjudicate\",".to_string()), "\n".to_string()), " \"rows\": population.len(),".to_string()), "\n".to_string()), " \"universe\": universe.identities.len(),".to_string()), "\n".to_string()), " \"file_refusals\": receipt.file_refusals.len(),".to_string()), "\n".to_string()), " \"file_refusal_tally\": file_refusal_tally,".to_string()), "\n".to_string()), " \"admitted\": admitted,".to_string()), "\n".to_string()), " \"summary\": summary,".to_string()), "\n".to_string()), " })".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " if admitted {".to_string()), "\n".to_string()), " std::process::exit(0);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " std::process::exit(1);".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "".to_string()), "\n".to_string()), "fn main() {".to_string()), "\n".to_string()), " let mut args = std::env::args().skip(1);".to_string()), "\n".to_string()), " let mode = match args.next() {".to_string()), "\n".to_string()), " Some(mode) => mode,".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: no mode given -- usage: ".to_string()), crate_name.clone()), " adjudicate ... | ".to_string()), crate_name.clone()), " census ...\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " if mode == \"census\" {".to_string()), "\n".to_string()), " let source_roots: Vec = args.collect();".to_string()), "\n".to_string()), " run_census(&source_roots);".to_string()), "\n".to_string()), " return;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " if mode == \"adjudicate\" {".to_string()), "\n".to_string()), " let facts_path = match args.next() {".to_string()), "\n".to_string()), " Some(path) => path,".to_string()), "\n".to_string()), " None => {".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: adjudicate takes a host facts file before the source roots\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " let source_roots: Vec = args.collect();".to_string()), "\n".to_string()), " run_adjudication(&facts_path, &source_roots);".to_string()), "\n".to_string()), " return;".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " eprintln!(\"REFUSED: unknown mode {mode} -- expected adjudicate or census\");".to_string()), "\n".to_string()), " std::process::exit(2);".to_string()), "\n".to_string()), "}".to_string()), "\n".to_string()), "\n".to_string()), }) } } diff --git a/src/v2/compiler/00_compile.dag b/src/v2/compiler/00_compile.dag index b2aa5b10a6a..3107be5f77c 100644 --- a/src/v2/compiler/00_compile.dag +++ b/src/v2/compiler/00_compile.dag @@ -1239,14 +1239,18 @@ fn native_test_file_refusal(path: Symbol, d: NonEmptyDiagnostics) -> NativeTestF } } -fn native_test_context_fold_step( +// THE FILE'S ROOT, ABSORBED. This is the half of the per-file step that is NOT the front end: +// the qualified-name read off the module node and the source-root index insertion, plus the two +// refusal arms. It takes the root OUTCOME rather than the read, so the caller decides how the +// front end was entered -- as one composed call (native_test_context_from_ingest below) or phase +// by phase with a clock between them (std.compiler_entry.SourceRootEvalDriver). Neither caller +// changes what is absorbed. +fn native_test_context_absorb( state: NativeTestContextFoldState, read: DagSourceReadWitness, - lm: LanguageModel, - prepared: PreparedGrammar, - residue: Diagnostics + root_outcome: Outcome ) -> NativeTestContextFoldState { - match program_assembly_read_to_normalized_root_prepared(read: read, lm: lm, prepared: prepared, residue: residue) { + match root_outcome { Rejected { diagnostics: d } => NativeTestContextFoldState { roots: state.roots, @@ -1277,42 +1281,101 @@ fn native_test_context_fold_step( } } -// One language model for the whole fold: dag_language_model() rebuilds the grammar, lex rules -// and canonical-symbol set on every call, and calling it inside the cons closure paid that -// once PER FILE — measured at ~0.3s/file of the context fold's wall time (2026-09-09, -// v2-native route work), a pure recompute with no per-file dependency. -fn native_test_context_from_ingest(ingest: SourceRootIngest) -> Outcome { +fn native_test_context_fold_step( + state: NativeTestContextFoldState, + read: DagSourceReadWitness, + lm: LanguageModel, + prepared: PreparedGrammar, + residue: Diagnostics +) -> NativeTestContextFoldState { + native_test_context_absorb( + state: state, + read: read, + root_outcome: program_assembly_read_to_normalized_root_prepared( + read: read, + lm: lm, + prepared: prepared, + residue: residue + ) + ) +} + +// THE ONCE-PER-FOLD INVARIANT, NAMED. dag_language_model() rebuilds the grammar, lex rules and +// canonical-symbol set on every call and prepare_grammar runs the five validation checks and the +// FIRST/nullable analysis; both are pure functions of nothing, so both are paid once here and +// carried. Calling dag_language_model() inside the cons closure paid that once PER FILE -- +// measured at ~0.3s/file of the context fold's wall time (2026-09-09, required-v2-native lane +// work), a pure recompute with no per-file dependency. +// +// IT IS A CARRIER BECAUSE THE PER-FILE SEAM NEEDS TO NAME IT. A driver that enters the front end +// phase by phase hands the same prepared front end to each file; a second dag_language_model() +// call on the driver side would be the same recompute re-introduced at the realization layer. +type NativeTestFrontEnd { + lm: LanguageModel + prepared: PreparedGrammar + residue: Diagnostics +} + +fn native_test_front_end_prepare() -> Outcome { let lm = dag_language_model() match prepare_grammar(grammar: lm.grammar) { Rejected { diagnostics: d } => Rejected { diagnostics: d } - Accepted { value: prepared, diagnostics: residue } => { - let folded = fold_list( - xs: ingest, - empty: NativeTestContextFoldState { - roots: Empty, - index: source_root_index_empty(), - file_refusals: Empty - }, - cons: fn(state, read) { - native_test_context_fold_step( - state: state, - read: read, - lm: lm, - prepared: prepared, - residue: residue - ) - } - ) - outcome_accepted(value: NativeTestContext { - roots: folded.roots, - index: folded.index, - active_roots: source_root_set_from_ingest(ingest: ingest), - file_refusals: folded.file_refusals + Accepted { value: prepared, diagnostics: residue } => + outcome_accepted(value: NativeTestFrontEnd { + lm: lm, + prepared: prepared, + residue: residue }) - } } } +fn native_test_context_state_empty() -> NativeTestContextFoldState { + NativeTestContextFoldState { + roots: Empty, + index: source_root_index_empty(), + file_refusals: Empty + } +} + +fn native_test_context_finish( + state: NativeTestContextFoldState, + ingest: SourceRootIngest +) -> NativeTestContext { + NativeTestContext { + roots: state.roots, + index: state.index, + active_roots: source_root_set_from_ingest(ingest: ingest), + file_refusals: state.file_refusals + } +} + +// The whole-ingest composition, retained as the single-call door: witnesses and any caller that +// does not own a clock keep calling this, and it is DEFINED BY the same parts the driver enters +// separately rather than restating the fold beside them. +fn native_test_context_from_ingest(ingest: SourceRootIngest) -> Outcome { + bind_outcome( + o: native_test_front_end_prepare(), + f: fn(front) { + outcome_accepted(value: native_test_context_finish( + state: fold_list( + xs: ingest, + empty: native_test_context_state_empty(), + cons: fn(state, read) { + native_test_context_fold_step( + state: state, + read: read, + lm: front.lm, + prepared: front.prepared, + residue: front.residue + ) + } + ), + ingest: ingest + )) + } + ) +} + fn native_test_resolve_module( context: NativeTestContext, module: QualifiedName diff --git a/src/v2/compiler/02_parse.dag b/src/v2/compiler/02_parse.dag index cf93a1da844..fac2de9ce48 100644 --- a/src/v2/compiler/02_parse.dag +++ b/src/v2/compiler/02_parse.dag @@ -522,6 +522,33 @@ fn parse_table_memo_stats(table: ParseTable) -> ParseMemoStats { } } +fn parse_memo_stats_empty() -> ParseMemoStats { + ParseMemoStats { hits: 0, misses: 0, lookup_calls: 0 } +} + +// THE PARSE'S OWN MEMO ACCOUNTING, CARRIED BESIDE ITS RESULT AND NOT INSIDE IT. +// +// WHY NOT A FIELD ON ParseArtifact, which is the shorter change. ParseArtifact answers WHAT was +// parsed; the memo counters answer HOW the parse was executed, which is a realization fact about +// one run and not a property of the tree. DESIGN section 3 keeps interface and realization as two +// facts, so putting a counter on the semantic artifact would make every consumer of a parse result +// carry a measurement it has no use for, and would make the artifact's identity depend on how many +// times a memo happened to be consulted. +// +// AND THE COUNTERS MUST SURVIVE A REFUSAL, which a field on the accepted value cannot do. The +// expensive case this instrument exists to read is a file that spends seconds in parse and THEN +// rejects; an Outcome's Rejected arm carries no ParseArtifact, so the stats would be lost exactly +// where they are most wanted. This carrier holds the outcome and the accounting side by side, so +// both arms report. +// +// THE UNMEASURED ENTRY POINT IS A PROJECTION OF THIS ONE, never a second parse: parse_module_prepared +// is `.outcome` of the measured fold, so there is one implementation and no caller pays a second +// parse to be measured. +type ParseProductionMeasured { + outcome: Outcome + memo: ParseMemoStats +} + fn parse_table_carry_analysis(table: ParseTable, entries: Map, hits: Int, misses: Int, lookups: Int) -> ParseTable { ParseTableRealization { artifact_kind: table.artifact_kind, @@ -2671,6 +2698,20 @@ fn parse_production_prepared( analysis: GrammarFirstAnalysis, production_name: Symbol ) -> Outcome { + parse_production_prepared_measured( + tokens: tokens, + validated: validated, + analysis: analysis, + production_name: production_name + ).outcome +} + +fn parse_production_prepared_measured( + tokens: List, + validated: ValidatedGrammarRoot, + analysis: GrammarFirstAnalysis, + production_name: Symbol +) -> ParseProductionMeasured { let root = validated.root match grammar_lookup_production(root: root, name: production_name) { Holds { value: production } => @@ -2684,32 +2725,44 @@ fn parse_production_prepared( table: table, prov: prov ) { - ParseExprAccepted { remaining: remaining, captured: captured, diagnostics: diags, prov: inner_prov, table: _ } => + ParseExprAccepted { remaining: remaining, captured: captured, diagnostics: diags, prov: inner_prov, table: final_table } => if is_empty(xs: remaining) { let stamped = parse_wrap_production_captured( production: production, captured: captured, prov: inner_prov ) - Accepted { - value: ParseArtifact { tree: stamped.node, span_index: stamped.prov.index }, - diagnostics: parse_diags_to_diagnostics(diags: diags) + ParseProductionMeasured { + outcome: Accepted { + value: ParseArtifact { tree: stamped.node, span_index: stamped.prov.index }, + diagnostics: parse_diags_to_diagnostics(diags: diags) + }, + memo: parse_table_memo_stats(table: final_table) } } else { - Rejected { diagnostics: diagnostics_singleton(d: parse_g0_tokens_remain_diagnostic(tokens: remaining)) } + ParseProductionMeasured { + outcome: Rejected { diagnostics: diagnostics_singleton(d: parse_g0_tokens_remain_diagnostic(tokens: remaining)) }, + memo: parse_table_memo_stats(table: final_table) + } } - ParseExprRejected { diagnostics: diags, table: _ } => - Rejected { - diagnostics: parse_diags_to_non_empty( - diags: diags, - default: parse_e1_syntax_error_diagnostic( - at: node_locus(node: grammar_to_node(grammar: ModeledGrammar { root: root })) + ParseExprRejected { diagnostics: diags, table: final_table } => + ParseProductionMeasured { + outcome: Rejected { + diagnostics: parse_diags_to_non_empty( + diags: diags, + default: parse_e1_syntax_error_diagnostic( + at: node_locus(node: grammar_to_node(grammar: ModeledGrammar { root: root })) + ) ) - ) + }, + memo: parse_table_memo_stats(table: final_table) } } Violates { diagnostic: d } => - Rejected { diagnostics: diagnostics_singleton(d: d) } + ParseProductionMeasured { + outcome: Rejected { diagnostics: diagnostics_singleton(d: d) }, + memo: parse_memo_stats_empty() + } } } @@ -2779,41 +2832,71 @@ fn overlap_residue_stage_from_parse_grammar(grammar: ParseGrammar) -> Optional Outcome { + parse_module_prepared_measured( + tokens: tokens, + prepared: prepared, + validation_residue: validation_residue + ).outcome +} + +// A VOID GRAMMAR CONSULTS NO MEMO, so its accounting is empty rather than absent: the counters are +// zero because nothing was looked up, which is an answer. Reporting no stats at all would make a +// void parse indistinguishable from a parse whose stats were dropped. +fn parse_module_prepared_measured( + tokens: TokenStream, + prepared: PreparedGrammar, + validation_residue: Diagnostics +) -> ParseProductionMeasured { let ntok = token_stream_remaining_count(stream: tokens) match prepared { PreparedVoidGrammar => if ntok == 0 { - Accepted { - value: ParseArtifact { tree: grammar_to_node(grammar: VoidGrammar), span_index: span_index_empty() }, - diagnostics: validation_residue + ParseProductionMeasured { + outcome: Accepted { + value: ParseArtifact { tree: grammar_to_node(grammar: VoidGrammar), span_index: span_index_empty() }, + diagnostics: validation_residue + }, + memo: parse_memo_stats_empty() } } else { - Rejected { - diagnostics: diagnostics_singleton( - d: parse_g0_tokens_remain_diagnostic(tokens: token_stream_remaining(stream: tokens)) - ) + ParseProductionMeasured { + outcome: Rejected { + diagnostics: diagnostics_singleton( + d: parse_g0_tokens_remain_diagnostic(tokens: token_stream_remaining(stream: tokens)) + ) + }, + memo: parse_memo_stats_empty() } } PreparedModeled { modeled: modeled } => - match parse_production_prepared( + let measured = parse_production_prepared_measured( tokens: token_stream_remaining(stream: tokens), validated: modeled.validated, analysis: modeled.analysis, production_name: modeled.validated.root.start - ) { + ) + match measured.outcome { Accepted { value: artifact, diagnostics: parse_diags } => - Accepted { - value: artifact, - diagnostics: diagnostics_merge(outer: validation_residue, inner: parse_diags) + ParseProductionMeasured { + outcome: Accepted { + value: artifact, + diagnostics: diagnostics_merge(outer: validation_residue, inner: parse_diags) + }, + memo: measured.memo } Rejected { diagnostics: parse_rejected } => - Rejected { - diagnostics: rejected_with_pending(pending: validation_residue, rejected: parse_rejected) + ParseProductionMeasured { + outcome: Rejected { + diagnostics: rejected_with_pending(pending: validation_residue, rejected: parse_rejected) + }, + memo: measured.memo } } } diff --git a/src/v2/compiler/program_assembly.dag b/src/v2/compiler/program_assembly.dag index ee31d9be3b9..3b53c43f1d9 100644 --- a/src/v2/compiler/program_assembly.dag +++ b/src/v2/compiler/program_assembly.dag @@ -9,7 +9,16 @@ import v2.compiler.source_authority { source_root_set_from_ingest } import v2.compiler.tokenize { tokenize } -import v2.compiler.parse { PreparedGrammar, parse_module_prepared, prepare_grammar } +import v2.compiler.parse { + ParseArtifact, + ParseProductionMeasured, + PreparedGrammar, + parse_memo_stats_empty, + parse_module_prepared_measured, + prepare_grammar +} +import v2.std.compilers.lexing { TokenStream, token_stream_remaining_count } +import v2.std.integer { Int } import v2.compiler.normalize { normalize } import v2.compiler.name_resolve { Admission, @@ -33,6 +42,7 @@ import v2.std.diagnostic { Outcome, Rejected, bind_outcome, + bind_outcome_accepted, outcome_accepted, outcome_rejected } @@ -52,28 +62,46 @@ fn program_assembly_empty_roots() -> FreeMonoid { Empty } -fn program_assembly_read_to_normalized_root_prepared( +// THE PER-FILE FRONT END, ONE DECLARATION PER PHASE. The composition below is unchanged in +// meaning: each phase takes the PREVIOUS PHASE'S OUTCOME and binds it, so diagnostic merging and +// refusal propagation stay inside `.dag` and a caller that enters the phases separately gets +// byte-identical behaviour to calling the composition. The reason the phases are separate +// declarations at all is that a phase span is a REALIZATION fact -- `.dag` is pure and cannot read +// a clock -- so the only honest way to attribute the fold's cost per phase is to let the driver +// that owns the clock enter each phase and time the call. The same seam is what a fold-parallel +// realization needs: each phase is pure in its inputs, so the per-file sequence is also the +// parallel unit. +// +// DIVERGENCE, STATED (DESIGN section 3b, review 65114). `v2.compiler.staged_front_end` is the +// declared authority for the .dag front-end ORDER, and its own header warns that re-inlining the +// calls beside it is "a second copy of the order -- the section-3 nickname class". These phases +// ARE a second stepwise spelling of tokenize -> parse -> normalize, and the divergence is +// deliberate rather than unnoticed. THE REASON IS MEASURED, not asserted: `run_front_end_to` calls +// `dag_language_model()` per call and `front_end_parse_step` calls `parse_module` with a RAW +// grammar, so routing this fold through it would re-derive the language model and re-run +// `prepare_grammar` ONCE PER FILE -- the two per-file recomputes this fold exists to have already +// hoisted, and which this instrument's own receipt prices at one call and 0.13 s for the whole +// 2243-file closure. It also runs a fourth stage, resolve, which the context fold does not +// perform, and it returns a whole FrontEndRun rather than stages a clock can sit between. +// +// SO THE CONSOLIDATION IS NAMED AND IT IS NOT THIS PR'S: a prepared-grammar, resolve-free, per- +// stage entry on `v2.compiler.staged_front_end`, after which these phases are projections of that +// authority and this comment is deleted. That is a modeling change to a load-bearing module with +// its own witness suite, and it is tracked by the trigger on +// `gunbc.recurring_failure_mode.realization_respells_a_modeled_folds_sequencing_to_instrument_it`. +// +// A NON-SOURCE ARTIFACT REFUSES IN THE TOKENIZE PHASE, not before it, so every file enters +// exactly one phase sequence and no refusal escapes the attribution. +fn program_assembly_phase_tokenize( read: DagSourceReadWitness, - lm: LanguageModel, - prepared: PreparedGrammar, - residue: Diagnostics -) -> Outcome { + lm: LanguageModel +) -> Outcome { match read.artifact.kind { SourceFile => - bind_outcome( - o: tokenize( - text: read.source.carried, - file: read.compilation_unit, - rules: lm.lex - ), - f: fn(token_stream) { - bind_outcome( - o: parse_module_prepared(tokens: token_stream, prepared: prepared, validation_residue: residue), - f: fn(artifact) { - normalize(parse_tree: artifact.tree) - } - ) - } + tokenize( + text: read.source.carried, + file: read.compilation_unit, + rules: lm.lex ) _ => outcome_rejected( @@ -82,6 +110,99 @@ fn program_assembly_read_to_normalized_root_prepared( } } +// THE MEASURED PARSE PHASE, AND THE PLAIN ONE AS ITS PROJECTION. The memo accounting is a +// realization fact about one execution, so it rides beside the outcome rather than inside the +// artifact (see ParseProductionMeasured); a caller that does not report counters takes `.outcome` +// and is byte-for-byte the fold it was before. +// +// THE REJECTED-INPUT ARM REPRODUCES bind_outcome EXACTLY, and is spelled out rather than reused +// because bind_outcome cannot carry a second value out of the bound function: a Rejected token +// stream passes its diagnostics through untouched and reports empty accounting, because no parse +// ran -- an answer, not a missing measurement. The Accepted arm merges the incoming diagnostics +// through bind_outcome_accepted, which is what bind_outcome itself calls. +fn program_assembly_phase_parse_measured( + tokens: Outcome, + prepared: PreparedGrammar, + residue: Diagnostics +) -> ParseProductionMeasured { + match tokens { + Rejected { diagnostics: d } => + ParseProductionMeasured { + outcome: Rejected { diagnostics: d }, + memo: parse_memo_stats_empty() + } + Accepted { value: token_stream, diagnostics: od } => + let measured = parse_module_prepared_measured( + tokens: token_stream, + prepared: prepared, + validation_residue: residue + ) + ParseProductionMeasured { + outcome: bind_outcome_accepted(od: od, inner: measured.outcome), + memo: measured.memo + } + } +} + +fn program_assembly_phase_parse( + tokens: Outcome, + prepared: PreparedGrammar, + residue: Diagnostics +) -> Outcome { + program_assembly_phase_parse_measured( + tokens: tokens, + prepared: prepared, + residue: residue + ).outcome +} + +// The three counters, read out one at a time because the driver prints scalars and a record does +// not cross that boundary as one. +fn program_assembly_memo_hits(measured: ParseProductionMeasured) -> Int { + measured.memo.hits +} + +fn program_assembly_memo_misses(measured: ParseProductionMeasured) -> Int { + measured.memo.misses +} + +fn program_assembly_memo_lookup_calls(measured: ParseProductionMeasured) -> Int { + measured.memo.lookup_calls +} + +fn program_assembly_measured_outcome(measured: ParseProductionMeasured) -> Outcome { + measured.outcome +} + +fn program_assembly_phase_normalize(parsed: Outcome) -> Outcome { + bind_outcome(o: parsed, f: fn(artifact) { normalize(parse_tree: artifact.tree) }) +} + +// THE EXECUTION COUNT THE TIME IS READ AGAINST. A phase span alone cannot distinguish "this file +// is large" from "this file pays a per-file constant", so the driver prints the token count beside +// the spans. A refused tokenize counts zero tokens -- absence, not a fabricated size. +fn program_assembly_phase_token_count(tokens: Outcome) -> Int { + match tokens { + Rejected { diagnostics: _ } => 0 + Accepted { value: stream, diagnostics: _ } => token_stream_remaining_count(stream: stream) + } +} + +fn program_assembly_read_to_normalized_root_prepared( + read: DagSourceReadWitness, + lm: LanguageModel, + prepared: PreparedGrammar, + residue: Diagnostics +) -> Outcome { + program_assembly_phase_normalize( + parsed: program_assembly_phase_parse( + tokens: program_assembly_phase_tokenize(read: read, lm: lm), + prepared: prepared, + residue: residue + ) + ) +} + fn program_assembly_read_to_normalized_root( read: DagSourceReadWitness, lm: LanguageModel