fix(test): preserve lane output after timeouts and stabilize the Cursor stream-health watchdog - #3940
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe test runner now captures child output incrementally, bounds post-exit pipe draining, preserves output on timeout, and fails incomplete captures. Cursor stream-health tests use scaled watchdog timing and first-text progress tracking. ChangesTest runner output capture
Cursor stream-health timing
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is established by the current changes. Sequence Diagram(s)sequenceDiagram
participant ChildProcess
participant runTestLane
participant captureTestOutput
participant OutputWriters
ChildProcess->>captureTestOutput: emit stdout and stderr
runTestLane->>captureTestOutput: finish with 1-second drain bound
captureTestOutput-->>runTestLane: captured output and completion status
runTestLane->>OutputWriters: write stdout and stderr
runTestLane-->>ChildProcess: return exit code and combined output
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
리뷰 · 우선순위 66 / 80이 PR은 기여자 @luvs01의 테스트 인프라 수정 두 층을 손대지 않고 쌓아 지금 레이어 2는 테스트는 라인 scripts/test.ts · 예전 early 라인 scripts/test.ts · 라인 cursor-stream-health.test.ts · 경로/심볼 · #3924 / #3930 - 원본 PR이 아직 open입니다. 이 스택이 경로/심볼 · CI - 이 wake 시점에는 resolve-pr / hygiene / label / Cross-platform CI changes / CodeRabbit이 아직 queued·pending이고, windows·macos-control·npm-global은 워크플로 스킵입니다. 머지 전에 이 HEAD의 초록만 보면 됩니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
8b81676 to
b52182c
Compare
Maintainer integration recordI, @lidge-jun, exercise maintainer integration under Cross-platform CI run 34152136978 passed on this head, constructed from base
Base advance, reviewed rather than re-runThe destination advanced to The combined destination-plus-PR tree has not been executed before this merge. The run above proves the tested head, not the eventual squash tree. Landing verification will prove that all four carried files equal the tested head and every other path equals the inspected destination. The post-merge push run on Attribution and local checksBoth branch commits are authored by Local suite, typecheck and build were NOT RUN by owner instruction for this delivery and are not claimed as passing. Head, destination SHA, reviews and permission were refreshed immediately before posting this record. |
Post-merge
|
Summary
Two test-infrastructure fixes by @luvs01, carried unmodified as a two-layer branch stack so one CI run verifies the cumulative tree.
Layer 1 — the runner loses the output that explains its own failure (#3924). When a captured test lane exceeded its timeout,
runTestLanereturned{ exitCode: 124, output: "" }before awaiting and forwarding the captured output, so a longtest:changedrun reported 124 with nothing to explain it. The lane now reads stdout and stderr continuously, prints and returns whatever arrived before the timeout, and gives the pipes a bounded one-second drain after the child exits so a descendant holding a pipe open cannot stall the runner. Capture that ends incomplete is reported and turns an otherwise successful child into a failure, so a truncated log can never read as a green run.Layer 2 — the Cursor stream-health fixtures were timing-fragile and under-tested (#3930). Two fixtures hit the 400 ms silence watchdog on one macOS lane while passing on another at the same head, and the positive fixture finished in about 900 ms against a 10-second heartbeat-only limit, so it could not detect a missing progress-clock refresh. Both now derive from one load-adjusted scale:
Sfor silence,2Sfor heartbeat-only, and at least3Sof observed progress measured from the client's first received text. Scaling once keeps the ordering intact when the shared helper applies its CI floor, and the progress fixture now asserts it actually completed that span rather than being cut short by its own safety limit.Layer 1 is the runner; layer 2 is a fixture that runs under it, which is why they land in that order. The two file sets are disjoint, so each layer's diff stands alone.
Carries #3924 and #3930 unmodified via
cherry-pick -x; both commits keep their original author and provenance line.Co-authored-by: luvs01 27862058+luvs01@users.noreply.github.com
Verification
Hosted CI on this exact head is the verification gate for this change. Local suite, typecheck and build were NOT RUN by maintainer instruction for this delivery, and are not claimed as passing.
Construction evidence, verified locally:
942c02873 → ab06523e6 → 8b81676ac; each layer's parent is the commit below it.luvs01 <27862058+luvs01@users.noreply.github.com>and carry their(cherry picked from commit ...)lines referencinge2416323and141077f7.devis exactly four files:docs-site/src/content/docs/contributing.md(+6/-0),scripts/test.ts(+81/-8),tests/ci-workflows/test-runner.test.ts(+147/-1),tests/providers/cursor/cursor-stream-health.test.ts(+59/-26).git diff --exit-codeagainst each source PR head returns 0 for that PR's files, so nothing was altered in transit.Contributor-side CI passed all 26 jobs on each source head: #3924 at
e2416323and #3930 at141077f7. Those results are evidence for the source heads; this cumulative head needs its own run, which is what this pull request is for.Note on the scope of that run:
windows <n>/6andmacos controlareworkflow_dispatch-only, andnpm-globalis gated on the packaging path filter, which none of these four files match. Those job families are skipped by the workflow rather than passing, and are not counted as evidence.Checklist
contributing.mddocuments the timeout and incomplete-capture behavior.Summary by CodeRabbit
Bug Fixes
Documentation