Skip to content

fix(id): drop ready copy when key arrives (#4730) - #5200

Merged
dezren39 merged 3 commits into
mainfrom
queue/6719-4730-arrived-ready-copy
Nov 6, 2026
Merged

dezren39 merged 3 commits into
mainfrom
queue/6719-4730-arrived-ready-copy

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Store each ready event with its key so arrived() can remove only the already-applied copy.
  • Preserve the order of other ready events.
  • Add regressions for both ready-entry insertion forms and model the behavior in waiting_properties.

This is the #4730 arrived/ready-state change only. It does not duplicate #3911’s separate restore() guard or proof-park changes.

Fixes #4730

Verification

  • Local targeted tests are running: id-core waiting unit tests, waiting_properties, and event_store::waiting_rows.
  • Awaiting PR checks.

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

dezren39 and others added 2 commits November 3, 2026 07:08
WaitingPool::arrived dropped only the held copy of the key it was told
about. When the event was still in the ready queue (inserted with all
deps already arrived, or with no deps) that copy survived, so take_ready
handed the already-applied event out a second time.

The ready queue kept only keys (ready_keys) and handed out bare events,
so an arrival could not find its copy. Store (key, event) pairs and drop
the matching pair in arrived; other ready events keep insert order.

The property-test model is updated to the same rule, and regression
tests cover both insert forms plus cross-key ordering.
@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 23:16
@coderabbitai

coderabbitai Bot commented Nov 3, 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 54 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: 0c534be4-a609-483e-b3ff-cf5875748515
Commits

Reviewing files that changed from the base of the PR and between 6ed2ae7 and cd7e41f.

Files selected for processing: 2
  • pkgs/id/crates/id-core/src/waiting.rs
  • pkgs/id/tests/waiting_properties.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 3, 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-04T06:27:05.138787Z cd7e41f New commits
ℹ️ 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 commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

Stale-PR warden: no activity for 2 days. Resolution task: #6564 — this PR should be merged, fixed, or closed.

@dezren39
dezren39 merged commit 26f51c3 into main Nov 6, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/6719-4730-arrived-ready-copy branch November 6, 2026 16:49
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.

id(waiting): WaitingPool::arrived does not drop a ready-queue copy — an event applied through another path is handed out again by take_ready

1 participant