Skip to content

test(mcp): fix summary_available time-bomb tests (main red as of 2026-07-01)#84

Merged
tachyon-beep merged 1 commit into
mainfrom
fix/summary-available-test-timebomb
Jul 1, 2026
Merged

test(mcp): fix summary_available time-bomb tests (main red as of 2026-07-01)#84
tachyon-beep merged 1 commit into
mainfrom
fix/summary-available-test-timebomb

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

main is 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_key sibling) seed a summary-cache row at created_at: 2026-01-01 but run 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). 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 the model_tier key-mismatch it means to test).

Fix: both tests inject a fixed clock (2026-01-02, one day after the seed) via ServerState::with_clock — the pattern state_for_summary already uses — so freshness is deterministic and each test isolates the key-match/mismatch it actually asserts. No production-code change.

Full workspace nextest green (1977 passed) confirms these two were the only date-dependent failures. Unblocks main and every open PR.

🤖 Generated with Claude Code

…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>
@tachyon-beep tachyon-beep merged commit 3b9724f into main Jul 1, 2026
4 checks passed
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