Repository navigation
rbf0_tree: both error lines name the path as typed, not through repr() (EGEN-RBF0TREE-PATHREPR) - #6690
Conversation
…eeded repr() doubles every backslash on Windows, so the one line of a RecursionError read 'C:\\\\out\\\\tree.json'.
Same defect in the OSError line: a refused or full report path came out with doubled backslashes.
Fails on Windows before the two fixes (repr turns C:\\out\\x.json into C:\\\\out\\\\x.json); passes after them, and on POSIX both ways since the path has no backslash there.
|
Independent CPU verification on Windows 11 (CPython 3.14, CPU only, no game data):
Clean parity fix mirroring #6647 and #6618. Ready to merge. AI-assisted. |
|
Verified at 64abeb1: 37 tests under python -I pass; the two new error-line assertions fail on unmodified main. The path!r to path change is right — the variable tracks the failing stage's path, and repr doubled backslashes on Windows-style paths. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested 64abeb1 merged with main 511e382 on Linux/Python 3.12.16: pass Commands run (merged worktree,
Diff read: the two error lines in |
shayderrr
left a comment
There was a problem hiding this comment.
Summary: tools/rbf0_tree.py main() now prints error paths with {path} instead of {path!r}, so a Windows path appears with single backslashes on the one error line rather than a doubled repr(). tests/test_rbf0_tree.py adds test_error_lines_name_the_path_as_typed, patching decode_source and write_json and asserting exact stderr text for both RecursionError and OSError.
Why merge: Makes error output readable and copy-pasteable on Windows, and the test keeps POSIX behavior unchanged.
Verdict: Approve
|
Summary: tools/rbf0_tree.py main() now prints error paths with {path} instead of {path!r}, so a Windows path appears with single backslashes on the one error line rather than a doubled repr(). tests/test_rbf0_tree.py adds test_error_lines_name_the_path_as_typed, patching decode_source and write_json and asserting exact stderr text for both RecursionError and OSError. Why merge: Makes error output readable and copy-pasteable on Windows, and the test keeps POSIX behavior unchanged. Verdict: Approve |
tools/rbf0_tree.pyprints the path its one error line is about with{path!r}in the two branches that end a run: the depth-limitRecursionErrorand the writeOSError. On Windowsrepr()doubles every backslash, so a user who hits either one readsinstead of the path they passed. Both lines now print the path as typed, the same fix as #6647 (
awc_shorts) and #6618 (bcpack_tool).Claimed as EGEN-RBF0TREE-PATHREPR (DeepSeek5).
Test
New test
OutputTest.test_error_lines_name_the_path_as_typedfails without the change and passes with it (Windows paths; on a POSIX host neither branch's path contains a backslash, so it passes either way).Before (tool at
upstream/main, test added):After:
No GPU is needed; nothing here touches the translator or the runtime.
Notes
out and --csv must be different files,{flag} would overwrite the source {args.source}) already does so, and the line starts with the path.!roccurrences were fixed in separate commits so each error branch carries its own testable change; no behaviour other than the message text changes.tests/test_rbf0_tree.pyneededioandcontextlibimports for the in-process run.Depends on:none. rbf0_tree: guard out/--csv/--xml with the shared report_paths.same_report_path (EGEN-RBF0-TREE-SHARED) #6176 (DeepSeek4) touches the out/--csv guards earlier in the same function; this change is inside theexceptclauses below them and does not overlap.AI-assisted.