fix(linux): follow deep slave graphs for the slow-disk warning #655
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!655
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:fix/linux-deep-slaves-warning-20261115"
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?
Type: fix · Risk: low · Tested on: Linux full source-only parent/head runner and synthetic disk graphs · Needs: real deep LVM/RAID/LUKS read-only check
Why
The slow-disk warning can miss a hard drive below more than four device-mapper/RAID slave layers, reading a virtual node's
rotational=0instead. Classification changes only the warning: no storage-corruption, build-speed or physical-hardware claim; builds still continue on HDD.How to reproduce
Seen on: Linux synthetic sysfs fixture; real devices/mounts/sysfs untouched.
Settings and switches: private temporary files and links, no game setting.
Steps: put a
rotational=1leaf below five virtualrotational=0nodes; call_device_rotationalon the top.Expected:
Truefor the known underlying HDD.Actual: the original depth cutoff returns
Falsefrom a virtual device.What changed
Traverse deep slave graphs while preserving warning-only fallbacks.
nx2/disk.py,_device_rotational: iterative postorder traversal, active-realpath cycle guard and cached completed answers, including unknowns, for shared slaves.tests/test_disk_rotational.py: synthetic fixtures importingdisk, notmake_game; runner Windows skip plus direct unittest guard before setup.Cycles terminate; this is not an order-independent fixed-point classifier. The classification contract concerns stable acyclic graphs.
Measurements
Verdict: No new failed check or lost pass in the exact parent/head source-only comparison; failure signatures and skip reasons match.
Hardware: recorded Linux x86-64 host, 6 logical CPUs, 8074 MiB RAM, GCC 13.3; no GPU/driver used.
Scene: game-free public fixtures, isolated HOME/XDG/TMP; no game or human saves.
Method: one full normal default runner per exact commit, comparing check identities/statuses, skips and failure signatures; not timing, repeated runs or a performance median.
How to reproduce:
python -I -B tests/run_all.py --jobs 3on the pinned parent and head in the table with the same recorded environment and public prerequisites; the omitted instruction file is addressed by the source-only supplement below.7bacf846817b39fabd7dBoth full-runner exits are 1, not a fully green suite or hosted-CI result.
Existing main failures:
tests/test_appimage_player_build.py,tests/test_bake_portability.py,tests/test_crash_dialog.py,tests/test_env_on.py,tests/test_lift_cleanup_error.py,tests/test_make_game_cache.py,tests/test_missing_nup.py,tests/test_mods_size_table.py,tests/test_options_budget_once.py,tests/test_pipeline_tour.py,tests/test_readback_late.py,tests/test_vk_occlusion_queries.py,tests/test_vk_pgo.py,tests/test_walk_key.py.AGENTS.mdwas never materialized. Its public blob was supplied read-only in memory for two unchangedSwitchesRemovedmethods, passing on each commit. This is full-runner source-only qualification with that declared omission, not literal exact-tree/checkout or CI equivalence. The receipts retain complete stdout/stderr, unchanged source bytes/modes and empty owned process groups. None of these product checks was rerun for this description cleanup.Historical focused regression evidence
Historical main
6c9edffe5da1f5b5383977aeab3f544c0de25d4c→ original candidate4c8d73fa33e5c8a8316bb2d92541ddd15547f450, not a replay on later main. Identical initial deep-HDD test:False is not True, native exit 1 on baseline; passes after the correction. A later original-source negative control reproduces the failure.Retained Linux coverage: 20 distinct methods (11 graph + nine unchanged existing Linux), all passing without errors/skips: 1,100-layer HDD, deep SSD, mixed/unknown leaves, partition fallback, cycles and shared-slave DAG. The synthetic Windows-guard probe records 11 skips before
setUpwith no fixture activity; it is not native Windows or another algorithm RED. Its initial invalid attempt is excluded. No physical-storage or speed measurement is claimed.Flags and settings
None
Testing
Tested: the full exact Linux parent/head runner in Measurements (510 → 511 passes; 14 identical failures and 85 skips; both exits 1), with no new failure or lost pass and the declared source-only supplement. Retained focused tests are historical, not extra full-suite executions.
Not tested: real deep LVM/RAID/LUKS hardware, its build caller, native Windows, game/GPU behavior or later main. The new Linux graph module intentionally skips Windows.
Must be tested:
Risks
What could break: changing/unusual sysfs may yield unknown; cyclic graphs terminate without fixed-point HDD propagation. State grows with the finite graph visited.
Turning it off: revert; this warning never blocks the build.
Compatibility: no configuration, save/data, storage-content, renderer ABI, authentication or cache changes.
Readiness provenance
Captured state: non-WIP / author-ready, not approved or merged. The real-storage request remains pre-merge work.
Head
7b39fabd7dada970890807c27992c488b53a553b; direct commit parent2ba185eaa41345e5a0816d302ed8251c8a4124ae; integration baseline7bacf8468133f0751fa31ffc61bfbf4b6ecf2f87. The direct parent and integration baseline are deliberately distinct. This test-only follow-up was independently SPEC/quality reviewed and its exact new commit ran the complete normal Linux runner: 511 pass / 14 existing FAIL / 85 skip, compared with the retained 510 / 14 / 85 integration baseline, with identical failure signatures and skip reasons. Two unchanged source-check methods passed separately with the public AGENTS blob only in memory; AGENTS was never materialized, so this is source-only qualification, not literal exact-tree CI. The later input-snapshot main30cedbc5203bf5c6f79fbb58394d8d5634881e8fis not claimed tested. HumanBean rebased the earlier public commit; this one-line child follow-up was fast-forward pushed by Claudia.Rebase credit: HumanBean: "No tests were run here; the test boxes stay yours." Rebase and subsequent author test evidence are separate. The rebase box records the main used then; a ticked full-runner box uses the template's named-baseline-failure allowance, not an all-green claim.
HumanBean's review is
COMMENT, not approval: "Code-only review (nothing run)." It requests the storage receipt and consistent provenance. The non-blocking.resolve()suggestion is now implemented in the test setUp only: the temporary fixture root is canonicalized, with no production change. The retained alias RED and alias/canonical GREEN focused receipts remain separate from the new whole-runner result. A real deep LVM/RAID/LUKS hardware receipt is still missing; this test-root fix does not substitute for it.Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why. Not ticked yet: Testing's Tested names only the Linux game-free runner, and the change touches nx2/disk.py with no game run.
in Risks. Not ticked yet: Risks says state grows with the graph visited, and no memory or time for that growth was measured.
main. Pinned maintainer rebase only; actual parent and later unqualified main are distinguished under Readiness provenance.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.4c8d73fa334ab26f1fd64ab26f1fd62ba185eaa4Rebased onto
main@7bacf84(your branch had moved to 4ab26f1 while I worked, so this is on top of that): no conflicts. No tests were run here; the test boxes stay yours.WIP: fix(linux): follow deep slave graphs for the slow-disk warningto fix(linux): follow deep slave graphs for the slow-disk warningCode-only review (nothing run). The change reads correct to me.
queue/rotational, then walks up to the parent for partitions. The only change is that the depth-4 cap is gone.active, and shared slaves are cached inanswers. A back edge reads as unknown. The description says plainly that this is a termination guard and not a fixed-point classifier, which is fine for a warning-only check.RUN_ALL_SKIPand has the Windows guard, and it covers deep HDD, deep SSD, mixed, partition, cycle, DAG and 1100-layer cases.Why this is a comment and not an approval:
pr readyreads cleanly.Small, non-blocking:
test_shared_slaves_are_visited_once_in_a_dagcompareslistdircalls againststr(leaf / "slaves"). The code calls it with the realpath, so on a host where the temp dir is itself a symlink (macOS/tmp, for example) the count would be 0 and the test would fail. Resolving the root once with.resolve()insetUpavoids that.Re-review, code only (nothing run). The new head
7b39fabd7ddiffers from my earlier review's2ba185eaa4by one line:self.root = Path(tmp.name).resolve()in the test'ssetUp. That is the.resolve()I suggested, so the DAG visit-count test no longer depends on whether the temp dir is a symlink. No production change.The description no longer contradicts itself: the "remains WIP" text is gone and the Readiness section says non-WIP.
Still a comment, not an approval: the change's own "Must be tested" names a read-only check on a real deep LVM/RAID/LUKS stack, and nobody has posted that run. Once it is posted in the comments, this reads as mergeable as it is.
Code-only review of
7b39fabd7d; informational findings, with final approval left to another reviewer.No new correctness finding after reading the complete diff, disk-classification callers and both disk test modules. The new tests exercise actual temporary device graphs rather than matching source text; restoring the old depth limit would invalidate the deep-HDD/SSD expectations. The production change only reads the storage graph and does not alter disks or mount state. No overlapping open change was identified.
The outstanding evidence remains the real deep-storage check already recorded in HumanBean’s latest review: compare this classifier with independently known physical leaves on an existing Linux LVM/RAID/LUKS stack. The reported synthetic tests and baseline-qualified runner results do not substitute for that receipt. No unrelated game or GPU run is needed for this warning helper.
No tests, builds or PR code were run in this review.
The slow-disk warning now follows a slave graph of any depth. I read head
7b39fabd. The walk is right, and this is a comment, not an approval._device_rotationalused to stop after four slave layers and read that node'squeue/rotational, which is 0 on a device-mapper node. It now walks every slave, still without recursion. A known spinning slave wins. Known answers beat unknowns. When no slave answers, it reads the node's own queue and then the parent, as a partition does. A cycle stops, and a shared slave is read once. The build still only warns.The new checks call that function on temporary graphs, including a hard drive under five virtual nodes and a chain past Python's recursion limit.
nx2/disk.pyis unchanged on main6d72ca93since this branch's base, so the merge is that function and the new test.The description's own check is still open: a read-only comparison on a real deep LVM, RAID or LUKS stack, against disks someone already knows. The synthetic graphs do not stand in for that.
Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
**Not testable by hand:**line saying why and what stands in for it. Then tick it.It goes back to WIP until Tested on my own PC can be ticked;
pr readyit again then.fix(linux): follow deep slave graphs for the slow-disk warningto WIP: fix(linux): follow deep slave graphs for the slow-disk warningWIP: fix(linux): follow deep slave graphs for the slow-disk warningto fix(linux): follow deep slave graphs for the slow-disk warning