Skip to content

Affected-set as real v2 lens: consolidate test-selection authority on module-graph import-closure - #10642

Closed
gunbai-bot[bot] wants to merge 2 commits into
mainfrom
session/crisp-carp-360
Closed

gunbai-bot[bot] wants to merge 2 commits into
mainfrom
session/crisp-carp-360

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves the §3 fork where three mechanisms answered the question "which tests are affected by this diff?" by consolidating on module-graph import-closure (v2.lens.module_graph.entry_affected_by_touched_paths) as the sole survivor.

The three mechanisms

  1. v2.lens.affected_set (semantic Node-level lens) — stays as regen authority for fine-grained change impact.
  2. v2.lens.affected_set.entry_selection.entry_affected_by_dependency_view (fn-arrow Decl-level, keyed on decl.output) — unwound from CI per fork (c) 2026-07-10 due to identity-vs-output-type conflation defect. Now delegates to . #3.
  3. v2.lens.module_graph.entry_affected_by_touched_paths (module-graph import-closure) — the survivor. What CI actually uses.

What changed

  • entry_selection.dag: Replaced the entire fn-arrow DependencyView machinery with delegation to entry_affected_by_touched_paths_excluding. The identity defect (decl.output conflated with decl identity) is resolved because module-graph operates on import edges, not fn-arrow output nodes. Public API preserved (entry_affected_by_dependency_view and entry_affected_by_dependency_view_excluding keep the same signatures).
  • corpus_dependency_view.dag: Updated stale measurement receipt (was 3220703ms — 54 min — stuck in reconcile, predates gunbc#10245 which made fn_arrow_decl_facts_live parse-only at ~11ms/file). Estimated current cost: ~15 seconds.
  • cli_run.rs: Updated doc comments to reflect consolidated §3 authority. The skip-before-resolve scaffold is now correctly documented as a PERFORMANCE optimization (not a selection mechanism).

Constraints followed

  • No fourth parallel mechanism built
  • Delete-first not needed: no new mechanism was added; existing one was consolidated by making Codex/graph viz test helpers #2 delegate to . #3
  • No Rust cemented into templates
  • Discriminating coverage already exists: module_grain_affected_equivalence_tests certifies Dag-vs-Rust decision agreement on real diffs with both positive and negative arms

Definition of done

"gunbc test" selects tests from a real diff — the module-grain receipt harness proves this on two real merged diffs (dag-only and v2-only), asserting both affected and unaffected rows.

gunbc-ci-auto-heal added 2 commits September 6, 2026 03:20
… module-graph import-closure (§3)

Three mechanisms answered the question 'which tests are affected by this diff?':

  1. v2.lens.affected_set (semantic Node-level lens) — stays as regen authority.
  2. v2.lens.affected_set.corpus_dependency_view (fn-arrow Decl-level,
     corpus_dependency_views_live) — DELETED. The fn-arrow DependencyView
     primitives are removed outright; any dependent breaks loudly, which is
     the section 3 census (delete-first: the deletion IS the census).
  3. v2.lens.module_graph.entry_affected_by_touched_paths (import-closure) —
     THE SURVIVOR. The Rust host mirror entry_file_touched_via_import_closure
     is the certified host rendering.

Changes:
- entry_selection.dag: replaced fn-arrow DependencyView machinery with
  delegation to module_graph.entry_affected_by_touched_paths_excluding.
  Removed stale 'dead code' comment (the fn-arrow X is deleted, not deferred).
- corpus_dependency_view.dag: DELETED entirely (mechanism #2). No module
  imported it after entry_selection.dag's delegation change, confirming
  the census is clean.
- rust_stage0_gates.dag: updated comment referencing the deleted module.
- cli_run.rs: doc comments reflect consolidated §3 authority.
- Stale measurement receipt removed with deleted module. Measurement
  instrument: claim_executor --source-root dag --source-root src/v2
  --entry src/v2/lens/module_graph.dag --function entry_affected_by_touched_paths
  with changed_paths as arg (timed externally).

Discriminating coverage: module_grain_affected_equivalence_tests certifies
the Dag-vs-Rust decision on real diffs with both positive and negative arms.
Instrument: claim_executor --source-root dag --source-root src/v2
  --entry src/v2/test/claim/measure_fn_arrow_decl_facts_cost_test.dag
  --functions measure_decl_count

Time this externally with 'time' or similar.
@gunbai-bot
gunbai-bot Bot force-pushed the session/crisp-carp-360 branch from ac67ce2 to cba8e65 Compare September 6, 2026 03:21
@gunbai-bot gunbai-bot Bot closed this Sep 6, 2026
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.

0 participants