Skip to content

Require a pre-commit fixpoint before AFK commits#265

Merged
jonathansick merged 1 commit intomainfrom
u/jonathansick/ralph-setup
Apr 26, 2026
Merged

Require a pre-commit fixpoint before AFK commits#265
jonathansick merged 1 commit intomainfrom
u/jonathansick/ralph-setup

Conversation

@jonathansick
Copy link
Copy Markdown
Member

Summary

  • Tighten .claude/skills/afk-implement/SKILL.md Phase 2 so the staging gate is an explicit fixpoint: pre-commit run --all-files must exit 0 and git status --porcelain must be empty in a single run before staging. Drive-by ruff auto-fixes on unrelated files must be staged or reverted, not left dangling.
  • Treat "Found N errors (X fixed, Y remaining)" as a failure rather than a success — the agent must hand-fix the unfixable Y, closing the Mode B path that landed PR DM-54689: GitHub push webhook + PushEventProcessor #264's red lint job.
  • Add a Phase 3 push-time backstop that re-runs pre-commit run --all-files and git status --porcelain before git push; any non-clean result routes to the stuck path instead of pushing a tree CI will reject.

Test plan

  • Re-read the updated afk-implement SKILL.md and confirm the wording leaves no "exits 0 eventually" reading.
  • Run an AFK iteration on a small task that touches a directory containing latent ruff violations; confirm the agent either stages the unrelated fix or reverts it before commit.
  • After the next Ralph-produced PR, gh pr checks <num> --repo lsst-sqre/docverse should report lint green.
  • Run uv run --only-group=lint pre-commit run --all-files on main to confirm the baseline tree is clean (fixpoint semantics depend on it).

Tighten afk-implement so the success condition is a single
`pre-commit run --all-files` exiting 0 on a clean tree, not "exits 0
eventually after auto-fixes." Drive-by ruff fixes must be staged or
reverted before commit, "X fixed, Y remaining" output is treated as a
failure, and Phase 3 re-runs pre-commit as a push-time backstop that
routes to stuck on any non-clean result. Closes the gap that let recent
Ralph PRs land with red `lint` jobs.
@jonathansick jonathansick enabled auto-merge April 26, 2026 00:45
@jonathansick jonathansick merged commit 33dd6e3 into main Apr 26, 2026
11 checks passed
@jonathansick jonathansick deleted the u/jonathansick/ralph-setup branch April 26, 2026 00:49
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.

1 participant