Skip to content

fix: point .roomodes schema $id at the raw schema document (#12129)#12130

Open
shaun0927 wants to merge 1 commit intoRooCodeInc:mainfrom
shaun0927:fix/roomodes-schema-id-raw-url
Open

fix: point .roomodes schema $id at the raw schema document (#12129)#12130
shaun0927 wants to merge 1 commit intoRooCodeInc:mainfrom
shaun0927:fix/roomodes-schema-id-raw-url

Conversation

@shaun0927
Copy link
Copy Markdown

@shaun0927 shaun0927 commented Apr 16, 2026

Related GitHub Issue

Closes: #12129

Description

This PR keeps the fix intentionally narrow and only addresses the canonical schema identity value exposed by the generated .roomodes schema.

The current generator sets $id to the GitHub blob URL:

  • https://github.com/RooCodeInc/Roo-Code/blob/main/schemas/roomodes.json

That URL serves HTML, not the schema document itself. This PR changes the source-of-truth generator and the checked-in schema to use the raw JSON URL instead, and adds a regression assertion for the advertised $id.

Why this scope is narrow:

  • no schema shape changes
  • no runtime behavior changes
  • no docs flow changes
  • only the canonical schema URL metadata is corrected

Files touched:

  • packages/types/src/roomodes-schema.ts
  • schemas/roomodes.json
  • packages/types/src/__tests__/roomodes-schema.spec.ts

Test Procedure

  • pnpm --dir packages/types exec vitest run src/__tests__/roomodes-schema.spec.ts src/__tests__/roomodes-schema-sync.spec.ts

Result locally:

  • 2 test files passed
  • 27 tests passed

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue.
  • Scope: Changes are focused on the linked issue.
  • Self-Review: I performed a self-review.
  • Testing: Added/updated tests for the changed behavior.
  • Documentation Impact: No user-facing documentation updates are required.
  • Contribution Guidelines: I reviewed the contribution guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This is intended as a low-risk follow-up to #11790 / #11791, which fixed schema/content alignment but did not update the canonical $id to a JSON-serving URL.

The generated schema currently advertises a GitHub blob page as its $id,
which returns HTML rather than the schema document itself.

This updates the source-of-truth generator and checked-in schema to use
a JSON-serving raw URL, and adds a regression assertion for the canonical
metadata value.

Constraint: Must keep the checked-in schema aligned with the generator output
Rejected: Leave the blob URL in place | Schema consumers dereferencing $id receive HTML
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If the schema is moved in the future, keep $id pointing at a JSON-serving canonical URL
Tested: pnpm --dir packages/types exec vitest run src/__tests__/roomodes-schema.spec.ts src/__tests__/roomodes-schema-sync.spec.ts
Not-tested: External IDE/schema consumer end-to-end dereference behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] .roomodes schema $id points to GitHub blob HTML instead of the schema document

1 participant