Skip to content

Tests-fix fallback ladder rung 1 (CI-based temporary revert) has no interruption-safe checkpoint #84

Closed

Description

@dmccoystephenson

Template gap

create-dev-loop.md's Tests-fix fallback ladder (added by #61) rung 1, "CI-based temporary revert," instructs:

Push a commit that reverts only the production fix while keeping the new/changed tests; confirm CI goes red naming exactly the new regression tests; then git reset --hard back to the verified fix commit and force-push, confirming CI goes green again.

There is no interruption-safe checkpoint between "push the revert" and "restore the fix." If the session is killed (host restart, OOM, timeout) between those two steps, a real, pushed commit is left on the PR branch shipping the pre-fix behavior — worse than "unverified," it's "verified broken and forgotten." A fresh/resuming session has to notice red CI, git show a suspicious-looking commit, and diff it against the prior good commit to work out that the fix (not the tests) needs restoring.

Confirmed on dmccoystephenson/medieval-factions-dev-loop-dev-loop: a 2026-07-29 gardener-dispatched cycle picked up an orphaned PR (Dans-Plugins/Medieval-Factions #1984) left mid-revert by a killed prior session, with no state signal beyond red CI and a TEMP: commit message.

Suggested action

Amend the ladder's rung 1 text:

  • Prefer a local, non-pushed technique (e.g. git checkout <merge-base-with-main> -- <src files>, run tests locally, then git checkout HEAD -- <src files> to restore) over the push-based CI technique whenever the local anchor can run at all — it never touches the pushed branch, so there is no window where the PR head is broken.
  • If the CI-based push technique is unavoidable (anchor genuinely unrunnable), require the revert commit's message to make recovery undoable by a future session without investigation, e.g.:
    TEMP: revert <fix-commit-sha> to prove regression tests fail — MUST be reverted before merge, see <verified-good-sha>
  • Add to Phase 1's orphaned-PR-continuation handling: a session resuming an orphaned PR should treat "red final CI run" + a TEMP:-prefixed HEAD commit as a specific, named signal to check for this exact stuck-mid-revert state before doing anything else — not just generic "CI is red, fix it."

Provenance

dmccoystephenson/medieval-factions-dev-loop#14 (final comment)


drafted by Claude on behalf of Daniel Stephenson

Activity

  1. added a commit that references this issue on Aug 3, 2026
    a4f851e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions