Skip to content

SK-2778: Add contract testing via api-extractor snapshot#301

Merged
saileshwar-skyflow merged 3 commits intomainfrom
saileshwar/SK-2778-contract-testing
May 5, 2026
Merged

SK-2778: Add contract testing via api-extractor snapshot#301
saileshwar-skyflow merged 3 commits intomainfrom
saileshwar/SK-2778-contract-testing

Conversation

@saileshwar-skyflow
Copy link
Copy Markdown
Collaborator

Why

  • The SDK has no automated guard against accidental public API regressions. A developer could rename a method (e.g. setReturnTokens → setTokens), write passing unit tests, and ship a breaking change to customers without any CI signal. This adds a contract testing layer that treats the public API surface as a versioned artifact.

Outcome

  • api-report/skyflow-node.api.md is committed as the baseline snapshot of every exported class, method signature, interface, and type in the SDK

  • A new Contract Tests GitHub Actions workflow runs on every PR to main and release/*, building the project and comparing the fresh API surface against the committed baseline — failing immediately if anything changes

  • Two npm scripts added: contract-snapshot (developer updates baseline after an intentional API change) and contract-snapshot-verify (what CI runs)

  • Any future rename, removal, or signature change on a public symbol is caught before merge, not after customer complaints

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@saileshwar-skyflow saileshwar-skyflow merged commit 55894eb into main May 5, 2026
7 checks passed
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.

3 participants