Skip to content

fix(validate): recognize missing include paths with spaces (#526) - #552

Open
theroimasters1-dev wants to merge 1 commit into
sandtable-ai:mainfrom
theroimasters1-dev:fix-include-path-with-spaces-526
Open

theroimasters1-dev wants to merge 1 commit into
sandtable-ai:mainfrom
theroimasters1-dev:fix-include-path-with-spaces-526

Conversation

@theroimasters1-dev

Copy link
Copy Markdown

Closes #526

What changed for users

validate now recognizes missing include paths that contain spaces when they start with ./ or ../, such as policy: ./Carrier Policy.md or tasks: ./my tasks.yaml.

Before this change:

  • A misspelled or missing policy: ./Carrier Policy.md was ignored by the PATH regular expression check because of spaces (\S+), causing validate to silently treat the path string itself as the domain's policy text without an error.
  • A missing tasks: ./my tasks.yaml failed with a generic Zod schema error (expected array, received string) rather than clearly reporting the missing file.

Now:

  • A top-level value starting with ./ or ../ and ending in .md, .yaml, or .yml (with or without spaces) correctly throws not found (looked for ...) when the file does not exist.
  • Existing files with spaces in their path continue to load properly.
  • Prose ending in .md without ./ or ../ (such as See the handbook for carrier policy.md or Carrier Policy.md) continues to be preserved as inline text.

How you verified it

  • npx vitest run test/load.test.ts -t "loadDomain includes" (all 6 include test cases passed, covering ./ and ../ missing paths with spaces for policy and tasks, existing files with spaces, and inline text preservation)

  • npm run typecheck (0 errors)

  • npm run build (compiled clean to dist/)

  • node scripts/changelog.mjs check (CHANGELOG.md ok)

  • node scripts/sync-version.mjs --check (npm 1.5.0 <-> PyPI 1.5.0)

  • npm run smoke (all 52 freight and 25 clinic test tasks passed with 100% pass^1 rate)

  • npm run check passes

  • An entry under ## [Unreleased] in CHANGELOG.md, or the no-changelog label when no user can notice the change

  • The docs, the plugin skills and the README follow any command, flag or spec change (AGENTS.md, "Keep docs, plugin and README in sync")

@theroimasters1-dev
theroimasters1-dev requested a review from a team as a code owner November 9, 2026 20:35

This branch has not been deployed

No deployments
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.

validate: a missing include path with a space in it, such as policy: ./Carrier Policy.md, becomes the policy text

1 participant