test: trim implementation-coupled bats tests, strengthen statusline (DOT-45)#72
Merged
Conversation
Remove tests that assert template source strings or already-removed config, where behavior is covered elsewhere: - claude-settings: drop absence checks for removed ANTHROPIC_DEFAULT_* env vars; keep the positive model-alias assertion. - log: drop empty-message-newline edge case (exercises echo, not our code). - agent-instructions, mise-config: drop template-source-string checks; the render tests already prove the output. - darwin-install-scripts: drop 4 single injection source-string checks for graphify/ai-skills/ai-plugins/ai-mcp; each libs install_main call is asserted in the render tests, which fail if injection breaks. Keep the batched library check and both prelude checks, which have no behavior-level equivalent. Strengthen statusline effort coverage: assert the '💪 max' segment instead of a bare 'max' substring, and refute the effort segment in the minimal-payload test (with the env fallback unset) so both branches of the conditional are covered. Fixes DOT-45
|
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.
Summary
QA pass on the bats suite. Cut tests that assert implementation details (template source strings, already-removed config) where behavior is separately covered, and strengthened one weak conditional. Net -7 tests; 115 remaining all pass.
Removed (implementation-coupled / redundant)
claude-settings.bats— dropped absence checks for removedANTHROPIC_DEFAULT_*_MODELenv vars (guard for gone code); kept the positive"model": "best"assertion.log.bats— dropped empty-message-newline edge case (exercisesecho, not our logic).agent-instructions.bats,mise-config.bats— droppedassert_file_contains '{{ template ... }}'source-string checks; the render tests already prove the output.darwin-install-scripts.bats— dropped 4 single injection source-string checks (graphify / ai-skills / ai-plugins / ai-mcp). Each lib's*_install_maincall is asserted in the render tests, which fail if injection breaks.Deliberately kept (QA agent flagged, verified NOT weak)
mise-configAPM-for-work test — same assertion, different input (WORK_DATA), so it verifies APM is context-independent. Not a tautology.darwinbatched library check + both prelude checks — no behavior-level equivalent, so they stay.vscode-settings— already asserts presence (L22-25) AND absence (L26-27); balanced, left as-is.Strengthened
statusline.bats— positive test now asserts the💪 maxsegment (not a baremaxsubstring); minimal-payload test now refutes💪(withCLAUDE_CODE_EFFORT_LEVELunset) so both branches of the effort conditional are covered.Verification
mise test— 115/115 pass.mise lint— clean.Fixes DOT-45