test(herdr): fix Quick Start close test on Linux CI (util-linux script syntax) - #556
Merged
Conversation
BSD script (macOS) takes the command as positional args after the file; util-linux script (ubuntu CI) rejects positional commands and needs -c, so the onboarding process never launched on CI and the marker never appeared — a deterministic LINGERED on both Node jobs. Branch on platform: `script -qec "<cmd>" /dev/null` on Linux, the BSD form elsewhere. Also redirect the background job as a whole: the feeder subshell's inherited stderr held spawnSync's pipe open until its sleep ended, so even a passing run ate the full 30s timeout (now ~250ms), and the sleep shrinks from 40s to 12s — still well past the 8s poll window. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
main 從 #544 起 CI 一直紅在
Herdr Quick Start close › exits the process when the menu is closed:測試用 BSD 語法呼叫script,util-linux(ubuntu CI)不接受位置參數命令,onboarding 從未啟動、marker 永遠不出現,兩個 Node job 確定性失敗。本 PR 依平台分支script呼叫方式,並順手修掉測試在 macOS 上每次吃滿 30s timeout 的假延遲(→ ~250ms)。Root cause
script(macOS):script -q /dev/null <command...>— command as positional args.script(ubuntu CI): only accepts a command via-c; positional operands after the file are rejected, so the wrapper exited immediately. The inner command (and its>/dev/null 2>&1) swallowed the error, the marker was never written, and the poll printedLINGERED— deterministic on both Node 20 and 22, every push since the test landed on main.Changes
process.platform: Linux usesscript -qec "<cmd>" /dev/null, macOS keeps the BSD positional form.spawnSync's pipe open until itssleepended, so even a passing run ate the full 30s timeout. Sleep shrinks 40s → 12s (still well past the 8s poll window).Verification
actual: LINGERED(runs 31993589901, 32014062729, plus the PR Mark a Herdr badge whose numbers the transcript has outrun, and rescan to fix it #553 run 32010319418).test/herdr-plugin.test.js132/132 green locally with isolatedCCXRAY_HOME; the fixed test now completes in ~250ms instead of 30s.scriptavailable locally — this PR's own CI run is the differential evidence.Note: run 31994476657 (#545) also had a one-off
count_tokense2e failure ("proxy did not start") that does not reproduce in the other runs — flaky, not addressed here.🤖 Generated with Claude Code