fix(ci): one-click release — go green when prepared; auto-PR is best-effort - #978
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-978Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr978.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Reviewed the PR (verified the code against the description, checked CI) — found one critical gap in the first pass, which I fixed directly on the branch (commit Verified as described
Critical gap found (now fixed) Fix (commit
Path check: direct push → tail runs (happy path unchanged); fallback → best-effort PR runs, tail skipped, green run, nothing published; failed branch push → red, nothing after. If the output were ever missing for any reason, the workflow fails closed (no publish). YAML re-validated: 13 steps, gates wired. CI on the new head is running — I'll confirm in a follow-up. 中文摘要:发现并修复了一个关键缺陷——回退路径(直推被拒)下,原代码靠 |
CI confirmed on the fixed head ( Ready for you to merge — merging is human-only per repo rules: #978 中文摘要:修复提交( |
Part of #772
Problem
Run 35419218831 did everything right — version resolution, drift guard, bump, diff verify, full pre-flight gate, fallback branch push — and still ended as a red X because the final best-effort call (
POST /pulls) hit the known account-level restriction ("GitHub Actions is not permitted to create or approve pull requests."). A red failure for a run whose actual deliverable (a gated, ready-to-merge release branch) succeeded invites panic loops and duplicate manual work.Change (
.github/workflows/release-manual.ymlonly, + AGENTS.md §5 doc sync)Split the old monolithic "Commit and push to master" tail into two steps:
id: push, strict): commit → direct push attempt → on block, push the fallback release branch. A failed branch push still exits 1 (red = real breakage). On success it setsneeds_pr/pr_branchoutputs and exits 0. The "direct push blocked" line downgrades from::error::to::warning::— it is now an expected, handled path.continue-on-error: true, runs only whenneeds_pr): same API call as before, but the outcome no longer fails the job:/pull/new/<branch>link, mirrored as::warning::annotations.The job summary renders on the run page itself, so the state is unmissable without opening logs. Red is now reserved for guard trips, gate failures, or a failed branch push — i.e. states where the release is NOT prepared.
Why green is honest here
The workflow's deliverable is a pre-flight-gated release commit sitting on a merge-ready branch. Auto-PR is convenience automation on top of it; its failure loses nothing (the branch persists, nothing publishes until a human merges). Green + loud "NOTHING PUBLISHED YET" summary beats a red X that hides the fact that preparation succeeded.
Verified
steps.push.outputs.bash -nclean on both modified scripts (Actions expressions substituted with literals).needs_pr.If the account-level restriction is ever lifted, this same step auto-opens the PR and the run goes green with the PR URL — zero code changes needed.