Skip to content

fix(cache): preserve history for same-minute refreshes #237

Description

@Jamie-BitFlight

Current-main reconciliation — 2026-09-29

Still valid as written. Current fetch_or_cached still allocates {page_name}-{YYYY-MM-DD-HHMM}.md; changed content arriving twice within the same minute can therefore reuse the same path. Keep this issue open.

Problem

Cache filenames have minute precision. Two changed refreshes in the same minute
can overwrite the earlier pair while reporting REFRESHED, violating the
retained-history contract.

Required outcome

Allocate collision-safe paths for changed same-minute content while keeping
legacy minute filenames readable and latest ordering correct. The PR may choose
the smallest allocation mechanism that satisfies the contract.

Acceptance

  • Two changed responses within one minute return REFRESHED at distinct paths.
  • Both Markdown/sidecar pairs remain intact.
  • find_latest selects the newer result.
  • Equal-clock/collision and legacy-filename cases are explicit.

Non-goals

  • Do not prescribe a sub-minute timestamp format in the issue.
  • Do not change identical-content classification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions