diff --git a/dag/gunbc/instruments/self_host_03_normalize_declared_source_refs.dag b/dag/gunbc/instruments/self_host_03_normalize_declared_source_refs.dag index 159cbde0661..05199167a2f 100644 --- a/dag/gunbc/instruments/self_host_03_normalize_declared_source_refs.dag +++ b/dag/gunbc/instruments/self_host_03_normalize_declared_source_refs.dag @@ -2,6 +2,7 @@ module tools.self_host_03_normalize_declared_source_refs import std.types { List } import v2.compiler.source_authority { SourceRef, source_ref_for_storage_path } +import v2.std.cross_tree.import_model { V2Tree } // declared_source_refs for the 03_normalize behavioral witness only (review 41433 fix): this list // opts src/v2/compiler/03_normalize.dag's witness entry into the cli_run.rs affected-set selection @@ -13,9 +14,9 @@ import v2.compiler.source_authority { SourceRef, source_ref_for_storage_path } // this selection axis onto all 16 entries; a dedicated per-entry module keeps the axis scoped to // 03_normalize alone, matching the roster row's module_path and contract entry exactly. -data sn_source_ref: SourceRef = source_ref_for_storage_path(path: "src/v2/compiler/03_normalize.dag") +data sn_source_ref: SourceRef = source_ref_for_storage_path(path: "src/v2/compiler/03_normalize.dag", source_root: V2Tree) -data sn_contract_ref: SourceRef = source_ref_for_storage_path(path: "src/v2/test/claim/self_host_contract/normalize_emitted_contract_test.dag") +data sn_contract_ref: SourceRef = source_ref_for_storage_path(path: "src/v2/test/claim/self_host_contract/normalize_emitted_contract_test.dag", source_root: V2Tree) // Hand-verified completeness (docs/plans/declared-source-ref-selection-design.md §5.1 flagship): // every storage path this transport reads from the repository is listed -- the subject .dag and the diff --git a/dag/gunbc/instruments/source_reference_repoint.dag b/dag/gunbc/instruments/source_reference_repoint.dag index 14a83e11708..e2226440d77 100644 --- a/dag/gunbc/instruments/source_reference_repoint.dag +++ b/dag/gunbc/instruments/source_reference_repoint.dag @@ -348,7 +348,7 @@ fn repoint_pending_verdict(pending: List) -> ProcessExit { } fn repoint_root_tasks() -> List { - source_reference_repoint_roots |> map(path => SourceRootWalkTask { path: path, root: true }) + source_reference_repoint_roots |> map(path => SourceRootWalkTask { path: path, root: true, origin: path }) } // The wet entry: rewrite every file under the roots that still references a moved module. @@ -357,10 +357,10 @@ fn repoint() -> ProcessExit { SourceRootPathsRefused { path: path, kind: kind, cause: cause } => exit_failure(reason: join(["source reference repoint: cannot walk ", path, " (", kind, "): ", cause], "")) SourceRootPathsRead { paths: paths } => - fold(paths, init: ExitSuccess, f: fn(acc, path) { + fold(paths, init: ExitSuccess, f: fn(acc, walked) { match acc { ExitFailure { code, reason } => ExitFailure { code: code, reason: reason } - ExitSuccess => repoint_one_path(path: path) + ExitSuccess => repoint_one_path(path: walked.path) } }) } @@ -372,6 +372,10 @@ fn repoint_pending() -> ProcessExit { SourceRootPathsRefused { path: path, kind: kind, cause: cause } => exit_failure(reason: join(["source reference repoint: cannot walk ", path, " (", kind, "): ", cause], "")) SourceRootPathsRead { paths: paths } => - repoint_pending_verdict(pending: paths |> filter(path => repoint_path_is_pending(path: path))) + repoint_pending_verdict( + pending: paths + |> filter(walked => repoint_path_is_pending(path: walked.path)) + |> map(walked => walked.path) + ) } } diff --git a/dag/gunbc/recurring_failure_mode/two_source_files_claiming_one_module_path_misdiagnosed.dag b/dag/gunbc/recurring_failure_mode/two_source_files_claiming_one_module_path_misdiagnosed.dag new file mode 100644 index 00000000000..ed72d939700 --- /dev/null +++ b/dag/gunbc/recurring_failure_mode/two_source_files_claiming_one_module_path_misdiagnosed.dag @@ -0,0 +1,35 @@ +module gunbc.recurring_failure_mode.two_source_files_claiming_one_module_path_misdiagnosed + +import std.types { NonEmptyStr } +import std.decl_ref { DeclarationRef, WholeDeclaration } +import gunbc.recurring_failure_mode { RecurringFailureMode } + +data two_source_files_claiming_one_module_path_misdiagnosed: RecurringFailureMode = RecurringFailureMode { + identity: "two_source_files_claiming_one_module_path_misdiagnosed" as NonEmptyStr, + + receipts: [ + "**two source files claiming one module path are not refused as that collision, and the native door reports a later unbound name instead** (INVALID STATE: either two files declare the same module path, or one walked root's layout maps two files onto one tree identity, and ingest continues. HARM: the operator sequences on `resolve_unbound_name_is_declared_elsewhere` at a real token in an innocent module -- DESIGN section 5 silent wrongness wearing a located diagnostic.", + + "TRIGGER INCIDENT, lively-bear-908: dag/std/algebra.dag (`module std.algebra`) and src/v2/std/algebra.dag (`module v2.std.algebra`) were loaded under ONE copied source root. Those are DISTINCT declared module paths. What collided was PATH-DERIVED SOURCE-ROOT IDENTITY: v2.compiler.source_authority classified a file as V2Tree from the file's storage spelling. A copied tree `/tmp/copy/src/v2/std/algebra.dag` did not start with `src/`, so both files became DagTree. Widening that classifier to 'contains /src/' moved the same silent misclassification onto a dag path such as `dag/pkg/src/leaf.dag`. Resolve then named a token in std.change as declared elsewhere rather than naming the layout.", + + "THE SAME DECLARED PATH IS A SECOND ARM OF THE SAME CLASS. The census already refused a second file declaring one QualifiedName (`closure_census_duplicate_module`), but located only that second file's module node. The first file was unnamed. v1's wall at v1_compiler.cli_run module_path_collision_panic_message names BOTH paths. A refusal that names one of two files is still a misdiagnosis of the collision.", + + "DISTINGUISHING FACT: this is not `two_modules_answer_to_one_logical_qualified_name` (a logical-name strip after ingest). It is ingest identity: declared module path, or a tree tag guessed from the file's path, answering for two files as one.", + + "RECOGNITION RULE: a native emit or census over a small tree reports `resolve_unbound_name_is_declared_elsewhere` (or any resolve unbound) while two walked files share a declared module path OR a copied layout is tagged by file spelling rather than by the discovering --source-root. The reviewer tell: the diagnostic's file is not one of the two that share the identity.", + + "RUNG FOUND AT: OUTSIDE THE LADDER -- silent wrongness. The later diagnostic is typed and located, and it is the wrong subject.", + + "CEILING: 3, structurally guaranteed. Ingest can refuse a second file that declares an already-ingested module path, with loci on both files, and can stamp SourceRootRef from the walk origin that discovered the file, refusing when that origin is not a dag or src/v2 tree. It cannot make two files unwritable.", + + "NEXT-RUNG TRIGGER: the native CLI, over a two-file tree whose declared module paths collide, refuses `closure_census_duplicate_module` naming both files; a copied single-root argument refuses as unrecognized rather than guessing DagTree; a file under --source-root dag whose path contains /src/ is still DagTree. Sufficient that a copied closure cannot present as an unbound name in a third module. Not satisfied by classifying the file path.", + + "CONSUMPTION: this per-class record joins the derived gunbc.recurring_failure_mode.roster recurring_failure_mode_roster.", + ], + + evidence: [ + DeclarationRef { module_path: "v2.compiler.source_authority", decl_name: "admit_source_root_argument", field: WholeDeclaration }, + DeclarationRef { module_path: "gunbc.source_root_read", decl_name: "source_root_read", field: WholeDeclaration }, + DeclarationRef { module_path: "v2.compiler.self_host.closure_emission", decl_name: "closure_census_duplicate_module_outcome", field: WholeDeclaration }, + ], +} diff --git a/dag/gunbc/source_root_eval_driver_seed_growth.dag b/dag/gunbc/source_root_eval_driver_seed_growth.dag index 242e50d7054..adb3873defc 100644 --- a/dag/gunbc/source_root_eval_driver_seed_growth.dag +++ b/dag/gunbc/source_root_eval_driver_seed_growth.dag @@ -21,7 +21,7 @@ data source_root_eval_driver_seed_growth_justification: SeedGrowthJustification } ], - reason: "FILESYSTEM PORTION REMOVED: gunbc.source_root_read owns traversal and typed read refusal through the existing Filesystem service, and v2.compiler.source_authority source_root_ingest_from_files constructs witnesses. emit_host_source_root_read_rs now only binds that handler and transports its outcome. NativeCliDriver calls v2_cli_main once; the eval driver still retains the other obligations below, so this row does not retire. walk_cli_door additionally executes missing-root and unreadable-source controls against the built CLI, requiring exit 2, empty stdout, and a located acquisition cause. The historical enumeration follows; its filesystem traversal and byte-read portion is superseded by this statement. One hand-authored declaration renders the SourceRootEvalDriver's main.rs as target-language text: roughly 500 lines of Rust spelled as string literals inside a .dag concat, not emitter logic over Nodes. It is a single declaration by the citable count and one program by the real one, and the gap between those two numbers is the point of this row. WHAT IS IRREDUCIBLY HOST here: argv, the source-root walk and byte reads, the monotonic and wall clocks, the /proc memory reading, stdout and stderr, and the process exit status. Nothing in .dag can perform those, and the driver exists to own exactly that boundary (std.compiler_entry SourceRootEvalDriver). WHAT IS EXPRESSIBLE IN .dag AND STILL RETAINED, each waiting on a named capability rather than on effort: the host-facts TSV decode (read_host_facts, host_fact, host_fact_int), which needs the ingest direction of the one grammar to produce NativeLaneHostFacts from bytes; the [native-cost-partition] JSON rendering, whose ROW SET and reconcile verdict are already a .dag authority this main calls (std.compiler_entry NativeDriverExclusiveRows, native_driver_cost_account) so that only the rendering is retained; and the THREE-mode orchestration (run_census, run_census_resolve, run_adjudication: phase order, refusal arms, terminal marker), which needs a .dag driver that can receive host effects as values. The third mode was added by the whole-tree census-resolve cut, and it is named here rather than left to be discovered because this row's reason is the standing enumeration of what is retained: a mode that is not in it is hand-authored Rust no row accounts for. What that cut did NOT do is grow the hand-authored DECISION surface -- the roster, the per-module verdict and the occurrence-grain rows are v2.compiler.compile folds (native_census_modules, native_census_module_resolution, native_census_residual_rows), and the mode is the same loop-and-print shape the other two already are, so the retained program grew by an orchestration arm and not by a second place where resolution is decided. WHAT THE INSTRUMENT HARNESS ADDS, ENUMERATED HERE BECAUSE THIS ROW'S OWN STANDARD DEMANDS IT (2026-09-21, review 69637). The sentence above says this reason is the standing enumeration of what is retained and that a mode absent from it is hand-authored Rust no row accounts for. v1_compiler.cli_run.native_lane_runner gained roughly 560 lines that were not enumerated: walk_eval_driver_door and walk_cli_door (the two instruments' entrypoint-execution controls), run_cli_door (a spawn whose stdout contract is the CLI driver's, not the eval driver's, so it cannot share run_native_binary), adjudicate_cli_emit_probe with cli_refusal_determining_reason and CliEmitProbeVerdict (the emit probe's closed partition over a termination plus a rendered refusal), cli_door_member_arm and CliDoorMemberArm (gunbc#12218: the probe reads the fixture member's arm out of the door's ClosureEmission carrier, so the emitted text it judges is that member's and never stdout as a whole; decoding is host-side because the carrier arrives as a spawned process's stdout, and it moves with the adjudication the day a .dag driver receives a process termination as a value), and a #[cfg(test)] module carrying their discriminating controls. gunbc#12207 added one more, emitted_text_compiles_as_rust: the emit probe's exit-0 arm now requires the door's text to name the fixture's declaration, carry its value and be accepted by the build's own rustc, and that last test is a spawn of the compiler over the emitted text -- host effect, the same kind as the door spawns, handed to the pure adjudication as a function so the partition stays a fold over values. ALL OF IT IS HOST EFFECT OR ADJUDICATION OVER ONE: spawning a built binary, reading its termination. It sits under the same reachability limit this row already states -- the required floor's hermetic envelope refuses host effects, so a .dag witness whose subject is a subprocess termination is counted executed while its assertion never runs. WHAT OF IT IS EXPRESSIBLE IN .dag AND STILL RETAINED, named rather than left implicit: the emit probe's ADJUDICATION is a pure fold over a status and two strings and wants no host at all -- it is written in Rust only because its inputs are produced by a spawn on this side of the boundary, and it moves the day a .dag driver can receive a process termination as a value, which is the same capability this row's trigger already names. The SPAWNS are irreducibly host. THE ENUMERATION IS THE POINT: a later reader counting retained Rust against this row will now find these, and a mode added beside them without a row entry is the defect this sentence exists to make visible. WHAT THE NATIVE FRONTIER RATCHET ADDS (2026-09-23), ENUMERATED ON THE SAME STANDARD. In the rendered adjudicate main: one call to gunbc.native_frontier_ratchet native_frontier_verdict beside native_route_admission, its word on the terminal marker, and two stderr loops printing native_frontier_report_lines and native_frontier_proposal_file_lines. It is orchestration and printing only: the verdict, the lines and the proposed roster file are .dag folds. In the host harness (v1_compiler.cli_run.native_lane_runner): the marker's `frontier` field, required on an adjudicate marker, and run_v2_native_frontier, which carries that word out. In v1_compiler.target_invocation_host: the V2NativeFrontier producer arm, a closed match of the word to a termination. THE LIVE PROGRAM RETIRING IT is the one this row already names, v2.cli.compile_cli's NativeCliDriver: the rendered main becomes one call into a .dag fold that receives host effects as values. At that point the frontier print loops and the marker field go with the rest of the orchestration, and nothing here needs a separate trigger. + reason: "FILESYSTEM PORTION REMOVED: gunbc.source_root_read owns traversal and typed read refusal through the existing Filesystem service, and v2.compiler.source_authority source_root_ingest_from_files constructs witnesses. emit_host_source_root_read_rs now only binds that handler and transports its outcome. NativeCliDriver calls v2_cli_main once; the eval driver still retains the other obligations below, so this row does not retire. walk_cli_door additionally executes missing-root and unreadable-source controls against the built CLI, requiring exit 2, empty stdout, and a located acquisition cause. The historical enumeration follows; its filesystem traversal and byte-read portion is superseded by this statement. One hand-authored declaration renders the SourceRootEvalDriver's main.rs as target-language text: roughly 500 lines of Rust spelled as string literals inside a .dag concat, not emitter logic over Nodes. It is a single declaration by the citable count and one program by the real one, and the gap between those two numbers is the point of this row. WHAT IS IRREDUCIBLY HOST here: argv, the source-root walk and byte reads, the monotonic and wall clocks, the /proc memory reading, stdout and stderr, and the process exit status. Nothing in .dag can perform those, and the driver exists to own exactly that boundary (std.compiler_entry SourceRootEvalDriver). WHAT IS EXPRESSIBLE IN .dag AND STILL RETAINED, each waiting on a named capability rather than on effort: the host-facts TSV decode (read_host_facts, host_fact, host_fact_int), which needs the ingest direction of the one grammar to produce NativeLaneHostFacts from bytes; the [native-cost-partition] JSON rendering, whose ROW SET and reconcile verdict are already a .dag authority this main calls (std.compiler_entry NativeDriverExclusiveRows, native_driver_cost_account) so that only the rendering is retained; and the THREE-mode orchestration (run_census, run_census_resolve, run_adjudication: phase order, refusal arms, terminal marker), which needs a .dag driver that can receive host effects as values. The third mode was added by the whole-tree census-resolve cut, and it is named here rather than left to be discovered because this row's reason is the standing enumeration of what is retained: a mode that is not in it is hand-authored Rust no row accounts for. What that cut did NOT do is grow the hand-authored DECISION surface -- the roster, the per-module verdict and the occurrence-grain rows are v2.compiler.compile folds (native_census_modules, native_census_module_resolution, native_census_residual_rows), and the mode is the same loop-and-print shape the other two already are, so the retained program grew by an orchestration arm and not by a second place where resolution is decided. WHAT THE INSTRUMENT HARNESS ADDS, ENUMERATED HERE BECAUSE THIS ROW'S OWN STANDARD DEMANDS IT (2026-09-21, review 69637). The sentence above says this reason is the standing enumeration of what is retained and that a mode absent from it is hand-authored Rust no row accounts for. v1_compiler.cli_run.native_lane_runner gained roughly 560 lines that were not enumerated: walk_eval_driver_door and walk_cli_door (the two instruments' entrypoint-execution controls), run_cli_door (a spawn whose stdout contract is the CLI driver's, not the eval driver's, so it cannot share run_native_binary), adjudicate_cli_emit_probe with cli_refusal_determining_reason and CliEmitProbeVerdict (the emit probe's closed partition over a termination plus a rendered refusal), cli_door_member_arm and CliDoorMemberArm (gunbc#12218: the probe reads the fixture member's arm out of the door's ClosureEmission carrier, so the emitted text it judges is that member's and never stdout as a whole; decoding is host-side because the carrier arrives as a spawned process's stdout, and it moves with the adjudication the day a .dag driver receives a process termination as a value), and a #[cfg(test)] module carrying their discriminating controls. gunbc#13590 added walk_native_ingest_layout_controls on that same walk_cli_door instrument: four inhabitance spawns of the built CLI over discovering --source-root layout fixtures (unrecognized copied root, /src/ under a dag root, two admitted roots, duplicate module naming both files). Same host kind as walk_cli_door — spawn and read termination — so it is enumerated here rather than a second SeedGrowthJustification. gunbc#12207 added one more, emitted_text_compiles_as_rust: the emit probe's exit-0 arm now requires the door's text to name the fixture's declaration, carry its value and be accepted by the build's own rustc, and that last test is a spawn of the compiler over the emitted text -- host effect, the same kind as the door spawns, handed to the pure adjudication as a function so the partition stays a fold over values. ALL OF IT IS HOST EFFECT OR ADJUDICATION OVER ONE: spawning a built binary, reading its termination. It sits under the same reachability limit this row already states -- the required floor's hermetic envelope refuses host effects, so a .dag witness whose subject is a subprocess termination is counted executed while its assertion never runs. WHAT OF IT IS EXPRESSIBLE IN .dag AND STILL RETAINED, named rather than left implicit: the emit probe's ADJUDICATION is a pure fold over a status and two strings and wants no host at all -- it is written in Rust only because its inputs are produced by a spawn on this side of the boundary, and it moves the day a .dag driver can receive a process termination as a value, which is the same capability this row's trigger already names. The SPAWNS are irreducibly host. THE ENUMERATION IS THE POINT: a later reader counting retained Rust against this row will now find these, and a mode added beside them without a row entry is the defect this sentence exists to make visible. WHAT THE NATIVE FRONTIER RATCHET ADDS (2026-09-23), ENUMERATED ON THE SAME STANDARD. In the rendered adjudicate main: one call to gunbc.native_frontier_ratchet native_frontier_verdict beside native_route_admission, its word on the terminal marker, and two stderr loops printing native_frontier_report_lines and native_frontier_proposal_file_lines. It is orchestration and printing only: the verdict, the lines and the proposed roster file are .dag folds. In the host harness (v1_compiler.cli_run.native_lane_runner): the marker's `frontier` field, required on an adjudicate marker, and run_v2_native_frontier, which carries that word out. In v1_compiler.target_invocation_host: the V2NativeFrontier producer arm, a closed match of the word to a termination. THE LIVE PROGRAM RETIRING IT is the one this row already names, v2.cli.compile_cli's NativeCliDriver: the rendered main becomes one call into a .dag fold that receives host effects as values. At that point the frontier print loops and the marker field go with the rest of the orchestration, and nothing here needs a separate trigger. THE NET SEED MOTION OF THE CHANGE THAT ADDS THIS IS FAVOURABLE AND IS NOT AN EXCUSE: src/v1/stage0/src/cli_run/native_lane_runner.rs loses about 859 lines as the universe derivation, the fan-out and the admission move into the emitted compiler, and both v1-interpreter brackets are deleted at the root rather than retained as a fallback. A shrinking neighbour does not discharge this declaration; it only means the lane is moving the right way while this piece has not moved yet.", @@ -29,5 +29,5 @@ THE NET SEED MOTION OF THE CHANGE THAT ADDS THIS IS FAVOURABLE AND IS NOT AN EXC trigger: "Delete this rendered main when a .dag driver function can receive the host operations above AS VALUES — argv, the walked and read source roots, the two clocks, the /proc reading, the two output sinks and the exit status — so that the rendered main becomes one call into that fold and the phase order, the refusal arms and the terminal marker are decided in .dag. That is the capability, and it retires the whole row. WHAT DOES NOT RETIRE IT, named because each is the tempting smaller artifact: migrating the TSV decode alone, which leaves the orchestration hand-authored; rendering the cost row from .dag alone, which is already half-done since the row set and the verdict are a .dag authority and only the JSON rendering is retained; and shrinking the template by moving Rust text into a second emitter helper, which relocates the hand-authored program without reducing it.", - current_boundary: "v1.compiler.emit_rust emit_source_root_eval_driver_main_rs -> the rendered main.rs of the emitted closure crate -> claim_executor --v2-native-route (v1_compiler.cli_run.native_lane_runner run_required_v2_native), which spawns that binary in census and adjudicate modes; and gunbc test //gunbc/instruments:self-host (v1_compiler.cli_run.native_lane_runner walk_eval_driver_door), which spawns it twice in census mode as that instrument's accepting and refusing controls; v1_compiler.cli_run.native_lane_runner walk_cli_door, run_cli_door, adjudicate_cli_emit_probe, cli_refusal_determining_reason, cli_door_member_arm and emitted_text_compiles_as_rust, the instrument-side harness enumerated in this row's reason" + current_boundary: "v1.compiler.emit_rust emit_source_root_eval_driver_main_rs -> the rendered main.rs of the emitted closure crate -> claim_executor --v2-native-route (v1_compiler.cli_run.native_lane_runner run_required_v2_native), which spawns that binary in census and adjudicate modes; and gunbc test //gunbc/instruments:self-host (v1_compiler.cli_run.native_lane_runner walk_eval_driver_door), which spawns it twice in census mode as that instrument's accepting and refusing controls; v1_compiler.cli_run.native_lane_runner walk_cli_door, walk_native_ingest_layout_controls, run_cli_door, adjudicate_cli_emit_probe, cli_refusal_determining_reason, cli_door_member_arm and emitted_text_compiles_as_rust, the instrument-side harness enumerated in this row's reason" } diff --git a/dag/gunbc/source_root_read.dag b/dag/gunbc/source_root_read.dag index dfa7317f24e..49cf2da71a3 100644 --- a/dag/gunbc/source_root_read.dag +++ b/dag/gunbc/source_root_read.dag @@ -15,11 +15,12 @@ import std.optional { Absent, Present } // directory. Only the host's NotADirectory observation admits a candidate as a file; every // other failure stops the walk. In particular a disappearing entry or a broken symlink cannot // silently shrink the compiler's source population. The transport refuses lossy name encodings. -type SourceRootWalkTask { path: String, root: Bool } +type SourceRootWalkTask { path: String, root: Bool, origin: String } +type SourceRootWalkedPath { path: String, origin: String } type SourceRootPaths - = SourceRootPathsRead { paths: List } + = SourceRootPathsRead { paths: List } | SourceRootPathsRefused { path: String, kind: String, cause: String } -type SourceRootFile { path: String, content: String } +type SourceRootFile { path: String, content: String, origin: String } type SourceRootFiles = SourceRootFilesRead { files: List } | SourceRootFilesRefused { path: String, kind: String, cause: String } @@ -39,9 +40,9 @@ fn source_root_candidate_is_file(root: Bool, error_kind: String) -> Bool { } } -fn source_root_walk(pending: List, paths: List) -> SourceRootPaths { +fn source_root_walk(pending: List, paths: List) -> SourceRootPaths { match pending |> first { - Absent => SourceRootPathsRead { paths: paths |> sort_by(path => path) } + Absent => SourceRootPathsRead { paths: paths |> sort_by(walked => walked.path) } Present { value: task } => { let rest = pending.skip(n: 1) let listed = Filesystem.List(path: task.path) @@ -49,13 +50,17 @@ fn source_root_walk(pending: List, paths: List) -> S entries: listed.entries, error: listed.error) { FilesystemDirectoryListed(listing) => { let children = filesystem_listing_entry_names(listing: listing) |> map(name => SourceRootWalkTask { - path: source_root_child_path(directory: task.path, name: name), root: false + path: source_root_child_path(directory: task.path, name: name), + root: false, + origin: task.origin }) source_root_walk(pending: concat(children, rest), paths: paths) } FilesystemDirectoryListingRefused { directory: _, error: cause } => if source_root_candidate_is_file(root: task.root, error_kind: listed.error_kind) { - let next = if task.path.ends_with(suffix: ".dag") { concat(paths, [task.path]) } else { paths } + let next = if task.path.ends_with(suffix: ".dag") { + concat(paths, [SourceRootWalkedPath { path: task.path, origin: task.origin }]) + } else { paths } source_root_walk(pending: rest, paths: next) } else { SourceRootPathsRefused { path: task.path, kind: listed.error_kind, cause: cause } @@ -73,13 +78,13 @@ fn source_root_read_file(path: String) -> FilesystemExactRead { error: read.error, error_kind: read.error_kind) } -fn source_root_read_paths(pending: List, files: List) -> SourceRootFiles { +fn source_root_read_paths(pending: List, files: List) -> SourceRootFiles { match pending |> first { Absent => SourceRootFilesRead { files: files } - Present { value: path } => match source_root_read_file(path: path) { + Present { value: walked } => match source_root_read_file(path: walked.path) { FilesystemExactPathRead { path: observed, content: content } => source_root_read_paths(pending: pending.skip(n: 1), - files: concat(files, [SourceRootFile { path: observed, content: content }])) + files: concat(files, [SourceRootFile { path: observed, content: content, origin: walked.origin }])) FilesystemExactPathAbsent { path: observed } => SourceRootFilesRefused { path: observed, kind: "not_found", cause: "source disappeared before it could be read" } FilesystemExactPathUnreadable { path: observed, kind: kind, error: cause } => @@ -91,7 +96,10 @@ fn source_root_read_paths(pending: List, files: List) -> } fn source_root_read(roots: List) -> SourceRootFiles { - match source_root_walk(pending: roots |> map(path => SourceRootWalkTask { path: path, root: true }), paths: []) { + match source_root_walk( + pending: roots |> map(path => SourceRootWalkTask { path: path, root: true, origin: path }), + paths: [] + ) { SourceRootPathsRefused { path: path, kind: kind, cause: cause } => SourceRootFilesRefused { path: path, kind: kind, cause: cause } SourceRootPathsRead { paths: paths } => source_root_read_paths(pending: paths, files: []) diff --git a/fixtures/native_cli_door/door_probe.dag b/fixtures/native_cli_door/dag/door_probe.dag similarity index 94% rename from fixtures/native_cli_door/door_probe.dag rename to fixtures/native_cli_door/dag/door_probe.dag index c441246f4f7..7c20b4831c5 100644 --- a/fixtures/native_cli_door/door_probe.dag +++ b/fixtures/native_cli_door/dag/door_probe.dag @@ -7,7 +7,7 @@ module fixture.native_cli_door.door_probe // walked through, which DESIGN section 5 names as specification-without-execution: a green that // establishes the closure typechecks and nothing about whether the program runs. This file is the // argv the built binary is handed so that it does run: `emit --entry -// fixture.native_cli_door.door_probe --source-root fixtures/native_cli_door`. +// fixture.native_cli_door.door_probe --source-root fixtures/native_cli_door/dag`. // // IT HAS NO IMPORTS, for the same reason `fixture.closure.rustc_green_probe` has none: the // admission's subject resolves against the validated roots the ingest produced, so a module whose @@ -17,7 +17,8 @@ module fixture.native_cli_door.door_probe // // IT IS ITS OWN DIRECTORY AND NOT A FILE IN AN EXISTING FIXTURE ROOT, because the CLI's source // root is walked RECURSIVELY for every `.dag` file under it; sharing a directory would make the -// control's ingest a function of what some other fixture's author adds next to it. +// control's ingest a function of what some other fixture's author adds next to it. The walk +// argument is the dag tree (`.../dag`), not a parent of mixed trees. // // THE DECLARATION'S NAME AND VALUE ARE WHAT THE CONTROL READS. v2 lowers this `data` declaration to // a named member whose body is the literal, and the door renders it through the Rust target's diff --git a/fixtures/native_ingest_copied_single_root/dag/copied_dag.dag b/fixtures/native_ingest_copied_single_root/dag/copied_dag.dag new file mode 100644 index 00000000000..8d779e29278 --- /dev/null +++ b/fixtures/native_ingest_copied_single_root/dag/copied_dag.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.copied_dag + +data native_ingest_copied_dag_value: Int = 1 diff --git a/fixtures/native_ingest_copied_single_root/src/v2/copied_v2.dag b/fixtures/native_ingest_copied_single_root/src/v2/copied_v2.dag new file mode 100644 index 00000000000..4d259ce7c09 --- /dev/null +++ b/fixtures/native_ingest_copied_single_root/src/v2/copied_v2.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.copied_v2 + +data native_ingest_copied_v2_value: Int = 2 diff --git a/fixtures/native_ingest_duplicate_module/dag/collision_a.dag b/fixtures/native_ingest_duplicate_module/dag/collision_a.dag new file mode 100644 index 00000000000..1538ef552a1 --- /dev/null +++ b/fixtures/native_ingest_duplicate_module/dag/collision_a.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.collision + +data native_ingest_collision_a_value: Int = 1 diff --git a/fixtures/native_ingest_duplicate_module/dag/collision_b.dag b/fixtures/native_ingest_duplicate_module/dag/collision_b.dag new file mode 100644 index 00000000000..6e4a6710d0f --- /dev/null +++ b/fixtures/native_ingest_duplicate_module/dag/collision_b.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.collision + +data native_ingest_collision_b_value: Int = 2 diff --git a/fixtures/native_ingest_src_in_dag/dag/pkg/src/leaf.dag b/fixtures/native_ingest_src_in_dag/dag/pkg/src/leaf.dag new file mode 100644 index 00000000000..9761f2f9c71 --- /dev/null +++ b/fixtures/native_ingest_src_in_dag/dag/pkg/src/leaf.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.src_in_dag + +data native_ingest_src_in_dag_value: Int = 1 diff --git a/fixtures/native_ingest_two_roots/dag/dag_entry.dag b/fixtures/native_ingest_two_roots/dag/dag_entry.dag new file mode 100644 index 00000000000..1e2fd471527 --- /dev/null +++ b/fixtures/native_ingest_two_roots/dag/dag_entry.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.dag_entry + +data native_ingest_dag_entry_value: Int = 1 diff --git a/fixtures/native_ingest_two_roots/src/v2/v2_other.dag b/fixtures/native_ingest_two_roots/src/v2/v2_other.dag new file mode 100644 index 00000000000..69338a89ba1 --- /dev/null +++ b/fixtures/native_ingest_two_roots/src/v2/v2_other.dag @@ -0,0 +1,3 @@ +module fixture.native_ingest.v2_other + +data native_ingest_v2_other_value: Int = 2 diff --git a/src/v1/05_emit_rust.dag b/src/v1/05_emit_rust.dag index 87ac7976dcf..5af22c8a693 100644 --- a/src/v1/05_emit_rust.dag +++ b/src/v1/05_emit_rust.dag @@ -18343,8 +18343,12 @@ fn emit_host_source_root_read_rs(crate_name: String) -> String { " let observed = runtime.block_on(", crate_name, "::gunbc_source_root_read::source_root_read(Rc::new(source_roots.iter().cloned().collect()), &filesystem));\n", " match observed {\n", " Ok(files) => match &*files {\n", - " ", crate_name, "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRead { files } =>\n", - " ", crate_name, "::v2_compiler_source_authority::source_root_ingest_from_files(files.clone()).iter().cloned().collect(),\n", + " ", crate_name, "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRead { files } => match &*", crate_name, "::v2_compiler_source_authority::source_root_ingest_from_files(files.clone()) {\n", + " ", crate_name, "::v2_compiler_source_authority::SourceRootIngestFromFiles::SourceRootIngestFromFilesBuilt { ingest } => ingest.iter().cloned().collect(),\n", + " ", crate_name, "::v2_compiler_source_authority::SourceRootIngestFromFiles::SourceRootIngestFromFilesUnrecognizedRoot { argument, path } => {\n", + " eprintln!(\"REFUSED: source root is not a dag or src/v2 tree: {} (file {})\", argument, path); std::process::exit(2);\n", + " }\n", + " },\n", " ", crate_name, "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRefused { path, kind, cause } => {\n", " eprintln!(\"REFUSED: could not read source root at {} [{}]: {}\", path, kind, cause); std::process::exit(2);\n", " }\n", diff --git a/src/v1/stage0/src/cli_run/native_lane_runner.rs b/src/v1/stage0/src/cli_run/native_lane_runner.rs index 65fe432ead9..1d8dd3ef7fb 100644 --- a/src/v1/stage0/src/cli_run/native_lane_runner.rs +++ b/src/v1/stage0/src/cli_run/native_lane_runner.rs @@ -80,8 +80,9 @@ const MALFORMED_SPECIMEN_COMMITTED: &str = "fixtures/native_lane_malformed/poiso /// workspace-relative like every path this harness hands the binary (its working directory is /// the workspace root). The receipt records the observed refusal path; the admission authority /// requires it non-empty, and this harness requires it to name the materialized specimen. -const MALFORMED_CONTROL_ROOT: &str = "target/v2-native-lane/malformed-control-root"; -const MALFORMED_MATERIALIZED_PATH: &str = "target/v2-native-lane/malformed-control-root/poison.dag"; +const MALFORMED_CONTROL_ROOT: &str = "target/v2-native-lane/malformed-control-root/dag"; +const MALFORMED_MATERIALIZED_PATH: &str = + "target/v2-native-lane/malformed-control-root/dag/poison.dag"; /// THE TWO DOORS' CONTROL INPUTS, AS THE THREE FACTS THEIR ARGV IS BUILT FROM. /// @@ -101,7 +102,12 @@ const MALFORMED_MATERIALIZED_PATH: &str = "target/v2-native-lane/malformed-contr /// the text not Rust (gunbc.recurring_failure_mode closure_emit_renders_an_arrow_without_its_body). /// So an exit 0 now has to carry the declaration's NAME and its VALUE in text a Rust compiler /// ACCEPTS; anything less is that class returning, not an emission. -const WELL_FORMED_CONTROL_ROOT: &str = "fixtures/native_cli_door"; +const WELL_FORMED_CONTROL_ROOT: &str = "fixtures/native_cli_door/dag"; +const NATIVE_INGEST_COPIED_SINGLE_ROOT: &str = "fixtures/native_ingest_copied_single_root"; +const NATIVE_INGEST_SRC_IN_DAG_ROOT: &str = "fixtures/native_ingest_src_in_dag/dag"; +const NATIVE_INGEST_TWO_ROOTS_DAG: &str = "fixtures/native_ingest_two_roots/dag"; +const NATIVE_INGEST_TWO_ROOTS_V2: &str = "fixtures/native_ingest_two_roots/src/v2"; +const NATIVE_INGEST_DUPLICATE_MODULE_ROOT: &str = "fixtures/native_ingest_duplicate_module/dag"; const CLI_DOOR_ENTRY_MODULE: &str = "fixture.native_cli_door.door_probe"; const CLI_DOOR_EMITTED_WITNESS: &str = "native_cli_door_probe_value"; const CLI_DOOR_EMITTED_VALUE: &str = "606060"; @@ -2402,11 +2408,129 @@ fn walk_cli_door( } } eprintln!("v2-native-cli: filesystem controls refused absent root and unreadable source with typed, located causes"); + walk_native_ingest_layout_controls(binary, workspace)?; let refusal_status = i64::from(refused.status.unwrap_or_default()); eprintln!("v2-native-cli: door refused as cli_no_entry — exit {refusal_status}"); Ok((door_exit_status, emitted_bytes, refusal_status)) } +/// THE LAYOUT REDS THE PARENT ASKED THE NATIVE DOOR TO EXECUTE. Claims over `v2_cli_run` supply +/// ingest at that fold; these walks are the inhabitance that the discovering --source-root, not +/// the file spelling, tags the tree — deleting any of the four fixture roots makes this control +/// fail. +/// +/// SEED DELTA (ctrl hand-Rust receipt): extend `walk_cli_door`; no new production route and no +/// deleted scaffold. Accounted on `gunbc.source_root_eval_driver_seed_growth` +/// `source_root_eval_driver_seed_growth_justification` (lane `v1-hand-queue-drain`). Net seed is +/// this inhabitance walk over existing `run_cli_door`. +fn walk_native_ingest_layout_controls(binary: &Path, workspace: &Path) -> Result<(), String> { + let copied = workspace.join(NATIVE_INGEST_COPIED_SINGLE_ROOT); + let src_in_dag = workspace.join(NATIVE_INGEST_SRC_IN_DAG_ROOT); + let two_dag = workspace.join(NATIVE_INGEST_TWO_ROOTS_DAG); + let two_v2 = workspace.join(NATIVE_INGEST_TWO_ROOTS_V2); + let dup = workspace.join(NATIVE_INGEST_DUPLICATE_MODULE_ROOT); + for (label, path) in [ + ("copied-single-root", copied.as_path()), + ("src-in-dag", src_in_dag.as_path()), + ("two-roots-dag", two_dag.as_path()), + ("two-roots-v2", two_v2.as_path()), + ("duplicate-module", dup.as_path()), + ] { + if !path.is_dir() { + return Err(format!( + "V2-NATIVE REFUSAL cause=NativeIngestLayoutRootAbsent — {label} {} is not a directory", + path.display() + )); + } + } + + let copied_obs = run_cli_door( + binary, + &[ + "emit".into(), + "--entry".into(), + "fixture.native_ingest.copied_dag".into(), + "--source-root".into(), + copied.display().to_string(), + ], + )?; + if copied_obs.status != Some(CLI_DOOR_USAGE_REFUSAL_EXIT) + || !copied_obs.stdout.is_empty() + || !copied_obs + .stderr + .contains("source root is not a dag or src/v2 tree") + || !copied_obs.stderr.contains(&copied.display().to_string()) + { + return Err(format!( + "V2-NATIVE REFUSAL cause=NativeIngestCopiedRootNotUnrecognized — status={:?} stderr={}", + copied_obs.status, + copied_obs.stderr.trim() + )); + } + + let src_obs = run_cli_door( + binary, + &[ + "emit".into(), + "--entry".into(), + "fixture.native_ingest.src_in_dag".into(), + "--source-root".into(), + src_in_dag.display().to_string(), + ], + )?; + if src_obs.status != Some(0) || src_obs.stdout.is_empty() { + return Err(format!( + "V2-NATIVE REFUSAL cause=NativeIngestSrcInDagPathMisclassified — status={:?} stderr={}", + src_obs.status, + src_obs.stderr.trim() + )); + } + + let two_obs = run_cli_door( + binary, + &[ + "emit".into(), + "--entry".into(), + "fixture.native_ingest.dag_entry".into(), + "--source-root".into(), + two_dag.display().to_string(), + "--source-root".into(), + two_v2.display().to_string(), + ], + )?; + if two_obs.status != Some(0) || two_obs.stdout.is_empty() { + return Err(format!( + "V2-NATIVE REFUSAL cause=NativeIngestTwoRootsDidNotEmit — status={:?} stderr={}", + two_obs.status, + two_obs.stderr.trim() + )); + } + + let dup_obs = run_cli_door( + binary, + &[ + "emit".into(), + "--entry".into(), + "fixture.native_ingest.collision".into(), + "--source-root".into(), + dup.display().to_string(), + ], + )?; + if dup_obs.status != Some(CLI_DOOR_REFUSAL_EXIT) + || !dup_obs.stderr.contains("closure_census_duplicate_module") + || !dup_obs.stderr.contains("collision_a.dag") + || !dup_obs.stderr.contains("collision_b.dag") + { + return Err(format!( + "V2-NATIVE REFUSAL cause=NativeIngestDuplicateDidNotNameBothFiles — status={:?} stderr={}", + dup_obs.status, + dup_obs.stderr.trim() + )); + } + eprintln!("v2-native-cli: native-ingest layout controls held (unrecognized copied root, /src/ under dag, two roots, both-files duplicate)"); + Ok(()) +} + /// THE GENERATION-ONE EXECUTABLE OUTLIVES THE RUN, because generation two is that executable /// emitting `v2.compiler.compile` and nothing else may stand in for it. The probe root is NOT /// retained: once the executable is copied out and its copy re-hashes to the identity the run diff --git a/src/v1/stage0/src/v1_compiler_emit_rust.rs b/src/v1/stage0/src/v1_compiler_emit_rust.rs index 052115df96b..aa129c36ec3 100644 --- a/src/v1/stage0/src/v1_compiler_emit_rust.rs +++ b/src/v1/stage0/src/v1_compiler_emit_rust.rs @@ -41671,7 +41671,7 @@ pub fn emit_direct_ingest_driver_main_rs( } pub fn emit_host_source_root_read_rs(crate_name: String) -> String { - v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("fn read_ingest(source_roots: &[String]) -> Vec> {\n".to_string(), " let filesystem = ".to_string()), crate_name.clone()), "::extdeps_filesystem_filesystem_io::Filesystem::new(Default::default());\n".to_string()), " let runtime = match tokio::runtime::Builder::new_current_thread().build() { Ok(runtime) => runtime, Err(cause) => { eprintln!(\"REFUSED: native filesystem executor: {}\", cause); std::process::exit(2); } };\n".to_string()), " let observed = runtime.block_on(".to_string()), crate_name.clone()), "::gunbc_source_root_read::source_root_read(Rc::new(source_roots.iter().cloned().collect()), &filesystem));\n".to_string()), " match observed {\n".to_string()), " Ok(files) => match &*files {\n".to_string()), " ".to_string()), crate_name.clone()), "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRead { files } =>\n".to_string()), " ".to_string()), crate_name.clone()), "::v2_compiler_source_authority::source_root_ingest_from_files(files.clone()).iter().cloned().collect(),\n".to_string()), " ".to_string()), crate_name.clone()), "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRefused { path, kind, cause } => {\n".to_string()), " eprintln!(\"REFUSED: could not read source root at {} [{}]: {}\", path, kind, cause); std::process::exit(2);\n".to_string()), " }\n".to_string()), " },\n".to_string()), " Err(cause) => { eprintln!(\"REFUSED: native filesystem transport: {}\", cause); std::process::exit(2); }\n".to_string()), " }\n".to_string()), "}\n".to_string()) + v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("fn read_ingest(source_roots: &[String]) -> Vec> {\n".to_string(), " let filesystem = ".to_string()), crate_name.clone()), "::extdeps_filesystem_filesystem_io::Filesystem::new(Default::default());\n".to_string()), " let runtime = match tokio::runtime::Builder::new_current_thread().build() { Ok(runtime) => runtime, Err(cause) => { eprintln!(\"REFUSED: native filesystem executor: {}\", cause); std::process::exit(2); } };\n".to_string()), " let observed = runtime.block_on(".to_string()), crate_name.clone()), "::gunbc_source_root_read::source_root_read(Rc::new(source_roots.iter().cloned().collect()), &filesystem));\n".to_string()), " match observed {\n".to_string()), " Ok(files) => match &*files {\n".to_string()), " ".to_string()), crate_name.clone()), "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRead { files } => match &*".to_string()), crate_name.clone()), "::v2_compiler_source_authority::source_root_ingest_from_files(files.clone()) {\n".to_string()), " ".to_string()), crate_name.clone()), "::v2_compiler_source_authority::SourceRootIngestFromFiles::SourceRootIngestFromFilesBuilt { ingest } => ingest.iter().cloned().collect(),\n".to_string()), " ".to_string()), crate_name.clone()), "::v2_compiler_source_authority::SourceRootIngestFromFiles::SourceRootIngestFromFilesUnrecognizedRoot { argument, path } => {\n".to_string()), " eprintln!(\"REFUSED: source root is not a dag or src/v2 tree: {} (file {})\", argument, path); std::process::exit(2);\n".to_string()), " }\n".to_string()), " },\n".to_string()), " ".to_string()), crate_name.clone()), "::gunbc_source_root_read::SourceRootFiles::SourceRootFilesRefused { path, kind, cause } => {\n".to_string()), " eprintln!(\"REFUSED: could not read source root at {} [{}]: {}\", path, kind, cause); std::process::exit(2);\n".to_string()), " }\n".to_string()), " },\n".to_string()), " Err(cause) => { eprintln!(\"REFUSED: native filesystem transport: {}\", cause); std::process::exit(2); }\n".to_string()), " }\n".to_string()), "}\n".to_string()) } #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] diff --git a/src/v2/cli/compile_cli.dag b/src/v2/cli/compile_cli.dag index bc326c90c25..d474b92b23b 100644 --- a/src/v2/cli/compile_cli.dag +++ b/src/v2/cli/compile_cli.dag @@ -11,7 +11,12 @@ import v2.compiler.self_host.closure_emission { closure_emission_refused_count, emit_closure_from_ingest_located } -import v2.compiler.source_authority { SourceRootIngest, source_root_ingest_from_files } +import v2.compiler.source_authority { + SourceRootIngest, + SourceRootIngestFromFilesBuilt, + SourceRootIngestFromFilesUnrecognizedRoot, + source_root_ingest_from_files +} import v2.cli.if_arm_reader_differential { IardCensus, IardCensusTaken, @@ -543,7 +548,21 @@ fn v2_cli_main(argv: FreeMonoid) -> CliRunOutcome { CliPlanRefused { reason: reason, detail: detail } => CliUsageRefused { reason: reason, detail: detail } CliPlanParsed { verb: _ } => match source_root_read(roots: v2_cli_plan_source_roots(plan: plan)) { SourceRootFilesRead { files: files } => - v2_cli_run(plan: plan, ingest: source_root_ingest_from_files(files: files)) + match source_root_ingest_from_files(files: files) { + SourceRootIngestFromFilesBuilt { ingest: ingest } => + v2_cli_run(plan: plan, ingest: ingest) + SourceRootIngestFromFilesUnrecognizedRoot { argument: argument, path: path } => + CliUsageRefused { + reason: ^cli_source_root_unrecognized, + detail: concat( + "source root is not a dag or src/v2 tree: ", + argument, + " (file ", + path, + ")" + ) + } + } SourceRootFilesRefused { path: path, kind: kind, cause: cause } => CliUsageRefused { reason: ^cli_source_root_read_refused, detail: concat("could not read source root at ", path, " [", kind, "]: ", cause) } diff --git a/src/v2/compiler/program_assembly.dag b/src/v2/compiler/program_assembly.dag index f0e276f9805..a20171b2fcd 100644 --- a/src/v2/compiler/program_assembly.dag +++ b/src/v2/compiler/program_assembly.dag @@ -574,7 +574,7 @@ fn program_assembly_ingest_scope(ingest: SourceRootIngest) -> SourceRefListDiges source_ref_list_digest_build(refs: fold_list( xs: ingest, empty: Empty, - cons: fn(acc, read) { list_snoc_item(xs: acc, item: source_ref_for_storage_path(path: read.artifact.file_path)) } + cons: fn(acc, read) { list_snoc_item(xs: acc, item: source_ref_for_storage_path(path: read.artifact.file_path, source_root: read.source_root)) } )) } diff --git a/src/v2/compiler/self_host/closure_emission.dag b/src/v2/compiler/self_host/closure_emission.dag index 1f14d07ab0d..519c7bf46dd 100644 --- a/src/v2/compiler/self_host/closure_emission.dag +++ b/src/v2/compiler/self_host/closure_emission.dag @@ -62,6 +62,7 @@ import v2.std.diagnostic { bind_outcome, diagnostics_fatal, diagnostics_fatal_reason, + diagnostics_singleton, non_empty_diagnostics_append, node_locus, outcome_accepted, @@ -77,7 +78,7 @@ import v2.std.resolution_policy { default_name_resolution_policy } import v2.std.symbol_index { SymbolIndex, empty_symbol_index } import v2.std.grammar { ParseTree } import v2.std.integer { Int } -import std.optional { Absent, Optional, Present } +import std.optional { Absent, Optional, Present, optional_absent, optional_present } import v2.std.text { String } import v2.compiler.refinement_discharge { infer_and_discharge } @@ -218,22 +219,23 @@ fn closure_ingest_step( bind_outcome( o: qualified_name_from_module_node(root: census.root), f: fn(module_qn) { - if closure_ingest_declares(files: acc.files, member_module: module_qn) { - outcome_rejected(d: closure_emission_diagnostic( - reason: ^closure_census_duplicate_module, - at: census.root - )) - } else { - outcome_accepted(value: ClosureIngest { - files: list_snoc_item(xs: acc.files, item: ClosureIngestFile { - module: module_qn, - parse_tree: artifact.tree, - census: census, - source_root: read.source_root - }), - index: source_root_index_insert(index: acc.index, module: module_qn, root: read.source_root), - alloc: artifact.alloc - }) + match closure_ingest_first_declaring(files: acc.files, member_module: module_qn) { + Present { value: first } => + closure_census_duplicate_module_outcome( + first: first, + second_root: census.root + ) + Absent => + outcome_accepted(value: ClosureIngest { + files: list_snoc_item(xs: acc.files, item: ClosureIngestFile { + module: module_qn, + parse_tree: artifact.tree, + census: census, + source_root: read.source_root + }), + index: source_root_index_insert(index: acc.index, module: module_qn, root: read.source_root), + alloc: artifact.alloc + }) } } ) @@ -309,8 +311,43 @@ fn closure_census_index(files: FreeMonoid) -> SymbolIndex { // would refuse a duplicate too (resolve_duplicate_module_name), but each member is resolved in a // context holding only itself, so that wall cannot fire here; the census is where the whole // population is in view, so the wall lives there (review of gunbc#12218 at 242b7af). -fn closure_ingest_declares(files: FreeMonoid, member_module: QualifiedName) -> Bool { - fold_list(xs: files, empty: false, cons: fn(found, f) { found || f.module == member_module }) +fn closure_ingest_first_declaring( + files: FreeMonoid, + member_module: QualifiedName +) -> Optional { + fold_list(xs: files, empty: optional_absent(), cons: fn(found, f) { + match found { + Present { value: _ } => found + Absent => + if f.module == member_module { + optional_present(value: f) + } else { + found + } + } + }) +} + +// BOTH FILES, because a collision is a two-place fact. Locating only the second file's module +// node left the first unnamed, and a later resolve diagnostic at an innocent token was then +// read as the cause. +fn closure_census_duplicate_module_diagnostics(first: Node, second: Node) -> NonEmptyDiagnostics { + non_empty_diagnostics_append( + a: diagnostics_singleton(d: closure_emission_diagnostic(reason: ^closure_census_duplicate_module, at: first)), + b: diagnostics_singleton(d: closure_emission_diagnostic(reason: ^closure_census_duplicate_module, at: second)) + ) +} + +fn closure_census_duplicate_module_outcome( + first: ClosureIngestFile, + second_root: Node +) -> Outcome { + Rejected { + diagnostics: closure_census_duplicate_module_diagnostics( + first: first.census.root, + second: second_root + ) + } } // EXACTLY ONE FILE, OR A TYPED REFUSAL. The census makes more than one unreachable, and it is refused diff --git a/src/v2/compiler/source_authority.dag b/src/v2/compiler/source_authority.dag index 4f449781656..10181adc8c2 100644 --- a/src/v2/compiler/source_authority.dag +++ b/src/v2/compiler/source_authority.dag @@ -25,7 +25,7 @@ import v2.extdeps.languages.dag { import v2.std.compilers.lexing { TokenStream } import v2.std.provenance { span_index_empty } import std.algebra { Empty, FreeMonoid, list_snoc_item } -import v2.std.algebra { fold_list, length } +import v2.std.algebra { HeadAbsent, HeadFound, fold_list, list_head, skip } import v2.std.artifact { Artifact, NodeArtifactProvenance, SourceFile } import v2.std.diagnostic { Accepted, @@ -483,18 +483,36 @@ fn source_ref_path(ref: SourceRef) -> String { ref.path } -fn source_root_for_storage_path(path: String) -> SourceRootRef { - if starts_with(s: path, prefix: "src/") { - V2Tree +// Tree identity is the --source-root argument that discovered the file, never a substring of +// the file's storage path. SourceRootRef has two inhabitants (the dag tree and the src/v2 +// tree); an argument names one of those directories or is unrecognized. A parent of both, a +// copied single-root dump, or any other spelling refuses rather than defaulting to DagTree. +type SourceRootArgumentAdmission + = SourceRootArgumentAdmitted { tree: SourceRootRef } + | SourceRootArgumentUnrecognized { argument: String } + +fn admit_source_root_argument(argument: String) -> SourceRootArgumentAdmission { + if (argument == "src/v2") + || (argument == "./src/v2") + || (argument == "src/v2/") + || argument.ends_with(suffix: "/src/v2") + || argument.ends_with(suffix: "/src/v2/") { + SourceRootArgumentAdmitted { tree: V2Tree } + } else if (argument == "dag") + || (argument == "./dag") + || (argument == "dag/") + || argument.ends_with(suffix: "/dag") + || argument.ends_with(suffix: "/dag/") { + SourceRootArgumentAdmitted { tree: DagTree } } else { - DagTree + SourceRootArgumentUnrecognized { argument: argument } } } -fn source_ref_for_storage_path(path: String) -> SourceRef { +fn source_ref_for_storage_path(path: String, source_root: SourceRootRef) -> SourceRef { SourceRef { path: path, - source_root: source_root_for_storage_path(path: path), + source_root: source_root, content_hash: content_hash_of_value(value: "selection-unpinned" as NonEmptyStr) } } @@ -1555,13 +1573,37 @@ fn source_authority_round_trip( ) } -// The native filesystem fold supplies observed bytes; provenance is constructed at the same -// authority as every other source witness. Neither rendered main owns this conversion. -fn source_root_ingest_from_files(files: List) -> SourceRootIngest { - files |> map(file => DagSourceReadWitness { - source: Medium { carried: file.content, fidelity: Lossless }, - artifact: Artifact { kind: SourceFile, id: file.path, file_path: file.path }, - compilation_unit: file.path, - source_root: source_root_for_storage_path(path: file.path) - }) +// The native filesystem fold supplies observed bytes and the discovering --source-root +// argument on each file. Tree identity is admitted from that argument. An unrecognized +// argument refuses; the file path is never classified. +type SourceRootIngestFromFiles + = SourceRootIngestFromFilesBuilt { ingest: SourceRootIngest } + | SourceRootIngestFromFilesUnrecognizedRoot { argument: String, path: String } + +fn source_root_ingest_from_files_go( + pending: List, + acc: SourceRootIngest +) -> SourceRootIngestFromFiles { + match list_head(xs: pending) { + HeadAbsent => SourceRootIngestFromFilesBuilt { ingest: acc } + HeadFound { value: file } => + match admit_source_root_argument(argument: file.origin) { + SourceRootArgumentAdmitted { tree: tree } => + source_root_ingest_from_files_go( + pending: skip(xs: pending, n: 1), + acc: list_snoc_item(xs: acc, item: DagSourceReadWitness { + source: Medium { carried: file.content, fidelity: Lossless }, + artifact: Artifact { kind: SourceFile, id: file.path, file_path: file.path }, + compilation_unit: file.path, + source_root: tree + }) + ) + SourceRootArgumentUnrecognized { argument: argument } => + SourceRootIngestFromFilesUnrecognizedRoot { argument: argument, path: file.path } + } + } +} + +fn source_root_ingest_from_files(files: List) -> SourceRootIngestFromFiles { + source_root_ingest_from_files_go(pending: files, acc: Empty) } diff --git a/src/v2/compiler/source_authority_read.dag b/src/v2/compiler/source_authority_read.dag index de4d8bc9f96..4a4b6adda13 100644 --- a/src/v2/compiler/source_authority_read.dag +++ b/src/v2/compiler/source_authority_read.dag @@ -15,10 +15,9 @@ import std.content_hash { import v2.compiler.source_authority { DagSourceReadWitness, SourceRef, - SourceRootIngest, - source_ref_for_storage_path, - source_root_for_storage_path + SourceRootIngest } +import v2.std.cross_tree.import_model { SourceRootRef } import extdeps.communication.medium { Lossless, Medium } import v2.std.algebra { fold_list } import v2.std.artifact { Artifact, SourceFile } @@ -58,11 +57,11 @@ import v2.std.text { String } // witness is minted, a missing or unreadable path refuses as a read failure rather than a // misclassified parse error, and both refusals carry the observed digest. Nothing here widens on // failure. -fn source_ref_for_observed_storage_path(path: String) -> SourceRef { +fn source_ref_for_observed_storage_path(path: String, source_root: SourceRootRef) -> SourceRef { let read = Filesystem.Read(path: path) SourceRef { path: path, - source_root: source_root_for_storage_path(path: path), + source_root: source_root, content_hash: if read.success { dag_source_content_hash_for_text(text: read.content) } else { @@ -79,11 +78,11 @@ data source_ref_read_refused: Symbol = ^source_ref_read_refused data source_ref_content_hash_mismatch: Symbol = ^source_ref_content_hash_mismatch -fn source_ref_read_failed_diagnostic(ref: SourceRef, error: String) -> NonEmptyDiagnostics { +fn source_ref_read_failed_diagnostic(path: String, error: String) -> NonEmptyDiagnostics { NonEmptyDiagnostics { head: Diagnostic { reason: source_ref_read_refused, - at: textual_whole_file_locus(file: symbol_intern_lexeme(lexeme: ref.path)), + at: textual_whole_file_locus(file: symbol_intern_lexeme(lexeme: path)), correction: Unavailable { reason: ExternalContractUnknown } }, tail: [ @@ -184,7 +183,7 @@ fn source_ref_read_result_to_outcome(result: SourceRefReadResult) -> Outcome Rejected { - diagnostics: source_ref_read_failed_diagnostic(ref: ref, error: error) + diagnostics: source_ref_read_failed_diagnostic(path: ref.path, error: error) } SourceRefReadHashMismatch { ref: ref, expected: _, observed: observed } => Rejected { @@ -244,7 +243,7 @@ fn source_root_ingest_from_source_refs(refs: List) -> Outcome Rejected { diagnostics: source_ref_read_failed_diagnostic( - ref: source_ref_for_storage_path(path: "source-root-ingest-build-impossible"), + path: "source-root-ingest-build-impossible", error: "internal: read-through accepted without ingest row" ) } diff --git a/src/v2/lens/module_graph.dag b/src/v2/lens/module_graph.dag index 238f781bd8d..3d22044a5a3 100644 --- a/src/v2/lens/module_graph.dag +++ b/src/v2/lens/module_graph.dag @@ -56,7 +56,10 @@ import v2.compiler.resolution_provenance { } import v2.compiler.source_authority { SourceRef, + SourceRootArgumentAdmitted, + SourceRootArgumentUnrecognized, SourceRootIngest, + admit_source_root_argument, source_ref_for_storage_path } import v2.compiler.source_authority_read { source_root_ingest_from_source_refs } @@ -272,12 +275,67 @@ fn reference_derived_path_under_roots(path: String, roots: List) -> Bool any(xs: roots, predicate: fn(root) { starts_with(s: path, prefix: concat(root, "/")) }) } -fn source_refs_from_declared(declared: List) -> List { +fn path_is_under_pool_root(path: String, root: String) -> Bool { + path == root || starts_with(s: path, prefix: concat(root, "/")) +} + +fn discovering_pool_root(path: String, pool_roots: List) -> Optional { + fold_list( + xs: pool_roots, + empty: Absent, + cons: fn(acc, root) { + match acc { + Present { value: found } => Present { value: found } + Absent => match path_is_under_pool_root(path: path, root: root) { + true => Present { value: root } + false => Absent + } + } + } + ) +} + +fn source_refs_from_declared( + declared: List, + pool_roots: List +) -> Outcome> { fold_list( xs: declared, - empty: no_source_refs, + empty: outcome_accepted(value: no_source_refs), cons: fn(acc, fact) { - list_snoc_item(xs: acc, item: source_ref_for_storage_path(path: fact.path)) + bind_outcome( + o: acc, + f: fn(refs) { + match discovering_pool_root(path: fact.path, pool_roots: pool_roots) { + Absent => + outcome_rejected( + d: Diagnostic { + reason: ^declared_module_pool_root_unknown, + at: Textual { file: ^declared_module_pool_root_unknown, extent: WholeFile }, + correction: Unavailable { reason: ExternalContractUnknown } + } + ) + Present { value: origin } => + match admit_source_root_argument(argument: origin) { + SourceRootArgumentAdmitted { tree: tree } => + outcome_accepted( + value: list_snoc_item( + xs: refs, + item: source_ref_for_storage_path(path: fact.path, source_root: tree) + ) + ) + SourceRootArgumentUnrecognized { argument: _ } => + outcome_rejected( + d: Diagnostic { + reason: ^declared_module_source_root_undetermined, + at: Textual { file: ^declared_module_source_root_undetermined, extent: WholeFile }, + correction: Unavailable { reason: ExternalContractUnknown } + } + ) + } + } + } + ) } ) } @@ -375,15 +433,21 @@ fn edges_from_provenance_owners( } fn load_reference_derived_pool( - declared: List + declared: List, + pool_roots: List ) -> Outcome { bind_outcome( - o: source_root_ingest_from_source_refs(refs: source_refs_from_declared(declared: declared)), - f: fn(ingest) { + o: source_refs_from_declared(declared: declared, pool_roots: pool_roots), + f: fn(refs) { bind_outcome( - o: located_roots_from_source_root_ingest(ingest: ingest), - f: fn(items) { - outcome_accepted(value: reference_derived_pool_from_located_roots(items: items)) + o: source_root_ingest_from_source_refs(refs: refs), + f: fn(ingest) { + bind_outcome( + o: located_roots_from_source_root_ingest(ingest: ingest), + f: fn(items) { + outcome_accepted(value: reference_derived_pool_from_located_roots(items: items)) + } + ) } ) } @@ -599,7 +663,7 @@ fn reference_derived_resolution_facts( let declared = module_declaration_facts_live(pool_roots: pool_roots) |> filter(fact => !reference_derived_path_excluded(path: fact.path, exclude_substrings: exclude_substrings)) bind_outcome( - o: load_reference_derived_pool(declared: declared), + o: load_reference_derived_pool(declared: declared, pool_roots: pool_roots), f: fn(pool) { bind_outcome( o: fold_list( diff --git a/src/v2/test/claim/long/frontier_probe_closure_matrix_integration_test.dag b/src/v2/test/claim/long/frontier_probe_closure_matrix_integration_test.dag index 333f7ffad6f..966f76a317f 100644 --- a/src/v2/test/claim/long/frontier_probe_closure_matrix_integration_test.dag +++ b/src/v2/test/claim/long/frontier_probe_closure_matrix_integration_test.dag @@ -17,6 +17,7 @@ import v2.compiler.source_authority { SourceRootCoverageComplete, frontier_probe_discovered_closure_seal } +import v2.std.cross_tree.import_model { DagTree, V2Tree } import v2.compiler.source_authority_read { source_ref_for_observed_storage_path } @@ -34,11 +35,11 @@ data live_tree_disposition: LiveTreeDisposition = ReadsLiveTree // exact-head eval (784772ms / 742109ms). fn fp_matrix_ref_a() -> SourceRef { - source_ref_for_observed_storage_path(path: "dag/std/algebra.dag") + source_ref_for_observed_storage_path(path: "dag/std/algebra.dag", source_root: DagTree) } fn fp_matrix_ref_v2() -> SourceRef { - source_ref_for_observed_storage_path(path: "src/v2/std/text.dag") + source_ref_for_observed_storage_path(path: "src/v2/std/text.dag", source_root: V2Tree) } fn fp_matrix_closure_subject_matching_digest( diff --git a/src/v2/test/claim/self_host/closure_emission_test.dag b/src/v2/test/claim/self_host/closure_emission_test.dag index ab2e11ec364..680297c21f1 100644 --- a/src/v2/test/claim/self_host/closure_emission_test.dag +++ b/src/v2/test/claim/self_host/closure_emission_test.dag @@ -30,6 +30,7 @@ import v2.std.algebra { contains, fold_list, length } import v2.std.artifact { Artifact, SourceFile } import v2.std.cross_tree.import_model { DagTree } import v2.std.diagnostic { Accepted, Rejected, diagnostics_fatal_reason } +import v2.std.lens_verdict { lens_verdict_diagnostics_located_chain_text_in_spans } import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } import v2.std.node { Node, Symbol, node_synthetic } import v2.std.qualified_name { QualifiedName, qualified_name_from_dotted_string, qualified_name_to_dotted_string } @@ -322,9 +323,19 @@ test fn the_emission_renders_through_its_codec_and_reads_back_the_same_identitie // A MODULE IDENTITY DECLARED BY TWO FILES REFUSES THE EMISSION AT THE CENSUS, even when the two // files' declarations are independent and neither is a closure member. test fn two_files_declaring_one_module_refuse_the_emission_at_the_census_holds() -> Bool { - match ce_emission_duplicate_module().outcome { + let located = ce_emission_duplicate_module() + match located.outcome { Accepted { value: _, diagnostics: _ } => false - Rejected { diagnostics: d } => diagnostics_fatal_reason(d: d) == ^closure_census_duplicate_module + Rejected { diagnostics: d } => + diagnostics_fatal_reason(d: d) == ^closure_census_duplicate_module + && string_contains( + s: lens_verdict_diagnostics_located_chain_text_in_spans(d: d, index: located.spans), + pattern: "ce_duplicate_a_read" + ) + && string_contains( + s: lens_verdict_diagnostics_located_chain_text_in_spans(d: d, index: located.spans), + pattern: "ce_duplicate_b_read" + ) } } diff --git a/src/v2/test/claim/self_host/stage0_production_target_test.dag b/src/v2/test/claim/self_host/stage0_production_target_test.dag index cb4fca7dedd..4e711038ca4 100644 --- a/src/v2/test/claim/self_host/stage0_production_target_test.dag +++ b/src/v2/test/claim/self_host/stage0_production_target_test.dag @@ -13,6 +13,7 @@ import v2.compiler.self_host.stage0_production_target { stage0_production_target_model } import v2.compiler.source_authority { DagSourceReadWitness, SourceRef } +import v2.std.cross_tree.import_model { V2Tree } import v2.compiler.source_authority_read { source_ref_for_observed_storage_path, source_root_ingest_from_source_refs @@ -232,7 +233,7 @@ type Stage0BoundaryRead fn stage0_boundary_read_of(path: String) -> Stage0BoundaryRead { match source_root_ingest_from_source_refs( - refs: Cons { head: source_ref_for_observed_storage_path(path: path), tail: Empty } + refs: Cons { head: source_ref_for_observed_storage_path(path: path, source_root: V2Tree), tail: Empty } ) { Rejected { diagnostics: _ } => Stage0BoundaryReadRefused Accepted { value: ingest, diagnostics: _ } => diff --git a/src/v2/test/claim/source_root_tagging_test.dag b/src/v2/test/claim/source_root_tagging_test.dag index 4130e059635..015d6032123 100644 --- a/src/v2/test/claim/source_root_tagging_test.dag +++ b/src/v2/test/claim/source_root_tagging_test.dag @@ -1,11 +1,21 @@ module v2.test.claim.source_root_tagging -import v2.std.live_tree { LiveTreeDisposition } -import v2.compiler.source_authority { DagSourceReadWitness } +import gunbc.source_root_read { SourceRootFile } +import v2.compiler.source_authority { + DagSourceReadWitness, + SourceRootArgumentAdmitted, + SourceRootArgumentUnrecognized, + SourceRootIngest, + SourceRootIngestFromFilesBuilt, + SourceRootIngestFromFilesUnrecognizedRoot, + admit_source_root_argument, + source_root_ingest_from_files, + source_root_set_from_ingest +} import v2.std.artifact { Artifact, SourceFile } import extdeps.communication.medium { Lossless, Medium } -import v2.compiler.source_authority { DagSourceReadWitness, source_root_set_from_ingest } import v2.std.cross_tree.import_model { DagTree, V2Tree, source_root_set_contains } +import std.algebra { Cons, Empty } import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } @@ -36,6 +46,78 @@ data sr_tag_dag_read: DagSourceReadWitness = DagSourceReadWitness { data sr_tag_mixed_ingest: SourceRootIngest = [sr_tag_v2_read, sr_tag_dag_read] data sr_tag_v2_only_ingest: SourceRootIngest = [sr_tag_v2_read] +test fn a_dag_source_root_argument_is_dag_tree() -> Bool { + match admit_source_root_argument(argument: "dag") { + SourceRootArgumentAdmitted { tree: DagTree } => true + SourceRootArgumentAdmitted { tree: V2Tree } => false + SourceRootArgumentUnrecognized { argument: _ } => false + } +} + +test fn a_v2_source_root_argument_is_v2_tree() -> Bool { + match admit_source_root_argument(argument: "src/v2") { + SourceRootArgumentAdmitted { tree: V2Tree } => true + SourceRootArgumentAdmitted { tree: DagTree } => false + SourceRootArgumentUnrecognized { argument: _ } => false + } +} + +test fn a_copied_single_root_argument_is_unrecognized() -> Bool { + match admit_source_root_argument(argument: "/tmp/copied-closure") { + SourceRootArgumentUnrecognized { argument: argument } => argument == "/tmp/copied-closure" + SourceRootArgumentAdmitted { tree: _ } => false + } +} + +fn sr_file(path: String, origin: String) -> SourceRootFile { + SourceRootFile { path: path, content: "module fixture.sr_tag\n", origin: origin } +} + +test fn a_dag_file_whose_path_contains_src_is_still_dag_tree() -> Bool { + match source_root_ingest_from_files( + files: [sr_file(path: "dag/pkg/src/leaf.dag", origin: "dag")] + ) { + SourceRootIngestFromFilesUnrecognizedRoot { argument: _, path: _ } => false + SourceRootIngestFromFilesBuilt { ingest: ingest } => + match ingest { + Empty => false + Cons { head: read, tail: rest } => + match rest { + Empty => match read.source_root { + DagTree => true + V2Tree => false + } + Cons { head: _, tail: _ } => false + } + } + } +} + +test fn ingest_from_an_unrecognized_origin_refuses() -> Bool { + match source_root_ingest_from_files( + files: [sr_file(path: "/tmp/copied-closure/src/v2/std/algebra.dag", origin: "/tmp/copied-closure")] + ) { + SourceRootIngestFromFilesUnrecognizedRoot { argument: argument, path: path } => + (argument == "/tmp/copied-closure") + && (path == "/tmp/copied-closure/src/v2/std/algebra.dag") + SourceRootIngestFromFilesBuilt { ingest: _ } => false + } +} + +test fn two_root_origins_tag_each_tree() -> Bool { + match source_root_ingest_from_files( + files: [ + sr_file(path: "dag/std/algebra.dag", origin: "dag"), + sr_file(path: "src/v2/std/algebra.dag", origin: "src/v2") + ] + ) { + SourceRootIngestFromFilesUnrecognizedRoot { argument: _, path: _ } => false + SourceRootIngestFromFilesBuilt { ingest: ingest } => + source_root_set_contains(roots: source_root_set_from_ingest(ingest: ingest), r: DagTree) + && source_root_set_contains(roots: source_root_set_from_ingest(ingest: ingest), r: V2Tree) + } +} + test fn source_root_tag_carried_and_folded_to_grounded_set() -> Bool { let mixed = source_root_set_from_ingest(ingest: sr_tag_mixed_ingest) let v2_only = source_root_set_from_ingest(ingest: sr_tag_v2_only_ingest) diff --git a/src/v2/test/v2_native_route_test.dag b/src/v2/test/v2_native_route_test.dag index 62282253d3f..40548a2613c 100644 --- a/src/v2/test/v2_native_route_test.dag +++ b/src/v2/test/v2_native_route_test.dag @@ -190,7 +190,7 @@ fn receipt_over( false_control: Present { value: NativeTestReturnedFalse }, true_control: Present { value: NativeTestPassed }, malformed_control: MalformedSpecimenRefused { - path: "target/v2-native-lane/malformed-control-root/poison.dag", + path: "target/v2-native-lane/malformed-control-root/dag/poison.dag", reason: ^tokenize_lex_e1_unterminated_string }, old_route_control: OldRouteWithdrawn { withdrawn_executable: "/seed/gunbc" },