镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(api): refresh payment and ledger query filters - #99

Closed
sbddesign wants to merge 2 commits into
masterfrom
fix/current-api-filters
Closed

sbddesign wants to merge 2 commits into
masterfrom
fix/current-api-filters

Conversation

@sbddesign

@sbddesign sbddesign commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Payment and ledger commands lack query filters exposed by the current public API. Refresh the bundled snapshot and generated references.

Command Added flags
payments list `--check-only true
wallets ledger list WALLET_ID --event-type adjustment (omit for payment entries), --start-date, --end-date

Filters persist across cursor and offset pages. Tests cover omission, both boolean values, invalid values, and multi-page adjustment date filters.

Validation: formatting, Clippy with warnings denied, cargo-machete, full cargo test --locked (131 unit and 123 integration tests), and contract coverage check pass. Whole-package CRAP passes: maximum 19.604615 (wait_for_payment); zero functions at or above 20. Measured 607 functions; 177 functions have zero instrumented lines and remain unmeasured. Scope includes src, build.rs, and tests, using cargo-llvm-cov 0.8.5 and Knots 1.16.0.

Companions: agent skills #10, docs #36. Both target released v0.2.0 and retain direct API fallbacks. These changes are unreleased; no release, merge, deployment, or live payment is included.

CLI companion: #100. Each PR is independent and can be reviewed separately.

Self-review against the base and Voltage Rust/style guidance is complete. No live backend acceptance or cross-platform run was performed locally. CodeRabbit approval is pending; no human review wanted label.

The guide, changelog, and mock HTTP regression use omission for payment entries. Explicit --event-type payment exits 2 before HTTP. Published history is preserved with a signed follow-up commit.

@sbddesign sbddesign left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: the advertised --event-type payment command is rejected by this revision. LedgerEventType in the bundled raw public contract contains only adjustment; generated help lists only that value. At dacd633080658aef37acb75f8c52f54097a2c115, the built binary exits 2 for wallets ledger list WALLET_ID --org ORG_ID --event-type payment --json --no-input.

Correct docs/guides/requests.md, CHANGELOG.md, and the PR description: omit --event-type for payment ledger entries; use --event-type adjustment for adjustments. Keep the upstream snapshot unchanged. Add an assertion for the documented omitted-filter payment path.

The check-only true/false/omission mapping and preservation of filters through cursor/offset pagination match the refreshed public contract. Docs #36 and skills #10 remain correctly scoped to released v0.2.0 with direct API fallbacks. This review does not establish release availability.

@sbddesign sbddesign left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the correction at 25eba704eb8280ee3f489bd9c0bf6432120a270b; my Important command-contract finding is closed at this revision. Guide, changelog, and PR table now specify omission for payment ledger entries and --event-type adjustment for adjustments. The added regression verifies omission on the wire and explicit payment exit 2 without another HTTP request.

Independent reviewer gates pass on clean HEAD: formatting, Clippy all targets/warnings denied, cargo-machete, full locked offline tests (131 unit/123 integration), contract check, and maintained whole-package CRAP collection (maximum 19.60, zero violations, 607 measured/177 unmeasured). No live payments. This follow-up reviews the correction, not a new exhaustive review of unrelated code.

Volty has directed replacement PRs from current master to resolve changelog conflicts while preserving published history. This closure applies to the head above; the replacement integrated state requires its own validation and diff comparison. Current-revision CodeRabbit approval remains required before human handoff. CLI support remains unreleased.

@sbddesign

Copy link
Copy Markdown
Contributor Author

Superseded by #102 at fe97bbe, rebuilt on current master without rewriting this published branch. The correction and regression coverage are preserved. Fresh full gates and whole-package CRAP pass; see #102 for current validation and automated review.

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.

1 participant