Skip to content

[Bug]: three YAML guide examples fail parsing or the released schema #780

Closed

Description

@jimhoyd

Runtime revision and environment

URLCode v0.6.2 (a7d7ce1c4a540032cbc032ca0f605f1b3555b996), published npm core 0.6.2; macOS, Node v26.8.2. Read-only review on 2026-09-26; reproductions in disposable directories.

Minimal reproduction

Extract these fenced YAML examples and pass them to the released parser/schema (wrapping the redirect fragment under version: "1" and routes:):

  1. docs/yaml/redirects.md, "Root-relative and suffix redirects": redirect: {url: /profiles/{id}} is invalid YAML flow-map syntax. Quote the templated destination.
  2. docs/yaml/policies.md, "Hardened profile and per-route overrides": page: {source: pages/index.html} uses an unknown field. The page contract requires file.
  3. docs/policies/compression.md, first complete example: secrets: {KEY: {secret: api-key}} uses a secret reference that violates the identifier schema (^[A-Za-z_][A-Za-z0-9_]*$). Use a valid synthetic binding name.

Expected: reader-facing snippets parse and obey the implemented schema before a user creates referenced files/grants. Extend executable-doc coverage to these handwritten guide examples; generated-reference freshness alone does not catch them. Do not count intentionally partial configuration snippets as complete projects.

Relevant output

The redirect example produces Invalid YAML ... Unexpected flow-map-start at node end (UNEXPECTED_TOKEN). The other two fail validateDocument(parseYaml(snippet)) at page.source and the secret identifier respectively. The systematic check covered all 120 YAML fences, with complete-project schema validation where appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions