fix(cli): stabilize delegated credential shard lookup#322
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughDelegated-credential on-disk storage is migrated from a single flat key to a workspace-shard-keyed directory layout ( ChangesWorkspace-sharded delegated credential storage and migration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Relayfile Eval ReviewRun: Passed: 4 | Needs human: 0 | Reviewable: 0 | Missing output: 0 | Failed: 0 | Skipped: 0 Human Review CasesNo reviewable human-review cases captured Relayfile output. |
|
Follow-up issue for the non-blocking upstream item (the source that writes the inverted |
|
ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed. This PR has no HTTP API surface changes, so the OpenAPI contract rule doesn't apply. No bot/reviewer comments were provided in the harness inputs ( Here is my review. Review: PR #322 — fix(cli): stabilize delegated credential shard lookupSummaryThe PR canonicalizes the workspace value before deriving the delegated-credential shard key, so name/ID/relay-workspace-ID aliases that map to the same workspace resolve to one shard. It also adds a self-healing legacy-shard probe with a create-only atomic write ( Scope is tight and consistent with the PR purpose ( Verification
Correctness notes (verified against the current checkout)
Addressed comments
Advisory Notes
VerdictBuild, full test suite, gofmt, and vet all pass on the working tree as-is. The change is well-scoped, the fail-to-raw fallback is conservative, and no safety/lifecycle defaults are altered. No mechanical fixes were needed and no semantic changes are warranted from me. I am not printing READY: I cannot confirm from this sandbox the live state of GitHub's required checks (pending/in-progress) or mergeability, and no human review presence was provided — those are post-harness conditions outside what I can verify here. |
Summary
id,relayWorkspaceId,name) across every matching record when the canonical shard is missing, then heal with a create-if-missing write.Verification
go test ./internal/delegatedauthgo test ./cmd/relayfile-cli -run ...regression setgo test ./cmd/relayfile-cligo test ./...Non-blocking follow-ups
loadDelegatedCredentialsForRequestonce per process to reduce log noise on permanently polluted catalogs.id=rw_/rw=uuidworkspace catalog row so new poisoned records stop accumulating.Merge hold: review-ready for #321, not auto-merge.