test-discipline

Update assertions in the same commit when public interfaces change to keep CI reliable.

49|6|Updated Aug 24, 2021
One-click install
npx skills add https://github.com/webmaxru/bpm-counter --skill test-discipline-webmaxru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-discipline
Source: https://github.com/webmaxru/bpm-counter/tree/main/.copilot/skills/test-discipline
Command: npx skills add https://github.com/webmaxru/bpm-counter --skill test-discipline-webmaxru

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Align tests with evolving APIs by updating assertions in the same commit to prevent CI failures and flaky results.

Core Features & Use Cases

  • Enforces updating test assertions whenever public interfaces change.
  • Guides teams to keep disk-state expectations in sync with on-disk files and counts.
  • Helps maintain CI reliability by preventing stale tests after API refactors.

Quick Start

Update the tests in the same commit whenever you change an API, then run the full test suite to verify alignment.

Frequently Asked Questions about test-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do my tests fail in CI after I refactor an API?

Test assertions fail when they are not updated in the same commit as API changes, causing stale references that break CI reliability by mismatching on-disk file counts or array expectations.

How do I keep test assertions in sync with on-disk file changes?

Update EXPECTED_* references whenever files are added or removed to keep test assertions in sync with disk reality, ensuring on-disk file counts and arrays match the validated test suite.

What is commit discipline for maintaining reliable CI test suites?

Commit discipline for CI reliability requires updating unit, integration, and assertion-count based tests in the same commit as public interface changes, preventing flaky results after API refactors.

Do I need to update integration tests and unit tests when changing public interfaces?

Yes, you must update unit, integration, and assertion-count based tests whenever public interfaces change, keeping the CI pipeline reliable and preventing misaligned disk-state expectations.

What's the best way to prevent flaky tests when modifying APIs and disk-state expectations?

The best way to prevent flaky tests is enforcing commit discipline to update assertions alongside API changes, keeping disk-state expectations aligned with on-disk reality and validating the test suite.