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
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint!252
Loading…
Reference in a new issue
No description provided.
Delete branch "integration-0919"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
ad7209afpassed (18796 tests, 0 failed, 75 listed skips); Linux gate on the VM on2f49463dpassed (18779 tests, 0 failed, 142 listed skips); since2f49463donly 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.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.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.