Repository navigation
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 45 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. |
Codex Review Summary: ✅ CompletedThis 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: e1ba0084ee
ℹ️ 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".
| kind: value.kind_tag(), | ||
| }); | ||
| } | ||
| numeric_order::compare_with(&value, &value, self.policy.limits)?; |
There was a problem hiding this comment.
Check the budget without fully comparing the value
For large nonzero decimal keys within the configured budget, admission performs two quadratic decimal conversions merely to validate magnitude lengths: numeric_order::compare_with calls cmp_decimal_magnitude, which converts both coefficients through BigInt::to_decimal_string. With the default 1 MiB coefficient budget, this adds substantial CPU work to each admission despite the comparison result being unused. Expose or reuse a budget-only validator instead, so admitting an already-canonical NumericValue does not require decimal conversion.
Useful? React with 👍 / 👎.
| #[test] | ||
| fn rejects_a_kind_not_allowed_by_the_namespace_policy_at_admission() { |
There was a problem hiding this comment.
Add property coverage for numeric admission invariants
The new admission boundary is covered only by four fixed examples, leaving its invariants across kind masks, numeric kinds and budget boundaries without the property/model-based coverage required by the root AGENTS.md testing doctrine. Generate masks, values and budgets against an independent admission model, checking that allowed in-budget values are preserved, disallowed kinds are always rejected, and kind rejection takes precedence over budget rejection. Existing numeric codec/comparator property tests do not exercise this new policy boundary.
AGENTS.md reference: AGENTS.md:L37-L39
Useful? React with 👍 / 👎.
Summary
id-store.id-corenumeric ordering and configurableNumericLimits, returningresource_limitfor operational budget exhaustion without imposing a semantic magnitude or precision ceiling.NumericKey; namespace generation and authorization remain owned byRegistryStateand its existingRegistryAuthorizerseam.numeric_registryintegration test covering disallowed kinds, budget errors, large valid values, and the authorization seam.Closes #10277
Evidence
cargo metadata --manifest-path pkgs/id/crates/id-store/Cargo.toml --no-deps --format-version 1registerstests/numeric_registry.rsas thenumeric_registryintegration target.rustfmt --edition 2024 --checkon the changed Rust files: pass.git diff --check: pass.cargo test -p id-store --test numeric_registry(not run in this sandbox worker; CI is the build/test venue per the worker rules).Repository-wide
cargo fmtand module-reach checks were attempted but are blocked by pre-existing workspace hazards: the root formatter references missing.src/main.rs, and the module scanner follows a recursive symlink forest underpkgs/id/worktrees. No production rollout or unrelated refactor is included.Merge Danger
id-storemodule and one integration target.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.