Repository navigation
Restore CLI notification action CI coverage - #4898
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR replaces an async in-process notification CLI integration test with a synchronous mocked unix-socket test that validates CLI subcommands route to socket methods and parse extended notification fields, and re-enables the test in CI by removing it from xcodebuild's skip list. ChangesNotification CLI Integration Test Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (16 passed)
✨ Finishing Touches📝 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 |
Greptile SummaryThis PR re-enables CI coverage for the notification CLI action tests by replacing the heavy app-driven integration test (which required
Confidence Score: 5/5Test and CI workflow changes only; no production notification or CLI behaviour is modified. Both changed files are test infrastructure. The mock-socket pattern is already well-established in the suite, the helpers in CLINotifyProcessTestSupport are shared and correct, and the sequential run/wait approach is sound. The only gap is a missing openPayload["id"] assertion, which is a minor test-coverage nit with no impact on production code or CI reliability. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant T as Test (main thread)
participant S as Mock Unix Socket Server (background)
participant C as Bundled CLI Process
T->>S: startMockServer(listenerFD, handler)
T->>C: runProcess(["list-notifications", ...])
C->>S: connect + send "list_notifications\n"
S-->>C: notification row response
C-->>T: stdout (JSON rows) + exit 0
T->>T: wait(for: serverHandled)
T->>T: assert extended fields (workspace_id, surface_id, created_at, tab_title)
Note over T,S: Pattern repeats for mark-read, dismiss, open, jump-to-unread
T->>T: state.snapshot() → assert ordered method list
Reviews (2): Last reviewed commit: "Restore CLI notification action CI cover..." | Re-trigger Greptile |
2676824 to
f293201
Compare
Fixes #4524
Summary:
Testing:
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Note
Low Risk
Test and CI workflow changes only; no production notification or CLI behavior is modified.
Overview
Re-enables CI coverage for notification CLI actions by removing the
xcodebuildskip for the old integration test and replacing that test with a lighter harness.The renamed
testNotificationCLIActionsUseSocketAPIAndParseExtendedFieldsno longer spins upAppDelegate,TabManager,TerminalController, or real window state. It runs the bundled CLI against a mock Unix socket (same pattern as other notify regressions), assertslist-notificationsextended JSON fields, and checks mark/dismiss/open/jump commands emit the expected v2 methods (notification.mark_read,notification.dismiss, etc.) via recorded socket traffic and CLI stdout—not by re-listing fromTerminalNotificationStore.Trade-off: the new test validates CLI ↔ socket contract and parsing; it drops end-to-end checks that in-app store/list state changed after each action.
Reviewed by Cursor Bugbot for commit 2676824. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Restores CI coverage for CLI notification actions by replacing the integration test with a bundled-CLI + mock Unix socket server. Confirms parsing of extended list fields and correct v2 socket calls for mark, dismiss, open, and jump, including call order.
Written for commit f293201. Summary will update on new commits. Review in cubic
Summary by CodeRabbit
Release Notes