Skip to content

Require Stage B characterization tests to be shown failing against a mutation - #162

Merged
dmccoystephenson merged 2 commits into
mainfrom
feature/stage-b-tests-mutation
Oct 20, 2026
Merged

dmccoystephenson merged 2 commits into
mainfrom
feature/stage-b-tests-mutation

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • A Prove each guard can fail bullet is added to the generated template's Phase 2 Stage B (unit-test expansion). For at least one new test per target, a small, plausible mutation of the characterized production code is made temporarily, the test is confirmed to fail, and the file is restored with git checkout --. A test that survives every plausible mutation is to be strengthened or dropped, and the mutation is never committed.
  • A matching Tests-mutation (empirical, not judged) item is added to the Phase 4 universal rubric, directly after Tests-fix. Tests-fix only covers bug fixes, so a Stage B PR previously scored it N/A and nothing checked that the new tests could fail at all. The new item is N/A for PRs that add no characterization tests.
  • This writes down the step that was done by hand in PR Add extract_template_body edge cases and main() tests #159, where three of nine new tests were confirmed to fail against a mutated closing-fence comparison in scripts/check_docs.py.
  • No placeholder is added and no Step is added or removed, so neither the Step 4 table nor README's "What it does" list changes. No phase is renumbered. Steps 3, 5, and 6 are untouched, so nothing changes for gardener.

Closes #160

Research grounding

RESEARCH.md §3: regression evidence is what tells a real guard apart from a coincidental one. Tests-fix already applies that to bug fixes, and this change applies it to characterization tests written without a fix. An Implementations entry is added under §3. Its ship date is written as the authoring date, which has the known problem described in #128.

Retrofit

Generated loops that predate this change have a Stage B with no mutation check. Any loop that has run a Stage B cycle is likely to need a retrofit pass, since those loops are the ones that score Tests-fix as N/A. This includes create-dev-loop-dev-loop, which ran one for #159. Per CLAUDE.md's "Promoting a rule into the template", the retrofit is left to a follow-up pass.

Doc sync check

  • RESEARCH.md updated (an Implementations entry under §3)

Test plan

  • python3 scripts/check_docs.py: "Doc consistency check passed."
  • python3 -m unittest discover -s tests: ran 41 tests, OK
  • Neither added line contains a fence. The count of unescaped ^```` lines in create-dev-loop.md` is unchanged.
  • UNVERIFIED (behavioral): no /create-dev-loop run was performed. This headless dispatch is not authorized to create a GitHub repo (Step 6) or to write to ~/local-skills/ / ~/.claude/commands/ (Steps 3/5). None of the five CLAUDE.md "Testing changes" items were exercised. For that reason the PR is left for a maintainer to merge, not auto-merged.

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

dmccoystephenson and others added 2 commits October 19, 2026 01:32
…mutation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (posted as a comment in this headless dispatch, standing in for a formal review):

  • Scope: PASS — the diff is 2 template lines in create-dev-loop.md (one Stage B bullet and one Phase 4 rubric item) plus 1 RESEARCH.md Implementations line. All three are needed for Stage B has no check that new characterization tests can fail #160.
  • Tests-new: N/A — no function was added. The only code is scripts/check_docs.py, which is unchanged.
  • Tests-fix: N/A — this is not a bug fix.
  • Sibling structure: PASS — no new file. The new rubric item follows the **Name (empirical, not judged):** form of Tests-fix, and the Stage B bullet follows the bold-lead style of the bullets around it.
  • Sibling renames: N/A — nothing was renamed.
  • Docs: PASS — the Phase 7 table was checked. README, CONTRIBUTING.md, SECURITY.md, the PR and issue templates, and scripts/README.md do not restate the rubric items or Stage B's bullets (searching for Tests-fix and Stage B outside create-dev-loop.md finds only RESEARCH.md). RESEARCH.md §3 has the new Implementations entry. CLAUDE.md is unaffected.
  • Issue resolution: PASS — Stage B has no check that new characterization tests can fail #160 asked for a Stage B step and a rubric line next to Tests-fix. Both are added, with the issue's suggested wording kept apart from small edits for the template's voice.
  • CI: PASS — doc-consistency is green on the PR head (7s).
  • Placeholder parity: PASS — no placeholder was added. check_docs.py: "Doc consistency check passed."
  • README Step parity: N/A — no Step was changed.
  • Fence escaping: PASS — no fence was added. The count of unescaped `^```` lines is the same as before (28).
  • Phase numbering: PASS — no phase was renumbered. The new text refers to "Phase 2 Stage B" and "Phase 4 rubric", and both still exist.
  • Version comments: N/A — the header is not touched.
  • Research grounding: PASS — §3 is cited, and a PR Require Stage B characterization tests to be shown failing against a mutation #162 Implementations entry has been added.
  • No back-ported specifics: PASS (borderline) — the PR body refers to scripts/check_docs.py only as the PR Add extract_template_body edge cases and main() tests #159 example. The template text itself names no repo-specific file or command.
  • gardener interface: N/A — Steps 3, 5, and 6 are unchanged.
  • Retrofit note: PASS — the PR body says which loops likely need a retrofit (those that ran Stage B, including create-dev-loop-dev-loop).
  • Behavioral validation: FAIL (UNVERIFIED) — no /create-dev-loop run was performed. The headless dispatch is not authorized for Step 6 repo creation or for writes outside the checkout. For that reason the PR is not auto-merged.

Judgment call for the maintainer: the Phase 4 step 5 example comment body still lists only Tests-new/Tests-fix before its .... This was left as is because the ... already stands for the remaining items.

Summary: the change is mechanically consistent and CI is green, but the template's behavior has not been validated. It is ready for a maintainer to review and merge.

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson

Copy link
Copy Markdown
Member Author

Triage skip reasons for this cycle (one PR per cycle; #160 was selected because it is small, well specified, and backed by an observed instance in PR #159):

This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

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.

Stage B has no check that new characterization tests can fail

1 participant