Repository navigation
fix(id): chunk clear_tag into at most MAX_CLEAR_CLAIMS claims per tag.clear event (#1720) - #1768
Conversation
|
Warning Review limit reachedYou'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 44 minutes. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62b0f2c869
ℹ️ 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".
| None, | ||
| )?); | ||
| } | ||
| Ok((count, event.expect("at least one chunk was recorded"))) |
There was a problem hiding this comment.
Replace the prohibited production
expect
The new expect violates the explicit prohibition in pkgs/id/AGENTS.md, and Cargo.toml sets clippy::expect_used = "deny". Because this call is outside the test module's lint allowance, the clippy-lint recipe in pkgs/id/justfile rejects it, blocking the ci quality gate even though the nonempty-claims check makes the unwrap logically safe. Use fallible extraction or restructure the loop to return the final event without expect.
AGENTS.md reference: pkgs/id/AGENTS.md:L144-L144
Useful? React with 👍 / 👎.
…-tag-chunk # Conflicts: # pkgs/id/src/local_events.rs
Fixes #1720.
LocalEvents::clear_tagcollected every live claim of a name into ONETagOp::Clear, andtag_claims::check_oprefuses a clear naming more thanMAX_CLEAR_CLAIMS(256) claims — so a name with >256 live claims on a subject could never be cleared, and every attempt failed.Per the contract pinned by triage task 1936:
clear_tagnow records onetag.clearevent per chunk of at mostMAX_CLEAR_CLAIMSclaims (constant imported fromtag_claims; no new literal), in the ordertag_claims()returns them, until no live claim of the name remains.Hashis the FINAL chunk event's ID. Documented in the doc comment, including the append-only partial-failure semantics (earlier chunks stay recorded; a re-call clears the remainder).Tests (laptop,
cargo test --lib local_events::— 5 passed, 0 failed):Queue task 1945 (repo-health-code-pilot).
Need help on this PR? Tag
@codesmith-botwith what you need.