refactor!: rename the guarded maintenance system to autorelease - #21
Conversation
Rename every "guarded maintenance" identifier to "autorelease" across directories, workflows, scripts, schemas, controls, and prose, and move the system documentation out of README.md into a dedicated AUTORELEASE.md. The consumer reads php-bin's operator control by path, both from a sparse checkout and over the API. php-bin main still carries the pre-rename filename until its own autorelease PR merges, so both read sites try the new path and fall back to the old one. Remove that fallback once php-bin main has landed. BREAKING CHANGE: the MAINTENANCE_OWNER repository variable must be recreated as AUTORELEASE_OWNER, and the maintenance label renamed to autorelease, in the same window as this merge. The workflow filename changes from maintenance-consumer.yml to autorelease-consumer.yml, so any saved dispatch link must be updated.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR migrates the PHP policy consumer from maintenance to autorelease terminology, paths, artifacts, workflows, controls, schemas, documentation, and tests. Existing admission, validation, digest, and readiness gates remain in place. ChangesAutorelease migration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PolicySnapshot
participant AutoreleaseWorkflow
participant CodexAgent
participant Admission
participant Validation
PolicySnapshot->>AutoreleaseWorkflow: provide captured policy data
AutoreleaseWorkflow->>CodexAgent: submit autorelease phase contract
CodexAgent-->>AutoreleaseWorkflow: return plan or patch
AutoreleaseWorkflow->>Admission: validate plan and sealed artifact
Admission-->>AutoreleaseWorkflow: return admission result
AutoreleaseWorkflow->>Validation: verify digest-matched patch
Validation-->>AutoreleaseWorkflow: return checks and readiness data
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
.github/workflows/protected-controls.yml (1)
52-52: 🩺 Stability & Availability | 🔵 TrivialVerify the repository variable migration before merge.
PROTECTED_REVIEWERnow comes only fromvars.AUTORELEASE_OWNER. If the variable is missing,revieweris empty and no review can satisfyapproved. If it names a different login from the intendedCODEOWNERSowner, that owner’s approval does not satisfy this gate. RecreateAUTORELEASE_OWNERwith the exact login and verify it before relying on this workflow.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/protected-controls.yml at line 52, Verify the repository variable used by PROTECTED_REVIEWER in the workflow is configured as AUTORELEASE_OWNER, exists, and contains the exact intended CODEOWNERS owner login; recreate or correct the variable before merging and confirm the approved gate resolves to that reviewer.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/autorelease-consumer.yml:
- Line 221: Update the affected run steps in the workflow, including the
commands around base_sha, PR metadata, and action_key, to pass each needs.* or
steps.* value through the step’s env map and reference the corresponding shell
variable with $VAR inside the script. Apply this consistently at all flagged
sites while preserving the existing command behavior and validation.
- Around line 466-472: Update the gh pr create invocation in the autorelease PR
creation flow to construct the --body value with actual newline characters
rather than literal \n sequences. Preserve the existing validated commit text
and blank line between the two sentences.
In `@AUTORELEASE.md`:
- Around line 7-10: Update the scheduled `php-bin policy consumer` description
in AUTORELEASE.md to state that `autorelease/consumer.py` compares all
policy-change fields from `support-snapshot.json`: the policy digest,
incomplete-event state, policyInvariantsDigest, phpBinPolicyCommit, and
maintainedBranches. Preserve the existing clarification that it does not fetch
or classify upstream PHP lifecycle data.
In `@autorelease/consumer.py`:
- Line 115: Update the policy-invariant fetch flow around pinned_policy_urls,
fetch_policy_set, and fetch_url to try autorelease/policy-invariants.json first,
then retry maintenance/policy-invariants.json only on a not-found response.
Preserve the successful response bytes and record the URL that supplied them,
and add coverage for both primary and fallback paths.
In `@test/test_autorelease.py`:
- Line 66: Update the protected-path assertion in the relevant autorelease test
to use .github/workflows/autorelease-consumer.yml instead of the old
autorelease.yml path, ensuring it validates the renamed consumer workflow.
---
Nitpick comments:
In @.github/workflows/protected-controls.yml:
- Line 52: Verify the repository variable used by PROTECTED_REVIEWER in the
workflow is configured as AUTORELEASE_OWNER, exists, and contains the exact
intended CODEOWNERS owner login; recreate or correct the variable before merging
and confirm the approved gate resolves to that reviewer.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2fb305ce-b89b-4a10-a06e-a5714e7b23f2
📒 Files selected for processing (23)
.github/CODEOWNERS.github/codex/autorelease/implementation.md.github/codex/autorelease/investigation.md.github/codex/autorelease/repair.md.github/codex/autorelease/shared.md.github/workflows/autorelease-consumer.yml.github/workflows/protected-controls.yml.gitignoreAUTORELEASE.mdREADME.mdautorelease-events/.gitkeepautorelease/__init__.pyautorelease/admission.pyautorelease/consumer.pyautorelease/protected-paths.jsondocs/admin-state/mise-php-after.jsondocs/repository-settings.mdschemas/autorelease-plan.schema.jsonscripts/admit-autorelease-planscripts/consume-php-policyscripts/seal-autorelease-patchscripts/verify-merge-admissiontest/test_autorelease.py
pinned_policy_urls returned only autorelease/policy-invariants.json, but php-bin main keeps maintenance/policy-invariants.json until its own autorelease change merges. Because this repository must merge first, every policy capture in that window would have failed before compare or the operator pause could run. fetch_first_url tries the current path and falls through to the older one only on a 404, so a transport failure still raises instead of silently reaching for the older document. The capture record already reports which URL supplied the bytes. Remove the fallback once php-bin main has landed. AUTORELEASE.md said the consumer compares only the policy digest and incomplete-event state; it also compares the invariants digest, the php-bin policy commit, and the maintained branches.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1a9ab65. Configure here.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/test_autorelease.py`:
- Around line 108-109: Update the assertRaises call around
pinned_policy_urls("main") to expect ConsumerError instead of the broad
Exception type, preserving the test’s verification of the intended rejection
contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 736c6e12-b1cc-48e6-85a0-f6f2a10cf9c5
📒 Files selected for processing (3)
AUTORELEASE.mdautorelease/consumer.pytest/test_autorelease.py
Review round 1 summaryEvery finding was checked against the code before deciding. Pushed as 1a9ab65. Fixed
Answered, no change neededThe Declined, with reasonsTemplate injection in Literal Verification
This PR still needs to merge before php-bin's. |
The action key comes out of a model-authored plan. Admission already rejects a
malformed one, but the value crossed into $GITHUB_OUTPUT and four run scripts
as a raw ${{ }} expansion, which GitHub substitutes into script text ahead of
the shell. Its alphabet is now asserted at that boundary and every later use
reads it from an env map.
The base SHA and PR number interpolations move to the same env pattern so the
workflow has one idiom for values entering a script.
The merge-admission step probed for .github/autorelease-operator.json and fell back to the pre-rename filename on any non-zero exit, so a transient API error selected the legacy path. One directory listing now decides it, and anything other than a definite answer fails the step. Also tightens the pinned_policy_urls rejection test to ConsumerError, matching the idiom the rest of the file already uses.
|
@coderabbitai review Not chasing you, the automatic pass got dropped. The commit status on this head reads "Review rate limited" and has not moved since the push landed, so the latest commits have not been looked at yet. Requesting one now that the window should have cleared. |
|
✅ Action performedReview finished.
|

Renames the "guarded maintenance" system to autorelease across every
directory, workflow, script, schema, control, and prose reference, and moves the
system documentation out of
README.mdinto a dedicatedAUTORELEASE.md.No behaviour changes. Every rename is a
git mv, so history follows the files.Companion to
Bigpixelrocket/php-binPR on the same branch name.Merge this one first
This repository reads php-bin's operator control by path, from two places:
.github/autorelease-operator.jsongh apiread of the same path from php-binmainphp-bin
mainstill carries the pre-rename filename until its own PR lands, soboth read sites now try the new path and fall back to the old one. That makes
this PR safe to merge first, and php-bin's safe to merge straight after.
Once php-bin
mainhas landed, a small follow-up removes the fallback. Bothcall sites carry a comment saying so.
The
gh apisite decides between the two names with one directory listingrather than a probe. A probe's non-zero exit cannot separate "the file is
absent" from "the API call failed", so a transient error would have selected
the legacy path and broken merge admission for an unrelated reason.
One behaviour change, deliberate
Review surfaced a template-injection weakness that predates this branch, and it
is fixed here rather than deferred.
action_keycomes out of the model-authored implementation plan, and it wasbeing written into
$GITHUB_OUTPUTand then expanded into fourrun:scriptsas a raw
${{ }}expression. GitHub substitutes those into script text beforethe shell parses it, so shell quoting cannot contain a hostile value, and a
newline alone would let it set arbitrary step outputs.
admit-autorelease-planalready rejects a malformed action key, so this was not reachable in practice,
but the workflow no longer depends on that single upstream check: its alphabet
is asserted where it leaves the JSON, and every later use reads it from an
env:map.The base SHA and PR number interpolations move to the same
env:pattern sothe file has one idiom for values entering a script.
Verification
./scripts/test.sh— passesverify-autorelease-system— 21/21 checks pass at these exact commitsmarkdownlint— cleanGitHub-side migration
The
MAINTENANCE_OWNERrepository variable must be recreated asAUTORELEASE_OWNER, and themaintenancelabel renamed toautorelease(renamed via the API, not recreated, so existing issues keep it).
The full ordered runbook is in the php-bin PR description.
Summary by CodeRabbit
New Features
php-binsupport-policy updates.Documentation
Bug Fixes