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
- #1 With a checkpoint older than delivery.log_max_record_age, the next window starts at now minus the horizon, no record older than the horizon is emitted, and the skipped span is counted in a self-obs counter with the collector as an attribute plus one WARN log
- #2 initial_lookback larger than the horizon is clamped (Warnings() flags it) for poll and object-store paths
- #3 keys.go uses the shared key instead of lifecycleEventHorizon with unchanged default behaviour; 0 disables the clamp everywhere
- #4 The key is in config.schema.json, Helm values/schema, the env loader, docs/configuration.md and config.example.yaml; the new counter is in the catalog with a disposition
Definition of Done
- #1 just check passes (the full gate; it is what CI enforces)
- #2 just gen leaves no diff (only if a generated artifact’s inputs changed)
- #3 just –fmt –check passes and every new recipe has a # doc comment and a [group(…)]
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.