Skip to content

Cli auto cancel#1688

Draft
benalleng wants to merge 5 commits into
payjoin:masterfrom
benalleng:cli-auto-cancel
Draft

Cli auto cancel#1688
benalleng wants to merge 5 commits into
payjoin:masterfrom
benalleng:cli-auto-cancel

Conversation

@benalleng

@benalleng benalleng commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

This builds on #1683 And rewires the cli to better handle the change in the db resulting from no longer having completed_at as well as some pure enhancements like checking expiry mid loop instead of only on startup.

Blocked by #1683

Pull Request Checklist

Please confirm the following before requesting review:

Removes the completed_at DB column and the "Completed At" history display column. Session status is now derived from the event log via SessionHistory::status(); resume only acts on SessionStatus::Active. SenderPersister and ReceiverPersister close() append a Closed(Aborted) event so expired/failed sessions read as terminal on subsequent replays rather than re-erroring.
Prints the session_id alongside the send/receive 'session established' messages so users can track or cancel sessions. Adds a 'Fallback Tx available' qualifier to aborted sessions in history output when a fallback transaction is present, mirroring the existing success suffix.
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28291105946

Coverage increased (+0.06%) to 85.577%

Details

  • Coverage increased (+0.06%) from the base build.
  • Patch coverage: 118 uncovered changes across 5 files (92 of 210 lines covered, 43.81%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
payjoin-cli/src/app/v2/mod.rs 113 21 18.58%
payjoin/src/core/send/v2/mod.rs 12 0 0.0%
payjoin/src/core/receive/v2/mod.rs 7 0 0.0%
payjoin/src/core/error.rs 10 4 40.0%
payjoin-cli/src/db/v2.rs 34 33 97.06%
Total (8 files) 210 92 43.81%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
payjoin-cli/src/app/v2/mod.rs 2 51.63%

Coverage Stats

Coverage Status
Relevant Lines: 15129
Covered Lines: 12947
Line Coverage: 85.58%
Coverage Strength: 361.77 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants