Repository navigation
feat: distinguish agents waiting on background work - #15666
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
30e6c3b to
d573d56
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (14)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe lifecycle model adds a background-work-pending phase for completed turns with work still active. Lifecycle aggregation, journal handling, and sidebar status now recognize the phase. Sidebar status ordering also uses lifecycle urgency. ChangesBackground Work Lifecycle
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue remains; the lifecycle change is ready for normal merge checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The reviewed paths keep agents with pending background work protected from hibernation while distinguishing them from agents in an active turn. No introduced security weakness was established. Compatibility across older versions and restoration after restart remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning, 1 inconclusive)
✅ Passed checks (22 passed)
Full details: Description checkExplanation The description includes a useful Summary, validation commands, and changelog information. It does not use the required Testing heading, and it omits the required Demo Video and Checklist sections. The validation also states that native compilation was not run. Resolution Add the required Testing section with tests added, tests executed, and remaining verification limits. Add a Demo Video or screenshots for this UI behavior change. Include the required Checklist and mark each item or explain why it does not apply. Keep the changelog in the required present-tense format. Full details: Docstring CoverageExplanation Docstring coverage is 30.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 12 files. (2 skipped: 2 too large.) Full details: Cmux Algorithmic ComplexityExplanation The PR adds a repeated full scan on a sidebar UI path. Resolution Precompute a
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 OpenGrep (1.30.0)CLI/cmux.swiftOpenGrep scan timed out 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 |
CI failure attributionCI passes on Written by |
|
Merge receipt for |
ea13489 Merge pull request manaflow-ai#15666 from teamleaderleo/fix/background-lifecycle 95158e0 test: keep needs input glyph case focused a7fa170 test: align sidebar urgency expectations ed676a6 fix: preserve background phase in stale turn correction c12b6f9 fix: prioritize active background glyph state 2a1a337 fix: order background lifecycle statuses consistently 39e203b fix: keep new turns in running phase d573d56 feat: distinguish agents waiting on background work
Summary
When an agent finishes a turn with an artifact watch, background shell, or session cron still active, cmux now reports a distinct
backgroundWorkPendinglifecycle phase. The phase remains hibernation-protected while the sidebar and projections can describe the agent as Waiting instead of implying an active turn.This is the implementation for #14918. It builds on the existing journal
pendingWorksignal and does not duplicate the hibernation process/transcript guards in #15278 or the activity classifier in #15276.Validation
python3 scripts/verify-local.py(syntax, source wiring, package groups, feature flags; native compilation intentionally omitted)git diff --checkChangelog
Changed
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
When an agent finishes a turn while an artifact watch, background shell, or session cron is still active, cmux now reports a distinct
backgroundWorkPendingphase instead ofrunning. The sidebar shows these agents as Waiting rather than implying an active turn, while hibernation protection is preserved. Implements #14918.backgroundWorkPendingto the reducer, replay policy, and hibernation lifecycle; it is not hibernatable and outranksneedsInputanderrorin combined-phase precedence.turnStartedkeeps the phaserunningeven while pending background work exists.backgroundWorkPendinglikerunning; Waiting sorts above Needs input and below Running, and active turns now sort ahead of newer Needs-input reports.backgroundWorkPendingwhen unsettled work remains, session restore preserves it, and transitions from it torunningcount aspromptSubmitted.Written for commit 95158e0. Summary will update on new commits.
Summary by CodeRabbit