CompletionCache has no test suite at all. Untested behaviours that are easy to break:
- TTL boundary in
clubsStale (CompletionCache.scala:37-44)
seedClubs no-op-when-file-exists plus the deliberate epoch-0 mtime stamp (:68-77)
writeClubs truncate semantics and the empty-list trailing-newline branch (:57-61)
appendJob dedup + MaxRecentJobs cap (:80-87)
Separately, CompletionCache.scala:41 uses Instant.now() rather than Clock.instant, so it bypasses ZIO's TestClock — the TTL boundary can't be tested deterministically as written. Switch it, per the repo's determinism stance (#65).
Also worth adding while nearby:
CompletionCachehas no test suite at all. Untested behaviours that are easy to break:clubsStale(CompletionCache.scala:37-44)seedClubsno-op-when-file-exists plus the deliberate epoch-0 mtime stamp (:68-77)writeClubstruncate semantics and the empty-list trailing-newline branch (:57-61)appendJobdedup +MaxRecentJobscap (:80-87)Separately,
CompletionCache.scala:41usesInstant.now()rather thanClock.instant, so it bypasses ZIO'sTestClock— the TTL boundary can't be tested deterministically as written. Switch it, per the repo's determinism stance (#65).Also worth adding while nearby:
current_clubcase inTestClubResolverTestRoutescase for an existing-but-unmanaged club (see Gate job submission on managed status (JobRoutes.submitClubJob) #177)TestConfigWritercase for clearingcurrent_club(see 'club remove' silently leaves a stale current_club, and jobs still run against the removed club #174)