Repository navigation
Conversation
|
On Windows, the filename still appears in the dashboard when the drive prefix uses a forward slash and the rest of the path comes from os.path.join. I reproduced this on 7c001c7 with Python 3.12.10. From the repo root, run the following in Python: import os, runpy
scrub = runpy.run_path("tools/progress_dashboard.py")["scrub"]
p = os.path.join("D:/My work", "fixtures", "example.txt")
print(scrub("cannot read " + p))
print(scrub("cannot read " + os.path.normpath(p)))The first call prints AI-assisted review, verified locally with synthetic paths. |
|
Thanks, reproduced on Windows 11, Python 3.12.4, and fixed in
AI-assisted: yes (Claude Code). |
…H-SCRUB-SPACES) scrub() stopped at the first space, so the rest of a path outside the repository, file name included, stayed in the text.
…h spaces (DASH-SCRUB-SPACES) `D:/My work\name` and `D:\My work/name` were replaced only up to the space, so the file name stayed in the text.
f36f661 to
db3f77d
Compare
|
Rebased from Windows 11, Python 3.12.4: AI-assisted: yes (Claude Code) |
|
Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main ec91d69 merged without conflict; the PR's test files run with the pins of
|
Claimed in the coordination issue as: DASH-SCRUB-SPACES — #14 (comment)
What and why
scrub()intools/progress_dashboard.pyreplaces absolute paths outside the repository, file name included, before a line of output reaches the dashboard page. A Windows path that contains a space was only replaced up to the space:cannot read D:\My work\shaders\<name>.fssmbecamecannot read <path> work\shaders\<name>.fssm, so a carved shader's name stayed in the text.test_progress_dashboard.pyshowed it by failing when the temp folder has a space in its name.D:\work\a.txt is not a folderis still<path> is not a folder.D:/My work\fixtures\a.txt,D:\My work/stubs/a.spv), but only after a part with no dot or punctuation, soD:\work\a.txt is 3/4 donekeeps its prose.Limits: an unquoted path whose last part has a space (
D:\My work\my file.txt) keeps the text after that last space, and so does a bareC:\Users\First Last. Text that follows an unquoted path and contains another path with the same separator is replaced with it, and so is text with any slash after a part with no dot or punctuation (D:\work has 3/4 files). With the other separator, a folder name that has a dot right before a space (D:\My.data dir/x.fssm) still ends the path. POSIX paths are unchanged.Tested
Head
db3f77d4, rebased onmaine18b59a5, same patch asf36f661e(git range-diff); it merges cleanly withmain747809e7. Windows 11, Python 3.12.4:python -I -B tests/test_progress_dashboard.py: 52 OK. With this test on the tool ofmaine48ff037, it has 11 failures, all intest_drive_paths_with_spaces_lose_their_whole_name.tests/test_docs_cli_flags.py,tests/test_text_write_line_endings.py,tests/test_ctest_registration.py,tests/test_ci_registration.pyandtests/test_docs_links.py: OK.tests/test_tool_stdout_encoding.pyfails intest_every_main_block_reconfigures_stdout, as onmaine18b59a5alone (three tools this change does not touch).compileall,git diff --checkandpython -I scripts/check_no_game_data.pyon the two files: clean.Earlier head, on Windows 11, Python 3.12.4, on
mainat6261ca91(f36f661e):python -I -B tests/test_progress_dashboard.py— 52 OK, and also withTEMPset to folders whose names have a space, accents, or both. With the new test and the tool from before this pull request, the new test has 11 failures (10 subtests and the Windows sibling case). The four mixed-separator cases fail on7c001c7f.os.namepatched toposix.main4a50cafc(52 OK), progress_dashboard: recover parse_lasttest after incomplete nested CTest logs (DASH-CTEST-INCOMPLETE-NESTED) #1256 (c81b2daf, 59 OK), progress_dashboard: handle null comment authors, require --run-tests for --tests, and catch I/O and history errors (DASH-HARDEN-CLI) #625 (3c2ad30d, 57 OK) and dashboard: show actionable CI states for newest runs (DASH-CI-ACTIONABLE-STATES) #1001 (e98b345c, 52 OK) are clean.test_tool_stdout_encoding.py,test_text_write_line_endings.py,test_docs_links.py,test_docs_cli_flags.py,compileall,git diff --checkand the no-game-data check passed.GPUs tested: n/a (CPU-only synthetic tests).
AI-assisted: yes (Claude Code).
Checklist
mainand merges cleanly.