Skip to content

fix: validate catalog kind overrides#97

Merged
kunallanjewar merged 2 commits into
mathomhaus:mainfrom
puneetdixit200:fix-catalog-kind-validation
May 27, 2026
Merged

fix: validate catalog kind overrides#97
kunallanjewar merged 2 commits into
mathomhaus:mainfrom
puneetdixit200:fix-catalog-kind-validation

Conversation

@puneetdixit200
Copy link
Copy Markdown
Contributor

Summary

Fixes #87

Validates explicit lore catalog --kind overrides before walking/importing markdown files. Invalid values now return the existing invalid-kind error with the valid taxonomy listed, and no entries are inserted.

I also refreshed generated CLI docs because make check surfaced existing generated-doc drift for guild mcp install --update/--force.

Tests

  • GOMODCACHE=$PWD/.gomodcache GOCACHE=$PWD/.gocache go test ./internal/lore -run Catalog
  • PATH=$PWD/.bin:$PATH GOMODCACHE=$PWD/../guild-gomodcache GOCACHE=$PWD/../guild-gocache make check

@github-actions github-actions Bot added area: lore Lore knowledge archive area: docs Documentation, README, INSTRUCTIONS labels May 21, 2026
Copy link
Copy Markdown
Contributor

@kunallanjewar kunallanjewar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuses the existing ErrInvalidKind sentinel + isValidKind helper from inscribe.go, keeps the validation layer consistent with Inscribe and Update. errors.Is + zero-row assertion in the test verify the up-front-rejection invariant from #87. CHANGELOG entry and the docs/generated/cli.md drift fix for the #61 flags are correct hygiene. Thanks for the careful patch.

@kunallanjewar kunallanjewar merged commit 71b1bc1 into mathomhaus:main May 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation, README, INSTRUCTIONS area: lore Lore knowledge archive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] lore catalog: validate explicit --kind override before import

2 participants