Repository navigation
fix(operations): finish file operations on network, FUSE and removable mounts - #1729
Conversation
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.
Review of steps 4–8 (merge of
|
…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.
|
CI is green at
|
Sync lgse/strata#1729..#1781: network-mount operations, release picker, multi-word filter
* 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]>
* 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]>
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
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.mount_lanes). Folder loads, probes, monitor creation, releases, the leftover review and change checks go through the lane of their mount.EIO,ETIMEDOUT,EHOSTDOWNandENOTCONNare not answers, and a cached answer to one request never vouches for another./proc/self/mountinfo, waits 50 ms for a burst to end, and publishes to readers that do no I/O.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.model::hidden_names), which also tells other programs' leftovers apart.Step 4: release open files before changing them
.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".closetimeoplus 0.5 s (at most 10 s). One wait covers a whole operation./proc/*/fd(confirmed byfdinfo), then/proc/*/maps, and names the app where its process says which one.EACCESis retried for that budget, then names the holder or keeps "Permission denied" (with POSIX extensions, nothing waits). A file refused withEBUSYsays "It is still open in a program on this or another computer."Step 5: no file calls on the interface thread
/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.STRATA_UI_STALL_MSstarts a watchdog that logs the call the UI thread is blocked in.scripts/trace-main-io.pyruns E2E scenarios with the UI thread understraceand classifies every file call;tests/e2e/main-io-allowlist.tomllists 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
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.O_PATHdescriptor so it keeps its number; never on NFS.Step 7: changes made elsewhere
fuseblk, and GVfs locations exceptadmin://,mtp://andgphoto2://. Folders without a live monitor are checked too.Step 8: leftovers after a crash or unplug
.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..strata-probe-*names older than an hour.Also in scope: undo without GVfs on other mounts. Without GVfs (
GIO_USE_VFS=localor nogvfsd), 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-$uidand.Trash/$uiddirectly, 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)
readme.is numberedreadme. (2).copy_file_rangesupport per mount instead of per process, and keeps a failing test's main-context tasks from aborting the run.Decisions taken with the owner
.strata-originals-<id>/under their own names.serverinoholds.Decisions taken by the lead
Approved by the owner (2026-10-18):
closetimeoplus 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.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./(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 aPath=of its own now starts in/.Lead calls (owner may override):
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.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.Lane choices integrated without a recorded lead answer (owner may override):
gtksourceview-5folder.577eb5f9).Lead call (owner may override), rv-ui-a-4:
qualifies, a test row and the original subtitle back in all 11 catalogs.Lab acceptance (fslab)
local_operations::andleftovers::ran on all 14 lab mounts, andundo,restoreandtrashon vfat, exfat and exfat-fuse, each compared withmainon 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: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.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.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-fusepaste_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 since21b3783c), 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 by65c88643and 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.
mainatc17db1a4, the merge base;66a435fd(this branch's merge of it, L1's before) has the same tree. After is this branch.scripts/fslabover 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
.strata-replaced-*), which errors named.strata-originals-<id>/under its own name; Restore needs nothing else.strata-*names left by a crash, kill or unplug.strata-probe-*names.Trash-$uidor.Trash/$uid(a real folder the user owns).strata-merge-*leftreadme.beside a taken one becamereadme (2).readme.beside a taken one becomesreadme. (2)NFSv3 and NFSv4.2
.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.nfs…file.nfs…name (EBUSY).nfs…file was copied.nfs…stayed in the user's folder until the close.strata-merge-*folder, which is kept and reported as still openGETATTR, 212 B on v3 and 420 B on v4.2, almost none while a v4.2 directory delegation holdsO_PATHhold left.nfs…in 10/10)SMB/cifs (
nocaseand POSIX extensions).__smbfile_silly…left in 98/100 (cifs) and 26/30 (nocase); with POSIX extensions the folder refusedrmdirin 29/30.__smbfile_silly…ENOENT)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."rmdir(EACCES) because a file was openEACCES) while a file below is openEBUSY(held elsewhere without delete sharing)noserverino)serverinoshows, read again at each decision; once it is gone, files must also keep size and timesserverinowent off after the copybe59e664)sshfs
.fuse_hidden…left in 29/30 lab runs after a sandbox kill.fuse_hidden….fuse_hidden…file was copiedO_PATHfrom the first read; refused as changedexfat-fuse
.fuse_hidden…left in 30/30 lab runs after a sandbox kill.fuse_hidden…files, copies and moves of their foldersfoo→Foo)ntfs-3g
.fuse_hidden…left in 30/30 lab runs after a sandbox kill.fuse_hidden…files, copies and moves of their foldersvfat
syncfs, then a folderfsyncfsync,syncfs, folderfsync(the same on exFAT, ntfs-3g and exfat-fuse)exFAT (kernel)
ntfs3
syncfsalone, which reported success for renames the unplug lost (8 of 8 in the lab)fsyncfirst, which reports the lossext4 and tmpfs (controls)
GVfs locations (
smb://,sftp://, …)admin://,mtp://andgphoto2://; not while "Watch network folders" is offMounts that stop answering
mountinfoper lookup)Known limits (documented in
docs/filesystem-compatibility.mdunless marked otherwise)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.GDesktopAppInfo);EHOSTDOWNafter a few minutes, a failing FUSE daemon) keeps the notice until F5, Retry or navigating sends a request.serverinoswitch-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).no_subtree_checkexports; elsewhere a false "different" keeps the item.nohandlecachefixes 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 longerdcache_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.docs/archives.md). Extract To accepts a write-only folder, then fails.O_TMPFILEfile 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 opensO_TMPFILEon SMB.gvfs-udisks2monitor stopped before start, the cost of the/procholder scan, and the suspended state on Hyprland and GNOME;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 itsREADME.md). The step 4 "Before" ismain(c17db1a4); the step 7 and 8 "Before" shots come from this branch just before the commit that adds the UI. Every "After" is fromdb4a512e; no later commit changes these views.Step 4: "still open" errors. A program keeps
Project/notes.txtopen on a FUSE drive and the file is deleted, so the daemon hides it as.fuse_hidden…; then Strata permanently deletesProject(real FUSE mount in an unprivileged namespace,tokyo-nighttheme).s4.9-still-open-folder.png: the folder before the delete, the same on both sides; onlyplan.txtshows.s4.9-still-open-before-error.pngand-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.-dialog.pngcrop):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 plaintail -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.txtis gone, the leftover untouched.Step 7 (in-crate captures, default theme)
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."s7.11-not-responding-before-columns.pngand-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.pngand-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)
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.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.s8.7-leftovers-after-dialog.pngand-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/fslabruns the unit suites on real kernel filesystems, but it does not show the GUI.Step 4: open files
mkdir held && echo x > held/a.txt, then runless held/a.txtin a terminal and deleteheld/a.txtfrom a shell. In Strata selectheld, press Shift+Delete and confirm.Expected:
.nfs…,.__smbfile_silly…or.fuse_hidden…file is still there.lessduring the wait, and the delete succeeds instead.lessopen and moveheldto a local disk.Expected:
heldstays at the source..nfs…or.fuse_hidden…file arrives at the destination.less, play an audio or video file of a folder in the preview in one window. From a second Strata window (runstrataagain), rename that folder and then delete it with Shift+Delete. Do this once on the network mount and once on a local disk.Expected:
Xopen in a program, then renameXwith F2.Expected: after about 1.5 s, the error names that program. On main, "Permission denied" appeared at once.
Step 5: interface thread
Mount sshfs, start Strata from a terminal with
STRATA_UI_STALL_MS=250set, and open a folder on the mount. Stop the daemon withkill -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 withkill -CONT.Expected:
kill -CONT.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:
kill -CONTthe folder loads by itself, and the saved default folder is kept.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
serverinodropped), pressronfooand typeFoo.Expected: accepted and renamed. On main the prompt said "already exists".
ln a.txt link.txt, then in 10xer mode pressrona.txtand typelink.txt(orLink.txton 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.
notes.txtwith Delete. Create a newnotes.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.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".
scripts/fslab/fslab.sh up, thentest local_operations:: vfat exfat exfat-fuse cifs-posix sshfs nfs3(andleftovers::), the samelocal_operations::run with--rev c17db1a4(main has noleftovers::tests), thendown.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
Expected:
nfsstat -c).Expected: no
GETATTRwhile hidden.Expected: changes show only after F5. Turn it back on, and they show again without a restart.
kill -STOPof 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:
Step 8: leftovers
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:
song.flac) and an incomplete copy (Show, Delete…).Expected:
song.flacis back and selected, and the hidden folder is gone.song.flaccreated first: it comes back assong (1).flac, listed under "These names were already taken".Expected: "Wait for the running operation to finish, then try again."
kill -9 "$(pgrep -x strata)"during the copy, start Strata again and open that folder.Expected:
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
/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".
/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.