Repository navigation
fix(apps): stop calling an ordinary reinstall an orphaned partial install - #31686
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: only the log level and text change, the reinstall path behaves exactly as before, and a test covers both the empty-folder case and the leftover-file case. Notes
[DESIGN-REVIEWED] da89e49 Description read[DESCRIPTION-READ] 97c2760ba65404cf27ed59147c5751078f0580633b73659fc7855c5ce605628a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. It is a one-branch log-level fix aimed at the misleading message, with a reproduction and a test that fails on base. What this change shipsInventory (2 items) — 2 justifiedIntent: reinstalling an app after a default uninstall should stop logging a crash-recovery warning that never happened. FIX.
[FIRST-PRINCIPLES-REVIEWED] da89e49 Description read[DESCRIPTION-READ] 8a7927550d4763962160a3fcbdf34fd7244f2a4647d8d61fc583f23c96204b13 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
41c22b7 to
7d93050
Compare
|
Rebased onto |
7d93050 to
fef7892
Compare
|
Rebased onto |
…tall A default uninstall keeps the app's folder with only data/ in it, so reinstalling the same name finds that folder with no install record and took the crash-recovery branch, logging "WARNING Removing orphaned partial install". Seen on every reinstall of an adopted app after an uninstall. The install has already moved data/ aside at that point, so an empty folder is exactly the uninstall's leftover: it is now logged at INFO as a reinstall into the kept folder. A folder holding anything else is still an orphaned partial copy and keeps the warning. The cleanup itself is unchanged. Part of #26967
fef7892 to
da89e49
Compare
|
Rebased: main moved in src/kiro_crew/apps/adoption-pins.json, src/kiro_crew/cli.py, test/test_builtin_adoption_pins.py since this head went green (7c364bc -> c52c1eb); CI re-running. The previous head fef7892 had every review lane clean (GPT and Opus no findings; Design and First Principles PASS; UX skipped). Its four reds (Dependency License Gate, Build Wheel, Sensitive Change Review, Publish readiness signal) were the repo-wide installation-token rate limit and a setup-python 429, and its Windows matrix sat queued for 2.5h. The re-runs of those passed before the rebase. The diff is byte-identical to fef7892. On da89e49 the related app-manager, adoption-pin and cli app tests pass locally (314 passed), and so do the touched-file gates. The Proof line was re-run for the new head. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on da89e49, no conflict, no open change request.
…tall (#31686) A default uninstall keeps the app's folder with only data/ in it, so reinstalling the same name finds that folder with no install record and took the crash-recovery branch, logging "WARNING Removing orphaned partial install". Seen on every reinstall of an adopted app after an uninstall. The install has already moved data/ aside at that point, so an empty folder is exactly the uninstall's leftover: it is now logged at INFO as a reinstall into the kept folder. A folder holding anything else is still an orphaned partial copy and keeps the warning. The cleanup itself is unchanged. Part of #26967 (cherry picked from commit 50f4684)
Problem / Motivation
Goal: Reinstalling an app after a default uninstall no longer logs a crash-recovery warning.
A default uninstall keeps the app's folder with only
data/in it. Reinstalling the same name then logsWARNING kiro_crew.apps.manager: Removing orphaned partial install at <home>/apps/<name>, although nothing crashed and the data is kept correctly. Reproduced onorigin/mainwith an adopted papyrus: uninstall, trust, registry reinstall, and the warning is ingateway.logevery time.Why it matters
The warning names a crash that did not happen, on the ordinary uninstall-then-reinstall path every app user can take (the adopted former built-ins of #26967 included). Someone reading the log after a reinstall is sent looking for a hard kill, and a real orphaned partial copy reads the same as a routine reinstall.
Not a goal
data/is still moved aside and put back.What changed (motivation → approach → change)
Symptom: a routine reinstall logs a crash-recovery warning. Root cause:
install_appinsrc/kiro_crew/apps/manager_install.pyreaches its orphan cleanup for any app folder standing at the destination without an install record, and the cleanup logs one fixed warning, although the comment above it already names the default uninstall's leftover as one of the two cases.At that point the install has already moved
data/aside, so an empty folder is exactly what a default uninstall leaves. It is now logged at INFO as a reinstall into the folder the uninstall kept. A folder holding anything else is still an orphaned partial copy and keeps the warning. The removal and re-copy are unchanged.Backwards compatibility
Compatible: only a log level and its text change, for the leftover case; every install outcome is the same.
Removes nothing: no file, record, key or function is removed; the warning still fires for a real orphaned copy.
Tests
test/test_app_manager_reinstall_log.py:data/, default uninstall, reinstall: no orphan warning, the INFO line is logged, and the data survives;app.jsonbesidesdata/still logs the orphan warning.Proof: PROVEN test/test_app_manager_reinstall_log.py::TestReinstallLog::test_a_reinstall_after_a_default_uninstall_is_not_crash_recovery (head da89e49)
Determinism: 20/20 at
-n0, 10/10 at-n 4 --dist loadgroup --max-worker-restart=2withtest_app_manager.pyandtest_app_manager_installed_tree.pyas co-tenants, and a shuffled order (seed 20585) green. Everytest_app_manager*.pyfile andtest_apps_routes_coverage_update_uninstall.pypass.Manual verification
Isolated gateway from this branch (loopback, stub ACP backend, throwaway
KIROCREW_HOME/HOME/XDG dirs), papyrus adopted at 6ca7bc69:POST /api/apps/papyrus/uninstall {}leftapps/papyrus/holding onlydata; after trust andPOST /api/apps/registry/install {"name":"papyrus"}the install succeeded andgateway.logcarries noRemoving orphaned partial installline (the same steps onorigin/mainlogged it on each reinstall).Related Issues
Part of #26967
Sibling sweep
Swept: git grep -n -i "orphaned partial" -- src
Sibling: src/kiro_crew/apps/manager_install.py -- changed here
Sibling: src/kiro_crew/apps/manager_tree.py -- not affected -- a docstring naming the two cases, no log line
Pattern harvest
Not generalizable: one fixed log sentence on a branch that serves two cases its own comment already told apart.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)