test(sdk): add cross-language SDK parity CI and fix MatchResult nullables#1578
test(sdk): add cross-language SDK parity CI and fix MatchResult nullables#1578AbhilashG12 wants to merge 4 commits into
Conversation
PR Review: FAILWhat This DoesAdds a GitHub Actions SDK parity check plus a local Blast RadiusGitHub Actions, root package scripts/dependencies, package-lock metadata, new validation scripts, and TypeScript Consumer VerificationBefore (base branch): After (PR branch): However, a clean metadata check shows the PR did not commit the required root lockfile updates. Running: npm install --package-lock-only --ignore-scriptsproduces a non-empty because the root script depends on an executable not available from the committed root package metadata/lock state. Test Results
Findings
PMXT Pipeline Check
Semver Impactpatch -- test/CI hardening plus type nullability corrections. RiskThe parity validator itself currently ignores missing TS/Python models with warnings, so it is useful for nullable-field drift but not a complete SDK-surface parity gate. The blocking issue is the stale/incomplete root dependency metadata. |
|
Fixes applied: Added tsx explicitly to the root devDependencies. Ran a clean root install to sync and commit the updated package-lock.json metadata for the new dependencies (tsx, yaml, @types/node). Fresh checkouts should now resolve all binaries and pass npm run check:sdk-parity cleanly. Let me know if you need any other adjustments to the validator! |
Opening this as a draft/proof-of-concept to accompany the discussion in Discord. I wanted to see if an AST-based approach would cleanly map to our
openapi.yamlwithout needing to spin up the sidecar or block current workflows. Feel free to review the architecture when you have a moment!Description
This PR introduces a strict CI guardrail to prevent cross-language SDK drift, directly addressing the root cause of recent type mismatches (like #1057 and #1418).
Instead of playing whack-a-mole with nullable/required field mismatches, this adds an automated validator that enforces the
openapi.yamlschema as the absolute source of truth.Architecture
openapi.yaml.typescriptcompiler API.astmodule (no imports or sidecar required).Fixes Included
On the first run, the parity engine caught existing schema drift in the TypeScript SDK. This PR includes the fixes for those models to ensure CI passes immediately:
MatchResult(updatedreasoning,bestBid,bestAskto allow null).PriceComparison(updatedreasoning,bestBid,bestAskto allow null).Note: Existing models not yet unified in the TS SDK are safely logged as warnings so this check does not block current development while we enforce the standard moving forward.