Skip to content

fix(lint): exempt retired claims from stale check - #484

Merged
plind-junior merged 1 commit into
vouchdev:testfrom
Steve-too:fix/lint-exempt-retired-stale
Jul 15, 2026
Merged

fix(lint): exempt retired claims from stale check#484
plind-junior merged 1 commit into
vouchdev:testfrom
Steve-too:fix/lint-exempt-retired-stale

Conversation

@Steve-too

Copy link
Copy Markdown
Contributor

Summary

vouch lint was the odd one out: metrics.py and digest.py both already exempt retired statuses (superseded/archived/redacted) from their stale checks, with comments explicitly describing this as lint's intended behaviour. Lint was running the stale check over every claim with no status guard, producing stale_claim warnings for retired claims — non-actionable noise since retired claims are terminal and not expected to be refreshed.

Changes

  • Add _RETIRED_CLAIM_STATUSES to health.py (mirrors the constant in digest.py and the local set in metrics.py)
  • Wrap the stale-claim check in lint() with if c.status not in _RETIRED_CLAIM_STATUSES
  • Two new tests: retired claims are exempt, active claims are still flagged

Repro

Register a source, add an archived claim whose updated_at is older than the freshness window (e.g. 400 days). vouch lint emits a stale_claim finding; vouch metrics and vouch digest do not.

Closes #478

vouch lint was the odd one out: metrics.py and digest.py both already
exempt retired statuses (superseded/archived/redacted) from their stale
checks, with comments explicitly describing this as lint's intended
behaviour. This makes lint consistent with its siblings.

Closes vouchdev#478
@coderabbitai

coderabbitai Bot commented Jul 15, 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: 1f83a3cf-d4d1-40ed-80e4-85002346b399

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 tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 15, 2026
@plind-junior
plind-junior merged commit 49cbeff into vouchdev:test Jul 15, 2026
9 checks passed
luciferlive112116 added a commit to luciferlive112116/vouch that referenced this pull request Jul 15, 2026
the fix landed in vouchdev#484 without a changelog entry, and the
`## [Unreleased]` / `### Fixed` section is what the next release notes
are rolled from — a user-visible behaviour change (lint stops emitting
`stale_claim` warnings for retired claims) would otherwise ship
undocumented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants