check_no_game_data: reject invalid explicit paths (CHECK-NO-GAME-DATA-EXPLICIT-PATHS) #1024

Merged
djrolfes merged 1 commit from upstream-pr/1024 into main 2026-11-28 19:35:08 +00:00
djrolfes commented 2026-11-24 17:01:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by djrolfes on 2026-11-24T17:01:31Z.


Claimed: CHECK-NO-GAME-DATA-EXPLICIT-PATHS (coordination).

Depends on: #922 (Git-enumeration error handling, now retained from main).

What and why

An explicitly named missing file or directory must not report a successful safety scan that checked nothing:

  • lstat explicit inputs; reject missing, inaccessible and non-regular entries.
  • Reject symlinks without following them and FIFOs without opening/blocking on them.
  • Keep scanning siblings; a game-data match (exit 1) takes precedence over incomplete scan (exit 2).
  • Preserve default Git enumeration's intentional skips, and main's git_error diagnostics.
  • No workflow changes or directory recursion.

Only the scanner and its synthetic tests change.

Tested rebase

Head 4895588a9, based on main 490f5b9ec. Original reviewed head c26b99bae is preserved.

  • Scanner tests: 17 passed, including main's Git-enumeration failure controls and this PR's explicit-path cases.
  • Extension-workflow tests: 3 passed.
  • Python compileall, changed-file scanner and git diff --check: passed.

Linux / Python standard library; no GPU or game files. Native Windows not tested. FIFO/newline cases are platform-guarded; symlink tests skip if creation is unavailable.

The existing approval applies to the original head; reviewers may reassess this rebase. Hosted label checks are not full CI evidence.

AI-assisted: yes. No game content, keys or decryption.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5476693788 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1024). Originally posted by [djrolfes](https://github.com/djrolfes) on 2026-11-24T17:01:31Z. --- Claimed: **CHECK-NO-GAME-DATA-EXPLICIT-PATHS** ([coordination](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138467827)). Depends on: #922 (Git-enumeration error handling, now retained from main). ### What and why An explicitly named missing file or directory must not report a successful safety scan that checked nothing: - `lstat` explicit inputs; reject missing, inaccessible and non-regular entries. - Reject symlinks without following them and FIFOs without opening/blocking on them. - Keep scanning siblings; a game-data match (exit 1) takes precedence over incomplete scan (exit 2). - Preserve default Git enumeration's intentional skips, and main's `git_error` diagnostics. - No workflow changes or directory recursion. Only the scanner and its synthetic tests change. ### Tested rebase Head `4895588a9`, based on main `490f5b9ec`. Original reviewed head `c26b99bae` is preserved. - Scanner tests: **17 passed**, including main's Git-enumeration failure controls and this PR's explicit-path cases. - Extension-workflow tests: **3 passed**. - Python compileall, changed-file scanner and `git diff --check`: passed. Linux / Python standard library; no GPU or game files. Native Windows not tested. FIFO/newline cases are platform-guarded; symlink tests skip if creation is unavailable. The existing approval applies to the original head; reviewers may reassess this rebase. Hosted label checks are not full CI evidence. AI-assisted: **yes**. No game content, keys or decryption.
KernelSmoker commented 2026-11-24 17:06:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T17:06:27Z.

Review: APPROVED


Verified on exact head c26b99bae63ecc9416103bb90b50b4167c8290c8 (base fce586c6d6). The scanner suite passes 15/15 and workflow tests 3/3 on this host. Changed-file no-game-data and git diff --check pass. Explicit missing paths, directories, symlinks and FIFOs now fail closed without following/opening non-regular targets; the tests also preserve match-over-error precedence and default Git-scan skips. The direct PR builder scope is distinct from #922’s git ls-files failure behavior, although both touch the scanner and test module. Synthetic paths only; no game data or GPU.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6043846864 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1024#pullrequestreview-6043846864). Originally posted by [KernelSmoker](https://github.com/KernelSmoker) on 2026-11-24T17:06:27Z. **Review:** APPROVED --- Verified on exact head c26b99bae63ecc9416103bb90b50b4167c8290c8 (base fce586c6d6f74160eccff015d9806e179188d862). The scanner suite passes 15/15 and workflow tests 3/3 on this host. Changed-file no-game-data and `git diff --check` pass. Explicit missing paths, directories, symlinks and FIFOs now fail closed without following/opening non-regular targets; the tests also preserve match-over-error precedence and default Git-scan skips. The direct PR builder scope is distinct from #922’s `git ls-files` failure behavior, although both touch the scanner and test module. Synthetic paths only; no game data or GPU.
djrolfes commented 2026-11-25 19:37:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by djrolfes on 2026-11-25T19:37:24Z.


Rebased the same branch with an explicit old-head lease: c26b99bae -> 4895588a9, base 490f5b9ec; merge-tree also clean against e18b59a5b. The conflict resolution retains main’s git_error helper and Git-enumeration exception handling, then applies explicit-input validation at check(..., explicit=...). No detection magic, archive budget, or default Git skip policy was removed.

Retested on Linux: scanner 17/17, extension-workflow 3/3, Python compileall, changed-file scanner and diff checks pass. The original approved head is preserved locally; @KernelSmoker, the existing approval was for that older head, so please reassess this rebase as needed. No claim of full hosted CI from a label check. AI-assisted; synthetic paths only.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7172549802 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1024#issuecomment-7172549802). Originally posted by [djrolfes](https://github.com/djrolfes) on 2026-11-25T19:37:24Z. --- Rebased the same branch with an explicit old-head lease: c26b99bae -> 4895588a9, base 490f5b9ec; merge-tree also clean against e18b59a5b. The conflict resolution retains main’s git_error helper and Git-enumeration exception handling, then applies explicit-input validation at check(..., explicit=...). No detection magic, archive budget, or default Git skip policy was removed. Retested on Linux: scanner 17/17, extension-workflow 3/3, Python compileall, changed-file scanner and diff checks pass. The original approved head is preserved locally; @KernelSmoker, the existing approval was for that older head, so please reassess this rebase as needed. No claim of full hosted CI from a label check. AI-assisted; synthetic paths only.
MoonEyes commented 2026-11-28 19:35:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:35:05Z.


Red/green: tests/test_check_no_game_data.py fails 7 assertions on main (explicit directories, missing paths and symlinks are skipped silently) and passes with the PR (cloud run on main 7daa4a4).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244654064 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1024#issuecomment-7244654064). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T19:35:05Z. --- Red/green: tests/test_check_no_game_data.py fails 7 assertions on main (explicit directories, missing paths and symlinks are skipped silently) and passes with the PR (cloud run on main 7daa4a4). Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1024
No description provided.