[PR #1244] restofworld_model_join: ask report_paths for the report-path guard (RESTOFWORLD-MODEL-JOIN-SHARED-REPORT-PATH) #1277

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

📋 Pull Request Information

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

Base: main ← Head: restofworld-model-join-shared-report-path


📝 Commits (1)

  • 9638d91 restofworld_model_join: ask report_paths for the report-path guard

📊 Changes

1 file changed (+7 additions, -9 deletions)

View changed files

📝 tools/restofworld_model_join.py (+7 -9)

📄 Description

Claimed in the coordination issue as: RESTOFWORLD-MODEL-JOIN-SHARED-REPORT-PATH (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143975647)

Depends on: none

Fixes: none

What and why

tools/restofworld_model_join.py derived the report-path answer itself inside _aliases_input (:1236-1257):
realpath + normcase compared by hand twice (the source, then the carve folder's index.json) and
os.path.samefile twice, to refuse an --out that would overwrite the archive, the folder manifest or a carved
stream. CONTRIBUTING.md asks a report writer to call 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) --out INDEX.json beside an existing index.json was not refused and replaced the manifest.

The equalities now go through same_report_path; the last branch of _aliases_input is untouched because it is a
containment rule, not an equality (an output inside the carve folder with a .bin/.bk2 name), and
tests/test_carve_short_system_pages.py asserts it. The tool had no tools/ entry on sys.path, so one is added
for the import, as tex_headers does. Different topic from OLD-7750 (#886, page-map slots and index.json load).
No behaviour change on Windows, macOS or a case-sensitive Linux filesystem.

Tested

  • tests/test_restofworld_model_join.py, tests/test_carve_short_system_pages.py and
    tests/test_report_path_case.py: 23 passed, 1 skipped, 44 subtests passed.
  • python -I tools/restofworld_model_join.py --help: prints its usage (the import works under -I).
  • python -m compileall -q tools/restofworld_model_join.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/1244 **Author:** [@breachato](https://github.com/breachato) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `restofworld-model-join-shared-report-path` --- ### 📝 Commits (1) - [`9638d91`](https://github.com/ubiquitarianism/leonida/commit/9638d9108e62d51dac0e4715180011c140fce9d0) restofworld_model_join: ask report_paths for the report-path guard ### 📊 Changes **1 file changed** (+7 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `tools/restofworld_model_join.py` (+7 -9) </details> ### 📄 Description Claimed in the coordination issue as: RESTOFWORLD-MODEL-JOIN-SHARED-REPORT-PATH (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143975647) Depends on: none Fixes: none ### What and why `tools/restofworld_model_join.py` derived the report-path answer itself inside `_aliases_input` (`:1236-1257`): realpath + normcase compared by hand twice (the source, then the carve folder's `index.json`) and `os.path.samefile` twice, to refuse an `--out` that would overwrite the archive, the folder manifest or a carved stream. CONTRIBUTING.md asks a report writer to call `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) `--out INDEX.json` beside an existing `index.json` was not refused and replaced the manifest. The equalities now go through `same_report_path`; the last branch of `_aliases_input` is untouched because it is a containment rule, not an equality (an output inside the carve folder with a `.bin`/`.bk2` name), and `tests/test_carve_short_system_pages.py` asserts it. The tool had no `tools/` entry on `sys.path`, so one is added for the import, as `tex_headers` does. Different topic from OLD-7750 (#886, page-map slots and `index.json` load). No behaviour change on Windows, macOS or a case-sensitive Linux filesystem. ### Tested - `tests/test_restofworld_model_join.py`, `tests/test_carve_short_system_pages.py` and `tests/test_report_path_case.py`: **23 passed, 1 skipped**, 44 subtests passed. - `python -I tools/restofworld_model_join.py --help`: prints its usage (the import works under `-I`). - `python -m compileall -q tools/restofworld_model_join.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#1277
No description provided.