[BUG]: Receipt lookup stops at the first page containing a broadcasting record, missing later settlement confirmations
Maintainers usually reply within 6 days
@AyushSrivastava1818 is already working on this.
Since Nov 14, 2026.
- #93 by @AyushSrivastava1818 — open
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, typescript
Research direction
Start with PullRequestReceiptLedger.lookup() and its helper findReceipt(), which currently returns on the first page that has a match. Change the scan so matching receipts accumulate across all comment pages (pages of 100), then pick the strongest state, with settled over broadcasting. Add the pagination regression test described in the issue, with broadcasting on page 1 and settled on page 2 under the same key, and confirm lookup() returns the settled receipt while the fail-closed path still holds when the scan cannot finish.
Written by the indexing model from the issue text.
Description
Bug Description
PullRequestReceiptLedger.lookup() returns immediately when findReceipt() finds a matching receipt on the current page.
However, a single successful payout generates two receipt comments:
- A
broadcastingreceipt recorded before transaction broadcast. - A
settledconfirmation recorded after successful broadcast.
The implementation scans comments in pages of 100, but performs the receipt selection independently on each page.
Consequently, when the original broadcasting receipt appears on an earlier page and its settlement confirmation appears on a subsequent page, the lookup returns the earlier broadcasting receipt without examining the remaining comments.
Steps to Reproduce
- Create a PR with more than 100 comments.
- Ensure its earlier comments contain a valid GitPay
broadcastingreceipt. - Add enough subsequent discussion comments for the pagination boundary to fall between the two receipts.
- Add the corresponding
settledconfirmation on a later page. - Execute another payout run using the same idempotency key.
Expected Behaviour
The lookup should scan all relevant comment pages before determining the final receipt state.
When multiple trusted receipts carry the same key, a settled confirmation should take precedence over its earlier broadcasting record.
Actual Behaviour
The lookup returns the broadcasting receipt from the first page containing a match.
The later settled confirmation is never examined.
This causes a successfully completed payout to be reported as unconfirmed, unnecessarily requiring manual transaction verification.
Suggested Fix
Accumulate matching receipts across all pages and determine the strongest receipt state after pagination completes.
Preserve the existing fail-closed behaviour when the comment scan cannot be completed.
Testing
Add a pagination regression test where:
- Page 1 contains a broadcasting receipt.
- Page 2 contains the corresponding settled receipt.
- Both receipts have the same idempotency key.
Verify that lookup() returns the settled receipt.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 4
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/GitPay
-
[BUG]: Receipt ledger trusts comments from any installed bot, bypassing write permission checksMay be free again @AyushSrivastava1818 claimed this 8 days ago, and no pull request is open. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
StabilityNexus/GitPay#92 · 1 comment ·
Maintainers usually reply within 6 days
-
[BUG]: EVM settlement does not validate an overridden chain_id against the configured CAIP-2 networkMay be free again @AyushSrivastava1818 claimed this 8 days ago, and no pull request is open. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
StabilityNexus/GitPay#91 · 1 comment ·
Maintainers usually reply within 6 days
All issues in StabilityNexus/GitPay
Similar issues
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPossibly taken @anshulchikhale30-p claimed this today. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comment ·
Maintainers usually reply within 1 day
-
Add: GTrekkerOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
Maintainers usually reply within 1 day
-
area: ui Bug Payload OSS
Difficulty 1/5 Under an hour Newbie friendliness 88/100
payloadcms/payload#19839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day