fix(cli): theme evidence paths read as files, not platform spellings - #1633
Open
Tyagiquamar wants to merge 1 commit into
Open
Tyagiquamar wants to merge 1 commit into
Tyagiquamar wants to merge 1 commit into
Conversation
collectCss built each ContextFile path with path.relative, so on Windows the CSS entries came out backslash-separated (app\globals.css) while every consumer spells them POSIX: the test asserts conventional entry names beside them, and the paths surface as extraction evidence and model-pass hints that are matched as written. The suite was red on Windows for the allowlist test alone; Linux output is unchanged (the normalization is a no-op there).
Author
|
Hi, friendly ping for review on this PR when you have a moment. Happy to address any feedback. Thanks! |
Author
|
Hi, just following up on this when you get a chance. The branch is up to date and checks are green. If it looks good from your side, it should be ready to merge. Happy to make any changes if needed. Thanks! |
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.
Fixes the Windows failure in
packages/vendo/tests/cli/theme/extract-theme.test.ts("reads a fully conventional shadcn sheet exactly..."):Problem
collectCssbuilt eachContextFile.pathwithpath.relative(targetDir, absolute), which emits platform separators. On Windows the collected CSS paths came out backslash-separated (app\globals.css), while every consumer spells these paths POSIX:app/layout.tsx, a literal fromENTRY_FILE_CANDIDATES),ThemeSummary.evidencePaths— extraction evidence seeded as hints for the staged model pass, where they are matched as written.So on any non-POSIX checkout the exact pass reported its own evidence under a spelling nothing else uses, and the suite's allowlist test failed. Verified red on pristine
mainon this machine before the fix (1 failed / 20).Fix
Normalize at the single construction site:
path.relative(...).split(path.sep).join("/"). No other site produces these paths (layout.path/tailwindConfig.pathare POSIX literals fromENTRY_FILE_CANDIDATESand the fixed config-name list), and no consumer re-reads disk from them — they flow to provenance,evidencePathsOf, andparseCssVars' provenance field only. On Linux the normalization is a no-op, so CI behavior is bit-identical.Testing
pnpm --filter @vendoai/vendo exec vitest run tests/cli/theme/extract-theme.test.ts→ 20 passed on Windows (was 19 passed / 1 failed on main); unchanged assertions, no test edits.pnpm --filter @vendoai/vendo buildclean;pnpm --filter @vendoai/vendo typecheck(3 tsconfigs) clean;pnpm lint:packagesclean. (Ran via direct package scripts — turbo's platform binary is broken on this machine with STATUS_DLL_NOT_FOUND.)Summary by cubic
Normalizes theme evidence paths in the CLI extractor to POSIX slashes so comparisons are consistent across platforms. Old behavior used platform separators (e.g., app\globals.css on Windows) and broke evidence matching; new behavior always emits repo‑relative POSIX paths (e.g., app/globals.css).
Written for commit 14b16bb. Summary will update on new commits.