Skip to content

fix(id): tag_claims generator picks clear targets without replacement (#5132) - #5162

Merged
dezren39 merged 1 commit into
mainfrom
fix/5132-tag-claims-clear-dedupe
Nov 3, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/5132-tag-claims-clear-dedupe

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Fixes #5132.

Root cause, as filed: #4765 made the store refuse a tag.clear naming the same claim twice, but the history generator in tests/tag_claims.rs sampled a clear's targets with replacement (sets[rng.below(len)] per pick), so generated histories routinely produced the invalid input; Writer::send unwraps the resulting refusal. All four red property tests (test_the_live_set_is_the_oracle_under_any_delivery_order, test_the_compacted_fold_agrees_with_the_causal_walk, test_each_event_names_every_event_its_author_had_seen, test_the_regression_histories_reach_the_oracle_through_every_path) funnel through that one generator.

Fix direction per the issue: the generator is wrong, the store rule from #4765 is intentional and untouched. The generator now picks without replacement. Oracle semantics are unchanged — it already computed removals from the named set as a set.

Verified on the laptop: cargo test -p id --test tag_claims — 12 passed / 0 failed (was 8 passed / 4 failed, all panicking at tag_claims.rs:82 with a clear names a claim twice).


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

…#5132)

Since #4765 the store refuses a tag.clear naming the same claim twice,
but the history generator in tests/tag_claims.rs sampled a clear's
targets with replacement, so generated histories routinely produced
the invalid input and all four property tests panicked in Writer::send.
The store rule is intentional and stays; the generator now picks
without replacement. The oracle is unaffected (it already treated a
clear's named set as a set).
@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 21:33
@dezren39
dezren39 merged commit 464467b into main Nov 3, 2026
1 check passed
@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 59 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: c9a6c383-2c7f-44bf-aa95-b67979ca4712
Commits

Reviewing files that changed from the base of the PR and between 5b0aeb5 and f499d6c.

Files selected for processing: 1
  • pkgs/id/tests/tag_claims.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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@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-03T21:34:51.829275Z f499d6c 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.

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(tag_claims): 4 property tests red since #4765 — generated clears name a claim twice and the store now refuses them

1 participant