Repository navigation
test(codebuddy): feed the abort fixture's stdout once - #7948
Conversation
read() pushed and scheduled another abort on every call, flooding the stream until the abort landed; the SIGTERM case took ~1.3s idle and timed out in loaded full-suite jobs. It now takes ~12ms.
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Limit repeated stream actions tests/providers/codebuddy-adapter.test.ts |
The test stream uses a flag to push the partial delta and schedule the abort once. The comment explains that repeated pushes flooded the stream and timer queue. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Suggested labels: chore
Merge Risk: 
Minimal · up to 3fe40
-
The fixture now limits output and abort scheduling to one cycle, with no production behavior changed.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "test(codebuddy): feed the abort fixture's stdout once" describes the main change: the fake child's stdout in the in-flight abort test now feeds data and schedules the abort only once, instead of on every read. It is concise, specific, and follows a clear conventional-commit style. It does not mention the timeout fix motivation, but that detail is not required for the title to convey the primary change.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
Summary
tests/providers/codebuddy-adapter.test.ts>an in-flight abort kills the child process gracefully with SIGTERMtimed out in two consecutive full-suitetest changedjobs on #7884 (7306ms and 5478ms; runs 40820340584 and 40824645979). #7884 changes the test-home guard, so itstest changedjob runs all ~51k tests in one process.The cause is in the fixture. The fake child's stdout
read()pushed the same line and scheduled anothercontroller.abort()timer on every call. Each push invites the nextread(), so the stream floods the event loop with data and timers until the abort lands. The case took about 1.3s even on an idle machine, and under a loaded single-job suite it ran past the 5s limit.This feeds the line and schedules the abort exactly once. The adapter, the kill-grace path and every assertion are unchanged: the child is killed with SIGTERM, an error event is emitted, and no
doneevent is emitted.Verification
Windows x64,
OCX_TEST_NO_QUEUE=1:bun test tests/providers/codebuddy-adapter.test.ts -t 'gracefully with SIGTERM': pass in 1338.36ms.bun run typecheck: exit 0.tests/ci-workflows/file-size-ratchet.test.ts: 9 pass / 0 fail.Checklist
Summary by CodeRabbit