Skip to content

feat(policy): add memory:GetObjectBio action - #255

Merged
harshavardhana merged 3 commits into
mainfrom
feat/memory-getobjectbio-action
Aug 9, 2026
Merged

feat(policy): add memory:GetObjectBio action#255
harshavardhana merged 3 commits into
mainfrom
feat/memory-getobjectbio-action

Conversation

@dilverse

@dilverse dilverse commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds MemoryGetObjectBioAction (memory:GetObjectBio) to the AIStor Memory API action set, registers it in SupportedMemoryActions, and covers it in TestMemoryActionIsValid.
  • The Memory API serves an object's version history at GET /_mem/v1/cortexes/{cortex}/bio — who wrote each version, when, in which session, and what it carries.
  • Every other Memory route authorizes a memory:* action through authorizeMemoryAction. 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.
memory:GetObjectBio   on   arn:minio:memory:::<cortex>/objects/<key>

No condition keys are attached: memory:prefix and memory:max-keys are deliberately list-only, and bio names one key in its resource.

Test plan

  • go build ./...
  • go test ./policy/ — passes, including the extended TestMemoryActionIsValid
  • Additive only: no existing action, map entry, or behaviour changed

Summary by CodeRabbit

  • New Features

    • Added support for the memory:GetObjectBio memory action.
  • Tests

    • Added validation coverage to confirm the new memory action is recognized as valid.

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.
Copilot AI lite review requested due to automatic review settings August 8, 2026 23:02
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@harshavardhana, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c72fbe61-9d48-4d59-83b3-14f256365853

📥 Commits

Reviewing files that changed from the base of the PR and between f68a1ce and 1255d2b.

📒 Files selected for processing (1)
  • policy/memory-action.go
📝 Walkthrough

Walkthrough

The policy package adds MemoryGetObjectBioAction, registers it as a supported memory action, and verifies it through the valid-action test cases.

Changes

MemoryGetObjectBio action

Layer / File(s) Summary
Define, register, and validate the action
policy/memory-action.go, policy/memory-action_test.go
Adds MemoryGetObjectBioAction, registers it in SupportedMemoryActions, and marks it as valid in the policy tests.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • minio/pkg#246: Modifies policy/memory-action.go with related MemoryAction constants.
  • minio/pkg#248: Adds and registers memory policy actions and extends validity tests.
  • minio/pkg#249: Adds related Memory policy authorization support.

Suggested reviewers: harshavardhana

Poem

A rabbit found a policy key,
And placed it where the actions be.
The list now knows the bio call,
Tests confirm it passes all.
Hop, hop—memory rules align!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of the new memory:GetObjectBio policy action.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) in policy/memory-action.go.
  • Registers the new action in SupportedMemoryActions so MemoryAction.IsValid() recognizes it.
  • Extends TestMemoryActionIsValid to 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 57f7db9 and f68a1ce.

📒 Files selected for processing (2)
  • policy/memory-action.go
  • policy/memory-action_test.go

Comment thread policy/memory-action.go Outdated
"Version history" reads as a listing. The action covers who authored each
version, when, and from where.
@harshavardhana
harshavardhana force-pushed the feat/memory-getobjectbio-action branch from 5d0f634 to 1255d2b Compare August 9, 2026 01:40
@harshavardhana
harshavardhana merged commit befdc24 into main Aug 9, 2026
11 checks passed
@harshavardhana
harshavardhana deleted the feat/memory-getobjectbio-action branch August 9, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants