fix(cch): make seed check CI version-agnostic and extract all missing versions#279
Merged
Conversation
… versions Tests hardcoded '2.1.138' as WORKER_VERSION, breaking when --apply updated it to a newer version. All 7 CI runs failed since the workflow was created. - Make cch.test.ts version-agnostic: derive expected values from VERSION_SEEDS/WORKER_VERSION instead of hardcoded strings - Update check-cc-version.ts to find all missing versions between the highest known seed and the latest npm tag - Add --no-pin flag to extract-cch-seed.ts for backfill versions that should not update WORKER_VERSION - Rewrite workflow to extract latest version first (pinning WORKER_VERSION), then backfill intermediate versions with --no-pin - Fix formatting bug in --apply where new entries landed on same line
…or PR Address code review findings: - Add 'falls back to closest known version' test for distance logic - Fix non-null assertion style with proper type guard filter - Use 'in' operator for VERSION_SEEDS membership check (0n safety) - Use --body-file instead of heredoc to avoid backtick fragility
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.
Summary
The CCH Seed Check workflow has failed on all 7 runs since creation because:
"2.1.138"asWORKER_VERSION, breaking when--applyupdated it to2.1.140latestnpm version was extracted, missing intermediate versions (e.g. 2.1.139)Changes
packages/gateway/test/cch.test.ts— Make tests version-agnostic: derive expected values fromVERSION_SEEDS/WORKER_VERSIONinstead of hardcoded strings. Keep2.1.37and2.1.138exact-value assertions as permanent regression anchors.scripts/check-cc-version.ts— Fetch the full npm version list and identify all missing versions between the highest known seed and the latest dist-tag.scripts/extract-cch-seed.ts— Add--no-pinflag for--applymode (adds seed without updatingWORKER_VERSION). Fix formatting bug where new entries landed on the same line..github/workflows/cch-seed-check.yml— Extract the latest version first (pinningWORKER_VERSION), then backfill intermediate versions with--no-pin. Single PR covers all extracted versions.Verification
cch.ts--applyof 2 new versions (2.1.139 backfill + 2.1.140 pinned)