Conversation
Problem: Hand-maintained count lines in tests/CLAUDE.md serialize PR merges. - Every PR that adds/removes tests must edit the same lines - When 4+ PRs in flight, all editing count lines → merge conflicts - 2026-08-03: Turned 4 green PRs red simultaneously Solution: Generate suite counts in tests/SUITE-COUNTS.json (GEN artifact) - New tool: tools/gen_suite_counts.py generates JSON from git ls-files (deterministic) - tests/CLAUDE.md now references the artifact, contains no volatile counts - Merge conflict class ELIMINATED: generated files bypass serialization - Fail-closed: counts must match actual files or gate fails (exit 1/2) - verify_test_suite_count.py updated to delegate to gen_suite_counts.py (wrapper) - Registered in generated_paths.py + merge_queue.py REGENERATORS Tests prove fail-closed behavior: - Drift detection works (exit 1 on mismatch) - Regeneration is idempotent - Non-git-repo fails-closed (exit 2) - Wrapper delegates correctly Result: Adding/removing tests no longer conflicts with sibling PRs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
matt82198
enabled auto-merge
August 4, 2026 04:05
…s (Node 27, Python 243)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Structural fix: Moves hand-maintained test suite counts from tests/CLAUDE.md into generated tests/SUITE-COUNTS.json artifact. Eliminates merge-conflict serialization that struck the PR board 2026-08-03 when 4+ concurrent PRs all edited the same count lines.
Problem
**Python (240 suites):**) in tests/CLAUDE.mdSolution
tools/gen_suite_counts.pygenerates JSON fromgit ls-files(deterministic)tests/SUITE-COUNTS.json(registered in generated_paths.py)verify_test_suite_count.pyupdated to wrapper (delegates to gen_suite_counts.py)merge_queue.pyREGENERATORSFail-Closed Proofs
test_gen_suite_counts.py: 8 tests prove drift detection + regeneration + idempotencytest_list_test_suites.py::test_counts_match_verify_gate: validates against generated artifactResult
Adding/removing tests no longer conflicts with sibling PRs. Merge serialization eliminated.
🤖 Generated with Claude Code