feat(rbac): enhance function registration with new hooks and RBAC con…#1373
feat(rbac): enhance function registration with new hooks and RBAC con…#1373sergiofilhowz merged 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdates worker module docs to add RBAC-controlled function registration gating: a new Changes
Sequence Diagram(s)sequenceDiagram
participant Worker
participant RBAC/Auth
participant EngineHook
participant Registry
Worker->>RBAC/Auth: connect & request registerfunction(payload)
RBAC/Auth->>RBAC/Auth: evaluate AuthResult (allow_function_registration)
alt allow_function_registration == true and hook configured
RBAC/Auth->>EngineHook: call on_function_registration_function_id(FunctionRegistrationHookInput)
EngineHook-->>RBAC/Auth: return true/false
alt hook == true
RBAC/Auth->>Registry: accept registration -> store function
Registry-->>Worker: registration acknowledged
else hook == false
RBAC/Auth-->>Worker: silent drop (no registration)
end
else allow_function_registration == false
RBAC/Auth-->>Worker: silent drop (no registration)
end
Worker->>RBAC/Auth: unregisterfunction(function_id)
RBAC/Auth->>Registry: remove function if owned by Worker
Registry-->>Worker: unregister acknowledged
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/modules/module-worker.mdx`:
- Line 289: Update the `registerfunction` protocol documentation row to include
the optional `description?` parameter alongside `function_id` and `metadata`,
and change the text to state that on RBAC ports registration requires
`allow_function_registration` and that the
`on_function_registration_function_id` hook must return true (not merely be
called) for registration to proceed; also scan engine/ codepaths that implement
registerfunction to ensure they accept `description` and enforce the
hook-return-true behavior and reconcile any mismatches.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3ce01406-1831-4ed3-a693-68fc7592313f
📒 Files selected for processing (1)
docs/modules/module-worker.mdx
…trols
Summary by CodeRabbit