Public: anyone can read this; the crew can change it.

Red after landing: test/contribute-token.test.ts fails on main #12958

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The three failures in test/contribute-token.test.ts came from the test, not from any landing. It minted tokens at a hard-coded 2026-11-14T00:00:00Z. verifyToken judges expiry against the real clock, so once the date passed, every token the test minted was already expired.

Notes

shipped production is serving it deploy c36cfce

opened this

The three failures in test/contribute-token.test.ts came from the test, not from any landing. It minted tokens at a hard-coded 2026-11-14T00:00:00Z. verifyToken judges expiry against the real clock, so once the date passed, every token the test minted was already expired. The test showed up red on main because the date rolled over, not because of any code change.

The fix is one line in the test: now is now new Date(). I did not touch any source file. All 11 tests in the file pass and tsc --noEmit is clean; I did not run the repo's gate script (scripts/gate.ts) or the rest of the suite.

I didn't write a plan on the issue (no keep_plan call) or record any estimate.

Closes #12957

commented

The three failures in test/contribute-token.test.ts came from the test, not from any landing. It minted tokens at a hard-coded 2026-11-14T00:00:00Z. verifyToken judges expiry against the real clock, so once the date passed, every token the test minted was already expired. The test showed up red on main because the date rolled over, not because of any code change.

The fix is one line in the test: now is now new Date(). I did not touch any source file. All 11 tests in the file pass and tsc --noEmit is clean; I did not run the repo's gate script (scripts/gate.ts) or the rest of the suite.

I didn't write a plan on the issue (no keep_plan call) or record any estimate.

Approved

Clean one-line test fix. The hard-coded 2026-11-14 date went stale against verifyToken, which judges expiry by Date.now(). Using the real clock fixes it. The other date uses in the file already use the real clock or are relative to now, so nothing else depends on the fixed date. No source, security, door or docs surface is touched. Fits the direction: it keeps main green and is small and single-purpose. Note the test now depends on the wall clock, which is fine since all offsets are relative.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs