Skip to content

test(drift): make drift-sync tests independent of recorded deprecations - #608

Merged
jpr5 merged 1 commit into
mainfrom
fix/drift-sync-tests-real-registry
Nov 9, 2026
Merged

jpr5 merged 1 commit into
mainfrom
fix/drift-sync-tests-real-registry

Conversation

@jpr5

@jpr5 jpr5 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Drift-sync's routine PR #606 (17 openai deprecations recorded in deprecatedFamilies.openai) failed CI run 42346883216 (test (20)). The tests assumed that ledger is empty. drift-sync itself works correctly; this PR changes tests only.

Root cause

  • drift-sync-core.test.ts: "a whole morning's worth of deprecations…" took its stand-ins from [...includeFamilies.openai].slice(0, 10). "recording a deprecation leaves the includeFamilies checksum pin GREEN" hard-coded gpt-4 and gpt-4-turbo. detectDeprecatedFamiliesForSync correctly drops families the real ledger already records (scripts/drift-sync.ts:450-454), so after fix(drift-sync): mechanical model-family sync (2026-11-07) #606 those stand-ins are no longer reported. Fix: derive them with unrecordedFamilies(provider, n), which is the existing anthropic-only helper made to work for any provider.
  • drift-sync-check.test.ts (same class of failure; it only showed up once fix(drift): skip the live re-collect in drift-sync-check for deprecation-only syncs #605 landed on main): the fixtures add run 42286556743's 17 deprecations on top of the real registry. Once fix(drift-sync): mechanical model-family sync (2026-11-07) #606 commits those same 17, the writer refuses to add a duplicate and the file throws at load. Fix: start from the real registry with deprecatedFamilies.openai emptied back to its comment-only shape.

RED / GREEN

  • RED (main + fix(drift-sync): mechanical model-family sync (2026-11-07) #606 diff): drift-sync-core had 2 failures: expected … to have a length of 10 but got 6 and expected [ 'gpt-4o' ] to deeply equal [ 'gpt-4', 'gpt-4-turbo', 'gpt-4o' ]. drift-sync-check failed at load with fixture: could not add gpt-3.5-turbo to deprecatedFamilies.openai.
  • GREEN: all 34 drift test files pass both with and without the fix(drift-sync): mechanical model-family sync (2026-11-07) #606 diff applied (1096 passed).
  • The tests still catch regressions (checked with fix(drift-sync): mechanical model-family sync (2026-11-07) #606 applied, in a scratch copy). Processing only the first candidate makes both core tests fail. Removing a zero-reference family from includeFamilies makes 3 tests fail. Making deprecationOnlyOutcomes bail on families that are already recorded makes 5 check tests fail.
  • Full suite passes: 487 files. Typecheck, lint, prettier, and build are clean.

drift-sync's routine PR #606 records 17 openai retirements in
deprecatedFamilies.openai, and its CI failed on tests that assume that
ledger is empty:

- drift-sync-core: two tests picked "absent" stand-ins straight from
  includeFamilies.openai (slice(0, 10); gpt-4, gpt-4-turbo). The sync
  correctly skips families the real ledger already records, so the
  expected counts no longer held. They now derive stand-ins with
  unrecordedFamilies(provider, n), the existing anthropic helper
  generalized to any provider.
- drift-sync-check: the fixtures replay run 42286556743's 17
  deprecations on top of the real registry. Once those are committed,
  the writer refuses to add them twice and the file throws at load. The
  baseline is now the real registry with deprecatedFamilies.openai
  emptied back to its comment-only shape.

No drift-sync behavior changes.
@pkg-pr-new

pkg-pr-new Bot commented Nov 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@608

commit: d1996b7

@jpr5
jpr5 merged commit ff236f8 into main Nov 9, 2026
31 checks passed
@jpr5
jpr5 deleted the fix/drift-sync-tests-real-registry branch November 9, 2026 20:55
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