fix(adopters): register against the version the feed declares - #46
Merged
Conversation
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>
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.
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.mjscompiledspec/v0.4and nothing else, so #30 (CoruñaJUG) — a feed that is valid 0.3, verified againstspec/v0.3— gets "❌ The feed does not validate against OTE Spec v0.4" over thespecVersionconst alone, and is asked to fix something that was never broken.Changes
specVersionpicks 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.specVersion(lists the published versions), and older than the support window (asks for a migration, points at the schemas still in the repo).docs/register/register.jsreads 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.9and0.1.0) — both produce the intended report. The form was driven in a browser againsthttps://corunajug.org/feed.json: it fetches/schema/v0.3/and reports the feed as fine.npm run validatepasses.Once this is on
main,/revalidateon #30 opens the registration PR.🤖 Generated with Claude Code