Skip to content

chore(testing): guard against tautological tests - #75

Merged
Fernando de Oliveira (fedeoliv) merged 1 commit into
mainfrom
feature/72-tautological-tests
Oct 16, 2026
Merged

Fernando de Oliveira (fedeoliv) merged 1 commit into
mainfrom
feature/72-tautological-tests

Conversation

@fedeoliv

Copy link
Copy Markdown
Contributor

Discussion Link

Link: No linked discussion. This change addresses #72.

Context

Agents can generate assertions that repeat production logic and miss the same defect on both sides, especially while refactoring. Newly extracted helpers can also attract tests that mirror internal structure without protecting additional behavior.

Closes #72

Solution

  • Extend test-discipline activation and guidance with independent behavioral oracles, a contrasting example, and concrete refactoring rules.
  • Reinforce the guidance in implementation and test-review workers and the code quality rubric.
  • Reuse existing behavioral tests for behavior-preserving refactors and add tests only for concrete coverage gaps.
  • Preserve legitimate computed expectations, helpers, snapshots, properties, reference implementations, and mocks based on what they prove.
  • Update published skill documentation and the changelog without adding tooling or changing distributed templates.

Validation:

  • npm --prefix docs run build: passed, 39 pages built.
  • git diff --check: passed.
  • git diff --cached --check: passed before commit.
  • Markdown lint comparison against the unchanged baseline: no new diagnostics across the six changed files. Existing diagnostics remain unchanged.
  • Executed the documented assertions with defective and correct implementations: the circular assertion missed the defect, while the independent assertion caught it and accepted the correct implementation.

No breaking changes or infrastructure coordination required.

Checklist

  • Linked discussion exists
  • Solution has been validated

Require independent behavioral expectations and reuse existing tests during behavior-preserving refactors to avoid circular assertions and unnecessary test churn.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 40bf5936-fdf2-408a-afe7-dd07b66ed7da
@fedeoliv Fernando de Oliveira (fedeoliv) added the status:in-progress Implementation is in progress label Oct 16, 2026
@fedeoliv
Fernando de Oliveira (fedeoliv) merged commit 5775ac5 into main Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:in-progress Implementation is in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tautological tests anti-pattern harness

1 participant