Repository navigation
Fix x402 agent id and payment ids, and label an unknown owner type - #20
Merged
Merged
Conversation
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
Python parity for the TypeScript SDK fixes in halvorAI/halvorai-app#102 and #103.
Closes #17, closes #18, closes #19.
unattributed, and the wallet stays ininstrument.wallet.x402:<network>:unknown. The fallback isx402:<network>:tx:<transaction hash>, thenx402:<network>:event:<event id>.payment.requestedalready had its own id per challenge here.unattributedgetslabels.owner_type: "unknown", set once inHalvorClient. A Stripe event with an owner id but nohalvor_owner_typegets the same label instead of silently becomingbusiness. A label the caller set is kept.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.jsonandunattributed.json) now include the label, as the TypeScript SDK's output does.Tests and verification
uv run mypypasses.pytestpasses, 203 tests, run with the project's virtualenv. I did not run the Python 3.10 CI command locally.Brain update
labels.owner_type: "unknown".payment_id, and a guessed owner type looked like a fact (x402: seller-side events use the payer wallet as agent.id, so unattributed payments look attributed #17, x402: payments without a nonce all get the same payment_id (x402:<network>:unknown) #18, owner.type is forced to "business" when the owner is unknown (x402, client, stripe) #19).halvorai-ingestx402 and Stripe adapter output and the label added by the client. No schema or API change. Attribution coverage for seller-side x402 data reads lower, which is correct.halvorai-ingestrelease; the changelog has an Unreleased entry.tx:payment id cannot join a payer-side record that has the nonce. The label goes away when APE v0.2 allowsowner.type: "unknown".🤖 Generated with Claude Code