Skip to content

Gardener: parse generated frontmatter with a real YAML loader #704

Description

@wshobson

PR #700 fixes the OpenCode and Copilot adapters dropping quotes from frontmatter values. Before the fix, 9 OpenCode files and 31 Copilot files under the generated trees failed yaml.safe_load, and neither make validate nor make garden noticed. Both read frontmatter with the tolerant parse_frontmatter helper in tools/adapters/base.py rather than a YAML parser.

Proposal: add a gardener check at error severity that runs yaml.safe_load over every emitted frontmatter block under .codex, .opencode, .copilot, and .antigravity, and reports the file and the parser error. #700 adds PyYAML unit tests for the emitters. The gardener check covers the generated trees end to end, so a new adapter or a new value shape can't regress silently.

Acceptance: make garden reports 0 errors on main once #700 is merged, and restoring the old OpenCode emitter makes it report 9 errors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions