Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d81584c11
ℹ️ 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".
| if created_topic_pool { | ||
| topic_pools.remove(&claim.topic_id); |
There was a problem hiding this comment.
Avoid deleting a topic pool after concurrent reserve failure
Removing the pool when reserve(...) fails can corrupt budget accounting under concurrent create_claim_v2 calls for the same newly-seen topic: one request can create the pool (created_topic_pool = true), another request can reserve against it first, and then this request can fail and delete the entire pool anyway. That drops reservations/usage for the other in-flight claim and can later cause missing topic budget pool errors in execution/settlement paths that fetch the pool by topic, while also effectively resetting topic budget if the pool is recreated.
Useful? React with 👍 / 👎.
Motivation
Description
request_with_principalnow injects a uniquex-request-idandauthorizationheader, and epoch/trial fixtures are written viawrite_epoch_configwhere needed.JointLeakagePooltest (1e-12) to avoid sub-ULP rounding issues.sessionId/agentIdin bodies, and fixed revocation test vectors to use 32-byteclaim_idvalues.strict_pln_padding_durationuses lazythen(|| ...);sweep_expired_reservationsruns its mutate/append work under a scoped lock;transition_claim_internalallows Uncommitted/Frozen → Stale transitions used by the sweeper.create_claim_v2now rolls back newly-created topic pools on reservation failure, and holdout pool initialization honors descriptor-providedholdout_k_bits_budget,holdout_access_credit_budget, and the resolvedholdout_pool_scope.Testing
cargo test -p evidenceos-core --test stress_tests boundary_transition_from_active_to_frozen_has_no_off_by_one_leakage(passed) and many daemon tests such asserver::tests::create_claim_v2_*,holdout_pool_*,dependency_*, andhttp_preflight_tests::*(all exercised and fixed to pass).cargo check --workspace(no errors) and./scripts/test_evidence.sh(ran formatting,clippy, and the workspace test gate; large workspace test run completed through the bulk of tests with the modified suite passing in CI-style runs).Codex Task