Skip to content

🤖 tests: remove tautological tests that mirror static content#2274

Merged
ammario merged 1 commit intomainfrom
tests-7smj
Feb 9, 2026
Merged

🤖 tests: remove tautological tests that mirror static content#2274
ammario merged 1 commit intomainfrom
tests-7smj

Conversation

@ammar-agent
Copy link
Collaborator

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 PRELUDE gains a new section, tests get added that assert the exact static text appears in the output of buildSystemMessage(). Since PRELUDE is unconditionally included via PRELUDE.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):

File Test Assertions Mirrors
systemMessage.test.ts "includes mux_subagent_report guidance in the system prompt" 6 PRELUDE constant (<completion-discipline>, <subagent-reports>)
modeUtils.test.ts "includes instructions to use ask_user_question..." 4 Static return text of getPlanModeInstruction()
modeUtils.test.ts "includes sub-agent delegation guidance" 3 Static return text of getPlanModeInstruction()
agentDefinitionsService.test.ts "Ask agent instructs to trust Explore sub-agent reports" 2 Static content from ask.md built-in agent

Kept tests — all remaining tests in these files exercise real conditional logic: file reading, model-section regex matching, precedence/fallback behavior, instruction scoping, planExists branching, 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

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)
@ammario ammario merged commit 2fd027f into main Feb 9, 2026
23 checks passed
@ammario ammario deleted the tests-7smj branch February 9, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants