docs(agents): unit tests before every push, judged by exit code - #457
Merged
Merged
Conversation
A unit test failed first in CI on #455. It had failed locally too, but the output was piped through head and log lines from deliberately failing mock requests pushed the FAIL out of view. AGENTS.md now states the rule before every push: unit tests must pass, read from the exit code rather than filtered output; run the acceptance tags for what changed, not the full suite, which CI runs. It also records the test hazard behind that failure: cobra's LocalFlags() and InheritedFlags() mutate the shared rootCmd, so tests walk Flags() and PersistentFlags(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XtSQ2kfpcRXXqweskgXkH
… ones Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XtSQ2kfpcRXXqweskgXkH
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.
A unit test failed first in CI on #455. It had failed locally too — the output was piped through
head, andlevel=errorlines from tests that mock failing API calls pushed theFAILout of view.AGENTS.md§ Runninggo testafter code changes now states the rule before every push:go test ./...,go vet ./...). A unit test should never fail first in CI.It also records the hazard behind the failure: cobra's
LocalFlags()andInheritedFlags()merge parents' persistent flags into a command as a side effect, mutating the sharedrootCmdfor later tests. WalkFlags()andPersistentFlags()instead.Docs only — outside the acceptance path filter, so it queues no acceptance run.
🤖 Generated with Claude Code
https://claude.ai/code/session_012XtSQ2kfpcRXXqweskgXkH