diff --git a/dag/gunbc/doc_graph_roots.dag b/dag/gunbc/doc_graph_roots.dag index 96a0c91fcba..8748591c604 100644 --- a/dag/gunbc/doc_graph_roots.dag +++ b/dag/gunbc/doc_graph_roots.dag @@ -402,7 +402,7 @@ data hand_authored_doc_bind_incomings: List = [ slug: "c-linkage-unit-realization-design", primary_work: DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "CompilationUnit", field: WholeDeclaration }, additional_works: [ - DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "partition_fold", field: WholeDeclaration }, + DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "partition_fold_outcome", field: WholeDeclaration }, DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "CompilationUnitId", field: WholeDeclaration }, ], dissolution: PlanRetiresWhen { condition: unbound_dissolution(description: "the work this document plans lands and its subject CompilationUnit describes shipped behavior rather than a planned change; the row deletes with the document. Registered at subject grain: the systems bound here are the ones whose movement would make this document's purpose false, not every system its prose mentions.") }, @@ -556,7 +556,7 @@ data hand_authored_doc_bind_incomings: List = [ slug: "emitted-crate-partition-design", primary_work: DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "CompilationUnit", field: WholeDeclaration }, additional_works: [ - DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "partition_fold", field: WholeDeclaration }, + DeclarationRef { module_path: "v2.std.compilers.compilation_unit", decl_name: "partition_fold_outcome", field: WholeDeclaration }, DeclarationRef { module_path: "v2.workflow.rust_crate_partition", decl_name: "PartitionPolicy", field: WholeDeclaration }, ], dissolution: PlanRetiresWhen { condition: unbound_dissolution(description: "the work this document plans lands and its subject CompilationUnit describes shipped behavior rather than a planned change; the row deletes with the document. Registered at subject grain: the systems bound here are the ones whose movement would make this document's purpose false, not every system its prose mentions.") }, diff --git a/dag/gunbc/witness/witness_row_cost_basis.tsv b/dag/gunbc/witness/witness_row_cost_basis.tsv index e7d745ed754..d170883e276 100644 --- a/dag/gunbc/witness/witness_row_cost_basis.tsv +++ b/dag/gunbc/witness/witness_row_cost_basis.tsv @@ -650,7 +650,7 @@ src/v2/test/claim/bash_program_fold_test.dag bash_program_serialize_redir_matche src/v2/test/claim/bash_program_fold_test.dag bash_program_varref_vs_lit_quoting_matches_golden_holds 17 30550328673 srv_fleet_arm64 wall src/v2/test/claim/build_artifact_verification_witness_test.dag witness_existence_check_no_mtime 184 30550328673 srv_fleet_arm64 wall src/v2/test/claim/build_transport_admission_witness_test.dag build_transport_admits_dotdot_substring 1 30550328673 srv_fleet_arm64 wall -src/v2/test/claim/c_compilation_unit_witness_test.dag witness_partition_fold_compat_wrapper_not_receipt_path 6 30550328673 srv_fleet_arm64 wall +src/v2/test/claim/c_compilation_unit_witness_test.dag witness_partition_fold_outcome_yields_both_units 6 30550328673 srv_fleet_arm64 wall src/v2/test/claim/c_compilation_unit_witness_test.dag witness_r4_accepts_link_cyclic_unit_graph 4 30550328673 srv_fleet_arm64 wall src/v2/test/claim/c_compilation_unit_witness_test.dag witness_r4_accepts_module_scc_split_across_units 1 30550328673 srv_fleet_arm64 wall src/v2/test/claim/c_compilation_unit_witness_test.dag witness_r4_accepts_pointer_type_cycle_across_units 1 30550328673 srv_fleet_arm64 wall diff --git a/src/v2/extdeps/languages/c.dag b/src/v2/extdeps/languages/c.dag index e5cb7f0070f..297326c1969 100644 --- a/src/v2/extdeps/languages/c.dag +++ b/src/v2/extdeps/languages/c.dag @@ -122,16 +122,21 @@ import v2.std.compilers.compilation_unit { ModuleDag, ModuleId, ModuleTypeDefinitionRow, + MembersResolve, + MembersResolveOk, + MembersResolveRefused, PartitionFoldOk, PartitionFoldOutcome, PartitionFoldRefused, + PartitionInputRejected, PartitionR4Refused, PartitionR4Valid, PartitionR4ValidityVerdict, - module_type_definition_rows, + ResolvedModuleInterface, module_unit_id, partition_fold_outcome, partition_unit_by_id, + resolve_member_interfaces, type_definition_row_identity } import v2.std.logic { Bool } @@ -148,8 +153,9 @@ import v2.std.node { } // C R3: CompilationUnit.interface renders to the unit .h (declarations only); -// CompilationUnit.members renders to the unit .c (implementation). partition_fold is the sole -// producer of interface/deps; this module only spells linkage paths and cross-unit #include lines. +// CompilationUnit.members renders to the unit .c (implementation). partition_fold_outcome is the +// sole producer of interface/deps; this module only spells linkage paths and cross-unit #include +// lines. // C R4: permissive on module-SCC split across TUs, UnitGraphCycle, and LinkageCycle — // mutually-recursive modules may live in different units; each .c #includes peer headers and links @@ -161,10 +167,10 @@ data c_by_value_type_cycle_detail: String = "incomplete by-value type containmen data c_by_value_type_ambiguous_identity_detail: String = "ambiguous type identity across modules for by-value R4 lookup" -// C callers requiring receipt-bearing partition results MUST use c_partition_fold_outcome (routes -// partition_fold_outcome from home). Never treat partition_fold() -> [] as a refusal signal — that -// compat wrapper collapses PartitionFoldRefused to [] (§5 absorbing-fallback). Returns -// PartitionFoldOutcome directly — no parallel C-local coproduct. +// C partition results route through c_partition_fold_outcome (partition_fold_outcome from home), +// which returns PartitionFoldOutcome directly — no parallel C-local coproduct. The List-returning +// compat wrapper that collapsed PartitionFoldRefused to [] no longer exists at the home, so there +// is no non-receipt route left to reach for. fn c_partition_fold_outcome( module_dag: ModuleDag, @@ -452,15 +458,25 @@ fn c_type_definition_body(row: ModuleTypeDefinitionRow) -> Node { row.definition } -fn c_all_type_owners(module_dag: ModuleDag) -> List { - module_dag.modules - |> fold(init: [], f: fn(acc, member_module) { - module_type_definition_rows(module_dag: module_dag, module: member_module) +// The owner roster and the by-value definition lookup both used to re-ask +// module_dag.type_definitions through the home's module_type_definition_rows, whose Rejected arm +// answered [] -- a rejected lookup became "this module owns no types", so c_validate_partition_r4 +// answered PartitionR4Valid over a map it had failed to read (DESIGN section 5). Both now read one +// resolved member list, which the home refuses to produce on a rejected lookup; the R4 refusal +// carries that cause rather than a C-local restatement of it. +fn c_resolved_modules(module_dag: ModuleDag) -> MembersResolve { + resolve_member_interfaces(module_dag: module_dag, members: module_dag.modules) +} + +fn c_all_type_owners(resolved: List) -> List { + resolved + |> fold(init: [], f: fn(acc, member) { + member.type_definitions |> fold(init: acc, f: fn(inner, row) { inner |> list_push( CTypeOwner { - module: member_module, + module: member.module, identity: type_definition_row_identity(row: row), } ) @@ -526,19 +542,33 @@ fn c_type_owner_for_symbol( } fn c_type_definition_for_owner( - module_dag: ModuleDag, + resolved: List, owner: CTypeOwner ) -> Optional { fold_list( - xs: module_type_definition_rows(module_dag: module_dag, module: owner.module), + xs: resolved, empty: Absent, - cons: fn(acc, row) { + cons: fn(acc, member) { match acc { Present { value: _ } => acc Absent => - match type_definition_row_identity(row: row) == owner.identity { - true => Present { value: c_type_definition_body(row: row) } + match member.module == owner.module { false => Absent + true => + fold_list( + xs: member.type_definitions, + empty: Absent, + cons: fn(inner, row) { + match inner { + Present { value: _ } => inner + Absent => + match type_definition_row_identity(row: row) == owner.identity { + true => Present { value: c_type_definition_body(row: row) } + false => Absent + } + } + } + ) } } } @@ -546,12 +576,12 @@ fn c_type_definition_for_owner( } fn c_by_value_type_edges( - module_dag: ModuleDag, + resolved: List, owners: List ) -> List { owners |> fold(init: [], f: fn(acc, owner) { - match c_type_definition_for_owner(module_dag: module_dag, owner: owner) { + match c_type_definition_for_owner(resolved: resolved, owner: owner) { Present { value: defn } => c_type_atoms_by_value_in_node(node: defn) |> fold(init: acc, f: fn(inner, sym) { @@ -578,7 +608,7 @@ fn c_by_value_type_edges( } fn c_by_value_type_identity_resolution_refusal( - module_dag: ModuleDag, + resolved: List, owners: List ) -> Optional { owners @@ -586,7 +616,7 @@ fn c_by_value_type_identity_resolution_refusal( match acc { Present { value: _ } => acc Absent => - match c_type_definition_for_owner(module_dag: module_dag, owner: owner) { + match c_type_definition_for_owner(resolved: resolved, owner: owner) { Present { value: defn } => c_type_atoms_by_value_in_node(node: defn) |> fold(init: Absent, f: fn(inner_acc, sym) { @@ -707,11 +737,11 @@ fn c_find_by_value_type_cycle_detail( } fn c_by_value_type_cycle_detail_after_resolution( - module_dag: ModuleDag, + resolved: List, assignment: Map, owners: List ) -> Optional { - let edges = c_by_value_type_edges(module_dag: module_dag, owners: owners) + let edges = c_by_value_type_edges(resolved: resolved, owners: owners) c_find_by_value_type_cycle_detail( edges: edges, assignment: assignment, @@ -720,20 +750,20 @@ fn c_by_value_type_cycle_detail_after_resolution( } fn c_partition_by_value_type_cycle_cause( - module_dag: ModuleDag, + resolved: List, assignment: Map, units: List ) -> Optional { let _ = units - let owners = c_all_type_owners(module_dag: module_dag) + let owners = c_all_type_owners(resolved: resolved) match c_by_value_type_identity_resolution_refusal( - module_dag: module_dag, + resolved: resolved, owners: owners ) { Present { value: detail } => Present { value: detail } Absent => c_by_value_type_cycle_detail_after_resolution( - module_dag: module_dag, + resolved: resolved, assignment: assignment, owners: owners ) @@ -745,15 +775,20 @@ fn c_validate_partition_r4( assignment: Map, units: List ) -> PartitionR4ValidityVerdict { - match c_partition_by_value_type_cycle_cause( - module_dag: module_dag, - assignment: assignment, - units: units - ) { - Absent => PartitionR4Valid - Present { value: detail } => - PartitionR4Refused { - cause: ByValueTypeCycle { detail: detail }, + match c_resolved_modules(module_dag: module_dag) { + MembersResolveRefused { cause: cause } => + PartitionR4Refused { cause: PartitionInputRejected { cause: cause } } + MembersResolveOk { members: resolved } => + match c_partition_by_value_type_cycle_cause( + resolved: resolved, + assignment: assignment, + units: units + ) { + Absent => PartitionR4Valid + Present { value: detail } => + PartitionR4Refused { + cause: ByValueTypeCycle { detail: detail }, + } } } } diff --git a/src/v2/std/compilers/compilation_unit.dag b/src/v2/std/compilers/compilation_unit.dag index 8fbeb60b6f3..a0b7ae67c73 100644 --- a/src/v2/std/compilers/compilation_unit.dag +++ b/src/v2/std/compilers/compilation_unit.dag @@ -1,6 +1,5 @@ module v2.std.compilers.compilation_unit -import std.dissolution { DissolutionCondition, unbound_dissolution } import std.algebra { Empty } import std.types { NonEmptyStr, List, Bool, String, Int } @@ -67,33 +66,48 @@ type PartitionInterfaceClosureResult = PartitionInterfaceClosed { nodes: List } | PartitionInterfaceTruncated +type PartitionFoldRefusalCause + = InterfaceClosureUnreachedFixpoint { unit_id: CompilationUnitId } + | ModuleDagExportsLookupRejected { module: ModuleId } + | ModuleDagTypeDefinitionsLookupRejected { module: ModuleId } + | ModuleAssignmentLookupRejected { module: ModuleId } + type PartitionR4ValidityCause = SccSplit { detail: String } | UnitGraphCycle { detail: String } | LinkageCycle { detail: String } | ByValueTypeCycle { detail: String } + | PartitionInputRejected { cause: PartitionFoldRefusalCause } type PartitionR4ValidityVerdict = PartitionR4Valid | PartitionR4Refused { cause: PartitionR4ValidityCause } -type PartitionFoldRefusalCause - = InterfaceClosureUnreachedFixpoint { unit_id: CompilationUnitId } - | ModuleDagExportsLookupRejected { module: ModuleId } - | ModuleDagTypeDefinitionsLookupRejected { module: ModuleId } - | ModuleAssignmentLookupRejected { module: ModuleId } - type PartitionFoldOutcome = PartitionFoldOk { units: List } | PartitionFoldRefused { cause: PartitionFoldRefusalCause } +type ResolvedModuleInterface { + module: ModuleId + exports: List + type_definitions: List +} + +type ModuleInterfaceResolve + = ModuleInterfaceResolved { resolved: ResolvedModuleInterface } + | ModuleInterfaceRefused { cause: PartitionFoldRefusalCause } + +type MembersResolve + = MembersResolveOk { members: List } + | MembersResolveRefused { cause: PartitionFoldRefusalCause } + type PartitionInterfaceClosureState { seeds: List stable: Bool } // Shared home for the agnostic unit of separate compilation and linkage (crate / translation-unit / -// package / assembly are target nicknames). partition_fold is the sole producer of interface + +// package / assembly are target nicknames). partition_fold_outcome is the sole producer of interface + // deps; members and unit identity are the only inputs, both via the assignment map Map. The unit carries NO artifact identity: an emitted-artifact name is a // REALIZATION spelling, derived by each target from the agnostic unit id plus its own target @@ -110,7 +124,7 @@ type PartitionInterfaceClosureState { // projects what it needs from that superset. R4 validity is an interface only — each target // realization supplies validate_partition_r4. -// interface derivation (partition_fold): (1) collect exported declaration Nodes from member modules +// interface derivation (partition_fold_outcome): (1) collect exported declaration Nodes from member modules // referenced across the partition boundary; (2) close transitively under by-value type references // using ModuleTypeDefinitionRow { identity, definition } rows (definition may be Conj-bodied or // Atom-rooted; identity is authoritative, not inferred from shape); (3) canonicalize as a set @@ -122,7 +136,7 @@ type PartitionInterfaceClosureState { // each realization implements its validate_partition_r4 over the facts its refused causes read, // returning PartitionR4ValidityVerdict. Rust refuses only SccSplit and UnitGraphCycle, both facts of // the module DAG and the assignment (the unit graph is the module edges projected through the -// assignment, the same fact partition_fold derives as CompilationUnit.deps), so Rust's takes +// assignment, the same fact partition_fold_outcome derives as CompilationUnit.deps), so Rust's takes // (module_dag, components, assignment) -- the components being the DAG's own SCCs, passed in by // the one resolve that derives them -- and so can be asked BEFORE any interface is built -- which is where // resolve_partition_outcome asks it. C's c_validate_partition_r4 keeps the units, because its @@ -138,20 +152,28 @@ type PartitionInterfaceClosureState { // C (an unbreakable type-layout cycle across a unit boundary, distinct from a linkage cycle), so it // is a universal cause, not a C nickname. The home exposes PartitionR4ValidityVerdict + // PartitionR4ValidityCause as a closed coproduct (SccSplit | UnitGraphCycle | LinkageCycle | -// ByValueTypeCycle) — never a string tag discriminator or a hardcoded acyclic check here. - -// partition_fold_outcome is the fail-closed entry for derived interface/deps: map lookup Rejected -// and interface-closure saturation without fixpoint return PartitionFoldRefused with a typed cause -// — never a partial interface. partition_fold(module_dag, assignment) -> List -// remains the locked signature for well-formed inputs; it unwraps PartitionFoldOk only and returns -// [] on Refused (callers requiring refusal receipts MUST use partition_fold_outcome). +// ByValueTypeCycle | PartitionInputRejected) — never a string tag discriminator or a hardcoded +// acyclic check here. PartitionInputRejected carries a PartitionFoldRefusalCause unchanged: a +// realization that cannot READ the module DAG has not established validity, and it restates the +// home's cause rather than minting a realization-local nickname for it (DESIGN section 3). + +// partition_fold_outcome is the ONLY entry for derived interface/deps: map lookup Rejected and +// interface-closure saturation without fixpoint return PartitionFoldRefused with a typed cause — +// never a partial interface. The List-returning compat wrappers that sat beside it +// (partition_fold, partition_unit_interface, compilation_unit_from_partition, +// partition_boundary_dep_targets, partition_unit_deps, module_export_declarations, +// module_type_definition_rows) collapsed a refusal into [] or into an empty-shell +// CompilationUnit; they are DELETED rather than fixed, because a surviving wrapper is the +// attractor DESIGN section 3 names -- every nearby question keeps being answered in its +// vocabulary. There is no unwrapping surface to reach for: a caller that wants units matches +// PartitionFoldOk and answers PartitionFoldRefused itself. data construction_justification: ConstructionJustification = ConstructionJustification { class: WallNow { mechanism: SingleAuthority, authority: DeclarationRef { module_path: "v2.std.compilers.compilation_unit", - decl_name: "partition_fold", + decl_name: "partition_fold_outcome", field: WholeDeclaration, } } @@ -339,18 +361,60 @@ fn module_type_definition_rows_outcome( } } -fn module_export_declarations(module_dag: ModuleDag, module: ModuleId) -> List { +// Resolve each member's exports and type-definition rows ONCE and CARRY them. The shape this +// replaces asked the two Maps again at every step of the interface closure through +// `module_export_declarations` / `module_type_definition_rows`, whose Rejected arm answered [] -- +// a refusal widened into an empty interface on a production route (DESIGN section 5: a failure arm +// must refuse, never widen). A pre-pass walked every member to detect exactly that rejection and +// then discarded both values, so the closure below it re-established a fact its predecessor already +// had (DESIGN section 6b). With the rows carried, no map lookup runs inside the closure at all: +// the swallowing arm has no site to exist at rather than being refused at one, and the repeated +// map_get is gone with it. +fn resolve_module_interface( + module_dag: ModuleDag, + module: ModuleId +) -> ModuleInterfaceResolve { match module_export_declarations_outcome(module_dag: module_dag, module: module) { - Accepted { value: nodes, diagnostics: _ } => nodes - Rejected { diagnostics: _ } => [] + Rejected { diagnostics: _ } => + ModuleInterfaceRefused { cause: ModuleDagExportsLookupRejected { module: module } } + Accepted { value: exports, diagnostics: _ } => + match module_type_definition_rows_outcome(module_dag: module_dag, module: module) { + Rejected { diagnostics: _ } => + ModuleInterfaceRefused { + cause: ModuleDagTypeDefinitionsLookupRejected { module: module }, + } + Accepted { value: rows, diagnostics: _ } => + ModuleInterfaceResolved { + resolved: ResolvedModuleInterface { + module: module + exports: exports + type_definitions: rows + }, + } + } } } -fn module_type_definition_rows(module_dag: ModuleDag, module: ModuleId) -> List { - match module_type_definition_rows_outcome(module_dag: module_dag, module: module) { - Accepted { value: rows, diagnostics: _ } => rows - Rejected { diagnostics: _ } => [] - } +fn resolve_member_interfaces( + module_dag: ModuleDag, + members: List +) -> MembersResolve { + members + |> fold(init: MembersResolveOk { members: Empty }, f: fn(acc, member) { + match acc { + MembersResolveRefused { cause: _ } => acc + MembersResolveOk { members: built } => + match resolve_module_interface(module_dag: module_dag, module: member) { + ModuleInterfaceRefused { cause: cause } => MembersResolveRefused { cause: cause } + ModuleInterfaceResolved { resolved: resolved } => + MembersResolveOk { members: built |> list_push(resolved) } + } + } + }) +} + +fn resolved_member_modules(resolved: List) -> List { + resolved |> fold(init: [], f: fn(acc, member) { acc |> list_push(member.module) }) } fn type_definition_row_identity(row: ModuleTypeDefinitionRow) -> Symbol { @@ -447,21 +511,6 @@ fn partition_unit_deps_fold( } } -fn partition_unit_deps( - module_dag: ModuleDag, - assignment: Map, - unit_id: CompilationUnitId -) -> List { - module_dag.edges - |> fold(init: [], f: fn(acc, edge) { - match partition_unit_dep_from_edge(assignment: assignment, unit_id: unit_id, edge: edge) { - Present { value: dep } => list_snoc_unique(items: acc, item: dep) - Absent => acc - } - }) - |> sort_by(id => id) -} - fn module_referenced_from_outside_unit( module_dag: ModuleDag, assignment: Map, @@ -500,44 +549,6 @@ fn module_referenced_from_outside_unit_fold( ) } -fn partition_cross_boundary_exports_for_member( - module_dag: ModuleDag, - assignment: Map, - unit_id: CompilationUnitId, - member: ModuleId, - acc: List -) -> List { - if module_referenced_from_outside_unit( - module_dag: module_dag, - assignment: assignment, - unit_id: unit_id, - member: member - ) { - module_export_declarations(module_dag: module_dag, module: member) - |> fold(init: acc, f: fn(inner, decl) { list_snoc_unique_node(items: inner, item: decl) }) - } else { - acc - } -} - -fn partition_cross_boundary_exports( - module_dag: ModuleDag, - assignment: Map, - unit_id: CompilationUnitId, - members: List -) -> List { - members - |> fold(init: [], f: fn(acc, member) { - partition_cross_boundary_exports_for_member( - module_dag: module_dag, - assignment: assignment, - unit_id: unit_id, - member: member, - acc: acc - ) - }) -} - fn type_atoms_in_declaration(declaration: Node) -> List { node_subtree_nodes(root: declaration) |> fold(init: [], f: fn(acc, node) { @@ -549,13 +560,12 @@ fn type_atoms_in_declaration(declaration: Node) -> List { |> sort_by(sym => sym) } -fn type_definition_for_identity_in_module( - module_dag: ModuleDag, - member: ModuleId, +fn type_definition_for_identity_in_member( + member: ResolvedModuleInterface, identity: Symbol ) -> Optional { fold_list( - xs: module_type_definition_rows(module_dag: module_dag, module: member), + xs: member.type_definitions, empty: Absent, cons: fn(acc, row) { match acc { @@ -571,20 +581,18 @@ fn type_definition_for_identity_in_module( ) } -fn type_definition_for_identity_in_members( - module_dag: ModuleDag, - members: List, +fn type_definition_for_identity_in_resolved( + resolved: List, identity: Symbol ) -> Optional { fold_list( - xs: members, + xs: resolved, empty: Absent, cons: fn(acc, member) { match acc { Present { value: _ } => acc Absent => - type_definition_for_identity_in_module( - module_dag: module_dag, + type_definition_for_identity_in_member( member: member, identity: identity ) @@ -595,16 +603,14 @@ fn type_definition_for_identity_in_members( fn partition_interface_closure_grow_once( seeds: List, - module_dag: ModuleDag, - members: List + resolved: List ) -> List { seeds |> fold(init: seeds, f: fn(acc, declaration) { type_atoms_in_declaration(declaration: declaration) |> fold(init: acc, f: fn(inner, sym) { - match type_definition_for_identity_in_members( - module_dag: module_dag, - members: members, + match type_definition_for_identity_in_resolved( + resolved: resolved, identity: sym ) { Present { value: defn } => list_snoc_unique_node(items: inner, item: defn) @@ -614,28 +620,23 @@ fn partition_interface_closure_grow_once( }) } -fn partition_member_declaration_budget( - module_dag: ModuleDag, - members: List -) -> Int { - members +fn partition_member_declaration_budget(resolved: List) -> Int { + resolved |> fold(init: 0, f: fn(acc, member) { - acc + length(xs: module_export_declarations(module_dag: module_dag, module: member)) + length(xs: module_type_definition_rows(module_dag: module_dag, module: member)) + acc + length(xs: member.exports) + length(xs: member.type_definitions) }) } fn partition_interface_closure_saturate_step( state: PartitionInterfaceClosureState, - module_dag: ModuleDag, - members: List + resolved: List ) -> PartitionInterfaceClosureState { if state.stable { state } else { let grown = partition_interface_closure_grow_once( seeds: state.seeds, - module_dag: module_dag, - members: members + resolved: resolved ) PartitionInterfaceClosureState { seeds: grown, @@ -647,8 +648,7 @@ fn partition_interface_closure_saturate_step( fn partition_interface_closure_saturate_with_fuel( state: PartitionInterfaceClosureState, fuel: Int, - module_dag: ModuleDag, - members: List + resolved: List ) -> PartitionInterfaceClosureState { if fuel <= 0 || state.stable { state @@ -656,27 +656,23 @@ fn partition_interface_closure_saturate_with_fuel( partition_interface_closure_saturate_with_fuel( state: partition_interface_closure_saturate_step( state: state, - module_dag: module_dag, - members: members + resolved: resolved ), fuel: fuel - 1, - module_dag: module_dag, - members: members + resolved: resolved ) } } fn partition_interface_closure_saturate_result_with_fuel( seeds: List, - module_dag: ModuleDag, - members: List, + resolved: List, closure_fuel: Int ) -> PartitionInterfaceClosureResult { let final_state = partition_interface_closure_saturate_with_fuel( state: PartitionInterfaceClosureState { seeds: seeds, stable: false }, fuel: closure_fuel, - module_dag: module_dag, - members: members + resolved: resolved ) if final_state.stable { PartitionInterfaceClosed { @@ -689,50 +685,12 @@ fn partition_interface_closure_saturate_result_with_fuel( fn partition_interface_closure_saturate_result( seeds: List, - module_dag: ModuleDag, - members: List + resolved: List ) -> PartitionInterfaceClosureResult { partition_interface_closure_saturate_result_with_fuel( seeds: seeds, - module_dag: module_dag, - members: members, - closure_fuel: partition_member_declaration_budget(module_dag: module_dag, members: members) + 1 - ) -} - -fn module_member_dag_lookup_cause_if_rejected( - module_dag: ModuleDag, - member: ModuleId -) -> Optional { - match module_export_declarations_outcome(module_dag: module_dag, module: member) { - Rejected { diagnostics: _ } => - optional_present( - value: ModuleDagExportsLookupRejected { module: member } - ) - Accepted { value: _, diagnostics: _ } => - match module_type_definition_rows_outcome(module_dag: module_dag, module: member) { - Rejected { diagnostics: _ } => - optional_present( - value: ModuleDagTypeDefinitionsLookupRejected { module: member } - ) - Accepted { value: _, diagnostics: _ } => Absent - } - } -} - -fn partition_members_dag_lookup_cause_if_rejected( - module_dag: ModuleDag, - members: List -) -> Optional { - fold_list( - xs: members, - empty: Absent, - cons: fn(acc, member) { - match acc { - Present { value: _ } => acc - Absent => module_member_dag_lookup_cause_if_rejected(module_dag: module_dag, member: member) - } - } + resolved: resolved, + closure_fuel: partition_member_declaration_budget(resolved: resolved) + 1 ) } @@ -744,9 +702,9 @@ fn partition_cross_boundary_exports_fold( module_dag: ModuleDag, assignment: Map, unit_id: CompilationUnitId, - members: List + resolved: List ) -> PartitionInterfaceBuild { - members + resolved |> fold(init: InterfaceBuildOk { nodes: Empty }, f: fn(acc, member) { match acc { InterfaceBuildRefused { cause: _ } => acc @@ -755,7 +713,7 @@ fn partition_cross_boundary_exports_fold( module_dag: module_dag, assignment: assignment, unit_id: unit_id, - member: member + member: member.module ) { Present { value: cause } => InterfaceBuildRefused { cause: cause } Absent => @@ -763,20 +721,13 @@ fn partition_cross_boundary_exports_fold( module_dag: module_dag, assignment: assignment, unit_id: unit_id, - member: member + member: member.module ) { - match module_export_declarations_outcome(module_dag: module_dag, module: member) { - Accepted { value: exports, diagnostics: _ } => - InterfaceBuildOk { - nodes: exports - |> fold(init: acc_nodes, f: fn(inner, decl) { - list_snoc_unique_node(items: inner, item: decl) - }), - } - Rejected { diagnostics: _ } => - InterfaceBuildRefused { - cause: ModuleDagExportsLookupRejected { module: member }, - } + InterfaceBuildOk { + nodes: member.exports + |> fold(init: acc_nodes, f: fn(inner, decl) { + list_snoc_unique_node(items: inner, item: decl) + }), } } else { InterfaceBuildOk { nodes: acc_nodes } @@ -790,65 +741,28 @@ fn partition_unit_interface_fold( module_dag: ModuleDag, assignment: Map, unit_id: CompilationUnitId, - members: List, + resolved: List, closure_fuel: Int ) -> PartitionInterfaceBuild { - match partition_members_dag_lookup_cause_if_rejected(module_dag: module_dag, members: members) { - Present { value: cause } => InterfaceBuildRefused { cause: cause } - Absent => - match partition_cross_boundary_exports_fold( - module_dag: module_dag, - assignment: assignment, - unit_id: unit_id, - members: members - ) { - InterfaceBuildRefused { cause: cause } => InterfaceBuildRefused { cause: cause } - InterfaceBuildOk { nodes: seeds } => - match partition_interface_closure_saturate_result_with_fuel( - seeds: seeds, - module_dag: module_dag, - members: members, - closure_fuel: closure_fuel - ) { - PartitionInterfaceClosed { nodes: nodes } => InterfaceBuildOk { nodes: nodes } - PartitionInterfaceTruncated => - InterfaceBuildRefused { - cause: InterfaceClosureUnreachedFixpoint { unit_id: unit_id }, - } - } - } - } -} - -fn partition_unit_interface_fold_default( - module_dag: ModuleDag, - assignment: Map, - unit_id: CompilationUnitId, - members: List -) -> PartitionInterfaceBuild { - partition_unit_interface_fold( - module_dag: module_dag, - assignment: assignment, - unit_id: unit_id, - members: members, - closure_fuel: partition_member_declaration_budget(module_dag: module_dag, members: members) + 1 - ) -} - -fn partition_unit_interface( - module_dag: ModuleDag, - assignment: Map, - unit_id: CompilationUnitId, - members: List -) -> List { - match partition_unit_interface_fold_default( + match partition_cross_boundary_exports_fold( module_dag: module_dag, assignment: assignment, unit_id: unit_id, - members: members + resolved: resolved ) { - InterfaceBuildOk { nodes: nodes } => nodes - InterfaceBuildRefused { cause: _ } => [] + InterfaceBuildRefused { cause: cause } => InterfaceBuildRefused { cause: cause } + InterfaceBuildOk { nodes: seeds } => + match partition_interface_closure_saturate_result_with_fuel( + seeds: seeds, + resolved: resolved, + closure_fuel: closure_fuel + ) { + PartitionInterfaceClosed { nodes: nodes } => InterfaceBuildOk { nodes: nodes } + PartitionInterfaceTruncated => + InterfaceBuildRefused { + cause: InterfaceClosureUnreachedFixpoint { unit_id: unit_id }, + } + } } } @@ -856,22 +770,19 @@ type PartitionUnitBuildStep = UnitBuildOk { unit: CompilationUnit } | UnitBuildRefused { cause: PartitionFoldRefusalCause } -fn compilation_unit_from_partition_fold( +fn compilation_unit_from_partition_resolved( module_dag: ModuleDag, assignment: Map, unit_id: CompilationUnitId, + resolved: List, closure_fuel: Int ) -> PartitionUnitBuildStep { - let members = partition_unit_members( - module_dag: module_dag, - assignment: assignment, - unit_id: unit_id - ) + let members = resolved_member_modules(resolved: resolved) match partition_unit_interface_fold( module_dag: module_dag, assignment: assignment, unit_id: unit_id, - members: members, + resolved: resolved, closure_fuel: closure_fuel ) { InterfaceBuildRefused { cause: cause } => UnitBuildRefused { cause: cause } @@ -895,42 +806,63 @@ fn compilation_unit_from_partition_fold( } } -fn compilation_unit_from_partition_fold_default( +fn compilation_unit_resolve_members( module_dag: ModuleDag, assignment: Map, unit_id: CompilationUnitId -) -> PartitionUnitBuildStep { - let members = partition_unit_members( +) -> MembersResolve { + resolve_member_interfaces( module_dag: module_dag, - assignment: assignment, - unit_id: unit_id + members: partition_unit_members( + module_dag: module_dag, + assignment: assignment, + unit_id: unit_id + ) ) - compilation_unit_from_partition_fold( +} + +fn compilation_unit_from_partition_fold( + module_dag: ModuleDag, + assignment: Map, + unit_id: CompilationUnitId, + closure_fuel: Int +) -> PartitionUnitBuildStep { + match compilation_unit_resolve_members( module_dag: module_dag, assignment: assignment, - unit_id: unit_id, - closure_fuel: partition_member_declaration_budget(module_dag: module_dag, members: members) + 1 - ) + unit_id: unit_id + ) { + MembersResolveRefused { cause: cause } => UnitBuildRefused { cause: cause } + MembersResolveOk { members: resolved } => + compilation_unit_from_partition_resolved( + module_dag: module_dag, + assignment: assignment, + unit_id: unit_id, + resolved: resolved, + closure_fuel: closure_fuel + ) + } } -fn compilation_unit_from_partition( +fn compilation_unit_from_partition_fold_default( module_dag: ModuleDag, assignment: Map, unit_id: CompilationUnitId -) -> CompilationUnit { - match compilation_unit_from_partition_fold_default( +) -> PartitionUnitBuildStep { + match compilation_unit_resolve_members( module_dag: module_dag, assignment: assignment, unit_id: unit_id ) { - UnitBuildOk { unit: unit } => unit - UnitBuildRefused { cause: _ } => - CompilationUnit { - id: unit_id - members: [] - interface: [] - deps: [] - } + MembersResolveRefused { cause: cause } => UnitBuildRefused { cause: cause } + MembersResolveOk { members: resolved } => + compilation_unit_from_partition_resolved( + module_dag: module_dag, + assignment: assignment, + unit_id: unit_id, + resolved: resolved, + closure_fuel: partition_member_declaration_budget(resolved: resolved) + 1 + ) } } @@ -996,28 +928,6 @@ fn partition_fold_outcome( } } -fn partition_fold( - module_dag: ModuleDag, - assignment: Map -) -> List { - match partition_fold_outcome(module_dag: module_dag, assignment: assignment) { - PartitionFoldOk { units: units } => units - PartitionFoldRefused { cause: _ } => [] - } -} - -fn partition_boundary_dep_targets( - module_dag: ModuleDag, - assignment: Map, - unit_id: CompilationUnitId -) -> List { - partition_unit_deps( - module_dag: module_dag, - assignment: assignment, - unit_id: unit_id - ) -} - fn partition_unit_by_id( units: List, unit_id: CompilationUnitId @@ -1028,38 +938,49 @@ fn partition_unit_by_id( } } -fn partition_fold_deps_match_boundary_edges( +fn partition_fold_deps_match_boundary_edges_units( module_dag: ModuleDag, - assignment: Map + assignment: Map, + units: List ) -> Bool { - let units = partition_fold(module_dag: module_dag, assignment: assignment) list_unique_sorted_ids(items: assignment |> map_values) |> fold(init: true, f: fn(ok, unit_id) { if !ok { false } else { match partition_unit_by_id(units: units, unit_id: unit_id) { - Present { value: unit } => { - let expected = partition_boundary_dep_targets( + Present { value: unit } => + match partition_unit_deps_fold( module_dag: module_dag, assignment: assignment, unit_id: unit_id - ) - unit.deps == expected - } + ) { + DepsBuildRefused { cause: _ } => false + DepsBuildOk { deps: expected } => unit.deps == expected + } Absent => false } } }) } +fn partition_fold_deps_match_boundary_edges( + module_dag: ModuleDag, + assignment: Map +) -> Bool { + match partition_fold_outcome(module_dag: module_dag, assignment: assignment) { + PartitionFoldRefused { cause: _ } => false + PartitionFoldOk { units: units } => + partition_fold_deps_match_boundary_edges_units( + module_dag: module_dag, + assignment: assignment, + units: units + ) + } +} + fn partition_interface_contains_node(interface: List, needle: Node) -> Bool { let needle_hash = content_hash(n: needle) any(xs: interface, predicate: fn(n) { content_hash(n: n) == needle_hash }) } -data compilation_unit_from_partition_wrapper_dissolve_on: DissolutionCondition = unbound_dissolution(description: "dissolve-on: compilation_unit_from_partition_wrapper — delete fn compilation_unit_from_partition when every caller migrates to compilation_unit_from_partition_fold_default. UnitBuildRefused collapses to an empty-shell CompilationUnit here (same §5 absorbing-fallback shape); receipt-requiring paths must use compilation_unit_from_partition_fold_default or partition_fold_outcome.") - -data partition_fold_list_wrapper_dissolve_on: DissolutionCondition = unbound_dissolution(description: "dissolve-on: partition_fold_list_wrapper — delete fn partition_fold when every caller migrates to partition_fold_outcome. The List-returning wrapper is locked-signature compat only; PartitionFoldRefused collapses to [] here (indistinguishable from a legitimately empty partition), so receipt-requiring paths must not call it (§5 absorbing-fallback shape; primary surface is partition_fold_outcome per") - -data partition_unit_interface_list_wrapper_dissolve_on: DissolutionCondition = unbound_dissolution(description: "dissolve-on: partition_unit_interface_list_wrapper — delete fn partition_unit_interface when every caller migrates to partition_unit_interface_fold_default. InterfaceBuildRefused collapses to [] here (same §5 absorbing-fallback shape as partition_fold_list_wrapper_dissolve_on); receipt-requiring paths must use partition_unit_interface_fold_default.") diff --git a/src/v2/test/claim/c_compilation_unit_witness_test.dag b/src/v2/test/claim/c_compilation_unit_witness_test.dag index 57b26caf873..b9df663724b 100644 --- a/src/v2/test/claim/c_compilation_unit_witness_test.dag +++ b/src/v2/test/claim/c_compilation_unit_witness_test.dag @@ -454,7 +454,10 @@ test fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { } } -test fn witness_partition_fold_compat_wrapper_not_receipt_path() -> Bool { +// The positive control beside the zero-fuel refusal above: the same inputs, the default fuel, and +// both units built. It was named for the List-returning compat wrapper it used to stand against; +// that wrapper is deleted, so the name now says what the claim actually asserts. +test fn witness_partition_fold_outcome_yields_both_units() -> Bool { match partition_fold_outcome( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment() diff --git a/src/v2/test/claim/compilation_unit_witness_test.dag b/src/v2/test/claim/compilation_unit_witness_test.dag index 93149636fa1..de400a1fb44 100644 --- a/src/v2/test/claim/compilation_unit_witness_test.dag +++ b/src/v2/test/claim/compilation_unit_witness_test.dag @@ -10,9 +10,12 @@ import v2.std.compilers.compilation_unit { ModuleDag, ModuleDagEdge, ModuleId, + MembersResolveOk, + MembersResolveRefused, ModuleTypeDefinitionRow, InterfaceClosureUnreachedFixpoint, PartitionFoldOk, + PartitionFoldOutcome, PartitionFoldRefused, PartitionInterfaceClosed, PartitionInterfaceTruncated, @@ -21,7 +24,6 @@ import v2.std.compilers.compilation_unit { PartitionR4ValidityVerdict, PolicyDerived, partition_r4_witness_refused_scc_split, - partition_fold, partition_fold_deps_match_boundary_edges, partition_fold_outcome, partition_fold_outcome_with_closure_fuel, @@ -31,8 +33,10 @@ import v2.std.compilers.compilation_unit { partition_provenance_hand_explicit, partition_provenance_policy_derived, partition_unit_by_id, + resolve_member_interfaces, } import v2.std.collection { empty_map, map_insert } +import v2.std.optional { Absent, Optional, Present } import v2.std.node { Arrow, Atom, @@ -159,16 +163,29 @@ fn witness_single_unit_assignment() -> Map { |> map_insert(witness_mod_c, witness_unit_all) } -fn witness_partition_fold_two_units() -> List { - partition_fold( +fn witness_unit_from_outcome( + outcome: PartitionFoldOutcome, + unit_id: CompilationUnitId +) -> Optional { + match outcome { + PartitionFoldRefused { cause: _ } => Absent + PartitionFoldOk { units: units } => partition_unit_by_id(units: units, unit_id: unit_id) + } +} + +fn witness_two_unit_outcome() -> PartitionFoldOutcome { + partition_fold_outcome( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment() ) } +fn witness_two_unit(unit_id: CompilationUnitId) -> Optional { + witness_unit_from_outcome(outcome: witness_two_unit_outcome(), unit_id: unit_id) +} + test fn witness_unit_one_members_and_deps() -> Bool { - let units = witness_partition_fold_two_units() - match partition_unit_by_id(units: units, unit_id: witness_unit_one) { + match witness_two_unit(unit_id: witness_unit_one) { Present { value: unit } => (unit.members == [witness_mod_a, witness_mod_b]) && (unit.deps == [witness_unit_two]) @@ -177,9 +194,8 @@ test fn witness_unit_one_members_and_deps() -> Bool { } test fn witness_unit_two_interface_carries_declaration_content() -> Bool { - let units = witness_partition_fold_two_units() let export_decl = witness_fn_taking_point_by_value() - match partition_unit_by_id(units: units, unit_id: witness_unit_two) { + match witness_two_unit(unit_id: witness_unit_two) { Present { value: unit } => (unit.members == [witness_mod_c]) && (unit.deps == [witness_unit_one]) @@ -189,9 +205,8 @@ test fn witness_unit_two_interface_carries_declaration_content() -> Bool { } test fn witness_unit_two_interface_includes_by_value_type_def() -> Bool { - let units = witness_partition_fold_two_units() let point_def = witness_point_struct_conj_body() - match partition_unit_by_id(units: units, unit_id: witness_unit_two) { + match witness_two_unit(unit_id: witness_unit_two) { Present { value: unit } => partition_interface_contains_node(interface: unit.interface, needle: point_def) && ((unit.interface |> count) >= 2) @@ -202,16 +217,21 @@ test fn witness_unit_two_interface_includes_by_value_type_def() -> Bool { test fn witness_interface_closure_saturates_on_triangle() -> Bool { let dag = witness_triangle_dag() let assignment = witness_two_unit_assignment() - let units = partition_fold(module_dag: dag, assignment: assignment) - match partition_unit_by_id(units: units, unit_id: witness_unit_two) { + match witness_unit_from_outcome( + outcome: partition_fold_outcome(module_dag: dag, assignment: assignment), + unit_id: witness_unit_two + ) { Present { value: unit } => - match partition_interface_closure_saturate_result( - seeds: [witness_fn_taking_point_by_value()], - module_dag: dag, - members: unit.members - ) { - PartitionInterfaceClosed { nodes: _ } => true - PartitionInterfaceTruncated => false + match resolve_member_interfaces(module_dag: dag, members: unit.members) { + MembersResolveRefused { cause: _ } => false + MembersResolveOk { members: resolved } => + match partition_interface_closure_saturate_result( + seeds: [witness_fn_taking_point_by_value()], + resolved: resolved + ) { + PartitionInterfaceClosed { nodes: _ } => true + PartitionInterfaceTruncated => false + } } Absent => false } @@ -234,11 +254,13 @@ test fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { } test fn witness_single_unit_partition_has_no_cross_unit_deps() -> Bool { - let units = partition_fold( - module_dag: witness_triangle_dag(), - assignment: witness_single_unit_assignment() - ) - match partition_unit_by_id(units: units, unit_id: witness_unit_all) { + match witness_unit_from_outcome( + outcome: partition_fold_outcome( + module_dag: witness_triangle_dag(), + assignment: witness_single_unit_assignment() + ), + unit_id: witness_unit_all + ) { Present { value: unit } => (unit.members == [witness_mod_a, witness_mod_b, witness_mod_c]) && (unit.deps == []) @@ -248,11 +270,13 @@ test fn witness_single_unit_partition_has_no_cross_unit_deps() -> Bool { } test fn witness_intra_unit_edges_do_not_become_deps() -> Bool { - let units = partition_fold( - module_dag: witness_chain_dag(), - assignment: witness_single_unit_assignment() - ) - match partition_unit_by_id(units: units, unit_id: witness_unit_all) { + match witness_unit_from_outcome( + outcome: partition_fold_outcome( + module_dag: witness_chain_dag(), + assignment: witness_single_unit_assignment() + ), + unit_id: witness_unit_all + ) { Present { value: unit } => unit.deps == [] Absent => false } @@ -273,8 +297,7 @@ test fn witness_fold_deps_match_boundary_edges_single_unit() -> Bool { } test fn witness_misderived_deps_would_fail_receipt() -> Bool { - let units = witness_partition_fold_two_units() - match partition_unit_by_id(units: units, unit_id: witness_unit_one) { + match witness_two_unit(unit_id: witness_unit_one) { Present { value: unit } => !(unit.deps == []) && !(unit.deps == [witness_unit_one]) @@ -288,7 +311,7 @@ test fn witness_provenance_variants_distinct() -> Bool { let derived = partition_provenance_policy_derived( policy: DeclarationRef { module_path: "v2.std.compilers.compilation_unit" as NonEmptyStr, - decl_name: "partition_fold" as NonEmptyStr, + decl_name: "partition_fold_outcome" as NonEmptyStr, field: WholeDeclaration, } ) diff --git a/src/v2/test/claim/rust_crate_partition_witness_test.dag b/src/v2/test/claim/rust_crate_partition_witness_test.dag index 0a578a1183c..3946fa8d8b7 100644 --- a/src/v2/test/claim/rust_crate_partition_witness_test.dag +++ b/src/v2/test/claim/rust_crate_partition_witness_test.dag @@ -13,6 +13,7 @@ import v2.std.compilers.compilation_unit { ModuleId, PolicyDerived, ByValueTypeCycle, + PartitionInputRejected, LinkageCycle, SccSplit, UnitGraphCycle, @@ -107,6 +108,7 @@ fn witness_refused_by_rust_rule(outcome: ResolvePartitionOutcome) -> String { ResolvePartitionRefused { cause: PartitionRustAdmissibilityRefused { cause: UnitGraphCycle { detail: _ } } } => "unit-graph-cycle" ResolvePartitionRefused { cause: PartitionRustAdmissibilityRefused { cause: LinkageCycle { detail: _ } } } => "linkage-cycle" ResolvePartitionRefused { cause: PartitionRustAdmissibilityRefused { cause: ByValueTypeCycle { detail: _ } } } => "by-value-type-cycle" + ResolvePartitionRefused { cause: PartitionRustAdmissibilityRefused { cause: PartitionInputRejected { cause: _ } } } => "partition-input-rejected" ResolvePartitionRefused { cause: PolicyTargetCountNotPositive { policy: _ } } => "target-not-positive" ResolvePartitionRefused { cause: AssignmentOmitsModule { module_id: _ } } => "omits-module" ResolvePartitionRefused { cause: AssignmentNamesModuleOutsideDag { module_id: _ } } => "outside-dag" diff --git a/src/v2/workflow/floor_grandfathered_roster.dag b/src/v2/workflow/floor_grandfathered_roster.dag index ac96c94ce82..6fd34af005d 100644 --- a/src/v2/workflow/floor_grandfathered_roster.dag +++ b/src/v2/workflow/floor_grandfathered_roster.dag @@ -125,6 +125,11 @@ type GrandfatheredRemoval = // old one is not -- and one is a deletion, because the band-grounding check it named was replaced // by the floored-ratio grounding rather than renamed into it. data floor_grandfathered_removals: List = [ + WitnessRenamed { + previous_identity: "v2.test.claim.c_compilation_unit_witness.witness_partition_fold_compat_wrapper_not_receipt_path" as NonEmptyStr, + new_identity: "v2.test.claim.c_compilation_unit_witness.witness_partition_fold_outcome_yields_both_units" as NonEmptyStr, + renamed_in: "the compilation-unit refusal-swallowing cut: the witness was named for the compat WRAPPER it stood against, and that wrapper is deleted by this change, so the name pointed at something no longer in the tree. It now names the fact it actually establishes -- partition_fold_outcome yields both units -- and as a new identity it is judged against the new-witness tier rather than inheriting the cut row's grandfathered one" as NonEmptyStr, + }, WitnessDeleted { identity: "v2.test.claim.rust_crate_partition_witness.witness_policy_partition_refuses_holds" as NonEmptyStr, deleted_in: "Pkg7a/b policy partition resolver: it pinned PolicyResolverUnimplemented, the refusal the resolver replaces. The arm and its cause are deleted; the policy arm's refusal (PolicyTargetCountNotPositive) and admission are asserted at v2.test.claim.rust_crate_partition_witness.policy_target_below_one_refuses and policy_partition_admits_a_balanced_acyclic_assignment, new identities judged against the new-witness tier" as NonEmptyStr, diff --git a/src/v2/workflow/rust_crate_partition.dag b/src/v2/workflow/rust_crate_partition.dag index 320addc22ea..0a19c021198 100644 --- a/src/v2/workflow/rust_crate_partition.dag +++ b/src/v2/workflow/rust_crate_partition.dag @@ -109,7 +109,7 @@ data rust_crate_partition_declared_core_target: Int = 7 data rust_crate_partition_module_bearing_unit_target: Int = 6 -// R3-only emit shell crate (reexport surface, NOT a partition_fold CompilationUnit): modules list +// R3-only emit shell crate (reexport surface, NOT a partition_fold_outcome CompilationUnit): modules list // is the reexport bundle for render at cutover; those modules remain owned by module-bearing units // in stage0_interim_explicit_assignment. Physical crate count = module_bearing (6) + emit_shell (1) // = declared_core_target (7). @@ -144,7 +144,7 @@ type TypeDefinitionsMapNotFrontierGrounded { } // Interim: ModuleDag.exports + type_definitions carry per-module keys with empty lists (structural -// scaffold for partition_fold only). R3 render uses Stage0PartitionCrateRow.modules + +// scaffold for partition_fold_outcome only). R3 render uses Stage0PartitionCrateRow.modules + // reexport_packages wildcard pub-use chain — not CompilationUnit.interface Nodes. Full Node-carrier // exports blocked on stage0 module ingest supplying them through the path-module binding index (see // stage0_grounding_target_repointed_note).