Skip to content

fix: align sponsored tempo tx fees with policy#123

Merged
brendanjryan merged 4 commits intomainfrom
brendan/integration-tests-ci
May 2, 2026
Merged

fix: align sponsored tempo tx fees with policy#123
brendanjryan merged 4 commits intomainfrom
brendan/integration-tests-ci

Conversation

@brendanjryan
Copy link
Copy Markdown
Collaborator

@brendanjryan brendanjryan commented Apr 16, 2026

Summary

Align sponsored Tempo transaction construction with fee-payer policy limits, and finish the live integration harness cleanup.

What changed

  • Cap sponsored max_priority_fee_per_gas to the chain's fee-payer policy when building 0x78 envelopes
  • Add a regression test covering sponsored priority fee capping on a custom/dev chain
  • Extend live integration coverage for hash verification memo binding
  • Remove stale xfails now that the live devnet behavior has changed
  • Fix the premium integration scenario to leave room for gas when the faucet-funded account pays fees in the same token

Why

  • The live fee-payer integration was failing on devnet because the client copied eth_gasPrice into max_priority_fee_per_gas, which exceeded the sponsor policy on chain 1337
  • Two integration xfails had become stale: wrong-memo rejection now fails earlier during payload validation, and auto-generated attribution memos now verify successfully when the server omits an explicit memo
  • The premium integration test was spending the full faucet balance, so the transaction reverted once gas was included

Validation

  • uv run ruff check src/mpp/methods/tempo/client.py tests/test_tempo.py tests/test_tempo_integration.py
  • uv run pyright
  • uv run pytest tests/test_tempo.py -v
  • TEMPO_RPC_URL=http://localhost:8545 uv run pytest tests/test_tempo_integration.py -m integration -v

Integration result: 18 passed

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21eab7c5ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
run: docker compose up -d --wait

- name: Run integration tests
run: uv run pytest -m integration -v --timeout=120
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run Redis-marked tests in CI integration job

The integration workflow now executes pytest -m integration, but tests/test_stores_redis_integration.py uses the redis marker (not integration), and this commit also deletes tests/test_stores_redis.py. That leaves RedisStore behavior untested in CI (test skips without REDIS_URL, integration excludes non-integration markers), so Redis regressions can merge without detection.

Useful? React with 👍 / 👎.

Comment thread src/mpp/methods/tempo/client.py Outdated
account: TempoAccount | None = None,
fee_payer: TempoAccount | None = None,
chain_id: int | None = None,
chain_id: int = CHAIN_ID,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep custom rpc_url usable without forcing mainnet chain_id

Defaulting tempo() to chain_id=4217 makes calls like tempo(rpc_url="...", intents=...) implicitly mainnet-bound. That default is propagated into request methodDetails.chainId and client chain-ID validation, so custom/devnet RPC endpoints on non-4217 chains now fail unless callers add an explicit chain_id, which is a regression from the previous None default behavior.

Useful? React with 👍 / 👎.

@brendanjryan brendanjryan force-pushed the brendan/integration-tests-ci branch from b43f11a to 059aa38 Compare May 2, 2026 18:25
@brendanjryan brendanjryan changed the title ci: run integration tests against live Tempo container, remove mocks fix: align sponsored tempo tx fees with policy May 2, 2026
@brendanjryan brendanjryan merged commit aa3ea3c into main May 2, 2026
11 checks passed
@brendanjryan brendanjryan deleted the brendan/integration-tests-ci branch May 2, 2026 18: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