Skip to content

Fix x402 agent id and payment ids, and label an unknown owner type - #20

Merged
hedge-waleed merged 1 commit into
mainfrom
fix/x402-ids-and-unknown-owner
Nov 24, 2026
Merged

hedge-waleed merged 1 commit into
mainfrom
fix/x402-ids-and-unknown-owner

Conversation

@hedge-waleed

Copy link
Copy Markdown
Contributor

Summary

Python parity for the TypeScript SDK fixes in halvorAI/halvorai-app#102 and #103.

Closes #17, closes #18, closes #19.

The mappers now allocate the event id themselves (the client already honours it), because two of the new payment ids contain it. The APE schema is unchanged. The label is a v0.1 stopgap until the schema allows owner.type: "unknown" (halvorAI/halvorai-app#100).

Two shared Stripe fixtures in tests/fixtures/stripe/expected.json (payment_intent.payment_failed.json and unattributed.json) now include the label, as the TypeScript SDK's output does.

Tests and verification

  • New tests, written first and failing before the change: wallet never used as agent id (authorization and settlement), no shared id for a settlement or payload without a nonce, retry keeps its id, event-id fallback, owner label cases (placeholder, adapter-supplied, real owner, caller labels kept), and the Stripe owner-type case.
  • uv run mypy passes. pytest passes, 203 tests, run with the project's virtualenv. I did not run the Python 3.10 CI command locally.

Brain update

🤖 Generated with Claude Code

@hedge-waleed
hedge-waleed merged commit 8d936a3 into main Nov 24, 2026
1 check passed
@hedge-waleed
hedge-waleed deleted the fix/x402-ids-and-unknown-owner branch November 24, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant