Repository navigation
fix(ci): test-health keeps unfinished files in the rotation and small packages share a batch - #3856
Merged
Merged
Conversation
… packages share a batch A finding deferred for budget or proof used to mark its file audited for the whole re-audit window, so the slowest, flakiest files dropped out of the rotation with their prepared fixes stranded on one machine (#3852). A deferred finding now says why (`deferredFor`); a file whose latest audit deferred work for budget or proof is `unfinished`, stays eligible ahead of never-audited files, and its next brief lists those findings. `record cluster --wip` stores an unproven test-only fix on the ledger ref under wip/, size-capped, and the brief copies it into the next run. The report counts unfinished files and deferrals by reason, and the skill lets a run prove a written fix past its budget, up to a cap. Packages with at most `smallPackageFiles` test files now share one group, `small` (#3854). A run, a batch and a push shard stay inside one group, while a cluster still stays inside one package. A batch record from before groups reads as its package's group, and a package that is small now continues that batch as the small group's. Closes #3852 Closes #3854 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
…unfinished-and-groups
This was referenced Nov 10, 2026
…unfinished-and-groups
6 of 8 tasks
…unfinished-and-groups
schlessera
marked this pull request as ready for review
November 10, 2026 18:30
Owner
Author
|
Implementation is complete in #3856 (head Done so far:
To resume, once
The milestone is 0.45.0 on the pull request and on both issues. |
…unfinished-and-groups
schlessera
marked this pull request as draft
November 10, 2026 22:44
schlessera
marked this pull request as ready for review
November 10, 2026 22:44
…unfinished-and-groups
…unfinished-and-groups
schlessera
marked this pull request as draft
November 11, 2026 03:06
schlessera
marked this pull request as ready for review
November 11, 2026 03:06
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.
Closes #3852
Closes #3854
What changed
#3852. A deferred finding now says why, in
deferredFor(budget,proof,assigned,unreproducedorcontext), andvalidaterefuses a deferred finding without one. A file whose latest audit deferred work on that file forbudgetorproofisunfinished, notfresh. It stays eligible in both queues, and in the hot queue it ranks ahead of a never-audited file with the same score. A record from before this change, with nodeferredFor, counts asbudgetunless its smell isunreproduced.record cluster --wip <patch>stores an unproven test-only fix on the ledger ref aswip/<runId>-<n>.patch. The size is capped bywipMaxBytes, andgit apply --numstatparses the patch, so every path Git would apply must pass the batch gate's path rule. The next brief for the file lists the earlier deferred findings and copies the patch into its run directory.reportcounts unfinished files and deferrals by reason. The skill lets a run prove a fix it has already written past its time budget, up toproofOverrunMinutes, before it takes a new cluster.#3854. A package with at most
smallPackageFilestest files (default 25, counted over the profile's tiers) belongs to the shared groupsmall. Every other package is a group of its own. A run, a batch and a push shard stay inside one group, while a cluster still stays inside one package. The plan and the brief name the group and each cluster's package.batch statuscounts what is left in the group. A batch record from before groups names only its package and reads as that package's group, and a package that is small now continues that batch as the small group's. The decision record, both skills,landing.mdandfailure-issues.mddescribe the change.Why this shape
planRun, and ci: small packages share one test-health batch instead of landing one pull request each #3854 says to land them one after the other. One pull request does that and pays one hosted closure.smallis reserved. A package literally namedsmallis refused with a clear message rather than silently merged into the shared group.--bun-only, still plans its files.Io.configlets the CLI test fixture set its own threshold, so the existing tests exercise one large and one small package.Proof
Failing first. The new tests were copied into a worktree at
origin/main(7f1c158, before this change), and each targeted test failed on an assertion, not on module load:toContain(bow.test.ts)th-20261110115220-5ecaed#0fresh, fresh, fresh, notunfinished, fresh, fresh[group, package, batch][group, batch.id, isNew]record cluster --wipstores the patch, the brief resumes from ittoMatchObject({ wip })[unfinished, auditedCurrent, byDeferredFor]The select file imports the new
groupsOf, whichmainlacks, so that one import was stubbed to let the file load. The stub throws only in the shardsdescribe, which these tests do not use.Mutations. 16 mutations, each one killed by its named test on an assertion line, with the tree restored clean after each:
? "fresh" : "fresh"?? "unreproduced"th-20261110115220-5ecaed#0replaybatch.group === groupresolveGroupexhausted = trueLive checks, dry runs against the real ledger at the first head (
052092378) with nothing claimed or written:TH plan --dry-run --package ui-react --mode hot: cluster 0's seed ispackages/ui-react/tests/browser/hygiene-review.layout.tsx, andstats.unfinishedis 1.TH plan --dry-run --mode sweepcontinues the openui-reactbatch, as a run always does, so it shows no small packages while that batch is open. The grouping was checked through the push path instead.TH shards --profile push --count 24gives onesmallshard of 100 files across 12 small packages, where before each would have had its own shard.TH plan --dry-run --profile push --shard <small shard>plans 45 clusters from all 12 packages, in groupsmall.Suites.
bun run test:skills: 262 pass, 0 fail.bun run lintis clean. The whole-repotsc --noEmitran out of memory locally, so a scopedtscoverscripts/test-health*and its tests was run instead, and was clean before the test call sites were updated. The tests then exercise every call site.Base refresh. Main gained #3735 (ui-react/ui-sdk/ui-server, no file in common), merged in at
c0d45d9ed;check:prrerun on that head, receipt below.Review. An independent gpt-6-astra review raised 7 findings. All were checked and fixed in this head, and each fix has a test and a mutation above. The fixes are the traditional-diff
--wipbypass, shard group resolution, helper-only patches, sweep starvation, the reserved namesmall, a weak ripeness test, and the proof-overrun rule missing from the worksheet reference. A further wording fix in the push skill says a batch ripens when its group, not its shard, is exhausted.{"version":1,"kind":"brain-check-pr-receipt","head":"dcb137c392fd6a740ecee0a6733ab2fec5667021","base":"origin/main","mode":"focused","startedAt":"2026-11-11T03:03:50.438Z","finishedAt":"2026-11-11T03:05:14.596Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":10334.362367000002},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":132.26624999999876},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":97.13472700000057},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":16.897360999999364},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":73492.598489}]}Checklist
check:prasked for none.)docs/reflect the change, or nothing documented moved.--wiprefusal stops onerecord clustercall, records nothing, and names the offending path. The reserved-name refusal stops planning only, names the package and the fix, and touches no state.)docs/decisions/provider-history.md): the provider-history guard passes, or nothing on a turn's path changed.Anything left open
Nothing. The test-health push stays paused: the maintainer asked for only these two issues in this session.
🤖 Generated with Claude Code