Repository navigation
test(hermes): give quit-time Hermes loads their own complete process census - #14795
Conversation
…census ProcessDetectedResumeIndexes.loadOnWorker read the whole host's process table through the app's shared ProcessSnapshotService. That census fails closed (enumerationIsComplete = false) whenever any process on the machine exits between listing and reading it. On a busy CI mini that is routine, so the two Hermes lifecycle tests got RestorableAgentSessionIndex.unavailable and failed at HermesFirstClassSupportTests.swift:939 / :1022 on unrelated PRs. loadOnWorker and loadFreshOnWorker now take an optional processSnapshotService (nil keeps the app's shared census), and the tests inject a complete, empty census so they exercise Hermes revalidation instead of host process churn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
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 (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughProcess-index loaders now accept an optional process snapshot service and pass it to cached or fresh snapshot capture. Tests use a fixture-backed service with an empty process census. ChangesProcess Snapshot Injection
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The fixture-backed tests can use an empty process census without changing the app’s default census behavior. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
Full details: Description checkExplanation The description provides a strong problem statement and implementation summary, but it does not include the required Testing section with executed commands and results. The checklist is also missing, and the test plan remains unchecked. Resolution Add a Testing section that names the test command or CI lane, states what passed, and identifies anything not verified. Add the required Checklist section and mark each applicable item. Include a Demo Video section only if this change is considered user-facing behavior.
✨ 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 |
|
Merge receipt for |
b92d99c ci: seed far main pushes in their own lane, hold the seed root, prefetch between trusted seeds (manaflow-ai#14792) 6f3af0a docs(agents): catch-up is automatic; merge main by hand only when needed (manaflow-ai#14798) e0e635e test(hermes): give quit-time Hermes loads their own complete process census (manaflow-ai#14795) d09a5e4 ci: build main into an idle owned root's kept state; keep seeds down to 150 GiB free (manaflow-ai#14793) bf8b326 ci(e2e): UI runs adopt the app and UI test bundle PR CI compiled (manaflow-ai#14776) c07c13a Notify iroh of iOS network changes so dead direct paths drop immediately (manaflow-ai#14720) 46444ea Discard phantom (0-tab) windows on session restore to stop WindowServer wedge (manaflow-ai#14788) # Conflicts: # .github/workflows/ci-guards.yml # .github/workflows/seed-derived-data.yml # .github/workflows/test-e2e.yml
Summary
HermesFirstClassSupportTestshas been failing in "app-host unit tests (changed suites)" on unrelated PRs (#14783 twice, #14788):quitTimeSaveRevalidatesCachedHermesProcessatHermesFirstClassSupportTests.swift:939freshSynchronousLifecycleLoadDiscoversNewHermesSessionat:1022Both failures print
RestorableAgentSessionIndex(entriesByPanel: [:], ..., isComplete: false, ...), which is exactlyRestorableAgentSessionIndex.unavailable:ProcessDetectedResumeIndexes.loadOnWorkerreturns it when the process census is unavailable or incomplete.Root cause:
loadOnWorkerread the whole host's process table through the app's sharedProcessSnapshotService. That census fails closed by design (DarwinProcessEnumeratorandCmuxTopProcessSampler.enrichcount any PID that exits or is reused between listing and reading as missing, andenumerationIsCompletegoes false). On a busy CI mini with neighbouring compile jobs spawning and reaping processes, that is routine, so the Hermes assertions were really measuring host process churn.Change
ProcessDetectedResumeIndexes.loadOnWorker/loadFreshOnWorkertake an optionalprocessSnapshotService(nilkeeps today's shared app census; no production call site changes).CmuxTopProcessReadingthat enumerates nothing). The fixture PIDs are never live, so the tests still exercise the real revalidation / fresh-discovery logic, without reading the host process table.Other suites seen red today (different causes, not in this PR)
WorkspaceForkConversationContextMenuTests(Prevent deep process-tree stack overflow #14785, also main run 36197594615): the foursharedForkProbe*executable-watch tests. The loader is injected there; the likely gate is the file-descriptor headroom check inSharedLiveAgentIndex+ScheduledHibernation.swift(softRLIMIT_NOFILEminus open fds minus a 128 reserve), which depends on how many fds earlier suites left open in the shared test host.DeadKeyCompositionRegressionTests.testOptionDeadKeyUsesGhosttyTranslationInsteadOfStartingComposition(Keep unrelated file descriptors out of notification hooks #14789): Option-as-Alt side claim; config / keyboard state, unrelated to the process census.CloudTunnelLaunchGateTests: not in the failing logs inspected here.Test plan
HermesFirstClassSupportTestsgreen🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes two flaky
HermesFirstClassSupportTeststhat read the whole host process table through the app's shared census, which fails closed whenever any process on the machine exits mid-scan — routine on busy CI runners.processSnapshotServicetoloadOnWorker/loadFreshOnWorker;nilkeeps the app's shared census and no production call sites change.Written for commit fdea334. Summary will update on new commits.
Summary by CodeRabbit