Repository navigation
feat(inkless:retention): add LastSuccessfulFileCleanupAgeMs [KC-412] - #746
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a FileCleaner liveness gauge reporting time since the last successful cleanup cycle.
Changes:
- Records successful cleanup completion, including no-work cycles.
- Exposes and documents
LastSuccessfulFileCleanupAgeMs. - Tests successful and failed cycle tracking.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
FileCleaner.java |
Records successful cycle completion. |
FileCleanerMetrics.java |
Implements and registers the gauge. |
FileCleanerMockedTest.java |
Tests success and failure behavior. |
docs/inkless/metrics.rst |
Documents the new metric. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jeqo
marked this pull request as ready for review
August 13, 2026 07:54
jclarysse
enabled auto-merge (squash)
August 13, 2026 10:25
jclarysse
disabled auto-merge
August 13, 2026 10:29
reports it, but FileCleaner did not get one. Its counters are all cumulative, so a cleaner that has stopped cycling looks exactly like one with nothing to delete. Follow the same pattern as LastSuccessfulFileCommitAgeMs: record the clock at the end of every cycle that completes without error and expose the age, returning -1 until the first completion so "never ran" is distinguishable from "just ran". Cycles with no work count as successful. The gauge answers whether the cleaner is running, not whether it is deleting; delete volume is already covered by FileCleanerFilesRate. This overlaps with GetFilesToDeleteLastSuccessfulQueryAgeMs, which #735 generated for every control-plane query and which also goes stale when the cleaner stops cycling. The difference is what happens when a cycle starts but never finishes - an S3 delete stalling under throttling keeps the query gauge fresh while no cleanup completes. That case is the reason to scope this to the cycle rather than rely on the query gauge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jeqo
force-pushed
the
jeqo/file-cleaner-last-success
branch
from
August 13, 2026 10:33
18af185 to
b905ef8
Compare
jeqo
added a commit
that referenced
this pull request
Aug 19, 2026
reports it, but FileCleaner did not get one. Its counters are all cumulative, so a cleaner that has stopped cycling looks exactly like one with nothing to delete. Follow the same pattern as LastSuccessfulFileCommitAgeMs: record the clock at the end of every cycle that completes without error and expose the age, returning -1 until the first completion so "never ran" is distinguishable from "just ran". Cycles with no work count as successful. The gauge answers whether the cleaner is running, not whether it is deleting; delete volume is already covered by FileCleanerFilesRate. This overlaps with GetFilesToDeleteLastSuccessfulQueryAgeMs, which #735 generated for every control-plane query and which also goes stale when the cleaner stops cycling. The difference is what happens when a cycle starts but never finishes - an S3 delete stalling under throttling keeps the query gauge fresh while no cleanup completes. That case is the reason to scope this to the cycle rather than rely on the query gauge. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
jeqo
added a commit
that referenced
this pull request
Aug 19, 2026
reports it, but FileCleaner did not get one. Its counters are all cumulative, so a cleaner that has stopped cycling looks exactly like one with nothing to delete. Follow the same pattern as LastSuccessfulFileCommitAgeMs: record the clock at the end of every cycle that completes without error and expose the age, returning -1 until the first completion so "never ran" is distinguishable from "just ran". Cycles with no work count as successful. The gauge answers whether the cleaner is running, not whether it is deleting; delete volume is already covered by FileCleanerFilesRate. This overlaps with GetFilesToDeleteLastSuccessfulQueryAgeMs, which #735 generated for every control-plane query and which also goes stale when the cleaner stops cycling. The difference is what happens when a cycle starts but never finishes - an S3 delete stalling under throttling keeps the query gauge fresh while no cleanup completes. That case is the reason to scope this to the cycle rather than rely on the query gauge. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
jeqo
added a commit
that referenced
this pull request
Aug 19, 2026
Covers inkless-release-0.46..inkless-release-0.47. Generated via the inkless-changelog skill and curated: - Metric deltas cross-checked against source commits (#716, #735, #743, #746, #715); all trace to real, shipped metrics, no documentation catch-up noise this increment. - Postgres migration headers (V23-V26) checked for lock impact; V25 takes ACCESS EXCLUSIVE on files for a full-table scan at broker startup, V26 offers a pre-upgrade CONCURRENTLY workaround. - Added two config default changes the generator's diff-only detection missed (existing keys, not new ones): file.cleaner.interval.ms (5min -> 2min, #745) and retention.enforcement.interval.ms / max.batches.per.request (#744).
jeqo
added a commit
that referenced
this pull request
Sep 9, 2026
Covers inkless-release-0.46..inkless-release-0.47. Generated via the inkless-changelog skill and curated: - Metric deltas cross-checked against source commits (#716, #735, #743, #746, #715); all trace to real, shipped metrics, no documentation catch-up noise this increment. - Postgres migration headers (V23-V26) checked for lock impact; V25 takes ACCESS EXCLUSIVE on files for a full-table scan at broker startup, V26 offers a pre-upgrade CONCURRENTLY workaround. - Added two config default changes the generator's diff-only detection missed (existing keys, not new ones): file.cleaner.interval.ms (5min -> 2min, #745) and retention.enforcement.interval.ms / max.batches.per.request (#744).
jeqo
added a commit
that referenced
this pull request
Sep 9, 2026
Covers inkless-release-0.46..inkless-release-0.47. Generated via the inkless-changelog skill and curated: - Metric deltas cross-checked against source commits (#716, #735, #743, #746, #715); all trace to real, shipped metrics, no documentation catch-up noise this increment. - Postgres migration headers (V23-V26) checked for lock impact; V25 takes ACCESS EXCLUSIVE on files for a full-table scan at broker startup, V26 offers a pre-upgrade CONCURRENTLY workaround. - Added two config default changes the generator's diff-only detection missed (existing keys, not new ones): file.cleaner.interval.ms (5min -> 2min, #745) and retention.enforcement.interval.ms / max.batches.per.request (#744).
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.
#735 added age-of-last-success gauges so a stuck operation surfaces before a customer reports it, but FileCleaner did not get one. Its counters are all cumulative, so a cleaner that has stopped cycling looks exactly like one with nothing to delete.
Follow the same pattern as LastSuccessfulFileCommitAgeMs: record the clock at the end of every cycle that completes without error and expose the age, returning -1 until the first completion so "never ran" is distinguishable from "just ran".
Cycles with no work count as successful. The gauge answers whether the cleaner is running, not whether it is deleting; delete volume is already covered by FileCleanerFilesRate.
This overlaps with GetFilesToDeleteLastSuccessfulQueryAgeMs, which #735 generated for every control-plane query and which also goes stale when the cleaner stops cycling. The difference is what happens when a cycle starts but never finishes - an S3 delete stalling under throttling keeps the query gauge fresh while no cleanup completes. That case is the reason to scope this to the cycle rather than rely on the query gauge.