release: prepare v1.7.0#84
Conversation
|
Warning Review limit reached
More reviews will be available in 47 minutes and 37 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSwiftASB v1.7.0 adds guardian denied-action approval requests with auto-review tracking, restructures public APIs to promote CodexExtensions and thread-scoped MCP, hardens JSON-RPC ID validation, and extends the protocol with internal filesystem operations. Version references updated from v1.6.0 throughout codebase and documentation. ChangesSwiftASB v1.7.0 Release Checkpoint
🎯 4 (Complex) | ⏱️ ~60 minutes Possibly Related PRs
Suggested Labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
Sources/SwiftASB/Protocol/CodexAppServerProtocol.swift (1)
1405-1419: ⚡ Quick winVerify that double-decoding is necessary.
The
"item/autoApprovalReview/completed"handler decodes the payload twice—once asCodexWireJSONValue(line 1408-1412) and once as the typed notification (line 1413-1417). This creates a struct containing both the raw event and the typed notification. If the typed notification already contains all necessary data, the rawCodexWireJSONValuemay be redundant.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Sources/SwiftASB/Protocol/CodexAppServerProtocol.swift` around lines 1405 - 1419, The case handling "item/autoApprovalReview/completed" is decoding the payload twice (once to CodexWireJSONValue and once to CodexWireItemGuardianApprovalReviewCompletedNotification) when building the .itemGuardianApprovalReviewCompleted value; if the typed notification already contains the full event data remove the redundant raw decode and pass only the typed notification into the initializer (i.e., stop calling decodeNotification with CodexWireJSONValue), otherwise explicitly document why both are required or rename the raw field to clarify its purpose; locate the switch case for "item/autoApprovalReview/completed", the decodeNotification calls, the CodexWireJSONValue and CodexWireItemGuardianApprovalReviewCompletedNotification types, and the .itemGuardianApprovalReviewCompleted initializer to make the change.Tests/SwiftASBTests/Public/CodexMCPTests.swift (1)
45-49: 💤 Low valueConsider adding explicit error handling to the switch statement.
The switch only handles the
.mcpcase without a default or additional cases. IfInstallResulthas other variants, adding a default case withIssue.record()orfatalError()would document the expectation that.install(.mcp(...))always returns a.mcpresult and improve test clarity.♻️ Optional: Add explicit default case
let result: CodexExtensions.MCP.InstallResult switch installResult { case let .mcp(mcpResult): result = mcpResult +default: + Issue.record("Expected .mcp result from MCP install") + throw CodexAppServerError.invalidState(reason: "Unexpected install result type") }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Tests/SwiftASBTests/Public/CodexMCPTests.swift` around lines 45 - 49, The switch on installResult (type CodexExtensions.MCP.InstallResult) only handles the .mcp case; add an explicit default (or additional enum cases if known) to handle unexpected variants and document the invariant — e.g., in the switch on installResult add a default branch that calls Issue.record(...) or fatalError("Unexpected InstallResult: \(installResult)") so tests fail fast and the intent that .install(.mcp(...)) yields .mcp is clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Tests/SwiftASBTests/Public/CodexAppServerThreadManagementTests.swift`:
- Around line 37-50: The test currently only inspects the last
mcpServerStatus/list payload but doesn't ensure refreshStatusSnapshot() actually
triggered a new transport request; before calling try await
thread.mcp.refreshStatusSnapshot() capture the current count of
transport.requestPayloads(for: "mcpServerStatus/list"), then call try await
thread.mcp.refreshStatusSnapshot(), then assert the new count is greater than
the previous count (and continue to validate the last payload as before).
Reference the methods refreshStatusSnapshot(), transport.requestPayloads(for:),
and the mcpServerStatus/list payload check to locate where to add the pre-call
count capture and the post-call count assertion.
---
Nitpick comments:
In `@Sources/SwiftASB/Protocol/CodexAppServerProtocol.swift`:
- Around line 1405-1419: The case handling "item/autoApprovalReview/completed"
is decoding the payload twice (once to CodexWireJSONValue and once to
CodexWireItemGuardianApprovalReviewCompletedNotification) when building the
.itemGuardianApprovalReviewCompleted value; if the typed notification already
contains the full event data remove the redundant raw decode and pass only the
typed notification into the initializer (i.e., stop calling decodeNotification
with CodexWireJSONValue), otherwise explicitly document why both are required or
rename the raw field to clarify its purpose; locate the switch case for
"item/autoApprovalReview/completed", the decodeNotification calls, the
CodexWireJSONValue and CodexWireItemGuardianApprovalReviewCompletedNotification
types, and the .itemGuardianApprovalReviewCompleted initializer to make the
change.
In `@Tests/SwiftASBTests/Public/CodexMCPTests.swift`:
- Around line 45-49: The switch on installResult (type
CodexExtensions.MCP.InstallResult) only handles the .mcp case; add an explicit
default (or additional enum cases if known) to handle unexpected variants and
document the invariant — e.g., in the switch on installResult add a default
branch that calls Issue.record(...) or fatalError("Unexpected InstallResult:
\(installResult)") so tests fail fast and the intent that .install(.mcp(...))
yields .mcp is clear.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3f05b9e1-09ec-4d0d-a731-0aa1368ab527
📒 Files selected for processing (37)
README.mdROADMAP.mdSources/SwiftASB/Protocol/CodexAppServerProtocol+Types.swiftSources/SwiftASB/Protocol/CodexAppServerProtocol.swiftSources/SwiftASB/Protocol/CodexRPCEnvelope.swiftSources/SwiftASB/Public/CodexAppServer+CodexExtensions.swiftSources/SwiftASB/Public/CodexAppServer+Inventory.swiftSources/SwiftASB/Public/CodexAppServer+ProtocolPayloads.swiftSources/SwiftASB/Public/CodexAppServer+WireMapping.swiftSources/SwiftASB/Public/CodexAppServer.swiftSources/SwiftASB/Public/CodexInteractiveRequests.swiftSources/SwiftASB/Public/CodexMCP.swiftSources/SwiftASB/Public/CodexThread+Dashboard.swiftSources/SwiftASB/Public/CodexThread.swiftSources/SwiftASB/SwiftASB.docc/AppWideCapabilities.mdSources/SwiftASB/SwiftASB.docc/CodexAppServer.mdSources/SwiftASB/SwiftASB.docc/CodexExtensions.mdSources/SwiftASB/SwiftASB.docc/CodexInventory.mdSources/SwiftASB/SwiftASB.docc/CodexMCP.mdSources/SwiftASB/SwiftASB.docc/FeaturePermissionPolicy.mdSources/SwiftASB/SwiftASB.docc/GeneratedWireBoundary.mdSources/SwiftASB/SwiftASB.docc/HandlingTurnProgressAndApprovals.mdSources/SwiftASB/SwiftASB.docc/SwiftASB.mdSources/SwiftASB/SwiftASB.docc/SwiftUIObservableCompanions.mdSources/SwiftASB/SwiftASB.docc/ThreadHistoryAndObservables.mdTests/SwiftASBTests/Protocol/CodexAppServerProtocolTests.swiftTests/SwiftASBTests/Public/CodexAppServerCompanionSurfaceTests.swiftTests/SwiftASBTests/Public/CodexAppServerFileSystemTests.swiftTests/SwiftASBTests/Public/CodexAppServerInventoryTests.swiftTests/SwiftASBTests/Public/CodexAppServerLiveApprovalProbeTests.swiftTests/SwiftASBTests/Public/CodexAppServerLiveIntegrationTestSupport.swiftTests/SwiftASBTests/Public/CodexAppServerTestSupport.swiftTests/SwiftASBTests/Public/CodexAppServerThreadManagementTests.swiftTests/SwiftASBTests/Public/CodexAppServerTurnInteractionTests.swiftTests/SwiftASBTests/Public/CodexMCPTests.swiftTests/SwiftASBTests/Transport/CodexRPCEnvelopeTests.swiftdocs/maintainers/v1-public-api-audit.md
Release
protocol/fs-mutations-internalmainupdates behind pull request review and CIv1.7.0was created locally before this PR so the reviewed release candidate is preserved exactlyReview Loop
Before merge,
scripts/repo-maintenance/release.shwatches CI and stops on review comments unless the maintainer has already addressed or resolved them and reruns with--review-comments-addressed.