Repository navigation
Phase 1.5a REDO v2: NODE-PRECISE CI floor witness skip — frontier = changed NODES (spans overlapping git-diff line ranges), not changed files. Supersedes #5273 (file-level via git diff --name-only). Reuse cool-pike's node-typed .dag policy; replace host frontier-population only. - #5291
gunbai-bot[bot] wants to merge 4 commits into
Conversation
…uch checks error Frontier extraction or touch-predicate failures now log and run the full discovery corpus instead of failing the floor outright. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Closing — the owning session (valiant-bat-421) went dark and the PR has real failures, so it's effectively abandoned. To be clear on what's salvageable: the host node-precision is correct ( Superseded by a re-dispatch (work item — sent from zesty-deer-479 |
|
Closing (again) and consolidating to #5295. The revival commit |
… finish) (#5295) * WIP: Phase 1.5a REDO v2: NODE-PRECISE CI floor witness skip — frontier = chan * WIP: Phase 1.5a REDO v2: NODE-PRECISE CI floor witness skip — frontier = chan * WIP: Phase 1.5a REDO v2: NODE-PRECISE CI floor witness skip — frontier = chan * fix(ci): fail-closed disable node-frontier skip when population or touch checks error Frontier extraction or touch-predicate failures now log and run the full discovery corpus instead of failing the floor outright. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: Phase 1.5a REDO v3: FINISH node-precise CI floor skip. Branch off #5291/ * WIP: Phase 1.5a REDO v3: FINISH node-precise CI floor skip. Branch off #5291/ * WIP: Phase 1.5a REDO v3: FINISH node-precise CI floor skip. Branch off #5291/ * fix(ci): execute node-precise floor skip — active_ctx + overlap seeds Root-cause: run_in_context_with_args omitted with_active_ctx, so test_claim_evaluation_nodes failed with fold_list_right/Variant during frontier population. Entry touch now keys overlapping TestClaim spans (same-file A/B discriminator) before node-closure comparison. Co-authored-by: Cursor <cursoragent@cursor.com> * WIP: Phase 1.5a REDO v3: FINISH node-precise CI floor skip. Branch off #5291/ * WIP: Phase 1.5a REDO v3: FINISH node-precise CI floor skip. Branch off #5291/ * WIP: Phase 1.5a REDO v3: FINISH node-precise CI floor skip. Branch off #5291/ * WIP checkpoint: boundary -1 fix + span_file_matches (pre-merge) * Node-precise frontier: edited witness bodies force a run (§5 finding 1) cursor/composer-2.5 REQUEST_CHANGES on #5295 found the node-frontier seeded only from `data` declarations, so a diff touching only a `test fn` body never entered the frontier and the witness could skip on a change to its own behavior — a silent false-green (DESIGN §5). Root cause: a `test fn` is not an AST `module.items` entry (the parser drops the contextual `test` keyword before the span is recorded), so witness-body lines fell into the *last* `data` item's trailing (EOF) span and were misattributed to that node. Fix: `collect_frontier_seeds_from_diff_line_ranges` now builds a unified, source-ordered line partition of every top-level declaration — `data`/`fn`/`type` from the AST, `test fn` decl lines from the same text scan discovery uses (`scan_test_decl_lines`). An edited `test fn` forces that witness to run (`edited_test_fns`, per-function precision); an edited `fn`/`type`/`service` or a failed resolve / non-.dag / preamble edit fails closed to a full run (findings 2 + C). Receipts (execution, not grep): - host: node_precise_test_fn_body_edit_runs_only_that_witness — editing witness B's body skips witness A; editing A's own body runs A. - host: node_precise_referenced_runs_orphan_skips_by_execution — the sound single-file node-precision proof (a referenced node runs, an orphan skips; the intra-witness A/B variant was unsound and dropped — a witness that names a node depends on it, so §5 must run it). - unit: scan_test_decl_lines_pairs_names_with_1_based_lines. Removed the now-unused byte-span overlap helper (the partition is line-based). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Isolate node-frontier seed collection from the corpus index (fix #5295 CI FreeMonoid poison) The Phase 1.5a node-precise CI floor skip resolves the changed `.dag` files to locate which top-level declarations moved (`collect_frontier_seeds_from_diff_line_ranges`). It did so over the *same* `MultiEntryIndex` the corpus then resolves over. That index carries interior-mutable parse / intern / typed-module caches, so resolving a changed file first warms — and, under the known v2 generic-instantiation bootstrap limitation, corrupts — a module the corpus later reuses: resolving `ci_floor_plan.dag` first caches `FreeMonoid<T>` WITHOUT its `Empty`/`Cons` variants, after which every corpus entry whose closure reuses `node_query.dag` fails to resolve (`undefined variable 'Empty'`). `main` never hit this (no skip -> no pre-corpus resolve); the width>1 shards already build a fresh index per thread, so only the width==1 path (CI's mode) shared. Fix: resolve the frontier analysis over a throwaway index so it is a pure read that cannot perturb the corpus it decides over (§3 cache-impurity: cold-vs-warm resolve must agree). One line; no change to the skip topology. Verified by execution: - full floor pass (skip ON): batch 2 `PASS discovery-corpus (486 witnesses)` — the FreeMonoid resolve failure is gone (red->green across this one change). - new host regression `frontier_warmup_does_not_poison_corpus_resolution`: injects a diff on the proven poisoner `ci_floor_plan.dag` with a `node_query` consumer (`budget_roster_completeness_test.dag`) in the roster; RED with the exact CI error without the fix, GREEN with it. `run_discovery_rows` resolves every entry before the skip decision, so the poison bites whether or not the entry is ultimately skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Phase 1.5a REDO v2: stateless CI floor witness skip with node-precise frontier population. Reuses cool-pike's
.dagskip policy (affected_set_floor_runner.dag); replaces only the host transport that builds the rerun frontier.Before (#5273 / cool-pike v1):
git diff --name-only→ treat every TestClaim in touched files as frontier nodes.After (this PR):
git diff -U0→ parse unified-diff line ranges → collecttest_claim_evaluation_nodesonly fromdataTestClaim declarations whose source spans overlap changed lines.Wiring:
RunnableDiscoveryBatch.skip_unaffected_node_frontier: trueon the CI floor discovery batch (ci_floor_plan.dag)claim_executor/cli_run::run_discovery_corpus_with_optionshonor the flagSupersedes file-level #5273.
Test plan
cargo clippy -p v1-compiler --lib -- -D warningscargo test -p v1-compiler --lib floor_skip_frontier(unified-diff parse + span overlap)gunbc run … affected_set_floor_runner_test.dag --function floor_runner_node_frontier_policy_holds --claim-run→ truegunbc run … ci_floor_plan_witness_test.dag --function ci_floor_plan_witnesses --claim-run→ truegunbc ci(claim_executor floor with skip enabled on discovery batch)