Skip to content

fix(health): validate feeds against their own spec version, class failures - #43

Merged
hhkaos merged 1 commit into
mainfrom
fix/feed-health-false-positives
Aug 30, 2026
Merged

fix(health): validate feeds against their own spec version, class failures#43
hhkaos merged 1 commit into
mainfrom
fix/feed-health-false-positives

Conversation

@hhkaos

@hhkaos hhkaos commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Closes #41. Closes #42.

Both open feed-health issues are false positives, and each one for a different reason:

Changes

  1. Validate against the declared version. Validators are compiled per spec/vN.N directory, chosen by the feed's own specVersion. Support window = last 3 minors; older than that is reported as supported: false and never failed, since the feed still works for its consumers. An unknown version (never published here) is a hard failure — there is no schema to judge it by.
  2. Class failures before counting them. Transport errors, 429 and 5xx are transient: 3 attempts with backoff, 60s timeout, and 5 of the last 7 daily runs before an issue opens. 4xx, non-JSON and schema errors are deterministic: 2 runs. Alerting is now tracked with an alerted flag instead of an exact-equality check on the counter.
  3. Public status at docs/data/feed-health.json — per feed: status, declared spec version, whether it's in the support window, CORS, failure kind and since. updated is the date the content last changed, not the run date, so a healthy registry produces no daily commit.

Version currency is deliberately never an issue: it is metadata for consumers.

Verification

Ran locally against the real registry and against a synthetic one (invalid feed, 0.1.0 feed, 404, forced timeouts): both real feeds are green, hard failures alert at 2 runs and only once, transient ones don't alert at 2, recovery closes the issue, and state entries are pruned once the window is clean. npm run validate passes.

🤖 Generated with Claude Code

…lures

The health check validated every feed against spec/v0.4, so publishing a new
spec version turned every adopter that hadn't migrated yet into a daily issue:
Community Builders' feed is valid 0.3 and its only error was the specVersion
const. And a single 20s timeout counted as a failure, which is how eventos.wiki
— healthy, but ~50s for half a megabyte — reached the threshold too.

Three changes:

- Validate against the version the feed declares, compiling from the spec/vN.N
  directory that published it. Older than the support window (3 minors) is
  reported, never failed: the feed still works for its consumers.
- Class failures before counting them. Transport errors, 429 and 5xx are
  transient — retried within the run (3 attempts, 60s timeout) and needing 5 of
  the last 7 runs to open an issue. 4xx, non-JSON and schema errors are
  deterministic and report after 2.
- Publish docs/data/feed-health.json: status, declared version and CORS per
  feed, so a consumer can see what a feed speaks before subscribing. `updated`
  tracks the last change, not the last run, so a healthy registry commits
  nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feed health] Community Builders Community Events: feed unreachable or invalid [Feed health] eventos.wiki: feed unreachable or invalid

1 participant