test: repair lifecycle and descriptor cleanup contracts - #9293
Closed
austinywang wants to merge 2 commits into
Closed
austinywang wants to merge 2 commits into
austinywang wants to merge 2 commits into
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
📝 WalkthroughWalkthroughThe PR updates two lifecycle test suites. It verifies command descriptor cleanup after execution and agent lifecycle-state cleanup and restoration during status mutations. ChangesCommand descriptor lifecycle
Agent notification lifecycle
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ 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 |
This was referenced Jul 31, 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
.runningbefore asserting lifecycle transfer.Processtermination handler is cleared whenrun()returns.mainrepair.No production code changes.
Why
Current
mainhas two independent full-CI failures that are unrelated to the feature branches being tested:AgentNotificationMutationBoundaryTests.swift: the fixture re-added only the visible status after a status clear, then incorrectly expected the intentionally-cleared lifecycle to transfer.CommandRunnerDescriptorLifecycleTests.swift: a weakFoundation.Processassertion depended on asynchronousNSConcreteTaskdeallocation timing instead of the file-descriptor cleanup contract.These failures blocked full CI for #9266 after its own focused red/green proof passed.
Evidence
main+ the unrelated workflow-guard repair, without Fix Dock agent resume across owner rotations #9266, failed the lifecycle assertion: https://github.com/manaflow-ai/cmux/actions/runs/30614187843main+ Fix Dock agent resume across owner rotations #9266 + the workflow-guard repair failed both stale assertions: https://github.com/manaflow-ai/cmux/actions/runs/30614778238CommandExecution.completeIfReady()closes the cancellation/stdout/stderr descriptors, clearsprocess.terminationHandler, and only then resumes the continuation; the repaired test asserts that deterministic post-await run()contract.Validation
git diff --check origin/main...HEAD./scripts/lint-pbxproj-test-wiring.sh— passed (642 files)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Repair failing CI tests by fixing agent lifecycle transfer expectations and making command runner cleanup assertions deterministic. No production code changes.
.runningand asserts lifecycle state before verifying transfer.Process; now asserts capture FDs are closed andprocess.terminationHandleris nil afterawait run()returns.Written for commit 75b29be. Summary will update on new commits.
Summary by CodeRabbit