Skip to content

Scenario: a meetup cancelled while people join, a code revoked while they redeem - #320

Merged
renrenmimi merged 1 commit into
mainfrom
functions/scenario-cancel-revoke
Oct 14, 2026
Merged

renrenmimi merged 1 commit into
mainfrom
functions/scenario-cancel-revoke

Conversation

@renrenmimi

Copy link
Copy Markdown
Owner

Two more races in functions/scripts/scenario-many-users.mjs.

Group What it checks
meetup A second meetup, with room for everyone, is cancelled while they are joining. Nobody gets in after the cancel, and the roster and its count agree. On the emulators, everyone on the roster is also told it is cancelled; the test project has no onMeetupUpdated.
invitation A second code is revoked while three people redeem it. At most one gets in, and nobody gets in after the revoke.

On the test project, 200 people: both new checks pass.

  • Cancel: 2 of 198 got in first; a join after the cancel was told the meetup is no longer taking people; the count and the roster both say 3.
  • Revoke: 1 of 3 got in first; a redemption after it was told the code was revoked.

The same run found joins on the full meetup told internal (2 of 180), which the next PR fixes.

🤖 Generated with Claude Code

…they redeem

- meetup: a second meetup, with room for everyone, is cancelled while
  they are joining. Nobody gets in after the cancel, and the roster and
  its count agree. On the emulators, everyone on the roster is told it
  is cancelled; the test project has no onMeetupUpdated.
- invitation: a second code is revoked while three people redeem it.
  At most one gets in, and nobody after the revoke.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 20:29
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pet-note Ready Ready Preview Oct 14, 2026 8:29pm UTC

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T20:31:21.928012Z 2dd2bfe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2dd2bfe26c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +684 to +685
check("meetup: and its roster and count agree",
cancelled?.participantCount === cancelledRoster.length && !cancelledRoster.some((r) => r.id === late.uid),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify successful joiners appear on the cancelled roster

When any concurrent join reports success but fails to create its participant document or increment the count, this check still passes as long as the remaining roster and count agree (for example, both remain at the organizer-only value of 1). joinedBefore is used only in diagnostic output, so the scenario does not enforce its stated invariant that everyone who successfully joined before cancellation is present and counted; retain the successful users and assert their UIDs are in cancelledRoster and reflected in participantCount.

Useful? React with 👍 / 👎.

@renrenmimi
renrenmimi merged commit 22954eb into main Oct 14, 2026
6 checks passed
@renrenmimi
renrenmimi deleted the functions/scenario-cancel-revoke branch October 14, 2026 20:39

This branch was successfully deployed

1 active deployment
Preview — 2dd2bfe2 Deployed Oct 14, 2026 by vercel[bot]
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.

2 participants