You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
site: the landing-page YAML teaches YAML, and both examples now load
Two defects in the metadata examples on the front page, both found by extracting
the fenced blocks and running them through the loader rather than by reading them.
1. THE SIGIL. Both examples are presented as YAML — `metadata.root:`, list items,
block scalars — but wrote their attributes in canonical-JSON form: "@table",
"@required", "@maxlength", "@values", "@fields", "@generation", "@objectref",
"@Cardinality", "@agg", "@Of", "@via", and nine more. YAML authoring is
sigil-free (ADR-0006); the desugar re-adds the "@" when it lowers to canonical
JSON. 25 occurrences, all in index.html — the llms mirrors were already clean,
and getting-started.html already had it right, so the front page was the only
place teaching the wrong convention, and it is the first thing an adopter or an
agent reads.
This was NOT a correctness bug: both forms load identically — verified, the
desugar tolerates and strips the sigil. It is a convention bug, which is why it
survived. The regex VALUE "^[^@]+@[^@]+$" is untouched and stays a string; only
its key went bare.
2. THE ADVANCED EXAMPLE NEVER LOADED. The blog/Author/Post/AuthorSummary block
elided its primary keys behind a "# … id, title, authorId …" comment, so
`identity.primary { fields: [id] }` named a field that did not exist, and
AuthorSummary's `extends: blog::Author.id` and `origin.aggregate @Of: Post.id`
both pointed at nothing. Loading it failed with "the SuperClass 'blog::Author.id'
does not exist". Author and Post now declare `field.long: { name: id }`; the
comment keeps eliding the rest.
Verified by extraction, not by eye: both fenced examples are pulled out of the
committed HTML, stripped of span markup, and loaded. Before this change example 1
failed and example 0 passed; after it, both load. The sigil half was proven neutral
first — example 1 failed IDENTICALLY before and after the sigil rewrite, so the
convention fix and the missing-key fix are independent.
This is the class docs/check-doc-examples.ts gates in the library repo (#337: three
times a doc taught vocabulary the loader had already retired). The website sits
outside that gate's reach, which is how an example that cannot load stayed on the
front page.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NynrRND6ZUwGvq3ZUTCfxG
- <spanclass="keyword">relationship.composition</span>: { <spanclass="key">name</span>: posts, <spanclass="string">"@objectRef"</span>: Post, <spanclass="string">"@cardinality"</span>: many }
436
-
- <spanclass="keyword">identity.primary</span>: { <spanclass="string">"@fields"</span>: [id], <spanclass="string">"@generation"</span>: increment } <spanclass="comment"># name optional → defaults to "primary"</span>
- <spanclass="keyword">relationship.composition</span>: { <spanclass="key">name</span>: posts, <spanclass="key">objectRef</span>: Post, <spanclass="key">cardinality</span>: many }
437
+
- <spanclass="keyword">identity.primary</span>: { <spanclass="key">fields</span>: [id], <spanclass="key">generation</span>: increment } <spanclass="comment"># name optional → defaults to "primary"</span>
<preclass="example-code"><code><spanclass="comment">// validator.required + validator.regex + validator.length, straight from the field children</span>
0 commit comments