Skip to content

Validate YAML frontmatter in wiki check - #2

Merged
brickpop merged 2 commits into
agentic-wiki:mainfrom
evanaronson:fix/validate-frontmatter-yaml
Oct 19, 2026
Merged

brickpop merged 2 commits into
agentic-wiki:mainfrom
evanaronson:fix/validate-frontmatter-yaml

Conversation

@evanaronson

Copy link
Copy Markdown
Contributor

wiki check currently reports success for malformed YAML such as an unclosed quoted value or unfinished flow list. Validate frontmatter with go.yaml.in/yaml/v3 and report per-file errors with exit code 1, including repeated scalar mapping keys. check --fix leaves malformed root metadata untouched.

Validation reads YAML nodes without expanding aliases or converting values to Go maps. The existing metadata extraction API and targeted writer keep their behavior; read/list/search and mutation commands gain no validation overhead or policy changes. Extraction and validation share exact fence recognition.

Regression tests cover the original failures, valid quoting and multiline values, CRLF, recursive aliases, complex nested keys, multiple-file reporting, and --fix preservation.

Validated locally: go test -timeout 120s ./..., go vet ./..., staticcheck, native build, the repository backlog's wiki check, and macOS/Linux/Windows cross-compilation. Race tests require CI because the local Windows setup lacks cgo support.

Comment thread CHANGELOG.md Resolved
Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>
@brickpop
brickpop merged commit cde4b32 into agentic-wiki:main Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants