test(test-vectors): add differential harness across sdk versions#163
Open
DSOTec wants to merge 2 commits into
Open
test(test-vectors): add differential harness across sdk versions#163DSOTec wants to merge 2 commits into
DSOTec wants to merge 2 commits into
Conversation
No safety net today catches a version bump that silently changes cryptographic output for existing inputs — semver numbers alone don't verify actual behavior. Add differential.ts: it installs the pinned reference version (vN-1, named in differential.config.json) into a throwaway directory, runs every vectors/stellar.json fixture through both that build and the workspace tip via the shared differential-runner.mjs, and diffs the outputs field by field. Unwaived diffs fail the run; waivers in differences.json require a non-empty reason and the script refuses to run without one. Running the harness for real against the pinned reference (1.3.0) surfaced two genuine issues: - generateStealthAddress's default view-tag scheme changed (legacy prefix to the domain-separated v2 prefix) in commit f7def68 (PR wraith-protocol#93), before the 1.4.0 minor, without a major bump. This is a real, already-shipped protocol change — documented and waived in differences.json with the commit reference, exactly the kind of entry this file exists to hold. - signWithScalar had a leftover debug `console.log` that wrote to stdout on every signing call, corrupting the runner's JSON-over-stdout protocol (and explaining the stray "SCALAR:" noise in the existing test output). Removed it. Wire a `differential` job into ci.yml that runs on every PR touching src/chains/** (via dorny/paths-filter) and unconditionally on push to main/develop, so the acceptance criterion of a green run on develop is checked directly rather than assumed. Closes wraith-protocol#132
|
@DSOTec Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
No safety net today catches a version bump that silently changes cryptographic output for existing inputs — semver numbers alone don't verify actual behavior. Add differential.ts: it installs the pinned reference version (vN-1, named in differential.config.json) into a throwaway directory, runs every vectors/stellar.json fixture through both that build and the workspace tip via the shared differential-runner.mjs, and diffs the outputs field by field. Unwaived diffs fail the run; waivers in differences.json require a non-empty reason and the script refuses to run without one.
Running the harness for real against the pinned reference (1.3.0) surfaced two genuine issues:
console.logthat wrote to stdout on every signing call, corrupting the runner's JSON-over-stdout protocol (and explaining the stray "SCALAR:" noise in the existing test output). Removed it.Wire a
differentialjob into ci.yml that runs on every PR touching src/chains/** (via dorny/paths-filter) and unconditionally on push to main/develop, so the acceptance criterion of a green run on develop is checked directly rather than assumed.Closes #132