Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0e9867b04
ℹ️ 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".
| const receipt = loadFixture("receipt_valid_v1.json"); | ||
| const result = await verifyReceipt(receipt, { publicKey }); |
There was a problem hiding this comment.
Exercise key rotation in key-rotation test
This test never simulates a rotated key: it only loads a v1 receipt and verifies it with a fixed v1 public key, without ENS lookup or any v2 key state. As a result, regressions in key-rotation behavior (for example, resolver behavior when a newer key/kid is present) would still pass while this test claims to validate the post-rotation path, which gives false confidence for a security-sensitive flow.
Useful? React with 👍 / 👎.
| const repoRoot = path.resolve(__dirname, "../.."); | ||
|
|
||
| export function loadFixture(name) { | ||
| const fixturePath = path.join(repoRoot, "test_vectors", name); |
There was a problem hiding this comment.
Trigger CI when shared fixture files change
The new test helpers now depend on repo-root test_vectors, but the current workflow path filters I checked (.github/workflows/typescript-sdk-cli-smoke.yml and .github/workflows/python-sdk-tests.yml) only trigger on typescript-sdk/** and python-sdk/**. A change that touches only test_vectors/* will skip both SDK test jobs, so broken shared fixtures can merge without validation and fail later on unrelated PRs.
Useful? React with 👍 / 👎.
Motivation
Description
test_vectors/directory with fixtures:receipt_valid.json,receipt_invalid_sig.json,receipt_wrong_kid.json,receipt_malformed_pubkey.json,receipt_valid_v1.json,expected_hash.txt, andpublic_key_base64.txt.runtime/tests/(ens-resolution.test.mjs,key-resolution.test.mjs,receipt-verification.test.mjs,key-rotation.test.mjs) that exercise ENS TXT resolution and receipt verification using the shared fixtures.typescript-sdk/tests/(helpers.mjs,ens-delegation.test.mjs,canonicalization.test.mjs,security-cases.test.mjs) and a small test runnertypescript-sdk/scripts/template-tests.mjsto run runtime + SDK template suites vianode --test.python-sdk/tests/test_verification.pythat consumes the shared fixtures and checks parsing, ENS lookup failure modes, malformed keys, and wrong-kid policy checks.typescript-sdk/package.jsonscripts so unit tests build first and include the new template test runner (test:unitnow runs build + unit + template suites) and addedtest:template.Testing
npm testintypescript-sdk/which builds the package, runs unit assertions and the template runner (runtime + TS template suites) and completed successfully with all template and unit checks passing.pytestinpython-sdk/with the newtest_verification.pyfile and the suite passed (17 passed, 1 warning).node --test) and passed against the mocked ENS helper resolver.Codex Task