refactor(server): effectify permission reply route - #1032
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR refactors the permission reply HTTP route handler to use ChangesPermission Reply Handler Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 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 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 |
There was a problem hiding this comment.
Code Review
This pull request refactors the permission reply route to execute within the AppRuntime using Effect.gen and introduces a new test suite for verifying permission routes. The feedback identifies a potential TypeScript type mismatch in the test file where onPending expects an Effect<void> but receives an Effect<boolean> from Deferred.succeed, suggesting the use of Effect.asVoid to ensure strict type safety.
Summary
Migrate
POST /permission/:requestID/replyto the existingAppRuntime.runPromise(Effect.gen(...))route runtime pattern.Why
This continues the #936 ordinary JSON route migration for a narrow permission JSON route without changing permission semantics or touching auth, streaming, automation, workspace sync, v2, or SDK/OpenAPI source areas.
Related Issue
Refs #936
Human Review Status
Pending
Review Focus
Please check that the route still forwards the same request ID, reply, and optional message to
Permission.Service.reply.Risk Notes
This PR does not change the e2e permission seed route or permission list pruning behavior.
Skipped conditional checklist items:
How To Verify
Screenshots or Recordings
Not applicable; no visible UI changes.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.Summary by CodeRabbit
Refactor
Tests