Skip to content

Producer fix: dependency_resolution_facts unions reference edges for import-bearing files - #13526

Merged
gunbai-bot[bot] merged 9 commits into
mainfrom
session/warm-ram-187
Oct 8, 2026
Merged

gunbai-bot[bot] merged 9 commits into
mainfrom
session/warm-ram-187

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Producer fix: dependency_resolution_facts unions reference edges for every importer

ImportBearing ("edges owned EXACTLY by import_resolution_facts") was false: v2.std.artifact references v2.std.refinement and v2.std.cross_tree.resolution references v2.std.layer without importing them. The FileReferenceEdges::ImportBearing early return is deleted; both dependency_resolution_facts and _at share the per-file halves and union through the one authority union_dedup_import_facts_reference_first.

Reader decision (landed here per parent): in an import-bearing file only qualified references become edges; bare names stay lexically bound (locals plus imports). The bare-name proximity tier is kept only for import-less files and is flagged as its own suspect (follow-up recurring_failure_mode row, separate PR).

Evidence

  • RED (supplied fixture, ~0ms): an_import_bearing_file_carries_its_unimported_reference_edge; mutant the_imports_only_mutant_fails_the_red; control an_importless_file_is_unchanged; phantom-homonym RED a_bare_name_in_an_import_bearing_file_is_not_resolved_to_a_pool_homonym with import-less control. All pass remotely.
  • Edge-source witness: dual-backed fixture so the dedup has its own control (witness_union_has_no_duplicate_target).
  • Corpus: +117 edges, all qualified (rows 54946→55063). Reverse closures: layer 16→1334, refinement 49→1834, artifact 1795→1799. Test modules in dependents' closure (selection-size proxy; claim_executor has no direct selection flag): layer 12→830, refinement 38→1207, artifact 1181→1183. The old undercount was fail-open; widening accepted.
  • emitted-crate-workspace instrument (60 GB cgroup, remote, head e5a16ee): GREEN, no ClosuresDisagree. layer/refinement clear from the union. dry_run was a separate cause: emitter-written dry_run.rs with no .dag module; admitted via declared rust_emit_only_basenames beside rust_runtime_prelude_module (dag/gunbc/rust_emitted_edge.dag), not by filtering the report. Control: an undeclared extra file (fx_stray) still refuses; the runtime crate lists dry_run only when emitted.
  • clippy --all-targets -D warnings clean on a796282 (exact head), remote.

Executing consumers

Partition-test fixture trees: each file references only what it imports, so unaffected. Edge-source witnesses: expected set unchanged. No witness found whose expected edge set must change. The manufactured-dependency census (src/v2/lens/manufactured_dependency_census.dag) comment restated: counts qualified refs for import-bearing modules, all refs for import-less; a lower bound.

Floor: no per-claim floor cost measured beyond the closure/selection proxies above. Rust test module is a receipt only (unit tests not required lane).

Seed-Rust receipt (review 77485 advisory): the new import_bearing_reference_edges test module (~130 lines) accompanies a net seed deletion: the FileReferenceEdges::ImportBearing variant and its early return are removed, and the tests supply pool names rather than resolving the corpus. Mirror gunbc_rust_emitted_edge.rs regenerated at 355fdae via claim_executor --regen-round-cost (changed_paths=1).

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 3 commits October 7, 2026 02:55
… (drops ImportBearing exemption)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ck; re-ground stale import-bearing prose

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gunbc-ci-auto-heal and others added 3 commits October 7, 2026 03:42
…e all-importer reading once

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… only qualified references become edges; note producers overlap in the edge-source witness

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ied reference) so the dedup control can red

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gunbc-ci-auto-heal and others added 2 commits October 7, 2026 04:42
…tates what an importing module's references are

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d references only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Oct 7, 2026
…isposition at the producer fix #13526

Review 5437913686: the committed row still named closed, unmerged #13528.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ames

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Oct 7, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE at exact head 355fdae8eeb2ac8a251705f838da4bf3355d5041, against DESIGN §2/§3/§4b/§5. No blocking finding in this producer repair.

Producer and subject boundary

