Skip to content

refactor(request): delegate payment sessions to mppx#63

Open
gakonst wants to merge 1 commit into
mainfrom
georgios/mppx-session-manager
Open

refactor(request): delegate payment sessions to mppx#63
gakonst wants to merge 1 commit into
mainfrom
georgios/mppx-session-manager

Conversation

@gakonst

@gakonst gakonst commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • delegate Tempo session bootstrap, recovery, voucher accounting, top-ups, and receipts to tempo.session.manager
  • use MPPx's Node SQLite ChannelStore, defaulting to the shared ~/.tempo/wallet/channels.db
  • preserve wallet-cli's existing access-key/private-key/provider identity resolution and HTTP retry/redirect/proxy behavior
  • remove 590 lines of duplicate session state-machine code from the request command

Depends on the client rehydration API in wevm/mppx#675 and the independent Node SQLite store in wevm/mppx#677. Until those changes are released together, the dependency is pinned to immutable pkg.pr.new commit 8b64593, which contains both runtime changes (plus the server-side follow-up from #676).

Current-main red proof

Tested against exact origin/main commit f758ec2 in a detached worktree with the identical regression test:

FAIL uses managed session bootstrap before retrying a Tempo session challenge
IncurError: Session payment exceeds --max-spend

Observed request sequence on current main: GET only. The legacy wallet-owned path tried to calculate/open a deposit and never sent the bootstrap request.

Feature green proof

The identical test passes here with request sequence GET -> HEAD -> GET: the initial 402 selects the managed path, MPPx bootstraps the session, and wallet-cli retries the content request.

The preview was installed from the pinned lockfile into a clean dependency graph before the latest validation run; mppx/client/node resolved from commit 8b64593.

Validation:

  • focused request suite: 22 tests passed
  • application and test TypeScript projects: pass
  • format check: pass
  • prior full Vitest run: 8 files, 117 tests passed
  • prior changelog validation: pass
  • prior tempo-request bundle and native package checks: pass; bundled output retains node:sqlite

@gakonst
gakonst force-pushed the georgios/mppx-session-manager branch from 90fec77 to 5484d35 Compare July 20, 2026 19:44
@gakonst
gakonst marked this pull request as ready for review July 20, 2026 19:44
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