Skip to content

evidence.equivalence_target: index cases with a port once per target (Part of #5162) - #6450

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5162-20261024T1113Z
Oct 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5162-20261024T1113Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5162. Test-time speedup; no workflow edits, no engine change.

What

tests/tools/evidence.py::equivalence_target globbed CASES/*/case.json and re-read each case.json once per LINKed program. A live evidence-report build calls it ~350 times, so on a profile it was ~100 of 141 s. The index of cases-with-a-port and their program is now built once per target. Behaviour is unchanged: a new test pins the port paths for every case with programs against the old nested loop.

Measured (local, uncontended): the five test_a_db2_* tests 10-13 s -> ~3 s each (one 7.9 s: first use of the fixture); test_evidence_report.py 115 s -> 98 s; time_ratchet check: 0 over limit, 0 warned.

Checklist

Checklist: done [c:adf49d6b] -- already on main since #5163 (--ignore=tests/cobol_mainframe/test_evidence_components.py in smoke-test.yml, time_ratchet.IGNORED); nothing left to change, no workflow edit made here.
Checklist: partial [c:fc924c44] -- the ~430 s tail is already ~115 s on main (#5178 and siblings); this cuts the Db2 tests. What is left: the remaining 6-8 s release-gate tests and test_check_fails_on_an_edited_report (~11 s), which each rebuild the report live.
Checklist: partial [c:5c334ba2] -- not started: a wall-calibrated weight needs the split config in .github/workflows (out of scope, "no workflow edits") and CI wall-time data.

Class / Sibling gaps

Class: a per-item filesystem scan inside a loop in the evidence target builder (the same cases index re-derived per LINKed program). Members: equivalence_target linked-program scan (fixed here). Sibling gaps: evidence_report.build_program -> record_summary -> equivalence_target is still called ~350 times per build (174 record_summary calls re-derive Target each time; ~80 s under cProfile), and det_coverage_ledger.fingerprints (~52 s profiled, memoised per module only in tests). Memoising equivalence_target per process needs cache invalidation for tests that edit case dirs, so not done here.

Remaining slices: memoise equivalence_target / fingerprints in the build; durations weight (needs workflow change).

Gates: pr_gates --fast 7/7, --ratchets 9/9 (via heavy-run.sh); tree-wide guards pass.

🤖 Generated with Claude Code

…get (Part of #5162)

The five Db2 evidence_report tests went from 10-13 s to ~3 s each (file: 115 s -> 98 s).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 11:39
@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 11:47
@squid-protocol
squid-protocol merged commit 4a9fca4 into main Oct 24, 2026
49 checks passed
@squid-protocol
squid-protocol deleted the churn/5162-20261024T1113Z branch October 24, 2026 12:07
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant