Skip to content

[PR] fix(ci): leak guard probes must not die under set -e + pipefail — wrap the is-ancestor chain in if (#4695) - #4696

Open
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-25_leak-guard-set-e-fix
Open

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-25_leak-guard-set-e-fix

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zai/glm-5.3)

Fixes #4695

What & why

Lane leak guard 在 12:02 对 bugfix-v0.1.207 的干净 carry merge(#4684,fe2ae109)报红——本地复算确认范围内零真泄漏,红因是守卫自己的 shell 结构 bug:

set -euo pipefail
LEAKS="$(git log --merges ... | while read -r M; do
      [ -n "$P2" ] && git merge-base --is-ancestor "$P2" origin/master \
        && echo "$M ..."      # ← 干净 merge 使链条以 1 结束
    done)"                     # ← pipefail 传染,set -e 在赋值处杀脚本
  • 车道首个 merge 即触发(此前绿只是因为范围内无 merge);
  • 真泄漏也会被吞:泄漏行 echo 后,只要后面还处理一个干净 merge(按新→旧遍历,泄漏通常较新),脚本同样静默死,证据永远打不出来。

改动

单文件 .github/workflows/lane-leak-guard.yml:把探测 && 链包进 if [ -n "$P2" ] && git merge-base --is-ancestor ...; then echo ...; fi——if 假条件退出 0,不再向 pipefail 泄漏;泄漏仍由后面的 [ -n "$LEAKS" ] 大声失败。语义不变,只是不再误杀/吞证据。

验证

  • 本地最小复现(scratch repo:1 真泄漏 merge + 1 干净 merge):旧逻辑 exit=1 零输出(复现 CI 12:02 签名);新逻辑正确打印 LEAKS=[<sha> leaky merge] 并走失败分支;纯干净范围 exit 0。
  • python3 yaml.safe_load OK;step 脚本 bash -n OK。
  • workflow-only 改动,不触任何发布/守卫语义面。

