Skip to content

fix(readers): project-wide directory listings are path-ordered on every platform - #101

Merged
SalmanShhh merged 5 commits into
mainfrom
claude/pensive-gagarin-752c21
Aug 25, 2026
Merged

fix(readers): project-wide directory listings are path-ordered on every platform#101
SalmanShhh merged 5 commits into
mainfrom
claude/pensive-gagarin-752c21

Conversation

@SalmanShhh

Copy link
Copy Markdown
Owner

DirAccess.list_dir_begin()/get_next() hands entries back in filesystem order (near-alphabetical on NTFS, hash order on ext4). The earlier scene-list fix covered one walk of 39; this audits the rest and sorts the 9 call sites whose order reaches something a person sees:

  • Find window results (list_project_sheets)
  • Project Doctor finding order and its "first user" picks (3 walks)
  • export report failure order
  • MCP list_sheets tool output
  • animation-track facts (first-file-wins per method + the 600-file scan cap)
  • signal note jump targets
  • the scene that names a script without a class_name
  • the node picker's capped cross-scene scan, which filled its cap with different scenes per platform

Walks whose order genuinely cannot matter (existence checks, counting sweeps, deletion sweeps, already-sorted listings) are left as they are. New tests/listing_order_test.gd pins the project-wide listings as path-sorted so a lost sort fails locally before it fails on another OS.

Verified: full parallel suite green (18,845 pass, "All tests passed."), pack drift gate audited=113 drifted=0.

DirAccess.list_dir_begin()/get_next() hands entries back in filesystem
order - near-alphabetical on NTFS, hash order on ext4 - and the scene
list was one walk of thirty-nine. An audit of the rest found eight more
whose order reaches something a person sees: the Find window's results,
the Doctor's finding order and its "first user" picks, the export
report's failure list, the MCP server's sheet listing, the
first-file-wins animation fact and its 600-file cutoff, a signal note's
jump target, the scene that names a script without a class_name, and the
node picker's capped cross-scene scan, which filled its cap with
different scenes per platform. Each sorts once at its collection point;
walks whose order cannot matter (existence checks, counting sweeps,
deletion sweeps) stay as they are. listing_order_test pins the
project-wide listings as path-sorted so a lost sort fails at home before
it fails on somebody else's OS.
…ests

Six assertions failed on continuous integration and nowhere else, and
the platform was never the reason: the serial suite runs in ONE process,
fact_cache_invalidation_test built the project share index and left it
ready, and every function head the two opened_pack tests rendered later
grew a "called by ..." chip their pinned spans never asked for. The
sharded local launcher split leaker and victims into different
processes, which is the only reason Windows stayed green - the same
three tests in one process reproduce all six failures on any platform.

The leaker now clears what it warmed, and the two tests that pin
function heads start from a cold index either way, so the suite answers
the same however the tests are grouped.
project.godot names the EventForgeBridge autoload by the script's uid,
but .gitignore dropped every uid sidecar - so a fresh checkout invented
a new uid for the script, booted with "Unrecognized UID" and a failed
autoload, and rewrote project.godot to a value no other machine shares.
The editor canonicalizes the autoload line back to a uid even when it is
written as a path, so the reference cannot be made uid-free; committing
the ONE sidecar that line depends on can, as a narrow exception to the
*.uid ignore. Every checkout now resolves the same uid and project.godot
stays byte-stable through an import.
…n-752c21

# Conflicts:
#	tests/fact_cache_invalidation_test.gd
@SalmanShhh
SalmanShhh merged commit 7ef2096 into main Aug 25, 2026
2 checks passed
@SalmanShhh
SalmanShhh deleted the claude/pensive-gagarin-752c21 branch August 25, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant