docs(claude-md): scope test verification by the types a change touches - #2389
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Phase 4 says to run "the suites you touched and their neighbours, never the whole target". Read literally, that means the suites whose files you edited. It should mean the suites that own the types you changed, and the difference just cost a red CI run.
What happened
A change to
PersistedTab.init(from:)in #2386 made an unknowntabTypedecode as.queryinstead of throwing. The comment justifying it claimed the throw "would fail the whole aggregate file". That was never checked and is false:TabDiskState.init(from:)decodes through[LossyTab].compactMap(\.value), so a bad tab is dropped and the rest survive.TabDiskStateDecodingTestsexists to pin exactly that, in a test named "Drops tabs with an unknown legacy tab type and keeps the valid ones". Nobody ran it, because no file in that suite was edited. Local was green across fifteen suites; CI was red.The change was also strictly worse than what it replaced. A tab written by a newer build would come back as an empty query tab carrying a title like
Procedure: public.f(date)rather than being dropped.Two rules added
Scope the suite list by type, not by file.
grep -rl "TypeName" TableProTestsnames the suites that will judge the change, and it takes a second. A shared model always has tests you never opened.When CI fails and local passed, do not reach for the whole target. A local full run of
TableProTestsreports around 60 failures with nothing to do with the change: quarantined suites, locale, pasteboard, network and timer-dependent cases. That number drowns the one failure that matters. Compare against a baseline instead: read the CI log for the real count, then run the suspect suites on a worktree at the merge base. A suite that fails in both is not yours.That second rule was worth writing down because chasing it is what turned a one-line revert into a long detour. The local full run showed 64 failures; CI recorded exactly one issue. Running
StructureChangeManagerUndoTestsandSaveCompletionTestson a merge-base worktree reproduced their failures there too, which settled them as noise in one step.Verification
The rule is prose in
SKILL.md; there is nothing to build or test.git diffis four added lines.Follows #2387, which made
docs/STYLE.mddiscoverable and addedverify.sh docs.