From 31de7a3e89bcada788976e577bec24ef46dcb47c Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 14 Jul 2026 15:16:22 +0000 Subject: [PATCH 1/2] WIP: affected sest falsifier --- .../stage0/src/bin/complexity_linearity_audit.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/v1/stage0/src/bin/complexity_linearity_audit.rs b/src/v1/stage0/src/bin/complexity_linearity_audit.rs index 740d7d7d582..2ef35f375f6 100644 --- a/src/v1/stage0/src/bin/complexity_linearity_audit.rs +++ b/src/v1/stage0/src/bin/complexity_linearity_audit.rs @@ -15,8 +15,9 @@ use std::process::ExitCode; use v1_compiler::cli_run::{ complexity_linearity_audit_corpus_default_roots, complexity_linearity_audit_corpus_parse_only, - complexity_linearity_wildcard_facts, non_fold_residue_count, non_fold_residue_unrostered_count, - ComplexityLinearityAuditSummary, + complexity_linearity_wildcard_facts, non_fold_residue_count, non_fold_residue_live_sites, + non_fold_residue_site_is_rostered, non_fold_residue_stale_roster_count, + non_fold_residue_unrostered_count, ComplexityLinearityAuditSummary, }; fn require_value(args: &[String], idx: usize, flag: &str) -> Result { @@ -91,6 +92,16 @@ fn print_summary( on_roster, wildcard_facts.len() - on_roster, ); + eprintln!( + "complexity_linearity_audit: nfr resolved sites unrostered_count={} stale_roster_count={}", + non_fold_residue_unrostered_count(), + non_fold_residue_stale_roster_count() + ); + for site in non_fold_residue_live_sites() { + if !non_fold_residue_site_is_rostered(site) { + eprintln!("nfr-unrostered\t{site}"); + } + } let cost_findings = summary.findings.iter().filter(|f| f.lens == "cost").count(); eprintln!( "complexity_linearity_audit: cost syntactic proxy (Node.body walk) — \ From 53f12ff3b99ee610ed8ab6dcaac61dc67d68c44d Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Tue, 14 Jul 2026 15:20:45 +0000 Subject: [PATCH 2/2] Affected-set falsifier burn-down: link orphan doc + backfill 3 nfr sites MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The nightly affected-set-falsifier's whole-corpus cold sweep (gunbc_falsifier_batches, SelectionPredictOnly) surfaced 4 red live-tree witnesses = 2 real drift debts of the documented masking class (PRs landed changes the per-PR affected-set selection did not run these live-tree witnesses for, so the red surfaced on the next cold sweep, not the landing PR — 4th instance, siblings to #6530/#6533): 1. doc_graph_has_no_orphan_docs (x2): docs/plans/live-read-witness-classification-design.md (added #6560/#6582) was referenced only in prose data:String notes, never a doc-graph edge. Fix: add a `bind:` provenance row in the owning lens file (the established convention, cf. commit_workflow_plan_doc_provenance) -> doc-graph root, orphans 1->0. 2. non_fold_residue_clean_holds (x2): resolved report = 3 unrostered, 0 stale. Backfill NON_FOLD_RESIDUE_ROSTER with the 3 sites (dated comment + per-site dissolution triggers): orch_emit_let_step (#6573; dissolves with the backward grammar-row emit fold), live_read_carrier_eq / path_pattern_eq (#6582; structural-equality nests, dissolve with derived == from inhabitance) — all matching existing roster precedent. Verified green-by-execution: all 4 previously-red witnesses (+6 siblings) PASS via claim_batch on a fresh v1-compiler build. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../stage0/src/bin/complexity_linearity_audit.rs | 15 ++------------- src/v1/stage0/src/cli_run.rs | 15 +++++++++++++++ src/v2/lens/live_read_classification.dag | 2 ++ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/v1/stage0/src/bin/complexity_linearity_audit.rs b/src/v1/stage0/src/bin/complexity_linearity_audit.rs index 2ef35f375f6..740d7d7d582 100644 --- a/src/v1/stage0/src/bin/complexity_linearity_audit.rs +++ b/src/v1/stage0/src/bin/complexity_linearity_audit.rs @@ -15,9 +15,8 @@ use std::process::ExitCode; use v1_compiler::cli_run::{ complexity_linearity_audit_corpus_default_roots, complexity_linearity_audit_corpus_parse_only, - complexity_linearity_wildcard_facts, non_fold_residue_count, non_fold_residue_live_sites, - non_fold_residue_site_is_rostered, non_fold_residue_stale_roster_count, - non_fold_residue_unrostered_count, ComplexityLinearityAuditSummary, + complexity_linearity_wildcard_facts, non_fold_residue_count, non_fold_residue_unrostered_count, + ComplexityLinearityAuditSummary, }; fn require_value(args: &[String], idx: usize, flag: &str) -> Result { @@ -92,16 +91,6 @@ fn print_summary( on_roster, wildcard_facts.len() - on_roster, ); - eprintln!( - "complexity_linearity_audit: nfr resolved sites unrostered_count={} stale_roster_count={}", - non_fold_residue_unrostered_count(), - non_fold_residue_stale_roster_count() - ); - for site in non_fold_residue_live_sites() { - if !non_fold_residue_site_is_rostered(site) { - eprintln!("nfr-unrostered\t{site}"); - } - } let cost_findings = summary.findings.iter().filter(|f| f.lens == "cost").count(); eprintln!( "complexity_linearity_audit: cost syntactic proxy (Node.body walk) — \ diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index 995d1becec3..14dbeb39e1c 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -12397,6 +12397,21 @@ const NON_FOLD_RESIDUE_ROSTER: &[&str] = &[ "src/v2/std/node_minimal.dag::node_superset_field_eq", "src/v2/std/probe_selector.dag::diagnostic_interface_kind_eq", "src/v2/std/qualified_name.dag::qn_fold_step", + // 2026-07-14 backfill (fourth instance of the masking class, siblings to the #6533/#6530 + // receipts above): the nightly affected-set falsifier's whole-corpus cold sweep surfaced 3 + // unrostered sites the per-PR affected-set selection did not run the nfr witness for at + // landing time. `orch_emit_let_step` landed with #6573 (Shell→dag P2b), the two live-read + // eq fns with #6582 (live-read classification P1) — the same PR that landed the orphan doc + // this sweep also caught. Declared here so the ratchet re-arms; each burns down with its + // owning file's fold migration. + // - orch_emit_let_step: special-case `ExprCmdSubst` + general `Expr` dispatch via + // orch_emit_expr_spelling; dissolves when emit is the backward grammar-row fold (§4). + // - live_read_carrier_eq / path_pattern_eq: nested structural `==` (`_ => false` on the + // off-variant arm), the same shape as the std `*_eq` rows above; dissolves with derived + // equality from inhabitance (the cross-representation `==` grounding, DESIGN §3/§4). + "src/v2/compiler/05_emit_orchestration.dag::orch_emit_let_step", + "src/v2/lens/live_read_classification.dag::live_read_carrier_eq", + "src/v2/lens/live_read_classification.dag::path_pattern_eq", ]; fn nfr_strip_comments(content: &str) -> String { diff --git a/src/v2/lens/live_read_classification.dag b/src/v2/lens/live_read_classification.dag index 153724385d8..88e5e0d30c2 100644 --- a/src/v2/lens/live_read_classification.dag +++ b/src/v2/lens/live_read_classification.dag @@ -63,6 +63,8 @@ import v2.std.text { String } data live_read_classification_law: String = "G2 (call-reachability) live-read classification per docs/plans/live-read-witness-classification-design.md P1: proven runtime-read closure = import-closure modules intersecting carrier homes PLUS call-reachable fn bodies from the witness entry module over fn-arrow DependencyView facts. Carrier invocations (filesystem_read, module_declaration_facts, decl_facts) are located in reachable skeletons; path patterns are LiteralPath when a string literal atom is statable, ParamRef when the filesystem_read path argument is a parameter reference, UnknownPath fail-closed otherwise." +data live_read_classification_plan_doc_provenance: String = "bind: docs/plans/live-read-witness-classification-design.md" + data construction_justification: ConstructionJustification = ConstructionJustification { class: WallAfterGrounding { dissolves_to: SingleAuthority } }