Repository navigation
fix(validate): recognize missing include paths with spaces (#526) - #552
Open
theroimasters1-dev wants to merge 1 commit into
Open
theroimasters1-dev wants to merge 1 commit into
theroimasters1-dev wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #526
What changed for users
validatenow recognizes missing include paths that contain spaces when they start with./or../, such aspolicy: ./Carrier Policy.mdortasks: ./my tasks.yaml.Before this change:
policy: ./Carrier Policy.mdwas ignored by thePATHregular expression check because of spaces (\S+), causingvalidateto silently treat the path string itself as the domain's policy text without an error.tasks: ./my tasks.yamlfailed with a generic Zod schema error (expected array, received string) rather than clearly reporting the missing file.Now:
./or../and ending in.md,.yaml, or.yml(with or without spaces) correctly throwsnot found (looked for ...)when the file does not exist..mdwithout./or../(such asSee the handbook for carrier policy.mdorCarrier 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 forpolicyandtasks, existing files with spaces, and inline text preservation)npm run typecheck(0 errors)npm run build(compiled clean todist/)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 checkpassesAn entry under
## [Unreleased]in CHANGELOG.md, or theno-changeloglabel when no user can notice the changeThe docs, the plugin skills and the README follow any command, flag or spec change (AGENTS.md, "Keep docs, plugin and README in sync")