Files
docs/apps/spec/scripts
zeekay db9545fe01 fix(spec): HIPs are Markdown — sync them so they render as Markdown
`sync-hips.ts` copies HIP bodies verbatim from hanzoai/hips and writes them as
`.mdx`. They are CommonMark, and three CommonMark constructs mean something
else to the MDX parser. One of them took the spec build down:

    Error occurred prerendering page
      "/docs/hip-0126-integrations-connectors-and-the-extension-runtime"
    ReferenceError: native is not defined

from this line of prose:

    (`name`, `version`, `runtime` ∈ {native, goja, wazero, v8go}, `module`,

MDX read `{native, goja, wazero, v8go}` as an expression. Seventeen more pages
were dropped before they got that far — `<100ms` and `< 5ms` in latency tables
read as tags, `\text{EFE}` in LaTeX read as an expression.

The sync now escapes `{`, `}` and `<` outside fenced code blocks and inline
code spans, and unwraps `<https://…>` autolinks. Every `<` is escaped rather
than guessed at: across all 135 HIPs, every `<name` outside code is a
placeholder (`<plugin>`, `<org>`, `<X%`) or a comparison — there is no real
inline HTML to preserve, and guessing wrong costs the whole page. Code blocks
are untouched, which is where the JSX examples live.

Fixing the synced files was never an option: `build:pre` runs this sync, so
content/docs is rewritten from hanzoai/hips on every build.

  turbo run build --filter=spec
    before  ReferenceError: native is not defined -> build failed
            17 pages skipped
    after   ✓ Generating static pages using 19 workers (140/140) in 4.1s
            2 pages skipped -> 0 with the unconditional `<` escape

Co-authored-by: Hanzo Dev <[email protected]>
(cherry picked from commit 8a36820c0cb21253cca3c5e08577281f65aea018)
2026-08-04 18:39:20 -07:00
..