text_tables: ask report_paths for the report-path guard (TEXT-TABLES-SHARED-REPORT-PATH) #1228

Open
github-bot wants to merge 1 commit from github-bot/gh-1228 into main AGit
Owner

@⁠breachato on GitHub · 2026-11-24 20:37 UTC · original
breachato:text-tables-shared-report-path → main · +4 −12 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEXT-TABLES-SHARED-REPORT-PATH (#14)

Depends on: none

Fixes: none

What and why

tools/text_tables.py answered the report-path question two ways: a private _same_output_path (:427, realpath

  • normcase + samefile) for the --dialogue/--tables/--strings outputs against each other (:460) and against
    a source folder's index.json (:466), and an inline os.path.exists(...) and os.path.samefile(...) against every
    input (:463). CONTRIBUTING.md asks a report writer to call tools/report_paths.same_report_path instead of
    deriving it again, and the private copy missed that helper's folding-volume probe: on a Linux mount that ignores
    case (vfat, exFAT, CIFS) two outputs differing only in case passed as distinct and the second replaced the first,
    and an output named like an input with a different case was not refused.

Both places and the inline check now call same_report_path. The tool already puts its own folder on sys.path
for file_mode and hashdict, so the import is one line; no test calls the private name, so it goes with the
duplication. Different topic from TEXT-TABLES-RO-CLEANUP (#818, staged-file permissions). No behaviour change on
Windows, macOS or a case-sensitive Linux filesystem.

Tested

  • tests/test_text_tables.py: 33 passed, 13 subtests passed.
  • python -I tools/text_tables.py --help: prints its usage (the import works under -I).
  • python -m compileall -q tools/text_tables.py: clean.
  • Not tested: the folding-volume case this fixes, which needs a case-folding mount (vfat/exFAT/CIFS); this
    machine is NTFS, where normcase already folds case. tests/test_report_paths.py covers the helper's own
    folding-volume answer.
  • No game files, no GPU; nothing was built.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)
**@⁠breachato** on GitHub · 2026-11-24 20:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1228) `breachato:text-tables-shared-report-path` → `main` · +4 −12 · 1 files · 1 commits · open Claimed in the coordination issue as: TEXT-TABLES-SHARED-REPORT-PATH (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: none Fixes: none ### What and why `tools/text_tables.py` answered the report-path question two ways: a private `_same_output_path` (`:427`, realpath + normcase + samefile) for the `--dialogue`/`--tables`/`--strings` outputs against each other (`:460`) and against a source folder's `index.json` (`:466`), and an inline `os.path.exists(...) and os.path.samefile(...)` against every input (`:463`). CONTRIBUTING.md asks a report writer to call `tools/report_paths.same_report_path` instead of deriving it again, and the private copy missed that helper's folding-volume probe: on a Linux mount that ignores case (vfat, exFAT, CIFS) two outputs differing only in case passed as distinct and the second replaced the first, and an output named like an input with a different case was not refused. Both places and the inline check now call `same_report_path`. The tool already puts its own folder on `sys.path` for `file_mode` and `hashdict`, so the import is one line; no test calls the private name, so it goes with the duplication. Different topic from TEXT-TABLES-RO-CLEANUP (#818, staged-file permissions). No behaviour change on Windows, macOS or a case-sensitive Linux filesystem. ### Tested - `tests/test_text_tables.py`: **33 passed**, 13 subtests passed. - `python -I tools/text_tables.py --help`: prints its usage (the import works under `-I`). - `python -m compileall -q tools/text_tables.py`: clean. - **Not tested:** the folding-volume case this fixes, which needs a case-folding mount (vfat/exFAT/CIFS); this machine is NTFS, where `normcase` already folds case. `tests/test_report_paths.py` covers the helper's own folding-volume answer. - No game files, no GPU; nothing was built. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:43:43 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 07:15 UTC · original

Reviewed 0d6800a: sandboxed on arm64 Linux against origin/main and the PR head: test_text_tables (33 ran, 1 Windows-only skip), test_report_paths (22 ok), test_report_path_case (4 ran, 1 macOS skip), test_missing_input_exit_codes, compileall, and check_no_game_data pass identically on both trees; git merge-tree vs main is clean. Guard probes match main on this case-sensitive volume, and with a patched folding volume the PR refuses nonexistent case-colliding output pairs (D.csv/d.csv) that main still accepts and routes the --labels/input and carve index.json guards through same_report_path as intended, with no regressions. Pre-existing, also on main: --tables naming a carve chunk file (or a file inside a source directory) overwrites it; worth a finding: in the coordination issue. Consider adding text_tables to tests/test_report_paths.py's SHARED or adding a guard test like #1216/#1052. AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 07:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1228#issuecomment-7155660686) Reviewed 0d6800a: sandboxed on arm64 Linux against origin/main and the PR head: test_text_tables (33 ran, 1 Windows-only skip), test_report_paths (22 ok), test_report_path_case (4 ran, 1 macOS skip), test_missing_input_exit_codes, compileall, and check_no_game_data pass identically on both trees; git merge-tree vs main is clean. Guard probes match main on this case-sensitive volume, and with a patched folding volume the PR refuses nonexistent case-colliding output pairs (`D.csv`/`d.csv`) that main still accepts and routes the `--labels`/input and carve `index.json` guards through `same_report_path` as intended, with no regressions. Pre-existing, also on main: `--tables` naming a carve chunk file (or a file inside a source directory) overwrites it; worth a `finding:` in the coordination issue. Consider adding `text_tables` to `tests/test_report_paths.py`'s `SHARED` or adding a guard test like #1216/#1052. AI-assisted review. **Recommendation:** Merge
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1228/head:github-bot/gh-1228'
git switch 'github-bot/gh-1228'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1228'
git switch 'github-bot/gh-1228'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1228'
git switch 'github-bot/gh-1228'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1228'
git switch 'main'
git merge --squash 'github-bot/gh-1228'
git switch 'main'
git merge --ff-only 'github-bot/gh-1228'
git switch 'main'
git merge 'github-bot/gh-1228'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.