Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Pin the Broken Input: Characterization Tests Before an OSS Parser Patch

Описание и применение

Добавление минимального фикстуры и теста‑характеризации превратило скрытую регрессию в воспроизводимую проблему, позволяя ревьюерам проверять изменения по зафиксированному поведению.

Задача

A green test suite can miss regressions when a patch fixes only the happy path and the failing input is not represented in tests, leading to silent behavior changes in production.

Результат

Adding a minimal failing fixture and a characterization test turned a silent regression into a reproducible, reviewable issue, ensuring future patches cannot drift the observed behavior.

Рабочий процесс

  • 1. Minimize the failing input and store it as a fixture in tests/fixtures/
  • 2. Write a characterization test that fails for the correct reason and runs against the default branch
  • 3. Freeze the public contract beside the test in a contract file
  • 4. Patch only the minimal code needed to make the characterization test pass
  • 5. Review the diff against the frozen failure, not against style

Доказательства

The local suite stayed green because every fixture used short fields without embedded line breaks.

Источник

A characterization test should name the behavior under dispute, not the implementation the contributor hopes to land.

Источник

  • Дата записи: 2026-09-15T01:15:24.337Z