feat(policy): add memory:GetObjectBio action - #255
Conversation
The AIStor Memory API serves an object's version history at
GET /_mem/v1/cortexes/{cortex}/bio. Every other Memory route authorizes
a memory:* action; without one for bio it would have to borrow an S3
action, putting S3 semantics into a Memory-native surface.
|
Warning Review limit reached
Next review available in: 36 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe policy package adds ChangesMemoryGetObjectBio action
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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.
Pull request overview
Adds a new AIStor Memory API policy action (memory:GetObjectBio) to the policy package so the Memory “object bio” endpoint can authorize against a Memory-native action/ARN instead of borrowing S3 semantics.
Changes:
- Introduces
MemoryGetObjectBioAction(memory:GetObjectBio) inpolicy/memory-action.go. - Registers the new action in
SupportedMemoryActionssoMemoryAction.IsValid()recognizes it. - Extends
TestMemoryActionIsValidto cover the new action.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| policy/memory-action.go | Defines and registers the new memory:GetObjectBio action alongside existing Memory actions. |
| policy/memory-action_test.go | Adds a validity test case for MemoryGetObjectBioAction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@policy/memory-action.go`:
- Around line 68-71: Replace the comment above the exported
MemoryGetObjectBioAction constant with one concise GoDoc sentence beginning
exactly with “MemoryGetObjectBioAction” and describing its authorization
purpose, without listing response fields.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 02d32a82-70dc-4953-a87e-d4dedb644bde
📒 Files selected for processing (2)
policy/memory-action.gopolicy/memory-action_test.go
"Version history" reads as a listing. The action covers who authored each version, when, and from where.
5d0f634 to
1255d2b
Compare
Summary
MemoryGetObjectBioAction(memory:GetObjectBio) to the AIStor Memory API action set, registers it inSupportedMemoryActions, and covers it inTestMemoryActionIsValid.GET /_mem/v1/cortexes/{cortex}/bio— who wrote each version, when, in which session, and what it carries.memory:*action throughauthorizeMemoryAction. Without one for bio, that route has to borrow an S3 action, which puts S3 semantics into a Memory-native surface. This keeps the separation clean.No condition keys are attached:
memory:prefixandmemory:max-keysare deliberately list-only, and bio names one key in its resource.Test plan
go build ./...go test ./policy/— passes, including the extendedTestMemoryActionIsValidSummary by CodeRabbit
New Features
memory:GetObjectBiomemory action.Tests