Skip to content

ttl: split cache logging into explicit read/write hit/miss/corruption events #223

@kdy1

Description

@kdy1

Summary

Cache logging is currently summarized via a single event path, making read/write lifecycle and corruption transitions harder to observe.

Evidence

Contract Evidence:

  • docs/project-ttl.md:182
  • cmds/ttlc/internal/compiler/service.go:500

Current Gap

Cache logging is currently summarized via a single event path, making read/write lifecycle and corruption transitions harder to observe.

Proposed Scope

  • Not documented yet.

Acceptance Criteria

  • Split cache observability into explicit read and write event families.
  • Represent hit/miss/corruption transitions as distinct log events.
  • Preserve and populate structured fields across all cache events.
  • Add tests asserting expected cache event taxonomy.

Test Scenarios

  • Cache read miss path emits dedicated miss event.
  • Cache read corruption path emits corruption event.
  • Cache write success/failure paths emit corresponding write events.

Out of Scope

  • Changing cache-key invalidation rules.
  • Replacing slog with another logging framework.

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