Skip to content

fix(operations): finish file operations on network, FUSE and removable mounts - #1729

Merged
l0gicgate merged 168 commits into
mainfrom
fix/1590-filesystem-compat-followups
Oct 20, 2026
Merged

l0gicgate merged 168 commits into
mainfrom
fix/1590-filesystem-compat-followups

Conversation

@ogarza

@ogarza ogarza commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Description

#1615 made Strata's file operations safe on NFS, SMB, FUSE, FAT and case-insensitive filesystems (steps 1–3 of #1590). This PR finishes the umbrella with steps 4–8, the 16 follow-ups from #1615's last review, and the fixes the lab acceptance runs found. Each step is its own group of commits; pieces that several steps need were built once and shared. The lasting behaviour is documented, mainly in docs/filesystem-compatibility.md.

Shared pieces

  • One registry of Strata's reads and running operations (services::file_activity). Every read of a user's file registers there, and every operation registers before it changes anything. Operations use it to stop Strata's own reads; change checks and leftover detection use it to skip folders an operation is working in.
  • Request lanes for mounts that stop answering (mount_lanes). Folder loads, probes, monitor creation, releases, the leftover review and change checks go through the lane of their mount.
    • A lane stalls once a request on it has gone 2 s without an answer of its own. EIO, ETIMEDOUT, EHOSTDOWN and ENOTCONN are not answers, and a cached answer to one request never vouches for another.
    • A stalled lane refuses new interactive requests at once as timed out and skips background ones, so a dead server parks no more workers, except one test request at a time and one per path reached through a link into a mount not yet identified. After 10 s the mount counts as not responding.
    • A mount-table change that removes a stuck mount answers the requests waiting on it as timed out, and the next request starts its own call.
  • A mount-table watcher on its own thread. It polls /proc/self/mountinfo, waits 50 ms for a burst to end, and publishes to readers that do no I/O.
  • A change stamp per load. Every folder load starts with one forced statx (a GIO query on GVfs) that records the folder's times, its identity and the mount it is really on. Monitors, rename following and change checks start from it.
  • One identity rule per mount, replacing two rules that disagreed (step 6).
  • One table of Strata's hidden names (model::hidden_names), which also tells other programs' leftovers apart.

Step 4: release open files before changing them

  • Before any operation (rename, paste, Delete, Trash, restore, undo, redo, compress, extract, new item, leftover restore, Empty Trash, unmount) changes an item, Strata stops its own reads of it and of everything inside it: previews and their sandboxes, media playback, waveforms, thumbnails, metadata probes and background listings.
    • New reads are refused ("This item is being changed by a file operation."), and running ones are waited for, at most 2 s.
    • Afterwards the preview follows the item to its new name, and a stopped thumbnail is asked for again rather than cached as failed, also when the refusal arrives after the operation ended.
  • After every bubblewrap exit, killed or not, Strata waits up to 1 s on a pidfd until the sandbox's namespace and its bind of the file are gone. Unmounting a drive from Strata releases everything under its root first.
  • So NFS, SMB and libfuse no longer leave .nfs…, .__smbfile_silly… or .fuse_hidden… files because of Strata, and deleting or moving such a folder no longer fails with "The folder is not empty".
  • A folder that holds only another program's leftovers gets a short wait: 2 s on NFS and FUSE, and on SMB the client's closetimeo plus 0.5 s (at most 10 s). One wait covers a whole operation.
    • If the leftovers stay, the error says the folder still holds an open file and names the program. Strata checks its own reads first, then /proc/*/fd (confirmed by fdinfo), then /proc/*/maps, and names the app where its process says which one.
    • Strata never deletes, renames, copies or moves other programs' leftovers on its own; a leftover the user selects by name is deleted like any file. A merge's set-aside folder that only such a leftover keeps is reported as still open and does not fail the merge.
  • SMB: a folder rename, move or Move to Trash refused with EACCES is retried for that budget, then names the holder or keeps "Permission denied" (with POSIX extensions, nothing waits). A file refused with EBUSY says "It is still open in a program on this or another computer."

