From 04cfb449bd8494811ad63e94172a308fa25a551a Mon Sep 17 00:00:00 2001 From: Elvin Novruzov <277077199+alvinnevruzedu@users.noreply.github.com> Date: Fri, 23 Oct 2026 02:08:59 +0400 Subject: [PATCH] fix: make verify:data pass on Windows checkouts (#540) * fix: pin relevance-fingerprinted files to LF evaluate-relevance.py hashes the raw bytes of core.py, design_system.py, reasoning_contract.py, relevance_metrics.py, itself, relevance-cases.json and every CSV under src/ui-ux-pro-max/data, including data/stacks. On a Windows checkout with core.autocrlf=true these become CRLF (data/stacks/*.csv is not matched by the existing data/*.csv pin) and the gate fails with 'runtimeFingerprint does not match' on a clean tree. Pin the missing files to LF, as is already done for the catalog data (#462/#478). * fix(cli): quote the test:python pattern so it runs on Windows The single-quoted -p 'test_*.py' is passed literally by cmd.exe, so unittest discovers nothing and exits with 'NO TESTS RAN', which stops verify:data on Windows. Double quotes work in both cmd.exe and POSIX shells. --- .gitattributes | 12 ++++++++++++ cli/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 77b40e6..376b65d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,3 +4,15 @@ # Pin these files to LF so the snapshot is reproducible everywhere. src/ui-ux-pro-max/data/*.csv text eol=lf src/ui-ux-pro-max/data/*.json text eol=lf +src/ui-ux-pro-max/data/stacks/*.csv text eol=lf + +# scripts/evaluate-relevance.py fingerprints the raw bytes of these files, and +# the committed thresholds manifest records that hash. A CRLF checkout (for +# example core.autocrlf=true on Windows) changes the bytes, so the relevance +# gate fails with "runtimeFingerprint does not match" on a clean tree. +src/ui-ux-pro-max/scripts/core.py text eol=lf +src/ui-ux-pro-max/scripts/design_system.py text eol=lf +src/ui-ux-pro-max/scripts/reasoning_contract.py text eol=lf +src/ui-ux-pro-max/scripts/tests/fixtures/relevance-cases.json text eol=lf +scripts/evaluate-relevance.py text eol=lf +scripts/relevance_metrics.py text eol=lf diff --git a/cli/package.json b/cli/package.json index 00bb25a..68ccde6 100755 --- a/cli/package.json +++ b/cli/package.json @@ -19,7 +19,7 @@ "validate:semantic": "cd .. && node cli/scripts/run-python.mjs src/ui-ux-pro-max/scripts/validate_data.py", "validate:agent-guide": "cd .. && node cli/scripts/run-python.mjs scripts/validate-agent-guide.py", "validate:catalog-summary": "cd .. && node cli/scripts/run-python.mjs scripts/generate-catalog-summary.py --check", - "test:python": "cd .. && node cli/scripts/run-python.mjs -m unittest discover -s src/ui-ux-pro-max/scripts/tests -p 'test_*.py'", + "test:python": "cd .. && node cli/scripts/run-python.mjs -m unittest discover -s src/ui-ux-pro-max/scripts/tests -p \"test_*.py\"", "evaluate:relevance": "cd .. && node cli/scripts/run-python.mjs scripts/evaluate-relevance.py", "evaluate:relevance:calibration": "cd .. && node cli/scripts/run-python.mjs scripts/evaluate-relevance.py --split calibration", "evaluate:relevance:held-out": "cd .. && node cli/scripts/run-python.mjs scripts/evaluate-relevance.py --split held_out",