Skip to content

Derive T2 test-migration debt from live state instead of hand-maintained seed-shrink-census.md 5B table (dissolve the parallel ledger) - #6181

Merged
briansrls merged 8 commits into
mainfrom
session/witty-ant-890
Jul 3, 2026
Merged

briansrls merged 8 commits into
mainfrom
session/witty-ant-890

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session witty-ant-890.
Pushing to session/witty-ant-890 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

briansrls and others added 2 commits July 2, 2026 23:13
…table

docs/plans/seed-shrink-census.md §5B hand-listed v1 test modules with no
floor witness equivalent — a parallel ledger that drifted from the tree
(DESIGN §6). Replace it with a live derivation:

- cli_run.rs: test_migration_debt_* builtins diff src/v1/tests/src/*.rs
  modules containing #[test] against the floor *_test.dag witness roster
  (via corpus_dag_files(), the same witness_layer_roots corpus the CI
  floor discovers from) by stem.
- v2.lens.test_migration_debt: shrink-only ratchet over the live counts
  (module count / total LOC / total test-fn count), baselined at the
  values measured when the static table dissolved (66 / 13,441 / 418).
- src/v2/test/claim/manual/test_migration_debt_test.dag: floor-discovered
  witnesses gating the ratchet.
- seed-shrink-census.md §5B now points at the live builtins/lens instead
  of carrying the table.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 2, 2026 23:21
briansrls and others added 3 commits July 2, 2026 23:26
…ge always false

Review caught a real §5 fail-open: test_migration_debt_stem only stripped
".rs" then "_test", so floor filenames (which end "_test.dag") never lost
their .dag suffix and could never equal a v1 stem. Every #[test]-bearing
v1 module was reported as debt regardless of floor coverage; the 66/13441/418
baseline was actually "all v1 test files", not a real diff.

Also tightens the matcher (per a separate review comment) from fuzzy
substring matching to exact stem equality: substring matching let "pipeline"
(the single largest debt module) false-match the unrelated floor stem
"typescript_import_pipeline", hiding rather than counting debt.

Adds a discriminating red witness: witness_option_bridge_test.rs has a real
floor counterpart and must never appear in the debt roster (this witness
would have caught the regression above). Re-measured baselines with the
fixed matcher: 77 modules / 28,546 LOC / 912 #[test] fns (83 total v1 test
modules with tests, 6 genuinely floor-covered).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Both review findings addressed, pushed in 3d75bc6:

Stem-matching real bug (claude-opus-4-7, CHANGES REQUESTED): confirmed — test_migration_debt_stem only stripped .rs then _test, so floor filenames (*_test.dag) never lost their .dag suffix and could never equal a v1 .rs stem. The matcher was effectively always-false, and the 66/13,441/418 baseline was really just "every #[test]-bearing v1 module," not a real coverage diff. Fixed by stripping either .rs or .dag before stripping _test. Added a discriminating red witness (test_migration_debt_known_covered_module_is_not_debt) asserting witness_option_bridge_test.rs — a module with a genuine floor counterpart — never appears in the debt roster; this witness would have caught the original bug.

Fuzzy substring matching (claude-opus-4-7, APPROVE, non-blocking): also fixed, since I was in the matcher anyway and it's the same failure family — switched to exact stem equality. The substring version let "pipeline" (418 tests, the single largest debt module) false-match the unrelated floor stem "typescript_import_pipeline", hiding debt.

Re-measured baselines with the corrected matcher against the live tree: 77 modules / 28,546 LOC / 912 #[test] fns (83 total v1 test modules contain #[test]; 6 are genuinely floor-covered by exact stem). Doc and lens baselines updated to match. Verified: cargo check -p v1-compiler clean, and a full gunbc compile --target dag over src/v2 + dag shows zero errors from any file this PR touches (remaining 4 pre-existing errors are unrelated fixtures/files last touched in #6160, intentionally-broken layering-scan/extdeps fixtures).

— sent from witty-ant-890

@gunbai-bot

gunbai-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Investigated the "1 failing" report on `3d75bc6`. It is not a code failure: the `ci` job's "gunbc ci (.dag witnesses + gates)" step ran the full CI floor for ~24 minutes (through compile + into batch-1 host-effects) and was killed by the workflow's 30-minute `timeout-minutes` job cap — the log ends with ##[error]The operation was canceled. mid-witness-execution, not a red assertion or panic. No newer commit superseded this run (concurrency group shows only one run for this SHA), so it wasn't preempted either.

Corroborating: at the same time, every queued run on `main` itself (5/5 checked) is sitting in `queued`/not-yet-started — repo-wide runner congestion, consistent with the documented "CI slow = runner-slot count not saturation" pattern for this project, not something introduced by this PR's diff.

Will re-trigger once the current run finishes (GitHub won't let me rerun while it's still "running" — the `rust_tests` job hasn't started yet). No fix commit needed here.

— sent from witty-ant-890

@gunbai-bot

gunbai-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Investigated the rust_tests failure on run 28628703792 (job 84909238471):

  1. cargo fmt --all --check diff in cli_run.rs — real, caused by my edit. Fixed (auto-committed at 0fb380af85).

  2. func_env_semantic_equivalence_test::func_env_whole_corpus_semantic_oracle_matches_pre_change_baseline panic — pre-existing, unrelated to this PR:

    panicked at src/v1/tests/src/func_env_semantic_equivalence_test.rs:111:5:
    git archive db559b42814 failed: fatal: pathspec 'dag' did not match any files
    

    This oracle pins BASELINE_COMMIT = "db559b42814" (2026-06-29) and does git archive db559b42814 dag src/v1. But at that commit the tree still has the pre-rename layout (dsl/, not dag/) — confirmed via git ls-tree db559b42814 (shows dsl, no dag). The rename landed later in rename dsl -> dag #6165 ("rename dsl -> dag"), which is the same commit that last touched this test file, on main (git merge-base --is-ancestor 2749a4432f origin/main succeeds). So rename dsl -> dag #6165 renamed the tree but never updated the frozen BASELINE_COMMIT pointer or recaptured func_env_semantic_baseline.json against a post-rename baseline — this breaks the oracle for every PR, not just this one, and predates my branch entirely.

    Not fixing it here: doing so correctly requires re-running capture_func_env_semantic_oracle against a new baseline tree to regenerate the fixture's fingerprints, which is a standalone unrelated fix outside this PR's scope (dissolving the T2 test-migration-debt census table). Flagging as a separate pre-existing regression from rename dsl -> dag #6165.

— sent from witty-ant-890

briansrls added 2 commits July 3, 2026 04:46
Resolve seed-shrink-census.md conflict by keeping the derived-live
5B section (this branch's change) over the reverted hand-maintained
table main had continued updating in parallel.
@briansrls
briansrls merged commit f50518c into main Jul 3, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the session/witty-ant-890 branch July 3, 2026 04:50
briansrls pushed a commit that referenced this pull request Jul 3, 2026
gunbai-bot Bot pushed a commit that referenced this pull request Jul 3, 2026
…deletes

#6181 landed the live debt roster; this closes the remaining §5 gap where the
shrink-only ratchet could be satisfied by deleting an uncovered v1 #[test]
module. The guard diffs origin/main...HEAD for deleted src/v1/tests/src/*.rs
files with line-anchored #[test] and requires an exact-stem floor *_test.dag
witness on HEAD before each delete is allowed.

Floor witness: test_migration_delete_guard_holds in test_migration_debt_test.dag.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jul 3, 2026
briansrls added a commit that referenced this pull request Jul 3, 2026
…tes (#6208)

* feat(test-migration): add diff-based delete guard for v1 test module deletes

#6181 landed the live debt roster; this closes the remaining §5 gap where the
shrink-only ratchet could be satisfied by deleting an uncovered v1 #[test]
module. The guard diffs origin/main...HEAD for deleted src/v1/tests/src/*.rs
files with line-anchored #[test] and requires an exact-stem floor *_test.dag
witness on HEAD before each delete is allowed.

Floor witness: test_migration_delete_guard_holds in test_migration_debt_test.dag.

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

* fix(test-migration): repair delete-guard two-dot diff argv and clippy unused bindings

Address review on #6208:
- Two-dot mode (GUNBC_CI_DIFF_MERGE_BASE=0) now passes base/head as separate
  git diff argv entries, matching floor_diff_observe.dag — the prior single
  "origin/main HEAD" string was unparseable.
- Rename unused Err(e) bindings in the non-CI-diff fallback arms to Err(_).

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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