Skip to content

feat: merge guard — ≥1 completed check, all green (Heart#343) - #621

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/m2-finish
Nov 13, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/m2-finish

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

The Brain half of PyAutoLabs/PyAutoHeart#343, programme M2.

  • The watcher's pr_health (batch/_digest.py) judges each check. It needs at least one completed check, all green. A cancelled check, or a PR whose checks were all skipped, no longer passes.
  • The close-out template, /prm (prm.md step 3 and the tiered-merge refusals) and AUTONOMY leg 4 state the guard.

Test plan

  • Brain suite: 1822 passed. The known environmental test_grouped_organ_consumers failure remains.
  • Skill line counts OK. Tenant firewall OK.

Gate

  • Heart, scoped dev-ship verdict: GREEN at 14:00Z for the touched repos PyAutoHeart, PyAutoHands and PyAutoBrain (pyauto-heart readiness --dev --repos …). No RED override was needed: this is the first ship through the M2.1 scoped gate.
  • Independent review (fresh Opus context): three rounds of FINDINGS, then CLEAN. The findings were:
    • a quarantine could turn RED into GREEN after its entry was removed;
    • flaky passes were hidden;
    • the retry could resume finished output;
    • quarantine paths were matched as unanchored substrings;
    • the output clean could delete an earlier script's output.
  • Human rulings, 2026-11-13: ship. A quarantine-only YELLOW may let the nightly ship, which is a follow-up build. Timeouts get no retry.

Tier: glance. Merge mode: auto-merge on green if the Witness passes, with a post-merge summary.

🤖 Generated with Claude Code

…en (PyAutoHeart#343)

For a repo Heart does not gate, the PR's own checks are the only CI
evidence, so the merge paths now require at least one completed check on
the head, every one green. A PR with none (a repo with no CI, or only
skipped checks) is refused for unattended or tiered merge and left to the
human.

- batch watcher close-out: `pr_health` reads `gh pr checks --json` and
  judges each check (fail/cancel -> FAILED, pending -> RUNNING, no
  completed check -> NO-CHECKS, unreadable/unknown bucket -> UNKNOWN). The
  exit code alone counted a cancelled check as skipped and an all-skipped
  PR as passing.
- close-out template, /prm (prm.md step 3, reference.md tiered merge) and
  AUTONOMY.md leg 4 state the guard and the gate-deferred reading.
- Witness test: a PR with zero completed checks is refused at merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit e7d8eb2 into main Nov 13, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/m2-finish branch November 13, 2026 14:04
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