Repository navigation
fix(compile-clean): dissolve the §3 loader-closure fork — gate loader runs both closures - #6950
Merged
Merged
Conversation
… runs both closures load_compile_clean_entry_sources (the affected-set compile-clean gate loader) ran only extend_with_reference_closure, while the witness loader load_sources_for_entry_with_pool runs BOTH that and extend_with_bare_reference_closure in a fixpoint. Both functions' doc-comments claimed to be the ONE closure authority; the code was forked. The service-name and bare-name provider edges (gcp.STS -> dag/extdeps/cloud/gcp/sts.dag) live ONLY in the bare closure, so an affected entry reaching a provider purely through a service call or bare name (dag/gunbc/auth/patterns.dag -> gcp.STS.Exchange, zero imports) dropped that provider from the scoped compile set and its names went unresolved. This surfaced non-locally when #6937's import strip made patterns.dag affected. Fix: the gate loader runs the same both-closure fixpoint as the witness loader, via a primary-precedence MultiEntryIndex (build_multi_entry_index_primary_precedence). Proven by execution (scoped_gate_loader_pulls_bare_referenced_providers, #[ignore]d heavyweight): RED control = ref-only closure of patterns.dag has 3 unresolved-type hard diags and no sts.dag; fixed = sts.dag pulled, 0 hard diags. Whole-tree compile-clean after the change = 0 hard diagnostics (no cross-tree poisoning). Memory note (cc governor lane): this brings the gate path to parity with the witness loader's both-closure cost — NOT a new cost class, but more resolution work on the gate path; relevant to the #6848 floor-memory regression being measured in parallel. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls
force-pushed
the
fix/compile-clean-loader-closure-fork
branch
from
July 20, 2026 21:09
70cea1d to
b637c11
Compare
briansrls
pushed a commit
that referenced
this pull request
Jul 20, 2026
6 tasks
briansrls
added a commit
that referenced
this pull request
Jul 20, 2026
2 of 4 tasks
briansrls
added a commit
that referenced
this pull request
Jul 20, 2026
briansrls
added a commit
that referenced
this pull request
Jul 20, 2026
Strip import lines only; restore import-bearing modules outside this diff (cache/*, docker, ebay, materialization, etc.). Rebased onto main with #6950 compile-clean loader closure fix. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
added a commit
that referenced
this pull request
Jul 20, 2026
The rebased patch accidentally reverted belt-A dispatch UI/routing in roadmap_page.dag and node_http_server_emit.dag (and unrelated host_standup /docs edits) while witness tests remained on main. Restore those files to match main; PR scope is dag/extdeps import strip + #6950 loader fix only. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 20, 2026
briansrls
added a commit
that referenced
this pull request
Jul 20, 2026
Keeps PR scope to extdeps import strip, host_standup interim alignment, and #6950 cli_run.rs loader fix only. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
force-pushed
the
fix/compile-clean-loader-closure-fork
branch
from
July 21, 2026 00:55
7f7d0ff to
9bbab0a
Compare
This was referenced Jul 21, 2026
briansrls
added a commit
that referenced
this pull request
Jul 21, 2026
briansrls
added a commit
that referenced
this pull request
Jul 21, 2026
…oader closure fix (#6938) * Import strip batch-1: dag/extdeps (~71 files) on current main. Rebased onto main (8c2b222): #6950 cli_run loader fix already on main; PR carries extdeps import-line removals, host_standup interim alignment, and GcpProject inert-carrier roster only. Co-authored-by: Cursor <cursoragent@cursor.com> * Restore nbd_proxy_serve transport-shape prose in host_standup. Reverts accidental clause drop in interim_realization during strip hygiene; behavior unchanged (review 40541 non-blocking note). Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: Import strip: dag/extdeps + dag/tools (368 files) * WIP: Import strip: dag/extdeps + dag/tools (368 files) * Align calibration closure count with resolved-module grain. Pre-resolve roster_import_closure_nodes and skip-before-resolve augmentation now use resolve_entry + collect_typed_module_names (same as post-resolve closure_modules), fixing floor_skip_discovery drift (261 vs 260) after import-strip + main merge. Co-authored-by: Cursor <cursoragent@cursor.com> * cargo fmt: cli_run calibration closure helper. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Dissolves a §3 closure-authority fork between the two source loaders. The compile-clean gate loader
load_compile_clean_entry_sourcesran onlyextend_with_reference_closure(module-path references), while the witness loaderload_sources_for_entry_with_poolruns both that andextend_with_bare_reference_closurein a fixpoint. Both functions' doc-comments each claimed to be "the ONE closure authority" — the code was forked.The service-name and bare-name provider edges (e.g.
gcp.STS→dag/extdeps/cloud/gcp/sts.dag) live only in the bare closure. So an affected entry that reaches a provider purely through a service call or bare name —dag/gunbc/auth/patterns.dag→gcp.STS.Exchange, zero imports — dropped that provider from the scoped compile set, and its names went unresolved (or silently mis-bound to a same-named declaration).This surfaced non-locally when #6937's import strip made
patterns.dagaffected: a strip undersrc/v2produced a diagnostic in an untoucheddag/gunbc/auth/file in a different tree.Fix
The gate loader runs the same both-closure fixpoint as the witness loader, via a primary-precedence
MultiEntryIndex(build_multi_entry_index_primary_precedence). One file.Proven by execution
scoped_gate_loader_pulls_bare_referenced_providers(#[ignore]d, heavyweight — builds the whole-tree index):patterns.dag's closure has 3unresolved typehard diags and nosts.dag.sts.dagpulled in, 0 hard diags.Whole-tree compile-clean (
Nonefilter, the poisoning-risk path) after the change = 0 hard diagnostics — no cross-tree Empty/Cons poisoning.Scope / notes
patterns.dag:47expected Secret got Stringred is the same closure-drop seen at a different name (whensts.dagdrops,gcp.STSmisses the registry andaccess.access_tokenmis-binds to aStringhomonym). Being confirmed by rebase.Verification confirmed on latest main (be9631e + this change):
scoped_gate_loader_pulls_bare_referenced_providers: pass (RED control reds, fix greens)HISTOGRAM_TOTAL_HARD 0,RSS 4345 MiB— unchanged vs pre-fix 4346 MiB, i.e. no whole-tree memory cost (the bare-closure growth is scoped-path only)