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

Open
opened 2026-11-26 20:20:38 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1228
Author: @breachato
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: text-tables-shared-report-path


📝 Commits (1)

  • 0d6800a text_tables: ask report_paths for the report-path guard

📊 Changes

1 file changed (+4 additions, -12 deletions)

View changed files

📝 tools/text_tables.py (+4 -12)

📄 Description

Claimed in the coordination issue as: TEXT-TABLES-SHARED-REPORT-PATH (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143809865)

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1228 **Author:** [@breachato](https://github.com/breachato) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `text-tables-shared-report-path` --- ### 📝 Commits (1) - [`0d6800a`](https://github.com/ubiquitarianism/leonida/commit/0d6800ad026387ac6c5b3034598d39bb4365719c) text_tables: ask report_paths for the report-path guard ### 📊 Changes **1 file changed** (+4 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `tools/text_tables.py` (+4 -12) </details> ### 📄 Description Claimed in the coordination issue as: TEXT-TABLES-SHARED-REPORT-PATH (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143809865) 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#1260
No description provided.