text_tables: ask report_paths for the report-path guard #2741
Closed
github-bot
wants to merge 2 commits from
github-bot/gh-2741 into main
AGit
pull from: github-bot/gh-2741
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2741
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2741"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@breachato on GitHub · 2026-11-30 13:55 UTC · original
breachato:text-tables-output-guard-shared→main· +4 −13 · 2 files · 2 commits · closed without mergingClaimed in the coordination issue as: TEXT-TABLES-OUTPUT-GUARD-SHARED
What and why
tools/text_tables.pystill carried its own_same_output_path(os.path.normcaseoverrealpath, thensamefile) and used it for the distinct-outputs check and for the carveindex.jsonguard, whileinput_underin the same file already askedreport_paths.same_report_path. #1655 moved the source-file guard to the shared helper but left this copy, and #1228 was closed as superseded by it, so the remainder was still onmainat20fe0c75. This is that remainder.The private copy is wrong on a case-sensitive directory:
normcaselowercases both names beforesamefile, so--tables Out/T.csv --strings Out/t.csvis refused as one file. Measured on native Windows 11 NTFS withfsutil file setCaseSensitiveInfo <dir> enable,mainand this branch, same fixture:and on the two paths directly (old copy vs
same_report_path, in a case-sensitive directory that really holds both files):The private function is removed, the module imports
same_report_pathonce at the top (ROOT/sys.path.insertwas already there, so-Iworks), andinput_under's function-local import is dropped because the module-level one covers it. The tool also joinsSHAREDintests/test_report_paths.py.This is the same shape as the other tools in the series (#1162, #1170-#1173, #1214, #1215, #1227, #1229, #1243, #1244, #2636-#2640), and it edits the same tuple line, so it will need a rebase behind whichever of those lands first; the conflict is mechanical, both entries belong in the tuple alphabetically.
Tested
python -I tests/test_text_tables.py— 39 tests, OKpython -I tests/test_report_paths.py— 26 tests, OK (1 skipped: the macOS-only case), withtext_tablesinSHAREDpython -I tests/test_report_path_case.py— 4 tests, OK (1 skipped, same)python -I scripts/check_no_game_data.py tools/text_tables.py tests/test_report_paths.py— cleanmainvs this branch) on a case-sensitive NTFS directorySynthetic resources and temporary folders; no game data, no GPU workload.
GPUs tested: n/a
AI-assisted: yes
Checklist
main(20fe0c75) and merges cleanly.@OreoFR on GitHub · 2026-11-30 13:58 UTC · original
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest, no GPU),
mainf44904d21, head8f23a4652.main+ this PR, merged):tests/test_text_tables.py+tests/test_report_paths.py: 63 passed, 2 skipped, 33 subtests passed. Skips:requires Windows directory case sensitivity(not runnable on macOS).main+ only this PR's tests):tests/test_report_paths.py: 25 passed, 1 skipped, the same as green. The updated test does not fail onmain.test_switched_tools_import_the_helper_and_define_no_copylooks for the stringfrom report_paths import same_report_path, andmain'stext_tables.pyalready has it (the lazy import insideinput_under). The removed_same_output_pathis not in the forbidden names (same_report_path,_same_report_path,_path_key,_case_insensitive_volume), so the old copy would still pass.text_tables._same_output_path(thetest_same_output_path_identitytests intest_pe_inspect.py/test_shader_profile.pycover those tools' own helpers).main+#2566, then that result against this PR)._same_output_pathto the forbidden names, or require the import at module level.AI-assisted: Claude Code
@aegish-zagi on GitHub · 2026-11-30 14:33 UTC · original
VERIFY-2741 — PASS
8f23a4652f| merge state vs mainb17b22d33: CLEAN (scratch merge, no conflicts)@KelboLive on GitHub · 2026-11-30 15:03 UTC · original
Independent check on Windows (not the author), at
8f23a4652.python -I tests/test_report_paths.py: 26 tests passed in 12.6 s.Tool-only change; the report-path guard cases run under the standard library on Python 3.12.10. No game files needed.
Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10.
AI-assisted: yes (opencode).
8f23a4652ftoe61612adda@breachato on GitHub · 2026-11-30 19:52 UTC · original · edited 2026-11-30 20:05 UTC
Rebased onto
main(8f41d7d0) to clear theSHAREDtuple conflict that #2637 (bink_index) opened for every sibling: the entry now sits in the tuple next tobink_index.Verified on the new head (
e61612ad):python -I tests/test_text_tables.py— OKpython -I tests/test_report_paths.py— OK (26 tests, 1 skipped)python -I tests/test_report_path_case.py— OKgit diff main— 2 files:tools/text_tables.pyandtests/test_report_paths.pyNo behaviour change beyond the shared helper.
Ready to merge:
MERGEABLE/CLEAN, all five checks green. Every sibling PR touches the sameSHAREDline, so please merge one at a time — I'll rebase the remaining ones after each merge and keep them green.@breachato on GitHub · 2026-11-30 21:21 UTC · original
Rebased onto
mainafter #2637 landed, so theSHAREDtuple conflict is gone and the branch is two commits again on top ofmain(8f41d7d0;mainis nowd8ca1824, which does not touchtests/test_report_paths.pyortools/text_tables.py).New head:
e61612adda39ca14f12ad5a058f743150c67c83a.Measured on that head, standard library only, Windows, Python 3.14, no game data:
@OreoFR @aegish-zagi @KelboLive — your checks are on
8f23a4652, i.e. before the rebase. Could you re-run your checks one61612adand approve if they still hold? Merging on the old head would land code none of you has looked at.The diff is unchanged in substance: same two commits, same
SHAREDentry, only the tuple context under it moved.@aslan2142 on GitHub · 2026-12-01 11:50 UTC · original · requested changes
Reviewed the diff against
main: delegating the report-path guard intools/text_tables.pytoreport_paths.same_report_pathis clean and clean-room verified, but this branch currently conflicts withmainintests/test_report_paths.py:8-12(SHAREDtuple updated by#2639and earlier merges). Please rebase onto currentmainso CI runs cleanly.(AI-assisted review.)
@KelboLive on GitHub · 2026-12-01 16:01 UTC · original · reviewed
The behaviour is right and cleanly scoped: both former
_same_output_pathcall sites now usesame_report_path, the lazy import is gone, and all four report flags (--dialogue,--tables,--strings,--native-speakers) go through the one preflight loop — so a failing path is refused for every report write, not at a single call site. I reproduced the case-sensitive NTFS A/B end to end: old coderc=2,outputs must be distinct files, nothing written; this branchrc=0with bothT.csvandt.csv. That is exactly the bug the shared helper exists for (the old copy lowercased unconditionally vianormcase, merging case-distinct files on a case-sensitive volume).But the test edit only pins the import string. Restoring the old helper locally leaves all three suites green (39 / 26 / 4 measured), so the removal is not actually guarded. Please add
_same_output_pathto the forbidden names intest_switched_tools_import_the_helper_and_define_no_copy, or addtext_tablestotest_report_path_case.HELPERS— either would make the re-added copy fail.It also needs the rebase already requested:
merge-treeagainst currentorigin/mainconflicts only in theSHAREDtuple oftests/test_report_paths.py(main addedmeshlet_page);tools/text_tables.pymerges cleanly.Residual, outside this PR's two guards: the direct source-file check at
tools/text_tables.py:487still uses rawos.path.exists/os.path.samefilerather than the helper. It only runs when the output exists and I found no bypass, but it is the same class of check and worth a follow-up.e61612addatocfcf07c642cfcf07c642tode374c4177@aslan2142 on GitHub · 2026-12-02 05:10 UTC · original
Thank you @breachato! Both commits from this PR (
text_tables) have been landed onmainwith full original authorship preserved in batch PR #3024 (commit4dfd90c35), which consolidated all 15tools/report_paths.pyPRs together to avoid sequentialtests/test_report_paths.pymerge conflicts. Closing this PR now that it is merged!Pull request closed