Step 5: no file calls on the interface thread

  • The following run on workers instead of the GTK main thread:
    • opening, arrowing into and typing folders, GVfs folder checks (on their backend's lane), and creating monitors (one serial worker owns every monitor);
    • location completion, forgetting deleted folders' settings, restoring tabs and the default folder;
    • context menus, Send To and its remembered folders, the delete dialog, drag targets, drive Properties, the Format dialog and encryption hints;
    • undo and redo checks, Compress and Extract checks, and the Copy To, Move To and Extract To choosers;
    • search hits, launching programs and terminals, the AUR helper lookup and Open With history;
    • pinned folders, custom actions (store, run folder, interpreter check), the restart waiter, the settings and theme file monitors, removing the previous version's copy after an update;
    • entries built for monitored links, Trash drops and Recent, the file chooser's check of a downloaded link, a preview's audio output (GStreamer's start-up included);
    • closing enumerators, streams and the folder descriptors of restores, merge undos and Replace pastes.
  • Strata's own settings and state files are saved by one background writer. Quitting waits up to 10 s for queued saves.
  • Once its command-line paths are resolved, Strata makes / its working folder. The source-preview style scheme is built in memory, and previews read GtkSourceView's bundled and system language folders, never the user's own.
  • A dead network mount or a dying disk can make an action slow or fail, but the window keeps answering.
  • Only a proven absence counts as missing:
    • A timeout no longer clears the default-folder preference or closes a restored tab.
    • Undo drops an item only when it is proven gone, so a moved dangling link is now undone.
    • Search drops only hits proven gone.
  • Tooling.
    • Every disk seam asserts in debug builds that it runs off the UI thread.
    • STRATA_UI_STALL_MS starts a watchdog that logs the call the UI thread is blocked in.
    • scripts/trace-main-io.py runs E2E scenarios with the UI thread under strace and classifies every file call; tests/e2e/main-io-allowlist.toml lists the documented exceptions. A full run on this branch (21b3783c, the final code; 1,088 traced launches) found 0 violations and no stall over 1 s; the only listed calls are the documented GIO application-lookup exception (545 calls).

Step 6: stable identity where inode numbers change

  • Every "is this still the same item?" decision goes through one rule per mount. That covers Replace targets, set-aside originals, a move's copies and sources, cleanups, the Trash check, Trash lookups, saved views of trashed items, and renamed open folders. The rule weighs device, type, file handle, birth time, inode number, and size and times, according to what the mount keeps.
  • vfat and exFAT are identified by birth time, and files also by the size and modification time the operation recorded, since FAT counts births in 10 ms ticks. Without such a record, only the exact inode passes, as on main. exFAT folders are identified by type, since every rename into a folder resets its birth time.
  • SMB uses the server's creation time, plus the server inode number while the mount still shows serverino. The client can drop it without notice, so this is read again at each decision. A move's sources keep their link-count and change-time check.
  • sshfs, exfat-fuse and vboxsf report no birth time: files are known by size and modification time, but a move's copy and Strata's cleanups need the exact inode number. A single Replace target or stage is held with an O_PATH descriptor so it keeps its number; never on NFS.
  • NFSv3, NFSv4 entries without a birth time, and ext2/3/4 without birth times compare file handles.
  • ntfs-3g counts as keeping numbers once Strata's link probe shows it does.
  • This ends:
    • false "changed while the operation was in progress" and "changed while it was being copied" results on vfat and sshfs;
    • exFAT merges without Trash that failed at the end;
    • SMB moves that kept their sources;
    • replacements another client made that passed for the original;
    • case-only renames refused as "already exists" at the 10xer rename prompt on exfat-fuse and on SMB after the switch-off.
  • Undo of a Delete, a paste's Replace or a merge records the identities of the items it trashed, so it no longer brings back another item trashed later from the same path. Two Trash items that still match equally stay there: "More than one item in Trash could be “%{name}”, so they were left there".

Step 7: changes made elsewhere

  • Which folders are checked. Visible folders are checked when their mount has other writers: NFS, SMB, 9p, virtiofs, every FUSE mount except fuseblk, and GVfs locations except admin://, mtp:// and gphoto2://. Folders without a live monitor are checked too.
  • How a check works. A check re-reads the folder's stamp as background work on its lane. A moved stamp starts a background re-list, as do the coarse-stamp confirmation and the re-read after 30 s away. A permission refusal re-lists so the folder shows it. A folder found gone or replaced follows the rename, reloads in place or leaves, as a monitor's report would.
  • Cadence. 3 s in a focused window and 15 s in a visible one; nothing while the window is hidden, minimized or reported suspended, or the tab is not selected. Power-saver mode slows focused checks 4 times and stops unfocused ones. Unchanged folders slow down, and a slow listing pushes its next check back. Regaining focus checks at once, and re-lists after 30 s or more away.
  • Re-lists keep the rows. A background re-list that fails, is refused, or stops at the load's time budget keeps the previous listing; one cut at the entry limit is shown, marked as cut. F5, Retry and a monitor's rescan on a mount that stopped answering keep the rows too, on GVfs as well, and run again by themselves once the mount answers. A folder that failed to load while its mount was not answering loads again by itself then.
  • Coarse stamps. On mounts with whole-second times (sshfs) the stamp is confirmed once its window has passed. On sshfs that is no earlier than 21 s, because of the daemon's own cache.
  • Mounts whose stamp never moves. Where a load proves that the stamp stays put while the names change, the mount's folders are re-listed instead of checked.
  • "Watch network folders" (Settings → General → Performance, on by default) replaces "Auto-refresh folder". Off, folders on mounts with other writers are not checked.
  • "Not responding. This list may be out of date." shows above the listing in Columns, List and Icons after 10 s without progress on the mount, and clears when the mount answers.

Step 8: leftovers after a crash or unplug

  • Five kinds of hidden names. New builds leave only five kinds: probe, copy, extraction, originals and merge. An original that Replace, archive Replace or a case-only rename moves aside goes into a .strata-originals-<id>/ folder under its own name. Exchange runs through that folder, so stages only ever hold copies. The move into the folder is a plain rename plus an identity check, flushed folder-first, as the lab required.
  • Recognising them. Strata recognises every hidden name current and earlier builds leave, from the listing it already makes, with no extra file call. It never does this while an operation of this process works in the folder.
  • Where they show: a pane-header button ("Items left by an interrupted operation"), a dock card the first time per session that a folder holding possible originals is shown, and the context menu's Restore on such a row.
  • The review lists each item with what it may hold. Restore puts originals back under their own names and never replaces: a taken name gets the next Keep Both number. Show reveals the item. Delete… is offered only for incomplete copies, through the usual confirmed Delete.
  • Automatic removal. Strata removes nothing on its own except empty .strata-probe-* names older than an hour.
  • Lab emulation of the protocol. 932 kills on NFSv3, NFSv4.2, SMB and sshfs and 200 unplugs on vfat, exFAT and ntfs3 lost no original, and Restore emptied every folder it met. This was a C emulation, not Strata itself.

Also in scope: undo without GVfs on other mounts. Without GVfs (GIO_USE_VFS=local or no gvfsd), undoing a Replace, a merge copy or a Delete on a mount other than the home one failed with "Operation not supported". Undo now reads that mount's .Trash-$uid and .Trash/$uid directly, as it already read the home Trash. A Trash folder counts only if it is a real folder the user owns, as in GLib.

#1615 review follow-ups (all 16 done)

  • F1: an unknown or unreadable mount type never lets a lost-reply placeholder be removed on an equal inode number.
  • F2: a hard-linked file's change time is checked through its other names within one item, on SMB too.
  • F3: undo of a merge without Trash removes the read-only folders it placed.
  • F7: an item found at a placement's destination with another identity is left there and reported, never moved back.
  • F8: the copy and move worker failures are localized.
  • F9: Keep Both for archives tries every number; an extracted readme. is numbered readme. (2).
  • F11: a replacing move whose original cannot be removed completes with Undo and names the folder that keeps it. A staged Replace and a compression do the same (a compression has no Undo).
  • F12: a cancelled merge without Trash ends as Cancelled, with its originals back.
  • F13: the Trash check holds the item across GLib's call, except on NFS, and reports what actually went to Trash.
  • F14: a published stage is dropped off the main thread.
  • F16: names are quoted, and a section with one item gets a singular heading.
  • F4, F6, F10 and F15 are test fixes (honest presets, a seam for rotational disks, folded tables, a racer that must meet). F5 learns tmpfile linking and copy_file_range support per mount instead of per process, and keeps a failing test's main-context tasks from aborting the run.

Decisions taken with the owner

  • 2026-10-16, Q1–Q12, each answered with the recommended option:
    • Q1: Delete… in the leftover review only for incomplete copies, confirmed, through the normal Delete.
    • Q2: set-aside originals go into .strata-originals-<id>/ under their own names.
    • Q3: SMB identity is the server's creation time, plus its inode number while serverino holds.
    • Q4: on renumbering mounts, a move's copy is proven by birth time where both readings have one, else by the exact inode.
    • Q5: other programs' leftovers are never deleted; the error names the holder.
    • Q6: monitors everywhere, created off the interface thread; network folders are checked; "Watch network folders" (on) replaces "Auto-refresh folder".
    • Q7: 2 s without progress answers requests at once as timed out and keeps the listing; 10 s shows "Not responding".
    • Q8: file handles on NFSv3 and ext2/3 without births (198 of 198 reuses in the lab).
    • Q9: one background writer for Strata's own files; start-up reads stay synchronous.
    • Q10: a pane-header button, plus a dock card the first time per session.
    • Q11: on focus, check visible network folders at once, and re-read them after 30 s away.
    • Q12: the holder is named by its app where known, else by its process name.
  • 2026-10-16: on mounts with neither stable numbers nor birth times, Undo of a Delete matches Trash items by path, date, type, size and modification time.
  • 2026-10-18: all of steps 4–8 ship in this PR, and the four lead calls listed first below are approved.

Decisions taken by the lead

Approved by the owner (2026-10-18):

  • SMB folder renames (s4.10): retry only after a refusal. On Linux 7.2.5 no rename was refused after a close (0 of 360 in the lab), so the retry for closetimeo plus 0.5 s (at most 10 s, cancellable, off the UI thread) runs only once a rename has been refused, for the unverified 6.17–7.1 kernels. Then the holder is named; with none found, "Permission denied" stays.
  • Hard links at the rename prompt (df3b0001, 4f0a4ce6, 644a0c1b): the 10xer rename prompt refuses another hard link's name, or its case variant, with "“link.txt” already exists". On main the prompt closed and the rename failed; nothing changes on disk either way.
  • Write-only destinations (such as a 0733 drop box) stay accepted in the Copy To, Move To and Extract To choosers, since fix(operations): make file operations safe and fast on NFS, SMB, FUSE, FAT and case-insensitive filesystems #1615 supports moves into them. Extracting into one still fails ("Could not open extraction destination: Permission denied").
  • Working folder / (1a3145af): Strata leaves its launch folder once command-line paths are resolved, so a dead mount there blocks nothing. A program Open With starts without a Path= of its own now starts in /.

Lead calls (owner may override):

  • Ambiguous Trash matches are refused (0700cf32). When two Trash candidates for one original still prove the same with equal rank, Undo and restore leave both in Trash and report the item, instead of taking the first listed. The other items of the undo are restored.
  • A FAT birth time alone never proves a file for a cleanup (f14382b6). A file Strata made or set aside is removed where its exact identity still matches or, once renumbered, only where its birth time matches together with the size and modification time recorded once it was complete; without that record, only the exact inode passes, as on main. Size and times count only beside a birth time, so sshfs, exfat-fuse and vboxsf keep needing the exact inode.
  • Placement destinations (F7, above).
  • Originals that cannot be removed: a staged Replace and a compression complete and report it (F11, above).
  • Folders that cannot be checked: a default folder or restored tab that times out opens with its error, keeps the saved choice and loads by itself once the mount answers. Typed-path completion keeps the previous list until the new one arrives.
  • Renamed open folders that nothing proves (on mounts that renumber and report no birth time, such as sshfs, and every exFAT folder) are not followed: the view goes to the nearest folder that still exists.
  • Error pages and failed monitors are not re-checked or retried; checks cover an unmonitored folder.
  • Quitting waits up to 10 s for queued saves (the design had 1 s).
  • Off-device links stay listed in a removable device's folder chooser; opening one shows an error.
  • Other programs' leftovers are left out of copies and moves without a report line.
  • Older flat hidden names are restored as "Recovered item", with the name editor open.

Lane choices integrated without a recorded lead answer (owner may override):

  • Text previews no longer use language definitions from the user's own gtksourceview-5 folder.
  • New File: a cancel that arrives after a local create has started reports the file as created, with Undo.
  • Cancelling a merge or Replace whose original another program holds open can take the leftover wait once more.
  • A merge whose folder only another program's open file keeps completes and reports it, like F11 (577eb5f9).

Lead call (owner may override), rv-ui-a-4:

  • With "Watch network folders" off, network folders without a working monitor (GVfs SMB and SFTP, or a failed monitor) are not checked at all, so off stops every check of network shares, matching the subtitle (Visual evidence 4). Checking those folders anyway takes one line in qualifies, a test row and the original subtitle back in all 11 catalogs.

Lab acceptance (fslab)

local_operations:: and leftovers:: ran on all 14 lab mounts, and undo, restore and trash on vfat, exfat and exfat-fuse, each compared with main on the same mounts (leftovers:: has no counterpart on main, so every failure there counts as new). Round 3 reran six of them. Many tests fail by design on limited mounts on both revisions (§ Real filesystems); what counts is what is new here. Three rounds found three product regressions, each in an earlier commit of this branch, and all three are fixed here:

  • C1 (0700cf32): on kernel exFAT, Trash matching took equal birth times as proof, so Undo could restore another Trash item from the same path made within the same 10 ms tick and trashed within the same second. Nothing was deleted.
  • C2 (f14382b6): on vfat and exFAT, a failed copy's or restore's cleanup could delete a file another program put at one of its names within the same 10 ms tick.
  • C3 (be59e664): on SMB without server inode numbers, a Compress cancelled, or failing to close or publish, after writing its archive left its hidden .strata-copy-* stage, because the client reports the written file's old modification time until it revalidates. Its fix records the stage from a forced stat by name where the mount caches attributes. Nothing was lost.

The test-seam defects found on the way (R1–R11, and an exFAT folder-birth artefact) are in test code only: production never takes those paths. Undo of Delete end to end (first round, 65c88643; not rerun): all 78 browser Trash undo, redo and put-back tests passed on vfat, exfat and exfat-fuse; the operations' undo and restore failures there also fail on main. Other new failures: C1, fixtures those mounts cannot hold, C1's test on exfat-fuse (by design: no birth times), test defects R7 (restored tabs, vfat timing) and R10 (exfat-fuse paste_results), and an exfat merge-cancel row that passed alone in round 2.

Final run (9bbb9727, fresh mounts, all 14 lab mounts, both filters, compared with main's fresh-mount baseline): no product regression. 191 (test, mount) pairs fail here but not on main, in 47 tests: 176 by design on that mount, 13 lab artefacts (ENOSPC on the 512 MB vfat image, cifs mount state, nfs42 test order), one test-seam row on cifs (skipped on SMB bases since 21b3783c), and one unresolved row on cifs-nocase, an_archive_replaced_without_trash_is_on_disk_before_its_original_is_deleted, which failed once in six whole-filter runs and not in 129 more, on the safe side (the set-aside original was kept and reported). Every fix from the earlier rounds held on fresh mounts.

Lab L1: a hung FUSE mount. Both FUSE daemons were stopped with SIGSTOP in an unprivileged user namespace on a private display, and 19 interface flows were driven against 66a435fd (main's tree, with the watchdog ported) and this branch (db4a512e): 25 UI stalls of 250 ms or more in 16 flows before and 0 in two runs after (details in the last table below). A positive control (the UI thread held under ptrace) shows that the watchdog fires on this branch. L1's one functional finding, a default folder or restored tab left on "The operation timed out" after a short outage at start-up, is fixed by 65c88643 and covered by a unit test; L1 was not run again after it.

Edge cases by filesystem

These rows cover the filesystem edge cases that steps 4–8 change.

  • Before is main at c17db1a4, the merge base; 66a435fd (this branch's merge of it, L1's before) has the same tree. After is this branch.
  • Rows under Any filesystem apply everywhere; the groups below list only what differs.
  • Lab figures come from scripts/fslab over loopback on Linux 7.2.5, mostly from C harnesses that use Strata's own call sequences. L1 ran its own FUSE daemons without fslab and drove the app; the acceptance runs ran Strata's unit suites on the fslab mounts.
Any filesystem
Edge case Before (main) After (this PR)
A preview, thumbnail, media decode or background listing reads an item an operation changes Kept reading; on NFS, SMB and FUSE that left the leftovers and refusals in the groups below Stopped and waited for (at most 2 s); new reads refused; the preview then follows the item to its new name; a stopped thumbnail is asked for again
A sandboxed preview after bubblewrap exits Not waited for; the namespace and its bind of the file outlived bubblewrap after nearly every exit in the lab Waited for on a pidfd, at most 1 s (about 2 ms after a kill, 0.1 ms after a normal exit)
Unmounting a drive from Strata while a preview reads a file on it The unmount failed as busy, or succeeded while the sandbox kept the filesystem alive Reads under the mount root released first
Item at a placement's destination with another identity right after the move (F7) Moved back to the source, even another program's file Left there and reported as unconfirmed
Replace without Trash: where the original goes Under a flat hidden name (.strata-replaced-*), which errors named Into .strata-originals-<id>/ under its own name; Restore needs nothing else
Replace by exchange (ext2/3/4, XFS, btrfs, f2fs, tmpfs, bcachefs, ZFS, vfat) cut off by a crash The stage name could hold the original The finished copy goes into the originals folder before the exchange; stages only ever hold copies
Original that cannot be removed after the new item is in place (F11) Same-filesystem move: item failed, paste stopped, no Undo; staged Replace and archive Replace: failed Completes and reports "“%{name}” was replaced, but its original could not be removed from “%{kept}”: …"; a paste keeps its Undo
Hidden .strata-* names left by a crash, kill or unplug Silent; visible only with hidden files shown Pane-header button, a dock card for possible originals, and a review with Restore, Show and Delete… (incomplete copies only)
Stale .strata-probe-* names Stayed Removed in the background when empty and over an hour old; any error ignored
Undo of a Delete, Replace or merge when another item was trashed later from the same path The later item could come back The original comes back; the other stays in Trash. Two items its record vouches for, trashed in the same second, both stay, and the item is named. Where nothing proves a folder (renumbering mounts without births), the newest comes back
Undo, without GVfs, of a Replace, merge copy or Delete on a mount other than home Failed: "… Operation not supported" Reads that mount's .Trash-$uid or .Trash/$uid (a real folder the user owns)
Saved views, colors and icons of a restored item Matched by device and inode, on the interface thread Matched by the identity the restore reports, under the mount's rule
Merge where Trash works: destination files it moves to Trash Their customizations stayed on the incoming file (copy) or were dropped (move) Go to Trash with them; Undo brings them back
Undo of a merge without Trash that placed read-only folders (F3) "Completed with errors": Permission denied, whenever such a read-only folder held anything Removed; a folder that stays gets its mode back
Cancel of a merge without Trash after it placed an item (F12) "The merge stopped. Originals that could not be put back are in …", .strata-merge-* left Cancelled, originals back, folder removed
Compress with Keep Both when only the last numbered name is free (F9) "No available archive filename"; an extracted readme. beside a taken one became readme (2). That name is used; an extracted readme. beside a taken one becomes readme. (2)
10xer rename prompt given another hard link's name, or its case variant on a case-insensitive folder Prompt closed; the rename then failed Prompt stays open: "“link.txt” already exists"; nothing changes
Open folder renamed by another program Followed by device and inode number (and birth time where known), with a second stat Followed when the mount's identity rule proves it, from the load's stamp
Saved default folder or restored tab that cannot be checked (timeout, I/O error, unplugged drive) Checked on the interface thread before the window showed; any failure cleared the default folder Checked on a worker; cleared or closed only when proven missing or not a folder, otherwise opened with its error and loaded again once the mount answers
Undo of a moved dangling symbolic link Dropped silently Undone; only items proven absent are dropped
Saving settings and state (preferences, folder views, tabs, pins, themes, custom actions) Written on the interface thread One background writer in order; quitting waits up to 10 s
Folder monitors Created on the interface thread when the folder opened Created on one worker once the folder answered, never on a stalled mount; a change between load and monitor re-lists once
Folders without a live monitor on mounts without other writers Refreshed only by F5 or "Auto-refresh folder" (Off by default; 1, 5 or 10 min) Checked at the step 7 cadence, whatever the switch says
Background re-list that fails, is refused, or stops at the load's time budget Only Auto-refresh re-listed in the background The previous listing stays, with no error page (one cut at the entry limit is shown, marked as cut)
NFSv3 and NFSv4.2
Edge case Before (main) After (this PR)
Deleting or moving a folder while Strata previews a file in it Delete failed: "The folder is not empty"; a move to another disk kept the source Done, nothing left. Lab, sandbox killed then file unlinked: .nfs… left in 30/30 (v3) and 100/100 (v4.2) before, 0 after; after a normal exit 4/100 on v4.2, then 0
Folder holding only another program's .nfs… file Failed at once ("The folder is not empty"); a recursive delete tried to unlink the .nfs… name (EBUSY) Waits up to 2 s for the close, then "A file in it is still open in %{program}. Close it there and try again."; the leftover is never touched
Copy or move of such a folder The .nfs… file was copied Left out; a move keeps the source folder and reports it still open
Merge without Trash replacing a file another program holds open Merged; the original's .nfs… stayed in the user's folder until the close Merged; the leftover stays inside the .strata-merge-* folder, which is kept and reported as still open
Changes made on another computer or on the server Shown only after F5 or Auto-refresh (the lab saw no inotify event for 300 such changes across NFS, SMB and sshfs) Shown at the next check (3 s focused): one GETATTR, 212 B on v3 and 420 B on v4.2, almost none while a v4.2 directory delegation holds
Item recreated with the old inode number (v3, and v4 entries without a birth time) Passed as the original Told apart by its file handle, which changed in 198 of 198 reuses in the lab
Single items held across a decision — Never held on NFS (an O_PATH hold left .nfs… in 10/10)
SMB/cifs (nocase and POSIX extensions)
Edge case Before (main) After (this PR)
Deleting a folder while Strata previews a file in it Lab, sandbox killed then file unlinked: .__smbfile_silly… left in 98/100 (cifs) and 26/30 (nocase); with POSIX extensions the folder refused rmdir in 29/30 0
Folder holding only .__smbfile_silly… Failed at once; a recursive delete tried to unlink it (ENOENT) Waits closetimeo + 0.5 s (1.5 s by default, at most 10 s), then names the program, or "A file in it is still open in a program on this or another computer."
POSIX extensions: empty folder that refuses rmdir (EACCES) because a file was open "Permission denied" at once Same wait, then a holder on this computer, else "Permission denied"
Folder rename, same-share move or Move to Trash refused (EACCES) while a file below is open "Permission denied" at once Retried for the same budget after the refusal, cancellably, then the holder is named or "Permission denied" stays; with POSIX extensions, unchanged
File rename, move or Trash refused with EBUSY (held elsewhere without delete sharing) "The item is in use" "It is still open in a program on this or another computer."
Inode numbers Every share trusted to keep server numbers (the kernel never shows noserverino) Server creation time, plus the number while serverino shows, read again at each decision; once it is gone, files must also keep size and times
Move from a share whose serverino went off after the copy Source folder kept Moved, sources deleted once proven; their link counts and change times are still checked
Replace after the switch-off, target replaced elsewhere keeping its modification time Replaced (lab: only change time and size showed such a replacement, 18 of 18) Refused as changed
What an operation made or set aside, removed once server numbers are off Removed by the exact inode number Removed by creation time with the recorded size and modification time; a written archive stage is recorded from a forced stat, so a cancelled or failed Compress removes it (C3, be59e664)
Case-only rename at the 10xer prompt after the client turned server numbers off Refused: "already exists" Accepted
Changes made by another SMB client Shown only after F5 or Auto-refresh Shown at the next check: for a folder four levels below the share, 5 compounds and 4.5–5.1 KB per check
Changes made on the server's own disk while Samba holds a directory lease Not shown, F5 included Unchanged (Known limits)
sshfs
Edge case Before (main) After (this PR)
Deleting a folder while Strata previews a file in it .fuse_hidden… left in 29/30 lab runs after a sandbox kill 0
Folder holding only another program's .fuse_hidden… A recursive delete unlinked it, the daemon made a fresh one, and the delete failed Left in place; waits up to 2 s, then names the holder
Copy or move of such a folder The .fuse_hidden… file was copied Left out; a move keeps the source folder
A move's copy replaced by another file of the same size and times before the source is deleted Passed as the copy; the source was deleted Needs the exact inode number (Q4); the source stays
Replace target swapped for a same-size, same-time file during the copy Replaced Held with O_PATH from the first read; refused as changed
Copy whose selected source folder the kernel evicted "changed while it was being copied" Copies
Stage evicted before it was published Failed as changed Published (held)
Item GLib reports trashed but leaves in place (GLib #4060), renumbered meanwhile Passed as trashed; Undo recorded Caught: held across the call
Changes made on the server Shown only after F5 or Auto-refresh Shown up to about 21 s late (sshfs answers even forced stats from its cache); whole-second stamps confirmed once
Open folder renamed Followed by device and inode while sshfs kept it; a rename on the server was noticed only on F5 Never followed; the view goes to the nearest folder that still exists
exfat-fuse
Edge case Before (main) After (this PR)
Deleting a folder while Strata previews a file in it .fuse_hidden… left in 30/30 lab runs after a sandbox kill 0
Other programs' .fuse_hidden… files, copies and moves of their folders As sshfs As sshfs
Case-only rename at the 10xer prompt (foo → Foo) Refused: "already exists" (each spelling has its own inode number) Accepted, by the same rule the rename uses
A move's copy, a Replace target or a stage replaced by a same-size, same-time file As sshfs As sshfs
ntfs-3g
Edge case Before (main) After (this PR)
Deleting a folder while Strata previews a file in it .fuse_hidden… left in 30/30 lab runs after a sandbox kill 0
Other programs' .fuse_hidden… files, copies and moves of their folders As sshfs As sshfs
Inode numbers Treated as renumbered, like every FUSE daemon Kept once Strata's link probe sees a link keep the number with two links (lab: numbers kept 24 of 24)
vfat
Edge case Before (main) After (this PR)
Copy or Replace after the kernel renumbered an entry False "… changed while the operation was in progress", also after the whole copy of a Replace Birth time, with the file's size and modification time, stands in for the inode number
Archive Replace Undo, and a trashed item's saved views, after the kernel renumbered it in the Trash Not found (matched by inode number) Found by birth time with size and modification time; two alike files trashed from one path within one second and one 10 ms tick stay in Trash and the item is named (C1)
Cleanup of a failed copy or restore after the kernel renumbered Strata's own file Left behind (exact inode number needed) Removed by birth time with the size and modification time the copy recorded; another program's file put at the name in the same tick stays unless it has the recorded size and modification time (C2)
Flush before a set-aside original is removed syncfs, then a folder fsync Folder fsync, syncfs, folder fsync (the same on exFAT, ntfs-3g and exfat-fuse)
exFAT (kernel)
Edge case Before (main) After (this PR)
Merge without Trash Failed at the end: "…the replaced originals could not be removed from …/.strata-merge-…: … changed while the operation was in progress"; a cancel left an empty merge folder Works: folder birth times, which every rename into a folder resets (lab: 12 of 12 renames into or within it, on disk), are not compared
Copy, Replace, Trash lookups and cleanups after the kernel renumbered an entry As vfat As vfat
Open folder renamed by another program Followed by device and inode number while the kernel kept it Not followed: nothing proves an exFAT folder; the view goes to the nearest folder that still exists
ntfs3
Edge case Before (main) After (this PR)
Removing a set-aside original right before an unplug syncfs alone, which reported success for renames the unplug lost (8 of 8 in the lab) Folder fsync first, which reports the loss
Restoring leftovers after an unplug (a read-write mount with udisks' options was refused as dirty in 27 of 32 lab cuts; a read-only mount worked) No Restore "The drive is read-only. It may need to be checked for errors after it was unplugged without being ejected."
ext4 and tmpfs (controls)
Edge case Before (main) After (this PR)
Music or video playing in the preview when its folder is renamed or deleted Kept playing (the name goes at once, so nothing failed) Stops; after a rename the preview shows the item at its new name. Cost when nothing is held: one real-path lookup per folder and one lock
ext2, ext3, ext4 with 128-byte inodes (no birth time): item recreated with the old inode number Passed as the original Told apart by its file handle (NFSv3 was the only lab measurement)
Change checks — None while the folder's monitor is live
GVfs locations (smb://, sftp://, …)
Edge case Before (main) After (this PR)
Changes made elsewhere GVfs SMB and SFTP offer no monitor: shown only after F5 or Auto-refresh Checked (one D-Bus call and one backend request), except admin://, mtp:// and gphoto2://; not while "Watch network folders" is off
Opening a folder, F5 or Retry on a backend that stopped answering Started another request that waited for the backend After 2 s without progress, refused at once with the rows kept; "Not responding" after 10 s; loaded again once the backend answers
Leftover review — Listed with Show and Delete…; no dates or contents, and no Restore for originals folders (older flat names keep Restore as "Recovered item")
Mounts that stop answering
Edge case Before (main) After (this PR)
L1, both FUSE daemons stopped, 19 flows (folders, typed paths, menus, undo and redo, merge, archives, drag and drop, search, terminal, tabs and start-up, drive Properties) 25 UI stalls of 250 ms or more in 16 flows, each until the daemons resumed (a drag: 78 s; start-up: about 20 s before the window showed) None in two runs; menus, dialogs, choosers and prompts answered within about 0.6 s
Repeated loads, probes and monitor creations Each parked another GLib worker thread, up to its 330, after which every asynchronous GIO call waited After 2 s without progress, new requests fail at once as "The operation timed out"; at most one call per path and kind waits
A folder opened, or a default folder or restored tab at start-up, while its mount is stopped The window froze until the mount answered, then listed it A folder opened there waits, without freezing the window, and lists once the mount answers; after the lane stalls (2 s), new opens fail at once ("The operation timed out"). A default folder or restored tab shows that error after 2 s and loads by itself about 1 s after the mount answers
F5, Retry or a monitor's rescan Started another load that waited for the server Rows kept; runs again by itself once the mount answers, after any open inline rename or operation in the folder
10 s without progress Nothing "Not responding. This list may be out of date." above the listing; clears when a request there answers
Enumerators and streams the interface lets go of (lab: read-only closes blocked on NFSv4.2 and exfat-fuse) Closed on the interface thread Closed in the background; written streams never, as their close reports lost data
Reading the mount table On the interface thread (GLib's mount monitor, and a parse of mountinfo per lookup) Its own thread; the lab saw no read block in 4,974 reads during six outages

Known limits (documented in docs/filesystem-compatibility.md unless marked otherwise)

  • Open files. Leftovers nobody holds (a crashed NFS client's, or a file that merely has a leftover's name) keep their folder. An SMB unlink refused by another computer that holds the file without delete sharing fails with EIO, reported as an I/O error. SMB before 6.17 keeps a deleted open file under its own name, which is not recognised (unverified), and the SMB rename retry for 6.17–7.1 was not verified either. A single file another program has open is deleted without a report, as on local disks. Other FUSE daemons (rclone, gvfsd-fuse) and GVfs's own deletes meet leftovers with their own errors. The holder search sees only local processes Strata may read, and its 200 ms limit is an estimate.
  • Interface thread. These stay on it, as documented exceptions:
    • the reads that build the first window (settings and state, GTK bookmarks, the install marker and the Flatpak check);
    • GLib's volume monitor, taken once at start-up. Without GVfs it hung for more than 10 s while a removable FUSE daemon was stopped, and the GVfs check before it does not cover the volume-monitor daemons;
    • GIO's application lookups (GDesktopAppInfo);
    • on GVfs, a stream whose open or create succeeds just as it is cancelled: GLib frees it, and its close is one backend request;
    • quitting.
  • Lanes.
    • Previews, thumbnails, the Properties size, search walks and file operations are not laned, so each waits on its own thread.
    • A mount slower than 2 s per round trip looks unresponsive; real network latency was not measured.
    • While a monitor creation is stuck on a dead mount, monitors on every folder deliver nothing (GLib's single inotify lock).
    • A mount that ended its stuck request with an error (SMB's EHOSTDOWN after a few minutes, a failing FUSE daemon) keeps the notice until F5, Retry or navigating sends a request.
    • A kept refresh that runs again and then fails while the mount answers keeps the old rows without an error (not documented).
    • Before Linux 6.13, a change in the same tick as a load's stamp stays hidden until the next change.
  • Identity.
    • On ntfs-3g a reused inode number passes.
    • On exfat-fuse and sshfs an unheld item with the same type, size and times passes.
    • On sshfs and vboxsf a folder put at a held Replace target's name passes.
    • On vfat and exFAT, a file made within the same 10 ms tick with the same size and modification time passes. Following a renamed vfat folder can follow a sibling born in that tick (it only moves the view).
    • On SMB after a serverino switch-off, neither the proof of a moved copy nor the removal of what an operation made or set aside compares the change time (unmeasured whether a fresh copy's change time stays put).
    • On SMB without server numbers, two names of one hard-linked file moved as separate items leave the later name at the source as changed (the safe side).
    • The NFS Trash check has no swap detection.
    • File handles were measured only on knfsd no_subtree_check exports; elsewhere a false "different" keeps the item.
    • Undo leaves alike files trashed from one path within one second in Trash on renumbering mounts (sshfs, exfat-fuse, vboxsf, msdos; vfat and exFAT within one tick), and brings back the newest folder from a path on renumbering mounts without births.
    • A hard-linked file's change time is checked only within one item.
  • Checks. With Samba directory leases, server-side changes stay hidden while the folder is shown, F5 included, until the lease lapses (46–66 s after its last use); nohandlecache fixes it. Files edited in place keep their size and date until a re-list. sshfs shows changes up to 21 s late, or later with a longer dcache_timeout. Clock skew on whole-second mounts can hide a change. If Hyprland and GNOME do not report a window on another workspace as suspended, it keeps the 15 s interval. There are no SMB change notifications.
  • Leftovers. Only folders that get listed are checked, and leftovers at visible names carry no marker. Another process's live hidden names can show as leftovers. On vfat, a probe written in another time zone can look up to 26 h old. A folder the user can neither write nor chmod cannot be set aside or case-renamed ("Permission denied"), where main's flat name worked.
  • Choosers (documented in docs/archives.md). Extract To accepts a write-only folder, then fails.
  • Kernel bug, not reported upstream (not documented). With POSIX extensions, the cifs client reports an O_TMPFILE file with inode 1<<32, no links and a wrong size until it revalidates. The acceptance runs hit it only through the test seam; Strata never opens O_TMPFILE on SMB.
  • Not verified:
    • the desktop probes that need the owner's consent, which were not run: stopped GVfs backends (GVfs monitors and stream closes, and whether a GVfs monitor made off the interface thread delivers its events), a gvfs-udisks2 monitor stopped before start, the cost of the /proc holder scan, and the suspended state on Hyprland and GNOME;
    • server-side changes and stopped servers driven through Strata on real mounts (the lab measured them with harnesses; L1 stopped only FUSE daemons);
    • whether a fresh SMB copy's change time stays stable;
    • GVfs against a real gvfsd, real USB removal (unplugs were device-mapper error targets), Windows or ksmbd servers, the SMB clients of Linux 6.17–7.1, servers before Linux 6.13, and release builds (L1 used debug builds).

Visual evidence

All were captured on a private headless display, in English, and are in ~/Projects/strata/target/steps4-8/shots/ (captions in its README.md). The step 4 "Before" is main (c17db1a4); the step 7 and 8 "Before" shots come from this branch just before the commit that adds the UI. Every "After" is from db4a512e; no later commit changes these views.
s4 9-still-open-after-error-app-dialog
s4 9-still-open-after-error-app
s4 9-still-open-after-error-process-dialog
s4 9-still-open-after-error-process
s4 9-still-open-after-error-unseen-dialog
s4 9-still-open-after-error-unseen
s4 9-still-open-after-leftover-kept
s4 9-still-open-before-error-dialog
s4 9-still-open-before-error
s4 9-still-open-folder
s7 10-watch-network-folders-after-window
s7 10-watch-network-folders-after
s7 11-not-responding-after-columns
s7 11-not-responding-after-list
s7 11-not-responding-before-columns
s7 11-not-responding-before-list
s8 7-leftovers-after-dialog-crop
s8 7-leftovers-after-card
s8 7-leftovers-after-dialog
s8 7-leftovers-after-hidden-shown
s8 7-leftovers-after-folder
s8 7-leftovers-after-button
s8 7-leftovers-before-button
s8 7-leftovers-before-hidden-shown
s8 7-leftovers-before-folder
s7 10-watch-network-folders-before-window
s7 10-watch-network-folders-before

Step 4: "still open" errors. A program keeps Project/notes.txt open on a FUSE drive and the file is deleted, so the daemon hides it as .fuse_hidden…; then Strata permanently deletes Project (real FUSE mount in an unprivileged namespace, tokyo-night theme).

  1. s4.9-still-open-folder.png: the folder before the delete, the same on both sides; only plan.txt shows.
  2. Before: s4.9-still-open-before-error.png and -before-error-dialog.png: "Could not delete Project: The folder is not empty". Strata had also unlinked the other program's leftover, which the daemon hid again.
  3. After (each with its -dialog.png crop):
    • s4.9-still-open-after-error-app.png: a holder launched from a "Log Viewer" desktop entry: "A file in it is still open in Log Viewer. Close it there and try again."
    • s4.9-still-open-after-error-process.png: a plain tail -f, named "tail".
    • s4.9-still-open-after-error-unseen.png: a holder Strata cannot inspect: "A file in it is still open in another program. Close it and try again."
    • s4.9-still-open-after-leftover-kept.png: hidden files shown; plan.txt is gone, the leftover untouched.

Step 7 (in-crate captures, default theme)

  1. Before: s7.10-watch-network-folders-before.png (and -before-window.png, the whole panel): Settings → General → Performance shows "Auto-refresh folder", Off.
    After: s7.10-watch-network-folders-after.png (and -after-window.png): "Watch network folders", on, with "Check open folders on network shares every few seconds for changes made on other computers. When off, those changes show only after a refresh."
  2. Before: s7.11-not-responding-before-columns.png and -before-list.png: a "Team share" folder on a mount that stopped answering, with nothing to mark it.
    After: s7.11-not-responding-after-columns.png and -after-list.png: "Not responding. This list may be out of date." above the listing in Columns and List. The mount state was set through a test fake, not a real dead mount.

Step 8 (in-crate captures, default theme)

  1. Before: s8.7-leftovers-before-folder.png: a "Music" folder holding an originals folder and an incomplete copy, with nothing shown; -before-hidden-shown.png: the same with hidden files shown, plain hidden rows; -before-button.png: the pane header.
    After: s8.7-leftovers-after-folder.png: the warning button in the pane header and the dock card; -after-hidden-shown.png: the same with hidden files shown; -after-button.png: the header close-up.
  2. After: s8.7-leftovers-after-card.png: the card "Items left by an interrupted operation", "“Music” holds originals that an interrupted operation set aside.", with Review, the countdown, pin and close.
  3. After: s8.7-leftovers-after-dialog.png and -after-dialog-crop.png: the review, with an originals row holding "Night Drive.flac" (Restore, Show) and an incomplete-copy row (Show, Delete…), and the footer note below them.

How to test

Use a throwaway mount for the network cases: an NFS export, a Samba share or sshfs localhost:…. A stopped FUSE daemon or server blocks every program that touches its mount until it resumes. For full isolation, mount it and start Strata inside a user and mount namespace (unshare -Urm) as lab L1 did. scripts/fslab runs the unit suites on real kernel filesystems, but it does not show the GUI.

Step 4: open files

  1. In a folder on the mount: mkdir held && echo x > held/a.txt, then run less held/a.txt in a terminal and delete held/a.txt from a shell. In Strata select held, press Shift+Delete and confirm.
    Expected:
    • After about 2 s (SMB: 1.5 s), "Could not delete “held”: A file in it is still open in . Close it there and try again." (“less” when the terminal was not launched as an app). On SMB with no holder on this computer, it reads "…on this or another computer".
    • The .nfs…, .__smbfile_silly… or .fuse_hidden… file is still there.
    • Quit less during the wait, and the delete succeeds instead.
  2. Keep less open and move held to a local disk.
    Expected:
    • The move completes, and held stays at the source.
    • The report says "“held” was left in “…”, as a file in it is still open in ".
    • No .nfs… or .fuse_hidden… file arrives at the destination.
  3. Without less, play an audio or video file of a folder in the preview in one window. From a second Strata window (run strata again), rename that folder and then delete it with Shift+Delete. Do this once on the network mount and once on a local disk.
    Expected:
    • Playback stops each time.
    • After the rename, the preview shows the file under its new folder.
    • The delete succeeds, and no hidden leftover appears in the parent.
  4. On SMB without POSIX extensions, keep a file below folder X open in a program, then rename X with F2.
    Expected: after about 1.5 s, the error names that program. On main, "Permission denied" appeared at once.

Step 5: interface thread

  1. Mount sshfs, start Strata from a terminal with STRATA_UI_STALL_MS=250 set, and open a folder on the mount. Stop the daemon with kill -STOP "$(pgrep -n -x sshfs)". Then arrow through folders in Columns, type a path on the mount after Ctrl+L, right-click a file there and open Compress…; right-click a local archive, choose Extract to… and pick a folder on the mount, drag a local file over a folder there, type a filter, press Ctrl+Alt+T, and cut a local file, paste it there and press Ctrl+Z. Resume with kill -CONT.

    Expected:

    • The window answers throughout.
    • Actions that need the mount wait or fail with "The operation timed out", and finish after kill -CONT.
    • Strata's terminal output has no "UI thread stalled" line.
  2. Set the default folder (Settings) to a folder on the mount, with Restore open tabs off (or leave a tab there with it on). Quit, stop the daemon, start Strata, wait a few seconds, then resume the daemon.
    Expected:

    • The window appears at once, and after about 2 s the pane shows "The operation timed out".
    • Within about 1 s of kill -CONT the folder loads by itself, and the saved default folder is kept.
  3. Optional: STRATA_CONTAINER_ENGINE=docker ./scripts/trace-main-io.py --stall-ms 1000 tests/e2e/scenarios/test_entry_management.py (or no path, for every scenario).
    Expected: a report in target/main-io/<run>/ with no violation; only the documented exceptions are listed.

Step 6: identity

  1. In 10xer mode, on an exfat-fuse stick (or SMB after serverino dropped), press r on foo and type Foo.
    Expected: accepted and renamed. On main the prompt said "already exists".
  2. ln a.txt link.txt, then in 10xer mode press r on a.txt and type link.txt (or Link.txt on a case-insensitive folder).
    Expected: the prompt stays open with "“link.txt” already exists" (or "“Link.txt” already exists" for the case variant), and nothing changes.
  3. Delete notes.txt with Delete. Create a new notes.txt, trash it from a shell (gio trash notes.txt), then press Ctrl+Z in Strata.
    Expected: the first notes.txt (its content) comes back, and the second stays in Trash.
  4. Start Strata with GIO_USE_VFS=local. On a USB stick that has a Trash, paste a file over an existing one, choose Replace, then press Ctrl+Z.
    Expected: the original is back. On main: "Operation not supported".
  5. Optional: scripts/fslab/fslab.sh up, then test local_operations:: vfat exfat exfat-fuse cifs-posix sshfs nfs3 (and leftovers::), the same local_operations:: run with --rev c17db1a4 (main has no leftovers:: tests), then down.
    Expected: what fails only on this branch falls in the by-design classes of docs/filesystem-compatibility.md § Real filesystems, or is a lab artefact that passes when run alone.

Step 7: changes made elsewhere

  1. Open an NFS or SMB folder, then create, rename and delete files in it from another computer (for SMB, another SMB client).
    Expected:
    • In a just-opened or recently changed folder, changes appear within about 3 s in a focused window and 15 s in an unfocused one, with selection and scroll kept; unchanged folders are checked up to 4 times less often.
    • On sshfs they take up to about 21 s.
    • Changes made directly on a Samba server's disk may not appear while it holds a directory lease (Known limits).
  2. Minimize the window, or switch to another tab, and watch the client's request counters (nfsstat -c).
    Expected: no GETATTR while hidden.
    • Restore the window: a check at once.
    • After 30 s or more away, the folder is re-read, which also updates the sizes of files edited in place.
  3. Turn off Settings → General → Performance → Watch network folders, and repeat 13.
    Expected: changes show only after F5. Turn it back on, and they show again without a restart.
  4. Stop the server (kill -STOP of the sshfs daemon) while its folder is shown in Columns, wait about 15 s, then press F5. Switch to List and Icons. Make a change on the server, then resume.
    Expected:
    • F5 keeps the rows.
    • After 10 s, "Not responding. This list may be out of date." appears above the listing in each view.
    • Once the mount answers, the notice goes and the refresh runs again by itself (on sshfs the change may still take up to 21 s).

Step 8: leftovers

  1. In a local folder: u=$(cat /proc/sys/kernel/random/uuid); mkdir ".strata-originals-$u"; echo x > song.flac; mv song.flac ".strata-originals-$u/"; mkdir ".strata-copy-$(cat /proc/sys/kernel/random/uuid)". Then open the folder in Strata.
    Expected:
    • The pane header shows the warning button.
    • A dock card says "“” holds originals that an interrupted operation set aside."
    • Review lists the originals (Restore, Show, holding song.flac) and an incomplete copy (Show, Delete…).
  2. Press Restore.
    Expected:
    • song.flac is back and selected, and the hidden folder is gone.
    • With only the copy stage left, the button stays until that is deleted.
    • Repeat with song.flac created first: it comes back as song (1).flac, listed under "These names were already taken".
  3. Recreate the originals folder as in step 17 and open the review. From a second Strata window, start a large paste into that folder, then press Restore in the first window's review while it runs.
    Expected: "Wait for the running operation to finish, then try again."
  4. On the sshfs or NFS mount (no unnamed temporary files there), paste a large local file over an existing one and choose Replace. Run kill -9 "$(pgrep -x strata)" during the copy, start Strata again and open that folder.
    Expected:
    • The button shows, and the review lists "An incomplete copy. Its source was not changed." with Show and Delete….
    • No card appears, as this is no original.
    • The original file is untouched.
  5. touch -d '2 hours ago' ".strata-probe-$(cat /proc/sys/kernel/random/uuid)" in a folder, then open it.
    Expected: the probe disappears silently; one touched just now stays.

#1615 follow-ups

  1. In a folder without Trash (/tmp), merge a folder onto a same-named folder. The source should contain a read-only (chmod 0555) subfolder holding a file, which the target lacks. Then press Ctrl+Z.
    Expected: the undo completes without "Permission denied".
  2. Cancel a large merge without Trash (for example in /tmp) whose files replace same-named files in the target, after it has replaced at least one.
    Expected: it ends as Cancelled, the originals are back, and no .strata-merge-* folder is left.

Expected result: as given under each step.

Related issue

Closes #1590

Steps 1–3 were delivered by #1615.

Steps 4-8 of #1590 follow #1615; implementation starts once #1615 is merged.
ogarza added 27 commits October 17, 2026 15:02
Add model::hidden_names: the prefixes Strata creates, including the
.strata-originals- containers set-aside originals move into, the legacy
forms released builds left (.strata-symlink-, tempfile's six-character
suffixes), and the names other programs leave: the silly renames the
NFS, FUSE and SMB clients make, and the <name>.ntfs-3g-<ten digits>
link ntfs-3g makes while renaming over an entry. classify and
foreign_leftover recognise a name only by its whole prefix and suffix.
Placement, the copy engine, archives and merges now create names from
the table. No behaviour change.

Refs #1590
Add Quirks::unplugged_after: once the matching call has run, every
later call in the scope fails with EIO, as a yanked device does, so an
operation's own cleanup fails too, until FsQuirks::replug. Only the
unplugged scope fails; a source in its own scope keeps answering. Trash
in a scope now reports the seam's error instead of success without
moving anything. A copy cut off at its stage's second write leaves only
that stage, classified as an incomplete copy, holding the bytes written
before the unplug.

Refs #1590
Publishing a new archive under Keep Both computed each numbered name
after the one before it was found taken, so the loop ended having
computed its last candidate without trying it. The candidates are now
made before each attempt, so all of the bound's names are tried.
…h does

Extraction split a name such as readme. into the stem readme and the
extension ".", so a taken readme. became "readme (2).", a name that ends
in a dot again, while Keep Both gives "readme. (1)". Both now take the
stem and extension from one helper in names.rs.
Publishing a stage without replacing returned on success, and on an
unconfirmed placement, with the stage still owned by the async step, so
its parent folder's descriptor was closed on the GTK main thread. The
stage is now held through OffMain like the module's other descriptors.
When a placed item turned out to be another one at its new name, the
placement moved whatever was there back to the source name. That item
could be one another program put at the destination just after the
move, which then landed at the source, possibly a hidden set-aside or
Trash name.

A placement that knows which item it moves now checks the source name
just before the move and refuses another item there without moving
anything. Another item found at the destination afterwards is left
where it is and reported as unconfirmed. Where that destination is a
hidden name Strata chose, as when it sets an original aside or parks
an item during a case-only rename, the error names it.
…ndone

Undoing a merge without Trash deletes what it placed by its record, but
a folder the copy gave a mode such as 0555 kept the undo from deleting
anything inside it, so the undo always ended with "Permission denied".

Each folder of that record is one the merge made, so the undo now gives
its owner access while its entries go, and gives the folder its mode
back if it stays, also when the undo is cancelled. Folders outside the
record, such as the one the item sits in, and the sources a move
deletes are never changed.
…celled

A merge without Trash sets the originals it overwrites aside in a hidden
.strata-merge-<id> folder. Cancelled after it placed a copy at one of
their names, it could not put that original back, as its own copy held
the name, so it ended with "The merge stopped. Originals that could not
be put back are in ..." instead of as cancelled, and left the folder.

The merge now remembers what it placed at the names of set-aside
originals. A stopped merge deletes such a copy while it is still as
placed, puts the original back, and removes the emptied folder, so a
cancel ends as cancelled. Anything else at the name stays, and so does
the original in the folder, which the error names.
Move the budget and backoff of the SMB source-open retry into a
deferred_close module, so the leftover wait and the SMB folder-rename
retry of #1590 step 4 can use the same capped, cancellable wait. No
behaviour change: closetimeo plus 0.5 s, at most 10 s in total, 10 ms
pauses doubling to 50 ms, on the operation's worker.

Refs #1590
Add services::file_activity, one process-wide registry of the reads
Strata holds open and of the file operations it runs, so step 4's
provider wrapper can release previews before an operation changes
files, and steps 7 and 8 can tell which folders an operation touches
without guards of their own.

Reads register a hold under the path they were given and its real
path before they open anything: the sandbox, pool and media funnels,
the in-process content, text and Markdown image reads, and the
background folder listings behind item counts, audio folder art,
video subtitle lookups, numbered-name checks and the renamed-folder
probe. A release stops those holds and waits for them, a fence
refuses new ones, and begin, is_changing and is_active_in answer for
running operations. Queries are in memory, one lock each.

A refused or stopped read fails with "This item is being changed by a
file operation.", so item counts, media details, folder art and
subtitle counts do not cache it as a failure, and a preview whose
type needs sniffing reports it instead of letting GIO open the file.
Stopping a song's folder cover leaves its tags. Nothing fences or
releases yet.

Refs #1590
…r mount

How unnamed files link and whether copy_file_range exists were process-wide
statics that every test scope reset on install and drop, so a concurrent test
could see another mount's state, or a reset, mid-copy. Keep both with the
mount's other learned capabilities instead: each scope then starts and ends
with its own state, and the seam resets nothing global.
A test that panicked while a paste was in flight left its local task, and
the GIO calls that task awaited, on the default main context. The next test
to iterate it, on another thread, polled or dropped the task, or ran a call's
thread-bound callback, there: the thread-guard panic cannot unwind out of
GLib, so the whole run aborted and the first failure's output was lost.

The main-context lock now destroys the glib-rs tasks attached while a
panicking test held it, on that test's thread, then runs the context there
until it has been idle for 100 ms (2 s at most). Dropping a GIO future does
not cancel its call, so the calls those tasks awaited complete on the thread
their callbacks belong to. Sources GIO owns are not destroyed, since that
frees memory GIO still uses.
Worker counts read the host disk's rotational flag straight from sysfs, so
the parallel move test failed on a machine with a spinning disk and the SMB
linked-file test skipped there. Read it through FsEnvironment instead: a
test scope answers from its quirks and never asks the host, and the move
test now covers a spinning source, a spinning destination and neither.
A copy or move whose GIO worker with progress died reached the failure
dialog as "Copy/Move worker stopped unexpectedly" in English. The copy now
reuses "The copy stopped unexpectedly", and "The move stopped unexpectedly"
joins all eleven catalogs.
… into tables

The outright refusal of a given-back name was the default-policy row of the
refused-as-missing test plus a message check, and the tmpfile visibility
test repeated the hidden-stage test's listing on another path. Each pair is
now one table: the EINVAL row keeps the invalid-name message, single write
and empty folder checks, and the tmpfile row keeps the empty listing and the
2 MiB content check beside the stage rows.
…meet

The racer that holds the first sync until both Trash items were copied gave
up silently after 5 s, so on a loaded shard the "neither Trash copy deleted
before both copied" check could pass without having waited. It now waits up
to 20 s, as the file's other deadlines do, and the test fails if it gave up.
… heading

The report line for an item that could not be deleted, and the error a
delete or a merge undo shows for it, showed its name unquoted while every
sibling line quotes it. A section holding one item also read in the plural:
one renamed item was headed "These names were already taken", one left-out
special file "These special files can't be copied and were left out", and
the undo note for one item spoke of "these items". The name is now quoted,
and each rename cause, both left-out headings and the undo note have a
singular message, chosen when the section holds one item, as whole messages
in all eleven languages.
…todisable

The seam's renumbering made an entry report another inode number even
while a descriptor of the process held it, which the kernel never does:
a held dentry keeps its inode in memory, so it is neither evicted nor
renumbered. evict() renumbers an entry only when no descriptor of the
process refers to it, O_PATH ones included, and says whether it did, so
a test can require the eviction it relies on. The descriptor scan that
emulates NFS silly renames is shared with it.

autodisable_serverino() does what the cifs client does after a server
inode collision, with no mount-table event: serverino leaves the mount's
options and every entry no descriptor holds reports another number. The
made_up_births quirk reports the earlier of a file's modification and
change times as its birth time, as Samba makes one up for a file whose
DOS attributes it does not store. exFAT's folder birth reset was already
emulated. Only the seam changes; the identity tests use these.
…d vboxsf presets

Quirks::vboxsf() set no mount type or filesystem magic, so its rows ran
with the family, inode-number rule and clock of whatever filesystem
holds the test's temporary folder, and so did every row built on
Quirks::default(). The vboxsf preset now reports vboxsf's mountinfo
type, magic and missing birth times, and a scope without a mount type or
magic of its own reports ext4's instead of the host's, so a row tests
the same mount on every machine.
Two rules disagreed about which mounts keep inode numbers: the move
manifest took FAT, FUSE, vboxsf and cifs without server numbers for
renumbering mounts, while the copy engine counted only FUSE, so a FAT
copy failed as changed when the kernel renumbered an entry it had made,
and lost-reply placeholders, exFAT folder births and the manifest each
kept a check of their own.

The mount profile now derives IdentityTraits once per mount: whether
inode numbers are kept, renewed or unknown, and whether folders keep
their birth times. One pure rule in services, Evidence::compare, decides
from them whether an entry is still one that was recorded: by device and
type, then the birth time where both report one (for folders only where
renames keep it), then the number where the mount keeps numbers, and,
for files and links only, the recorded size and modification time. It
touches no disk, so records can later be compared on any thread. The
copy engine, the move manifest and destination provenance, restrictive
folders, links, the names a copy claims, and the placement ladder's
lost-reply placeholders all decide through it. A copy no longer fails on
an entry of its own, or on its selected source folder, that the kernel
renumbered after eviction.

Only mount types known to keep inode numbers are trusted to: an unlisted
type, or a mount whose type cannot be read, still needs equal numbers
but never has a lost-reply placeholder removed on their strength.

A move's check of a hard-linked file accepted any change time on its
other names once it had deleted one of them. It now reads the change
time through another name of the file in the same item right after each
removal, and later names must show it; across items the remaining
acceptance is documented.
…on and load stamps

Trash records keep a device and inode number only, and an open folder's
identity its number and birth time, so neither survives a mount that
renumbers its entries, and both trust a number another item reused.
ItemIdentity keeps what an item was when it was read together with its
mount's identity traits, and same() decides through the one rule the
operations use, by the traits of whichever mount proves less; what the
rule leaves unproven is not the same item. It touches no disk, so the
interface can compare records on its own thread. No site records it yet:
Trash matching, the folders a window follows and the load stamp move to
it next.
Since a cleanup removes Strata's own entries by the size and
modification time they were left with, a cancelled or failed Compress
on an SMB mount without server inode numbers kept its hidden
.strata-copy-* stage: the stage was recorded from a stat of its
descriptor, and while the SMB client holds a lease on a file it writes,
it shows the file's time from the server only to a forced stat,
whatever actimeo says, so the time recorded was the one the stage had
when it was created.

On SMB the stage is now recorded from a forced stat by name while that
name still holds the descriptor's file, as the copy engine reads
sources; other mounts keep the descriptor's stat and pay nothing.

The FAT row over a base that moves a written file's time after its
descriptor showed it, as SMB does, is skipped there, since that FAT
preset cannot be expressed on such a base.
Strata never opens O_TMPFILE on SMB (stage::tmpfile_allowed leaves it
out), but an ext4 preset over a real SMB base let the seam hand it to the
cifs client. With POSIX extensions that client reports the unnamed file
with inode number 1<<32, no links and a wrong size until it revalidates,
so the copy's recorded identity matched nothing later and three sync and
paste rows failed on the lab's cifs-posix mount (rerun 2, R11).

Scoped::open_tmpfile now answers EOPNOTSUPP on an SMB base, as the
product's own gate does, and the docs say so.
…them on exFAT bases

The kernel's exFAT driver stamps a folder's birth time at each rename
into it, in 10 ms ticks. Production ignores folder births there, but an
ext4 or vfat preset over a real exFAT base trusts them, so a merging move
whose copy was published into an existing folder found that folder's
birth moved and kept its source, failing
sync::a_merging_move_flushes_each_filesystem_it_wrote_to_before_deleting
on the lab's exfat mount whenever the rename fell in a later tick.

On a base whose rule ignores folder births, a scope whose rule trusts
them now reports the birth time it first saw for each folder, keyed by
device and inode and shared by every scope over that base, and
fs_quirks::recreated clears it. The quirk that emulates exFAT's reset
(renames_reset_folder_births) still applies on top.
…merge tests

Rerun 2 of the fslab acceptance showed rows that fail by design on some
lab mounts, each stopping its test before the rows after it:

- The Undeletable rows of paste_results'
  a_move_that_cannot_remove_the_original_it_replaced_keeps_it_and_its_undo
  and the Compress test an_archive_that_replaced_an_original_it_cannot_
  remove_completes_and_reports_it inject a failure into unlinking the
  original. Where the base refuses RENAME_NOREPLACE and keeps one number
  for a hard link (NFS, ntfs-3g), placement links a file to its name and
  unlinks the other one, which takes that failure first. They skip there
  (base_places_files_by_linking).
- The merge row that leaves a Unix socket out skips where the base
  refuses the socket with EPERM or EIO (vfat, exFAT, sshfs, exfat-fuse).

Each skip says so on stderr, and the docs list the messages.
Under the ext4 preset the copy follows the kernel's one inode for both
names and opens the second name while the first is still open, which
the SMB client refuses with EINVAL. A real SMB mount never takes that
path. The seam's SMB check is shared with its O_TMPFILE refusal.
Settings are saved by the background writer since 5837c3b, so a test
that reads settings.toml right after a change can see the previous
save. The column-width and keybinding-hint tests now let the writer
land first, as the other settings tests do.
…ompat-followups

Resolves the catalog, services, preview test, context menu, theme and
typed-navigation conflicts, and adapts what main added since the fork to
this branch's rules:

- The user stylesheet (#1758) is watched through the monitors worker and
  re-read off the UI thread.
- The Diagnostics page (#1735) and the Integrations page (#1748) detect
  the package manager and resolve the terminal off the UI thread; the
  Run-in-terminal button spawns through the reaper closure.
- Connect to server (#1726) waits for a native path's asynchronous
  validation instead of pinning and closing at once.
- The pinned-places tests read the GTK bookmarks file through
  adapters::bookmarks after the settings writer settles.
- Traditional Chinese (#1745) gets the strings this branch adds.
- Re-read Trash contents once its monitor goes live, as every other watch does.
- Show the "wait for the running operation" refusal when the leftover button is
  pressed while an operation works in the folder, instead of doing nothing.
- Detect the package manager and resolve the terminal for the Diagnostics page
  on a blocking worker, and reuse the detected manager for the copied report.
- Say why FAT and ntfs3 barriers sync the folder around sync_fs, keep the
  sandbox's info pipe invariants in comments, and state the thread rule the
  BareMonitor Send impl relies on.
- Drop assertions on unlink retry counts, a private stall-watch flag, and
  argument order; gate the UI-thread refusal test on debug assertions; widen
  the watchdog test's quiet window for slow CI boxes; assert that only an
  incomplete copy offers Delete… in the leftover review.
- Document the stamp check's single-mount contract and the always-present
  Run button, and tidy the zh-TW and fr catalog strings.
Each item is a card with a short title, its date, a plain explanation of
what the item is and what Restore does, and dim "Contains" and "On disk"
labels beside their values, with the actions centred on the right. The
grid cells do not wrap, as a wrapping label makes the grid request the
height of its narrowest layout. The list fits two cards before scrolling.
Typed folders are validated off the UI thread, so a new tab's first load
can answer after Ctrl+L opened the location entry. Rebuilding the
breadcrumbs then closed the entry and replaced the typed text, and the
rest of the typing went into the column filter. A column that arrives
while the entry holds focus now leaves the entry alone; the entry's focus
is read from the root's focus widget, as the entry's inner text holds it.
@l0gicgate

Copy link
Copy Markdown
Contributor

Review of steps 4–8 (merge of main, fixes, validation)

Merged main twice (bc1a8a50 at e0f7397, 8a37182d at 79e3950). The first merge needed more than conflict resolution, because code main added since the fork calls seams this branch asserts off the UI thread:

Fixes beyond the merge (8d1a5bd7, 3bd76313):

  • Typed location closed by an arriving folder. tests/e2e/scenarios/test_tabs.py::test_folder_click_keeps_tab_name_until_release_and_keyboard_focus_still_renames failed deterministically on the merged tree: Ctrl+T's first load now answers after Ctrl+L has opened the entry, the breadcrumb rebuild closed the entry and replaced the typed text, and the typing landed in the column filter. The same happens to a user on a slow mount. A column arriving while the entry holds focus now leaves it alone (the entry's focus is read from the root's focus widget, since GtkEntry itself never reports it). Regression test in ui::browser::location::tests, verified to fail without the fix.
  • Trash watch re-reads once its monitor is live, as every other watch does.
  • The leftover button shows the "wait for the running operation" refusal when pressed while an operation works in the folder, instead of doing nothing.
  • Comments: restored the dropped rationale for FAT/ntfs3 folder syncs around sync_fs, stated the thread rule the BareMonitor Send impl relies on, documented the sandbox info-pipe invariants, the stamp check's single-mount contract, and the always-present Run button.
  • Tests: dropped assertions on unlink retry counts, a private stall-watch flag and argument order; gated the UI-thread refusal test on debug assertions; widened the watchdog test's quiet window for slow CI boxes; the leftover review test now asserts only the incomplete copy offers Delete….
  • Catalogs: zh-TW terminology (監視網路資料夾, 此項目…, 檢閱) and fr apostrophes.

Leftover review reworked as cards (7b1e88d6, owner request): title, date, plain explanation, dim "Contains"/"On disk" labels, actions centred on the right; new strings in all twelve catalogs. Capture is local only (agents cannot upload attachments): target/e2e-artifacts/gw0/tmp-leftover-review/review.png.

Review findings that are not blocking (left as they are, for the owner's judgement):

  • One hung monitor_directory call parks the single monitors worker, so no folder anywhere gets a new monitor until it returns. Matches the documented GLib inotify-lock limit, but a worker per lane key would narrow it.
  • replacement.rs drops a failed removal of the set-aside original when progress is None (test-only callers today); leftovers.rs returns no report line when a container stops being empty during the final rmdir.
  • On FAT, a selected file whose size changes between stat and unlink is now refused as changed; main deleted it. Worth a table row.
  • check_stamps attributes every location to the first one's lane; freshness groups by mount, now stated on the trait.
  • local_actions import/export beat only on Ok, so an answered failure after 2 s records a false stall.

Validation. Full headless Rust suite on the merged tree: 3411 passed, 11 ignored. Full E2E in the pinned container (base rebuilt once for the new strace input): 1137 passed, the one failure above fixed; the nine scenarios using the location entry or tabs rerun afterwards: 390 passed. Scoped reruns after every later change (location, keyboard dispatch, sidebar, leftovers, theme, i18n, diagnostics, integrations, mount lanes, file activity, sandbox, local operations tests): all green. cargo fmt --check and cargo clippy --all-targets --all-features -D warnings clean on the final tree.

CI is skipped because the PR is a draft (ci.yml gates on !draft); only Metadata policy ran. Marking it ready will start the full suites.

@l0gicgate
l0gicgate marked this pull request as ready for review October 20, 2026 02:22
…sertion

A focus move while 10xer hides the filter reached the column's focus-leave
handler, which switched the filter toggle off; the toggle ignores changes
while chrome is suppressed, so leaving 10xer kept the filter hidden. The
handler now leaves the toggle alone while 10xer is on, and the test moves
focus out of the column to cover it.

The UI-thread assertion added to `file_activity::list` during review is
dropped: the folder-art test exercises its caller on the GTK test thread.
Which name of an unchanged hard-link pair a cifs move cannot open depends
on the listing order, which differs between filesystems, so the test no
longer assumes that x is listed before sub/y.
@l0gicgate

Copy link
Copy Markdown
Contributor

CI is green at cc613d55. Three CI-only failures were fixed after the suites first ran:

  • ui::preview::audio::details::tests::folder_art_reuses_decodes_and_invalidates_changed_files: the UI-thread assertion I had added to file_activity::list during review tripped in this test, which calls the loader on the GTK test thread; the assertion is dropped (dd392677).
  • ui::window::tests::preferences::entering_tenxer_hides_an_open_filter_and_leaving_restores_it: a focus move while 10xer hides the filter reached the column's focus-leave handler, which switched the toggle off, so leaving 10xer kept the filter hidden. The handler now leaves the toggle alone while 10xer is on, and the test forces the focus move so it is deterministic (dd392677). Reproduced in the GTK 4.22 container before the fix.
  • adapters::local_operations::tests::moves::later_names_rewritten_within_the_tick_are_kept: the expected kept name of an unchanged hard-link pair depended on readdir order, which differs between CI's filesystem and tmpfs; the test now accepts whichever name the listing visits later (cc613d55).

@l0gicgate
l0gicgate merged commit 70951a6 into main Oct 20, 2026
9 checks passed
@l0gicgate
l0gicgate deleted the fix/1590-filesystem-compat-followups branch October 20, 2026 03:54
wmfeht added a commit to wmfeht/strata-feature-map that referenced this pull request Oct 20, 2026
Sync lgse/strata#1729..#1781: network-mount operations, release picker, multi-word filter
l0gicgate added a commit that referenced this pull request Oct 22, 2026
* test!: remove the Python E2E suite and the QA twin metadata

QA scenarios are now the only GUI suite. The Python suite under tests/e2e,
its runners, diagnostics, sharding and mutation scripts, and the E2E and
E2E cache workflows are gone. The QA job in ci.yml runs only when CI
is started by hand, and a failing scenario fails that run.

- Move the image recipe to tests/container/ and drop the pytest venv;
  the image key changes, so the base is rebuilt once and republished by
  the trusted-main publisher.
- Move the headless display, environment, process and XTest helpers that
  test-headless.py and benchmark-scroll.py use to scripts/headless/.
- Move baselines, fixtures and mutation patches under tests/qa/, and let
  STRATA_QA_UPDATE_BASELINES=1 regenerate a baseline.
- Drop twin, state_parity_ignore and input_parity_ignore from every
  scenario and from the runner, drop the test_ prefix from scenario
  folders, and replace qa-parity with qa-mutation.sh, which checks that
  each scenario with a mutation passes unmodified and fails under its patch.
- $python is now the image's absolute /usr/bin/python3, as a file
  provider's manifest command must be.
- Rename docs/e2e-testing.md to docs/testing.md and update AGENTS.md,
  the docs and the QA skills.
- Drop the held-document-scrollbar E2E test from #1752 and its mutation
  patch rather than convert it: three GTK tests in
  src/ui/virtual_preview/scrollbar/tests.rs already fail under that patch.

BREAKING CHANGE: scripts/e2e.sh, e2e-native.sh and qa-parity.sh are removed;
scenario headers reject twin and the parity ignore keys.

* test(qa): prune the lowest-value third of the QA scenarios

Remove the 134 scenarios with the lowest quality score per square root of
their measured cost, which favours removing long-running, low-scoring
scenarios. Scenarios with a mutation patch and the visual baselines were
kept. The suite keeps 269 scenarios and 512 runs; a full run drops from
about 106 s to 41 s.

Quality notes in the remaining headers still describe coverage as it was
before this removal.

* test(qa): rebuild the 20 highest-scoring pruned scenarios as short runs

Each was dropped for its run time, not its value. Rewrite each as one or
two runs that keep the behaviour its quality note names: one view where
the views share the code path, several cases in one launch instead of a
launch per case, fixtures set up before launch, and keyboard or activate
steps where the pointer is not under test. Together they took about 645 s
of CI time over 172 runs and now take about 55 s over 23 runs.

Each rewrite was run at least three times, shown to fail at a broken
expected value, and re-rated with the qa-quality rubric; none has a
measured cost yet.

* test(qa): trace Strata's UI thread through the QA runner

#1729 added scripts/trace-main-io.py on top of the Python E2E harness,
which this branch removes. With STRATA_QA_MAIN_IO set, the QA runner now
starts every Strata launch of a run under strace, tracing only the
initial thread: the application, its restarts, the portal backend and
the second instances launch steps start. Each launch leaves the trace,
its log and the meta.json the script classifies paths by under
target/main-io/<run>/<scenario>__<label>/launch-<n>/. Its startup phase
ends at the first reply that shows a pane, once the first window or the
portal backend's first chooser is up.

The runner's own places (the shared shader cache, the launch's logs and
the PATH folders) are listed in meta.json and count as toolkit. QA
mode's own disk reads, for pref and file predicates, now run on a helper
thread, and --qa no longer checks its directory before launch, so an
audit sees only calls a release build would make.

proc steps now ask about the traced Strata rather than strace. qa.sh
forwards STRATA_QA_MAIN_IO and STRATA_UI_STALL_MS, and the runner passes
the stall limit to every launch. The script runs qa.sh with its other
arguments, and the allowlist moves to tests/qa/.

* test(qa): check that a launch leaves the folder it started in

#1729 made Strata change its working folder to / once it has read its
arguments, so a launch folder on a removable drive or share stays
unmountable, and asserted it in the Python startup-argument test. Add a
proc app_cwd query and check it at the end of
multiple-arguments-non-utf8.

* ci: install git for the script tests in the Arch packaging job

scripts/test_qa_mutation.py applies its patches with git, which the
archlinux:base-devel image lacks.

* test(qa): drop the repeat double-clicks from the archive activation scenario

archive-double-click-extracts-subfolder was skipped for #1772: a repeat
double-click within about a second of an extraction that selects the
new folder is lost. That needs input faster than real use produces, and
archive-activation-extracts-subfolder already covers repeat extractions
into fresh folders through Return and Extract here. Keep the first
double-click, which bundles a multi-root zip or tar.gz into a subfolder
and selects it in Columns, and run it again.

* build!: rename the E2E image tooling for the QA suite

The pinned image now serves only the QA scenarios and the Rust quality
runs, so its tooling no longer carries the removed suite's name.

- Rename scripts/e2e_{bundle,base,images}.py to
  scripts/image_{inputs,base,registry}.py, e2e-images.yml to
  test-image.yml, STRATA_E2E_* to STRATA_TEST_*, target/e2e-container to
  target/qa-container, and the GHCR package, labels, container user and
  in-image paths to their test-image names.
- Stop publishing the runtime image and drop the registry cache
  discovery; only the removed E2E jobs consumed them. The publisher's
  anonymous check now verifies the build tag and the base.
- Point the links and doc comments that still named docs/e2e-testing.md
  at docs/testing.md, delete the stale evidence for #928, and drop the
  pytest ignore and the unused GTK version variable.

BREAKING CHANGE: scripts/e2e_base.py, STRATA_E2E_IMAGE and
STRATA_E2E_CARGO_CACHE are renamed, and the published base moves to
ghcr.io/lgse/strata-test-image, which must be made public after its
first publication.

* docs(qa): keep one catalogue of the QA protocol

docs/testing.md and the qa-scenarios skill's reference.md both listed
every step, target and predicate, and the copies had drifted: testing.md
said the pane predicate reads the focused pane, and placed the area
repainted ignores at the box's centre. Many of its rows also explained
behaviour through the removed Python harness.

- Make reference.md the only catalogue. Move into it what only
  testing.md had: input timing, target resolution, share rounding, the
  labelled-by naming rules, the semantics of repainted, accent_pixels,
  largest_image, compare and each NAMES key, the snapshot keys, the input
  log format, and the harness-error rule.
- Replace testing.md's tables, snapshot and input-log sections with a
  short overview that links to the reference, and drop the Python
  comparisons from the timer-waits list.
- Point the qa-scenarios skill, CONTRIBUTING.md and the src/qa doc
  comments at the reference, and tell runner changes to recheck the
  main-thread I/O audit.

* docs(qa): fix stale suite references and catalogue gaps

The pr-review skill merged from main still named the E2E suite and
qa-parity; the qa.sh example run label columns-ru does not exist for
arrow-keys-move-focus; the qa-scenarios skill named a section that
docs/testing.md renamed; and the protocol catalogue lacked the
selectable and editable states, the field-within target, and the
count spec's rendered and states options.

* refactor(scripts): drop the unused sys import from image_registry

* test(qa): drop dead header data and name the pin-order scenario after its check

Eleven scenarios kept a case variable that only the removed twin ids
read, wildcard-filter-patterns remembered a field no step used, and
folder-pins-order-and-restart no longer restarts: it verifies the
bookmarks file instead.

---------

Co-authored-by: Pierre Berube <[email protected]>
l0gicgate added a commit that referenced this pull request Oct 22, 2026
* test!: remove the Python E2E suite and the QA twin metadata

QA scenarios are now the only GUI suite. The Python suite under tests/e2e,
its runners, diagnostics, sharding and mutation scripts, and the E2E and
E2E cache workflows are gone. The QA job in ci.yml runs only when CI
is started by hand, and a failing scenario fails that run.

- Move the image recipe to tests/container/ and drop the pytest venv;
  the image key changes, so the base is rebuilt once and republished by
  the trusted-main publisher.
- Move the headless display, environment, process and XTest helpers that
  test-headless.py and benchmark-scroll.py use to scripts/headless/.
- Move baselines, fixtures and mutation patches under tests/qa/, and let
  STRATA_QA_UPDATE_BASELINES=1 regenerate a baseline.
- Drop twin, state_parity_ignore and input_parity_ignore from every
  scenario and from the runner, drop the test_ prefix from scenario
  folders, and replace qa-parity with qa-mutation.sh, which checks that
  each scenario with a mutation passes unmodified and fails under its patch.
- $python is now the image's absolute /usr/bin/python3, as a file
  provider's manifest command must be.
- Rename docs/e2e-testing.md to docs/testing.md and update AGENTS.md,
  the docs and the QA skills.
- Drop the held-document-scrollbar E2E test from #1752 and its mutation
  patch rather than convert it: three GTK tests in
  src/ui/virtual_preview/scrollbar/tests.rs already fail under that patch.

BREAKING CHANGE: scripts/e2e.sh, e2e-native.sh and qa-parity.sh are removed;
scenario headers reject twin and the parity ignore keys.

* test(qa): prune the lowest-value third of the QA scenarios

Remove the 134 scenarios with the lowest quality score per square root of
their measured cost, which favours removing long-running, low-scoring
scenarios. Scenarios with a mutation patch and the visual baselines were
kept. The suite keeps 269 scenarios and 512 runs; a full run drops from
about 106 s to 41 s.

Quality notes in the remaining headers still describe coverage as it was
before this removal.

* test(qa): rebuild the 20 highest-scoring pruned scenarios as short runs

Each was dropped for its run time, not its value. Rewrite each as one or
two runs that keep the behaviour its quality note names: one view where
the views share the code path, several cases in one launch instead of a
launch per case, fixtures set up before launch, and keyboard or activate
steps where the pointer is not under test. Together they took about 645 s
of CI time over 172 runs and now take about 55 s over 23 runs.

Each rewrite was run at least three times, shown to fail at a broken
expected value, and re-rated with the qa-quality rubric; none has a
measured cost yet.

* test(qa): trace Strata's UI thread through the QA runner

#1729 added scripts/trace-main-io.py on top of the Python E2E harness,
which this branch removes. With STRATA_QA_MAIN_IO set, the QA runner now
starts every Strata launch of a run under strace, tracing only the
initial thread: the application, its restarts, the portal backend and
the second instances launch steps start. Each launch leaves the trace,
its log and the meta.json the script classifies paths by under
target/main-io/<run>/<scenario>__<label>/launch-<n>/. Its startup phase
ends at the first reply that shows a pane, once the first window or the
portal backend's first chooser is up.

The runner's own places (the shared shader cache, the launch's logs and
the PATH folders) are listed in meta.json and count as toolkit. QA
mode's own disk reads, for pref and file predicates, now run on a helper
thread, and --qa no longer checks its directory before launch, so an
audit sees only calls a release build would make.

proc steps now ask about the traced Strata rather than strace. qa.sh
forwards STRATA_QA_MAIN_IO and STRATA_UI_STALL_MS, and the runner passes
the stall limit to every launch. The script runs qa.sh with its other
arguments, and the allowlist moves to tests/qa/.

* test(qa): check that a launch leaves the folder it started in

#1729 made Strata change its working folder to / once it has read its
arguments, so a launch folder on a removable drive or share stays
unmountable, and asserted it in the Python startup-argument test. Add a
proc app_cwd query and check it at the end of
multiple-arguments-non-utf8.

* ci: install git for the script tests in the Arch packaging job

scripts/test_qa_mutation.py applies its patches with git, which the
archlinux:base-devel image lacks.

* test(qa): drop the repeat double-clicks from the archive activation scenario

archive-double-click-extracts-subfolder was skipped for #1772: a repeat
double-click within about a second of an extraction that selects the
new folder is lost. That needs input faster than real use produces, and
archive-activation-extracts-subfolder already covers repeat extractions
into fresh folders through Return and Extract here. Keep the first
double-click, which bundles a multi-root zip or tar.gz into a subfolder
and selects it in Columns, and run it again.

* build!: rename the E2E image tooling for the QA suite

The pinned image now serves only the QA scenarios and the Rust quality
runs, so its tooling no longer carries the removed suite's name.

- Rename scripts/e2e_{bundle,base,images}.py to
  scripts/image_{inputs,base,registry}.py, e2e-images.yml to
  test-image.yml, STRATA_E2E_* to STRATA_TEST_*, target/e2e-container to
  target/qa-container, and the GHCR package, labels, container user and
  in-image paths to their test-image names.
- Stop publishing the runtime image and drop the registry cache
  discovery; only the removed E2E jobs consumed them. The publisher's
  anonymous check now verifies the build tag and the base.
- Point the links and doc comments that still named docs/e2e-testing.md
  at docs/testing.md, delete the stale evidence for #928, and drop the
  pytest ignore and the unused GTK version variable.

BREAKING CHANGE: scripts/e2e_base.py, STRATA_E2E_IMAGE and
STRATA_E2E_CARGO_CACHE are renamed, and the published base moves to
ghcr.io/lgse/strata-test-image, which must be made public after its
first publication.

* docs(qa): keep one catalogue of the QA protocol

docs/testing.md and the qa-scenarios skill's reference.md both listed
every step, target and predicate, and the copies had drifted: testing.md
said the pane predicate reads the focused pane, and placed the area
repainted ignores at the box's centre. Many of its rows also explained
behaviour through the removed Python harness.

- Make reference.md the only catalogue. Move into it what only
  testing.md had: input timing, target resolution, share rounding, the
  labelled-by naming rules, the semantics of repainted, accent_pixels,
  largest_image, compare and each NAMES key, the snapshot keys, the input
  log format, and the harness-error rule.
- Replace testing.md's tables, snapshot and input-log sections with a
  short overview that links to the reference, and drop the Python
  comparisons from the timer-waits list.
- Point the qa-scenarios skill, CONTRIBUTING.md and the src/qa doc
  comments at the reference, and tell runner changes to recheck the
  main-thread I/O audit.

* docs(qa): fix stale suite references and catalogue gaps

The pr-review skill merged from main still named the E2E suite and
qa-parity; the qa.sh example run label columns-ru does not exist for
arrow-keys-move-focus; the qa-scenarios skill named a section that
docs/testing.md renamed; and the protocol catalogue lacked the
selectable and editable states, the field-within target, and the
count spec's rendered and states options.

* refactor(scripts): drop the unused sys import from image_registry

* test(qa): drop dead header data and name the pin-order scenario after its check

Eleven scenarios kept a case variable that only the removed twin ids
read, wildcard-filter-patterns remembered a field no step used, and
folder-pins-order-and-restart no longer restarts: it verifies the
bookmarks file instead.

---------

Co-authored-by: Pierre Berube <[email protected]>
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.

fix(operations): make file operations safe and fast on NFS, SMB, FUSE, FAT and case-insensitive filesystems

2 participants