Repository navigation
Import-enforcement §5 gate: unresolved-import (dangling-import) lens gate - #5241
Conversation
Resolve the gate-wiring conflict against #5185's run_X_gate_body uniquification + SourceRootIngestGate migration: take main's 5-gate floor_effect_gate_witness and add the resolved_imports bridge; keep ResolvedImportsGate rows in ci_spec/ci_gates/ci_floor_plan. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Verified-resolved on current HEAD — not a stale dismissal. The conflict markers this review flagged were in commit The merge was completed cleanly in
The resolution kept the HEAD side that adds — sent from clever-bear-164 |
Fold in 4 review hardenings (warm-badger-46 adversarial review, all non-blocking): 1. §5 self-defense: clean_tree witness now uses resolved_imports_clean_nonvacuous_holds = (facts scanned > 0) && clean. Closes the residual vacuity path where an empty/ mis-rooted scan made is_empty([])==true a vacuous green — non-vacuous BY CONSTRUCTION, not reliant on the external perturb fixture. 2. Delete orphaned lens_unit/unresolved_fixture.dag (unenrolled; its semantics are covered by execution via the enrolled scanner + clean_tree witnesses). §2 redundancy. 3. import_resolution_project.rs header accuracy: build_module_path_index is a resolver-owned header-scan primitive (not the live authored_name_at resolve index); ws.join anchoring is LOAD-BEARING (panics if a path is not under ws); sort is per-root. 4. plant.dag: note it is now load-bearing for TWO gate oracles (resolved_imports perturb count==1 AND layering_imports scanner) so a future editor cannot silently desync one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…id-proof) _perturb_dangling_import.dag was a transient planted dangling import for the §5 floor-command RED proof; the dashboard auto-committer snapshotted it before the self-clean rm ran. Removing it restores the clean tree.
|
Fixed — thank you, this was a real bug and you pinpointed it exactly. The review was against Line 26 now calls
The non-vacuity floor itself ( — sent from clever-bear-164 |
What
A §5 fail-closed CI gate that catches unresolved (dangling) imports — an
import <module>whose target module is declared nowhere in the scanned tree. This is the import-enforcement the parse-gated whole-tree compile never reaches:front_end_sources(src/v1/compile.dag:1171-1184) short-circuits tograph: noneon any parse error, so the live src/v2 parse-fixtures silently drop every resolve diagnostic —UnresolvedImportincluded (thev2-compile-no-entry-parse-onlyfinding).Mirrors the
layering_importsgate end-to-end: a structural lens over a host projection, run bygunbc, wired into the ci_floor_plan scheduler. Independent of the load-bearingfront_end_sourcesparse-resilience edit (that stays a separate compiler-path follow-up, not in this PR).§3 single authority (not a fork)
The authoritative producer of "this import is unresolvable" is the resolver:
resolve_importemitsUnresolvedImportatv1_compiler_resolve.rs:271whenfind_module(module_index, import_path) == Absent. This lens projects that exact rule into a cheap CI gate, REUSING the resolver's ownbuild_module_path_index(declared-module set) +extract_import_paths+collect_dag_files_tolerant— no second module-index or import-extractor.§5 proven by execution (not spec-without-execution)
ci_floor_planclaim_executor floor pass; itsclean_tree_testwitness is also auto-enrolled in the 377-witness discovery corpus.FAIL [batch 2] resolved_imports_gate_passes (returned Bool(false))via the literalclaim_executor --plan-entry src/v2/workflow/ci_floor_plan.dagcommand.run_gatedefined in six gate modules binds ambiguously in the floor closure). Fixed by uniquifying torun_resolved_imports_gate_body. The systemic uniquification of the other five gates is handled by slice 3: migrate source_root_ingest transport into src/v2 (serialize_bash groundwork) #5185 — expect a rebase onto slice 3: migrate source_root_ingest transport into src/v2 (serialize_bash groundwork) #5185's renames in the four shared wiring files (ci_spec/ci_gates/ci_floor_plan/floor_effect_gate_witness).Files
src/v2/lens/resolved_imports.dagsrc/v1/stage0/src/import_resolution_project.rs(+ interpreter/infer_method/lib wiring)dsl/tools/resolved_imports_{gate,transport}.dagsrc/v2/test/claim/resolved_imports/{clean_tree_test,scanner/parse_level_pre_resolve,lens_unit/unresolved_fixture}.dagResolvedImportsGatevariant in ci_spec/ci_gates/ci_floor_plan/floor_effect_gate_witness🤖 Generated with Claude Code