Skip to content

fix(health): exempt retired claims from the lint stale check#479

Open
luciferlive112116 wants to merge 1 commit into
vouchdev:testfrom
luciferlive112116:fix/lint-retired-stale
Open

fix(health): exempt retired claims from the lint stale check#479
luciferlive112116 wants to merge 1 commit into
vouchdev:testfrom
luciferlive112116:fix/lint-retired-stale

Conversation

@luciferlive112116

Copy link
Copy Markdown
Contributor

what changed

health.lint (vouch lint) ran its stale-claim check over every claim
with no status guard. it now exempts retired statuses
(superseded / archived / redacted) from that check, matching
vouch metrics and vouch 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_claim past 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 would
    still trust"
    / "retired claims are intentionally exempt — they're not
    expected to be refreshed."
  • digest.py: "same freshness anchor and thresholds as vouch 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 doctor simply stop emitting stale_claim findings for
already-retired claims — active claims are still flagged exactly as before, so
report.ok is unchanged (stale was a warning, never an error). the only
observable difference is fewer non-actionable warnings.

tests

  • tests/test_health.py::test_lint_exempts_retired_claims_from_stale — a
    retired claim past the window is not flagged while an active one still is.
    fails on the previous code, passes now.
  • ran locally: pytest tests/test_health.py tests/test_metrics.py tests/test_digest.py, ruff check src tests, mypy src
    (health.py clean).

`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.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a9a7f0aa-1df6-4ab1-8b70-1aafaa9c272c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance size: S 50-199 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant