Skip to content

Matrix checker - #205

Open
midenotch wants to merge 3 commits into
wraith-protocol:developfrom
midenotch:matrix-checker
Open

midenotch wants to merge 3 commits into
wraith-protocol:developfrom
midenotch:matrix-checker

Conversation

@midenotch

Copy link
Copy Markdown

Close: #184

Here's a summary of everything that was done:

Problem root cause: check:compatibility-matrix existed in package.json and ran locally, but no CI job invoked it — so EVM address swaps, Stellar version bumps, CKB code hash changes, and SDK package version drift could all land undetected.

What changed:

check-compatibility-matrix.mjs
— extended with:

validateSdkCoreTable() — reads the "SDK core" table in the matrix and cross-checks each tracked package's version cell against package.json. Catches @wraith-protocol/sdk, @stellar/stellar-sdk, and @solana/web3.js drifting out of sync.
versionsMatch() — strips range operators (^, ~) from both sides before comparing, so ^1.4.5 in the matrix vs 1.4.5 in package.json is not a false positive.
MATRIX_CHECK_ROOT env override — lets the test harness point the checker at a fixture directory without touching the live tree.
All internal helpers exported so the unit tests can call them directly.
check-compatibility-matrix.test.mjs
— 24 tests across two layers:

16 unit tests: pure helper functions, no filesystem, fast.
7 integration tests: each spawns the checker against a tmp fixture built from the live repo files with one value mutated, asserts exit 1 and the right error message. Covers every drift vector — wrong EVM address, wrong Stellar address, wrong Stellar version, SDK version bump, CKB code hash change in owner, registry address updated without matrix update, and a pending row that should no longer be pending.
1 baseline test: confirms the live repo passes exit 0.
package.json — added test:compatibility-matrix script; added it to the test aggregate.

snippets.yml
(check-snippets job) — two new steps after Check contract registry:

Check compatibility matrix — pnpm run check:compatibility-matrix
Test compatibility matrix (regression fixtures) — pnpm run test:compatibility-matrix

@midenotch
midenotch requested a review from truthixify as a code owner October 17, 2026 21:20
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@midenotch 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! 🚀

Learn more about application limits

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking findings:

  1. This does not meet the issue's “exact installed” requirement. scripts/check-compatibility-matrix.mjs:142-145,297-327 reads dependency specifiers from package.json, strips ^ / ~, and calls those the installed versions. The lockfile actually resolves @stellar/stellar-sdk from ^13.1.0 to 13.3.0 and @solana/web3.js from ^1.95.0 to 1.98.4; the checker still accepts matrix values 13.1.0 and 1.95.0. Resolve and compare the exact versions from pnpm-lock.yaml (or installed package metadata), and add a regression fixture where the specifier stays constant while the resolved lockfile version drifts.

  2. The PR is stacked on the unmerged Rust/Solana snippet branches and is currently conflicting. Both required snippet jobs are red, so the new required check cannot land in a passing required workflow. Rebase/isolate the matrix-checker commit on current develop, remove the unrelated snippet/doc changes, and get both required jobs green.

This branch has not been deployed

No deployments
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.

[Wave 10] Run the compatibility matrix checker in docs CI

3 participants