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

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

@⁠djrolfes on GitHub · 2026-11-24 17:01 UTC · original
djrolfes:djrolfes/check-game-data-explicit-paths → main · +99 −9 · 2 files · 1 commits · open

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.

**@⁠djrolfes** on GitHub · 2026-11-24 17:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1024) `djrolfes:djrolfes/check-game-data-explicit-paths` → `main` · +99 −9 · 2 files · 1 commits · open Claimed: **CHECK-NO-GAME-DATA-EXPLICIT-PATHS** ([coordination](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14)). 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.
Keep default git-list skips, but require regular files for explicit path arguments. Report missing paths, stat errors and non-regular entries with exit 2, without following symlinks or opening FIFOs. Continue scanning siblings and preserve match exit-1 precedence.

Synthetic regressions: 15 scanner tests and 3 workflow tests pass; full semantic suite 6165 tests with no failed files. Claimed as CHECK-NO-GAME-DATA-EXPLICIT-PATHS in issue #14. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:02 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 17:06 UTC · original · approved these changes

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.

**@⁠KernelSmoker** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1024#pullrequestreview-6043846864) · **approved these changes** 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.
Author
Owner

@⁠djrolfes on GitHub · 2026-11-25 19:37 UTC · original

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.

**@⁠djrolfes** on GitHub · 2026-11-25 19:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1024#issuecomment-7172549802) 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.
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/1024/head:github-bot/gh-1024'
git switch 'github-bot/gh-1024'

Merge

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