Skip to content

docs(ack-pay): document incomplete checks in verifyPaymentReceiptClaim - #249

Closed
forumevi wants to merge 1 commit into
agentcommercekit:mainfrom
forumevi:docs/receipt-claim-verifier-incomplete
Closed

forumevi wants to merge 1 commit into
agentcommercekit:mainfrom
forumevi:docs/receipt-claim-verifier-incomplete

Conversation

@forumevi

@forumevi forumevi commented Oct 7, 2026

Copy link
Copy Markdown

Problem

verifyPaymentReceiptClaim in packages/ack-pay/src/receipt-claim-verifier.ts contains only a vague comment:

// For now, we just verify the credential subject matches the expected schema
return Promise.resolve()

Two semantic checks are absent from this ClaimVerifier:

  1. paymentRequestToken expiry — the token is a JWT string (schema-validated) but its expiry is not checked here. verifyPaymentReceipt calls verifyPaymentRequestToken downstream so the gap is covered, but the ClaimVerifier is not self-contained.

  2. paymentOptionId membership — the ID is not verified against the options actually listed in the decoded payment request. Again, verifyPaymentReceipt performs this check, but a caller using the ClaimVerifier directly would miss it.

Change

Replace the vague comment with a structured TODO that:

  • names exactly which checks are missing
  • explains why they are absent (the ClaimVerifier interface does not carry the resolver or decoded payment request needed to perform them)
  • points to where the equivalent checks already live (verifyPaymentReceipt)

No behaviour change — this is a documentation/tracking improvement to make the intent and known gaps explicit for future contributors.

The verifyPaymentReceiptClaim function only validates the schema of the
credential subject but does not perform deeper semantic verification
(expiry of paymentRequestToken, paymentOptionId membership). These gaps
are already handled by verifyPaymentReceipt, but the ClaimVerifier
interface leaves the intent unclear.

Replace the vague 'For now' comment with a structured TODO that names
exactly which checks are missing, why they are absent (interface
constraints), and where the equivalent checks already live.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f22617cf-3767-4902-b83f-55701f2c5333
📥 Commits

Reviewing files that changed from the base of the PR and between 3db94d6 and a552e39.

📒 Files selected for processing (1)
  • packages/ack-pay/src/receipt-claim-verifier.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@forumevi

forumevi commented Oct 7, 2026

Copy link
Copy Markdown
Author

Closing: not a real finding.

@forumevi forumevi closed this Oct 7, 2026
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