Repository navigation
BUZZ-268: Durable invitation revocation and restricted claims - #8237
Open
bradseiler wants to merge 13 commits into
Open
bradseiler wants to merge 13 commits into
bradseiler wants to merge 13 commits into
Conversation
Continue the preserved local BUZZ-268 replacement. Keep v1 natural drain with an optional UTC cutoff; serialize claim and mint policy reads with restriction and owner writes. Share historical revocation repair across migration and desired-state upgrades while retaining deletion fences. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Complete the preserved 66663e19 remediation with a deterministic production-consumer regression, cancellation-safety documentation, and deadline diagnostics. Original recovered refs and their attribution remain unchanged. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com> (cherry picked from commit f1674a2) Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com> (cherry picked from commit 3d02a44) Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com> (cherry picked from commit d43b957) Signed-off-by: Brad Seiler <seiler@squareup.com>
…rsion Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Avoid comparing host and PostgreSQL clocks in the async enqueue guard regression. Assert strict lease ordering before releasing activation. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com> (cherry picked from commit 893f81f) Signed-off-by: Brad Seiler <seiler@squareup.com>
This was referenced Oct 10, 2026
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com>
bradseiler
marked this pull request as ready for review
October 12, 2026 03:57
🔐 Codex Security Review
Review SummaryOverall Risk: MEDIUM
Findings[MEDIUM]
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Permanently revoke v2 relay invitations when their issuer or verified current owner is banned. Serialize mint and claim policy checks with restriction and owner writes so a committed ban or timeout cannot race past admission, membership creation, or invite-use accounting. Verify first-use owner credentials without user writes. Commit ownership only with a successful invitation claim, together with membership, policy evidence, and v2 consumption. Reject a conflicting owner with 403.
Apply the same historical revocation repair through migrations and desired-schema reconciliation, including quiescing and tombstoned communities without disabling deletion fences. Keep v1's natural expiry and add an optional UTC cutoff; legacy retirement still requires a fleet rollout and drain from the last possible v1 issuance.
This draft includes the shared mesh receive fix needed for independent validation. It retains a pending receive across housekeeping ticks and adds a production-consumer regression. The
boot_lifecyclemetrics scraper also retains the last scrape or error until its deadline instead of discarding useful failure diagnostics.Related issue
BUZZ-268. Replacement for the older draft #8162, which remains unchanged. No other replacement draft found.
Testing
Current corrective head
fed8e8fed08b83425881d04f66c221fd5efa2e3dpassedjust ci,just test, complete DB/relay packages and doctests, and the complete isolated PostgreSQL lane (952/952). Normal commit and push hooks passed without bypasses.The signed HTTP rehearsal used a fresh local relay and a Redis observer. Invalid and banned-owner claims created no identities or controls. Successful v1/v2 claims bound ownership atomically and published one control for each new mapping. Retries and owner mismatches created no extra rows or controls. The private harness needed two compilation corrections before this passing run; production source stayed unchanged.
Restoring pre-admission materialization makes the new regression fail with two unauthorized user rows instead of zero. The reviewed fix was restored and all 24 focused cases passed. The destructive lookup-failure fixture now requires the wrapper's exact disposable database and restores its renamed table before assertions.
Issuer and verified-owner timeouts temporarily block claims on existing invites. They do not revoke them durably; claims resume after expiry. A distinct
IssuerRestrictedoutcome preserves that distinction. The v2 restricted-claimant, restricted-issuer, and revoked-invite outcomes now log and explicitly roll back. Owner-mismatch errors in both formats and v1 restricted denials still roll back when the transaction drops; these paths do not log those outcomes. User-creation metrics count only committed inserts.Independent review found no remaining blockers in the corrective delta. Optional trigger tuning, the conservative backfill comment, and splitting the already-validated shared remediation remain deferred. Human testing and fleet evidence remain pending.
Previous-head evidence retained below:
Validated
fdd2db5c0390c73ddf4fae81cc418676ab7f63d3:just ci,just test, and an additional explicit workspace integration run with stderr visible passed with normal repository recipes.buzz-db/buzz-relaypackages and doctests passed; the complete discovered PostgreSQL suite passed 946/946.A first push attempt hit the existing ACP keepalive wall-clock fixture under concurrent validation load. The full normal hook retry passed with one test worker and the other validators idle; the source head stayed unchanged. Full CI also emitted an existing ACP pipe-test leak warning while completing successfully.
The shared PostgreSQL fixture now derives lease ordering from the persisted receipt timestamp rather than comparing host and database clocks. Normal CI selected and passed the new mesh production-consumer regression. Infrastructure-dependent tests skipped by ordinary package runs were exercised separately by the full PostgreSQL run. Human and fleet testing remain pending.
Independent review at
fdd2db5c0390c73ddf4fae81cc418676ab7f63d3found a blocker: invitation claims wrote user identities before admission. Commita35acef9779e97c55c8d03b8bb0916fcd64e524dfixed it by committing ownership only with a successful claim. Reviewer V2 confirmed the fix atfed8e8fed08b83425881d04f66c221fd5efa2e3d. Production admission-lock removal makes the claimant race regressions fail. Live signed HTTP covers banned nonmember denial without consumption, successful claim after unban, issuer mint denial, permanent v2 revocation after unban, and verified owner denial on an agent's first claim.Draft only: human testing, fleet deployment, and legacy v1 drain/cutoff evidence remain outstanding. No readiness attestation is included.
Companion drafts
Regression coverage: BUZZ-269. Staging runbook: BUZZ-270. Live-session revalidation: BUZZ-271. Webhook owner policy: BUZZ-272.
Generated with Codex.