@ranxianglei ranxianglei changed the title fix(ci): leak guard probes must not die under set -e + pipefail — wrap the is-ancestor chain in if (#4695) [PR] fix(ci): leak guard probes must not die under set -e + pipefail — wrap the is-ancestor chain in if (#4695) Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-25_leak-guard-set-e-fix (d882751)

Latest build — install this exact version

npm install -g billion-context@0.0.5728-pr.4696.11a4711

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
d882751 billion-context@0.0.5728-pr.4696.11a4711 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4696.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策

This PR is now obsolete — the file it fixes was deleted from master by an owner-directed takedown. This is not a mechanical merge conflict I can resolve; it needs your call.

Diagnosis (verified live this run):

  • The PR is a single commit d88275151e touching exactly one file: .github/workflows/lane-leak-guard.yml (wraps the && merge-base --is-ancestor chain in an if so the leak probe doesn't die under set -e + pipefail).
  • Since the PR's base (ac844facdd), master advanced 2954 commits. Among them, 848d75b0c1 (2026-10-25, owner-directed takedown) deleted lane-leak-guard.yml (along with backport.yml and release-bugfix.yml) so no PR/dispatch against the bugfix-lane/backport machinery can fire.
  • A trial rebase of the PR head onto current master (259cd87674) produces CONFLICT (modify/delete): the PR modifies a file that master deleted. I aborted the trial rebase and pushed nothing.

Options:

  • A (recommended): close the PR as obsolete. The file it fixes no longer exists on master, so the bug it targets is gone — there is nothing to merge. Re-adding the file would re-arm the exact machinery your 2026-10-25 takedown removed.
  • B: re-create lane-leak-guard.yml with the fix. This directly re-arms the bugfix-lane/backport workflow your takedown deliberately removed — I do not recommend it without your explicit go.
  • C: leave the PR open as-is for you to decide.

Default if undecided: A (close as obsolete) — re-adding the file contradicts the takedown, and with the file deleted the PR would be empty.

Label needs-decision applied. Awaiting your decision.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Outcome: escalated to a human decision — nothing was pushed. (Full diagnosis is in the 🔶 需要决策 comment above; this is the bot-prefixed summary the lane requires.)

Done this run:

  • Fetched PR head d88275151e (branch 2026-10-25_leak-guard-set-e-fix) and current master 259cd87674.
  • Confirmed the PR is a single commit touching only .github/workflows/lane-leak-guard.yml.
  • Ran a trial rebase onto master → CONFLICT (modify/delete), then aborted it. No push.

Verified (live):

  • Master commit 848d75b0c1 (2026-10-25 owner-directed takedown) deleted lane-leak-guard.yml — so the file the PR fixes no longer exists. The PR is obsolete.
  • Thread re-checked: no owner decision posted yet (only system dispatch / stuck / restart markers after my decision comment).

Label: needs-decision applied.

Decision needed (detail in the 🔶 需要决策 comment):

  • A (recommended): close as obsolete — the fix target is gone; re-adding it re-arms the takedown.
  • B: re-create the file — re-arms the removed machinery; not recommended without your go.
  • C: leave open.
  • Default if undecided: A.

Risk: none from my side — the branch is untouched, nothing pushed. The PR simply sits open until you decide.

Note: my earlier re-dispatch attempts hung on a network operation; per the lane's anti-loop rule I stopped re-checking and am reporting with the evidence already gathered. Awaiting your decision.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

State unchanged — still awaiting your decision (options in the 🔶 需要决策 comment: A close-as-obsolete [recommended] / B re-create the file / C leave open; default A). Nothing has been pushed; the branch is untouched.

New, verified live this run via the mirror cache — the PR now shows 6 red test shards:

  • test (windows-latest, 22, 1/2/3/4)
  • test (ubuntu-latest, 24, 3)
  • test (ubuntu-latest, 22, 3)

(All gates / static-gates / lock-sync / version-guard are green; the e2e lanes are skipped.)

Why this doesn't change my recommendation: the PR is a single commit touching only .github/workflows/lane-leak-guard.yml — a workflow file, not source. The failing shards are the main test suite, which that one-line workflow change cannot affect. They're red because the branch is 2954 commits behind master and fixes a file master's takedown (848d75b0c1) deleted. The only path to "fixing" the red CI is rebasing onto master — which is exactly the modify/delete conflict I escalated, i.e. your A-vs-B call. I can't resolve it mechanically without either re-creating the takedown's file (B) or emptying the PR (A).

So: awaiting your A/B/C decision (default A — close as obsolete). No further action is possible on my side until you decide.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Post-restart check — state is unchanged (my last status is the floor above; no owner decision has been posted since).

I'm blocked on that decision. No further mechanical action is possible on my side: I can't resolve the conflict without either re-creating the takedown's file (B) or emptying the PR (A). Nothing has been pushed; the branch is untouched, and I will not re-loop on checks. A one-word "A" unblocks this and lets the lane stop re-dispatching.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Re-dispatch to fix the 6 red test shards. Re-verified live via the mirror cache: all 6 are still red (windows 22 × 1–4, ubuntu 24/22 × 3; no pending). My previous run hung on a check-log fetch and was force-restarted, so I'm avoiding that op this run — I have the root cause from git instead.

Why these shards can't be fixed mechanically on this PR:

  • The 6 failing shards are the main test suite. The PR's only change is to .github/workflows/lane-leak-guard.yml — a workflow file, not source — so it cannot be what's failing the tests.
  • They're red because the branch is 2954 commits behind master and fixes a file master's takedown (848d75b0c1) deleted. The only way to clear them is to bring the branch to current master, which is exactly the modify/delete conflict I escalated.
  • Resolving that conflict is your A-vs-B call, not a mechanical step: keep the file = B (re-arms the takedown, not recommended); drop it = the PR becomes empty = A (close as obsolete). I won't re-create the takedown's file or rebase into the conflict without your approval.

So the red CI and the merge conflict share one root cause — the PR is obsolete — and one unblock: your A/B/C decision (default A: close as obsolete). Closing the PR clears both. Nothing has been pushed; the branch is untouched.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

1 similar comment
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Conflict re-dispatch — state unchanged, and the system itself has now flagged this as stalled.

  • The floors above show the auto-fix lane reached its limit (2 rounds without green / 24h window) and the auto-fix is stalled, stopped for human review — which matches my diagnosis: this is not a mechanical fix.
  • PR [PR] fix(ci): leak guard probes must not die under set -e + pipefail — wrap the is-ancestor chain in if (#4695) #4696 is still obsolete: it fixes .github/workflows/lane-leak-guard.yml, which master's takedown 848d75b0c1 deleted → rebase is a modify/delete conflict; the 6 red test shards are the stale-branch consequence of the same root cause.
  • Awaiting your A/B/C decision — A close-as-obsolete (recommended, default) / B re-create the file / C leave open. Nothing has been pushed; the branch is untouched.

I'm not re-attempting the fix (the lane has stopped) and not re-looping on checks. A one-word "A" closes it and clears both the conflict and the red CI.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

2 similar comments
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Re-dispatch (attempt 1/6) — no state change: no owner decision posted; PR still obsolete (fixes the file master's takedown 848d75b0c1 deleted); rebase still a modify/delete conflict; 6 test shards still red.

The auto-fix lane keeps re-triggering as its 24h window expires, but every cycle re-confirms this same unchanged state — it's already logged "lane reached limit / auto-fix stalled, stopping for human review" several times above. It won't resolve on its own.

Only unblock: your A/B/C decision (A close-as-obsolete [recommended, default] / B re-create / C leave open). I've escalated (🔶 需要决策) and won't re-attempt or re-loop. A one-word "A" closes it and clears both the conflict and the red CI.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Still unchanged (7th re-trigger — the lane's 24h window keeps expiring): no owner decision posted; PR still obsolete (fixes the file master's takedown 848d75b0c1 deleted); rebase still a modify/delete conflict; 6 test shards still red.

Full options are in the 🔶 需要决策 comment (Floor 4): A close-as-obsolete (recommended, default) / B re-create / C leave open. I won't keep re-posting confirmations — the only unblock is your A/B/C call. Nothing pushed.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Still unchanged — no owner decision; PR obsolete (fixes the file master's takedown 848d75b0c1 deleted); rebase still a modify/delete conflict; 6 shards still red. The lane keeps re-triggering on this unresolvable blocker (cadence has accelerated to a few minutes per cycle); only your A/B/C call (default A: close as obsolete) or a new head sha clears it. I'll keep confirming in one line per dispatch until then. Nothing pushed.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Still unchanged (9th re-dispatch): no owner decision; PR obsolete (fixes the file master's takedown 848d75b0c1 deleted); rebase still a modify/delete conflict; 6 shards still red. Awaiting your A/B/C — see 🔶 需要决策 (Floor 4). Nothing pushed.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Still unchanged (10th re-dispatch): no owner decision; PR obsolete (fixes the file master's takedown 848d75b0c1 deleted); rebase still a modify/delete conflict; 6 shards still red. Awaiting your A/B/C — see 🔶 需要决策 (Floor 4). Nothing pushed.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Still unchanged (11th re-dispatch): no owner decision; PR obsolete (fixes the file master's takedown 848d75b0c1 deleted); rebase still a modify/delete conflict; 6 shards still red. Awaiting your A/B/C — see 🔶 需要决策 (Floor 4). Nothing pushed.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (windows-latest, 22, 1), test (windows-latest, 22, 4), test (windows-latest, 22, 2), test (windows-latest, 22, 3), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 3) — stopping for human review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lane leak guard workflow red-flags every clean lane merge: set -e + pipefail turns the is-ancestor probe exit code into a silent job failure

1 participant