Repository navigation
test(stale-fixture): cover the primary models candidate serving a stale fixture - #661
Merged
Merged
Conversation
…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.
commit: |
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.
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
modelsfallback, but our test only covers a later candidate winning. Their test covers the first candidate (models[0]) serving a stale fixture: the journal entry getsstaleFixtureand 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.tsfile passes too (25/25).With
copyStaleFixtureMark(probe, body)commented out insrc/server.ts: fails, so the test guards the fix.Test only, so there is no CHANGELOG entry. Prettier, eslint and typecheck are clean.
Thanks @joei4cm for the test.