Skip to content

fix(adopters): register against the version the feed declares - #46

Merged
hhkaos merged 1 commit into
mainfrom
fix/register-declared-version
Aug 30, 2026
Merged

fix(adopters): register against the version the feed declares#46
hhkaos merged 1 commit into
mainfrom
fix/register-declared-version

Conversation

@hhkaos

@hhkaos hhkaos commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

The defect #43 fixed in the daily health check was also in the registration pipeline, where it costs more: it is the first thing a new adopter sees.

register-adopter.mjs compiled spec/v0.4 and nothing else, so #30 (CoruñaJUG) — a feed that is valid 0.3, verified against spec/v0.3 — gets "❌ The feed does not validate against OTE Spec v0.4" over the specVersion const alone, and is asked to fix something that was never broken.

Changes

  • The declared specVersion picks the schemas, within the same support window as the health check (last 3 minors). A supported-but-older version registers normally, with a one-line note that migrating is optional.
  • The two cases that really are the publisher's problem now say so in plain language instead of appearing as raw ajv output: absent or never-published specVersion (lists the published versions), and older than the support window (asks for a migration, points at the schemas still in the repo).
  • Feed fetch: 60s with one retry, so a slow origin no longer reads as an invalid feed.
  • The browser-side pre-check in docs/register/register.js reads its required-field lists from the declared version's published schemas too, instead of always v0.4.

Verification

Ran the script locally against the real #30 issue body: spec=v0.3, valid=true, correct registry entry, note about 0.4 present (registry change reverted, not committed). Synthetic feeds cover the two rejection paths (9.9.9 and 0.1.0) — both produce the intended report. The form was driven in a browser against https://corunajug.org/feed.json: it fetches /schema/v0.3/ and reports the feed as fine. npm run validate passes.

Once this is on main, /revalidate on #30 opens the registration PR.

🤖 Generated with Claude Code

Same defect #43 fixed in the health check, but at the front door: the
registration bot compiled spec/v0.4 and nothing else, so a valid 0.3 feed was
told "the feed does not validate against OTE Spec v0.4" — over the specVersion
const and nothing else — and asked to fix something that was never broken. That
is the first thing a new adopter sees.

The version the feed declares now picks the schemas, within the same support
window as the health check (last 3 minors). Being behind but supported is a note
on the successful report, not a rejection. The two cases that really are the
publisher's problem now say so plainly instead of hiding inside ajv output: an
absent or never-published specVersion, and a version older than the window,
which asks for a migration and points at the schemas still in the repo.

Also here: the feed fetch gets 60s and one retry, so a slow origin stops reading
as an invalid feed, and the browser-side pre-check on the registration form reads
its required-field lists from the declared version's published schemas too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hhkaos
hhkaos merged commit c39a128 into main Aug 30, 2026
2 checks passed
@hhkaos hhkaos mentioned this pull request Aug 30, 2026
1 task
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.

1 participant