0.9.19: Free up space size, search keys and Clear search, folder identity on Linux, stored content in the space check, and an Activity crash fix #252

Merged
ethan-hann merged 72 commits from integration-0919 into main 2026-10-27 17:15:29 -05:00
Owner

Free up space says about how much space it frees before it runs, computed in the background from what only the deleted snapshots reach and cached (#228, D66); confirming a run cancels the estimate, and the footer never asks about a game the player left. Ctrl+Shift+F (Cmd+Shift+F) focuses the games search from any screen in both layouts, each search box's tooltip names its key, and the profile search is pinned above the table when there is room (#219, D64.3). History's search matches the notes of a snapshot's profile, its count names hidden Recently removed matches apart, and every "no matches" state has a Clear search button that returns focus to the box (#223, D64.1, D64.3).

The empty-start check gives the right reason for left-out, held, unreadable, unconfirmed, foreign-marker and older-snapshot folders, and a read failure is no longer blamed on a stopped switch (#222, #235, D65.2, D65.4). A mods folder counts in the library's already-added check and no longer marks every profile not loaded before its first snapshot (#221, D61). The snapshot space check leaves out content already stored only when the raw estimate does not fit, so a drive with room pays nothing (#170, D16). The folder pin reads device and inode on Linux (statx) and macOS (stat), so a folder swapped at the same path is caught off Windows too (#167, D57).

Fixed: clicking a task in Activity could crash on the UI thread when the open task had been let go by the job registry; the row now leaves after the selection commit (#246). Look again raises no artwork event for unchanged images (#231). Flaky tests fixed at their cause (#231, #232, #234); every build script is parsed by a test (#230). Defender's hold on fresh small files measured on the CI VM: none seen, schedule kept (#225 item 5, D31.6). Dogfood checklist gained keyboard and screen-reader checks (#226).

Each change was implemented test-first and reviewed by two code reviews; their findings and a gap analysis were fixed on this branch. Follow-ups filed: #236 #238 #240 #241 #244 #248 #249.

Local gates: Windows gate on ad7209af passed (18796 tests, 0 failed, 75 listed skips); Linux gate on the VM on 2f49463d passed (18779 tests, 0 failed, 142 listed skips); since 2f49463d only LegacyLocalDataTests changed, fixing a load-dependent wait.

Closes #167 #170 #219 #221 #222 #223 #225 #226 #228 #230 #231 #232 #234 #235 #246

Free up space says about how much space it frees before it runs, computed in the background from what only the deleted snapshots reach and cached (#228, D66); confirming a run cancels the estimate, and the footer never asks about a game the player left. Ctrl+Shift+F (Cmd+Shift+F) focuses the games search from any screen in both layouts, each search box's tooltip names its key, and the profile search is pinned above the table when there is room (#219, D64.3). History's search matches the notes of a snapshot's profile, its count names hidden Recently removed matches apart, and every "no matches" state has a Clear search button that returns focus to the box (#223, D64.1, D64.3). The empty-start check gives the right reason for left-out, held, unreadable, unconfirmed, foreign-marker and older-snapshot folders, and a read failure is no longer blamed on a stopped switch (#222, #235, D65.2, D65.4). A mods folder counts in the library's already-added check and no longer marks every profile not loaded before its first snapshot (#221, D61). The snapshot space check leaves out content already stored only when the raw estimate does not fit, so a drive with room pays nothing (#170, D16). The folder pin reads device and inode on Linux (statx) and macOS (stat), so a folder swapped at the same path is caught off Windows too (#167, D57). Fixed: clicking a task in Activity could crash on the UI thread when the open task had been let go by the job registry; the row now leaves after the selection commit (#246). Look again raises no artwork event for unchanged images (#231). Flaky tests fixed at their cause (#231, #232, #234); every build script is parsed by a test (#230). Defender's hold on fresh small files measured on the CI VM: none seen, schedule kept (#225 item 5, D31.6). Dogfood checklist gained keyboard and screen-reader checks (#226). Each change was implemented test-first and reviewed by two code reviews; their findings and a gap analysis were fixed on this branch. Follow-ups filed: #236 #238 #240 #241 #244 #248 #249. Local gates: Windows gate on ad7209af passed (18796 tests, 0 failed, 75 listed skips); Linux gate on the VM on 2f49463d passed (18779 tests, 0 failed, 142 listed skips); since 2f49463d only LegacyLocalDataTests changed, fixing a load-dependent wait. Closes #167 #170 #219 #221 #222 #223 #225 #226 #228 #230 #231 #232 #234 #235 #246
Root cause: a lookup that finds Steam images the folder already holds
rewrote them and reported a change, so one background lookup (started by
the first read) that landed before Look again made Look again raise a
second artwork-changed event for the same state. The contract story
counted the extra event ("events after looking" fake 3 / real 4) on a
loaded machine only, when the background lookup was late enough to see
the Steam files. SaveSteamImage now compares bytes, as SaveGogImage
already does, so an unchanged image is no change.

The contract story also waits for the background lookup its first read
starts, so it cannot see Steam's two files half written.

Observed red: ArtworkLookupTests.Looking_again_announces_no_change_when_steam_has_the_same_images_as_before
failed with "Assert.Equal() Failure: Collections differ / Expected: [alpha-1] / Actual: [alpha-1, alpha-1]".
Looking_again_announces_a_change_when_steam_has_a_different_image_than_before
passed first run; mutation check (keep any existing file) made it fail with
Expected [alpha-1, alpha-1] / Actual [alpha-1].
An apostrophe inside a single-quoted PowerShell string left
build/gate-linux.ps1 and build/package-linux.ps1 unparsable, and nothing in
the gate noticed until the next VM gate run failed to start.

BuildScriptSyntaxTests parses every build/**/*.ps1 with the PowerShell
parser (pwsh, ParseFile, no execution) and every build/**/*.sh with
bash -n (script fed on stdin; Git for Windows' bash is preferred on
Windows). Both CI gates already have pwsh and bash, so the tests run
there and need no workflow or expected-skips change. Further tests run
the same checks on made-up scripts in a temp folder, proving a slip is
reported by file and line and that subfolders are searched.

Observed reds (mutation check, since the tests passed on their first run):
- Put `it's` inside a single-quoted string in build/gate-linux.ps1 and
  dropped a closing quote in build/gate-linux.sh. Every_powershell_script_
  under_build_parses failed with "gate-linux.ps1:184: The string is
  missing the terminator: '." and Every_bash_script_under_build_parses
  failed with "gate-linux.sh: bash: line 141: syntax error near
  unexpected token `('". Both scripts restored.
- Made the parse helpers report nothing (empty error loop, bash
  --version). The four temp-folder tests failed on their assertions.
  Restored.
A snapshot, and a recently removed one that left a profile that still exists, now matches words in that profile's notes, using the same matcher as the profile search. While Recently removed is closed, the spoken count covers the listed snapshots and says the removed matches after them ('1 of 8 snapshots, plus 1 of 2 in Recently removed'); open, or when the game has no other snapshots, it stays one count.

Reds observed: Typing_words_from_a_profiles_notes_finds_the_snapshots_that_belong_to_it (expected Deep cave run, First night, Survival test; actual empty), Words_may_come_from_a_snapshots_own_text_and_from_its_profiles_notes_together (expected Deep cave run; actual empty), A_recently_removed_snapshot_is_found_by_the_notes_of_the_profile_it_left (expected Cleared Blackreach; actual empty), While_recently_removed_is_closed_its_matches_are_counted_apart_from_the_snapshots_listed (expected '1 of 8 snapshots, plus 1 of 2 in Recently removed'; actual '2 of 10 snapshots'). The open-section and only-removed count tests passed first and were mutation-checked.
The double-click test sent two real mouse clicks, and whether they count as a double-click depends on the wall-clock time between them, so a loaded machine could stretch them past the interval and no chip opened. It now raises the DoubleTapped gesture the clicks would produce and pumps the dispatcher until the field has focus.

Observed red (slow machine simulated with a 700 ms pause after each click): ChipListEditViewTests.Double_clicking_a_chip_opens_it_for_editing failed with InvalidOperationException: Sequence contains no matching element at ChipListEditViewTests.cs:32 (OpenField), as the gate saw. After the fix the class passes; with the double-tap handler disabled the test fails (mutation check).
Tests for the empty-start safety check (D65.2) in states the first cut did not cover: a file the game leaves out, a file nobody can read or that another program holds, a stopped switch, a saves folder that is missing, and a folder the player made again with their own files.

Observed reds:
- A_saves_file_nobody_can_read_stops_the_saves_folder_starting_empty_with_a_reason_a_snapshot_cannot_fix (InUse, Unreadable): expected validation.profile.startEmptyUnchecked, actual validation.profile.startEmptyUnsaved ("Take a snapshot first" for a locked file).
- A_saves_folder_with_a_stopped_switch_is_refused_with_a_reason_a_snapshot_cannot_fix: same assertion, caught by mutating the refusal.

Tests that passed on first run were mutation-checked: dropping the ignore patterns from the check fails both left-out-file tests, treating a missing folder as blocked fails the missing-folder test, and dropping the marker case fails the folder-made-again test.

Fix: a refusal for a folder that cannot be checked (held or unreadable file, stopped switch, older point) now carries a new reason, startEmptyUnchecked, in the catalog, since taking a snapshot does not fix it. A folder with no SavePoint marker counts as having files no snapshot holds. The rule and IProfilesApi doc comments now state the exact rule the code applies, and the unused IsSafeAsync is removed.
The tests that stage a failed settings write (revert the stored root, delete the settings file) did it with one call, and the catalog gives up on a held file after about 1.3 s. On a slow machine a virus scanner or indexer holding the freshly written file made the staging step throw, so the product saw a settings write that had landed (names the new default) and never took the move-back path. The staging steps now keep trying until the file is free (30 s limit).

Observed red (a 2.5 s hold on the settings file simulated during the revert step, removed again): LegacyLocalDataTests.A_failed_move_back_shows_the_history_this_run_and_the_next_start_finishes_the_move failed with Assert.Contains() Failure: Filter not matched in collection (no 'next start finishes the move' log line), and A_cancelled_read_back_leaves_the_storage_in_the_new_default_and_the_original_failure_surfaces failed with Assert.False() Failure (Expected False, Actual True). With the retry in place and the hold still simulated, all 24 tests passed. Product code is unchanged.
The Recently removed section's no-matches line, the template picker and the library picker now carry a Clear search button, a Tab stop with an accessible name. The picker's button shows only when the typed search is what hides the games. A search box now takes focus back when its Clear command runs from a button elsewhere on the screen (History, profiles, games), since that button leaves with the text and focus was dropped.

Reds observed: Clearing_a_search_nothing_matches_lists_every_template_again (expected '' actual 'zelda'); Clearing_a_search_that_finds_nothing_lists_the_games_again (ShowClearSearch expected True, actual False); History Clearing_the_search_from_the_no_matches_message_with_the_keyboard_puts_focus_back_in_the_search_box and the removed-section equivalent (expected the search TextBox focused, actual null). Tests that passed on first run (Tab reach of the removed button, profile and games focus return, picker view tests, SearchBoxViewModel Cleared) were mutation-checked by hiding the button or emptying the focus handler; each failed as expected and the code was restored.
Library scan and add: a game whose mods folder overlaps an added game's mods folder is marked as already added (it would be refused on add).
Profile row: a mods folder no profile has a snapshot of yet (added after the profiles' last snapshots) holds nobody's files, so it no longer makes every profile not loaded; the next snapshot takes it. A mods folder another profile holds, or one with a snapshot, still counts.
Open game/mods/saves folder entries carry a tip saying they open the folder as it is now.
Tests: 7 Days to Die macOS mods path resolved with a macOS platform; Open mods folder in More actions, right-click, Menu key and Shift+F10.

Observed reds: ModsLibraryTests.A_scanned_game_whose_mods_folder_is_a_mods_folder_of_an_added_game_is_marked_as_added (Assert.True Expected True Actual False); ModsLibraryTests.Adding_a_scanned_game_whose_mods_folder_belongs_to_an_added_game_says_it_is_already_added (Expected AlreadyAdded, Actual Refused); ModsHistoryTests.A_mods_folder_added_after_the_profiles_last_snapshot_leaves_the_profile_active_and_offers_the_first_snapshot_of_it (Assert.True Expected True Actual False); GamesScreenOpenFolderTests.Every_open_entry_says_it_opens_the_folder_as_it_is_now_and_not_the_profiles_files (Expected tip text, Actual null).
Tests green on first run got a mutation check and failed when the code was broken: non-match library test, in-use history pin, first-mods-snapshot and other-profile tests, macOS template path, mods menu entries (VM and view).
The re-check before a destructive git step compared the real path and the
consent marker everywhere, and the folder's identity on Windows only. On
Linux and macOS a folder renamed away and replaced by a new directory at the
same real path was caught only by the marker. HostPathProbe.ReadIdentity now
reads st_dev/st_ino with statx on Linux (one struct layout on every
architecture) and stat$INODE64 / stat on macOS (64-bit-inode layout), so
FolderPin carries an identity on every OS. Any failure (missing path, libc
without the call, unknown OS) still returns null, and the path-plus-marker
check runs as before. No new dependency.

Tests: the Windows-only pin and engine re-check tests now run on every OS,
and HostIdentityTests pins the identity read itself. Their Linux skip lines
are gone from build/expected-skips/linux-ci.txt.

Observed reds on the Linux VM before the fix:
- HostIdentityTests.A_folder_and_a_link_to_it_have_one_identity_and_nothing_else_shares_it (identity was null)
- HostIdentityTests.A_folder_renamed_away_keeps_its_identity_and_the_new_folder_at_its_path_has_another (identity was null)
- FolderRecheckTests.A_different_folder_put_at_the_same_path_before_the_step_is_refused (Clean and Discard): no FolderChangedException
After the fix the Linux run of those classes plus PathSafetyPinTests,
PathSafetyTests, PathSafetyHostTests, PathSafetyLinkTests,
PathSafetyIdentityTests and FolderGuardTests passed (242 tests, 0 failed).
Ctrl+Shift+F (Cmd+Shift+F on macOS) focuses the games search in the rail or on the shelf from any screen, including from the profile table; Ctrl+F still goes to the profile search on the Games screen. Both search boxes now name their key in a tooltip and expose it as the accelerator key, through the catalog with os-specific modifier names. The profile search sits in its own row above the scrolling profiles when the profiles area is at least 240 layout pixels tall, and is the first item of the scrolling profiles otherwise; the measure is in layout pixels so it is the same at every interface size.

Observed reds: FindKeyTests Ctrl_Shift_F_asks_for_the_games_search_off_macOS (Assert.True, Expected True, Actual False); GamesSearchShortcutViewTests Ctrl_Shift_F_on_the_Games_screen_moves_to_the_games_search_not_the_profile_search (Assert.Same, Actual null) and 6 more; GamesSearchShortcutTipTests tooltips (Expected 'Search profiles (Ctrl+F)', Actual null; missing key search.shortcut.find); GamesSearchShortcutViewTests tooltip theory (Actual null); GamesPinnedSearchTests Too_little_room_scrolls_the_profile_search_with_the_profiles (Expected False, Actual True); GamesPinnedSearchViewTests in_a_short_pane (Expected 'ScrollingProfileSearchBox', Actual 'ProfileSearchBox') and the launch card test (Expected 'ScrollingProfileSearchBox', Actual 'ProfileSearchBox'). Mutation checks: dropping the dialog guard failed the dialog test; the first card-room design (counting the card back) failed the new card test and the reflow tests showed it left the table 87 px, so the card is not counted back.
Free up space told the player how many recently removed snapshots it would
delete but not how much space comes back. Core now estimates it: the stored
size of the objects that only the refs the run deletes reach.

Core: GitEngine.EstimateFreedBytesAsync lists the candidates with one
rev-list of the doomed tips against every kept tip (cheap, never misses an
object only the doomed refs hold, but can list data an older kept snapshot
also holds), removes whatever a walk of everything kept reaches (kept refs,
HEAD, the index; the same reachability a reclaim uses), and sums
%(objectsize:disk) of the rest with one cat-file --batch-check. No object
content is read. The answer is cached per git directory under a digest of
every ref plus HEAD and the doomed set, so a snapshot, removal, restore or
run invalidates it. IGamesApi/ISettingsApi gain EstimateFreeUpSpaceAsync,
which takes the preview's token, refuses a token no preview issued, and is
cancellable.

App: the Settings row adds "and free up about X" once the size is known and
shows the count alone while it is computed or when it cannot be; the
confirmation in Settings and in the Games footer names the size when it is
ready or arrives within 1.5 s, and otherwise does not wait. A failure shows
nothing about size (the backend logs it).

Reds observed (assertion failures, with the engine method and the Api
members stubbed to return 0):
- FreedBytesEstimateTests.Data_only_the_deleted_refs_reach_is_counted_by_its_stored_size:
  Assert.InRange() Failure, Range (300000 - 330000), Actual: 0
- FreedBytesEstimateTests.A_file_only_an_older_kept_snapshot_holds_is_not_counted:
  same range, Actual: 0
- FreedBytesEstimateTests.A_cancelled_ask_stops_instead_of_answering:
  Assert.ThrowsAny() Failure: No exception was thrown
- FreeUpSpaceEstimateTests.A_big_file_only_the_removed_snapshots_hold_is_counted_by_about_its_size,
  The_estimate_is_close_to_the_space_the_run_then_frees,
  Every_games_estimate_adds_up_and_a_games_own_estimate_counts_only_its_records:
  Assert.InRange() Failure, Actual: 0
- FreeUpSpaceEstimateTests.A_token_no_preview_issued_is_refused and
  An_unknown_game_fails_and_a_cancelled_ask_fails_as_cancelled:
  Assert.False() Failure, Actual: True
The App tests and the FreeUpSizeEstimate tests passed on their first run
and were mutation checked (size dropped from the row, from each question,
the grace wait removed, the newer-preview cancel removed, the share of a
finished question removed): each mutation failed the tests named for it.
The check summed the raw size of every new or changed file, so a file put
back as an older snapshot held it, or copied under a new name, was counted
although git stores one copy of any content. A nearly full drive could be
refused for a snapshot that would fit.

The check now reads the smallest listed files, up to 64 MiB in total, takes
their git content id and asks the store which ids it holds; those files add
nothing. Files that are not read (past the limit, at or over the streaming
threshold, links, unreadable) count in full, so the estimate errs high. A
file git streams into a pack is written before git finds it stored, so it
always counts. Files whose size, time and content match the index are
never listed, so a switch back and an edit that is put back unchanged were
already free; tests pin both.

Observed reds before the change:
- A_file_put_back_as_an_older_snapshot_held_it_does_not_count...: expected 0, actual 300000
- A_new_file_whose_content_is_already_stored_under_another_name_does_not_count: expected 0, actual 300000
- A_new_file_next_to_files_already_stored_counts_in_full_and_a_snapshot_that_cannot_hold_it_is_refused: required 201000 expected, 501000 actual
- A_snapshot_of_files_already_stored_is_not_refused_on_a_nearly_full_drive: DiskSpaceException, 301000 needed
Guard tests that passed first run were mutation-checked (read limit and
streaming threshold removed; listing widened to every tracked file).
The remembered estimate was keyed on the refs and HEAD, but a reclaim also
keeps what the folder's index names, and an index can change with no ref
moving (a switch that finishes later). The key now includes the index file's
size and time.

Red observed: FreedBytesEstimateTests.A_change_of_the_folders_index_with_no_ref_moving_is_noticed_on_the_next_ask:
Assert.InRange() Failure, Range (300000 - 330000), Actual: 333 (the stale
answer from before the index changed).
The empty-start check treated any git or IO failure while reading the folder as a stopped switch, so the wizard's preview told the player to finish or discard a switch that never happened. Such a failure now blocks as Other, which shows the can't-check reason in the preview and in the refusal. A stopped switch keeps its own block.

Observed red: A_failure_reading_the_saves_folder_is_not_blamed_on_a_stopped_switch_in_the_preview failed with Expected: Other, Actual: StoppedSwitch. The refusal test passed on its first run; with the catch returning NewChanges both tests fail (mutation check).
A game whose only snapshots are in Recently removed announced '1 of 1 snapshot' while the section was closed and nothing was listed. The count now says '1 of 1 snapshot in Recently removed' (new catalog key) until the section is opened. A test covers a closed section where no removed snapshot matches, which must not say 'plus 0 of 2 in Recently removed'.

Observed reds: A_game_with_only_recently_removed_snapshots_names_them_as_hidden_matches_while_the_section_is_closed - Expected '1 of 1 snapshot in Recently removed', Actual '1 of 1 snapshot'.
The no-match test passed on its first run; mutation check (always use the 'plus' message) failed it: Expected '1 of 8 snapshots', Actual '1 of 8 snapshots, plus 0 of 2 in Recently removed'.
Every snapshot paid for reading its changed files (about 0.6 to 1.2 s for
4000 files) to fix a case that only matters on a nearly full drive. The
space check now judges the raw size first and passes at once when it fits,
reading nothing. Only a snapshot that does not fit by raw size reads files
(same 64 MiB limit and rules) and is judged again on the reduced figure; if
nothing could be left out, the original refusal with the raw figures stands.

The read goes through the FileHashed seam so tests can see it.

Observed red before the change:
- A_snapshot_that_fits_without_looking_at_what_is_stored_reads_no_file_content: expected 0 reads, actual 1
Tests that assert the reduced figure now run with the drive nearly full.
The Games screen's two search boxes show '<label> (<key>)' and expose the key to screen readers; History's box, which Ctrl+F also reaches, showed neither.

Observed red: The_search_box_names_Ctrl_F_in_its_tooltip_and_as_its_accelerator_key - Expected 'Search snapshots (Ctrl+F)', Actual null.
A foreign or corrupt consent marker, and a folder on an older point that also has changes, were refused with Take a snapshot first, but a snapshot of either fails. They now show the can't-check reason. A folder with no marker gets its own reason that points at confirming the folder in Edit game, since the snapshot fails until then.

Observed reds: marker belongs to another game / is corrupt: Expected validation.profile.startEmptyUnchecked, Actual validation.profile.startEmptyUnsaved; older point with changes: Expected Other, Actual NewChanges; folder without a marker (refusal and the retry of a made-again folder): Expected validation.profile.startEmptyUnconfirmed, Actual validation.profile.startEmptyUnsaved. The stopped-switch test now has a changed file; it passed on its first run and fails with Expected StoppedSwitch, Actual NewChanges when the stopped-switch check is made to run after the changes check (mutation check).

Also reword the doc comments on left-out files, the refusal exception and the older point, and restore the space in the catalog entry.
The pinned and scrolling profile search boxes are two views of one box. Hiding the one that had the cursor dropped focus to nothing. The other box now takes focus, in both directions, only when the cursor was in the search. The search-row wrapper's children are re-indented.

Observed red: Focus_in_the_pinned_search_moves_to_the_scrolling_one_when_the_pane_shrinks_and_back_when_it_grows - Assert.Same expected the scrolling TextBox, Actual null.
The leaves-focus-alone test passed on its first run; mutation check (move focus without the had-focus gate) failed it.
On a timeout the test read the open field with Single(), which threw InvalidOperationException instead of failing an assertion. It now asserts the field was found first. The name says it raises a double tap, not two clicks. Test-only change; no behavior test, so no red was recorded.
The helper retried every SavepointException for 30 seconds, so a real failure in a staging step took that long to show. It now retries an IO or access error and the catalog's corrupt error only when an IO or access error is inside it. Test-only change; class run 3 times, 24 of 24 each.
On Windows without Git for Windows, bash can be the stub for a missing Linux distribution, which failed every script instead of skipping the check. A bash that cannot parse an empty script now counts as not installed. The bash and PowerShell parse runs stop a program that hangs after two minutes.

Observed red: A_bash_that_cannot_parse_an_empty_script_counts_as_not_installed - Assert.Null expected null, Actual ['fine.sh: '].
The hang test passed on its first run; mutation check (a 100 s limit instead of the one passed in) failed it: Expected null, Actual [].
The profile search stayed pinned when the profiles area was just over 240 px,
but the pinned box takes 60 px of that area, so the scroll area was left
shorter than a failure card and the card could not be scrolled fully into
view. The screen now learns the height of the card below the table and folds
the search into the scrolling profiles when the area cannot hold the card
beside a pinned search.

When the pane crosses the pinning height, focus now moves to the other box
without selecting its text and with the caret where it was, so the next
keystroke adds to the search instead of replacing it.

Observed reds:
- ScaledWindowTests.A_card_that_appears_below_the_table_is_scrolled_into_view_in_a_short_window:
  "The card at 258, 168, 630, 219 is not inside the scroll area at 258, 168, 630, 183."
- GamesPinnedSearchTests.A_card_the_area_cannot_hold_beside_a_pinned_search_folds_the_search_into_the_scrolling_profiles:
  Assert.False() Failure, Expected: False, Actual: True
- GamesPinnedSearchViewTests.The_next_keystroke_after_the_search_moves_adds_to_the_text_at_the_caret_instead_of_replacing_it:
  Assert.Equal() Failure, Expected: 2, Actual: 0 (caret)
Two guard tests passed on first run against a stub and were mutation-checked
(always fold when a card shows; ignore a card going away): both failed.
D64.3 says the key reaches the games search from anywhere, but the shelf box shows only on the Games screen, so the key did nothing on Settings, History or Activity in the Library layout.

Observed red: Ctrl_Shift_F_in_the_library_layout_from_another_screen_brings_up_the_Games_screen_and_its_search (Settings, History, Activity): Assert.Equal() Failure, Expected: Games, Actual: Settings (History, Activity likewise).
The dialog test passed first run; mutation check (dropping Dialogs.IsOpen: false from the window key guard) turned it red, then restored.
HostIdentityTests compared two reads on one file system, so a wrong device offset passed, and NotEqual checks passed when a read returned null. Add NotNull guards, a Linux test that checks inode and device against stat for a folder, a file and /proc (another mount), and a macOS test against stat -f.

UnixFiles held the macOS entry-point choice in a mutable static and its catch recursed without limit when plain stat was also missing. Each read now tries stat$INODE64 and then plain stat once, and returns null if the library or both entry points are missing.

Observed red: none yet for the OS comparison; the Linux test passes on the first run on the VM and gets a mutation check next.
The Open folder warning reached a menu item only as a hover tooltip, which keyboard and screen-reader players may never get. The shared menu item theme now binds the same tip to AutomationProperties.HelpText, so the Switch and blocked-snapshot entries gain it too.

Observed red: Every_open_folder_entry_gives_assistive_technology_its_warning_as_help_text (all four ways of opening the menu): Assert.Equal() Failure, Expected: "Opens the folder as it is now, which may hold a different profile's files.", Actual: null.
Observed red: not on Windows, where the warning already logs; the Linux run of A_folder_that_reports_no_identity_is_logged_as_one_whose_swap_only_the_path_can_tell is the red.
Fixes from the review of the size estimate.

- Confirming Free up space (Settings and the Games footer) now cancels the
  running estimate before the run starts, so its git reads no longer overlap
  the run's repack and prune, and a late answer cannot rewrite the Settings
  line.
- The Games footer returns without asking when the selected game changed
  during the count, the size wait or the open question, so a yes can no
  longer delete another game's Recently removed snapshots.
- The estimate's index pass now runs even when no ref is kept, so data only
  the index reaches is not counted as freed.
- FreeUpSizeEstimate Start, Cancel and Dispose do nothing after Dispose
  instead of throwing ObjectDisposedException.
- The confirmation and the Settings line now say "Deleting them frees up
  about {size}", so the figure reads as what the deleted snapshots free, not
  the whole run's total.
- New test pins the stored (on disk) size rule with compressible data.

Observed reds:
- FreedBytesEstimateTests.Data_the_folders_index_names_is_not_counted_when_every_ref_is_deleted_and_no_snapshot_is_current:
  Assert.InRange Range (0 - 30000) Actual: 300841.
- FreeUpSizeEstimateTests.Asking_cancelling_or_disposing_after_dispose_does_nothing_and_asks_nobody:
  ObjectDisposedException from Start.
- FreeUpSpaceViewModelTests.Picking_another_game_while_the_count_is_read /
  _the_size_is_worked_out / _the_question_is_open: Assert.Empty failure on
  the confirmations (a dialog opened for the left game).
- FreeUpSpaceViewModelTests and StorageSectionFreeUpTests
  A_yes_stops_the_size_that_is_still_being_worked_out_before_the_run_starts:
  Assert.True Expected True, Actual False.
- StorageSectionFreeUpTests size wording tests: expected "for good. Deleting
  them frees up", actual "for good and free up about 1.2 GB".
Mutation check: Data_that_compresses_well_counts_by_what_it_takes_up_on_disk
passed first run; with objectsize:disk changed to objectsize it failed with
Actual: 1000381 against Range (1 - 250000); restored.
Linux and macOS read an identity now, so a pin that comes back without one (for example a macOS stat entry point that never ran on a Mac) must leave a trace in the log, not only on Windows. The hold warning stays Windows-only.

Observed red (Linux VM): A_folder_that_reports_no_identity_is_logged_as_one_whose_swap_only_the_path_can_tell: Assert.Single() Failure: The collection was empty.
Choosing a task in the Activity list pushed the choice into SelectedRow, whose setter removed the open task from Rows when the registry had already let it go. The list was still committing that choice and enumerated the deselected row by its old index, which no longer existed, so the click threw ArgumentOutOfRangeException on the UI thread. It only happened once five newer finished tasks had pushed the open one out of the registry, hence "every once in a while".

The row now leaves through PostWhenIdle, after the commit has finished. The view tests had no way to see this because the screen harness always hands out the immediate dispatcher, which runs idle work inline; it now takes an optional dispatcher and the new test passes the real one.

Red observed: ActivityScreenViewTests.Clicking_a_task_while_the_open_one_has_been_let_go_by_the_registry_selects_it_and_drops_the_old_one threw System.ArgumentOutOfRangeException (Parameter 'index') at Avalonia.Controls.Selection.SelectedItems.GetEnumerator()+MoveNext() under InternalSelectionModel.OnSelectionChanged, from Window.MouseDown: the stack of the report. Green after the change.
The "no matches" buttons in History and in Recently removed ran the search
box's Clear, which is on only while there is text. A kind choice can empty
the list with nothing typed, so the button the message offers was grayed out
and Tab skipped it. History now has its own clear action: it empties the
words, puts the kind back on All, says the new count once, and returns focus
to the search box. It is on whenever the words or the kind narrow the list,
and both buttons use it.

Recorded reds (assertion failures, observed with the command stubbed off):
- Clear_search_is_on_only_while_the_words_or_the_kind_narrow_the_list:
  Assert.True() Failure, Expected: True, Actual: False
- A_kind_that_leaves_nothing_on_its_own_can_be_cleared_back_to_every_snapshot:
  Assert.True() Failure, Expected: True, Actual: False
- Clearing_empties_the_words_and_puts_the_kind_back_on_All_and_says_the_new_count:
  Strings differ, Expected: "", Actual: "zzz"
- Clearing_asks_the_search_box_to_take_focus_back: Expected: 1, Actual: 0
- A_kind_that_leaves_no_removed_snapshots_on_its_own_can_be_cleared_back_to_them:
  Assert.False() Failure, Expected: False, Actual: True
Mutation checks for tests that passed on first run: with the two buttons bound
back to the box's Clear, both new HistorySearchViewTests (list and removed
section) fail on Assert.True (button not enabled / Tab does not reach it);
with ReturnFocus emptied,
SearchBoxViewModelTests.An_owner_whose_own_clear_ran_can_ask_the_view_to_take_focus_back
fails with Expected: 1, Actual: 0.
NewChanges still said a folder without SavePoint's marker belongs to it, though
NotConfirmed owns that case now. HeldInSnapshot did not say that a file only a
leave-out rule covers is not a change (D65.4). Comments only; no behavior change.
The screenshot job never gave the fake backend a Free up space estimate, so
Settings could not show "Deleting it frees up about 1.2 GB". The Settings
scene now sets the estimate to 1.2 GB and waits until the preview line holds
the size before drawing. Regenerated the screenshots; only settings.png
changed, and it shows the new line.

Recorded red for the earlier identity tests (HostIdentityTests): on the Linux
VM, moving the statx device major offset from 136 to 128 in a throwaway commit
made HostIdentityTests.On_Linux_the_identity_is_the_device_and_inode_the_system_reports
fail with "Expected: 34359738370, Actual: 2" (observed by the agent that wrote
it; that commit was not kept).
The startup check renames the old default storage once and, by design, leaves the history where it is when Windows refuses the rename (git processes that just worked in the folder, a scanner, the indexer). The tests started the build right after seeding history, so under load the rename could lose that race and the history never arrived in the new default.

Upgrade now polls (rename to a probe name and back, 30 s deadline) until both folders can be renamed. The five "did not arrive" assertions now print the startup check's warnings. BackendWorkspace.MoveFolder retried for 2 s at most; it now retries against a 30 s deadline.

Observed red: with a 2 s hold on a file in the old storage and no wait, Settings_naming_a_new_default_that_holds_nothing_finish_the_move_from_the_old_folder (both theory cases) failed with "the history did not arrive" at the history assertion, after status.Ok and Reachable passed. With the wait and the same hold, the class passed 24 of 24. The hold was removed afterwards; class run 3 times, 24 of 24 each.
Merge legacy-data-load-flake into integration-0919
All checks were successful
Docs / site (pull_request) Successful in 1m16s
Gate / linux (pull_request) Successful in 19m27s
Gate / windows (pull_request) Successful in 43m59s
Docs / site (push) Successful in 1m19s
Release / linux (push) Successful in 2m8s
Release / windows (push) Successful in 3m0s
Release / checksums (push) Successful in 31s
ad7209af15
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint!252
No description provided.