test(mcp): fix summary_available time-bomb tests (main red as of 2026-07-01)#84
Merged
Merged
Conversation
…bomb)
orientation_pack_dossier_summary_available_{true_when_cached,false_on_stale_cache_key}
seeded a summary-cache row at created_at 2026-01-01 but ran orientation_pack
under the real wall clock. summary_available is true only when the cached row
is within the 180-day cache horizon (summary_cache_expired), so on 2026-07-01
(181 days later) the true-case flipped to false and the test began failing on
main despite unchanged code. The false-case still passed but for the wrong
reason (incidental expiry masking the model_tier key-mismatch it means to test).
Both tests now inject a fixed clock (2026-01-02, one day after the seed) via
ServerState::with_clock — the same pattern state_for_summary already uses — so
freshness is deterministic and the tests isolate what they actually assert
(key match / key mismatch). No production-code change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
mainis red as of 2026-07-01 — two tests began failing overnight with no code change.orientation_pack_dossier_summary_available_true_when_cached(and its_false_on_stale_cache_keysibling) seed a summary-cache row atcreated_at: 2026-01-01but runorientation_packunder the real wall clock.summary_availableis true only when the cached row is within the 180-day cache horizon (summary_cache_expired). 2026-01-01 + 180d = 2026-06-30 (last green day); on 2026-07-01 (181 days) the true-case flips to false → failing. The false-case still passed but for the wrong reason (incidental expiry masking themodel_tierkey-mismatch it means to test).Fix: both tests inject a fixed clock (
2026-01-02, one day after the seed) viaServerState::with_clock— the patternstate_for_summaryalready uses — so freshness is deterministic and each test isolates the key-match/mismatch it actually asserts. No production-code change.Full workspace
nextestgreen (1977 passed) confirms these two were the only date-dependent failures. Unblocksmainand every open PR.🤖 Generated with Claude Code