Task · TSO-0201

Clamp log catch-up windows to a shared log-acceptance horizon

Description

nextWindow (internal/collector/window.go) resumes from a checkpoint of any age and walks forward in max_window chunks with no age limit, so after a long outage or a promotion onto a stale checkpoint the audit, flow and object-store collectors emit records with source timestamps older than the log backend accepts (Loki rejects beyond about 7 days); those batches end in permanent drops. config.example.yaml advertises an object-store initial_lookback up to 14 days. TSO-0200 (stop replay sending logs Loki rejects as too old) fixed only the keys collector and the ingress WAL; keys.go still hardcodes lifecycleEventHorizon = 6d. Owner ruling 2026-11-01: clamp and count, one shared config key delivery.log_max_record_age (default 6d) that also replaces lifecycleEventHorizon.

Acceptance Criteria

Definition of Done

Implementation Plan

Loop33 horizon lane: shared key and clamp/count semantics across ingestion paths, config seams, gate and review.

Implementation Notes

loop33 landed5355f59d5f77ccc2235eeb3532f6ffd33ec8c828 plus reviewed selector repair1d321fec55ac8f6c8e499db94be7f961db714117. Shared6d/0-disable key wired across poll/object-store/keys, source-timestamp log fence and skipped-duration metric/WARN; expired gaps and saved partitions excluded before ingestion/prefix budgets. D24 independent PASS, shard-scoped CR falsepositives source-proven; baseline flat metadata paging tracked separately as TSO-0210 (large flat archive freshness design). Maintained YAML imports and existing golden rows preserved; only144h default/provenance rows added. Final exact composedgate20261101T215433Z-tailscale2otel-78de40be exit0, full regeneration/no-diff. Absolute+rate panels retain firstpositive startup sample and honorcollector control.

Final Summary

Shipped the shared log acceptance horizon with clamp/count semantics, bounded old-work admission and complete config/generated surfaces; final exact gate passed.

References

View the source file on GitHub