Skip to content

fix(id): do not persist actions for WaitingFull-refused group events (#2916) - #4255

Merged
dezren39 merged 1 commit into
mainfrom
queue/5470-2916-waitingfull-action-order
Nov 2, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5470-2916-waitingfull-action-order

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Implements the triaged fix for #2916 (queue task 5470).

Change

pkgs/id/src/event_store/ingest.rs — in settle, the Decision::Wait and Decision::Park arms held the event before writing its group action, and now write the action only when the hold actually holds the event (Hold::Held). Previously store_action ran before m.hold(...), so a WaitingFull refusal committed the refused event's action row whenever the same ingest call committed for an unrelated reason (e.g. expiring another author's held event) — and nothing ever deletes actions rows.

The Accept arm is unchanged (a stored event keeps its action), and attach_action remains limited to stored events.

Tests

New store-level regressions beside the existing waiting tests in ingest.rs:

  • test_a_waiting_full_refusal_persists_no_action_even_when_the_call_expires — mirrors the triage probe: B seq-1 held at t=0 (due t=1000), A seq-2 held at t=500 (A at cap 1), A seq-3 group event refused WaitingFull, run at t=500 (no-expiry control) and t=1000 (same-call expiry). After reopening, the actions table is empty in both runs and the refused event is not waiting.
  • test_a_held_group_event_keeps_its_action — a successfully held group event's action survives a reopen.

Local verification: rustfmt --edition 2024 --check clean. Cargo tests were not run on the laptop (load ~90; CI-first policy) — CI on this PR is the test run.

Refs #2916 · task 5470


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…2916)

In settle, the Wait and Park arms wrote the group action before
holding the event. When the hold refused with WaitingFull and the
same ingest call committed for an unrelated reason (an expiry), the
refused event's action row persisted forever. Hold first now, and
write the action only when the hold actually holds the event.

Regression tests mirror the triage probe: a WaitingFull refusal with
a same-call expiry and a no-expiry control both leave the actions
table empty after reopening, and a successfully held group event
keeps its action across a reopen.
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 07:11
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 524d3398-b35d-48d4-99ff-47a0c292e944
Commits

Reviewing files that changed from the base of the PR and between 6cdfaee and 4977efb.

Files selected for processing: 1
  • pkgs/id/src/event_store/ingest.rs
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-11-02T07:13:01.716496Z 4977efb 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.

@dezren39
dezren39 merged commit 4d1fe4d into main Nov 2, 2026
4 of 32 checks passed
@dezren39
dezren39 deleted the queue/5470-2916-waitingfull-action-order branch November 2, 2026 15:34
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