Skip to content

Add atomic storage for user-verified agent registration - #118

Merged
sidneyswift merged 2 commits into
mainfrom
codex/agent-read-registration
Oct 20, 2026
Merged

sidneyswift merged 2 commits into
mainfrom
codex/agent-read-registration

Conversation

@sidneyswift

@sidneyswift sidneyswift commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d8eb836f-f757-4563-b6a0-d2c159da9a69
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@supabase

supabase Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (codex/agent-read-registration) ↗︎

Deployments Status Updated
Database ✅ Tue, 20 Oct 2026 04:30:09 UTC
Services ✅ Tue, 20 Oct 2026 04:30:09 UTC
APIs ✅ Tue, 20 Oct 2026 04:30:09 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Tue, 20 Oct 2026 04:30:09 UTC
Migrations ✅ Tue, 20 Oct 2026 04:30:09 UTC
Seeding ✅ Tue, 20 Oct 2026 04:30:09 UTC
Edge Functions ✅ Tue, 20 Oct 2026 04:30:09 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@cubic-dev-ai cubic-dev-ai 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.

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

Comment thread tests/oauth/README.md Resolved
Comment thread tests/oauth/test_agent_registration.py Resolved
Comment thread tests/oauth/run.sh Resolved
Comment thread tests/oauth/test_agent_registration.py Resolved
Comment thread tests/oauth/test_agent_registration.py Resolved
Comment thread tests/oauth/test_agent_registration.py Resolved
@sidneyswift
sidneyswift merged commit ad195b4 into main Oct 20, 2026
13 checks passed
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