Skip to content

Add scoped payment instrumentation - #168

Closed
parvahuja wants to merge 1 commit into
parv/sync-payment-transportfrom
parv/agent-instrumentation
Closed

Add scoped payment instrumentation#168
parvahuja wants to merge 1 commit into
parv/sync-payment-transportfrom
parv/agent-instrumentation

Conversation

@parvahuja

@parvahuja parvahuja commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

  • accept a shared PaymentRuntime
  • instrument sync/async httpx and MCP calls with context-local runtime selection
  • use a single-runtime fallback for bare harness worker threads and fail closed when ambiguous
  • preserve explicit wrappers, prevent payment recursion, and restore only patches owned by pympp
  • roll back cleanly when instrumentation cannot be installed

Stacked on #178.

Validation

  • uv run --all-extras --group dev pytest -q (819 passed, 41 skipped)
  • uv run --all-extras --group dev ruff check .
  • uv run --all-extras --group dev ruff format --check .
  • uv run --all-extras --group dev pyright

@parvahuja
parvahuja force-pushed the parv/agent-instrumentation branch from 6bc3649 to 2c6eb3d Compare July 7, 2026 13:48
@parvahuja
parvahuja changed the base branch from main to parv/fix-mcp-challenge-core-metadata July 7, 2026 13:48
@parvahuja
parvahuja force-pushed the parv/fix-mcp-challenge-core-metadata branch from d4e42cc to bd35f53 Compare July 7, 2026 13:49
@parvahuja
parvahuja force-pushed the parv/agent-instrumentation branch from 2c6eb3d to 116d4e7 Compare July 7, 2026 15:36
@parvahuja parvahuja changed the title Add opt-in agent payment instrumentation Add agent payment instrumentation hook Jul 7, 2026
@parvahuja
parvahuja changed the base branch from parv/fix-mcp-challenge-core-metadata to parv/agent-payment-runtime July 7, 2026 15:36
@parvahuja
parvahuja force-pushed the parv/agent-payment-runtime branch 2 times, most recently from 0e4bad5 to 945682b Compare July 7, 2026 18:22
@parvahuja
parvahuja force-pushed the parv/agent-instrumentation branch from 116d4e7 to b6d7050 Compare July 7, 2026 18:24
@parvahuja
parvahuja force-pushed the parv/agent-payment-runtime branch from 945682b to 25e5c19 Compare July 21, 2026 00:37
@parvahuja
parvahuja force-pushed the parv/agent-instrumentation branch from b6d7050 to eae05b9 Compare July 21, 2026 01:09
@parvahuja parvahuja changed the title Add agent payment instrumentation hook Add scoped payment instrumentation Jul 21, 2026
@parvahuja
parvahuja changed the base branch from parv/agent-payment-runtime to parv/sync-payment-transport July 21, 2026 01:09
@parvahuja
parvahuja force-pushed the parv/agent-instrumentation branch from eae05b9 to 5175b62 Compare July 21, 2026 16:31
@parvahuja
parvahuja force-pushed the parv/sync-payment-transport branch from c7fde68 to 343af19 Compare July 21, 2026 16:34
@parvahuja

Copy link
Copy Markdown
Member Author

Superseded by #170, which consolidates the shared runtime, sync transport, instrumentation, response hooks, and receipt extensions into one draft.

@parvahuja parvahuja closed this Jul 21, 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