fix(health): exempt retired claims from the lint stale check#479
Open
luciferlive112116 wants to merge 1 commit into
Open
fix(health): exempt retired claims from the lint stale check#479luciferlive112116 wants to merge 1 commit into
luciferlive112116 wants to merge 1 commit into
Conversation
`vouch lint` ran its stale-claim check over every claim with no status guard, so a superseded/archived/redacted claim whose freshness anchor is older than `stale_after_days` was reported as a `stale_claim` warning. that is non-actionable noise: a retired claim is terminal and is not expected to be refreshed. `vouch metrics` and `vouch digest` already exempt retired statuses from the same stale notion, and both name lint as the surface they are matching. lint was the odd one out. exempt the retired statuses in `health.lint`, matching the sibling surfaces, and add a regression test that a retired claim past the window is not flagged while an active one still is.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
what changed
health.lint(vouch lint) ran its stale-claim check over every claimwith no status guard. it now exempts retired statuses
(
superseded/archived/redacted) from that check, matchingvouch metricsandvouch digest.fixes #478.
why
lint is documented as the "user-actionable problems" subset of the health
checks. a retired claim is terminal and is not expected to be refreshed, so
warning that it is
stale_claimpast the freshness window is pure noise.the two sibling surfaces that compute the same "stale" notion already exempt
retired claims, and their comments name lint as the behaviour they are
matching:
metrics.py: "matching lint, which only warns on claims a reader wouldstill trust" / "retired claims are intentionally exempt — they're not
expected to be refreshed."
digest.py: "same freshness anchor and thresholds asvouch metrics/vouch lint."lint was the odd one out; this brings it in line.
what might break
nothing on disk. no file moves, no field changes, no
kb.*shape change.vouch lint/vouch doctorsimply stop emittingstale_claimfindings foralready-retired claims — active claims are still flagged exactly as before, so
report.okis unchanged (stale was a warning, never an error). the onlyobservable difference is fewer non-actionable warnings.
tests
tests/test_health.py::test_lint_exempts_retired_claims_from_stale— aretired claim past the window is not flagged while an active one still is.
fails on the previous code, passes now.
pytest tests/test_health.py tests/test_metrics.py tests/test_digest.py,ruff check src tests,mypy src(
health.pyclean).