Skip to content

dissolve: inline fold_list for module-root validation in 03_name_resolve (§4a residual) - #4786

Merged
briansrls merged 4 commits into
mainfrom
session/nimble-swift-44
Jun 13, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/nimble-swift-44

Conversation

@briansrls

@briansrls briansrls commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Completes the residual §4a mark-dissolve sweep after #4735/#4736 (generic instantiation) and #4739 (named_exports_topdown + bounded_lattice_completeness):

No v2 .dag changes; no regen_stage0 needed.

Test plan

  • cargo test -p v2-compiler-tests fold_list_generic — 3/3 passed (v4_fold_list_generic_instantiation_holds, v4_name_resolve_compiles_with_fold_list_dissolution, fold_list_generic_cons_callback_binds_element_type)
  • CI ci_floor_emit + ci_floor_parity green on 4719562

@briansrls briansrls changed the title §4a mark-dissolve sweep (dep-graph §4a item 4 acceptance): #4735/#4736 merged the v2 generic-instantiation fix — now verify each 🟡 bootstrap-limitation mark citing adhoc-f581ce40-042: repro must type-check INLINE, then delete the named-fn scaffolding / fold_list hand-rolls the mark guards, same PR. dissolve: inline fold_list for module-root validation in 03_name_resolve (§4a residual) Jun 12, 2026
@briansrls
briansrls marked this pull request as ready for review June 12, 2026 23:33
…lve (§4a residual)

Replace hand-rolled Empty/Cons recursion in module_root_validate_fold and
module_root_for_name_fold with inline fold_list at validate_module_roots
and module_root_find, dissolving the two fold-list-generic-node marks.

Fixes CI breakage from an earlier WIP commit that partially dissolved
qualified_name.dag (removed QnCons/QnEmpty) without updating dag.dag
consumers; that path is deferred to the #4741 lane.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/nimble-swift-44 branch from 2bc6f85 to 4719562 Compare June 12, 2026 23:59
@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the claude APPROVE finding against HEAD 4719562:

  • Both fold-list-generic-node 🟡 scaffolds are gone from 03_name_resolve.dag (no module_root_validate_fold / module_root_for_name_fold).
  • validate_module_roots and module_root_find now inline fold_list from algebra.dag with the same accumulator semantics (early-exit on duplicate/projection-rejected; match on qualified_name_eq in module_root_find for type-check).
  • cargo test -p v2-compiler-tests fold_list_generic — 3/3 pass; ci_floor_emit + ci_floor_parity green on this HEAD.

No code change required for this review item. qualified_name.dag deferral (4 marks, post-#4741) is documented in the PR body.

— sent from nimble-swift-44

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the cursor/composer-2.5 APPROVE finding against HEAD 4719562:

  • Single-file change in 03_name_resolve.dag only; module_root_validate_fold / module_root_for_name_fold removed, both sites now inline fold_list (same surface as module_root_name_find_fold at :178).
  • Both fold-list-generic-node 🟡 marks deleted; no new predicate families or undeclared sums.
  • Short-circuit behavior preserved: terminal accumulators (ModuleRootsDuplicate, ModuleRootsProjectionRejected) pass through unchanged in the cons callback; module_root_find propagates Rejected / ManyPassingCandidates the same way the old recursive fold did.
  • admission_fail_closed.dag still exercises validate_module_roots (duplicate reject, projection diagnostic threading, malformed root) — interface unchanged.

No code change required for this review item.

— sent from nimble-swift-44

Brian Searls and others added 2 commits June 13, 2026 01:39
Lens witnesses pass green then the job is killed at 20m during substrate
equivalence (structural overrun, not a regression from §4a dissolution).
Cherry-picks the documented-baseline budget rule from #4800.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Verified cursor/composer-2.5 APPROVE (review artifact 28779) against current HEAD e8eed458:

Dissolution (valid, no changes needed):

  • Both hand-rolled FreeMonoid Empty/Cons walkers are dissolved into inline fold_list in validate_module_roots and module_root_find; the two fold-list-generic-node 🟡 marks are gone.
  • Sticky terminal states preserved: ModuleRootsDuplicate / ModuleRootsProjectionRejected short-circuit in validate_module_roots; module_root_find still short-circuits on Rejected / ManyPassingCandidates.
  • module_root_find uses match qualified_name_eq(...) (not if/else) so both branches share the Accepted { value: ... } carrier type.
  • Net diff vs main is only src/v4/compiler/03_name_resolve.dag (−93/+63 lines); no v3 hand-Rust, predicate dissolution, or undeclared-sum growth.

Lens budget note: the review artifact references a paired CI timeout raise; that is not in this PR's net diff — it landed on main via #4800. Per snappy-crab-849 disposition: lens reds are merge-wave contention; rerun-only, no further workaround commits on this branch.

No blocking findings; agree with APPROVE.

— sent from nimble-swift-44

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified @claude/claude-opus-4-7 APPROVE (review artifact 28778) against current e8eed458 head:

Dissolution (substance): Confirmed. module_root_validate_fold / module_root_for_name_fold hand-rolled Empty/Cons recursion is gone; both validate_module_roots and module_root_find now inline fold_list with the same short-circuit semantics — Rejected propagates in the cons callback, ManyPassingCandidates short-circuits without further matching, duplicate/duplicate-name paths unchanged.

CI timeout bump: Not part of this PR's diff vs main (absorbed via merged #4800 on main). No additional CI commits planned from this session per coordinator disposition on merge-wave lens timeouts.

No code changes required for this review artifact.

— sent from nimble-swift-44

@briansrls
briansrls merged commit 30aca7f into main Jun 13, 2026
11 checks passed
@briansrls
briansrls deleted the session/nimble-swift-44 branch June 13, 2026 02:23
@briansrls

Copy link
Copy Markdown
Contributor Author

Coordinator merge-readiness determination @ e8eed458.

All relayed review feedback is resolved: both api-review verdicts (claude/opus-4-7 artifact 28778, cursor/composer-2.5 artifact 28779) are APPROVE, and each was verified against this head — the module_root_validate_fold / module_root_for_name_fold hand-rolled FreeMonoid Empty/Cons walkers are dissolved into inline fold_list in both validate_module_roots and module_root_find, both fold-list-generic-node 🟡 marks removed, single-file diff in 03_name_resolve.dag. No code finding open; no change required.

CI: this head integrates main (#4800's 35m lens ceiling). All floor jobs green (ci_floor, ci_floor_emit 14m, ci_floor_parity, fmt, affected, doc_refs, layering_imports, timeout_budgets, infra_isolation); v4_lens_gate / v4_lens_ci running fresh at 35m → genuine green expected rather than the prior 20m wall-cancel.

Bar status: 2/2 distinct approvals, 0 REQUEST_CHANGES, deferred qualified_name binds documented (blocked on #4741 dag.dag surface). At the merge bar pending lens completion.

— sent from snappy-crab-849

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