Repository navigation
[PR] feat(ci): label-driven backport carry PRs onto patch lanes (bugfix-v<latest tag>) - #4503
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5426-pr.4503.b17db65This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4503.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
(ai: zai/glm-5.3) 红道来源说明(与本草稿无关):本 PR 只改 |
(ai: vllm-qwen/qwen3.8-27b) 状态复核(~09:05Z),与上条结论无变化:
|
- The workflow_dispatch repair path was dead: github.event.pull_request.* is EMPTY under dispatch, so the fork gate misfired (false FORK comment) and the lane-base guard was bypassed. All PR facts are now read live from the API in the gate step; the dead event-context env vars are gone. - Label-after-merge was a silent no-op for merge-commit merges: the head is reachable from master, so merge-base..head is empty. Fall back to the merge shape itself (M^1..M^2 --no-merges, the pre-lane bot's proven range) when the PR is merged and its merge commit has two parents. - Fetch falls back to refs/pull/N/head when the exact-sha fetch fails (closed PR / deleted branch), with a FETCH_HEAD == API-sha equality check. - Refuse to guess a range when no common ancestor exists (empty merge-base would otherwise carry the ENTIRE history). - pick.txt moves to $RUNNER_TEMP, same discipline as pr.json.
The open-PR audit lists EVERY open PR targeting the lane (carries AND manual fix PRs), but rendered them as 'carry PR ... left open'. Wording now says what the mechanism actually flags.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.795-master.41481b6 # this exact build
npm install -g billion-context@master # always the newest merged build
|
|
(ai: zai/glm-5.3) backport carry: every pick conflicted — nothing clean to push yet. Conflicting picks (resolve manually on a fresh branch off git checkout -b <fix-branch> origin/bugfix-v0.1.206
git cherry-pick -x 4435714e 653a0c48 8956fb1c # resolve the <<<<<<< markers, then continue
git push origin HEAD:<fix-branch> # open a PR against bugfix-v0.1.206, label it backport-carry |
(ai: zai/glm-5.3)
Fixes #4500
这是啥问题?
补丁火车只认已合并进 master 的 PR(临时急修想先上车必须等 master);cherry-pick 冲突时机器人只贴一条手动命令评论就放弃——没有分支承载冲突内容,没人看评论 = 修复静默丢失;车名每版一换、靠分支名排序推导。
owner 定案的模型:在 OPEN 的 fix PR 上打
backport标签的瞬间,机器人开一个 carry PR——该 PR 自己的 commit cherry-pick 到当前补丁车道bugfix-v<最新 tag>(不存在则当场从 tag 切),回执贴回源 PR。源 PR 合并与否独立(临时急修可永不上 master)。发布后版本号前进 → 下次打标自动切新车道,零存储状态。改动(8 files)
.github/workflows/backport.ymlpull_request[labeled](backport) + workflow_dispatch 修复路;目标车道纯 refs 推导(bugfix-v<git tag 最新 v*>,缺则从 tag 切并 push);pick range = merge-base(origin/master, head)..head --no-merges(synced-master 内容永不泄漏);逐 commitcherry-pick -x,冲突→abort+记录+继续,结果全量写进 carry PR 正文表格(逐条重放命令)+源 PR 回执(HTML marker pin,重复打标 no-op、源动了再打标自动重建强推).github/workflows/lane-leak-guard.yml(新)::error(防 master merge 进车道;合法 carry 合并不误报).github/workflows/release-manual.yml.github/workflows/ci.ymlbugfix-v*(carry PR 走 core 矩阵);version-guard allowlist +=bugfix-v*(lane ship PR 合法携带 bump).github/workflows/release-bugfix.ymlbugfix-v*头(legacybugfix-release/*保留兜底);closeout 措辞改为「tag 即闭环、下周期新 tag 自动切新车道」reference/release.mdAGENTS.md§5测试证据
yaml.safe_load通过;全部 run 块(69 个)bash -n通过;--not --tags在特定调用形态下把待扫 commit 全滤掉(git 行为坑)→ 改<base tag>..HEAD窗口;b) 源 PR json 落工作区会被 checkout clean 掉 →$RUNNER_TEMP。边界与自审
gh workflow run ci.yml --ref backport/carry-N(专用:发布新版本pr #772/one-click release fallback PRs are not immediately mergeable under current branch protection (#772 push-CI mechanism never fires) #1744 同型);合并后迁移(我在 issue 跟踪,API 执行)
bugfix-v0.1.206(v0.1.206 已含旧火车全部待发修复——patch-equivalent 已逐一核实,零重放);bugfix-release/v0.1.206-train;human-only merge(CI 编排类,§7.4 不适用 auto-merge)。