Add account-wide payment callback watching - #1
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Quickpay CLI’s callbacks:watch workflow to support account-wide payment callback watching when no payment selector is provided, while preserving the existing selector-scoped behavior and replay constraints. It fits into the callbacks subsystem by enhancing the foreground watcher to safely scan for changed payments using bounded, validated pagination and to forward only post-readiness operations.
Changes:
- Allow selector-free
callbacks:watchto watch all payments, introducing a UTC readiness boundary and overlap-safe deduplication. - Add
PaymentLocator::changedBetween()to scan changed payments viaupdated_atpagination and fetch full payment resources. - Update command/docs/security/skill guidance and expand feature coverage for new watcher behaviors (readiness, retries, pagination safety, malformed responses).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/Commands/Callbacks/WatchCallbacksCommandTest.php | Adds CLI-level coverage for selector-free watch and updated help/argument descriptions. |
| tests/Feature/Callbacks/Watching/CallbackWatchRunnerTest.php | Adds extensive runner coverage for readiness, scanning windows, dedup, retry behavior, and malformed responses. |
| tests/Feature/Callbacks/Resolution/PaymentLocatorTest.php | Adds coverage for changed-payment scanning, pagination safety (origin/cycles/max pages), and deduped full fetches. |
| skills/quickpay/SKILL.md | Updates agent guidance for selector-free account-wide watching and safety notes. |
| SECURITY.md | Documents account-wide forwarding implications and guidance to scope with a selector when appropriate. |
| README.md | Updates user-facing docs/examples for account-wide watch mode and readiness semantics. |
| app/Commands/Callbacks/WatchCallbacksCommand.php | Switches to CallbackRequest::forWatch() and adds account-wide watch event rendering. |
| app/Callbacks/Watching/CallbackWatchRunner.php | Implements account-wide watch flow with readiness timestamp, bounded scanning windows, and operation timestamp validation. |
| app/Callbacks/Resolution/PaymentLocator.php | Introduces changedBetween() with validated pagination and full-resource fetching for changed payments. |
| app/Callbacks/Input/CallbackRequest.php | Adds forWatch() to allow selector-free watch while retaining selector requirements for other flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…llback-watching # Conflicts: # README.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
callbacks:watchto monitor every payment when no selector is providedupdated_atpagination and fetch complete payment resourcesWhy
Developers need a foreground callback watcher that can receive new payment-operation callbacks account-wide without identifying a payment or order in advance.
Safety and compatibility
Verification
composer check: 400 tests, 1216 assertions, PHPStan and Pint passedcomposer verify: 400 tests, 1216 assertions, 93.0% coverage, validation and dependency audit passedcomposer buildbuilds/quickpay --versionbuilds/quickpay list --rawbuilds/quickpay help callbacks:watchcomposer validate --strictgit diff --checkThe requested
php scripts/verify-phar-source.php builds/quickpay devcheck could not run because that verifier script is not present in the current repository.