Skip to content

State that a protected-path match outranks a pre-diff merge grant - #170

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/protected-path-precedence
Oct 31, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
fix/protected-path-precedence

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

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.md finding 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 in RESEARCH.md addresses it. For that reason no Implementations entry is added.

Doc sync check

  • Every {{placeholder}} added or changed has a corresponding Step 4 substitution-table row (none added; check_docs.py passes)

Test plan

  • python3 scripts/check_docs.py: "Doc consistency check passed."
  • python3 -m unittest discover -s tests: Ran 42 tests, OK
  • UNVERIFIED (behavioral): no /create-dev-loop validation 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 in CLAUDE.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 are asn1c-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 the kfe-*-dev-loop skills split from kfe-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-merge grant 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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (one intrinsic pass, anchored on the CI run on head and on check_docs.py output):

Judgment call flagged for the human reviewer:

  • CLAUDE.md says merge authorization "belongs in gardener, never here". This change was judged to be on the template side of that line. It governs how a generated skill interprets a grant it has been handed, not when or whether gardener issues one, and the existing "Standing merge authorization does not satisfy the anchor gate" paragraph (PR Harden Phase 8's rebase fence and state the merge-authorization precedence rule #119) already sets that precedent. A reviewer who reads the boundary differently may prefer the rule to live in gardener's dispatch preamble.
  • create-dev-loop.md:489 — "The grant can widen how much merges without review" could be tightened in review if the phrasing reads awkwardly.

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

@dmccoystephenson

Copy link
Copy Markdown
Member Author

Triage skip reasons for this cycle (Phase 1 auditability):

This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread create-dev-loop.md
{{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).
Comment thread create-dev-loop.md
**{{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.
@dmccoystephenson
dmccoystephenson merged commit ffd20e0 into main Oct 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants