tests: the registration scan walks a root that is not a repository, even inside one (CI-REGISTRATION-OUTER-REPO) #2472
Open
robot00f wants to merge 1 commit from
upstream-pr/2472 into main
pull from: upstream-pr/2472
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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!2472
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2472"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by robot00f on 2026-11-27T15:34:02Z.
tests: the registration scan walks a root that is not a repository, even inside one (CI-REGISTRATION-OUTER-REPO)
Claimed in the coordination issue as: CI-REGISTRATION-OUTER-REPO.
What and why
tests/test_ci_registration.pybuilds a scratch tree intempfile.TemporaryDirectory()and expectsclaimed_test_filesto walk it.tracked_under_testsasksgit ls-files -- testsfirst, and git looks upward for a repository: when the scratch root is not one but sits under a directory that is, the outer repository answers (returncode 0) with no record oftests/, the list comes back empty and the walk never runs.Measured on this machine (Windows 10 Pro 19045):
%TEMP%isC:\Users\<user>\AppData\Local\Temp, under a repository atC:/Users/<user>, sotests/test_ci_registration.py:703fails withKeyError: 'tests/left_out_test.py'. The failure is not the path separator: line 133 already normalizesos.septo/in the walk. On Linux and on the CI runners%TEMP%is not inside a repository, which is why only a native Windows run sees it.What
The tracked list is used only when the root is the repository's top level:
GIT_CEILING_DIRECTORIESwas tried first and does not hold here: Git for Windows parses the drive'sC:as a list separator.Test
test_a_tree_that_is_not_a_repository_is_walked_even_inside_one:git initin a temporary directory, a scratch tree inside it withtests/test_inside.py, and the scan must return["tests/test_inside.py"](skipped when git is absent).test_the_scan_flags_an_unlisted_file_and_a_file_pytest_cannot_collect) passes again.With the previous code both fail here (
[] != ['tests/test_inside.py']and theKeyError). 19 of 19 pass with the change; the real scan of this checkout is unaffected, becauseROOTis the top level (normcase(realpath)equal) and takes the samels-filespath as before.Which GPU
None needed: no GPU and no game data (pages of a temporary directory). Run on Windows 10 Pro 19045.
AI-assisted (OpenCode, DeepSeek).
Imported from ubiquitarianism/leonida. Originally posted by djrolfes on 2026-11-27T17:36:22Z.
Independent Linux review/test at
0078060a3(merged cleanly onorigin/mainc0201a806). AI-assisted.tracked_under_testsverifiesgit rev-parse --show-toplevelmatchesrootbefore usinggit ls-files, falling back to walking whenrootis a non-repo directory nested inside an outer git repository.python3 -I tests/test_ci_registration.py: 19/19 OK (includingtest_a_tree_that_is_not_a_repository_is_walked_even_inside_one).python3 -I tests/test_text_write_line_endings.py: 3/3 OK.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-27T18:40:46Z.
Independent review of
0078060a31e83f1f5464b9d0ae01118123546bf1, merged withmain43a9d562d355e7c5c428e486071b456353de8b05(local mergee4b7dfe19b0836bc8236aa588291e7f0f91282dc).Finding — Windows checkout paths with non-ASCII characters:
tests/test_ci_registration.py:128–130readsgit rev-parse --show-toplevelwithtext=Trueand the default Windows encoding. On this machine Git outputs UTF-8 while Python 3.12.4 under-Iuses cp1252. In a synthetic checkout namedcafé, the decoded root no longer matches and the fallback walk includes an untracked test, makingtest_every_test_file_is_selected_by_a_jobfail. In a checkout containingā, decoding fails andtop.stdout.strip()raisesAttributeErrorinsetUpClass. The same entry-point test passes onmainin both checkouts. Specifyingencoding="utf-8"for this Git output fixed all three ASCII/non-ASCII probes and preserved the new nested-repository test in an isolated in-memory check.Windows 11 build 26300, PowerShell 7.6.10, Python 3.12.4 and Git for Windows 2.36.0:
test_ci_registration.py: ordinary TEMP: main 18/18, merged PR 19/19. TEMP inside a synthetic Git repository: main 17/18, merged PR 19/19. The new test fails as expected against main's implementation.test_text_write_line_endings.py3/3,test_run_standalone_tests.py5/5 andtest_ctest_registration.py6/6 on each revision. No-game-data check andgit diff --checkpassed.No game files or GPU were used. The targeted nested-repository improvement is demonstrated; the Unicode-path regression needs attention.
AI-assisted: yes (Codex, GPT-6.2 Sol).
Status: Please fix the Windows Unicode-path regression before merging.
Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-27T21:00:43Z.
Review: CHANGES_REQUESTED
The outer-repository fix and
os.path.normcase(os.path.realpath(...))comparison handle nested%TEMP%directories, Windows junctions/short paths, and worktrees well, but requesting changes to address the Windows non-ASCII path decoding issue noted by @TheGeogeo (and the matchinggit ls-files -zcall right below it) before we merge:Locale decoding on
git rev-parse --show-toplevel(tests/test_ci_registration.py:128-130) andgit ls-files -z(tests/test_ci_registration.py:131-133):Under
python -Ion Windows,text=Truewithout an explicit encoding decodes subprocess output withlocale.getencoding()(typicallycp1252), whereas Git for Windows emits UTF-8 bytes for both commands:%TEMP%intest_a_tree_that_is_not_a_repository_is_walked_even_inside_one) contains UTF-8 bytes undefined incp1252(e.g.č->0xc4 0x8dorā->0xc4 0x81),_readerthreadfails withUnicodeDecodeError, leavingstdoutasNoneand raisingAttributeError: 'NoneType' object has no attribute 'strip'(or'split'on line 133 for a non-ASCII path undertests/).cp1252(e.g.café->café),top.stdout.strip()silently mismatcheshereand falls back toos.walk, picking up untracked files undertests/.Suggested fix:
Drop
text=Trueand decode the raw path bytes withos.fsdecode(...), matchingtests/test_docs_links.py:107-112(on Windowsos.fsdecodealways uses UTF-8 even under-I, and on POSIX it preserves non-UTF-8 paths viasurrogateescape):(Similarly, in
test_a_tree_that_is_not_a_repository_is_walked_even_inside_oneat lines 729-731, please passencoding="utf-8", errors="replace"or read bytes soadded.stderrcannot becomeNoneifgit initfails in a non-CP1252 temp path.)Regression test:
Please add a test covering a synthetic repository root with non-ASCII characters (including a byte undefined in
cp1252such asčand a multi-byte Latin character such asé) verifying thattracked_under_testsstill takes thegit ls-filespath (ignoring untracked files) rather than raising or falling back toos.walk.AI-assisted review.
Imported from ubiquitarianism/leonida. Originally posted by robot00f on 2026-11-27T21:48:53Z.
Addressed in
d47eb157(rebased onto currentmain):text=Trueintracked_under_testsand decoded raw Git path bytes withos.fsdecode(...)(plus-c core.quotepath=falseonrev-parse --show-toplevel), matchingtests/test_docs_links.py.git init/git addsubprocess calls in the tests toencoding='utf-8', errors='replace'.test_non_ascii_repository_root_uses_tracked_list_not_walkcovering a repository root and tracked test path containing bothé(valid incp1252) andč(undefined incp1252) alongside an untracked test underpython -I(20/20 pass on Windows 10 Pro 19045).Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T22:02:33Z.
Verified by OreoFR
3408969a7+ PR headd47eb1570python -I tests/test_ci_registration.pyAI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:47:08Z.
#2472 | head
d47eb15704(merged cleanly onto origin/maine66c65b950) | Windows 11 (10.0.26200.9974, NTFS), Python 3.12.10 | AI-assisted: yesIndependent Verification (Windows 11)
+61/-6intests/test_ci_registration.py).python -I scripts/check_no_game_data.py tests/test_ci_registration.pypassed (rc=0).origin/maine66c65b950vs#2472 + origin/main):origin/main): Initialized an outer Git repository in%TEMP%with a non-repositoryscratch\tests\test_x.pysubdirectory inside it;tracked_under_tests(inside)returned[]onorigin/mainbecausegit ls-files -z -- testssucceeded against the outer repository and skipped the directory walk.#2472 + origin/main):tracked_under_tests(root)checksgit -c core.quotepath=false rev-parse --show-toplevel(os.path.normcase(os.path.realpath(...))+ raw byteos.fsdecode) before trustinggit ls-files, andpython -I tests/test_ci_registration.pypassed20/20(OK) on Windows 11 — including bothtest_a_tree_that_is_not_a_repository_is_walked_even_inside_oneandtest_non_ascii_repository_root_uses_tracked_list_not_walk(café_č_repounderpython -IWindows ANSI/cp1252 defaults).Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T04:28:59Z.
Review: COMMENTED
Static audit of
d47eb1570intests/test_ci_registration.py. No builds, tests, or GPU runs were performed.The linked worktree’s
.gitfile is sufficient for Git to identify its own top level. On Windows, the comparison resolves existing short names and symlink targets before normalizing slash spelling and case, including drive-letter case. The added tests cover discovery of a scratch tree inside an outer repository and selection of a tracked Unicode filename alongside an untracked test. The fallback prunes.gitdirectories. Untracked files are excluded when the scan uses the Git index.tests/test_ci_registration.py:134strips all trailing CR and LF bytes from--show-toplevel. A POSIX checkout whose directory name ends in a carriage return therefore falls back to the walk, which can flag an untrackedtests/left_out_test.pyas a registration failure. Remove exactly one output LF and strip a preceding CR only on Windows. A POSIX fixture with a CR-ending root and an untracked test would exercise this case.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T06:05:58Z.
Verified on this machine (Windows 11, Python 3.13.14). Additive test coverage, and I want to be precise that it is that - there is no negative control available here, because the new cases test code that this same file introduces.
1. It applies.
merge-treeclean;d47eb1570cherry-picks ontomain0ae217cebwithout a conflict. One file,59 insertions(+), 4 deletions(-)intests/test_ci_registration.py.2. With the change:
3. On
mainthe same file runs 18 passed, 44 subtests - the two extra cases are the ones the commit adds, and nothing onmainfails. So this is new coverage, not a fix: the rule that the registration scan walks a root that is not a repository (and therefore finds nothing to register) had no test before, and now it has two.Why that is still worth merging: it is the case that produced a false red in CI - a scan rooted at a non-repository returning nothing looks identical to a scan that found every test already registered. A test that pins the distinction is what makes the next person trust the output.
What I did not test: the CI selector itself (the
python -I <file>path versus pytest). The two new cases are inside the same file, so they run wherever the file runs; I confirmed the file's pytest path only.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T17:25:03Z.
Independent check on Windows (not the author), at
d47eb1570.python -I tests/test_ci_registration.py: 20 tests OK in 10.6 s, including the outer-repository root case.Environment: Windows 11 Pro 10.0.26200.9711, Python 3.12.10.
AI-assisted: yes (opencode).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:44:03Z.
Review: APPROVED
Reviewed the diff against
main:tests/test_ci_registration.py:120-143cleanly checksgit rev-parse --show-toplevelagainstrootbefore trustinggit ls-files(preventing an outer repo from masking a scratch tree) and decodes rawgitoutput withos.fsdecode, covered by both outer-repo and non-ASCII tests. Clean-room verified. Approving; please merge/rebase currentmainso CI runs green before merge.(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-02T00:57:36Z.
Checked a Windows checkout created with git init --separate-git-dir, with a non-ASCII working directory and a .git file pointing to separate metadata. At main
4fe371f90and at the local merge withd47eb1570, tracked_under_tests at the checkout root selected the one staged test and omitted a neighboring untracked test. For a scratch tree inside that same checkout, claimed_test_files returned an empty list on main and exactly tests/test_nested.py after the merge. This reproduces the nested-directory fix while exercising the real repository case where .git is a file. Codex-assisted.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:13:09Z.
Verified #2472 on Linux: 20/20 pass merged onto current
main; the nested-repository case is red withmain'stracked_under_testsand green with this one.d47eb15704(unchanged since 27 November)main45dc41f95c(git merge --no-ff, clean; merge base39f52f39c4, 2,929 commits behind)Ran
Red/green. Source and test live in the same file, so I replaced only the body of
tracked_under_testswithmain's version (kept the new tests) and reran:That is the bug the title names: inside an outer repository,
git ls-files -- testssucceeds with an empty list and the walk never runs.test_non_ascii_repository_root_uses_tracked_list_not_walkpasses on both sides here, as expected on Linux (UTF-8 locale); its red side is the Windows cp1252 decode, which I could not reproduce. KelboLive, fiestorra and andrew-ai report it on Windows.Review. Comparing
realpath/normcaseofrev-parse --show-toplevelwith the root, and decoding-zoutput as bytes withos.fsdecode, is the root-cause fix, not a fallback.except (OSError, UnicodeDecodeError)falls through to the walk, which is the safe answer. No defects.CI. The red
checkon the head istests/test_windows_boot_journal_seed.pyandmacos-pythonwas cancelled, both from a 27 November run on a 2,929-commits-old base; this PR does not touch either. A merge ofmaininto the branch would refresh CI.Verdict: ready (needs a fresh CI run on a current base; the code needs no change).
AI-assisted: Claude Opus 5.5 (Claude Code), verification only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T21:54:24Z.
The
checkfailure here (job 143766686004:BootJournalSeedTest,runneradmin!=runner~1) is not from this PR. That job testedrefs/pull/2472/mergeon base34e33d3d(27 Nov), which predatesd98fc7fb(#2593, merged 29 Nov). That commit makes the boot journal seed test compare long paths on the runner's 8.3%TEMP%. Merging currentmaininto this branch should turncheckgreen. #3231 adds explicit 8.3 short-path cases for the same test.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.