fix: apply configurable retention to LLM traces - #1
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM traces previously had no scheduled retention policy, so they could grow indefinitely while other telemetry expired. Add a configurable positive
OBSERVE_LLM_RETENTION_DAYSwindow (default 30 days), clean expired traces through the existing bounded retention job, and preserve model-price history.Validation: the full Go suite with mandatory database integration, build and vet pass against the exact repaired production engine. A custom 7-day regression verifies expired/recent traces and retained pricing. A consistent live snapshot was checksum-verified and restored in isolation; the candidate accepted the existing ingestion key and rejected invalid/cross-site requests. Deployment remains pending final CI and exact-image rehearsal.
Required CI repairs exposed by this change: valid migration fixture secrets, explicit Bash invocation/workspace path, an isolated source-pinned UI workspace with frozen lockfile, built framework/CLI, and normalized build timestamps/gzip OS metadata. Application assets remain strictly freshness-checked. The obsolete Nucleus v0.1.8 full-suite job failed compatibility checks; amd64 now joins arm64 on v1.1.1, with the independent source-pinned lease gate retained. No assertions are weakened. The ingest shutdown fixture is seeded before worker start to avoid racing correct admission refusal after its intentional crash. Upstream nondeterministic metadata is documented in the private upstream ledger.