Repository navigation
Add atomic storage for user-verified agent registration - #118
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
|
Updates to Preview Branch (codex/agent-read-registration) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
There was a problem hiding this comment.
All reported issues were addressed across 4 files
You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Agent registration needs a single winner when approval, polling, or revocation reaches different API instances. Add a service-role-only ciphertext compare-and-swap operation restricted to
RecoupAgentRegistration; it preserves immutable bindings and cannot update expired or revoked state. Generic upserts can insert registrations but cannot overwrite them, preventing a delayed save from reverting an approval.Add bounded cleanup of at most 100 expired registration families per call, with an issuer-specific partial expiry index. Cleanup preserves active artifacts, other issuers, and revocation tombstones. No new table, public grant, scheduler, or production feature is enabled.
Validation: all 44 isolated PostgreSQL tests pass, including concurrent transitions, stale-save and revocation races, immutable bindings, exact cleanup survivors, indexed batch lookup, and role permissions. All 244 API/OAuth tests pass with the updated migration fixture enabled, including two-instance PostgreSQL integration and ordinary PKCE compatibility; agent HTTP routing uses its in-memory fixture.
Apply this additive migration before enabling the companion API and chat registration feature. API/chat remain disabled by default; rollout and rollback are documented in the API PR. The isolated tests do not claim a full production Supabase migration replay.
Companion PRs: API #1052 and App #2249.