ci: fix @types/node resolution in CI and add OpenSSF Scorecard#8
Merged
Conversation
The strict typecheck failed in CI with TS2591 "Cannot find name 'process'" because @types/node global types were not auto-included in the runner's environment. Explicitly set compilerOptions.types to ["node", "jest"] so the node and jest ambient globals load deterministically (ts-jest shares this config, hence jest is included). Also add an OpenSSF Scorecard workflow that publishes results, which powers the Scorecard badge (previously "invalid repo path" because no analysis had run). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The snapshot test failed in CI because the DEV personal-stage disambiguator defaults to process.env.USER (e.g. 'runner' in Actions vs a developer's username locally), so synthesized resource names differed from the committed baseline. Pin USER='test' in both test files and regenerate the snapshots so the suite is reproducible everywhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
CI was failing on
main(the source of the red CI badge): the strict typecheck reportedTS2591: Cannot find name 'process'because@types/nodeglobal types were not being auto-included in the GitHub runner environment.Fixes
compilerOptions.typesto["node", "jest"]so node + jest ambient globals load deterministically across environments (ts-jest shares this config, so jest is included to keep tests typing)..github/workflows/scorecard.ymlthat runs Scorecard andpublish_results: true, which populates the public Scorecard API and turns the invalid repo path badge green.Verified locally
tsc --noEmit✅jest— 16 tests, 5 snapshots ✅🤖 Generated with Claude Code