Skip to content

refactor(gcp): use the shared IsPermissionError and new(expr) instead of local shims - #560

Merged
cristim merged 3 commits into
mainfrom
refactor/6-gcp-shims
Oct 20, 2026
Merged

cristim merged 3 commits into
mainfrom
refactor/6-gcp-shims

Conversation

@cristim

@cristim cristim commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Part of #6: this covers A08-021 and N-1 only. M-6, D-1 and A08b-037 remain open on #6.

This removes the two GCP shims the issue lists:

  • 406051a deletes the local permission-error shim and its errorAs helper. The caller now uses the shared IsPermissionError. This is a deliberate behavior change: an untyped error whose text merely contains "403 permission" now propagates instead of being skipped as a permission denial. Only typed googleapi 403 and gRPC PermissionDenied errors are skipped. Tests cover all three cases.
  • 2388547 deletes stringPtr and int64Ptr in favor of the Go 1.26 new(expr) form.

Verified in providers/gcp, with and without GOWORK=off: build, vet, go test -count=1 ./..., golangci-lint (0 issues), and the git-secrets allowlist script.

🤖 Generated with Claude Code

cristim and others added 2 commits October 20, 2026 06:20
Drops the local isPermissionError shim and its errorAs stub. Classification
is now typed only: googleapi 403 or gRPC PermissionDenied. gRPC
PermissionDenied is newly skipped; an untyped "403 permission" string now
propagates. Adds caller-level tests.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Go 1.26 allows new(value); removes stringPtr/int64Ptr and their tests.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 6 billable files and costs up to $1.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 52 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 87 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-go/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 6bd5f3ba-f615-4519-9b07-75cbe0336ff6
📥 Commits

Reviewing files that changed from the base of the PR and between 09586fd and 0ebf12e.

📒 Files selected for processing: 6
  • CHANGELOG.md
  • providers/gcp/recommendations.go
  • providers/gcp/recommendations_test.go
  • providers/gcp/services/computeengine/client.go
  • providers/gcp/services/computeengine/client_test.go
  • providers/gcp/services/computeengine/dedupe_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@cristim

cristim commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Merge gate verdict (claude-cc-libs)

Every gate holds at head 0ebf12e:

  • Two independent reviews approve the reviewed head 2388547. The branch was then updated from main, and the PR diff is byte-identical to the reviewed diff (compared mechanically).
  • CI is green on 0ebf12e, which is the reviewed change on top of current main.
  • 0 unresolved threads; MERGEABLE/CLEAN.

CodeRabbit is waived as a merge gate under the 2026-10-19 decision. Squash-merging.

@cristim
cristim merged commit d82ed1b into main Oct 20, 2026
15 checks passed
@cristim
cristim deleted the refactor/6-gcp-shims branch October 20, 2026 04:37
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.

1 participant