From 82e9a04dc702806d9cf51ca691d851a4c57ec99d Mon Sep 17 00:00:00 2001 From: gunbc-ci-auto-heal Date: Mon, 21 Sep 2026 14:20:00 +0000 Subject: [PATCH 1/2] Native diagnostics through the result boundary: the verdict carries the failing stage's located chain, ambiguity names its lookup class and competing declarations The native test route's refused verdict was `NativeTestRefused { stage, reason: Symbol }`, filled everywhere by folding the failing stage's NonEmptyDiagnostics to its last reason. The stage had computed a located, typed cause (v2.std.diagnostic Diagnostic: reason, locus, correction) and the boundary kept one field of it, so every persisted population row and every line the operator read said WHAT refused and could not say WHERE. One seam earlier the resolver did the same to itself: `SymbolIndexAtomAmbiguous` was a bare variant standing where the lookup had answered `LexicalAmbiguous { candidates }`, so an ambiguous reference reported one symbol while the resolver had known which lookup was ambiguous and which declarations competed. Subject: the NativeRouteMemberRow the native lane persists and the operator line beside it. Implementation boundary: v2.compiler.native_test_vocabulary NativeTestVerdict (refused arm now carries the stage's NonEmptyDiagnostics; reason is DERIVED at the consumer through the new v2.std.diagnostic diagnostics_fatal_reason, which also dissolves the two per-consumer spellings of "the fatal is the last" in the CLI and the compile fold); v2.compiler.resolve AmbiguousLookupClass (lexical chain with candidates / global bare / qualified head shadowing an absolute hit) carried as class + competing-declaration diagnostics in front of the fatal; v2.std.diagnostic Locus gains DeclarationLocus { declaration: QualifiedName } -- DESIGN section 3's cite-the-symbol form, which the corpus had faked by putting a module QN into a Textual file -- so a competing binder is named by identity rather than dragged in as its body node; the emitted eval driver prints one `[native-verdict]` stderr line per non-passing row, rendered by gunbc.witness_v2_native_route native_route_member_row_text; lens_verdict renders a NodeLocus as its occurrence identity instead of "". Positive control and failure controls: v2.test.claim.native_route.native_refusal_detail, six claims over supplied sources through the real native_test_context_from_ingest and native_lane_module_resolution fold (warm producer enrolled). Mutation A (resolver folds the ambiguity back to a singleton) reds exactly the three ambiguity claims; mutation B (the verdict boundary folds back to the reason) reds all five detail claims; the pre-existing reason-only walls stay green under both, which is the measurement that they never covered the detail. Disposition: `native_test_fatal_reason` and `cli_fatal_diagnostic` deleted in favour of the std fold; the reason-only verdict arm has no constructor left (native_test_refused_located demands a locus). Declared remainder: NativeTestFileRefusal (Context-stage rows) keeps head/fatal reasons because the seed host runner's TSV decoder reads that shape; and a node-anchored fatal renders its occurrence but not a file, because the parse SpanIndex is dropped before normalize and occurrence ids are per-file -- rostered in the new recurring_failure_mode row. Co-Authored-By: Claude Opus 5 (1M context) --- ...ded_to_its_reason_at_a_result_boundary.dag | 28 ++ dag/gunbc/witness/v2_native_route.dag | 58 ++- dag/std/compiler_entry.dag | 6 +- src/v1/05_emit_rust.dag | 17 +- src/v1/stage0/src/v1_compiler_emit_rust.rs | 2 +- src/v2/cli/compile_cli.dag | 13 +- src/v2/compiler/00_compile.dag | 89 +++-- src/v2/compiler/03_resolve.dag | 93 ++++- src/v2/compiler/05_eval.dag | 7 + src/v2/compiler/native_test_vocabulary.dag | 101 ++++- .../self_host/frontier_probe_types.dag | 7 +- src/v2/lens/testgen.dag | 25 ++ src/v2/std/diagnostic.dag | 47 ++- src/v2/std/lens_verdict.dag | 49 ++- src/v2/std/verification.dag | 2 + .../native_refusal_detail_test.dag | 376 ++++++++++++++++++ .../provenance/occurrence_id_model_test.dag | 3 +- .../resolve/namespace_only_policy_test.dag | 4 +- ...er_probe_cause_location_roundtrip_test.dag | 2 + .../frontier_probe_cause_location_test.dag | 4 + .../string_literal_raw_newline_test.dag | 3 +- src/v2/test/native_decl_selection_test.dag | 10 +- src/v2/test/v2_native_route_test.dag | 25 +- .../body_lowering_retention_census.dag | 5 + src/v2/workflow/floor_pure_producer_share.dag | 8 + 25 files changed, 889 insertions(+), 95 deletions(-) create mode 100644 dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag create mode 100644 src/v2/test/claim/native_route/native_refusal_detail_test.dag diff --git a/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag b/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag new file mode 100644 index 00000000000..6c03c2f000d --- /dev/null +++ b/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag @@ -0,0 +1,28 @@ +module gunbc.recurring_failure_mode.located_cause_folded_to_its_reason_at_a_result_boundary + +import std.types { NonEmptyStr } +import gunbc.recurring_failure_mode { RecurringFailureMode } + +data located_cause_folded_to_its_reason_at_a_result_boundary: RecurringFailureMode = RecurringFailureMode { + identity: "located_cause_folded_to_its_reason_at_a_result_boundary" as NonEmptyStr, + + receipts: [ + "A failing stage computes a LOCATED, typed cause -- v2.std.diagnostic Diagnostic: reason, locus, correction, and for a rejection the whole NonEmptyDiagnostics chain -- and a result boundary downstream copies ONE FIELD out of it, the reason symbol, into the carrier it hands on. Every consumer past that boundary then reports WHAT refused and cannot report WHERE, and the information was not missing: it was in hand at the stage and discarded at the seam. DESIGN section 5 requires a typed, located refusal; this row is about the location surviving the trip through a result carrier, which the stage having produced it does not by itself secure.", + + "THE INVALID STATE, stated so it can be recognised in a diff: a verdict, observation, receipt or row type with a field `reason: Symbol` where the producer that fills it holds a Diagnostic or a NonEmptyDiagnostics. The tell is the constructor: `reason: fatal_reason(d)`, `reason: d.head.reason`, or a projection function whose whole body is a fold to one Symbol. A second tell one layer up is the fold's own name -- `*_fatal_reason`, `*_last_reason` -- spelled per consumer, because each consumer that summarised re-derived the same 'the fatal is the last' fold for itself.", + + "RECEIPT ONE, gunbc#11507, recorded on v2.cli.compile_cli: the native CLI's rejected arm carried `d.head.reason` into a ProcessExit whose rendered text was one sentence, so three different entries refused with the same nine words and the located fatal -- file and byte extent, already computed by the parse stage -- was printed nowhere. Repaired there by rendering the fatal's locus through lens_verdict_diagnostic_locus_text.", + + "RECEIPT TWO, 2026-09-21, the native test route: v2.compiler.native_test_vocabulary NativeTestVerdict's refused arm was `NativeTestRefused { stage, reason: Symbol }`, filled at every site in v2.compiler.compile by `native_test_fatal_reason(d)`. The persisted population rows the emitted driver wrote and the admission authority judged therefore carried a stage and one symbol per refused identity. An ambiguous reference was reported as `resolve_reason_ambiguous_symbol` and nothing else, while the resolver had computed WHICH lookup was ambiguous (lexical chain, global bare index, qualified head shadowing an absolute hit) and, for the lexical case, the qualified path of every competing binder -- discarded one seam earlier still, at `SymbolIndexAtomAmbiguous`, a bare variant standing where the lookup had answered `LexicalAmbiguous { candidates }`. Repaired by carrying the stage's NonEmptyDiagnostics on the verdict, deriving the reason at the consumer through v2.std.diagnostic diagnostics_fatal_reason, and naming each competing declaration on a DeclarationLocus.", + + "THE SAME SHAPE AT ANOTHER GRAIN IN THE SAME LANE, LEFT STANDING AND NAMED: NativeTestFileRefusal carries `head_reason` and `fatal_reason` for a front-end refusal whose diagnostics carry Textual file-and-extent loci -- the most actionable position the pipeline produces. The row is read by the seed host runner's TSV-shaped decoder, so widening it is a change to that decoder as well; it is the declared remainder of the package that filed this row, not an oversight.", + + "WHY IT RECURS: the reason symbol is the field every AUTHORITY keys on -- cause-ownership tables, expected-red rosters, exclusion taxonomies all classify by reason -- so a carrier designed for the authority's question carries exactly the authority's key and nothing more, and the operator's question (where) has no field. The fix is never to add a second field beside the reason: it is to carry the Diagnostic and DERIVE the reason, so the authority reads the same symbol and the operator reads the same value.", + + "RECOGNITION RULE: at any type that carries a refusal, ask what the PRODUCER held when it filled the field. If the producer held a Diagnostic or NonEmptyDiagnostics and the field is a Symbol, the boundary has folded a located cause to its name. The counter-tell that keeps this from over-firing: a reason minted by the boundary itself, for a refusal no stage produced, legitimately starts as a Symbol -- and even then it owes a locus (native_test_refused_located demands one).", + + "CEILING AND TRIGGER. The class is decidable -- a field typed Symbol filled from a value typed Diagnostic is a shape a lens can read off the Node tree -- so its ceiling is mechanically preventable at least, and structurally guaranteed where the carrier is sealed to a constructor that takes the diagnostics. This row sits at mitigatable: two receipts repaired by hand, and the reading is by reviewer. NEXT-RUNG TRIGGER, naming the capability: a lens over refusal-carrying types that refuses a Symbol-typed field whose fill site projects a Diagnostic's reason, with the file-refusal row above as its first authorable red.", + ], + + evidence: [], +} diff --git a/dag/gunbc/witness/v2_native_route.dag b/dag/gunbc/witness/v2_native_route.dag index f10a60c8fe9..12b1ad242ff 100644 --- a/dag/gunbc/witness/v2_native_route.dag +++ b/dag/gunbc/witness/v2_native_route.dag @@ -9,8 +9,9 @@ import v2.std.optional { Absent, Optional, Present } import v2.compiler.native_test_vocabulary { NativeTestVerdict, NativeTestPassed, NativeTestReturnedFalse, NativeTestReturnedOther, NativeTestRefused, NativeTestStage, NativeTestStageContext, NativeTestStagePrepare, NativeTestStageEntry, NativeTestStageEval, - NativeTestFileRefusal + NativeTestFileRefusal, native_test_verdict_text } +import v2.std.diagnostic { diagnostics_fatal_reason } import v2.workflow.compile_door_cause_ownership { CauseLane, DiagnosticGrain, FatalGrain, HeadGrain, cause_ownership_lookup, known_frontier_causes } @@ -134,6 +135,18 @@ type NativeRouteMemberRow { verdict: NativeTestVerdict } +// THE OPERATOR'S LINE FOR ONE ROW: the subject the lane keys on, then the verdict as the +// vocabulary renders it. The driver prints this on stderr for every row that did not pass, +// beside the JSON row it persists on stdout, so the command an operator runs names the failing +// subject with its stage, its cause and where the cause is -- read off the same value the row +// carries, never re-derived by the host from the bytes it wrote. +fn native_route_member_row_text(row: NativeRouteMemberRow) -> String { + concat( + native_route_identity_qualified(identity: row.identity), + concat(" ", native_test_verdict_text(verdict: row.verdict)) + ) +} + // THE MODULE → SOURCE-PATH RELATION, OVER THE UNIVERSE'S OWN MODULES. A Context-stage row is a // derived classification minted by the host from a file refusal, and the derivation's join key // is this relation: the observation names a module, the file refusal names a path, and only the @@ -262,22 +275,25 @@ fn native_route_disposition( FloorRouteGapRefusal => NativeDivergence { cause: NativeReachedRouteGap } } NativeTestReturnedOther => NativeDivergence { cause: NativeReturnedOtherVerdict } - NativeTestRefused { stage: stage, reason: reason } => - match reference { - FloorRouteGapRefusal => - match stage { - NativeTestStageEval => - if native_route_reason_member(reason: reason, roster: native_route_effect_boundary_reasons) { - NativeAgreementRouteGap - } else { - NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } - } - NativeTestStageContext => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } - NativeTestStagePrepare => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } - NativeTestStageEntry => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } - } - FloorExpectedPass => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } - FloorExpectedRed => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + NativeTestRefused { stage: stage, diagnostics: d } => + { + let reason = diagnostics_fatal_reason(d: d) + match reference { + FloorRouteGapRefusal => + match stage { + NativeTestStageEval => + if native_route_reason_member(reason: reason, roster: native_route_effect_boundary_reasons) { + NativeAgreementRouteGap + } else { + NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + } + NativeTestStageContext => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + NativeTestStagePrepare => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + NativeTestStageEntry => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + } + FloorExpectedPass => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + FloorExpectedRed => NativeExclusion { cause: classify_native_refusal(stage: stage, reason: reason) } + } } } } @@ -791,13 +807,13 @@ fn native_route_head_advisories_attributed(receipt: NativeRouteReceipt) -> Bool fn native_route_context_refusals_backed(receipt: NativeRouteReceipt) -> Bool { !any(xs: receipt.population, predicate: fn(row) { match row.verdict { - NativeTestRefused { stage: stage, reason: reason } => + NativeTestRefused { stage: stage, diagnostics: d } => match stage { NativeTestStageContext => !any(xs: receipt.module_source_index, predicate: fn(ms) { ms.module == row.identity.module && any(xs: receipt.file_refusals, predicate: fn(fr) { - fr.path == ms.path && fr.fatal_reason == reason + fr.path == ms.path && fr.fatal_reason == diagnostics_fatal_reason(d: d) }) }) NativeTestStagePrepare => false @@ -832,7 +848,7 @@ fn native_route_false_control_holds(receipt: NativeRouteReceipt) -> Bool { NativeTestReturnedFalse => true NativeTestPassed => false NativeTestReturnedOther => false - NativeTestRefused { stage: _, reason: _ } => false + NativeTestRefused { stage: _, diagnostics: _ } => false } Absent => false } @@ -845,7 +861,7 @@ fn native_route_true_control_holds(receipt: NativeRouteReceipt) -> Bool { NativeTestPassed => true NativeTestReturnedFalse => false NativeTestReturnedOther => false - NativeTestRefused { stage: _, reason: _ } => false + NativeTestRefused { stage: _, diagnostics: _ } => false } Absent => false } diff --git a/dag/std/compiler_entry.dag b/dag/std/compiler_entry.dag index c4189bc0eb8..33b442f41a9 100644 --- a/dag/std/compiler_entry.dag +++ b/dag/std/compiler_entry.dag @@ -54,7 +54,11 @@ import std.measure { // native_test_resolve_module / native_test_infer_resolved) and carries decls=. Its outcome names // which arm decided the module: accepted, infer_refused, resolve_refused, or context_refused -- // the last for a module whose FILE this context already refused, which never enters the resolver, -// so its resolve span is the refusal lookup and not a resolution it did not perform. The +// so its resolve span is the refusal lookup and not a resolution it did not perform. Beside +// each persisted population row that did not pass it prints one `[native-verdict]` line on +// stderr -- gunbc.witness_v2_native_route native_route_member_row_text: the subject, the stage, +// the fatal cause and the located diagnostic chain the failing stage produced -- so the operator +// command that drains this stderr names WHERE a subject failed, not only that it did. The // `[native-cost-partition]` verdict is native_driver_cost_account over NativeDriverExclusiveRows, // not a second copy of the reconcile law: remainder_nanos is that fold's residual, and // OverAttributed carries no remainder field (underflow is not a number). A non-Reconciled diff --git a/src/v1/05_emit_rust.dag b/src/v1/05_emit_rust.dag index 0539463863f..ce8fcb0e49a 100644 --- a/src/v1/05_emit_rust.dag +++ b/src/v1/05_emit_rust.dag @@ -17129,8 +17129,9 @@ fn emit_source_root_eval_driver_main_rs(crate_name: String, pipeline_module: Str "\};", "\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", + " native_route_file_refusal_tally, native_route_member_row_text,", "\n", "\};", "\n", + "use ", crate_name, "::v2_compiler_native_test_vocabulary::NativeTestVerdict;", "\n", "use ", crate_name, "::v2_compiler_source_authority::\{source_root_for_storage_path, DagSourceReadWitness\};", "\n", "use ", crate_name, "::v2_std_artifact::\{Artifact, ArtifactKind\};", "\n", "use ", crate_name, "::v2_std_diagnostic::Outcome;", "\n", @@ -17827,6 +17828,20 @@ fn emit_source_root_eval_driver_main_rs(crate_name: String, pipeline_module: Str " \}", "\n", " for row in population.iter() \{", "\n", " println!(\"{}\", serde_json::to_string(row).unwrap());", "\n", + " // THE OPERATOR'S LINE, BESIDE THE PERSISTED ROW. The JSON above is the receipt; this is", "\n", + " // the same value rendered by the authority for a reader of the command's output, so a", "\n", + " // row that did not pass names its subject, stage, cause and position without anyone", "\n", + " // re-deriving them from the bytes just written. Passing rows print nothing here: the", "\n", + " // terminal marker carries their count. EXHAUSTIVE ON PURPOSE -- a verdict arm added to", "\n", + " // the vocabulary must decide here whether it is operator-visible.", "\n", + " match &*row.verdict \{", "\n", + " NativeTestVerdict::NativeTestPassed => \{\}", "\n", + " NativeTestVerdict::NativeTestReturnedFalse", "\n", + " | NativeTestVerdict::NativeTestReturnedOther", "\n", + " | NativeTestVerdict::NativeTestRefused \{ .. \} => \{", "\n", + " eprintln!(\"[native-verdict] {}\", native_route_member_row_text(row.clone()));", "\n", + " \}", "\n", + " \}", "\n", " \}", "\n", " let row_serialization_nanos = span_nanos(serialization_started);", "\n", "", "\n", diff --git a/src/v1/stage0/src/v1_compiler_emit_rust.rs b/src/v1/stage0/src/v1_compiler_emit_rust.rs index eac28fb289f..eff5a43bc24 100644 --- a/src/v1/stage0/src/v1_compiler_emit_rust.rs +++ b/src/v1/stage0/src/v1_compiler_emit_rust.rs @@ -38885,7 +38885,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(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(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_census_module_resolution, native_census_modules, native_census_residual_rows,".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()), " NativeCensusModuleOutcome,".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,".to_string()), "\n".to_string()), " native_driver_exclusive_rows, native_driver_exclusive_row_name,".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey,".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()), emit_host_source_root_read_rs()), "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()), " 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 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()), "// THE THIRD MODE: THE WHOLE TREE, RESOLVED PER MODULE.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// WHY IT IS NOT A FLAG ON `census`. That mode has a live consumer -- the malformed control,".to_string()), "\n".to_string()), "// which the host runner spawns over a ONE-FILE scratch root and reads one per-file refusal".to_string()), "\n".to_string()), "// from -- and teaching it to resolve would make that control pay a whole-tree resolve to".to_string()), "\n".to_string()), "// learn a fact the front end already answered. Two modes because they are two subjects: a".to_string()), "\n".to_string()), "// roster of front-end refusals, and a roster of resolve refusals over every ingested module.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// WHY IT IS NOT THE `adjudicate` LOOP WIDENED. That loop walks `universe.modules` -- the".to_string()), "\n".to_string()), "// v2.test.* modules discovery enrolled rows for -- over a context folded from the import".to_string()), "\n".to_string()), "// CLOSURE of those modules. Both narrowings are correct for what adjudication asks and wrong".to_string()), "\n".to_string()), "// for a census: a residual reported over the closure of the test corpus is not a residual over".to_string()), "\n".to_string()), "// the tree, and the absence of a refusal in a population that was never resolved establishes".to_string()), "\n".to_string()), "// nothing about the dependents outside it.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// THE RESOLVED TREE IS NOT KEPT. NativeCensusModuleOutcome carries the diagnostics of a refusal".to_string()), "\n".to_string()), "// and nothing on the accepted arm, so each module's tree dies with the call that made it. The".to_string()), "\n".to_string()), "// adjudicating loop drops its tree explicitly because it must hold one to infer from; this loop".to_string()), "\n".to_string()), "// never holds one, which is the property that makes the whole-tree grain affordable at all.".to_string()), "\n".to_string()), "fn run_census_resolve(source_roots: &[String]) {".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 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()), " let context_started = Instant::now();".to_string()), "\n".to_string()), " let context = match &*native_test_context_from_ingest(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!(\"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()), " // The front-end refusals are reported in the same shape `census` reports them, because they".to_string()), "\n".to_string()), " // are the same fact read from the same context: a module whose file the context refused is".to_string()), "\n".to_string()), " // attributed there and is NOT re-reported below as a resolve refusal it never reached.".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()), " let refusal_index = native_lane_file_refusal_index(context.file_refusals.clone());".to_string()), "\n".to_string()), " let roster_started = Instant::now();".to_string()), "\n".to_string()), " let modules = native_census_modules(ingest.clone());".to_string()), "\n".to_string()), " let roster_nanos = span_nanos(roster_started);".to_string()), "\n".to_string()), " let mut resolve_total_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut resolve_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " let mut resolved_ok: u64 = 0;".to_string()), "\n".to_string()), " let mut file_refused: u64 = 0;".to_string()), "\n".to_string()), " let mut resolve_refused: u64 = 0;".to_string()), "\n".to_string()), " let mut residual_rows: u64 = 0;".to_string()), "\n".to_string()), " for entry in modules.iter() {".to_string()), "\n".to_string()), " let resolve_started = Instant::now();".to_string()), "\n".to_string()), " let outcome = native_census_module_resolution(".to_string()), "\n".to_string()), " context.clone(),".to_string()), "\n".to_string()), " refusal_index.clone(),".to_string()), "\n".to_string()), " entry.clone(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let module_resolve_nanos = span_nanos(resolve_started);".to_string()), "\n".to_string()), " let outcome_label = match &*outcome {".to_string()), "\n".to_string()), " NativeCensusModuleOutcome::NativeCensusModuleFileRefused => {".to_string()), "\n".to_string()), " file_refused += 1;".to_string()), "\n".to_string()), " \"file_refused\"".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeCensusModuleOutcome::NativeCensusModuleResolved => {".to_string()), "\n".to_string()), " resolved_ok += 1;".to_string()), "\n".to_string()), " \"resolved\"".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeCensusModuleOutcome::NativeCensusModuleResolveRefused { diagnostics } => {".to_string()), "\n".to_string()), " resolve_refused += 1;".to_string()), "\n".to_string()), " // ONE ROW PER DIAGNOSTIC, WHICH IS ONE ROW PER REFUSED OCCURRENCE. The rows are".to_string()), "\n".to_string()), " // written as they are decided rather than accumulated: the census is over the".to_string()), "\n".to_string()), " // whole tree, and a population held to the end is a second corpus-sized".to_string()), "\n".to_string()), " // allocation beside the context that produced it.".to_string()), "\n".to_string()), " for row in native_census_residual_rows(entry.clone(), diagnostics.clone()).iter() {".to_string()), "\n".to_string()), " residual_rows += 1;".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"census_residual\": row }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " \"resolve_refused\"".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " resolve_total_nanos += module_resolve_nanos;".to_string()), "\n".to_string()), " resolve_samples.push(module_resolve_nanos);".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"[native-census-resolve] {}\",".to_string()), "\n".to_string()), " serde_json::json!({".to_string()), "\n".to_string()), " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",".to_string()), "\n".to_string()), " \"module\": entry.module.clone(),".to_string()), "\n".to_string()), " \"path\": entry.path.clone(),".to_string()), "\n".to_string()), " \"resolve_nanos\": module_resolve_nanos,".to_string()), "\n".to_string()), " \"outcome\": outcome_label,".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " resolve_samples.sort_unstable();".to_string()), "\n".to_string()), " // THE TERMINAL LINE CARRIES THE COST AND THE POPULATION TOGETHER, because the reading this".to_string()), "\n".to_string()), " // mode exists to support is whether a whole-tree resolve is affordable at all, and a residual".to_string()), "\n".to_string()), " // count without the wall and the peak beside it cannot answer that.".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\": \"census-resolve\",".to_string()), "\n".to_string()), " \"corpus_reads\": corpus_reads,".to_string()), "\n".to_string()), " \"modules\": modules.len(),".to_string()), "\n".to_string()), " \"file_refusals\": context.file_refusals.len(),".to_string()), "\n".to_string()), " \"resolved\": resolved_ok,".to_string()), "\n".to_string()), " \"file_refused\": file_refused,".to_string()), "\n".to_string()), " \"resolve_refused\": resolve_refused,".to_string()), "\n".to_string()), " \"residual_rows\": residual_rows,".to_string()), "\n".to_string()), " \"load_nanos\": load_nanos,".to_string()), "\n".to_string()), " \"context_nanos\": context_nanos,".to_string()), "\n".to_string()), " \"roster_nanos\": roster_nanos,".to_string()), "\n".to_string()), " \"resolve_total_nanos\": resolve_total_nanos,".to_string()), "\n".to_string()), " \"resolve_p50_nanos\": native_cost_quantile_nanos(&resolve_samples, 1, 2),".to_string()), "\n".to_string()), " \"resolve_p95_nanos\": native_cost_quantile_nanos(&resolve_samples, 19, 20),".to_string()), "\n".to_string()), " \"resolve_max_nanos\": resolve_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()), " }),".to_string()), "\n".to_string()), " );".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()), " 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 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, front_end.clone(), 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()), " let mut relay_emit_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. An explicit drop makes the cost nameable; scope".to_string()), "\n".to_string()), " // exit hides it. What that cost turned out to BE -- and whether it explains anything --".to_string()), "\n".to_string()), " // is a fact of std.compiler_entry NativeDriverExclusiveRows, not of this template.".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()), " // One stderr write per unique module, to a pipe the host runner drains. It is spanned".to_string()), "\n".to_string()), " // because it was paid inside parent_span with no exclusive row over it. What the span".to_string()), "\n".to_string()), " // has since MEASURED, and what the residual is, are facts of std.compiler_entry".to_string()), "\n".to_string()), " // NativeDriverExclusiveRows and are deliberately not restated here: a number copied".to_string()), "\n".to_string()), " // into a generated template rots in a place no fold can reach to correct it.".to_string()), "\n".to_string()), " let relay_started = Instant::now();".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()), " relay_emit_nanos += span_nanos(relay_started);".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()), " // THE DRIVER IS EXHAUSTIVE OVER THE KEY WITH NO WILDCARD, deliberately: a row added to".to_string()), "\n".to_string()), " // std.compiler_entry makes THIS match refuse to compile until the driver says what".to_string()), "\n".to_string()), " // measures it. A wildcard here would answer zero for a span nobody wired up, which is".to_string()), "\n".to_string()), " // the absorbing arm DESIGN section 5 forbids -- and it is what the old record literal".to_string()), "\n".to_string()), " // did silently, three folds running.".to_string()), "\n".to_string()), " let exclusive = native_driver_exclusive_rows(move |k| match k {".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveLoad => nanosecond(native_cost_i64(load_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveUniverseDerivation => nanosecond(native_cost_i64(universe_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveContext => nanosecond(native_cost_i64(context_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusivePrepare => nanosecond(native_cost_i64(prepare_total_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveEval => nanosecond(native_cost_i64(evaluate_total_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveReceiptAdmission => nanosecond(native_cost_i64(admission_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveRowSerialization => nanosecond(native_cost_i64(row_serialization_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveModuleRelease => nanosecond(native_cost_i64(module_release_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveRelayEmit => nanosecond(native_cost_i64(relay_emit_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.rows.iter().map(|r| (".to_string()), "\n".to_string()), " native_driver_exclusive_row_name(r.key.clone()),".to_string()), "\n".to_string()), " serde_json::json!(r.nanos),".to_string()), "\n".to_string()), " )).collect::>(),".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()), crate_name.clone()), " census-resolve ...\");".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 == \"census-resolve\" {".to_string()), "\n".to_string()), " let source_roots: Vec = args.collect();".to_string()), "\n".to_string()), " run_census_resolve(&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, census or census-resolve\");".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(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(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_census_module_resolution, native_census_modules, native_census_residual_rows,".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()), " NativeCensusModuleOutcome,".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, native_route_member_row_text,".to_string()), "\n".to_string()), "};".to_string()), "\n".to_string()), "use ".to_string()), crate_name.clone()), "::v2_compiler_native_test_vocabulary::NativeTestVerdict;".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,".to_string()), "\n".to_string()), " native_driver_exclusive_rows, native_driver_exclusive_row_name,".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey,".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()), emit_host_source_root_read_rs()), "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()), " 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 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()), "// THE THIRD MODE: THE WHOLE TREE, RESOLVED PER MODULE.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// WHY IT IS NOT A FLAG ON `census`. That mode has a live consumer -- the malformed control,".to_string()), "\n".to_string()), "// which the host runner spawns over a ONE-FILE scratch root and reads one per-file refusal".to_string()), "\n".to_string()), "// from -- and teaching it to resolve would make that control pay a whole-tree resolve to".to_string()), "\n".to_string()), "// learn a fact the front end already answered. Two modes because they are two subjects: a".to_string()), "\n".to_string()), "// roster of front-end refusals, and a roster of resolve refusals over every ingested module.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// WHY IT IS NOT THE `adjudicate` LOOP WIDENED. That loop walks `universe.modules` -- the".to_string()), "\n".to_string()), "// v2.test.* modules discovery enrolled rows for -- over a context folded from the import".to_string()), "\n".to_string()), "// CLOSURE of those modules. Both narrowings are correct for what adjudication asks and wrong".to_string()), "\n".to_string()), "// for a census: a residual reported over the closure of the test corpus is not a residual over".to_string()), "\n".to_string()), "// the tree, and the absence of a refusal in a population that was never resolved establishes".to_string()), "\n".to_string()), "// nothing about the dependents outside it.".to_string()), "\n".to_string()), "//".to_string()), "\n".to_string()), "// THE RESOLVED TREE IS NOT KEPT. NativeCensusModuleOutcome carries the diagnostics of a refusal".to_string()), "\n".to_string()), "// and nothing on the accepted arm, so each module's tree dies with the call that made it. The".to_string()), "\n".to_string()), "// adjudicating loop drops its tree explicitly because it must hold one to infer from; this loop".to_string()), "\n".to_string()), "// never holds one, which is the property that makes the whole-tree grain affordable at all.".to_string()), "\n".to_string()), "fn run_census_resolve(source_roots: &[String]) {".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 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()), " let context_started = Instant::now();".to_string()), "\n".to_string()), " let context = match &*native_test_context_from_ingest(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!(\"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()), " // The front-end refusals are reported in the same shape `census` reports them, because they".to_string()), "\n".to_string()), " // are the same fact read from the same context: a module whose file the context refused is".to_string()), "\n".to_string()), " // attributed there and is NOT re-reported below as a resolve refusal it never reached.".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()), " let refusal_index = native_lane_file_refusal_index(context.file_refusals.clone());".to_string()), "\n".to_string()), " let roster_started = Instant::now();".to_string()), "\n".to_string()), " let modules = native_census_modules(ingest.clone());".to_string()), "\n".to_string()), " let roster_nanos = span_nanos(roster_started);".to_string()), "\n".to_string()), " let mut resolve_total_nanos: u128 = 0;".to_string()), "\n".to_string()), " let mut resolve_samples: Vec = Vec::new();".to_string()), "\n".to_string()), " let mut resolved_ok: u64 = 0;".to_string()), "\n".to_string()), " let mut file_refused: u64 = 0;".to_string()), "\n".to_string()), " let mut resolve_refused: u64 = 0;".to_string()), "\n".to_string()), " let mut residual_rows: u64 = 0;".to_string()), "\n".to_string()), " for entry in modules.iter() {".to_string()), "\n".to_string()), " let resolve_started = Instant::now();".to_string()), "\n".to_string()), " let outcome = native_census_module_resolution(".to_string()), "\n".to_string()), " context.clone(),".to_string()), "\n".to_string()), " refusal_index.clone(),".to_string()), "\n".to_string()), " entry.clone(),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " let module_resolve_nanos = span_nanos(resolve_started);".to_string()), "\n".to_string()), " let outcome_label = match &*outcome {".to_string()), "\n".to_string()), " NativeCensusModuleOutcome::NativeCensusModuleFileRefused => {".to_string()), "\n".to_string()), " file_refused += 1;".to_string()), "\n".to_string()), " \"file_refused\"".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeCensusModuleOutcome::NativeCensusModuleResolved => {".to_string()), "\n".to_string()), " resolved_ok += 1;".to_string()), "\n".to_string()), " \"resolved\"".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " NativeCensusModuleOutcome::NativeCensusModuleResolveRefused { diagnostics } => {".to_string()), "\n".to_string()), " resolve_refused += 1;".to_string()), "\n".to_string()), " // ONE ROW PER DIAGNOSTIC, WHICH IS ONE ROW PER REFUSED OCCURRENCE. The rows are".to_string()), "\n".to_string()), " // written as they are decided rather than accumulated: the census is over the".to_string()), "\n".to_string()), " // whole tree, and a population held to the end is a second corpus-sized".to_string()), "\n".to_string()), " // allocation beside the context that produced it.".to_string()), "\n".to_string()), " for row in native_census_residual_rows(entry.clone(), diagnostics.clone()).iter() {".to_string()), "\n".to_string()), " residual_rows += 1;".to_string()), "\n".to_string()), " println!(\"{}\", serde_json::json!({ \"census_residual\": row }));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " \"resolve_refused\"".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " };".to_string()), "\n".to_string()), " resolve_total_nanos += module_resolve_nanos;".to_string()), "\n".to_string()), " resolve_samples.push(module_resolve_nanos);".to_string()), "\n".to_string()), " eprintln!(".to_string()), "\n".to_string()), " \"[native-census-resolve] {}\",".to_string()), "\n".to_string()), " serde_json::json!({".to_string()), "\n".to_string()), " \"producer\": \"std.compiler_entry.SourceRootEvalDriver\",".to_string()), "\n".to_string()), " \"module\": entry.module.clone(),".to_string()), "\n".to_string()), " \"path\": entry.path.clone(),".to_string()), "\n".to_string()), " \"resolve_nanos\": module_resolve_nanos,".to_string()), "\n".to_string()), " \"outcome\": outcome_label,".to_string()), "\n".to_string()), " }),".to_string()), "\n".to_string()), " );".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " resolve_samples.sort_unstable();".to_string()), "\n".to_string()), " // THE TERMINAL LINE CARRIES THE COST AND THE POPULATION TOGETHER, because the reading this".to_string()), "\n".to_string()), " // mode exists to support is whether a whole-tree resolve is affordable at all, and a residual".to_string()), "\n".to_string()), " // count without the wall and the peak beside it cannot answer that.".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\": \"census-resolve\",".to_string()), "\n".to_string()), " \"corpus_reads\": corpus_reads,".to_string()), "\n".to_string()), " \"modules\": modules.len(),".to_string()), "\n".to_string()), " \"file_refusals\": context.file_refusals.len(),".to_string()), "\n".to_string()), " \"resolved\": resolved_ok,".to_string()), "\n".to_string()), " \"file_refused\": file_refused,".to_string()), "\n".to_string()), " \"resolve_refused\": resolve_refused,".to_string()), "\n".to_string()), " \"residual_rows\": residual_rows,".to_string()), "\n".to_string()), " \"load_nanos\": load_nanos,".to_string()), "\n".to_string()), " \"context_nanos\": context_nanos,".to_string()), "\n".to_string()), " \"roster_nanos\": roster_nanos,".to_string()), "\n".to_string()), " \"resolve_total_nanos\": resolve_total_nanos,".to_string()), "\n".to_string()), " \"resolve_p50_nanos\": native_cost_quantile_nanos(&resolve_samples, 1, 2),".to_string()), "\n".to_string()), " \"resolve_p95_nanos\": native_cost_quantile_nanos(&resolve_samples, 19, 20),".to_string()), "\n".to_string()), " \"resolve_max_nanos\": resolve_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()), " }),".to_string()), "\n".to_string()), " );".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()), " 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 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, front_end.clone(), 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()), " let mut relay_emit_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. An explicit drop makes the cost nameable; scope".to_string()), "\n".to_string()), " // exit hides it. What that cost turned out to BE -- and whether it explains anything --".to_string()), "\n".to_string()), " // is a fact of std.compiler_entry NativeDriverExclusiveRows, not of this template.".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()), " // One stderr write per unique module, to a pipe the host runner drains. It is spanned".to_string()), "\n".to_string()), " // because it was paid inside parent_span with no exclusive row over it. What the span".to_string()), "\n".to_string()), " // has since MEASURED, and what the residual is, are facts of std.compiler_entry".to_string()), "\n".to_string()), " // NativeDriverExclusiveRows and are deliberately not restated here: a number copied".to_string()), "\n".to_string()), " // into a generated template rots in a place no fold can reach to correct it.".to_string()), "\n".to_string()), " let relay_started = Instant::now();".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()), " relay_emit_nanos += span_nanos(relay_started);".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()), " // THE OPERATOR'S LINE, BESIDE THE PERSISTED ROW. The JSON above is the receipt; this is".to_string()), "\n".to_string()), " // the same value rendered by the authority for a reader of the command's output, so a".to_string()), "\n".to_string()), " // row that did not pass names its subject, stage, cause and position without anyone".to_string()), "\n".to_string()), " // re-deriving them from the bytes just written. Passing rows print nothing here: the".to_string()), "\n".to_string()), " // terminal marker carries their count. EXHAUSTIVE ON PURPOSE -- a verdict arm added to".to_string()), "\n".to_string()), " // the vocabulary must decide here whether it is operator-visible.".to_string()), "\n".to_string()), " match &*row.verdict {".to_string()), "\n".to_string()), " NativeTestVerdict::NativeTestPassed => {}".to_string()), "\n".to_string()), " NativeTestVerdict::NativeTestReturnedFalse".to_string()), "\n".to_string()), " | NativeTestVerdict::NativeTestReturnedOther".to_string()), "\n".to_string()), " | NativeTestVerdict::NativeTestRefused { .. } => {".to_string()), "\n".to_string()), " eprintln!(\"[native-verdict] {}\", native_route_member_row_text(row.clone()));".to_string()), "\n".to_string()), " }".to_string()), "\n".to_string()), " }".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()), " // THE DRIVER IS EXHAUSTIVE OVER THE KEY WITH NO WILDCARD, deliberately: a row added to".to_string()), "\n".to_string()), " // std.compiler_entry makes THIS match refuse to compile until the driver says what".to_string()), "\n".to_string()), " // measures it. A wildcard here would answer zero for a span nobody wired up, which is".to_string()), "\n".to_string()), " // the absorbing arm DESIGN section 5 forbids -- and it is what the old record literal".to_string()), "\n".to_string()), " // did silently, three folds running.".to_string()), "\n".to_string()), " let exclusive = native_driver_exclusive_rows(move |k| match k {".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveLoad => nanosecond(native_cost_i64(load_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveUniverseDerivation => nanosecond(native_cost_i64(universe_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveContext => nanosecond(native_cost_i64(context_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusivePrepare => nanosecond(native_cost_i64(prepare_total_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveEval => nanosecond(native_cost_i64(evaluate_total_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveReceiptAdmission => nanosecond(native_cost_i64(admission_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveRowSerialization => nanosecond(native_cost_i64(row_serialization_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveModuleRelease => nanosecond(native_cost_i64(module_release_nanos)),".to_string()), "\n".to_string()), " NativeDriverExclusiveRowKey::ExclusiveRelayEmit => nanosecond(native_cost_i64(relay_emit_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.rows.iter().map(|r| (".to_string()), "\n".to_string()), " native_driver_exclusive_row_name(r.key.clone()),".to_string()), "\n".to_string()), " serde_json::json!(r.nanos),".to_string()), "\n".to_string()), " )).collect::>(),".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()), crate_name.clone()), " census-resolve ...\");".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 == \"census-resolve\" {".to_string()), "\n".to_string()), " let source_roots: Vec = args.collect();".to_string()), "\n".to_string()), " run_census_resolve(&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, census or census-resolve\");".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/cli/compile_cli.dag b/src/v2/cli/compile_cli.dag index 26b0a9736b8..ba60416212e 100644 --- a/src/v2/cli/compile_cli.dag +++ b/src/v2/cli/compile_cli.dag @@ -11,7 +11,7 @@ import v2.compiler.source_authority { SourceRootIngest } import v2.extdeps.languages.rust { rust_target_model } import v2.std.algebra { fold_list, length, list_reverse } import v2.std.compilers.lexing { symbol_lexeme } -import v2.std.diagnostic { Accepted, Diagnostic, NonEmptyDiagnostics, Rejected } +import v2.std.diagnostic { Accepted, NonEmptyDiagnostics, Rejected, diagnostics_fatal } import v2.std.lens_verdict { lens_verdict_diagnostic_locus_text } import v2.std.node { Symbol } import v2.std.qualified_name { qualified_name_from_dotted_string } @@ -265,12 +265,9 @@ type CliRunOutcome // THE WHOLE ORDERED CHAIN, BECAUSE THE HEAD IS NOT THE CAUSE. Rendering only the head answers // `parse_grammar_choice_overlap_residue` for every entry tried; that is a grammar-global ADVISORY // and never the fatal. The fatal diagnostic is the last one, and `parse_g0_tokens_remain_diagnostic` -// builds its locus from the first remaining token. File+extent is -// `lens_verdict_diagnostic_locus_text` — not a second `match d.at` here (DESIGN section 3). - -fn cli_fatal_diagnostic(d: NonEmptyDiagnostics) -> Diagnostic { - fold_list(xs: d.tail, empty: d.head, cons: fn(acc, diag) { diag }) -} +// builds its locus from the first remaining token. The fatal pick is `v2.std.diagnostic` +// `diagnostics_fatal` and file+extent is `lens_verdict_diagnostic_locus_text` — neither a second +// spelling here (DESIGN section 3). fn cli_diagnostic_chain(d: NonEmptyDiagnostics) -> String { fold_list( @@ -318,7 +315,7 @@ fn v2_cli_run(plan: CliPlan, ingest: SourceRootIngest) -> CliRunOutcome { reason: d.head.reason, detail: concat( concat("the closure did not emit; diagnostic chain: ", cli_diagnostic_chain(d: d)), - concat(" | FATAL AT ", lens_verdict_diagnostic_locus_text(d: cli_fatal_diagnostic(d: d))) + concat(" | FATAL AT ", lens_verdict_diagnostic_locus_text(d: diagnostics_fatal(d: d))) ) } } diff --git a/src/v2/compiler/00_compile.dag b/src/v2/compiler/00_compile.dag index da55e84e85b..47dedc02350 100644 --- a/src/v2/compiler/00_compile.dag +++ b/src/v2/compiler/00_compile.dag @@ -61,7 +61,9 @@ import v2.compiler.native_test_vocabulary { NativeTestStageEntry, NativeTestStageEval, NativeTestStagePrepare, - NativeTestVerdict + NativeTestVerdict, + native_test_refused_after, + native_test_refused_located } import v2.compiler.normalize { normalize } import v2.compiler.normalized_tree { NormalizedTree } @@ -109,6 +111,10 @@ import v2.std.diagnostic { NonEmptyDiagnostics, Outcome, Some, + Textual, + WholeFile, + declaration_locus, + diagnostics_fatal_reason, invariant_port_locus, Rejected, Unavailable, @@ -122,7 +128,7 @@ import v2.std.diagnostic { import v2.std.node { Arrow, Edge, Named, Node, NodeFold, Positional, Symbol, TypeNode, fold_node } import v2.std.node_query { find_arrow_body_child, find_named_child } import v2.std.optional { Absent, Optional, Present, optional_absent, optional_present } -import v2.std.qualified_name { QualifiedName, qualified_name_from_dotted_string } +import v2.std.qualified_name { QualifiedName, qualified_name_from_dotted_string, qualified_name_snoc } import v2.std.cross_tree.import_model { SourceRootRef } import v2.std.cross_tree.resolution { SourceRootIndex, @@ -1177,8 +1183,9 @@ fn compile_ingest_staging(source: Medium, target: TargetModel) -> Outcom // defect (a grammar that fails to prepare), never on corpus data. native_test_prepare_module // pays resolve + infer ONCE per module. native_test_eval_one pays entry resolution + // evaluation per declaration and NEVER rejects: every failure it can reach is a typed -// NativeTestRefused verdict carrying the stage and the diagnostic's head reason, so a census -// over observations has no silent remainder. +// NativeTestRefused verdict carrying the stage and the failing stage's own diagnostics -- the +// located chain, not one reason copied out of it -- so a census over observations has no +// silent remainder and a row that refused says where. // // THE PREPARE GRAIN IS TWO HALVES, AND THE SEAM IS THE PORTABILITY BOUNDARY. A seed-interpreted // witness that drives this route evaluates in the required floor's per-claim frame, and the @@ -1229,15 +1236,11 @@ type NativeTestContextFoldState { // The LAST diagnostic is the cause that actually refused the file; the head is the advisory // that rode along. Both are carried because ownership is keyed by grain. -fn native_test_fatal_reason(d: NonEmptyDiagnostics) -> Symbol { - fold_list(xs: d.tail, empty: d.head.reason, cons: fn(_acc, diag) { diag.reason }) -} - fn native_test_file_refusal(path: Symbol, d: NonEmptyDiagnostics) -> NativeTestFileRefusal { NativeTestFileRefusal { path: path, head_reason: d.head.reason, - fatal_reason: native_test_fatal_reason(d: d) + fatal_reason: diagnostics_fatal_reason(d: d) } } @@ -1470,12 +1473,32 @@ fn native_test_observation_refused( module: QualifiedName, declaration: Symbol, stage: NativeTestStage, + diagnostics: NonEmptyDiagnostics +) -> NativeTestObservation { + NativeTestObservation { + module: module, + declaration: declaration, + verdict: NativeTestRefused { stage: stage, diagnostics: diagnostics } + } +} + +// THE ROUTE'S OWN ENTRY REFUSALS ARE LOCATED AT THE DECLARATION THEY ARE ABOUT. A declaration the +// scope does not hold, or holds as something other than an arrow, has no node the route can +// anchor (the first has no node at all; the second's node is its whole body), and it has exactly +// one identity: the qualified `.` the test identity already names. +fn native_test_entry_refused( + module: QualifiedName, + declaration: Symbol, reason: Symbol ) -> NativeTestObservation { NativeTestObservation { module: module, declaration: declaration, - verdict: NativeTestRefused { stage: stage, reason: reason } + verdict: native_test_refused_located( + stage: NativeTestStageEntry, + reason: reason, + at: declaration_locus(declaration: qualified_name_snoc(qn: module, segment: declaration)) + ) } } @@ -1494,7 +1517,7 @@ fn native_test_eval_body( module: prepared.module, declaration: declaration, stage: NativeTestStageEval, - reason: native_test_fatal_reason(d: d) + diagnostics: d ) Accepted { value: rv, diagnostics: _ } => if v2_eval_runtime_bool_is_true(value: rv) { @@ -1524,20 +1547,22 @@ fn native_test_eval_one( declaration: Symbol ) -> NativeTestObservation { match native_test_module_scope_node(root: prepared.inferred.root, module: prepared.module) { - Rejected { diagnostics: _ } => - native_test_observation_refused( + Rejected { diagnostics: d } => + NativeTestObservation { module: prepared.module, declaration: declaration, - stage: NativeTestStageEntry, - reason: ^native_test_entry_module_scope_unresolved - ) + verdict: native_test_refused_after( + stage: NativeTestStageEntry, + reason: ^native_test_entry_module_scope_unresolved, + d: d + ) + } Accepted { value: scope, diagnostics: _ } => match native_test_decl_in_children(children: scope.children, name: declaration) { Absent => - native_test_observation_refused( + native_test_entry_refused( module: prepared.module, declaration: declaration, - stage: NativeTestStageEntry, reason: ^native_test_entry_declaration_not_found ) Present { value: target } => @@ -1549,7 +1574,7 @@ fn native_test_eval_one( module: prepared.module, declaration: declaration, stage: NativeTestStageEntry, - reason: native_test_fatal_reason(d: d) + diagnostics: d ) Accepted { value: body, diagnostics: _ } => native_test_eval_body( @@ -1559,10 +1584,9 @@ fn native_test_eval_one( ) } _ => - native_test_observation_refused( + native_test_entry_refused( module: prepared.module, declaration: declaration, - stage: NativeTestStageEntry, reason: ^native_test_entry_declaration_not_arrow ) } @@ -2451,7 +2475,7 @@ type NativeLaneModuleResolution // fork DESIGN section 3 forbids, in the place it would matter most: the two spellings would then be // free to disagree about whether a file the context refused is a module that resolved. // THE VERDICT CARRIES THE DIAGNOSTICS UNFOLDED, and that is the whole reason this is a separate -// declaration rather than an inlined precheck. native_test_fatal_reason collapses NonEmptyDiagnostics +// declaration rather than an inlined precheck. diagnostics_fatal_reason collapses NonEmptyDiagnostics // to its LAST reason, which is the right summary for a member row whose grain is the declaration and // the wrong one for a census whose grain is the occurrence: v2.compiler.03_resolve emits one // diagnostic PER REFUSED NODE, each carrying its own locus, so a fold to one reason discards every @@ -2497,17 +2521,18 @@ fn native_lane_module_resolution( NativeLaneModuleContextRowsDecided { rows: native_lane_module_refusal_rows( entry: entry, - verdict: NativeTestRefused { stage: NativeTestStageContext, reason: fr.fatal_reason } + verdict: native_test_refused_located( + stage: NativeTestStageContext, + reason: fr.fatal_reason, + at: Textual { file: fr.path, extent: WholeFile } + ) ) } NativeModuleResolveRefused { diagnostics: d } => NativeLaneModuleResolveRowsDecided { rows: native_lane_module_refusal_rows( entry: entry, - verdict: NativeTestRefused { - stage: NativeTestStagePrepare, - reason: native_test_fatal_reason(d: d) - } + verdict: NativeTestRefused { stage: NativeTestStagePrepare, diagnostics: d } ) } NativeModuleResolveAccepted { resolved: resolved } => @@ -2527,10 +2552,7 @@ fn native_lane_module_inference( NativeLaneModuleRowsDecided { rows: native_lane_module_refusal_rows( entry: entry, - verdict: NativeTestRefused { - stage: NativeTestStagePrepare, - reason: native_test_fatal_reason(d: d) - } + verdict: NativeTestRefused { stage: NativeTestStagePrepare, diagnostics: d } ) } Accepted { value: prepared, diagnostics: _ } => @@ -2698,10 +2720,7 @@ fn native_lane_controls(context: NativeTestContext) -> NativeLaneControls { ) { Rejected { diagnostics: d } => { - let refused = NativeTestRefused { - stage: NativeTestStagePrepare, - reason: native_test_fatal_reason(d: d) - } + let refused = NativeTestRefused { stage: NativeTestStagePrepare, diagnostics: d } NativeLaneControls { false_control: optional_present(value: refused), true_control: optional_present(value: refused) diff --git a/src/v2/compiler/03_resolve.dag b/src/v2/compiler/03_resolve.dag index 4e38692a218..ca17b671a9e 100644 --- a/src/v2/compiler/03_resolve.dag +++ b/src/v2/compiler/03_resolve.dag @@ -22,7 +22,7 @@ import v2.extdeps.languages.dag { qualified_name_from_module_node } import std.algebra { Cons, Empty, FreeMonoid } -import v2.std.algebra { length, list_snoc_item } +import v2.std.algebra { fold_list, length, list_snoc_item } import v2.std.collection { Map, PointwisePower, @@ -44,6 +44,8 @@ import v2.std.diagnostic { CorrectionNotModeled, Diagnostic, Diagnostics, + NonEmptyDiagnostics, + declaration_locus, node_locus, Outcome, UserInputBoundary, @@ -66,6 +68,7 @@ import v2.std.symbol_index { GlobalBareLookupAmbiguous, GlobalBareLookupUnbound, LexicalAmbiguous, + LexicalBindingCandidate, LexicalHit, LexicalUnbound, SymbolIndex, @@ -430,6 +433,78 @@ fn ambiguous_symbol_diagnostic(n: Node) -> Diagnostic { } } +// WHICH LOOKUP WAS AMBIGUOUS, AND BETWEEN WHAT. The three lookups that can answer "two binders" +// are different questions -- the lexical chain from the referencing position upward, the +// corpus-wide bare-name index, and a dotted path whose head is bound on the chain while the +// whole path also hits absolutely -- and a reader repairing the reference needs to know which +// one, because the repair differs (qualify the reference; rename one declaration; drop the +// shadowing binder). The competing declarations ride WHERE THE LOOKUP RETAINED THEM: the lexical +// collector keeps every candidate's path; the global-bare index collapsed its binders to one +// GlobalBareAmbiguous state at fill time and has nothing to name, which this arm says by carrying +// nothing rather than by naming a list it does not have; the qualified case names the absolute +// path that competed. Collapsing all three to one bare SymbolIndexAtomAmbiguous was where the +// class and the candidates were dropped -- one symbol standing where the resolver had a list. +type AmbiguousLookupClass + = AmbiguousOnLexicalChain { candidates: FreeMonoid } + | AmbiguousOnGlobalBare + | AmbiguousQualifiedHeadShadowsAbsolute { path: QualifiedName } + +fn ambiguous_lookup_class_diagnostic(n: Node, reason: Symbol) -> Diagnostic { + Diagnostic { + reason: reason, + at: node_locus(node: n), + correction: Unavailable { reason: UserInputBoundary } + } +} + +// A COMPETING DECLARATION IS NAMED BY ITS QUALIFIED IDENTITY, NOT CARRIED AS ITS NODE. The index +// holds each binder's declaration node, and locating the row there would drag the binder's whole +// body into every persisted row that reports the ambiguity; DeclarationLocus is the citation form +// (DESIGN section 3: name the symbol, not the position), and it is all a reader needs to find it. +fn ambiguous_competing_declaration_diagnostic(path: QualifiedName) -> Diagnostic { + Diagnostic { + reason: ^resolve_ambiguous_competing_declaration, + at: declaration_locus(declaration: path), + correction: Unavailable { reason: UserInputBoundary } + } +} + +// THE ORDER IS CARRIAGE ORDER: class first, competing declarations next, the refusal LAST. The +// fatal diagnostic of a rejection is its last one (rejected_with_pending prepends what rode +// along; every consumer that folds to the cause folds to the tail), so the class row and the +// candidate rows sit in the advisory position and resolve_reason_ambiguous_symbol keeps its place +// as the reason every roster owns. A consumer that read the HEAD as the cause read an advisory +// whenever any pending diagnostic was merged in front; that reading was never the contract. +fn ambiguous_symbol_diagnostics(n: Node, class: AmbiguousLookupClass) -> NonEmptyDiagnostics { + let fatal = ambiguous_symbol_diagnostic(n: n) + match class { + AmbiguousOnLexicalChain { candidates: candidates } => + NonEmptyDiagnostics { + head: ambiguous_lookup_class_diagnostic(n: n, reason: ^resolve_ambiguous_on_lexical_chain), + tail: list_snoc_item( + xs: fold_list( + xs: candidates, + empty: Empty, + cons: fn(acc, candidate) { + list_snoc_item(xs: acc, item: ambiguous_competing_declaration_diagnostic(path: candidate.path)) + } + ), + item: fatal + ) + } + AmbiguousOnGlobalBare => + NonEmptyDiagnostics { + head: ambiguous_lookup_class_diagnostic(n: n, reason: ^resolve_ambiguous_on_global_bare), + tail: [fatal] + } + AmbiguousQualifiedHeadShadowsAbsolute { path: path } => + NonEmptyDiagnostics { + head: ambiguous_lookup_class_diagnostic(n: n, reason: ^resolve_ambiguous_qualified_head_shadows_absolute), + tail: [ambiguous_competing_declaration_diagnostic(path: path), fatal] + } + } +} + fn namespace_has_canonical_symbol(namespace: Namespace, name: Symbol) -> Bool { namespace.canonical_symbols.member(name) } @@ -458,7 +533,7 @@ fn symbol_index_node_identity(node: Node, fallback: Symbol) -> Symbol { type SymbolIndexAtomLookup = SymbolIndexAtomHit { canonical: Symbol, path: QualifiedName } - | SymbolIndexAtomAmbiguous + | SymbolIndexAtomAmbiguous { class: AmbiguousLookupClass } | SymbolIndexAtomUnbound fn lookup_symbol_index_atom_identity( @@ -475,7 +550,8 @@ fn lookup_symbol_index_atom_identity( canonical: symbol_index_node_identity(node: node, fallback: name), path: path } - LexicalAmbiguous { candidates: _ } => SymbolIndexAtomAmbiguous + LexicalAmbiguous { candidates: candidates } => + SymbolIndexAtomAmbiguous { class: AmbiguousOnLexicalChain { candidates: candidates } } LexicalUnbound => match ctx.policy { NamespaceOnlyY => @@ -488,7 +564,7 @@ fn lookup_symbol_index_atom_identity( canonical: symbol_index_node_identity(node: node, fallback: name), path: path } - GlobalBareLookupAmbiguous => SymbolIndexAtomAmbiguous + GlobalBareLookupAmbiguous => SymbolIndexAtomAmbiguous { class: AmbiguousOnGlobalBare } GlobalBareLookupUnbound => SymbolIndexAtomUnbound } ImportScoped => SymbolIndexAtomUnbound @@ -558,7 +634,10 @@ fn try_resolve_qualified_name_node(ctx: ResolveContext, n: Node) -> Optional Outcome match lookup_symbol_index_atom_identity(ctx: ctx, name: identity) { SymbolIndexAtomHit { canonical: canonical, path: path } => resolve_atom_bound(ctx: ctx, n: n, canonical: canonical, path: path, pending: pending) - SymbolIndexAtomAmbiguous => + SymbolIndexAtomAmbiguous { class: class } => Rejected { diagnostics: rejected_with_pending( pending: pending, - rejected: diagnostics_singleton(d: ambiguous_symbol_diagnostic(n: n)) + rejected: ambiguous_symbol_diagnostics(n: n, class: class) ) } SymbolIndexAtomUnbound => diff --git a/src/v2/compiler/05_eval.dag b/src/v2/compiler/05_eval.dag index 37bf10db5a3..91a0781aa68 100644 --- a/src/v2/compiler/05_eval.dag +++ b/src/v2/compiler/05_eval.dag @@ -117,6 +117,7 @@ import v2.std.diagnostic { AmbiguousIntent, ByteRange, Correction, + DeclarationLocus, Diagnostic, Extent, Locus, @@ -655,6 +656,12 @@ fn locus_cache_digest(at: Locus) -> Hash { b: extent_cache_digest(e: e) ) ) + DeclarationLocus { declaration: segments } => + fold_list( + xs: segments, + empty: test_claim_symbol_digest(sym: ^test_claim_cache_locus_declaration_tag), + cons: fn(acc, seg) { combine_hash(a: acc, b: test_claim_symbol_digest(sym: seg)) } + ) } } diff --git a/src/v2/compiler/native_test_vocabulary.dag b/src/v2/compiler/native_test_vocabulary.dag index f693043e5a0..1d85a9c5d85 100644 --- a/src/v2/compiler/native_test_vocabulary.dag +++ b/src/v2/compiler/native_test_vocabulary.dag @@ -1,7 +1,21 @@ module v2.compiler.native_test_vocabulary +import v2.std.algebra { list_snoc_item } +import v2.std.compilers.lexing { symbol_lexeme } +import v2.std.diagnostic { + Diagnostic, + Locus, + NonEmptyDiagnostics, + Unavailable, + UserInputBoundary, + diagnostics_fatal, + diagnostics_fatal_reason, + diagnostics_singleton +} +import v2.std.lens_verdict { lens_verdict_diagnostics_located_chain_text } import v2.std.node { Symbol } import v2.std.qualified_name { QualifiedName } +import v2.std.text { String } // THE NATIVE-TEST VERDICT VOCABULARY, HOMED BELOW BOTH OF ITS READERS. // @@ -18,11 +32,96 @@ type NativeTestStage | NativeTestStageEntry | NativeTestStageEval +// A REFUSAL CARRIES WHAT THE FAILING STAGE SAID, NOT ONE SYMBOL COPIED OUT OF IT. The arm used to +// carry `reason: Symbol` -- the fatal diagnostic's reason and nothing else -- so the stage +// computed a located cause (v2.std.diagnostic Diagnostic: reason, locus, correction) and the +// verdict dropped the locus at this boundary; every row the lane persisted and every line the +// operator read said WHAT refused and never WHERE, and an ambiguous reference reported one +// symbol where the resolver had named its lookup class and its competing declarations. The +// verdict now carries the stage's NonEmptyDiagnostics unfolded, for the reason +// v2.compiler.compile native_module_resolve_verdict already gives at the census grain: +// summarizing is the CONSUMER's move. The reason every roster keys on is DERIVED -- +// v2.std.diagnostic diagnostics_fatal_reason, the LAST diagnostic, because rejected_with_pending +// prepends the advisories that rode along -- so a consumer that classifies by reason reads the same symbol +// it always read, and a consumer that needs the position reads it from the same value. type NativeTestVerdict = NativeTestPassed | NativeTestReturnedFalse | NativeTestReturnedOther - | NativeTestRefused { stage: NativeTestStage, reason: Symbol } + | NativeTestRefused { stage: NativeTestStage, diagnostics: NonEmptyDiagnostics } + +// THE ROUTE'S OWN REFUSALS ARE DIAGNOSTICS TOO, LOCATED WHERE THE ROUTE STOPPED. The Entry stage +// refuses for reasons the pipeline never minted (a declaration the scope does not hold, a +// declaration that is not an arrow), so it mints the diagnostic itself, with the locus the walk +// reached. This is the ONLY constructor for a reason-first refusal, and it demands a locus: a +// producer that has no position to give must say so through the Locus arms rather than through +// a constructor that lets the position be omitted. +fn native_test_refused_located(stage: NativeTestStage, reason: Symbol, at: Locus) -> NativeTestVerdict { + NativeTestRefused { + stage: stage, + diagnostics: diagnostics_singleton(d: Diagnostic { + reason: reason, + at: at, + correction: Unavailable { reason: UserInputBoundary } + }) + } +} + +// THE ROUTE'S CLASSIFICATION SITS BEHIND WHAT THE PIPELINE SAID. When an Entry-stage walk refuses +// with its own diagnostics and the route owes the roster a reason of its own (the module scope +// could not be walked), the pipeline's chain is kept in carriage order and the route's reason is +// appended as the fatal, located where the underlying fatal was -- so a consumer folding to the +// last reason reads the roster's symbol and a consumer reading the chain sees what the walk hit. +fn native_test_refused_after(stage: NativeTestStage, reason: Symbol, d: NonEmptyDiagnostics) -> NativeTestVerdict { + let underlying = diagnostics_fatal(d: d) + NativeTestRefused { + stage: stage, + diagnostics: NonEmptyDiagnostics { + head: d.head, + tail: list_snoc_item(xs: d.tail, item: Diagnostic { + reason: reason, + at: underlying.at, + correction: Unavailable { reason: UserInputBoundary } + }) + } + } +} + +fn native_test_stage_text(stage: NativeTestStage) -> String { + match stage { + NativeTestStageContext => "context" + NativeTestStagePrepare => "prepare" + NativeTestStageEntry => "entry" + NativeTestStageEval => "eval" + } +} + +// ONE LINE PER NON-PASSING VERDICT, FOR THE OPERATOR. The rendered driver prints this beside the +// JSON row it persists, so the command an operator runs names the failing subject, the stage, +// the cause and its position -- the same value the row carries, projected once here rather than +// re-derived by the host from the bytes it just wrote. +fn native_test_verdict_text(verdict: NativeTestVerdict) -> String { + match verdict { + NativeTestPassed => "passed" + NativeTestReturnedFalse => "returned false" + NativeTestReturnedOther => "returned a non-Boolean value" + NativeTestRefused { stage: stage, diagnostics: d } => + concat( + "refused at ", + concat( + native_test_stage_text(stage: stage), + concat( + " cause=", + concat( + symbol_lexeme(sym: diagnostics_fatal_reason(d: d)), + concat(" chain: ", lens_verdict_diagnostics_located_chain_text(d: d)) + ) + ) + ) + ) + } +} + type NativeTestObservation { module: QualifiedName diff --git a/src/v2/compiler/self_host/frontier_probe_types.dag b/src/v2/compiler/self_host/frontier_probe_types.dag index 5b3e0fd9351..813c4abfe21 100644 --- a/src/v2/compiler/self_host/frontier_probe_types.dag +++ b/src/v2/compiler/self_host/frontier_probe_types.dag @@ -40,10 +40,10 @@ import v2.std.grammar_choice_ambiguity { import v2.std.integer { Int } import v2.std.logic { Bool } import v2.std.compilers.lexing { symbol_lexeme } -import v2.std.diagnostic { Extent, InvariantPortLocus, Locus, NodeLocus, SourcePortLocus, Textual } +import v2.std.diagnostic { DeclarationLocus, Extent, InvariantPortLocus, Locus, NodeLocus, SourcePortLocus, Textual } import v2.std.node { Symbol } import v2.std.optional { Absent, Optional, Present } -import v2.std.qualified_name { QualifiedName } +import v2.std.qualified_name { QualifiedName, qualified_name_to_dotted_string } import v2.std.text { String } data non_empty_symbol_chain_dissolve_trigger: DissolutionCondition = unbound_dissolution(description: "cut_over_assemble_rejection_chain — NonEmptySymbolChain is FreeSemigroup by shape. std.algebra FreeSemigroup is already in the tree. Dissolve when the four mints in v2.compiler.self_host.frontier_probe_assemble_detail (non_empty_symbol_chain_from_non_empty_parse_stage, non_empty_symbol_chain_from_non_empty_diagnostics, non_empty_symbol_chain_from_parse_stage_head, non_empty_symbol_chain_from_diagnostic_list) and the literal in v2.test.fixture.frontier_probe_cause_location_manifest_fixture construct FreeSemigroup, then delete this type. The previous event name migrate_when_free_semigroup_available has already fired.") @@ -148,6 +148,7 @@ type FrontierProbeCauseLocation = CauseLocationTextual { file: String, extent: Extent } | CauseLocationSourcePort { port: Symbol, file: String, extent: Extent } | CauseLocationInvariantPort { port: Symbol, invariant: Symbol } + | CauseLocationDeclaration { declaration: String } | CauseLocationNodeNotSerializable fn frontier_probe_cause_location_from_locus(at: Locus) -> FrontierProbeCauseLocation { @@ -159,6 +160,8 @@ fn frontier_probe_cause_location_from_locus(at: Locus) -> FrontierProbeCauseLoca CauseLocationSourcePort { port: p.at, file: symbol_lexeme(sym: f), extent: e } InvariantPortLocus { anchor: p, invariant: invariant } => CauseLocationInvariantPort { port: p.at, invariant: invariant } + DeclarationLocus { declaration: declaration } => + CauseLocationDeclaration { declaration: qualified_name_to_dotted_string(qn: declaration) } } } diff --git a/src/v2/lens/testgen.dag b/src/v2/lens/testgen.dag index aa95a49c6d5..b28d0d26b83 100644 --- a/src/v2/lens/testgen.dag +++ b/src/v2/lens/testgen.dag @@ -9,6 +9,7 @@ import std.algebra { FreeMonoid, Empty, Cons } import v2.std.algebra { count_where, filter, fold_list, fold_list_right, length, list_append, list_flat_map, list_map, non_empty, list_snoc_item, zip_eq } import v2.std.diagnostic { Outcome, + DeclarationLocus, Diagnostic, Locus, NodeLocus, @@ -52,6 +53,7 @@ import v2.std.node { Edge, Node, Named, + Positional, Connective, Conj, Disj, @@ -1007,6 +1009,29 @@ fn witness_validity_locus_node(l: Locus) -> Outcome { } ], occurrence_id: OccurrenceSynthetic +}, + diagnostics: None + } + DeclarationLocus { declaration: declaration } => + Accepted { + value: Node { + kind: TypeNode { connective: Conj }, + children: fold_list( + xs: declaration, + empty: [ + Edge { + label: Named { name: ^witness_validity_locus_tag_declaration }, + target: witness_validity_symbol_atom_node(s: ^witness_validity_locus_tag_declaration) + } + ], + cons: fn(acc, seg) { + list_snoc_item(xs: acc, item: Edge { + label: Positional, + target: witness_validity_symbol_atom_node(s: seg) + }) + } + ), + occurrence_id: OccurrenceSynthetic }, diagnostics: None } diff --git a/src/v2/std/diagnostic.dag b/src/v2/std/diagnostic.dag index 905130d3ade..12cc318b901 100644 --- a/src/v2/std/diagnostic.dag +++ b/src/v2/std/diagnostic.dag @@ -1,7 +1,7 @@ module v2.std.diagnostic import v2.std.algebra { bag_eq, list_append, list_snoc_item, fold_list, freemonoid_empty } -import std.algebra { Monoid, Semigroup } +import std.algebra { FreeMonoid, Monoid, Semigroup } import std.dissolution { DissolutionCondition, unbound_dissolution } import v2.std.node { Node, Symbol } @@ -13,11 +13,26 @@ type LocusAnchor { at: T } +// A DIAGNOSTIC IS LOCATED WHERE ITS SUBJECT LIVES, AND A DECLARATION LIVES IN THE NAMESPACE. The +// first four arms locate in text, at a node, or at a port; none of them can name a declaration by +// the identity the containment tree already gives it. The gap was papered over: a module the +// resolver could not find was reported on a Textual whole-file locus with the module's dotted +// name standing where a FILE belongs -- a qualified name wearing a filename's clothes, and a +// consumer joining that locus to a real path would join on a name no file has. DESIGN section +// 3's standing rule is the opposite: cite the SYMBOL, and add a position only where no symbol +// exists to name. DeclarationLocus is that citation form. It carries the qualified path +// structurally (the segments are the identity; the dotted string is display), so a consumer +// that needs the module, the leaf, or a join against a symbol index reads segments rather than +// re-parsing a rendering. It deliberately carries NO node: a declaration's node is its whole +// body, and a locus that dragged the body along would make every persisted row that names a +// competing binder the size of the binder. First consumer: v2.compiler.resolve names each +// competing declaration of an ambiguous reference here, one diagnostic per binder. type Locus = Textual { file: Symbol, extent: Extent } | NodeLocus { anchor: LocusAnchor } | SourcePortLocus { anchor: LocusAnchor, file: Symbol, extent: Extent } | InvariantPortLocus { anchor: LocusAnchor, invariant: Symbol } + | DeclarationLocus { declaration: FreeMonoid } type NoCorrectionReason = UserInputBoundary @@ -69,6 +84,10 @@ fn invariant_port_locus(port: Symbol, invariant: Symbol) -> Locus { InvariantPortLocus { anchor: LocusAnchor { at: port }, invariant: invariant } } +fn declaration_locus(declaration: FreeMonoid) -> Locus { + DeclarationLocus { declaration: declaration } +} + // A generic operation may receive its locus before it knows which refusal will fire. The // operation owns that classification: textual evidence becomes a source-bearing port locus; // every source-independent seed, including a structural node, becomes the exact invariant that @@ -84,6 +103,7 @@ fn port_refusal_locus(at: Locus, port: Symbol, invariant: Symbol) -> Locus { InvariantPortLocus { anchor: _, invariant: _ } => invariant_port_locus(port: port, invariant: invariant) NodeLocus { anchor: _ } => invariant_port_locus(port: port, invariant: invariant) + DeclarationLocus { declaration: _ } => invariant_port_locus(port: port, invariant: invariant) } } @@ -137,12 +157,14 @@ fn locus_eq(a: Locus, b: Locus) -> Bool { NodeLocus { anchor: _ } => false SourcePortLocus { anchor: _, file: _, extent: _ } => false InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: _ } => false } NodeLocus { anchor: na } => match b { Textual { file: _, extent: _ } => false NodeLocus { anchor: nb } => na.at == nb.at SourcePortLocus { anchor: _, file: _, extent: _ } => false InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: _ } => false } SourcePortLocus { anchor: pa, file: fa, extent: ea } => match b { Textual { file: _, extent: _ } => false @@ -150,12 +172,21 @@ fn locus_eq(a: Locus, b: Locus) -> Bool { SourcePortLocus { anchor: pb, file: fb, extent: eb } => (pa.at == pb.at) && (fa == fb) && extent_eq(a: ea, b: eb) InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: _ } => false } InvariantPortLocus { anchor: pa, invariant: ia } => match b { Textual { file: _, extent: _ } => false NodeLocus { anchor: _ } => false SourcePortLocus { anchor: _, file: _, extent: _ } => false InvariantPortLocus { anchor: pb, invariant: ib } => (pa.at == pb.at) && (ia == ib) + DeclarationLocus { declaration: _ } => false + } + DeclarationLocus { declaration: da } => match b { + Textual { file: _, extent: _ } => false + NodeLocus { anchor: _ } => false + SourcePortLocus { anchor: _, file: _, extent: _ } => false + InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: db } => da == db } } } @@ -221,6 +252,20 @@ fn rejected_with_pending( Some { diagnostics: p } => non_empty_diagnostics_append(a: p, b: rejected) } } + +// THE FATAL DIAGNOSTIC IS THE LAST ONE, AND THIS IS THE ONE PLACE THAT SAYS SO. rejected_with_pending +// PREPENDS the advisories that rode along in front of the refusal that fired, so the cause a +// consumer should fold to is the tail, never the head -- the head is whatever advisory happened to +// be pending first. Two consumers had each spelled this fold for themselves (the native CLI's fatal +// pick and the native test route's fatal reason), which is the fork DESIGN section 3 forbids: the +// ordering is created here, so the reading of it lives here. +fn diagnostics_fatal(d: NonEmptyDiagnostics) -> Diagnostic { + fold_list(xs: d.tail, empty: d.head, cons: fn(_acc, diag) { diag }) +} + +fn diagnostics_fatal_reason(d: NonEmptyDiagnostics) -> Symbol { + diagnostics_fatal(d: d).reason +} fn diagnostics_eq(a: Diagnostics, b: Diagnostics) -> Bool { match a { None => match b { diff --git a/src/v2/std/lens_verdict.dag b/src/v2/std/lens_verdict.dag index 6b848791241..44ac62c3fc6 100644 --- a/src/v2/std/lens_verdict.dag +++ b/src/v2/std/lens_verdict.dag @@ -1,12 +1,16 @@ module v2.std.lens_verdict +import std.occurrence_identity { OccurrenceMinted, OccurrenceProjected, OccurrenceSynthetic } +import v2.std.algebra { fold_list } import v2.std.compilers.lexing { symbol_intern_lexeme, symbol_lexeme } import v2.std.diagnostic { ByteRange, CorrectionNotModeled, + DeclarationLocus, Diagnostic, Extent, NodeLocus, + NonEmptyDiagnostics, InvariantPortLocus, SourcePortLocus, Textual, @@ -15,7 +19,8 @@ import v2.std.diagnostic { textual_whole_file_diagnostic, } import v2.std.integer { integer_int_to_decimal_string } -import v2.std.node { Symbol } +import v2.std.node { Node, Symbol } +import v2.std.qualified_name { qualified_name_to_dotted_string } import v2.std.text { String } // LensVerdict is the shared fail-closed lattice for lenses that have not yet specialized to a @@ -64,6 +69,7 @@ fn lens_verdict_diagnostic_locus_module(d: Diagnostic) -> String { NodeLocus { anchor: _ } => "" SourcePortLocus { anchor: _, file: module_file, extent: _ } => symbol_lexeme(sym: module_file) InvariantPortLocus { anchor: _, invariant: _ } => "" + DeclarationLocus { declaration: _ } => "" } } @@ -80,14 +86,53 @@ fn lens_verdict_extent_text(e: Extent) -> String { } } +// A NODE LOCUS NAMES AN OCCURRENCE, AND THE OCCURRENCE IS WHAT THE READER GETS. The arm used to +// render "", which is true and useless: the anchor node carries its +// occurrence identity (std.occurrence_identity, the keying home DESIGN section 3b names for +// occurrence identity within one source graph), so the position the failing stage established +// was in hand and was rendered as its own absence. The ordinal is the parser's, scoped to the +// source graph that minted it; resolving it to a byte range needs that graph's SpanIndex, which +// the stages past parse do not carry -- so this renders the identity the diagnostic HAS rather +// than fabricating a file it does not. +fn lens_verdict_node_occurrence_text(node: Node) -> String { + match node.occurrence_id { + OccurrenceSynthetic => "" + OccurrenceMinted { id: id } => + concat("")) + OccurrenceProjected { id: id, caused_by: _ } => + concat("")) + } +} + fn lens_verdict_diagnostic_locus_text(d: Diagnostic) -> String { match d.at { Textual { file: f, extent: e } => concat(concat(symbol_lexeme(sym: f), " "), lens_verdict_extent_text(e: e)) SourcePortLocus { anchor: _, file: f, extent: e } => concat(concat(symbol_lexeme(sym: f), " "), lens_verdict_extent_text(e: e)) - NodeLocus { anchor: _ } => "" + NodeLocus { anchor: a } => lens_verdict_node_occurrence_text(node: a.at) InvariantPortLocus { anchor: _, invariant: inv } => concat("")) + DeclarationLocus { declaration: declaration } => + concat("declaration ", qualified_name_to_dotted_string(qn: declaration)) } } + +// ONE DIAGNOSTIC, LOCATED: "reason @ locus". The reason alone was what every boundary that +// summarized a refusal kept, and the locus is what each of them dropped. +fn lens_verdict_diagnostic_located_text(d: Diagnostic) -> String { + concat(symbol_lexeme(sym: d.reason), concat(" @ ", lens_verdict_diagnostic_locus_text(d: d))) +} + +// THE WHOLE CHAIN, EACH LINK LOCATED, IN CARRIAGE ORDER. The last link is the cause that +// refused (rejected_with_pending prepends advisories, so the fatal diagnostic is the tail); +// the earlier links are what rode along -- advisories, and for an ambiguous reference the +// lookup class and each competing declaration. Rendering only the fatal would drop exactly +// the detail those links exist to carry. +fn lens_verdict_diagnostics_located_chain_text(d: NonEmptyDiagnostics) -> String { + fold_list( + xs: d.tail, + empty: lens_verdict_diagnostic_located_text(d: d.head), + cons: fn(acc, diag) { concat(acc, concat(" -> ", lens_verdict_diagnostic_located_text(d: diag))) } + ) +} diff --git a/src/v2/std/verification.dag b/src/v2/std/verification.dag index 2ffb8434497..a370c16ec07 100644 --- a/src/v2/std/verification.dag +++ b/src/v2/std/verification.dag @@ -9,6 +9,7 @@ import v2.std.compilers.target_model { TargetModel } import v2.std.diagnostic { Accepted, Correction, + DeclarationLocus, Diagnostic, Diagnostics, Extent, @@ -236,6 +237,7 @@ fn locus_evaluation_nodes(at: Locus) -> List { Textual { file: _, extent: _ } => Empty SourcePortLocus { anchor: _, file: _, extent: _ } => Empty InvariantPortLocus { anchor: _, invariant: _ } => Empty + DeclarationLocus { declaration: _ } => Empty } } diff --git a/src/v2/test/claim/native_route/native_refusal_detail_test.dag b/src/v2/test/claim/native_route/native_refusal_detail_test.dag new file mode 100644 index 00000000000..134a2d31215 --- /dev/null +++ b/src/v2/test/claim/native_route/native_refusal_detail_test.dag @@ -0,0 +1,376 @@ +module v2.test.claim.native_route.native_refusal_detail + +import gunbc.witness_v2_native_route { NativeRouteMemberRow, native_route_member_row_text } +import v2.compiler.compile { + NativeLaneModuleContextRowsDecided, + NativeLaneModuleResolution, + NativeLaneModuleResolveRowsDecided, + NativeLaneModuleResolved, + NativeLaneUniverseModule, + NativeTestContext, + native_lane_file_refusal_index, + native_lane_module_resolution, + native_test_context_from_ingest +} +import v2.compiler.native_test_vocabulary { + NativeTestFileRefusal, + NativeTestPassed, + NativeTestRefused, + NativeTestReturnedFalse, + NativeTestReturnedOther, + NativeTestStage, + NativeTestStageContext, + NativeTestStageEntry, + NativeTestStageEval, + NativeTestStagePrepare, + NativeTestVerdict +} +import v2.compiler.source_authority { DagSourceReadWitness, SourceRootIngest } +import v2.std.algebra { any, count_where, fold_list, length } +import v2.std.collection { Map } +import v2.std.integer { Int } +import std.algebra { Cons, Empty } +import v2.std.artifact { Artifact, SourceFile } +import extdeps.communication.medium { Lossless, Medium } +import v2.std.cross_tree.import_model { DagTree } +import v2.std.diagnostic { + Accepted, + DeclarationLocus, + Diagnostic, + InvariantPortLocus, + NodeLocus, + NonEmptyDiagnostics, + Outcome, + Rejected, + SourcePortLocus, + Textual, + diagnostics_fatal, + diagnostics_fatal_reason +} +import v2.std.lens_verdict { lens_verdict_diagnostic_locus_text } +import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } +import v2.std.logic { Bool } +import v2.std.node { Symbol } +import v2.std.optional { Absent, Optional, Present, optional_absent, optional_present } +import v2.std.qualified_name { qualified_name_from_dotted_string } +import v2.std.text { String } +import std.occurrence_identity { OccurrenceMinted, OccurrenceProjected, OccurrenceSynthetic } + +data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly + +// THE SUBJECT IS THE ROW THE NATIVE ROUTE PERSISTS, AND THE BOUNDARY IS native_lane_module_resolution. +// That fold is the producer of every Prepare- and Context-stage member row the emitted driver +// writes to its rows file and judges through the admission authority; the JSON the lane persists +// and the `[native-verdict]` line the operator reads are projections of the value it returns. So +// the claims here read THAT value -- not the resolver's Outcome one layer down, whose located +// diagnostics were always there, and whose loss at this boundary is the defect the package +// closes: a NativeTestRefused verdict that carried one reason symbol where the failing stage had +// produced a located chain. +// +// THE SOURCES ARE SUPPLIED AND THE ROUTE IS REAL (DESIGN section 3: the boundary's inputs are +// values, everything above it is production). Each specimen is a few lines of `.dag` that reach +// tokenize, parse, normalize and resolve through the same native_test_context_from_ingest the +// driver's adjudicate mode assembles and the same native_lane_module_resolution it calls per +// universe module. Nothing here is a hand-built diagnostic or a hand-built row. +// +// FOUR SPECIMENS, EACH THE DISCRIMINATOR FOR ONE CLAUSE OF THE PACKAGE'S DONE LINE. +// - shadow: a reference whose name is bound TWICE on its lexical chain (an ancestor namespace and +// a nearer ancestor both declare it; the referencing module declares neither). The resolver's +// lexical collector refuses this as ambiguous rather than picking the nearer binder, and it has +// both candidates' qualified paths in hand -- the case where competing declarations ARE +// available, so the row must name them. +// - collision: a reference bound NOWHERE on its chain whose bare name two unrelated modules +// declare. The namespace-only policy falls through to the corpus-wide bare index, which +// collapsed the two binders to one ambiguous state at fill time -- the case where the lookup +// class is nameable and the competing declarations are NOT retained, so the row must say the +// class and must not fabricate a list. +// - unbound: one absent callee, the plainest resolve refusal; its diagnostic is anchored at the +// referencing node, so the row must identify that node's occurrence. +// - clean: a module that resolves, so a route that refused everything cannot green the rest. + +data ndp_shadow_outer_source: String = "module v2.ndp.shadow\n\nimport v2.std.logic { Bool }\n\nfn twin_value(p: Bool) -> Bool { p }\n" + +data ndp_shadow_inner_source: String = "module v2.ndp.shadow.inner\n\nimport v2.std.logic { Bool }\n\nfn twin_value(p: Bool) -> Bool { p }\n" + +data ndp_shadow_leaf_source: String = "module v2.ndp.shadow.inner.leaf\n\nimport v2.std.logic { Bool }\n\nfn leaf_value(p: Bool) -> Bool { twin_value(p) }\n" + +data ndp_collision_left_source: String = "module v2.ndq.left\n\nimport v2.std.logic { Bool }\n\nfn lone_value(p: Bool) -> Bool { p }\n" + +data ndp_collision_right_source: String = "module v2.ndq.right\n\nimport v2.std.logic { Bool }\n\nfn lone_value(p: Bool) -> Bool { p }\n" + +data ndp_collision_user_source: String = "module v2.ndq.user\n\nimport v2.std.logic { Bool }\n\nfn user_value(p: Bool) -> Bool { lone_value(p) }\n" + +data ndp_unbound_source: String = "module v2.ndp.unbound\n\nimport v2.std.logic { Bool }\n\nfn unbound_value(p: Bool) -> Bool { ndp_absent_callee(p) }\n" + +data ndp_clean_source: String = "module v2.ndp.clean\n\nimport v2.std.logic { Bool }\n\nfn clean_value(p: Bool) -> Bool { p }\n" + +fn ndp_read(source: String, id: Symbol, unit: Symbol, path: String) -> DagSourceReadWitness { + DagSourceReadWitness { + source: Medium { carried: source, fidelity: Lossless }, + artifact: Artifact { kind: SourceFile, id: id, file_path: path }, + compilation_unit: unit, + source_root: DagTree + } +} + +data ndp_ingest: SourceRootIngest = [ + ndp_read(source: ndp_shadow_outer_source, id: ^ndp_shadow_outer_artifact, unit: ^ndp_shadow_outer_cu, path: "dag/ndp_shadow.dag"), + ndp_read(source: ndp_shadow_inner_source, id: ^ndp_shadow_inner_artifact, unit: ^ndp_shadow_inner_cu, path: "dag/ndp_shadow_inner.dag"), + ndp_read(source: ndp_shadow_leaf_source, id: ^ndp_shadow_leaf_artifact, unit: ^ndp_shadow_leaf_cu, path: "dag/ndp_shadow_leaf.dag"), + ndp_read(source: ndp_collision_left_source, id: ^ndp_collision_left_artifact, unit: ^ndp_collision_left_cu, path: "dag/ndp_left.dag"), + ndp_read(source: ndp_collision_right_source, id: ^ndp_collision_right_artifact, unit: ^ndp_collision_right_cu, path: "dag/ndp_right.dag"), + ndp_read(source: ndp_collision_user_source, id: ^ndp_collision_user_artifact, unit: ^ndp_collision_user_cu, path: "dag/ndp_user.dag"), + ndp_read(source: ndp_unbound_source, id: ^ndp_unbound_artifact, unit: ^ndp_unbound_cu, path: "dag/ndp_unbound.dag"), + ndp_read(source: ndp_clean_source, id: ^ndp_clean_artifact, unit: ^ndp_clean_cu, path: "dag/ndp_clean.dag") +] + +fn ndp_universe_module(module: String, path: Symbol, declaration: String) -> NativeLaneUniverseModule { + NativeLaneUniverseModule { module: module, path: path, declarations: [declaration] } +} + +// ONE NULLARY PRODUCER, FORCED ONCE, for the reason v2.test.claim.native_census.whole_tree_census_resolve +// gives on its own producer: the floor builds a fresh evaluation frame per claim, and every claim +// here inspects one row of a value that costs one whole-ingest front end plus four resolves to +// build. Enrolled WARM in v2.workflow.floor_pure_producer_share floor_cross_claim_pure_producers_warm; +// the stored value is four NativeLaneModuleResolution arms carrying rows, diagnostics, symbols +// and nodes -- no closures, no resolution context -- so it is portable across claim frames. +type NdpResolutions + = NdpContextRefused + | NdpResolutionsDecided { + shadow: NativeLaneModuleResolution + collision: NativeLaneModuleResolution + unbound: NativeLaneModuleResolution + clean: NativeLaneModuleResolution + } + +fn ndp_resolutions() -> NdpResolutions { + match native_test_context_from_ingest(ingest: ndp_ingest) { + Rejected { diagnostics: _ } => NdpContextRefused + Accepted { value: context, diagnostics: _ } => { + let index = native_lane_file_refusal_index(refusals: context.file_refusals) + NdpResolutionsDecided { + shadow: native_lane_module_resolution( + context: context, + refusal_index: index, + entry: ndp_universe_module(module: "v2.ndp.shadow.inner.leaf", path: ^ndp_shadow_leaf_cu, declaration: "leaf_value") + ), + collision: native_lane_module_resolution( + context: context, + refusal_index: index, + entry: ndp_universe_module(module: "v2.ndq.user", path: ^ndp_collision_user_cu, declaration: "user_value") + ), + unbound: native_lane_module_resolution( + context: context, + refusal_index: index, + entry: ndp_universe_module(module: "v2.ndp.unbound", path: ^ndp_unbound_cu, declaration: "unbound_value") + ), + clean: native_lane_module_resolution( + context: context, + refusal_index: index, + entry: ndp_universe_module(module: "v2.ndp.clean", path: ^ndp_clean_cu, declaration: "clean_value") + ) + } + } + } +} + +// THE ONE ROW A ONE-DECLARATION MODULE FANS OUT TO, at the Prepare stage. Context-stage rows and a +// resolved module are the wrong arm for every refusing specimen here and answer Absent, so a +// specimen the front end refused, or one the resolver accepted, cannot satisfy a claim about the +// resolver's refusal detail. +fn ndp_prepare_row(resolution: NativeLaneModuleResolution) -> Optional { + match resolution { + NativeLaneModuleResolveRowsDecided { rows: rows } => + if length(xs: rows) == 1 { + fold_list(xs: rows, empty: optional_absent(), cons: fn(_acc, row) { optional_present(value: row) }) + } else { + optional_absent() + } + NativeLaneModuleContextRowsDecided { rows: _ } => optional_absent() + NativeLaneModuleResolved { resolved: _ } => optional_absent() + } +} + +fn ndp_prepare_refusal(row: NativeRouteMemberRow) -> Optional { + match row.verdict { + NativeTestRefused { stage: stage, diagnostics: d } => + match stage { + NativeTestStagePrepare => optional_present(value: d) + NativeTestStageContext => optional_absent() + NativeTestStageEntry => optional_absent() + NativeTestStageEval => optional_absent() + } + NativeTestPassed => optional_absent() + NativeTestReturnedFalse => optional_absent() + NativeTestReturnedOther => optional_absent() + } +} + +fn ndp_diagnostics_list(d: NonEmptyDiagnostics) -> List { + Cons { head: d.head, tail: d.tail } +} + +fn ndp_chain_has_reason(d: NonEmptyDiagnostics, reason: Symbol) -> Bool { + any(xs: ndp_diagnostics_list(d: d), predicate: fn(diag) { diag.reason == reason }) +} + +// A COMPETING DECLARATION IS NAMED BY ITS QUALIFIED PATH ON A DeclarationLocus -- the structural +// segments, compared structurally. A row that spelled the path into some other locus arm, or +// that carried the binder's node in place of its name, does not satisfy this. +fn ndp_chain_names_competing_declaration(d: NonEmptyDiagnostics, dotted: String) -> Bool { + any(xs: ndp_diagnostics_list(d: d), predicate: fn(diag) { + diag.reason == ^resolve_ambiguous_competing_declaration + && match diag.at { + DeclarationLocus { declaration: declaration } => + declaration == qualified_name_from_dotted_string(dotted: dotted) + Textual { file: _, extent: _ } => false + NodeLocus { anchor: _ } => false + SourcePortLocus { anchor: _, file: _, extent: _ } => false + InvariantPortLocus { anchor: _, invariant: _ } => false + } + }) +} + +fn ndp_competing_declaration_count(d: NonEmptyDiagnostics) -> Int { + count_where(xs: ndp_diagnostics_list(d: d), predicate: fn(diag) { + diag.reason == ^resolve_ambiguous_competing_declaration + }) +} + +fn ndp_fatal_is_at_minted_occurrence(d: NonEmptyDiagnostics) -> Bool { + let fatal = diagnostics_fatal(d: d) + match fatal.at { + NodeLocus { anchor: a } => + match a.at.occurrence_id { + OccurrenceMinted { id: _ } => true + OccurrenceProjected { id: _, caused_by: _ } => true + OccurrenceSynthetic => false + } + Textual { file: _, extent: _ } => false + SourcePortLocus { anchor: _, file: _, extent: _ } => false + InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: _ } => false + } +} + +fn ndp_shadow_refusal() -> Optional { + match ndp_resolutions() { + NdpContextRefused => optional_absent() + NdpResolutionsDecided { shadow: shadow, collision: _, unbound: _, clean: _ } => + match ndp_prepare_row(resolution: shadow) { + Absent => optional_absent() + Present { value: row } => ndp_prepare_refusal(row: row) + } + } +} + +fn ndp_collision_refusal() -> Optional { + match ndp_resolutions() { + NdpContextRefused => optional_absent() + NdpResolutionsDecided { shadow: _, collision: collision, unbound: _, clean: _ } => + match ndp_prepare_row(resolution: collision) { + Absent => optional_absent() + Present { value: row } => ndp_prepare_refusal(row: row) + } + } +} + +fn ndp_unbound_refusal() -> Optional { + match ndp_resolutions() { + NdpContextRefused => optional_absent() + NdpResolutionsDecided { shadow: _, collision: _, unbound: unbound, clean: _ } => + match ndp_prepare_row(resolution: unbound) { + Absent => optional_absent() + Present { value: row } => ndp_prepare_refusal(row: row) + } + } +} + +// THE FAILING SUBJECT IDENTIFIES ITS ACTUAL CAUSE AND ITS SOURCE OCCURRENCE. The cause is the +// fatal (last) diagnostic's reason -- the same symbol the admission authority classifies by -- +// and the occurrence is the node the resolver anchored it at, carried as a minted occurrence +// identity rather than dropped. A verdict that kept only the reason has no locus to read here. +test fn unbound_reference_row_locates_its_source_occurrence_holds() -> Bool { + match ndp_unbound_refusal() { + Absent => false + Present { value: d } => + diagnostics_fatal_reason(d: d) == ^resolve_reason_unbound_symbol + && ndp_fatal_is_at_minted_occurrence(d: d) + } +} + +// AMBIGUITY NAMES ITS LOOKUP CLASS AND BOTH COMPETING DECLARATIONS. The fatal stays the reason +// every roster owns; the class and the two binders ride in front of it. Either binder alone is +// not enough: a chain that named one has picked, which is what the refusal exists not to do. +test fn shadowed_reference_row_names_lookup_class_and_both_competing_declarations_holds() -> Bool { + match ndp_shadow_refusal() { + Absent => false + Present { value: d } => + diagnostics_fatal_reason(d: d) == ^resolve_reason_ambiguous_symbol + && ndp_chain_has_reason(d: d, reason: ^resolve_ambiguous_on_lexical_chain) + && ndp_chain_names_competing_declaration(d: d, dotted: "v2.ndp.shadow.inner.twin_value") + && ndp_chain_names_competing_declaration(d: d, dotted: "v2.ndp.shadow.twin_value") + && ndp_competing_declaration_count(d: d) == 2 + } +} + +// THE GLOBAL-BARE CLASS IS NAMED AND NO CANDIDATE LIST IS FABRICATED. The bare index collapsed its +// binders at fill time, so "where available" is honestly "not here": the class row says which +// lookup was ambiguous and the chain carries zero competing-declaration rows. +test fn global_bare_collision_row_names_its_lookup_class_without_fabricating_candidates_holds() -> Bool { + match ndp_collision_refusal() { + Absent => false + Present { value: d } => + diagnostics_fatal_reason(d: d) == ^resolve_reason_ambiguous_symbol + && ndp_chain_has_reason(d: d, reason: ^resolve_ambiguous_on_global_bare) + && !ndp_chain_has_reason(d: d, reason: ^resolve_ambiguous_on_lexical_chain) + && ndp_competing_declaration_count(d: d) == 0 + } +} + +// THE OPERATOR'S LINE IS THE CONSUMER-LEVEL CONTROL. native_route_member_row_text is what the +// emitted driver prints beside each persisted non-passing row, so this is the surface an operator +// reads. It must name the subject, the stage, the fatal cause, and -- the detail this package +// carries through -- the position: here, a competing declaration by its qualified path. A +// mutation that folds the verdict back to its fatal reason keeps the first three words and loses +// the fourth, which is exactly the clause that goes red. +test fn operator_line_names_subject_stage_cause_and_competing_declaration_holds() -> Bool { + match ndp_resolutions() { + NdpContextRefused => false + NdpResolutionsDecided { shadow: shadow, collision: _, unbound: _, clean: _ } => + match ndp_prepare_row(resolution: shadow) { + Absent => false + Present { value: row } => { + let line = native_route_member_row_text(row: row) + string_contains(s: line, pattern: "v2.ndp.shadow.inner.leaf.leaf_value refused at prepare cause=resolve_reason_ambiguous_symbol") + && string_contains(s: line, pattern: "resolve_ambiguous_competing_declaration @ declaration v2.ndp.shadow.twin_value") + && string_contains(s: line, pattern: "resolve_ambiguous_competing_declaration @ declaration v2.ndp.shadow.inner.twin_value") + } + } + } +} + +// THE UNBOUND ROW'S LINE RENDERS THE OCCURRENCE, NOT ITS ABSENCE. lens_verdict_diagnostic_locus_text +// answered "" for every node-anchored diagnostic; the line now carries the +// occurrence the failing stage anchored at. +test fn operator_line_renders_the_source_occurrence_holds() -> Bool { + match ndp_unbound_refusal() { + Absent => false + Present { value: d } => + string_contains(s: lens_verdict_diagnostic_locus_text(d: diagnostics_fatal(d: d)), pattern: "node occurrence #") + } +} + +// THE DENOMINATOR: a module that resolves. Without it every claim above is satisfied by a route +// that refuses everything for any reason. +test fn clean_module_resolves_holds() -> Bool { + match ndp_resolutions() { + NdpContextRefused => false + NdpResolutionsDecided { shadow: _, collision: _, unbound: _, clean: clean } => + match clean { + NativeLaneModuleResolved { resolved: _ } => true + NativeLaneModuleContextRowsDecided { rows: _ } => false + NativeLaneModuleResolveRowsDecided { rows: _ } => false + } + } +} diff --git a/src/v2/test/claim/provenance/occurrence_id_model_test.dag b/src/v2/test/claim/provenance/occurrence_id_model_test.dag index 581f708d08f..fd04eaccc1b 100644 --- a/src/v2/test/claim/provenance/occurrence_id_model_test.dag +++ b/src/v2/test/claim/provenance/occurrence_id_model_test.dag @@ -1,7 +1,7 @@ module v2.test.provenance.occurrence_id_model import std.occurrence_identity { node_occurrence_identity_minted } -import v2.std.diagnostic { ByteRange, InvariantPortLocus, NodeLocus, SourcePortLocus, Textual, WholeFile } +import v2.std.diagnostic { ByteRange, DeclarationLocus, InvariantPortLocus, NodeLocus, SourcePortLocus, Textual, WholeFile } import v2.std.exact_structural_equality_zip_fold_predicate { exact_structural_equality_zip_fold } @@ -81,6 +81,7 @@ test fn span_index_from_source_round_trip_holds() -> Bool { NodeLocus { anchor: _ } => false SourcePortLocus { anchor: _, file: _, extent: _ } => false InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: _ } => false } DerivedBy { producer: _, from: _ } => false GeneratedBy { generator: _, from: _ } => false diff --git a/src/v2/test/claim/resolve/namespace_only_policy_test.dag b/src/v2/test/claim/resolve/namespace_only_policy_test.dag index c130cd1496f..1730f3ee1bb 100644 --- a/src/v2/test/claim/resolve/namespace_only_policy_test.dag +++ b/src/v2/test/claim/resolve/namespace_only_policy_test.dag @@ -11,7 +11,7 @@ import v2.compiler.resolve { } import v2.extdeps.languages.dag { dag_language_model } import v2.std.collection { empty_map } -import v2.std.diagnostic { Accepted, Rejected } +import v2.std.diagnostic { Accepted, Rejected, diagnostics_fatal_reason } import v2.std.logic { Bool } import v2.std.node { Atom, @@ -126,7 +126,7 @@ fn policy_pilot_resolve_rejects_with_reason( identity: identity ) { Accepted { value: _, diagnostics: _ } => false - Rejected { diagnostics: d } => d.head.reason == reason + Rejected { diagnostics: d } => diagnostics_fatal_reason(d: d) == reason } } diff --git a/src/v2/test/claim/self_host/frontier_probe_cause_location_roundtrip_test.dag b/src/v2/test/claim/self_host/frontier_probe_cause_location_roundtrip_test.dag index 8363c3a2f54..b8236284d96 100644 --- a/src/v2/test/claim/self_host/frontier_probe_cause_location_roundtrip_test.dag +++ b/src/v2/test/claim/self_host/frontier_probe_cause_location_roundtrip_test.dag @@ -2,6 +2,7 @@ module v2.test.claim.self_host.frontier_probe_cause_location_roundtrip import v2.compiler.self_host.frontier_probe_types { AssembleRejectionDetail, + CauseLocationDeclaration, CauseLocationNodeNotSerializable, CauseLocationInvariantPort, CauseLocationSourcePort, @@ -33,6 +34,7 @@ fn roundtrip_extent_start() -> Int { } CauseLocationSourcePort { port: _, file: _, extent: _ } => 0 - 4 CauseLocationInvariantPort { port: _, invariant: _ } => 0 - 4 + CauseLocationDeclaration { declaration: _ } => 0 - 6 CauseLocationNodeNotSerializable => 0 - 5 } } diff --git a/src/v2/test/claim/self_host/frontier_probe_cause_location_test.dag b/src/v2/test/claim/self_host/frontier_probe_cause_location_test.dag index cbff49a7938..d2d5a0edc30 100644 --- a/src/v2/test/claim/self_host/frontier_probe_cause_location_test.dag +++ b/src/v2/test/claim/self_host/frontier_probe_cause_location_test.dag @@ -10,6 +10,7 @@ import v2.compiler.self_host.frontier_probe_assemble_detail { import v2.compiler.self_host.frontier_probe_types { AssembleRejectionDetail, NonEmptySymbolChain, + CauseLocationDeclaration, CauseLocationNodeNotSerializable, CauseLocationInvariantPort, CauseLocationSourcePort, @@ -61,6 +62,7 @@ fn detail_location_of(d: Diagnostic) -> Symbol { CauseLocationTextual { file: _, extent: _ } => ^location_is_textual CauseLocationSourcePort { port: p, file: _, extent: _ } => p CauseLocationInvariantPort { port: p, invariant: _ } => p + CauseLocationDeclaration { declaration: _ } => ^location_is_declaration CauseLocationNodeNotSerializable => ^location_is_node_not_serializable } } @@ -114,6 +116,7 @@ fn textual_extent_start() -> Int { } CauseLocationSourcePort { port: _, file: _, extent: _ } => 0 - 3 CauseLocationInvariantPort { port: _, invariant: _ } => 0 - 3 + CauseLocationDeclaration { declaration: _ } => 0 - 5 CauseLocationNodeNotSerializable => 0 - 4 } } @@ -152,6 +155,7 @@ fn paired_start_of_two() -> Int { } CauseLocationSourcePort { port: _, file: _, extent: _ } => 0 - 3 CauseLocationInvariantPort { port: _, invariant: _ } => 0 - 3 + CauseLocationDeclaration { declaration: _ } => 0 - 5 CauseLocationNodeNotSerializable => 0 - 4 } } diff --git a/src/v2/test/claim/tokenize/string_literal_raw_newline_test.dag b/src/v2/test/claim/tokenize/string_literal_raw_newline_test.dag index 3ef139e56fa..de818867044 100644 --- a/src/v2/test/claim/tokenize/string_literal_raw_newline_test.dag +++ b/src/v2/test/claim/tokenize/string_literal_raw_newline_test.dag @@ -5,7 +5,7 @@ import v2.std.logic { Bool } import v2.std.compilers.lexing { ModeledLexRules, TokenStream } import v2.compiler.tokenize { tokenize } import v2.extdeps.languages.dag { dag_lex_rules } -import v2.std.diagnostic { ByteRange, Textual, WholeFile } +import v2.std.diagnostic { ByteRange, DeclarationLocus, Textual, WholeFile } import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly @@ -49,6 +49,7 @@ test fn unterminated_string_locus_covers_the_opening_quote_holds() -> Bool { NodeLocus { anchor: _ } => false SourcePortLocus { anchor: _, file: _, extent: _ } => false InvariantPortLocus { anchor: _, invariant: _ } => false + DeclarationLocus { declaration: _ } => false } } } diff --git a/src/v2/test/native_decl_selection_test.dag b/src/v2/test/native_decl_selection_test.dag index cc758b22e63..041c39a915e 100644 --- a/src/v2/test/native_decl_selection_test.dag +++ b/src/v2/test/native_decl_selection_test.dag @@ -29,7 +29,7 @@ import v2.test.name_resolve.admission_fail_closed { fc_duplicate_roots } import v2.compiler.source_authority { DagSourceReadWitness } import v2.std.artifact { Artifact, SourceFile } import v2.std.cross_tree.import_model { DagTree } -import v2.std.diagnostic { Accepted, Outcome, Rejected } +import v2.std.diagnostic { Accepted, Outcome, Rejected, diagnostics_fatal_reason } import v2.std.algebra { fold_list, length } import v2.std.logic { Bool } import v2.std.node { Symbol } @@ -113,9 +113,9 @@ fn collision_prepared() -> Optional { fn observation_is_entry_not_found(observation: NativeTestObservation) -> Bool { match observation.verdict { - NativeTestRefused { stage: stage, reason: reason } => + NativeTestRefused { stage: stage, diagnostics: d } => match stage { - NativeTestStageEntry => reason == ^native_test_entry_declaration_not_found + NativeTestStageEntry => diagnostics_fatal_reason(d: d) == ^native_test_entry_declaration_not_found _ => false } _ => false @@ -194,9 +194,9 @@ test fn shared_root_validation_refusal_stays_at_prepare_for_each_identity() -> B empty: true, cons: fn(ok, row) { ok && match row.verdict { - NativeTestRefused { stage: stage, reason: reason } => + NativeTestRefused { stage: stage, diagnostics: d } => match stage { - NativeTestStagePrepare => reason == ^resolve_duplicate_module_name + NativeTestStagePrepare => diagnostics_fatal_reason(d: d) == ^resolve_duplicate_module_name _ => false } _ => false diff --git a/src/v2/test/v2_native_route_test.dag b/src/v2/test/v2_native_route_test.dag index 1c4b08d8040..2a2236063b4 100644 --- a/src/v2/test/v2_native_route_test.dag +++ b/src/v2/test/v2_native_route_test.dag @@ -49,13 +49,13 @@ import v2.workflow.floor_discovery_source_authority { import v2.std.live_tree { SubstrateInputsOnly } import v2.compiler.native_test_vocabulary { NativeTestVerdict, NativeTestPassed, NativeTestReturnedFalse, NativeTestReturnedOther, - NativeTestRefused, + native_test_refused_located, NativeTestStage, NativeTestStageContext, NativeTestStagePrepare, NativeTestStageEntry, NativeTestStageEval, NativeTestFileRefusal } import v2.std.optional { Absent, Optional, Present, optional_present } -import v2.std.diagnostic { Accepted, Outcome, Rejected } +import v2.std.diagnostic { Accepted, Outcome, Rejected, invariant_port_locus } import v2.std.collection { List } import v2.std.algebra { fold_list, length } import v2.std.logic { Bool } @@ -88,6 +88,19 @@ fn false_row(module: String, declaration: String) -> NativeRouteMemberRow { } } +// A SUPPLIED REFUSAL FOR THE AUTHORITY'S CLAUSES. These claims discriminate the admission +// authority over supplied rows (DESIGN section 3: the boundary is the clause, its inputs are +// values); the located diagnostics a real route carries are exercised by the inhabitance +// claims in v2.test.claim.native_route.native_refusal_detail_test, so here the locus is the +// supplied-input port and only the stage and the fatal reason are the claim's subject. +fn refused_verdict(stage: NativeTestStage, reason: Symbol) -> NativeTestVerdict { + native_test_refused_located( + stage: stage, + reason: reason, + at: invariant_port_locus(port: ^v2_native_route_test_supplied_verdict, invariant: reason) + ) +} + fn refused_row( module: String, declaration: String, @@ -96,7 +109,7 @@ fn refused_row( ) -> NativeRouteMemberRow { NativeRouteMemberRow { identity: test_identity(module: module, declaration: declaration), - verdict: NativeTestRefused { stage: stage, reason: reason } + verdict: refused_verdict(stage: stage, reason: reason) } } @@ -404,7 +417,7 @@ test fn a_reached_verdict_on_a_route_gap_identity_is_a_divergence() -> Bool { test fn the_route_gap_agrees_only_with_the_hermetic_boundary_refusal() -> Bool { match native_route_disposition( - verdict: NativeTestRefused { stage: NativeTestStageEval, reason: ^eval_rejected_effect_io_unbound }, + verdict: refused_verdict(stage: NativeTestStageEval, reason: ^eval_rejected_effect_io_unbound), reference: FloorRouteGapRefusal ) { NativeAgreementRouteGap => true @@ -414,14 +427,14 @@ test fn the_route_gap_agrees_only_with_the_hermetic_boundary_refusal() -> Bool { test fn a_route_gap_refusal_off_the_boundary_is_an_exclusion() -> Bool { match native_route_disposition( - verdict: NativeTestRefused { stage: NativeTestStageEval, reason: ^some_unowned_cause }, + verdict: refused_verdict(stage: NativeTestStageEval, reason: ^some_unowned_cause), reference: FloorRouteGapRefusal ) { NativeExclusion { cause: UnattributedRefusal { reason: r } } => r == ^some_unowned_cause _ => false } && match native_route_disposition( - verdict: NativeTestRefused { stage: NativeTestStagePrepare, reason: ^parse_g0_tokens_remain }, + verdict: refused_verdict(stage: NativeTestStagePrepare, reason: ^parse_g0_tokens_remain), reference: FloorRouteGapRefusal ) { NativeExclusion { cause: CompilerFrontierAttributed { reason: r } } => r == ^parse_g0_tokens_remain diff --git a/src/v2/workflow/body_lowering_retention_census.dag b/src/v2/workflow/body_lowering_retention_census.dag index 8ed52025fb8..a3fb835b2df 100644 --- a/src/v2/workflow/body_lowering_retention_census.dag +++ b/src/v2/workflow/body_lowering_retention_census.dag @@ -7,6 +7,7 @@ import v2.std.algebra { Empty, fold_list, length, list_snoc_item } import v2.std.collection { List } import v2.std.compilers.lexing { symbol_lexeme } import v2.std.diagnostic { + DeclarationLocus, Diagnostic, Diagnostics, NodeLocus, @@ -16,6 +17,7 @@ import v2.std.diagnostic { Textual } import v2.std.lens_verdict { lens_verdict_extent_text } +import v2.std.qualified_name { qualified_name_to_dotted_string } import v2.std.node { Arrow, Atom, @@ -167,6 +169,7 @@ fn retained_node_optional(d: Diagnostic) -> Optional { Textual { file: _, extent: _ } => Absent SourcePortLocus { anchor: _, file: _, extent: _ } => Absent InvariantPortLocus { anchor: _, invariant: _ } => Absent + DeclarationLocus { declaration: _ } => Absent } } @@ -449,6 +452,8 @@ fn diagnostic_attribution(d: Diagnostic) -> String { "invariant port ", concat(symbol_lexeme(sym: anchor.at), concat(" violated ", symbol_lexeme(sym: invariant))) ) + DeclarationLocus { declaration: declaration } => + concat("declaration ", qualified_name_to_dotted_string(qn: declaration)) } } diff --git a/src/v2/workflow/floor_pure_producer_share.dag b/src/v2/workflow/floor_pure_producer_share.dag index c8e753c006a..5e076a528b4 100644 --- a/src/v2/workflow/floor_pure_producer_share.dag +++ b/src/v2/workflow/floor_pure_producer_share.dag @@ -565,7 +565,15 @@ import v2.std.collection { List } // prepare_grammar's did. The instrument that decides this row is the required floor's // [floor-shared-fill] ledger showing disposition=Stored at preparation, joined against // required_floor_claim_cost.tsv showing the four identities reaching verdict_reached=true. +// THE NATIVE REFUSAL DETAIL PROBE ROW IS THE SAME GROUND A FOURTH TIME, ON THE SAME PRODUCER. +// v2.test.claim.native_route.native_refusal_detail drives native_test_context_from_ingest over one +// eight-specimen supplied ingest and native_lane_module_resolution over four of its modules; its +// six claims each inspect one row of that value. The stored value is four +// NativeLaneModuleResolution arms -- rows, diagnostics, symbols, nodes -- with no resolution +// context and no closure, portable for the same reason census_probe_outcomes is. WARM for the +// same ceiling arithmetic: the fill is a front end plus four resolves, more than one claim's budget. data floor_cross_claim_pure_producers_warm: List = [ + "v2.test.claim.native_route.native_refusal_detail.ndp_resolutions", "v2.test.claim.native_census.whole_tree_census_resolve.census_probe_outcomes", "v2.test.native_decl_selection.collision_resolved", "v2.extdeps.languages.bash_command_fold.bash_fold_formal_productions", From 67ac2bbbaed17dec39328f495b1358a562db53ed Mon Sep 17 00:00:00 2001 From: gunbc-ci-auto-heal Date: Mon, 21 Sep 2026 14:37:44 +0000 Subject: [PATCH 2/2] The fatal pick chooses the refusing link, and the refusing link stops wearing the advisory's name The built CLI's specimen read `infer_grounding_not_derived x35 | FATAL AT `. The last-link pick was choosing the refusing link -- but that link was spelled with the ADVISORY's symbol: canonical_grounding_from_inferred_facts (v2.compiler.infer) and translate's grounding gate both REFUSED with `infer_grounding_not_derived`, the symbol infer carries as a frontier advisory on its Accepted path (review 46789 routed the gate through the shared fn so it would). One name, two contracts (DESIGN section 3), so no reader of the chain could tell the refusal from the rows in front of it; eval's gate had already drawn the line with its own reason. - root: canonical_grounding_from_inferred_facts refuses with infer_grounding_demanded_not_derived (coercion and translate's coerce fold reach it) -- the earliest unjustified boundary; - translate's gate refuses with translate_rejected_grounding_not_derived, mirroring eval; - v2.cli.compile_cli's CliRunRefused.reason was d.head.reason -- the first pending advisory, the grammar-global overlap residue on every broken entry -- and is now the fatal; its chain renders each link located (lens_verdict_diagnostics_located_chain_text; cli_diagnostic_chain deleted); - both new reasons owned at FatalGrain in compile_door_cause_ownership. Controls: v2.test.cli.v2_native_cli runs the real v2_cli_run over a supplied two-file ingest whose second file leaves tokens after its module -- reason == parse_g0_tokens_remain with the overlap advisory in front, detail `FATAL AT bytes ...` (warm producer enrolled); translate_underived_refusal_test asserts the fatal is translate's own AND is not the advisory; infer_self_grounding_wall_test and ingest_bridge_test retarget from head to fatal under the root's name. Head-reason claims on paths where a real infer runs in front stay green -- there the head is the advisory. Recurring-failure-mode row extended with this receipt. Co-Authored-By: Claude Opus 5 (1M context) --- ...ded_to_its_reason_at_a_result_boundary.dag | 4 +- src/v2/cli/compile_cli.dag | 29 ++++---- src/v2/compiler/04_infer.dag | 18 ++++- src/v2/compiler/06_translate.dag | 34 +++++++--- src/v2/test/claim/cli/v2_native_cli_test.dag | 66 +++++++++++++++++++ .../claim/infer_self_grounding_wall_test.dag | 4 +- .../test/claim/manual/ingest_bridge_test.dag | 5 +- .../translate_underived_refusal_test.dag | 9 ++- .../workflow/compile_door_cause_ownership.dag | 12 ++++ src/v2/workflow/floor_pure_producer_share.dag | 4 ++ 10 files changed, 152 insertions(+), 33 deletions(-) diff --git a/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag b/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag index 6c03c2f000d..0d16c19e973 100644 --- a/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag +++ b/dag/gunbc/recurring_failure_mode/located_cause_folded_to_its_reason_at_a_result_boundary.dag @@ -17,9 +17,11 @@ data located_cause_folded_to_its_reason_at_a_result_boundary: RecurringFailureMo "THE SAME SHAPE AT ANOTHER GRAIN IN THE SAME LANE, LEFT STANDING AND NAMED: NativeTestFileRefusal carries `head_reason` and `fatal_reason` for a front-end refusal whose diagnostics carry Textual file-and-extent loci -- the most actionable position the pipeline produces. The row is read by the seed host runner's TSV-shaped decoder, so widening it is a change to that decoder as well; it is the declared remainder of the package that filed this row, not an oversight.", + "RECEIPT THREE, the same night, the NEIGHBOURING SHAPE: the refusing link spelled with an ADVISORY'S name. v2.compiler.translate's grounding gate refused emission with `infer_grounding_not_derived` -- the very symbol infer carries as a frontier ADVISORY on its Accepted path for the same node (review 46789 routed the gate through canonical_grounding_from_inferred_facts precisely so that symbol would propagate). The built native CLI's refusal then read as a chain of thirty-five `infer_grounding_not_derived` with the last one picked as the fatal -- correctly picked, and unreadable: one name, two contracts (DESIGN section 3, a meaning fork), so an operator could not tell the refusal from the rows that rode along. The CLI's `reason` field compounded it by carrying `d.head.reason`, the FIRST pending advisory (the grammar-global overlap residue), so every broken entry refused under one indistinguishable reason. Repaired by giving the gate its own fatal `translate_rejected_grounding_not_derived` -- eval's gate had already drawn that line with `eval_rejected_grounding_not_derived` -- and by deriving the CLI's reason through diagnostics_fatal_reason.", + "WHY IT RECURS: the reason symbol is the field every AUTHORITY keys on -- cause-ownership tables, expected-red rosters, exclusion taxonomies all classify by reason -- so a carrier designed for the authority's question carries exactly the authority's key and nothing more, and the operator's question (where) has no field. The fix is never to add a second field beside the reason: it is to carry the Diagnostic and DERIVE the reason, so the authority reads the same symbol and the operator reads the same value.", - "RECOGNITION RULE: at any type that carries a refusal, ask what the PRODUCER held when it filled the field. If the producer held a Diagnostic or NonEmptyDiagnostics and the field is a Symbol, the boundary has folded a located cause to its name. The counter-tell that keeps this from over-firing: a reason minted by the boundary itself, for a refusal no stage produced, legitimately starts as a Symbol -- and even then it owes a locus (native_test_refused_located demands one).", + "RECOGNITION RULE: at any type that carries a refusal, ask what the PRODUCER held when it filled the field. If the producer held a Diagnostic or NonEmptyDiagnostics and the field is a Symbol, the boundary has folded a located cause to its name. Its neighbour: a stage that REFUSES with a reason another stage also carries as an advisory -- ask, for every `outcome_rejected(...)` whose reason is also minted on an Accepted path's `Some { diagnostics }`, whether a reader of the flat chain can tell which link refused. The counter-tell that keeps this from over-firing: a reason minted by the boundary itself, for a refusal no stage produced, legitimately starts as a Symbol -- and even then it owes a locus (native_test_refused_located demands one).", "CEILING AND TRIGGER. The class is decidable -- a field typed Symbol filled from a value typed Diagnostic is a shape a lens can read off the Node tree -- so its ceiling is mechanically preventable at least, and structurally guaranteed where the carrier is sealed to a constructor that takes the diagnostics. This row sits at mitigatable: two receipts repaired by hand, and the reading is by reviewer. NEXT-RUNG TRIGGER, naming the capability: a lens over refusal-carrying types that refuses a Symbol-typed field whose fill site projects a Diagnostic's reason, with the file-refusal row above as its first authorable red.", ], diff --git a/src/v2/cli/compile_cli.dag b/src/v2/cli/compile_cli.dag index ba60416212e..2705d942d15 100644 --- a/src/v2/cli/compile_cli.dag +++ b/src/v2/cli/compile_cli.dag @@ -10,9 +10,9 @@ import v2.compiler.self_host.compiler_closure_emit { import v2.compiler.source_authority { SourceRootIngest } import v2.extdeps.languages.rust { rust_target_model } import v2.std.algebra { fold_list, length, list_reverse } -import v2.std.compilers.lexing { symbol_lexeme } -import v2.std.diagnostic { Accepted, NonEmptyDiagnostics, Rejected, diagnostics_fatal } -import v2.std.lens_verdict { lens_verdict_diagnostic_locus_text } + +import v2.std.diagnostic { Accepted, NonEmptyDiagnostics, Rejected, diagnostics_fatal, diagnostics_fatal_reason } +import v2.std.lens_verdict { lens_verdict_diagnostic_locus_text, lens_verdict_diagnostics_located_chain_text } import v2.std.node { Symbol } import v2.std.qualified_name { qualified_name_from_dotted_string } import v2.std.text { String } @@ -254,8 +254,9 @@ type CliRunOutcome | CliRunRefused { reason: Symbol, detail: String } // THE REFUSAL PRINTS ITS CAUSE, AND FOR ONE GENERATION IT DID NOT. The rejected arm already -// CARRIED `d.head.reason`, and the detail beside it said "the located cause is this refusal's -// reason" -- true of the value and false of the artifact, because the rendered main prints only the +// CARRIED `d.head.reason` (now the FATAL reason -- the head was the first advisory that happened +// to be pending, which is the wrong link for a `reason` field to name), and the detail beside it said +// "the located cause is this refusal's reason" -- true of the value and false of the artifact, because the rendered main prints only the // `ProcessExit` reason string that `detail` becomes. So generation two refused with a sentence // pointing at a symbol nobody could read, which is DESIGN section 5's located-where-the-author-can- // act failure in its quietest form: the cause was computed, carried, and then dropped at the last @@ -266,16 +267,10 @@ type CliRunOutcome // `parse_grammar_choice_overlap_residue` for every entry tried; that is a grammar-global ADVISORY // and never the fatal. The fatal diagnostic is the last one, and `parse_g0_tokens_remain_diagnostic` // builds its locus from the first remaining token. The fatal pick is `v2.std.diagnostic` -// `diagnostics_fatal` and file+extent is `lens_verdict_diagnostic_locus_text` — neither a second -// spelling here (DESIGN section 3). - -fn cli_diagnostic_chain(d: NonEmptyDiagnostics) -> String { - fold_list( - xs: d.tail, - empty: symbol_lexeme(sym: d.head.reason), - cons: fn(acc, diag) { concat(concat(acc, " -> "), symbol_lexeme(sym: diag.reason)) } - ) -} +// `diagnostics_fatal`, the chain is `lens_verdict_diagnostics_located_chain_text` (every link with +// its locus, so thirty-five advisories in front of the fatal each say where they are), and +// file+extent is `lens_verdict_diagnostic_locus_text` — none a second spelling here (DESIGN +// section 3). // THE EMPTY INGEST IS A REFUSAL AND NOT AN EMPTY PROGRAM, and this arm is the whole reason // `v2_cli_run` does not call the emitter first and ask questions after. @@ -312,9 +307,9 @@ fn v2_cli_run(plan: CliPlan, ingest: SourceRootIngest) -> CliRunOutcome { } Rejected { diagnostics: d } => CliRunRefused { - reason: d.head.reason, + reason: diagnostics_fatal_reason(d: d), detail: concat( - concat("the closure did not emit; diagnostic chain: ", cli_diagnostic_chain(d: d)), + concat("the closure did not emit; diagnostic chain: ", lens_verdict_diagnostics_located_chain_text(d: d)), concat(" | FATAL AT ", lens_verdict_diagnostic_locus_text(d: diagnostics_fatal(d: d))) ) } diff --git a/src/v2/compiler/04_infer.dag b/src/v2/compiler/04_infer.dag index 9a367fa8d49..4d718e7fe99 100644 --- a/src/v2/compiler/04_infer.dag +++ b/src/v2/compiler/04_infer.dag @@ -802,13 +802,29 @@ fn inferred_facts_witness_for_node(tree: InferredTree, node: Node) -> Witness Diagnostic { + Diagnostic { + reason: ^infer_grounding_demanded_not_derived, + at: at, + correction: Unavailable { reason: ExternalContractUnknown } + } +} + fn canonical_grounding_from_inferred_facts( node: Node, facts: InferredFacts, ) -> Outcome { match facts.grounding { GroundingNotDerived { node: n } => - outcome_rejected(infer_grounding_not_derived_diagnostic(at: node_locus(node: n))) + outcome_rejected(infer_grounding_demanded_not_derived_diagnostic(at: node_locus(node: n))) DerivedGrounding { grounding: g } => if node != g.node { outcome_rejected(infer_canonical_grounding_incoherent_diagnostic(node: node)) diff --git a/src/v2/compiler/06_translate.dag b/src/v2/compiler/06_translate.dag index 62c36ff800d..47ea7459b6f 100644 --- a/src/v2/compiler/06_translate.dag +++ b/src/v2/compiler/06_translate.dag @@ -38,7 +38,6 @@ import v2.compiler.infer { InferredTree, algebra_ref_is_grounded, canonical_grounding_for_node, - canonical_grounding_from_inferred_facts, inferred_facts_grounding_derived, inferred_facts_witness_for_node } @@ -282,9 +281,10 @@ type TokenSequenceItemKind type GroundingGatePassed {} -// Refuse only recorded GroundingNotDerived on the Holds arm, routing that variant through -// canonical_grounding_from_inferred_facts so the typed ^infer_grounding_not_derived diagnostic -// propagates (review 46789). DerivedGrounding on Holds accepts without re-running canonical +// Refuse only recorded GroundingNotDerived on the Holds arm, with the gate's own fatal +// ^translate_rejected_grounding_not_derived located at the node (review 46789 routed it through +// canonical_grounding_from_inferred_facts and inherited the advisory's spelling; see the +// diagnostic's note below). DerivedGrounding on Holds accepts without re-running canonical // admission. infer_facts_lookup_miss (Violates) is the compatibility class for trees with no infer // judgment at a node: emit_orchestration's synthetic InferredTree (`orch_emit_facts_lookup`) and // test-only shape-frontier carriers carry an empty facts map by construction, so lookup miss means @@ -306,15 +306,31 @@ type GroundingGatePassed {} // is an unresolved compile error. Callers bind with bind_outcome(fn(_) => ...) and never read the // payload; the signal is Accepted vs Rejected disposition only. +// THE GATE'S REFUSAL HAS ITS OWN NAME, AND UNTIL 2026-09-21 IT DID NOT. Review 46789 routed this +// arm through canonical_grounding_from_inferred_facts "so the typed ^infer_grounding_not_derived +// diagnostic propagates" -- and it did, as the FATAL, spelled identically to the ADVISORY infer +// carries on its Accepted path for the same node. One symbol, two contracts (DESIGN section 3, a +// meaning fork): a rejection chain read as `infer_grounding_not_derived x35` where thirty-four +// links were infer's frontier rows riding along and the last was THIS gate refusing to emit, and +// no reader could tell which. Measured on the built native CLI at gunbc#11965's specimen +// (7d3a2578). eval's gate already draws the line -- `eval_rejected_grounding_not_derived` is its +// fatal, distinct from the advisory -- so this is the same precedent applied to translate. The +// refusal is located at the node whose grounding emission needed; the frontier row for that same +// node sits in front of it in the chain, and now the two say different things. +fn translate_grounding_not_derived_diagnostic(node: Node) -> Diagnostic { + Diagnostic { + reason: ^translate_rejected_grounding_not_derived, + at: node_locus(node: node), + correction: Unavailable { reason: ExternalContractUnknown } + } +} + fn translate_grounding_derived_gate(tree: InferredTree, node: Node) -> Outcome { match inferred_facts_witness_for_node(tree: tree, node: node) { Holds { value: facts } => match facts.grounding { - GroundingNotDerived { node: _ } => - match canonical_grounding_from_inferred_facts(node: node, facts: facts) { - Accepted { value: _, diagnostics: _ } => outcome_accepted(GroundingGatePassed {}) - Rejected { diagnostics: r } => Rejected { diagnostics: r } - } + GroundingNotDerived { node: n } => + outcome_rejected(d: translate_grounding_not_derived_diagnostic(node: n)) DerivedGrounding { grounding: _ } => outcome_accepted(GroundingGatePassed {}) } diff --git a/src/v2/test/claim/cli/v2_native_cli_test.dag b/src/v2/test/claim/cli/v2_native_cli_test.dag index ab5a20083bf..04daa154155 100644 --- a/src/v2/test/claim/cli/v2_native_cli_test.dag +++ b/src/v2/test/claim/cli/v2_native_cli_test.dag @@ -15,7 +15,11 @@ import v2.cli.compile_cli { v2_cli_plan_source_roots, v2_cli_run } +import v2.compiler.source_authority { DagSourceReadWitness, SourceRootIngest } import v2.std.algebra { length, list_head, HeadAbsent, HeadFound } +import v2.std.artifact { Artifact, SourceFile } +import extdeps.communication.medium { Lossless, Medium } +import v2.std.cross_tree.import_model { DagTree } import v2.std.logic { Bool } import v2.std.node { Symbol } import v2.std.qualified_name { qualified_name_from_dotted_string } @@ -299,3 +303,65 @@ test fn a_refused_outcome_exits_failure_holds() -> Bool { ExitFailure { code: code, reason: _ } => code != 0 } } + +// THE REFUSAL NAMES THE REFUSING LINK, NOT THE FIRST ADVISORY. This is the run-level claim the emit +// arm's frontier above does not block: a refusal at ASSEMBLE happens before the single-module +// emit frontier is reached, so a supplied ingest holding one file with tokens left after its module +// body refuses through the real front end (tokenize, parse, normalize over dag_language_model), +// with the grammar's overlap-residue advisory riding in front. The outcome's `reason` must be the +// FATAL -- the last link, parse_g0_tokens_remain -- and the detail must locate it: the compilation +// unit the front end was handed (v2.compiler.program_assembly names the read's compilation_unit as +// the diagnostic file) and the byte extent of the first remaining token. Before this change the `reason` field carried the head, +// which on every such refusal is the same grammar-global advisory, so three different broken +// entries refused with one indistinguishable reason (gunbc#11507 measured it on the built binary). +data cli_probe_entry_source: String = "module v2.cli_probe.entry\n\nimport v2.std.logic { Bool }\n\nfn cli_probe_entry_value(p: Bool) -> Bool { p }\n" + +data cli_probe_trailing_source: String = "module v2.cli_probe.trailing\n\nimport v2.std.logic { Bool }\n\nfn cli_probe_trailing_value(p: Bool) -> Bool { p }\n) ) )\n" + +fn cli_probe_read(source: String, id: Symbol, unit: Symbol, path: String) -> DagSourceReadWitness { + DagSourceReadWitness { + source: Medium { carried: source, fidelity: Lossless }, + artifact: Artifact { kind: SourceFile, id: id, file_path: path }, + compilation_unit: unit, + source_root: DagTree + } +} + +data cli_probe_trailing_ingest: SourceRootIngest = [ + cli_probe_read(source: cli_probe_entry_source, id: ^cli_probe_entry_artifact, unit: ^cli_probe_entry_cu, path: "dag/cli_probe_entry.dag"), + cli_probe_read(source: cli_probe_trailing_source, id: ^cli_probe_trailing_artifact, unit: ^cli_probe_trailing_cu, path: "dag/cli_probe_trailing.dag") +] + +data argv_emit_cli_probe_entry: FreeMonoid = Cons { + head: "emit", + tail: Cons { + head: "--entry", + tail: Cons { + head: "v2.cli_probe.entry", + tail: Cons { head: "--source-root", tail: Cons { head: "dag", tail: Empty } } + } + } +} + +// ONE NULLARY PRODUCER, FORCED ONCE (v2.workflow.floor_pure_producer_share, WARM): the run pays a +// grammar preparation and a two-file front end, which is more than one claim's budget, and both +// claims below inspect one field of its outcome. +fn cli_probe_trailing_outcome() -> CliRunOutcome { + v2_cli_run( + plan: v2_cli_parse(argv: argv_of(items: argv_emit_cli_probe_entry)), + ingest: cli_probe_trailing_ingest + ) +} + +test fn a_trailing_token_refusal_names_the_refusing_link_as_its_reason_holds() -> Bool { + outcome_refusal_reason(outcome: cli_probe_trailing_outcome()) == ^parse_g0_tokens_remain +} + +test fn a_trailing_token_refusal_locates_its_fatal_in_the_file_holds() -> Bool { + match cli_probe_trailing_outcome() { + CliRunRefused { reason: _, detail: detail } => + string_contains(s: detail, pattern: "FATAL AT cli_probe_trailing_cu bytes ") + && string_contains(s: detail, pattern: "parse_g0_tokens_remain @ cli_probe_trailing_cu bytes ") + CliEmitted { text: _, closure_size: _, layer_count: _, ready_size: _ } => false + } +} diff --git a/src/v2/test/claim/infer_self_grounding_wall_test.dag b/src/v2/test/claim/infer_self_grounding_wall_test.dag index 3cb4ce17fdf..2b82be6f2f8 100644 --- a/src/v2/test/claim/infer_self_grounding_wall_test.dag +++ b/src/v2/test/claim/infer_self_grounding_wall_test.dag @@ -44,7 +44,7 @@ import v2.compiler.infer { } import v2.extdeps.languages.dag { dag_int_literal_fixture_one, dag_pick_if_body_fixture } import v2.std.algebra { list_snoc_item } -import v2.std.diagnostic { Accepted, Rejected, Some, None, NonEmptyDiagnostics } +import v2.std.diagnostic { Accepted, Rejected, Some, None, NonEmptyDiagnostics, diagnostics_fatal_reason } import v2.std.optional { Present, Absent } import v2.std.live_tree { LiveTreeDisposition, ReadsLiveTree } import v2.std.node { @@ -198,7 +198,7 @@ fn wall_grounding_for_node_refused(root: Node) -> Bool { Rejected { diagnostics: _ } => false Accepted { value: tree, diagnostics: _ } => match canonical_grounding_for_node(tree: tree, node: root) { - Rejected { diagnostics: r } => r.head.reason == ^infer_grounding_not_derived + Rejected { diagnostics: r } => diagnostics_fatal_reason(d: r) == ^infer_grounding_demanded_not_derived Accepted { value: _, diagnostics: _ } => false } } diff --git a/src/v2/test/claim/manual/ingest_bridge_test.dag b/src/v2/test/claim/manual/ingest_bridge_test.dag index eb344ffcee3..056744c966a 100644 --- a/src/v2/test/claim/manual/ingest_bridge_test.dag +++ b/src/v2/test/claim/manual/ingest_bridge_test.dag @@ -42,7 +42,7 @@ import v2.std.compilers.target_model { TargetModel, target_model_emit_transforms_empty } import v2.std.coercion { Identity } -import v2.std.diagnostic { Accepted, None, Outcome, Rejected, invariant_port_locus } +import v2.std.diagnostic { Accepted, None, Outcome, Rejected, diagnostics_fatal_reason, invariant_port_locus } import v2.std.logic { Bool } import v2.std.node { Conj, @@ -264,7 +264,8 @@ test fn ingest_identity_coercion_refuses_source_absent_from_authored_roster() -> ) ) { Accepted { value: _, diagnostics: _ } => false - Rejected { diagnostics: d } => d.head.reason == ^infer_grounding_not_derived + Rejected { diagnostics: d } => + diagnostics_fatal_reason(d: d) == ^infer_grounding_demanded_not_derived } } } diff --git a/src/v2/test/claim/translate_underived_refusal_test.dag b/src/v2/test/claim/translate_underived_refusal_test.dag index af9449d624a..605e3974366 100644 --- a/src/v2/test/claim/translate_underived_refusal_test.dag +++ b/src/v2/test/claim/translate_underived_refusal_test.dag @@ -45,6 +45,7 @@ import v2.std.diagnostic { Outcome, Rejected, bind_outcome, + diagnostics_fatal_reason, outcome_accepted } import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } @@ -89,8 +90,14 @@ data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly // translate_projection_absent_bodied_arrow_fold_init (review 46681, review 46766). Synthetic // empty-facts trees remain on the named orch-emit frontier until v2-inferred-tree-completeness. +// THE FATAL IS THE GATE'S OWN REASON AND NEVER THE ADVISORY'S. The fatal of a rejection is its last +// diagnostic (v2.std.diagnostic diagnostics_fatal); infer's frontier rows, when a real infer ran +// in front of translate, sit before it spelled infer_grounding_not_derived. A gate that refused +// with the advisory's spelling satisfied the old head-reason check here and left the chain +// unreadable -- so this asserts both halves: the fatal is translate's, and it is not the advisory. fn translate_refused_canonical_grounding(d: NonEmptyDiagnostics) -> Bool { - d.head.reason == ^infer_grounding_not_derived + diagnostics_fatal_reason(d: d) == ^translate_rejected_grounding_not_derived + && diagnostics_fatal_reason(d: d) != ^infer_grounding_not_derived } data translate_underived_value_specimen: Node = Node { diff --git a/src/v2/workflow/compile_door_cause_ownership.dag b/src/v2/workflow/compile_door_cause_ownership.dag index fbeb768ed88..5e34b8a959b 100644 --- a/src/v2/workflow/compile_door_cause_ownership.dag +++ b/src/v2/workflow/compile_door_cause_ownership.dag @@ -173,6 +173,18 @@ data known_frontier_causes: List = [ lane: SharedSelfHostCriticalPath, flip_trigger: "the node grounding frontier (v2.compiler.infer node_grounding_frontier_note) observed at prepare, where the carried diagnostic is fatal rather than eval-gated; flips to Blocking when the count zeroes, which the frontier note's dissolve-on conditions own. Measured 2026-09-10 at fatal grain by the gunbc.witness_v2_native_route census over the lane's source roots dag + src/v2 (2 v2.test.* members, both in v2.test.manual.recompute_trace_probe)" }, + CauseOwnership { + cause: ^infer_grounding_demanded_not_derived, + grain: FatalGrain, + lane: SharedSelfHostCriticalPath, + flip_trigger: "a consumer demanded a canonical grounding (coercion, translate's coerce fold, eval's constraints) of a node the grounding frontier left underived (v2.compiler.infer node_grounding_frontier_note). Until 2026-09-21 this refusal was spelled with the advisory's own symbol, infer_grounding_not_derived; same frontier, split out so a chain can tell the refusing link from the frontier rows in front of it. Flips to Blocking when the count zeroes, which the frontier note's dissolve-on conditions own" + }, + CauseOwnership { + cause: ^translate_rejected_grounding_not_derived, + grain: FatalGrain, + lane: SharedSelfHostCriticalPath, + flip_trigger: "translate's grounding gate refuses a node it must emit whose inferred facts carry no DerivedGrounding -- the node grounding frontier (v2.compiler.infer node_grounding_frontier_note) observed at emission. Until 2026-09-21 this refusal was spelled with the advisory's own symbol, infer_grounding_not_derived, so its population was counted under that row; it is the same frontier at the emit stage, split out so a chain can tell the refusing link from the frontier rows in front of it. Flips to Blocking when the count zeroes, which the frontier note's dissolve-on conditions own" + }, CauseOwnership { cause: ^eval_rejected_grounding_not_derived, grain: FatalGrain, diff --git a/src/v2/workflow/floor_pure_producer_share.dag b/src/v2/workflow/floor_pure_producer_share.dag index 5e076a528b4..cdaf80683c4 100644 --- a/src/v2/workflow/floor_pure_producer_share.dag +++ b/src/v2/workflow/floor_pure_producer_share.dag @@ -572,7 +572,11 @@ import v2.std.collection { List } // NativeLaneModuleResolution arms -- rows, diagnostics, symbols, nodes -- with no resolution // context and no closure, portable for the same reason census_probe_outcomes is. WARM for the // same ceiling arithmetic: the fill is a front end plus four resolves, more than one claim's budget. +// THE CLI TRAILING-TOKEN PROBE ROW: v2.test.cli.v2_native_cli drives v2_cli_run over a two-file +// supplied ingest whose second file refuses at parse; two claims read one field each of the +// CliRunOutcome. Stored value is a refused outcome (a Symbol and a String), portable. data floor_cross_claim_pure_producers_warm: List = [ + "v2.test.cli.v2_native_cli.cli_probe_trailing_outcome", "v2.test.claim.native_route.native_refusal_detail.ndp_resolutions", "v2.test.claim.native_census.whole_tree_census_resolve.census_probe_outcomes", "v2.test.native_decl_selection.collision_resolved",