Repository navigation
State that a protected-path match outranks a pre-diff merge grant - #170
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Self-review rubric (one intrinsic pass, anchored on the CI run on head and on
Judgment call flagged for the human reviewer:
Summary: this is a small, mechanically clean prose change, handed off as UNVERIFIED because the repo's behavioral anchor cannot run headlessly. This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
There was a problem hiding this comment.
🟡 Changes recommended
The protected-path guidance leaves authorization ambiguous for resumed PRs and conflicts on whether a path-specific authorization permits merging under a blanket grant.
2 open issues
What changed in this PR
This PR clarifies the generated dev-loop skill’s merge rules for protected paths, addressing the ambiguity reported in #123 and #142.
Changes:
- Adds a standalone Phase 8 rule stating that protected-path holds take precedence over pre-diff blanket merge grants.
- Adds a matching Edge cases entry directing the loop to leave the PR open and identify the protected path.
- Leaves placeholders, Steps, phase numbering, and installation paths unchanged.
| File | Description |
|---|---|
create-dev-loop.md |
Adds protected-path authorization precedence guidance to Phase 8 and Edge cases. |
Review effort: Balanced
| {{DO_NOT_AUTO_MERGE}} | ||
| {{/if}} | ||
|
|
||
| **A path match outranks any merge authorization granted before the diff existed.** A run-level pre-authorization (a dispatch-time flag such as `--allow-merge`, a merge allow-list, a standing "you may merge" instruction) is a property of the *run*; a protected-path match is a property of the *change*, evaluated after any grant. The grant can widen how much merges without review, but it cannot clear a path match, because nobody granting it could see which protected path the diff would touch. When the two disagree, the path match wins: leave the PR open, post a comment naming the matched path and why it is protected, and hand the decision back. Only an authorization given with sight of the matched path clears the hold (the codeowner exception below). |
| **{{EXTERNAL_SIGNAL_LABEL}} has never been green on `{{DEFAULT_BRANCH}}` (structurally red — e.g. a required job fails on absent credentials or an unset secret):** this is not the same as red-on-this-branch, and no change the loop can write will satisfy the gate. Record it at triage (Phase 1), assess per-job signal in Phase 4 so a job carrying no signal for the diff is neither counted as blocking nor mistaken for verification, and hand off in Phase 8 naming the blocking condition and the issue tracking it rather than reporting an ordinary "awaiting review". | ||
| **An issue requires a harness-blocked operation (editing `CLAUDE.md`/agent-loaded config, registering an external submodule):** recognize it at triage (Phase 1) — surface to the user for explicit authorization rather than attempting it mid-cycle; never remove a path while `CLAUDE.md` still references it. | ||
| **Autonomous multi-cycle batch (`/<loop> until …`):** skip/cap the Phase-5 human-review wait (rubric + green anchor is the gate); still hand off do-not-auto-merge/charter PRs. Stop when only blocked, charter-gated, or too-large work remains, or a cycle yields no scoped work. | ||
| **A protected path matches while a blanket merge pre-authorization is in force:** the pre-authorization does not clear the hold — it was granted before the diff existed (Phase 8). Leave the PR open, name the matched path in a comment, and hand the decision back. |

Summary
--allow-merge, a merge allow-list, a standing "you may merge" instruction) is a property of the run, and the path match wins when they disagree. The PR is left open with a comment naming the matched path, and only an authorization given with sight of that path (the existing codeowner exception) clears the hold.No placeholder is added, no Step is added or removed, and no phase is renumbered, so the Step 4 table and README's "What it does" list are unchanged.
Closes #123
Closes #142
Research grounding
No
RESEARCH.mdfinding applies directly. The do-not-auto-merge list itself came from §2 (PR #30), but which authorization outranks it is a safety-precedence question, not an empirical one, and no finding inRESEARCH.mdaddresses it. For that reason no Implementations entry is added.Doc sync check
{{placeholder}}added or changed has a corresponding Step 4 substitution-table row (none added;check_docs.pypasses)Test plan
python3 scripts/check_docs.py: "Doc consistency check passed."python3 -m unittest discover -s tests: Ran 42 tests, OK/create-dev-loopvalidation run was performed. This PR came from a headless Gardener dispatch whose sandbox has no second repo to generate against, and Step 6 would create a GitHub repo, which is outside what the dispatch may do ([self-audit] The repo's own validation anchor is structurally unrunnable in a headless dispatch, so template changes can never merge autonomously #109). None of the five checklist items inCLAUDE.md's "Testing changes" were exercised. Per the loop's rules this PR is handed to a human rather than auto-merged. The change is two prose sentences and adds no placeholders or fences, so a reviewer can check it by reading it.Retrofit
Per
CLAUDE.md's "Promoting a rule into the template": the skills that reported this gap in #123 and #142 likely need a retrofit pass. They areasn1c-dev-loop,foodspoilage-dev-loop,repo-quality-dashboard-dev-loop,parpt-dev-loop,kreatures-dev-loop,barony-dev-loop,medieval-cookery-dev-loop,primordial-rise-shared-dev-loop,primordial-rise-backend-dev-loop, and thekfe-*-dev-loopskills split fromkfe-docs-dev-loop. More generally, every generated skill that predates this change and carries a do-not-auto-merge list needs it.gardener interface
Steps 3, 5, and 6 are not touched; this is not a breaking change for gardener. It does settle how a generated skill treats gardener's
--allow-mergegrant when a protected path matches: the grant does not clear the hold.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