Skip to content

no-cache fallback and cache timestamps violate provenance contracts #20

Description

@eneskemalergin
  • Labels: bug, robustness
  • Priority: P1
  • Target version: v0.5.1
  • Owner: eneskemalergin

Problem. --no-cache skips normal reads and writes but still calls read_cache_stale() after a network failure. _audit_single() also assigns fetched_at at audit start, including full cache hits, so the database cannot distinguish response retrieval time from audit time. Project and file endpoints may come from different snapshots without a specific mixed-provenance warning.

Impact. An explicit no-cache request can consume local state, and stored timestamps can make old responses appear newly fetched. Mixed endpoint snapshots can be presented as one reproducible audit.

Root cause. Cache mode is represented by separate booleans rather than an enforced read/write/fallback policy, and the cache envelope stores no response retrieval timestamp.

Approach. Define cache modes centrally. --no-cache makes zero cache calls. --refresh may use stale fallback under the documented outage policy. Preserve response retrieval timestamps in cache metadata, record audit time separately only if named as such, and warn when endpoint snapshots differ.

Phase 7 coverage. All Workstream 3 tasks and checks.

Metadata

Metadata

Labels

bugSomething isn't workingrobustnessTaking extra step to ensure robustness

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions