test: cover probe collision retries and fallback in file_mode #495

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

@⁠kotekompotek on GitHub · 2026-11-24 06:21 UTC · original
kotekompotek:work/file-mode-test-probe-retry → main · +50 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEST (#14)

What and why

  • Rebased onto current main.
  • Added retry and missing-target fallback tests for tools/file_mode.py in tests/test_file_mode_extra.py.

Tested

  • python -m pytest tests/test_file_mode_extra.py passed after rebasing onto current main.

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.
**@⁠kotekompotek** on GitHub · 2026-11-24 06:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/495) `kotekompotek:work/file-mode-test-probe-retry` → `main` · +50 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: TEST (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why - Rebased onto current `main`. - Added retry and missing-target fallback tests for `tools/file_mode.py` in `tests/test_file_mode_extra.py`. ### Tested - `python -m pytest tests/test_file_mode_extra.py` passed after rebasing onto current `main`. 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. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:04:04 +00:00
Author
Owner

@⁠Dezmonius on GitHub · 2026-11-24 06:36 UTC · original

Independent Windows check at 4bbc200 with CPython 3.14.7. All three new tests pass.

The missing-target test currently checks only that the returned integer contains mode bits. I tested a temporary copy where the FileNotFoundError branch returns 0 without calling new_file_mode; all three tests still passed on Windows. Could the test mock file_mode.new_file_mode to return 0o640, check that published_mode returns that value, and assert a single call with the missing file's absolute parent? I checked that assertion against the current head and the temporary copy. It passed on the head and caught the missing delegation in the copy.

Synthetic temporary files only. AI-assisted (Codex).

**@⁠Dezmonius** on GitHub · 2026-11-24 06:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/495#issuecomment-7124106816) Independent Windows check at `4bbc200` with CPython 3.14.7. All three new tests pass. The missing-target test currently checks only that the returned integer contains mode bits. I tested a temporary copy where the `FileNotFoundError` branch returns `0` without calling `new_file_mode`; all three tests still passed on Windows. Could the test mock `file_mode.new_file_mode` to return `0o640`, check that `published_mode` returns that value, and assert a single call with the missing file's absolute parent? I checked that assertion against the current head and the temporary copy. It passed on the head and caught the missing delegation in the copy. Synthetic temporary files only. AI-assisted (Codex).
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 08:58 UTC · original

Rebased on current ubi/main (3f81d46ac), no conflicts. The added tests pass locally on this base (python -I).

AI-assisted: yes

**@⁠kotekompotek** on GitHub · 2026-11-25 08:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/495#issuecomment-7157708011) Rebased on current ubi/main (3f81d46ac), no conflicts. The added tests pass locally on this base (python -I). AI-assisted: yes
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/495/head:github-bot/gh-495'
git switch 'github-bot/gh-495'

Merge

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