Skip to content

fix(cch): make seed check CI version-agnostic and extract all missing versions#279

Merged
BYK merged 2 commits into
mainfrom
fix/cch-seed-check-ci
May 13, 2026
Merged

fix(cch): make seed check CI version-agnostic and extract all missing versions#279
BYK merged 2 commits into
mainfrom
fix/cch-seed-check-ci

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 13, 2026

Summary

The CCH Seed Check workflow has failed on all 7 runs since creation because:

  1. Tests hardcoded "2.1.138" as WORKER_VERSION, breaking when --apply updated it to 2.1.140
  2. Only the latest npm 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 from VERSION_SEEDS/WORKER_VERSION instead of hardcoded strings. Keep 2.1.37 and 2.1.138 exact-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-pin flag for --apply mode (adds seed without updating WORKER_VERSION). Fix formatting bug where new entries landed on the same line.
  • .github/workflows/cch-seed-check.yml — Extract the latest version first (pinning WORKER_VERSION), then backfill intermediate versions with --no-pin. Single PR covers all extracted versions.

Verification

  • 58/58 CCH tests pass with original cch.ts
  • 58/58 pass after simulating --apply of 2 new versions (2.1.139 backfill + 2.1.140 pinned)
  • Typecheck passes across all 4 packages

BYK added 2 commits May 13, 2026 08:45
… 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
@BYK BYK merged commit 46d3b48 into main May 13, 2026
7 checks passed
@BYK BYK deleted the fix/cch-seed-check-ci branch May 13, 2026 09:06
This was referenced May 13, 2026
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.

1 participant