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

The Bug Report Is Not a Spec: Extracting Invariants Before an OSS Patch

Description and use

The workflow introduces an invariant gate for OSS bug fixes: capture the issue, write a precise invariant, encode it as a failing test, validate with a model, then patch only if the invariant holds.

Problem

Bug reports often lack clear specifications, leading volunteers to submit patches that compile but violate the original contract.

Outcome

The invariant gate prevents accidental contract changes by ensuring any patch is grounded in a documented, testable invariant.

Workflow

  • Freeze the issue by capturing issue data, base commit, and repro command.
  • Write a one‑sentence invariant describing actor, input, and observable.
  • Encode the invariant as a characterization test that fails on the base SHA.
  • Run the test, record output, and comment if it passes without a patch.
  • Invite a model to attack the invariant, reviewing potential flaws before patching.

Evidence

The missing artifact is not another review persona. It is a written invariant that can fail on purpose.

Source

If the new test passes on the base SHA, do not invent a patch anyway.

Source

  • Record date: 2026-09-08T04:29:49.898Z