From aa804788a0fc7c4f5110530e06fa663184efc832 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 04:27:54 +0000 Subject: [PATCH 1/5] WIP: Main compile-clean red: 19 hard diagnostics --- src/v2/compiler/06_translate.dag | 19 ++++--- .../extdeps/languages/rust_test_fixtures.dag | 3 + src/v2/lens/complexity.dag | 55 ++++++++++++++++++- src/v2/lens/enforcement/receipts.dag | 24 ++++++++ 4 files changed, 91 insertions(+), 10 deletions(-) diff --git a/src/v2/compiler/06_translate.dag b/src/v2/compiler/06_translate.dag index 3444a8a4252..001fd1e6f55 100644 --- a/src/v2/compiler/06_translate.dag +++ b/src/v2/compiler/06_translate.dag @@ -206,6 +206,7 @@ import v2.std.optional { optional_present } import std.algebra { Cons, Empty } +import std.types { Unit } import v2.std.algebra { TailAbsent, TailFound, fold_list, fold_list_node, is_empty, length, list_append, list_snoc_item, list_tail, zip_eq } import v2.std.logic { Bool } import v2.std.text { String } @@ -277,20 +278,20 @@ type TokenSequenceItemKind data translate_grounding_gate_absent_facts_note: String = "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 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 no infer judgment exists — not an underived one recorded and erased (review 47246). Production paths (`cross_language_compile`, canonical infer→emit) pass infer's facts map facts-flow-forward. Eval refuses lookup miss because eval never runs on synthetic trees; translate is also consumed by emit, so absence is a named compatibility frontier until v2-inferred-tree-completeness splits the carrier. translate() opens with translate_grounding_derived_gate_subtree so mixed derived-root/underived-child trees cannot bypass fold attach or bodied-arrow shortcuts. translate_grounding_derived_gate_at_producer is the producer-entry call site for that same gate. translate_derived_parent_underived_child_gate refuses a recorded underived child under a derived parent during fold; translate_grounding_derived_gate_subtree covers bodied-arrow and import-carrier shortcuts that preserve producer IR without fold_node (review 46681). TranslateFoldAcc retains the source parent/child nodes because fold init rebuilds with empty children and facts.lookup keys on structural node equality." -fn translate_grounding_derived_gate(tree: InferredTree, node: Node) -> Outcome { +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(Empty) + Accepted { value: _, diagnostics: _ } => outcome_accepted(Unit) Rejected { diagnostics: r } => Rejected { diagnostics: r } } DerivedGrounding { grounding: _ } => - outcome_accepted(Empty) + outcome_accepted(Unit) } Violates { diagnostic: _ } => - outcome_accepted(Empty) + outcome_accepted(Unit) } } @@ -298,13 +299,13 @@ fn translate_derived_parent_underived_child_gate( tree: InferredTree, parent: Node, child: Node -) -> Outcome { +) -> Outcome { match inferred_facts_witness_for_node(tree: tree, node: parent) { Holds { value: parent_facts } => if inferred_facts_grounding_derived(facts: parent_facts) { translate_grounding_derived_gate(tree: tree, node: child) } else { - outcome_accepted(Empty) + outcome_accepted(Unit) } Violates { diagnostic: _ } => translate_grounding_derived_gate(tree: tree, node: child) @@ -314,10 +315,10 @@ fn translate_derived_parent_underived_child_gate( fn translate_grounding_derived_gate_subtree( tree: InferredTree, root: Node -) -> Outcome { +) -> Outcome { fold_list( xs: node_subtree_nodes(root: root), - empty: outcome_accepted(Empty), + empty: outcome_accepted(Unit), cons: fn(acc, n) { bind_outcome( o: acc, @@ -368,7 +369,7 @@ fn translate_import_shortcut_after_subtree_gate( fn translate_grounding_derived_gate_at_producer( tree: InferredTree, node: Node -) -> Outcome { +) -> Outcome { translate_grounding_derived_gate(tree: tree, node: node) } diff --git a/src/v2/extdeps/languages/rust_test_fixtures.dag b/src/v2/extdeps/languages/rust_test_fixtures.dag index 7f41160c210..eaef2bf2479 100644 --- a/src/v2/extdeps/languages/rust_test_fixtures.dag +++ b/src/v2/extdeps/languages/rust_test_fixtures.dag @@ -1,5 +1,8 @@ module v2.extdeps.languages.rust_test +import std.algebra { Cons, Empty } +import v2.std.algebra { fold, list_snoc_item } + import v2.extdeps.languages.rust { rust_add_declared_inhabitants_root, rust_binding_spellings, diff --git a/src/v2/lens/complexity.dag b/src/v2/lens/complexity.dag index a1c8d7bb88c..cc46b98d79e 100644 --- a/src/v2/lens/complexity.dag +++ b/src/v2/lens/complexity.dag @@ -1,5 +1,58 @@ module v2.lens.complexity - +import v2.lens.common.construction_justification { ConstructionJustification, RatchetForever } + +import v2.lens.cost { + AsymptoticClass, + ClassConstant, + ClassExponential, + ClassFactorial, + ClassLinearithmic, + ClassLinear, + ClassLog, + ClassPolyLog, + ClassPolynomial, + ClassUnknown, + ConstantCost, + ExponentialCost, + FactorialCost, + LinearCost, + LogCost, + PolynomialCost, + PolyLogCost, + ProductCost, + SumCost, + UnknownCost, + PolyLogExponent, + PolynomialDegree, + SymbolicCost, + SizeVariable, + asymptotic_class_dominates, + asymptotic_class_of_cost, + cost_lens +} +import std.algebra { Empty } +import v2.std.collection { List } +import v2.std.diagnostic { + Accepted, + AmbiguousIntent, + Diagnostic, + Locus, + Rejected, + Textual, + WholeFile, + Unavailable +} +import v2.std.node { Node, Symbol } +import v2.std.refinement { + Refined, + VacuousValidation, + vacuous_admits_marker, + Validation, + refine, + refined_base, + refined_vacuous_stub_pack +} +import v2.std.witness { Holds, Violates, Witness } fn complexity_variables_admits(xs: List) -> Bool { true diff --git a/src/v2/lens/enforcement/receipts.dag b/src/v2/lens/enforcement/receipts.dag index a3668f892b8..adfe55da041 100644 --- a/src/v2/lens/enforcement/receipts.dag +++ b/src/v2/lens/enforcement/receipts.dag @@ -1,5 +1,29 @@ module v2.lens.enforcement.receipts +import std.algebra { Cons, Empty } +import v2.std.algebra { any, contains, fold } +import v2.std.collection { List } +import v2.std.integer { Int } +import v2.std.logic { Bool } +import v2.std.text { String } +import v2.std.node { Atom, ComputationNode, Edge, Loop, Named, Node, Positional, SyntheticOccurrence, TypeNode } +import v2.std.witness { Holds, Violates, Witness } +import v2.std.decl_index { DeclFact, decl_facts_is_fn_like } +import v2.std.qualified_name { QualifiedName, qualified_name_from_dotted_string } +import v2.lens.cost { SymbolicCost, cost_lens } +import v2.lens.enforcement.vocab { + SubjectRoster, ScopeRoster, scope_roster_covers, + ConsumerKind, EnrolledInFloorRoster, PrePushHook, WitnessOnly, NoConsumer, + ConsumerWitnessBinding, BoundConsumerWitness, NoConsumerWitness, + ScopeSatisfaction, ScopeCovers, ScopeNarrowed, ScopeMissing, + NarrowingReason, TypeReflectionUnavailable, + RedControlStatus, RedControlPassed, RedControlAbsent, RedControlFailedToFlip, + SelfApplicationStatus, LensModuleFunctionObserved, SelfApplicationAbsent, + ReceiptRef, HasReceiptRef, NoReceiptRef, + consumer_kind_eq +} +import v2.lens.enforcement.contract { LensContract, EnrollmentDiscoveryReceipt, Cost, lens_id_v0_eq } +import std.realization_schedule { ScheduleWitnessEntry, schedule_witness_entry_eq } type SubjectJudgment = BodyJudged { verdict: Witness } From c8407c717b584ad4c7c76506fcbd89403dd25ea2 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 04:47:39 +0000 Subject: [PATCH 2/5] Fix remaining compile-clean reds: imports, Unit gate, annotation grain. Restore namespace-stripped imports in complexity and receipts, bind Empty explicitly in rust_test_fixtures, use Outcome for translate grounding gates, and hoist the drift-test witness comment to module-item grain. Co-authored-by: Cursor --- src/v2/extdeps/languages/rust_test_fixtures.dag | 1 - src/v2/lens/enforcement/receipts.dag | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/v2/extdeps/languages/rust_test_fixtures.dag b/src/v2/extdeps/languages/rust_test_fixtures.dag index eaef2bf2479..fc78dd79529 100644 --- a/src/v2/extdeps/languages/rust_test_fixtures.dag +++ b/src/v2/extdeps/languages/rust_test_fixtures.dag @@ -1,7 +1,6 @@ module v2.extdeps.languages.rust_test import std.algebra { Cons, Empty } -import v2.std.algebra { fold, list_snoc_item } import v2.extdeps.languages.rust { rust_add_declared_inhabitants_root, diff --git a/src/v2/lens/enforcement/receipts.dag b/src/v2/lens/enforcement/receipts.dag index adfe55da041..f02f76efe6f 100644 --- a/src/v2/lens/enforcement/receipts.dag +++ b/src/v2/lens/enforcement/receipts.dag @@ -1,7 +1,7 @@ module v2.lens.enforcement.receipts import std.algebra { Cons, Empty } -import v2.std.algebra { any, contains, fold } +import v2.std.algebra { any, contains } import v2.std.collection { List } import v2.std.integer { Int } import v2.std.logic { Bool } From a7b4019ac4479a8951197b826aaa06806bdd782f Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 05:56:13 +0000 Subject: [PATCH 3/5] Fix translate grounding gates: use Outcome not Unit. std.types.Unit typechecks but has no runtime value; heal's generated_artifact_gate eval failed with undefined variable: Unit. Use outcome_accepted(true), matching target_model wire-schema gates. Co-authored-by: Cursor --- src/v2/compiler/06_translate.dag | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/v2/compiler/06_translate.dag b/src/v2/compiler/06_translate.dag index 001fd1e6f55..0cf4ca014a0 100644 --- a/src/v2/compiler/06_translate.dag +++ b/src/v2/compiler/06_translate.dag @@ -206,7 +206,6 @@ import v2.std.optional { optional_present } import std.algebra { Cons, Empty } -import std.types { Unit } import v2.std.algebra { TailAbsent, TailFound, fold_list, fold_list_node, is_empty, length, list_append, list_snoc_item, list_tail, zip_eq } import v2.std.logic { Bool } import v2.std.text { String } @@ -278,20 +277,20 @@ type TokenSequenceItemKind data translate_grounding_gate_absent_facts_note: String = "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 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 no infer judgment exists — not an underived one recorded and erased (review 47246). Production paths (`cross_language_compile`, canonical infer→emit) pass infer's facts map facts-flow-forward. Eval refuses lookup miss because eval never runs on synthetic trees; translate is also consumed by emit, so absence is a named compatibility frontier until v2-inferred-tree-completeness splits the carrier. translate() opens with translate_grounding_derived_gate_subtree so mixed derived-root/underived-child trees cannot bypass fold attach or bodied-arrow shortcuts. translate_grounding_derived_gate_at_producer is the producer-entry call site for that same gate. translate_derived_parent_underived_child_gate refuses a recorded underived child under a derived parent during fold; translate_grounding_derived_gate_subtree covers bodied-arrow and import-carrier shortcuts that preserve producer IR without fold_node (review 46681). TranslateFoldAcc retains the source parent/child nodes because fold init rebuilds with empty children and facts.lookup keys on structural node equality." -fn translate_grounding_derived_gate(tree: InferredTree, node: Node) -> Outcome { +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(Unit) + Accepted { value: _, diagnostics: _ } => outcome_accepted(true) Rejected { diagnostics: r } => Rejected { diagnostics: r } } DerivedGrounding { grounding: _ } => - outcome_accepted(Unit) + outcome_accepted(true) } Violates { diagnostic: _ } => - outcome_accepted(Unit) + outcome_accepted(true) } } @@ -299,13 +298,13 @@ fn translate_derived_parent_underived_child_gate( tree: InferredTree, parent: Node, child: Node -) -> Outcome { +) -> Outcome { match inferred_facts_witness_for_node(tree: tree, node: parent) { Holds { value: parent_facts } => if inferred_facts_grounding_derived(facts: parent_facts) { translate_grounding_derived_gate(tree: tree, node: child) } else { - outcome_accepted(Unit) + outcome_accepted(true) } Violates { diagnostic: _ } => translate_grounding_derived_gate(tree: tree, node: child) @@ -315,10 +314,10 @@ fn translate_derived_parent_underived_child_gate( fn translate_grounding_derived_gate_subtree( tree: InferredTree, root: Node -) -> Outcome { +) -> Outcome { fold_list( xs: node_subtree_nodes(root: root), - empty: outcome_accepted(Unit), + empty: outcome_accepted(true), cons: fn(acc, n) { bind_outcome( o: acc, @@ -369,7 +368,7 @@ fn translate_import_shortcut_after_subtree_gate( fn translate_grounding_derived_gate_at_producer( tree: InferredTree, node: Node -) -> Outcome { +) -> Outcome { translate_grounding_derived_gate(tree: tree, node: node) } From b3a939217d13de87cd327c326aa2daf686b7fdf1 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 17:15:02 +0000 Subject: [PATCH 4/5] Document why grounding gates return Outcome not Empty. Co-authored-by: Cursor --- src/v2/compiler/06_translate.dag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/compiler/06_translate.dag b/src/v2/compiler/06_translate.dag index 0cf4ca014a0..a7e72e9ed84 100644 --- a/src/v2/compiler/06_translate.dag +++ b/src/v2/compiler/06_translate.dag @@ -275,7 +275,7 @@ type TokenSequenceItemKind = TokenSequenceConcreteToken | TokenSequenceNonterminal -data translate_grounding_gate_absent_facts_note: String = "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 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 no infer judgment exists — not an underived one recorded and erased (review 47246). Production paths (`cross_language_compile`, canonical infer→emit) pass infer's facts map facts-flow-forward. Eval refuses lookup miss because eval never runs on synthetic trees; translate is also consumed by emit, so absence is a named compatibility frontier until v2-inferred-tree-completeness splits the carrier. translate() opens with translate_grounding_derived_gate_subtree so mixed derived-root/underived-child trees cannot bypass fold attach or bodied-arrow shortcuts. translate_grounding_derived_gate_at_producer is the producer-entry call site for that same gate. translate_derived_parent_underived_child_gate refuses a recorded underived child under a derived parent during fold; translate_grounding_derived_gate_subtree covers bodied-arrow and import-carrier shortcuts that preserve producer IR without fold_node (review 46681). TranslateFoldAcc retains the source parent/child nodes because fold init rebuilds with empty children and facts.lookup keys on structural node equality." +data translate_grounding_gate_absent_facts_note: String = "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 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 no infer judgment exists — not an underived one recorded and erased (review 47246). Production paths (`cross_language_compile`, canonical infer→emit) pass infer's facts map facts-flow-forward. Eval refuses lookup miss because eval never runs on synthetic trees; translate is also consumed by emit, so absence is a named compatibility frontier until v2-inferred-tree-completeness splits the carrier. translate() opens with translate_grounding_derived_gate_subtree so mixed derived-root/underived-child trees cannot bypass fold attach or bodied-arrow shortcuts. translate_grounding_derived_gate_at_producer is the producer-entry call site for that same gate. translate_derived_parent_underived_child_gate refuses a recorded underived child under a derived parent during fold; translate_grounding_derived_gate_subtree covers bodied-arrow and import-carrier shortcuts that preserve producer IR without fold_node (review 46681). TranslateFoldAcc retains the source parent/child nodes because fold init rebuilds with empty children and facts.lookup keys on structural node equality. The four translate_grounding_*_gate* fns return Outcome (not Outcome): Empty is a FreeMonoid variant, not a unit type, so Outcome is an unresolved compile error and Outcome eval-fails at heal; callers bind with bind_outcome(fn(_) => ...) and never read the payload — accept arms always pass outcome_accepted(true), and the signal is Accepted vs Rejected disposition only." fn translate_grounding_derived_gate(tree: InferredTree, node: Node) -> Outcome { match inferred_facts_witness_for_node(tree: tree, node: node) { From 8d1c9501d7eb89dc815cd8ea5e6cce818514ef89 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Thu, 6 Aug 2026 17:42:58 +0000 Subject: [PATCH 5/5] Use GroundingGatePassed carrier for translate grounding gates. Replace Outcome with Outcome per operator ruling: Bool admits a meaningful false the gate never produces. Record Co-authored-by: Cursor #6848 import-strip specimens for the namespace lane in module_graph. --- src/v2/compiler/06_translate.dag | 22 ++++++++++++---------- src/v2/lens/module_graph.dag | 2 ++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/v2/compiler/06_translate.dag b/src/v2/compiler/06_translate.dag index a7e72e9ed84..e4808a5daf3 100644 --- a/src/v2/compiler/06_translate.dag +++ b/src/v2/compiler/06_translate.dag @@ -275,22 +275,24 @@ type TokenSequenceItemKind = TokenSequenceConcreteToken | TokenSequenceNonterminal -data translate_grounding_gate_absent_facts_note: String = "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 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 no infer judgment exists — not an underived one recorded and erased (review 47246). Production paths (`cross_language_compile`, canonical infer→emit) pass infer's facts map facts-flow-forward. Eval refuses lookup miss because eval never runs on synthetic trees; translate is also consumed by emit, so absence is a named compatibility frontier until v2-inferred-tree-completeness splits the carrier. translate() opens with translate_grounding_derived_gate_subtree so mixed derived-root/underived-child trees cannot bypass fold attach or bodied-arrow shortcuts. translate_grounding_derived_gate_at_producer is the producer-entry call site for that same gate. translate_derived_parent_underived_child_gate refuses a recorded underived child under a derived parent during fold; translate_grounding_derived_gate_subtree covers bodied-arrow and import-carrier shortcuts that preserve producer IR without fold_node (review 46681). TranslateFoldAcc retains the source parent/child nodes because fold init rebuilds with empty children and facts.lookup keys on structural node equality. The four translate_grounding_*_gate* fns return Outcome (not Outcome): Empty is a FreeMonoid variant, not a unit type, so Outcome is an unresolved compile error and Outcome eval-fails at heal; callers bind with bind_outcome(fn(_) => ...) and never read the payload — accept arms always pass outcome_accepted(true), and the signal is Accepted vs Rejected disposition only." +type GroundingGatePassed {} -fn translate_grounding_derived_gate(tree: InferredTree, node: Node) -> Outcome { +data translate_grounding_gate_absent_facts_note: String = "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 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 no infer judgment exists — not an underived one recorded and erased (review 47246). Production paths (`cross_language_compile`, canonical infer→emit) pass infer's facts map facts-flow-forward. Eval refuses lookup miss because eval never runs on synthetic trees; translate is also consumed by emit, so absence is a named compatibility frontier until v2-inferred-tree-completeness splits the carrier. translate() opens with translate_grounding_derived_gate_subtree so mixed derived-root/underived-child trees cannot bypass fold attach or bodied-arrow shortcuts. translate_grounding_derived_gate_at_producer is the producer-entry call site for that same gate. translate_derived_parent_underived_child_gate refuses a recorded underived child under a derived parent during fold; translate_grounding_derived_gate_subtree covers bodied-arrow and import-carrier shortcuts that preserve producer IR without fold_node (review 46681). TranslateFoldAcc retains the source parent/child nodes because fold init rebuilds with empty children and facts.lookup keys on structural node equality. The four translate_grounding_*_gate* fns return Outcome: a zero-information accept carrier (same wire-schema gate pattern as target_model.dag CtorTemplateUnit), not Outcome — Bool would admit a meaningful false the gate never produces. Empty is a FreeMonoid variant, not a unit type, so Outcome is an unresolved compile error. Callers bind with bind_outcome(fn(_) => ...) and never read the payload; the signal is Accepted vs Rejected disposition only." + +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(true) + Accepted { value: _, diagnostics: _ } => outcome_accepted(GroundingGatePassed {}) Rejected { diagnostics: r } => Rejected { diagnostics: r } } DerivedGrounding { grounding: _ } => - outcome_accepted(true) + outcome_accepted(GroundingGatePassed {}) } Violates { diagnostic: _ } => - outcome_accepted(true) + outcome_accepted(GroundingGatePassed {}) } } @@ -298,13 +300,13 @@ fn translate_derived_parent_underived_child_gate( tree: InferredTree, parent: Node, child: Node -) -> Outcome { +) -> Outcome { match inferred_facts_witness_for_node(tree: tree, node: parent) { Holds { value: parent_facts } => if inferred_facts_grounding_derived(facts: parent_facts) { translate_grounding_derived_gate(tree: tree, node: child) } else { - outcome_accepted(true) + outcome_accepted(GroundingGatePassed {}) } Violates { diagnostic: _ } => translate_grounding_derived_gate(tree: tree, node: child) @@ -314,10 +316,10 @@ fn translate_derived_parent_underived_child_gate( fn translate_grounding_derived_gate_subtree( tree: InferredTree, root: Node -) -> Outcome { +) -> Outcome { fold_list( xs: node_subtree_nodes(root: root), - empty: outcome_accepted(true), + empty: outcome_accepted(GroundingGatePassed {}), cons: fn(acc, n) { bind_outcome( o: acc, @@ -368,7 +370,7 @@ fn translate_import_shortcut_after_subtree_gate( fn translate_grounding_derived_gate_at_producer( tree: InferredTree, node: Node -) -> Outcome { +) -> Outcome { translate_grounding_derived_gate(tree: tree, node: node) } diff --git a/src/v2/lens/module_graph.dag b/src/v2/lens/module_graph.dag index 933825d167a..4758eca9f87 100644 --- a/src/v2/lens/module_graph.dag +++ b/src/v2/lens/module_graph.dag @@ -43,6 +43,8 @@ type ModuleDependencyEdge { data dependency_edge_source_migration_note: String = "EDGE SOURCE, isolated as the single swappable fact producer (operator constraint, 2026-07-10, on the entry_file_touched reground): today dependency_resolution_facts_live unions import_resolution_facts_live with strict-tier reference_resolution_facts_live (host twin selection_adjacency in cli_run.rs). The namespace-only resolution thread (operator-signed 2026-07-06) deletes the import grammar at its terminal step and derives dependencies from container.member references instead — when that lands, dependency_resolution_facts_live swaps to reference_derived_resolution_facts_flagged_pending_reference_producer and nothing above it changes: dependency_closure, import_closure, touched_path_in_closure, entry_affected_by_touched_paths, and every consumer of the closure query are edge-source-agnostic by construction (they read ModuleDependencyEdge rows as data, never import syntax). Do not add a second edge producer beside dependency_resolution_facts_live; the swap replaces its body." +data namespace_wave_import_strip_specimens_note: String = "Namespace-lane handoff specimens from gunbc#7908 (operator ruling 2026-08-06, msg_8e1c9e9d): three closure-binding failures from #6848 import stripping that whole-tree compile-clean repaired with explicit imports — NOT held for namespace-derived closure; main needed exact imports today, namespace program owns making this class unwritable later. (1) v2.lens.complexity: direct imports from v2.lens.cost stripped (PolynomialDegree, PolyLogExponent, SizeVariable, SymbolicCost, asymptotic_class_*); module referenced cost symbols with zero import lines. (2) v2.lens.enforcement.receipts: direct imports stripped from v2.lens.cost and v2.lens.enforcement.vocab (SymbolicCost, EnrolledInFloorRoster, EnrollmentDiscoveryReceipt, LensModuleFunctionObserved, etc.). (3) v2.extdeps.languages.rust_test_fixtures: missing std.algebra { Cons, Empty } bindings (#7772 partial un-strip; see rust_test_fixtures_rust_import_unstrip_note). Dissolve-on: bare-reference closure binding is construction-backed repo-wide so stripped modules cannot compile only by pool-membership coincidence." + data reference_derived_edge_source_disposition: Disposition = Scaffold { dissolves_to: SingleAuthority, bind: DeclarationRef {