Two LOCAL fingerprint mode tests assume a 0022 umask and fail under 0002
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #382 by @iceboundrock — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read the two named tests in tests/test_local.py and the _mode_text implementation in src/autoforge/local_workspace.py. Run them under umask 0002 and 0022 to confirm the failures and current behavior. Update the tests so restoring the original mode preserves the starting fingerprint under either umask; both tests should pass in both runs.
Written by the indexing model from the issue text.
Description
Two tests fail when pytest inherits umask 0002 and pass under 0022:
tests/test_local.py::test_fingerprint_notices_a_mode_change_on_an_already_dirty_filetests/test_local.py::test_a_mode_change_is_bound_even_with_core_filemode_disabled
Each makes a file executable, then restores a hard-coded 0644 and expects the original fingerprint. That only holds if the file started as 0644. The property they check, that LOCAL's fingerprint moves on chmod +x and moves back when the change is undone, still holds under 0002. The failures were found in the M0 baseline on #339, and PR #345's review ran into them again.
What happens
Each test takes a fingerprint of a file, chmods the file to 0755 and checks that the fingerprint moved. It then chmods the file to 0644 and asserts the fingerprint equals the first one (tests/test_local.py:308 and :3393). The fingerprint records each inspected file's full permission bits: _mode_text in src/autoforge/local_workspace.py:317-318 writes S_IMODE as four octal digits. Under umask 0002 the file is created 0664, so after the round trip it is 0644, not its original mode. Both assertions then compare two different fingerprints and fail.
I reproduced it on main at 6fddbc9, with CPython 3.12.15, in a fresh worktree. Under umask 0002, both tests fail, at :308 and :3393. Under umask 0022, both pass.
Evidence
- This host's login umask is 0002 (Debian 13.7). M0's first full run inherited it, and both tests failed. A bounded rerun with a child-only umask of 0022 passed both (M0 report, section 5, items 2–3). Every later measured run here set 0022, which is why the two tests don't appear in #345's A/B or in
make check. - PR #345's review reproduced the same pair under an inherited 0002, and saw both pass under 0022.
- CI passes both. I haven't checked the hosted runner's umask.
Impact
Run from a shell with umask 0002, make check reports two failures in LOCAL's fingerprint tests that say nothing about the change under test. A developer has to recognise them, or run with a narrower umask, which the repository doesn't document.
Desired outcome
Both tests pass under any umask pytest inherits, and they still prove that undoing the mode change restores the original fingerprint.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 5h 46m
- Merged PRs (30d)
- 82
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from iceboundrock/AutoForge
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
iceboundrock/AutoForge#304 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
iceboundrock/AutoForge#389 ·
Maintainers usually reply within 1 day
-
[RET-A5][P1] Remove LOCAL runtime state machine, workspace fingerprint and evidence implementationOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
iceboundrock/AutoForge#388 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
iceboundrock/AutoForge#387 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 28/100
iceboundrock/AutoForge#386 ·
Maintainers usually reply within 1 day
All issues in iceboundrock/AutoForge
Similar issues
-
area/profiles comp/cli P3 type/feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NousResearch/hermes-agent#146372 ·
Maintainers usually reply within 1 day
-
[BUG] OpenAI-compatible embedding model alias breaks embedder constructionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
GeoSeries scale and skew tests fail with pytest 9.2.0Possibly taken @jiayuasu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
admission-deferred priority: medium status: ready work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melodic-software/claude-code-plugins#10887 · 4 comments ·
Maintainers usually reply within 1 day