Skip to content

Clear installed scan state after scan failures#88

Merged
kitsuyui merged 1 commit into
mainfrom
queue/audit-error-paths-audit-001
Jul 13, 2026
Merged

Clear installed scan state after scan failures#88
kitsuyui merged 1 commit into
mainfrom
queue/audit-error-paths-audit-001

Conversation

@kitsuyui

Copy link
Copy Markdown
Owner

Summary

Clear installed scan state after scan failures

Centralize installed-app scan finalization so the Installed page always
receives set-scanning-for-installed(false), even when scanning rejects.
Keep the existing IPC error dialog path unchanged and cover the shared scan
lifecycle with a focused regression test.

Chosen fix

  • approach: structural-centralize-installed-scan-finalization
    The observed bug is a missing failure-side state reset, but the safest minimal fix is to centralize scan finalization where scan lifecycle already starts (clean-app-management) instead of patching only the IPC catch block. That removes the split-brain ownership where success clears scanning in one file and failure would clear it in another, while keeping scope limited to the installed-app scan path and avoiding any repo-policy conflicts.

@github-actions

Copy link
Copy Markdown

gh-counter

PR gate

Removed Added +/-
TODO/FIXME 0 0 0
Type escape 0 0 0
Lint suppression 0 0 0
Electron webPreferences risk 0 0 0

Repo dashboard

main (a03e5b6) #88 (b93fd23) +/-
TODO/FIXME 0 0 0
Type escape 1 1 0
Lint suppression 36 36 0
Electron webPreferences risk 0 0 0

Reported by gh-counter

@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (a03e5b6) #88 (b93fd23) +/-
Coverage 41.1% 41.4% +0.2%
Code to Test Ratio 1:0.3 1:0.3 +0.0
Test Execution Time 7s 7s 0s
Details
  |                     | main (a03e5b6) | #88 (b93fd23) |  +/-  |
  |---------------------|----------------|---------------|-------|
+ | Coverage            |          41.1% |         41.4% | +0.2% |
  |   Files             |            146 |           147 |    +1 |
  |   Lines             |           2578 |          2582 |    +4 |
+ |   Covered           |           1061 |          1069 |    +8 |
+ | Code to Test Ratio  |          1:0.3 |         1:0.3 |  +0.0 |
  |   Code              |          13389 |         13440 |   +51 |
+ |   Test              |           4299 |          4332 |   +33 |
  | Test Execution Time |             7s |            7s |    0s |

Code coverage of files in pull request scope (0.0% → 44.4%)

Files Coverage +/- Status
main-src/libs/app-management/get-installed-apps-async.ts 0.0% 0.0% modified
main-src/libs/app-management/installed-app-scan.ts 100.0% +100.0% added

Reported by octocov

@kitsuyui kitsuyui merged commit 7e82d7e into main Jul 13, 2026
6 checks passed
@kitsuyui kitsuyui deleted the queue/audit-error-paths-audit-001 branch July 13, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant