Skip to content

CompletionCache: zero test coverage and uses Instant.now() instead of Clock.instant #178

Description

@Sootopolis

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI binary (subcommands, completions, config, packaging)choreTooling, deps, config, build, cleanup

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions