Skip to content

test(stale-fixture): cover the primary models candidate serving a stale fixture - #661

Merged
jpr5 merged 1 commit into
mainfrom
test/stale-fixture-primary-candidate
Dec 3, 2026
Merged

jpr5 merged 1 commit into
mainfrom
test/stale-fixture-primary-candidate

Conversation

@jpr5

@jpr5 jpr5 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

This adds the primary-candidate test from #650 by @joei4cm, with their authorship kept on the commit.

#651 fixed stale-fixture marking on the OpenRouter models fallback, but our test only covers a later candidate winning. Their test covers the first candidate (models[0]) serving a stale fixture: the journal entry gets staleFixture and exactly one STALE FIXTURE warning is logged. It ports over unchanged. It runs through a real recording server and a replay server, so it doesn't need the helper from their PR.

On main: passes. The full src/__tests__/stale-fixture.test.ts file passes too (25/25).

✓ stale fixture detection (#638) > flags a stale fixture when the primary OpenRouter candidate wins
Tests  1 passed | 24 skipped (25)

With copyStaleFixtureMark(probe, body) commented out in src/server.ts: fails, so the test guards the fix.

× stale fixture detection (#638) > flags a stale fixture when the primary OpenRouter candidate wins
AssertionError: expected undefined to deeply equal { expected: '2fb4ea5f453cee78', …(1) }
Tests  1 failed | 24 skipped (25)

Test only, so there is no CHANGELOG entry. Prettier, eslint and typecheck are clean.

Thanks @joei4cm for the test.

…le fixture

Ported from #650. When the first candidate in an OpenRouter models list
serves a stale fixture, the journal entry carries staleFixture and the
STALE FIXTURE warning is logged. The existing fallback test only covers a
later candidate winning.
@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: f0a9016

@jpr5
jpr5 merged commit 3271bdf into main Dec 3, 2026
30 checks passed
@jpr5
jpr5 deleted the test/stale-fixture-primary-candidate branch December 3, 2026 22:23
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.

2 participants