test(store)+docs(api): gas-tank race test, poll backoff boundaries, payment-link flow, audit taxonomy - #380
Merged
Emmyt24 merged 3 commits intoSep 28, 2026
Conversation
…tiers set_gas_tank's WHERE guard defends against concurrent double-provisioning but had no test exercising concurrent calls; adds one (8 racers, exactly one wins, the rest get Conflict). wallets_due_for_poll's active/idle/dormant backoff lived in one dense SQL CASE with no boundary coverage; adds tests for the never-polled case, both tier boundaries, and an idle wallet polled within vs past its interval. Closes Octo-Protocol-org#327 Closes Octo-Protocol-org#328
…nomy Adds an end-to-end payer curl sequence (get link, intent, signing-info, submit, status) to docs/api.md, and a new docs/audit-log.md cataloguing every audit category, all 13 audit::record call sites, and the convention for adding a new one. Linked from README. Closes Octo-Protocol-org#329 Closes Octo-Protocol-org#330
|
@DaniellaNwagu Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…-327-330 # Conflicts: # docs/api.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
concurrent_set_gas_tank_calls_result_in_exactly_one_success: 8 concurrentset_gas_tankcalls on one client wallet; exactly one wins, the rest returnStoreError::Conflict, and the stored tank is the winner's.wallets_due_for_polltests for the never-polled wallet, the active and dormant tier boundaries (just inside/outside), and an idle wallet polled within vs past its interval. No off-by-one found.docs/api.mdwith a worked payer curl sequence, run against a local server; linked from the README.docs/audit-log.md: category table, all 13audit::recordcall sites (checked against a grep), and the convention for adding a category; linked from the README anddocs/api.md.No production code changed and neither test surfaced a bug.
Testing
cargo test -p octo-store --test store_tests -- concurrent_set_gas_tank wallets_due_for_poll— 6 passed. The wider suite was not run since this adds only tests and docs.Boundary tests seed ±2s around each tier boundary rather than exactly on it, because the query's
now()can't be frozen.Closes #327
Closes #328
Closes #329
Closes #330