Repository navigation
[PR] test(launcher): tolerate the documented one-observation loss in the #5955 takeover ledger - #5990
Conversation
68b02c9 to
6fd2e15
Compare
CI red on the first push — fixed in 6fd2e15All 11 failing shards ( Two changes, both inside the test-side surface of this PR:
Local status on 6fd2e15: 18/18 pass (3 consecutive full runs, plus runs under CPU load), Diff is still tests-only plus the one-word |
6fd2e15 to
9697b89
Compare
|
Rebased onto master
Diff is now 2 files, +15/−1 ( |
9697b89 to
36f3208
Compare
|
Analysis of the single red check on Failing case — job 128943672018: 21712 ms against Why this cannot come from this diff. The PR touches exactly two files:
Neither reaches Local run of the same file on win32 (node 24.15.0, this machine): Prior art for this flake — the budget has been raised for this exact cell three times already: Action taken — I cannot rerun the failed job myself ( If it flakes again on the same cell, the honest fix is a separate one-liner in |
…xianglei#1248 tripwire; inherited from ranxianglei#5989, mirrors open PR ranxianglei#5990)
|
CI is green on Merge state, for whoever goes to merge it: Nothing else is pending from me on this one: diff is |
…n LIVE_FILES Converged master-red fix (sentinel ci-fixes lane): #5989 merged the spawning suite without registering it, so the #1248 SPAWN_RE tripwire kills all 11 core-matrix test shards before any test runs on every PR head. Hunk is byte-identical to open PR #5990 (which carries the same registration plus a test-tolerance change to master).
…master red) Inherited failure, not caused by this PR's diff: ranxianglei#5989 (016d933, merged as 48f9e69) landed tests/issue5955-wedged-same-lane-takeover.test.ts without registering it in scripts/live-files.mjs, so the SPAWN_RE tripwire (scripts/run-ci-tests.mjs, ranxianglei#1248) aborts every test shard on any PR head at pretest, before a single test runs. Confirmed against the failing job logs of this PR's run 42551827921 (all 11+ shards, one error line each). Per the few-line CI-fix discipline this lands as its own labeled commit here. The hunk is byte-identical to in-flight PR ranxianglei#5990 (same append-only zone), so it dedupes cleanly on the next rebase once ranxianglei#5990 merges into master. Local verification: replicated the tripwire scan on this head -> 62 live files, zero unregistered spawning suites.
…cumented one-observation loss Byte-identical mirror of in-flight PR ranxianglei#5990, inlined onto this PR branch per ranxianglei#4599 coordination for the inherited red: master commit 48f9e69 (ranxianglei#5989) added tests/issue5955-wedged-same-lane-takeover.test.ts without registering it in scripts/live-files.mjs, so the SPAWN_RE tripwire (ranxianglei#1248) in scripts/run-ci-tests.mjs killed all 11 test shards at pretest before any test ran. The second hunk tolerates the wedged-ledger's documented worst-case one-observation read-modify-write loss instead of turning an fs-timing hiccup into a CI flake. When ranxianglei#5990 merges to master these hunks dedup cleanly (byte-identical changes merge without conflict). Verified locally: tripwire scan clean (1147 test files / 62 live entries, zero unregistered spawning files); issue5955 suite 18/18 pass.
…ladder The field-tuned timings in 2826c51 shipped without tests: the escalation budget (1s POST + 2s post-shutdown wait + 1s SIGTERM drain + 2s post-kill wait + 2s settle) and the win32 ESRCH silence are unguarded, so the next re-tune can silently bring back a ~12s stall or emit a false "listener may survive the cleanup" alarm on every takeover. tests/issue5955-wedged-same-lane-takeover.test.ts (18 cases): - candidate matrix: same lane + canonical port + BUSY + fingerprint mismatch is the ONLY cell that may be taken over - ledger boundaries: window, min observations, 300s stale gap, persistence across client restarts, fresh window after pid reuse (birth stamp key) - escalation order shutdown -> SIGTERM -> hard kill, and the short BUSY budget instead of the 3s graceful default (staging bounded to ~6s) - kill failure falls through to the normal spawn ladder, entry kept - port:0 lazy sticky-lane resolution; graceful path never signals/kills - negatives: healthy older/newer/same-build BUSY holders, user zone, foreign lane, other port and explicit attach targets are left alone - win32: a pid already reaped by taskkill stays silent, real failures still surface (ranxianglei#4125 vs ranxianglei#5955 field noise) Exports hardKillProxyTree so the win32 silence assertion can call it.
36f3208 to
b9bf6b2
Compare
|
(ai: deepseek/deepseek-flash) Rebased onto current master ( What changed and why:
Verification on This is a post-merge supplement to #5989 per AGENTS.md ("post-merge supplements → a small follow-up PR whose body references the original PR number"). |
…ontract actually lives
The quoted sentence ('the worst case loses one observation ... which is
safe') documents the persisted wedged-takeover ledger — the comment block
above wedgedLedgerFilePath in src/launcher.ts. readWedgedLedger's own
docstring only covers load/corrupt-file behavior, so the old attribution
sent readers to a function that never says this. Comment-only; no
behavior change.
(ai: vllm-qwen/qwen3.8-27b) Duplicate screening: not a duplicate — this is the sole remaining piece of the #5955 test coverage. The behaviour change (#5972) and the 18-case suite (#5989) are already merged; the Labels applied: Verified independently against the pushed heads (not taken from the description alone):
One small fix I landed directly on the branch (review finding, fixed rather than reported, per policy): the new comment attributed the contract to Merge state: mergeable, state 结构化八问:
结论:可合并——等 owner(按规则 agent 不合并 PR)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1152-master.049178e # this exact build
npm install -g billion-context@master # always the newest merged build
|
Post-merge supplement to #5989, which landed the #5955 wedged same-lane takeover ladder tests.
Scope narrowed after rebase onto current master (
5c3c2688). TheLIVE_FILESregistration this PR originally carried is already on master asb3aed0b9(merge ci-fixes: register issue5955 test in LIVE_FILES), so that half is dropped here and what remains is one 9-line change in one test file: 1 commit, 1 file, +8/−1.Why
tests/issue5955-wedged-same-lane-takeover.test.ts:432asserts the patience ledger accumulated exactly5observations across two failed escalation cycles.readWedgedLedgerdocuments that a torn/transient read ofwedged-takeover.jsoncan drop one observation for that cycle — the window then simply needs one more cycle, which is the safe direction — so=== 5is stricter than the contract the implementation is allowed to satisfy, and it flakes (observed ~1 run in 20 locally, on atomic-write contention with the scanner).Change
< 4still fails: that would mean observations are not carried across failed escalations at all and the patience window is being reset.Verification (on this head)
npx tsc --noEmit→ exit 0node --import tsx --test tests/issue5955-wedged-same-lane-takeover.test.ts→ 18/18 pass (~2.7s), stable across repeatsnode scripts/check-unused-exports.mjs→ clean (8 waived);node scripts/check-test-import-graph.mjs→ oksrc/change; behavior of the takeover path is untouched.