From 07fbe98116f858076f0ff72b5e89fbe8c2743a5f Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 13 Nov 2026 12:34:10 +0000 Subject: [PATCH] feat(batch,prm): merge needs at least one completed PR check, all green (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 --- AUTONOMY.md | 6 ++- agents/conductors/batch/AGENTS.md | 10 +++-- agents/conductors/batch/_digest.py | 40 ++++++++++++++++---- agents/conductors/batch/_orchestrator.py | 5 ++- agents/conductors/batch/closeout_template.md | 6 ++- skills/prm/prm.md | 4 +- skills/prm/reference.md | 8 +++- tests/test_orchestrator_closeout.py | 21 ++++++++++ tests/test_orchestrator_digest.py | 28 +++++++++++--- 9 files changed, 103 insertions(+), 25 deletions(-) diff --git a/AUTONOMY.md b/AUTONOMY.md index 9a33b0c7..11b62019 100644 --- a/AUTONOMY.md +++ b/AUTONOMY.md @@ -341,7 +341,11 @@ never an assumption: (`consult_vitals_verdict --repos "$(active_task_repos )"`). Only CI on `main` of the touched repos and their dependants blocks; every other reason comes back in `shown_reasons` and is listed in the PR body without - blocking. Only **GREEN** passes. **STALE** — in-scope evidence missing, + blocking. A touched repo on Heart's `not_heart_gated:` list (profiling, + inference, assistants, visualization, Scientist, Broca, Cortex; ruling + 2026-11-13, PyAutoHeart#343) is *gate-deferred*: shown, never STALE, and + its PR checks decide at merge — at least one completed check, all green, + or the merge is the human's. Only **GREEN** passes. **STALE** — in-scope evidence missing, unfinished, or older than 6 h — **never passes**: re-check, or park. With **no Heart CLI** (a web session) the one fallback is the *published* organism-wide feed: GREEN and under 6 h old passes, because it is at least diff --git a/agents/conductors/batch/AGENTS.md b/agents/conductors/batch/AGENTS.md index 2d2588f7..cd7c447b 100644 --- a/agents/conductors/batch/AGENTS.md +++ b/agents/conductors/batch/AGENTS.md @@ -286,8 +286,10 @@ counts the PRs GitHub shows merged by `review-at:`, whoever merged them, and `workers-crashed` counts exit records, not a tally. A `### Workers` section prints one line per worker (`