docs: record four testing practices the v2.6.0 release earned - #418
Merged
Merged
Conversation
Each of these cost real time in v2.6.0 and none was written down anywhere. A fix is not done until it has been reverted and the test watched to fail. An audit of the release found eight fixes that could be deleted with a green suite, two tests failing for the wrong reason, and one rewritten to assert the regression it existed to catch. It is the only technique used on that release with no false negatives, and it costs a minute per fix. Prove a filter with a negative control. The API answers 200 and returns a full result set for a parameter it does not support, so a dropped filter is indistinguishable from a working one unless a deliberately bogus value is also tested. This was the single most repeated defect class in the release -- metrics filters, MCP arguments, comma-separated ids -- and one negative control catches all of them. Test each call site separately. The delivery-group data loss existed in four code paths; the third was found only after the first two were considered fixed. Redaction that matches only double-quoted values misses the config file, because the CLI writes single-quoted TOML. Two separate agents printed a key that way in one day, both believing they had redacted it. Also documents the acceptance suite's 240 req/min ceiling: two concurrent runs exhaust it and every job fails at its timeout with zero assertion failures, which reads as a code failure and is not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BnrKWZQASV7bFJ4oGWwmo9
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.
Four practices that cost real time during the v2.6.0 release and were written down nowhere. Docs only — no code, no behaviour change.
No new
TESTING.md:AGENTS.md §9andtest/acceptance/README.mdalready own this ground, and a third file would split the guidance three ways.AGENTS.md§9 — Testing GuidelinesA fix is not done until you have reverted it and watched the test fail.
A post-merge audit of #392 reverted each fix in turn and re-ran the suite. Eight fixes could be deleted with the board still green. It also found two tests that failed for the wrong reason — a
listenstatus-bar regression reported itself as a colour bug — and one test that had been rewritten to assert the regression it was written to catch.This was the only technique applied during that release with no false negatives, and it takes about a minute per fix.
Prove a filter with a negative control. "No error" is not evidence.
The API answers 200 and returns a full result set for a query parameter it does not support, so a silently dropped filter looks identical to a working one. Assert both directions: a real value narrows the result, a bogus value returns zero.
This was the most repeated defect class in the release —
--connection-idonmetrics attempts,delivery_grouponhookdeck_requests list, comma-separated--idon three commands. One negative control catches all of them, and nothing else did.When a fix has several call sites, test each separately.
The delivery-group data loss existed in four code paths. The third was found only after the first two were considered fixed — by writing an acceptance test, after two code reviews had passed over it.
AGENTS.md— CLI authentication keysThe CLI writes single-quoted TOML, so a redaction pattern matching only
"..."prints the key verbatim. Two separate agents did exactly this within one day, both believing they had redacted correctly.test/acceptance/README.md— new "Rate limits" sectionThe API allows 240 requests/minute and a full slice makes thousands of calls.
Two concurrent runs against the same projects exhaust it: every job hits its timeout with 429s, and zero assertion failures. That reads as a code failure and is not — it cost an hour of misdirected diagnosis. The section also notes that a direct push triggers a
pull_requestrun, so pushing and dispatching together produces precisely this collision.Deliberately not included
🤖 Generated with Claude Code
https://claude.ai/code/session_01BnrKWZQASV7bFJ4oGWwmo9