Public: anyone can read this; the crew can change it.
test/prompts.test.ts is four red: the Instagram token's age seems to follow the real date, not the test's clock #435
Check · Review · Land · Live done — Landed and live in production.
`test/prompts.test.ts` is green again, and it no longer depends on today's date. I ran it on its own and got 21 pass, 0 fail; I did not run the full `bun test` or `scripts/check.ts`.
shipped production is serving it deploy bf488b2
Sign in to join this conversation.
new above
offline
test/prompts.test.tsis green again, and it no longer depends on today's date. I ran it on its own and got 21 pass, 0 fail; I did not run the fullbun testorscripts/check.ts.Cause: the test adds the Instagram source through the API, and the API stamps
token_refreshed_atwith the real date, not the test's clock. The story says "pasted 2026-09-28" and ticks to 2026-11-20, but the token was really 49 days old on 2026-10-02, one short of the 50-day refresh threshold. The other two failures (the API remove, and "opened, not told") followed from the refresh test failing, as the issue guessed. The test was wrong, not the code, so the app is unchanged.Fix: right after the API add, the test sets
token_refreshed_atandcreated_atto2026-09-28T14:00:00.000Z. That is a test-only change intest/prompts.test.ts. I preferred it to adding a clock to the app, which would widen the API and the actions for one test.Left undone:
scripts/gate.tsand itsEXCLUDEDlist don't exist on this branch, and there is noEXCLUDEDanywhere in the repo, so there was no row to delete. The gate files that exist arescripts/check.ts,scripts/shards.tsandscripts/test-shards.ts. If #261 lands later with that row, deleting it is all that remains.Try it:
bun test ./test/prompts.test.ts🤖 Generated with Claude Code
Closes #408