Skip to content

fix(tempo): keep absent and empty KeyAuthorization limits distinct - #506

Merged
jxom merged 3 commits into
mainfrom
claude/tempo-key-authorization-limits
Oct 8, 2026
Merged

jxom merged 3 commits into
mainfrom
claude/tempo-key-authorization-limits

Conversation

@jxom

@jxom jxom commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

No description provided.

`toTuple` encoded skipped `limits` as `[]` whenever call scopes followed,
which the node decodes as `Some([])` (deny-all), so an unlimited scoped key
became a deny-all key. `fromTuple` dropped an explicit `[]`, so a deny-all
key re-encoded as unlimited. Both now match the node: absent is `0x80`
(or omitted), explicit empty is `0xc0`. Adds node-encoded vectors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F3D21FWys7Bt3YdQhgH8vn
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ox Error Error Oct 8, 2026 12:09am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T00:06:55.021556Z 12ff143 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/ox@506

commit: 12ff143

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

Copy link
Copy Markdown

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: c3b4e74ee9

ℹ️ 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 src/tempo/KeyAuthorization.ts Resolved
Comment thread src/tempo/KeyAuthorization.ts Resolved
Comment thread src/tempo/KeyAuthorization.test.ts Resolved
Widened the limits and calls tuple slots to include the `'0x'` placeholder,
documented `undefined` (unlimited) versus `[]` (deny-all) on `limits`, and
moved the node-vector tests into their function suites.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F3D21FWys7Bt3YdQhgH8vn
The scope rejection tests built keys without `limits`, which previously
encoded as deny-all, so the node refused them for spending rather than
scope. Unlimited scoped keys now reach execution, where out-of-scope calls
revert. Assert the reverted receipt, and have the wrong-contract case call a
token the account can spend from, so the revert isolates the scope check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01F3D21FWys7Bt3YdQhgH8vn

jxom commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Verify / Test Runtime (tempo, env: localnet, tag: edge) failed because of this change. The four scope-rejection e2e tests (rejects transfer to wrong contract, rejects approve when only transfer is scoped, rejects transfer to wrong recipient, rejects any call when scopes = []) built keys without limits. The old encoding turned those into deny-all keys, so the node refused the transactions because of the spending limit, not the scope. Now that the keys are correctly unlimited, the node mines the out-of-scope call and it reverts (status: 0x0).

12ff143 changes those tests to assert a reverted receipt. The wrong-contract case used to call a token the account holds no balance of, so it reverted even without a scope. It now scopes the key to token2 and calls token1. As a control, I removed the scopes from all four tests: each transaction then succeeds, so with the scopes in place the revert comes from the scope check. Locally against ghcr.io/tempoxyz/tempo:edge, all 26 e2e tests pass and tempo-unit passes (669 tests). #507 has the same change.


Generated by Claude Code

@jxom
jxom merged commit ce81454 into main Oct 8, 2026
15 of 16 checks passed
@jxom
jxom deleted the claude/tempo-key-authorization-limits branch October 8, 2026 00:19
@github-actions github-actions Bot mentioned this pull request Oct 8, 2026

This branch had an error being deployed

1 failed deployment
Preview — 12ff1435 Deployed Oct 8, 2026 by vercel[bot]
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.

2 participants