[codex] Stabilize ccusage timeout cleanup test#501
Open
zergzorg wants to merge 1 commit into
Open
Conversation
Collaborator
|
@codex review |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the Unix-only ccusage_timeout_kills_descendant_and_closes_pipes test in src-tauri by reducing timing flakiness while keeping production timeout/kill behavior unchanged.
Changes:
- Add a small retry loop helper to wait for
descendant.pidto appear before parsing it. - Increase the fake runner timeout budget from 100ms to 1s, while still exercising the timeout path and verifying cleanup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced May 23, 2026
406776c to
beb1dd4
Compare
This was referenced May 24, 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.
Summary
ccusage_timeout_kills_descendant_and_closes_pipeswait for the descendant pid file with a short retry loopdescendant.pidbefore the timeout kill path runsWhy
The test was racing its own setup. On a slower or busy machine, the 100ms timeout can kill the fake shell runner before it reaches:
When that happens, the assertion fails with:
The test is meant to verify timeout cleanup of descendant processes and pipe draining, not whether a shell script can always initialize in under 100ms. The new version still exercises the timeout path, keeps the cleanup hang guard, and then verifies that the descendant is killed.
Validation
cargo test plugin_engine::host_api::tests::ccusage_timeout_kills_descendant_and_closes_pipes -- --nocapturecargo testSummary by cubic
Stabilizes the
ccusage_timeout_kills_descendant_and_closes_pipestest to remove timing flakiness on slower machines while keeping production timeout/kill behavior unchanged.descendant.pidwith a 20ms interval and 1s deadline before asserting.Written for commit beb1dd4. Summary will update on new commits. Review in cubic