Repository navigation
fix(api): refresh payment and ledger query filters - #102
Conversation
|
@coderabbitai review |
sbddesign
left a comment
There was a problem hiding this comment.
Replacement diff comparison completed against master 8dfa4eedf6fc803d16f798aa3b47f838614b89c4.
For filters #102 (fe97bbe950f1e88c52cb9d0b25b1305c9bfc80d8), compared the replacement tree with git merge-tree --write-tree 8dfa4ee 25eba704. For promotion #103 (16c08ee5fc893d24a19307766653109a1f4a59b7), compared with the merge-tree of 8dfa4ee and 3b0917a. Both comparisons have no differences outside CHANGELOG.md. Each changelog retains master's entries and inserts only its feature entry. Range-diff confirms preservation of the corrected filter guidance and regression.
No new finding from this comparison. The #99 command-contract finding remains closed in #102: omit --event-type for payment entries; explicit payment is rejected. Reviewed the intervening master changes in affected CLI/HTTP paths; no new conflict with the reviewed filter or promotion behavior was identified.
This is a comparison with prior reviews, not a fresh exhaustive review or independent rerun of replacement-head tests/CRAP. Vance records fresh integrated validation in WORK_LOGS/CLI_RELEASE_SYNC_REPLACEMENTS_2026_10_22.md; my independent full-package validation applies to old #99 at 25eba704. CI completion and current-head CodeRabbit approval remain separate gates.
Docs #36 and skills #10 companion descriptions now point to #102/#103. Their released v0.2.0 fallbacks remain unchanged. Both CLI features remain unreleased.
tee8z
left a comment
There was a problem hiding this comment.
Approved fe97bbe against master 8dfa4ee. Both new filters match the snapshot and backend origin/master c4ca979:
check_onlyisOption<bool>onPaymentParams, and the CLI accepts onlytrueorfalse. It is offered only onpayments list, which is the only public endpoint that takes it. The cursor test shows that it is repeated on every page, which the backend's cursor encoding requires.event_typeis a closed set with the single valueadjustment, as is the backend'sLedgerEventType. Any other value is rejected with exit 2, and a test covers it.- No flag is removed or renamed, and
src/is unchanged. The newdocs/commands.mdcolumn matches the snapshot.
Nonblocking:
- The description lists
--start-dateand--end-dateas new onwallets ledger list, but the base snapshot already has both. Onlyevent_typeis new. The CHANGELOG line is correct. scripts/check-coverage.pybuilds the new "Query flags" column with its own copy of the flag aliases and thestream_tokenexclusion fromquery_flagandis_credentialinsrc/registry.rs. The check compares the doc only with the script's own output, so a new alias inregistry.rswould leave the reference wrong. Please note the coupling in both places, or emit the flags from the registry. The description does not mention this change to the generator.docs/guides/wallets.md:41still says that the ledger lists "every credit, hold, capture, and release", and it does not mention--event-type adjustment, which onlyrequests.mddocuments.- In
payment_check_filter_is_optional_and_survives_cursor_pages, the--check-only invalidrejection is inside thefor valueloop, so it runs three times.
Validation on this head, in nix develop: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata, cargo test --locked (143 unit, 126 integration) and python3 scripts/check-coverage.py passed. CRAP: 634 measured functions, none at or above 20, highest wait_for_payment at 19.60; 180 functions were unmeasured. CI is green.
Payment and ledger commands lack query filters exposed by the current public API. Refresh the bundled snapshot and generated references.
payments list--check-only trueor--check-only false(omission includes both)wallets ledger list WALLET_ID--event-type adjustment(omit for payment entries),--start-date,--end-dateFilters 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(143 unit and 126 integration tests), and contract coverage check pass. Whole-package CRAP passes: maximum 19.604615 (wait_for_payment); zero functions at or above 20. Measured 634 functions; 180 functions have zero instrumented lines and remain unmeasured. Scope includessrc,build.rs, andtests, 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.
Replacement companion: #103. Each PR is independent.
Replaces #99 without rewriting published history. Based on master
8dfa4ee; retains master changelog entries. Original evidence:WORK_LOGS/CLI_RELEASE_SYNC_2026_10_22.md. Fresh integrated validation replaces the old-head results.Origin: Buzz engineering channel
b25e2e33-fcbe-4db7-a726-9a6f7eb4df67, thread20a1cc5bc38385cb798c5464afeb605cfabb38b8011d14f18219c9f2e42179e4.Self-review confirms the diff contains only this feature against current master. No live service/payment acceptance or local cross-platform run. CodeRabbit approval is pending; no
human review wantedlabel.