Skip to content

fix(schema): correct metaSchemaURL to decree-schema.json#262

Merged
zeevdr merged 1 commit into
mainfrom
fix/meta-schema-url-filename
Apr 29, 2026
Merged

fix(schema): correct metaSchemaURL to decree-schema.json#262
zeevdr merged 1 commit into
mainfrom
fix/meta-schema-url-filename

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented Apr 29, 2026

Summary

Phase 0 of the schemas-publishing work (#125). The metaSchemaURL constant emitted by internal/schema/yaml.go on schema export referenced a singular decree.json, but the actual published artifacts are two files: decree-schema.json (validates *.decree.schema.yaml) and decree-config.json (validates *.decree.config.yaml). Without this fix, every exported schema would carry a \$schema URL that resolves to a 404 once Pages goes live.

Touched:

  • internal/schema/yaml.go — the constant.
  • internal/schema/yaml_test.go — test fixture string (the negative-case http://example.com/decree.json at line 317 is intentionally kept).
  • .agents/context/schema-spec.md — modeline + top-level-shape examples now use decree-schema.json; the URL pattern documents both files; the schemastore section shows two catalog entries (one per file).

Pure docs/string change, no behavior change beyond the URL constant. Mechanical follow-up to #259 (the .io.dev rename).

This must merge before Pages is enabled in #125 — the running binary will emit the URL on every schema export, and that URL must resolve.

Refs #125

Test plan

  • go test ./internal/schema/... passes
  • golangci-lint run ./... — 0 issues
  • grep -rn 'schema/v0\.1\.0/decree\.json' . returns nothing (apart from the negative-test example.com URL)

The constant referenced a singular decree.json that will never be
published. The actual artifacts are decree-schema.json (validates
*.decree.schema.yaml) and decree-config.json (validates
*.decree.config.yaml). Update the URL emitted on schema export to
match the schema artifact filename, fix the matching test fixture,
and update the design brief's URL pattern + schemastore example to
show two catalog entries.

Refs #125
@zeevdr zeevdr force-pushed the fix/meta-schema-url-filename branch from 8e11eff to bb231a4 Compare April 29, 2026 12:52
@zeevdr zeevdr merged commit 9b7e39b into main Apr 29, 2026
18 checks passed
@zeevdr zeevdr deleted the fix/meta-schema-url-filename branch April 29, 2026 12:57
@zeevdr zeevdr added bug Something isn't working server Server changes size: S Quick win — a few hours or less priority: P1 Current milestone work labels May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: P1 Current milestone work server Server changes size: S Quick win — a few hours or less

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant