Skip to content

refactor(api)!: drop the removed permission namespace and name fields - #1897

Open
whoAbhishekSah wants to merge 2 commits into
mainfrom
refactor/remove-deprecated-permission-proto-fields
Open

refactor(api)!: drop the removed permission namespace and name fields#1897
whoAbhishekSah wants to merge 2 commits into
mainfrom
refactor/remove-deprecated-permission-proto-fields

Conversation

@whoAbhishekSah

Copy link
Copy Markdown
Member

Summary

Final step of #1782 for the permission APIs. The deprecated namespace/name fields are deleted from the Permission message and PermissionRequestBody in proton (raystack/proton#500, numbers and names reserved), so key (service.resource.verb) is the only way a permission's identity travels on the wire in either direction. This lands the regenerated protos and stops populating the two response fields.

Depends on raystack/proton#500. The PROTON_COMMIT pin currently points at that PR's head commit; I'll move it to the proton main commit once it merges.

Why this is safe for clients

Changes

  • Makefile: bump PROTON_COMMIT; the regen also picks up the CheckOrganizationDelete RPC definition recently added on proton main — the handler embeds the generated unimplemented fallback, so that endpoint answers unimplemented until its implementation (feat(deleter): clear or report org delete blockers up front #1857) lands.
  • proto/: regenerated.
  • internal/api/v1beta1connect/permission.go: transformPermissionToPB no longer sets Name/Namespace; the key round-trip guard stays.
  • internal/api/v1beta1connect/permission_test.go: expectations are key-only; the two "deprecated fields sent without key" cases are gone since the fields no longer exist.

Test Plan

  • go build ./... and go vet ./... (including regression,e2e tags) pass
  • go test ./internal/api/v1beta1connect/... passes
  • golangci-lint run internal/api/v1beta1connect/... — 0 issues
  • Full go test ./... — only the Docker-backed postgres/e2e suites fail locally (Docker not running); CI runs them
  • CI regression + smoke green

🤖 Generated with Claude Code

Bump the proton pin to pull in the proto change that deletes the
deprecated namespace and name fields from the Permission message and
PermissionRequestBody (their numbers and names are now reserved), and
regenerate the vendored protos. Responses carry the permission identity
only in key, so transformPermissionToPB no longer populates the two
fields and the handler tests assert key-only payloads.

The pin bump also picks up the CheckOrganizationDelete RPC definition
added on proton main; the handler embeds the generated unimplemented
fallback, so that endpoint answers unimplemented until its
implementation lands.

Part of #1782.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview Aug 20, 2026 8:27am

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 37 minutes

Limit details: You’ve used all 2 included reviews currently available.

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?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a0ec172-1488-4855-9cb6-01046081a6f9

📥 Commits

Reviewing files that changed from the base of the PR and between db2730d and 444cd87.

📒 Files selected for processing (1)
  • internal/api/v1beta1connect/permission.go

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d8828ce-aa7c-4313-8ba5-259e755f5273

📥 Commits

Reviewing files that changed from the base of the PR and between 1e7ad49 and db2730d.

⛔ Files ignored due to path filters (4)
  • proto/v1beta1/admin.pb.go is excluded by !**/*.pb.go, !proto/**
  • proto/v1beta1/frontier.pb.go is excluded by !**/*.pb.go, !proto/**
  • proto/v1beta1/frontierv1beta1connect/frontier.connect.go is excluded by !proto/**
  • proto/v1beta1/models.pb.go is excluded by !**/*.pb.go, !proto/**
📒 Files selected for processing (3)
  • Makefile
  • internal/api/v1beta1connect/permission.go
  • internal/api/v1beta1connect/permission_test.go
💤 Files with no reviewable changes (1)
  • internal/api/v1beta1connect/permission_test.go

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Permission API responses now consistently use the validated permission key and no longer populate deprecated name and namespace fields.
    • Updated create, update, list, and get operations to reflect the streamlined permission response format.
  • Chores

    • Updated an internal dependency version for improved compatibility and maintenance.

Walkthrough

The permission API no longer returns deprecated Name and Namespace fields. Tests now validate Id, Key, and timestamps. The Makefile also pins Proton to a newer commit.

Changes

Permission response cleanup

Layer / File(s) Summary
Permission response transformation
internal/api/v1beta1connect/permission.go
transformPermissionToPB omits deprecated Name and Namespace fields while retaining Key, ID, timestamps, and metadata.
Permission API response expectations
internal/api/v1beta1connect/permission_test.go
Create, update, list, and get tests now validate responses without deprecated fields. Invalid requests that used deprecated fields without a key are removed.

Proton dependency pin

Layer / File(s) Summary
Proton commit pin
Makefile
PROTON_COMMIT is updated to a newer commit.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to db273

The PR removes deprecated permission response fields as an intentional compatibility change. Merge is reasonable with explicit owner awareness that the required minor version bump and release-note entry must be verified.

Possibly related PRs

Suggested reviewers: amangit07

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
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.

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.

@coveralls

coveralls commented Aug 20, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32348861598

Coverage decreased (-0.002%) to 48.802%

Details

  • Coverage decreased (-0.002%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 40099
Covered Lines: 19569
Line Coverage: 48.8%
Coverage Strength: 15.73 hits per line

💛 - Coveralls

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants