🤖 tests: remove tautological tests that mirror static content#2274
Merged
🤖 tests: remove tautological tests that mirror static content#2274
Conversation
Remove 4 tests across 3 files that only asserted hardcoded strings appear in output where those strings are static constants in the source code — providing zero behavioral coverage. - systemMessage.test.ts: "includes mux_subagent_report guidance" (6 assertions mirroring PRELUDE constant) - modeUtils.test.ts: "includes instructions to use ask_user_question" and "includes sub-agent delegation guidance" (7 assertions mirroring static return text) - agentDefinitionsService.test.ts: "Ask agent instructs to trust Explore sub-agent reports" (assertions mirroring static .md content)
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
Removes 4 tautological tests across 3 files that only asserted hardcoded strings appear in output where those strings are static constants — providing zero behavioral coverage and adding maintenance burden (any prompt wording change requires updating tests that test nothing).
Background
PR #2273 highlighted the pattern: when the system prompt
PRELUDEgains a new section, tests get added that assert the exact static text appears in the output ofbuildSystemMessage(). SincePRELUDEis unconditionally included viaPRELUDE.trim(), these tests are tautological — they verify a template literal contains its own content.A broader scan found the same anti-pattern in two other test files.
Implementation
Removed tests (4 tests, 15 tautological assertions):
systemMessage.test.tsPRELUDEconstant (<completion-discipline>,<subagent-reports>)modeUtils.test.tsgetPlanModeInstruction()modeUtils.test.tsgetPlanModeInstruction()agentDefinitionsService.test.tsask.mdbuilt-in agentKept tests — all remaining tests in these files exercise real conditional logic: file reading, model-section regex matching, precedence/fallback behavior, instruction scoping,
planExistsbranching, etc.Risks
Low. Only removes tests that provided no behavioral signal. All remaining tests pass.
Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$0.00