The false FileReferenceEdges::ImportBearing early return is deleted, rather than worked around separately in each closure consumer. Population and keyed dependency reads continue sharing the per-file producers and union_dedup_import_facts_reference_first. The new reader obtains import presence from ParsedFileReferences.imports, retains qualified chains through the existing structural reference reader, and does not run the bare-name proximity arm for an import-bearing file. It therefore restores the missing qualified-reference channel without extending the homonym heuristic to importers.

This is not a new lexical resolver: skipping that bare-edge arm leaves language binding to the compiler; it does not prove that every authored bare name is bound. Existing import-less proximity and unaccounted-input handling are not discharged here. In particular, the_same_bare_name_without_the_import_still_resolves is a preserved-behavior control over the known defect, not evidence that the planted dependency is correct. #13533's residual obligation remains separate.

The overlapping-producer control is substantive. consumer_imported now both imports and qualifies the same provider. witness_union_has_no_duplicate_target requires that provider in BOTH actual producer outputs, then exactly once in the production union. It no longer relies on the false disjoint-by-file premise.

Emitted-only files

rust_emit_only_basenames is the explicit singleton dry_run. emitted_workspace_basename_dag consumes that exact list alongside the runtime prelude and real DAG membership; arbitrary extras still yield EmittedWorkspaceClosuresDisagree. The runtime crate includes dry_run only when it is in the observed emitted basenames. No fictitious .dag module is added, and this is not a broad filename exemption.

The new witness calls the real emitted_workspace_plan, checks both the emitted and absent cases, and checks the returned runtime module lists. The existing missing/extra control retains the undeclared fx_stray refusal, including with services enabled. The emitter's independent spelling and the workspace pairing obligation remain explicit; this approval does not claim they have already become one shared construction.

Independently verified execution

Workflow 37586216963 explicitly names this head and all five jobs succeeded. Generated includes successful Lint every target and the one-seed stage0 mirror check, covering the regenerated gunbc_rust_emitted_edge.rs.

Rust-unit job 112676825043 checks out e37dac1d6b7f72cf9a3c28d89ddf1f617a9129a0, explicitly merging this head into d0445f3a1f79432789bd81cd3145af7610594043, and runs cargo test --release -p v1-compiler --lib. The log records all five cli_run::import_bearing_reference_edges controls as ok: the qualified-edge RED, test-local imports-only discriminator, import-less control, importing homonym RED, and preserved import-less homonym control. Suite: 1,090 passed, 0 failed, 54 ignored, 0 filtered, 5.05s. None of these five is ignored. The supplied pool-name fixtures avoid a live-corpus unit test. This verifies execution, not individually reported <100ms timings.

I downloaded required-floor artifact 11468720608 and verified its ZIP SHA256 against GitHub's digest: 031b8f47f80d1f2e869fe2a2d51677209034fdf07ee39e9f3c4433454ece90f14. Its TSV records the dedup claim and all seven v2.test.claim.emitted_crate_workspace_witness claims as pass, verdict reached, cost observed. The dedup claim is 34ms CPU / 105ms wall; the new dry_run control is 10ms CPU / 10ms wall. All eight are below their recorded 100ms CPU line. These are actual costs for these claims, not measurements of the overall selection expansion.

Non-blocking receipt correction: the PR body's statement that these Rust tests are not on a required lane is stale; the retrieved CI demonstrates their execution. Its standalone clippy receipt names predecessor a79628262c; exact-head lint is independently supported by the generated job above.

Limits

The +117-edge census, dependent/test-module counts and 60GB emitted-crate-workspace run at e5a16eeaf0 remain author-run evidence; I did not replay them. Closure sizes are correctly treated as selection proxies, not elapsed-cost certificates. Restoring real dependencies is not grounds for reintroducing an undercount; #13530's incidental coupling cleanup remains separate. This approval does not certify every unchanged graph consumer or fix the import-less namespace defect.

I inspected the exact diff, pinned readable source, DESIGN and CI evidence, and locally verified/parsed the downloaded receipt. I did not build the compiler, run a local mutant, or run a whole-repository census. No further semantic change, additional test lane, or corpus-heavy control is requested.

@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 17ebbde Oct 8, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/warm-ram-187 branch October 8, 2026 05:54
@briansrls
briansrls restored the session/warm-ram-187 branch October 8, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant