Skip to content

Fix context7.json schema error, validate it in CI - #105

Merged
DavidLambauer merged 2 commits into
mage-os:mainfrom
ProxiBlue:docs/context7-schema-fix
Oct 7, 2026
Merged

DavidLambauer merged 2 commits into
mage-os:mainfrom
ProxiBlue:docs/context7-schema-fix

Conversation

@ProxiBlue

Copy link
Copy Markdown
Contributor

Follow-up to #104. The context7.json merged there doesn't pass Context7's schema, so none of its settings took effect. My mistake: I checked it was valid JSON, but never validated it against the schema.

What went wrong

The description I wrote was 361 characters. Context7's schema allows at most 200. That is the only validation error in the file.

Context7 re-parsed the repo on 2026-10-05, 12 minutes after #104 merged, so the refresh workflow works. But the settings shown on the library page for /mage-os/devdocs are still all defaults:

  • the generated description, not ours
  • the default excludeFiles list, without our 13 unlinked pages
  • no rules at all

So the unlinked duplicate pages are still indexed in place of the published *_xml pages. For example, cron_groups.md supplies 9 snippets and cron_groups_xml.md supplies none. The code-block language tags from #104 did land, because they live in the markdown, not in the config.

Changes

  1. context7.json: description shortened to 181 characters. No other change. The file now validates.
  2. New .github/workflows/context7-validate.yml: a CI check that validates context7.json against the Context7 schema with check-jsonschema. Context7 gives no error when the file is invalid, so this makes a schema error fail the PR instead of going unnoticed. It runs only when context7.json or the workflow itself changes.

Tested:

After merge

The refresh workflow will trigger a re-parse. I'll re-check the index afterwards, to confirm the unlinked pages drop out and the rules are served.

🤖 Generated with Claude Code

ProxiBlue and others added 2 commits October 7, 2026 06:08
The description added in mage-os#104 was 361 characters. Context7's schema
(https://context7.com/schema/context7.json) caps it at 200, and the file
failed validation. Context7 has since re-parsed the repo (2026-10-05)
but its stored settings for /mage-os/devdocs are still the defaults: the
generated description, default excludeFiles, and no rules. So none of
the config from mage-os#104 took effect, and the 13 unlinked duplicate pages
are still indexed in place of the published *_xml pages.

This is the only schema error in the file; it now validates cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Context7 gives no error when context7.json is invalid. The description
added in mage-os#104 exceeded the schema's 200-character limit and the library
kept its default settings. This workflow runs check-jsonschema against
https://context7.com/schema/context7.json whenever the file changes, so
a schema error fails the PR instead of going unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ProxiBlue
ProxiBlue requested review from a team as code owners October 6, 2026 22:27
@DavidLambauer
DavidLambauer merged commit 098a78a into mage-os:main Oct 7, 2026
2 checks passed
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.

3 participants