Skip to content

refactor: drop the pre-rename operator control fallback - #23

Merged
loadinglucian merged 1 commit into
mainfrom
refactor/drop-operator-path-fallback
Aug 2, 2026
Merged

refactor: drop the pre-rename operator control fallback#23
loadinglucian merged 1 commit into
mainfrom
refactor/drop-operator-path-fallback

Conversation

@loadinglucian

@loadinglucian loadinglucian commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

php-bin main now carries only .github/autorelease-operator.json, so both fallback branches are unreachable. Removes the fallback the rename PR said to drop once php-bin landed.

Summary by CodeRabbit

  • Improvements
    • Streamlined automated release validation by using a single, standardized policy source.
    • Improved consistency when checking release readiness and policy compliance.
    • Removed reliance on legacy policy locations and fallback behavior.

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_eeada897-e652-4d5f-a5bf-77d06ba49e46)

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5fa3ee8e-559f-4b42-90ec-3c9858c019a3

📥 Commits

Reviewing files that changed from the base of the PR and between 91f8c49 and 71da60f.

📒 Files selected for processing (3)
  • .github/workflows/autorelease-consumer.yml
  • autorelease/consumer.py
  • test/test_autorelease.py

📝 Walkthrough

Walkthrough

The consumer now fetches only commit-pinned autorelease policy invariants. The workflow now reads only the renamed autorelease operator file. Tests remove legacy fallback coverage and validate the single policy URL.

Changes

Autorelease path enforcement

Layer / File(s) Summary
Policy URL and fetch contract
autorelease/consumer.py, test/test_autorelease.py
pinned_policy_urls returns one commit-pinned invariants URL. Policy fetching calls fetch_url directly. Tests validate the current URL and retain rejection of non-commit references.
Workflow operator-control loading
.github/workflows/autorelease-consumer.yml
The investigation checkout and merge-readiness step use only .github/autorelease-operator.json.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change but omits the required Verification and Security sections and their checklist items. Add the Verification and Security sections, and report test results and security confirmations for the listed checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes removal of the pre-rename operator control fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/drop-operator-path-fallback

Comment @coderabbitai help to get the list of available commands.

@loadinglucian
loadinglucian merged commit e796cc2 into main Aug 2, 2026
4 of 5 checks passed
@loadinglucian
loadinglucian deleted the refactor/drop-operator-path-fallback branch August 2, 2026 19:37
loadinglucian added a commit that referenced this pull request Aug 2, 2026
PR #23 removed the policy invariants path fallback on the understanding
that it was dead code. It was not, and the consumer workflow failed on
main straight after the merge:

```
autorelease consumer rejected input: policy capture path is not published:
https://raw.githubusercontent.com/bigpixelrocket/php-bin/2a9a100c701c3e1e769e8cab47e8c3af61e52d89/autorelease/policy-invariants.json
```

Policy captures do not read php-bin main. `POLICY_COMMIT_SELECTOR_URL`
selects the most recent commit that touched `support-policy.json`, and
the capture pins to that exact commit so the policy and its invariants
always come from one reviewed state. That commit is still `2a9a100c`
from 2026-07-27, which predates the maintenance to autorelease rename,
so the invariants it publishes are at
`maintenance/policy-invariants.json`. The rename never touched
`support-policy.json`, so the selector never moved forward.

This restores `fetch_first_url` and the two pinned invariants URLs.
Behavior is identical to the state before #23. The only substantive
change is the docstring, which now records the real condition for
removing the fallback: a commit that touches `support-policy.json`
landing after the rename, rather than php-bin main merging its rename,
which already happened.

The two operator control fallbacks that #23 also removed stay removed.
Both read at php-bin main's tip, so they were genuinely unreachable.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved retrieval of policy information when the primary location is
unavailable.
* Added fallback support for legacy policy locations, helping releases
continue when current paths return “not found” responses.
  * Preserved clear error handling for other retrieval failures.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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