ci: automate typed-data checks and clarify v1 semantics - #12
Merged
Merged
Conversation
Run the existing build, coverage, corpus-regeneration guards and approval example on a hosted runner, followed by the locked native BLS comparison. Add a Node-native corpus check against both the TypeScript encoder and the actual compiled package entrypoint. Pin accepted digests/intermediates and rejected error codes to the frozen vectors without a test-runner transform. This checks the local build, not the published JSR artifacts. Fixes #11 Reported-by: ichbindas <54631150+ichbindas@users.noreply.github.com>
Require the trusted origin to be at least as prominent as the caller's application label, and recommend impersonation warnings without treating labels or a missing warning as authentication. Clarify that contract-scoped applications need their expected non-zero contract, while omitted/all-zero values remain valid digest inputs. Document dynamic arrays as requiring a new scheme identifier. No encoding, signature, acceptance, vector or package-version changes. Fixes #10 Reported-by: ichbindas <54631150+ichbindas@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified.
Pull request overview
Automates CI validation and clarifies typed-data v1 semantics without changing runtime encoding or fixtures.
Changes:
- Adds source/build corpus parity checks.
- Adds pinned GitHub Actions CI with native BLS validation.
- Documents origin prominence, contract scoping, and dynamic-array semantics.
File summaries
| File | Summary |
|---|---|
scripts/check-built-vectors.mjs |
Compares source and compiled corpus behavior. |
README.md |
Documents the validation workflow. |
package.json |
Adds the corpus check to CI. |
docs/typed-data-v1.md |
Clarifies v1 semantics and signer disclosures. |
CHANGELOG.md |
Records the unreleased changes. |
.github/workflows/ci.yml |
Defines automated CI checks. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The first hosted CI run took 16.8 seconds for the cloned-struct budget case, exceeding its 15-second deadline. The neighboring empty-struct boundary case took 13.6 seconds and had the same narrow deadline. Raise only those two existing custom test deadlines to 60 seconds. Keep every input, traversal budget, assertion and production byte intact; these tests enforce structural limits, not a wall-clock performance SLA. Refs #11
Match Connect's self-hosted runner policy: run main pushes and non-draft, same-repository pull requests on core. Include ready_for_review so a draft becoming ready starts the checks without requiring another push. Document that fork and draft PRs are skipped, and that the workflow guard is not a sandbox or a substitute for reviewing external workflow changes. Keep every existing check, action pin, read-only permission and timeout. Refs #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Address #11 and #10 in two scoped commits, preserving their separate history. Reported by @ichbindas. Follow-up commits fix the test timeout and select the shared
corerunners.corerunners for pushes tomainand non-draft, same-repository pull requests. Fork/draft PRs are skipped; marking a same-repository draft ready triggers CI. Reuse the existing build, coverage, vector-regeneration guards, approval example and locked Rust BLS comparison. The workflow uses pinned actions, read-only permissions and no persisted checkout credentials.npm run ci: both encoders must match the frozen digests, intermediates and rejection codes through all three hash APIs, without Vitest transforms.domain.name, recommend impersonation warnings without implying authentication, clarify non-zero expected contracts for contract-scoped applications, and explain why dynamic arrays require a new scheme identifier.Fixes #11
Fixes #10
Validation
Current-head CI: run 35091509063 passes on
92c87bc, assigned todusk-runner-10with labelcore. All stages actually executed: 191 tests, 14 accept +22 reject source/build vectors, 16 BLS/SQLite example checks, and 5 locked native BLS vectors. The actual PR test-merge tree matches the candidate.Local checks on the candidate:
npm run ci: 191 tests / 5 files, 14 accept + 22 reject vectors through source and compiled code, 16 real BLS/SQLite application checks.npm run test:bls-nativewith stable Rust and an isolated target directory: all 5 frozen BLS vectors match the locked Rust emitter.actionlint, package dry run and committed-range whitespace checks passed.Scope
No runtime source, encoding, input-validity, signature/tag/DST, vector, dependency, lock, export or version changes. All 41 fixture files remain byte-identical; the package remains
0.1.0-rc.0and v1 remains draft, not frozen.Omitted/all-zero contracts remain valid digest inputs; contract scoping belongs to relying-application policy. The source/build check does not establish published JSR/bridge parity or independent encoder interoperability. Native checks cover BLS, not a separate typed-data encoder. The disclosure additions specify signer-UI obligations; this PR does not change or certify Wallet UI compliance. No release is included.
CI timeout follow-up (prior GitHub-hosted run)
The first hosted run hit the existing 15-second deadline after 16.8 seconds of covered full-budget struct hashing.
13f70b6raises only the two existing custom test deadlines to 60 seconds (three cases), preserving every workload, assertion and encoder limit. Other test and job deadlines are unchanged.Hosted CI run 35089918634 passes on
13f70b6: 191 tests, 14 accept + 22 reject source/build vectors, 16 real BLS/SQLite example checks, and 5 locked native BLS vectors. The formerly failing case took 15.9 seconds, still above its old deadline. The actual PR test-merge tree matches the candidate exactly.Fresh local checks also pass. An isolated wrong-error-code mutation makes all three affected covered cases fail on their assertions, not a timeout; restoring the source passes all three. No runtime code or test assertions were changed.