Repository navigation
feat(extensions): queue confirmed updates with rollback - #261
Conversation
Upgrade filelock to 4.2.4 and setuptools to 84.2.1, including the isolated Qwen-ASR build. Constrain optional filelock consumers without adding model dependencies to the core profile. Validated 137 tests (2 skipped), dependency audit with the existing pytest waiver, environment compatibility, lock consistency, Ruff, architecture views, seven extension wheels, and cross-process FileLock/SoftFileLock/Hugging Face WeakFileLock behavior.
Lucas1479
left a comment
There was a problem hiding this comment.
Thanks for putting this together and for the detailed lifecycle tests. The opt-in update notifications, exact-version selection, native confirmation, and retained recovery state are useful additions. I support taking these features forward.
Requesting changes for three integration issues in a277d628948a58d1697bb775d84cd11522d9437c:
- P1: Cold validation of the rollback journal can block both backend startup and recovery after a successful update.
- P1: The Windows-only cleanup proof is required by installation paths on every platform, leaving Linux/macOS unable to complete subsequent installations.
- P2: An enabled update that introduces required configuration cannot become healthy, while the pending-update guard also prevents supplying that configuration.
Each inline comment includes a reproduction scenario, the implementation cause, and the missing regression tests.
Validation on the reviewed snapshot: the five focused Electron test files passed 147 tests, and test_backend_cleanup.py, test_chat_ingress_lifecycle.py, and test_vts_worker_lifecycle.py passed 63 tests. Three additional synthetic probes reproduced the cold-validator and required-configuration issues. The cross-platform finding is based on the implementation paths; I did not run Linux/macOS or packaged Electron end-to-end tests.
Please add coverage for fresh helper/store/installer instances and the complete scheduled-install → startup → keep/rollback journey. Thanks again for the work on this feature.
Adapt store, shipping-shell, failure-recovery and publication journeys to schedule changes before stopped startup and explicitly keep healthy updates. Install loopback test transport before app readiness through the owned inspector; preserve native confirmation and installation boundaries. Warm both retained versions through the canonical validator before reading cold recovery state. Bind packaged cleanup receipts to the code root resolved by the supplied Python runtime instead of the frontend resources directory. Validated 649 Electron tests, 38 cleanup/launcher Python tests, 30 store checks, the shipping failure journey with 11 restarts, and 27 packaged publication checks across six publications and 11 restarts. Windows executable build, Ruff and architecture checks passed.
|
Thanks for the cold-start recovery fix and the additional restart coverage. We will take over the two remaining review items from the current head
We will add regression tests for both boundaries, run the relevant build/lifecycle checks, and review the resulting changes before proposing integration. This is to coordinate ownership and avoid overlapping edits to these two areas. Thank you for the feature work and the fixes already submitted. |
|
Thanks again for the feature work and the earlier cold-start fix. The three maintainer follow-up commits have now been pushed directly to this PR branch as a fast-forward from
Validation: 673 Electron tests passed with no skips; build/config/SDK/Pi/TypeScript checks passed; 86 focused Python tests passed for the lifecycle fixes; the existing Electron settings smoke passed 12 interaction checks; and the isolated real-app model-less smoke and final light/dark/narrow UI captures passed. The initial GUI test launch's broken-pipe failure was treated as a test-launch failure and rerun using the CI wrapper; no production exception suppression was added. Limits for audit: Linux/macOS behavior was exercised through explicit platform fixtures on Windows, not native OS runs. Scheduled/ready/recovery screenshots use synthetic catalog state in the real isolated app. The full packaged/store-install journey was not requalified for these three commits. Evidence: lifecycle repair, real-app UI captures. The external audit should target |
|
Thanks for the feature work and for the external review that caught the recovery deadlock. I reproduced the abnormal-exit failure at The maintainer fix Fixes
Validation
Audit limits No physical Windows reboot/logoff or new native Linux/macOS roundtrip was performed. Boot transitions are injected at the OS-read boundary; real BootId reads and native Windows Job/process tests ran. The full packaged-executable publication journey was not rerun locally. Legacy PR state without a boot binding may need a Windows restart after first opening the updated app when old exit evidence is missing. Evidence, commands and implementation boundaries. No dependencies, versions, workflows, skips or audit exemptions changed. Please target |
|
CI follow-up pushed: The failed Electron Windows job reported 684 passed / 1 failed. The new native BootId assertion required an integer even though production permits an unavailable result and must keep ownership fenced. The failed read took approximately the 10-second query budget; the log does not distinguish timeout from missing registry evidence. The reader now uses a direct bounded Local validation: 686 tests passed, 0 skipped, application build and The PR description now points the next audit at |
|
Thanks for the additional audit and concrete probes. Both the new backend-startup regression and the forced-stop observer issue are addressed in Reproduction and repair
Validation on this revision
Checked-in evidence and reproducible startup probe. CI update: the Windows Electron build failed twice (including a retry) at actions/setup-dotnet before dependencies or project tests ran. The Microsoft .NET Runtime/SDK download endpoints returned HTTP 409. Retry job. Hosted validation is incomplete; other checks are still running. No real Windows reboot/logoff/fast-startup/hibernate qualification or native POSIX application rerun is claimed. The remaining nonblocking observations (including cancelled shutdown queries) are recorded in the evidence limits. I have not resolved review threads, changed the review decision or merged; this is ready for independent re-review once CI finishes. |
|
CI follow-up pushed as The Linux failure was my fixture wiring error: the extracted desktop startup simulated Windows, but the real cleanup module defaulted to the Linux runner's platform and correctly returned its POSIX no-op. The fixture now passes The Windows Electron and source-archive failures were in .NET setup before project tests. The wildcard resolved SDK 8.0.427 but followed an Production startup/shutdown code is unchanged by this follow-up. Fresh CI is running; the earlier 701 Electron / 96 Python / four real-app profile results remain evidence for the production repair at |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Lucas1479
left a comment
There was a problem hiding this comment.
The three findings in my original review at a277d628 are resolved at 65626b3fcc2d1c4e3ec98e185ff562ec21b0fe02. I have rechecked the final code and corresponding regression coverage, replied to each original discussion, and resolved all three threads. Cold recovery validation, Windows-only scheduled maintenance with preserved POSIX behavior, and required-configuration repair now address the original concerns. All 18 CI checks passed for this exact head.
Updating my review to approve, superseding the earlier request for changes. Thank you for the fixes and regression tests.
原 a277d628 审查的三项问题已在 65626b3f 解决。我已核对最终代码及对应回归覆盖,逐条回复并解决讨论。冷启动恢复校验、仅 Windows 启用的定时维护及保留的 POSIX 行为、必填配置修复均已处理原问题;当前提交 CI 18/18 通过。现更新为批准,替代旧的请求变更结论。感谢修复和回归测试。
…ime (#269) ## Problem and resulting behavior Replace the self-contained .NET Windows wallpaper helper with an independent, standard-library Python helper shipped with Electron. All helper entry points use `-I -S` with the backend runtime selected by `pythonRuntime.ts`; the selected environment's site initialization and `.pth` hooks do not execute. Windows sessions prefer `pythonw.exe` beside the selected `python.exe` to avoid a detached venv interpreter allocating a console. Remove the replaced C# projects, runtime-only notices and .NET build/CI prerequisites. Electron retains lifecycle/status ownership. Existing PascalCase journals, string phases, exact .NET UTC creation ticks and Settings field bytes remain compatible. Only Settings fields 28/48/49 are rewritten. The actual Set pipe receiver is persisted before any request bytes. Known Lively reporting/close limitations in #233 remain. Refs #264; based after merged #261. ## Review fixes Current follow-up commit: `482f2365`. - **Cross-session discovery:** read process/session membership from the native system snapshot before opening current-session Lively candidates. Foreign-session access restrictions cannot block every command. Snapshot failures and denied selected identities remain visible errors; access denial is never treated as proof that a receiver exited. - **Interpreter isolation:** use `-I -S` in Electron, setup, smoke and lifecycle helper invocations. Source/packaged resource tests use a controlled temporary-venv `.pth` hook, including a positive control proving that `-I` alone executes it. - **Electron crash recovery:** launch with `detached: true` while keeping pipes and normal shutdown waiting. Actual Electron parent tests exercise a Windows venv launcher and the real helper main/Session/journal lock with a synthetic desktop. A non-detached control reproduces interrupted recovery; the fixed launch restores after `taskkill /F` without `/T` and removes the journal. Normal shutdown passes too. - **N1, detached venv console:** the F3 fix introduced a console allocation regression despite `windowsHide`. Reproduced before production repair by adding `GetConsoleWindow() == NULL` to the real Electron fixture. Sessions now use the same-directory `pythonw.exe` when present; setup keeps the original interpreter. All three parent modes verify no associated console, usable standard pipes, isolated mode and absent site initialization. Source and packaged tests verify the windowed runtime path and mounted/stdin/exit round trip. - The earlier Unicode path repair remains covered: Windows ordinal comparison preserves physically distinct user projects. It intentionally follows Windows path casing, which differs from some .NET 8 managed comparer aliases. The independent agent reviewed N1 without edits and independently passed **25 Electron isolation/lifecycle/parent-exit cases**. It also verified actual `pythonw.exe` stderr failure propagation and missing-sibling/custom-name selection, finding no actionable defect. The earlier F1/F2/F3 review independently passed 95 helper tests. These are advisory reviews, not GitHub approval. The earlier “actual parent death” claim tested a Python parent, which does not cover Electron/libuv's kill-on-parent-exit Job. Documentation and evidence now distinguish those scenarios. Detachment does not guarantee survival after explicit tree termination, logoff or power loss. ## Validation Current follow-up: - Python wallpaper contracts: **95 passed**, including Pending dispatch/deadline/cancellation, live C#/Python creation-tick equality, old journals, raw Settings preservation and snapshot session filtering. - Full Electron suite: **706 passed, 0 skipped**, including all three real-parent modes. - Build and Windows code-only unpacked packaging passed; native tray/helper smoke passed and packaged helper bytes match source. - Actual packaged model-less application: **15 checks passed**, including frontend/backend exit. - Actual Electron + installed-Lively startup, scene connection, control-panel open/close and quit restoration passed with the windowed session launch. - Changed Python lint and whitespace checks passed. - Clean source/provenance gate at `482f2365`: **4,288 selected files, 161 excluded, 0 errors/warnings**; code-only source archive created. Historical full Python coverage at initial candidate `f7408163`: **503 files, 6,703 passed, 19 skipped, 5 expected failures**. This was a split/resumed run; only the stalled 55-case profile-contract file used `UV_OFFLINE=1`, retaining assertions and `--locked`. It is not a fresh full-Python run at the current head. The previous head `78b48a9c` completed all 16 hosted checks successfully; new-head CI is evaluated separately. That head also passed installed-Lively normal exit, pipe loss, helper-crash recovery, Python-parent death and fresh-settings cold start. Helper resources excluding the common setup script: **74,922,671 → 58,761 bytes**. Ten alternating read-only samples at `78b48a9c` measured local medians of **239.5 ms (`-I`)** and **218 ms (`-I -S`)**. These measurements do not attribute the initial .NET-to-Python timing difference entirely to site initialization. [Commands, review repairs, evidence and limitations](https://github.com/Code-Amadeus/Amadeus/blob/482f2365/docs/evidence/issue264-python-wallpaper/README.md). ## Draft / remaining qualification - Remains draft and requires formal non-author GitHub approval before merge. - Cross-session filtering uses fake APIs plus native snapshot checks; an actual second-account Lively session was not exercised. The Electron force-kill regression uses a synthetic desktop; real-desktop probes cover separate normal/crash-recovery paths. - If the windowed sibling is missing, or the selected command has a custom name, preserve the selected runtime. Console absence is not established for those fallback/custom distributions. Manually closing an unwanted terminal was not reproduced as a desktop-loss scenario. - Installed Lively is the locally repaired 2.2.1.0 from #233. Unmodified official Lively, a machine without a modern .NET SDK/runtime, physical multiple displays and full release artifacts still need qualification. - Unchanged dependency locks still fail the high-severity npm audit gate (Electron: 2 high/1 moderate; Pi: 1 high/1 moderate). No dependency version, audit exemption or test gate is relaxed. - .NET 8 support ends 2026-11-10. If replacement cannot be qualified in time, retarget the old release helper/CI to .NET 10 separately.
Current audit revision — 2026-10-26
Audit target:
65626b3fcc2d1c4e3ec98e185ff562ec21b0fe02.The backend startup and observer-preserving shutdown repair is in
3413e883; the latest commit addresses two hosted CI failures without changing that production implementation:win32to the real cleanup module on every host. Its missing platform argument caused three Linux failures. All assertions remain, including the separate POSIX routing cases; focused local validation is 10 passed, 0 skipped.8.0.xresolved: 8.0.427. The wildcard'saka.msredirect targeted a storage account that denied public access with HTTP 409; retry reproduced it. Microsoft's public SDK URL returns 200, and the official installer dry-run confirms that an exact-version request uses it. All three Windows setup steps retain their existing tests and gates.Production-change validation at
3413e883: 701 Electron tests, 0 skipped; 96 focused Python tests; build, changed Python lint and diff checks passed. Native Windows tests covered failed shutdown and the full 15-second deadline with a live descendant and surviving outside observer. Four real built-app profiles (ordinary, zero-filled index, missing index with receipts, parent junction) each passed 15 application checks plus evidence preservation/verification.Repair details, CI diagnosis, reproducible commands and limits. Hosted CI for this exact head completed on 2026-10-26 (Pacific/Auckland): 18/18 checks passed, including Windows Electron build, Linux core, source-archive qualification, packaged catalog publication/recovery, all Python shards and the final cpu-model-less gate. CI checks. No assertions, test gates, timeouts or skips were relaxed. Independent re-review remains pending.
What and why
Plugin updates need an explicit delivery boundary and a retained recovery version. Add opt-in daily catalog checks that notify only, exact-version selection, and native installation confirmation. Runtime and extension releases remain independent; this adds no wheel self-updater.
On Windows, catalog packages and native local-wheel imports (including first installation) are queued for the next app start. Installation holds the backend launch boundary, rechecks official catalog/security/digest facts where applicable, and requires native confirmation. Existing backend owners must have physical exit proof: root PID creation identity and an out-of-Job observer confirming all owned descendants exited, or a positively observed later Windows boot. Verified history is compacted without deleting receipts; live or unverified process ownership refuses installation. Provider/Work outcome reconciliation remains independent.
On Linux/macOS, the existing immediate, version-isolated installation path is preserved. Backend contributions apply after a backend restart; standalone themes apply immediately. These platforms do not register Windows cleanup owners or create pending-update rollback journals. Daily notification-only catalog checks remain available.
Windows updates retain the previous wheel/environment, configuration, and OS-encrypted secrets in a durable journal. Startup health is tied to the exact target revision and complete contribution set; keeping the update is a separate user action. Within the same desktop session, users can complete required configuration and retry validation. Configuration writes invalidate earlier health evidence before settings advance and record the resulting encrypted target revision. Persistence failures, failed backend starts, and unconfirmed updates carried across app launches still require explicit recovery/rollback. Rollback preserves explicit disable intent and never replays Work. Restoring retained records uses a separate stopped-root recovery boundary and does not require historical child-exit proof or delete either installation.
The update UI uses the existing settings cards, switch, buttons, typography, and theme tokens. Automatic and manual checks occupy separate rows; scheduled installation and recovery are grouped in a status card, with package digests and detailed explanations available in disclosures.
Change class and compatibility
Crash-recovery follow-up — 2026-10-26
Recovery implementation revision:
15bc3995d2409d3db2aa18b98ae799a752c9c393.External review identified two additional P1 failures at
019c79b: an unconfirmed update could deadlock backend startup against the rollback cleanup gate, and unresolved cleanup owners/unknown state had no recovery path. The composition probe reproduced both the abnormal-exit failure and the successful normal-exit control. The earlier green CI did not cover this combination.Local validation on this commit:
git diff --checkpassed.Implementation, reproduction, test commands and limits.
Limits: no physical Windows reboot/logoff or new native Linux/macOS install roundtrip was performed. Boot transitions were injected at the OS-read boundary; the real Windows BootId reader and native process/Job checks ran. Catalog transport and native confirmation use isolated test fixtures. The full packaged-executable publication journey was not rerun locally for this follow-up. No dependency, version, CI workflow, skip or audit exemption was changed.
CI for the current PR head must be evaluated separately from the historical results below. Independent external re-review is pending; this follow-up does not resolve the review threads or approve/merge the PR.
Earlier review recheck — 2026-10-25
Historical head:
019c79bfdab664cea3a8555a42877dc362ed8abe. These results predate the two additional P1 findings described above. All 18 hosted checks passed, including the dependency audit, all Python shards, real store/author journeys, model-less failure recovery, packaged startup and packaged catalog publication/recovery. Windows qualification.The failed smoke assertion was corrected to test the actual invariant: an exact unhealthy pending target is unconfirmable, a real
confirm-updaterequest is rejected, recovery remains unchanged, and explicit rollback succeeds. It no longer equates every same-session unhealthy projection with forced rollback. Nine new probe regressions cover false-success/lost-recovery counterexamples.On this source: full Node 673 passed / 0 skipped, affected Python smoke/probe 32 passed, application build passed. Isolated actual Windows application qualification passed 14 normal extension checks + 21 failure/recovery checks, including 11 app restarts and confirmed Electron/backend exit. Other targeted groups overlap and are not summed.
No CI workflow, skip, audit exemption, dependency or version was changed by this follow-up. Previous UI captures below remain tied to their original revision. This verification does not replace maintainer review or resolve the review threads on the reviewer's behalf.
Earlier UI follow-up verification
Head:
d509fcc0d0ec0ad06baafa4ed2692fe9a2ac234f.cd electron; npm test: 673 passed, 0 skipped.npm run build: config/catalog ownership, SDK digest, Pi type-checking, TypeScript, and Vite passed. The existing Vite large-chunk warning remains.git diff --check, updated store-smoke JavaScript syntax, and changed Python probe syntax checks passed.Lifecycle repair evidence · UI evidence and reproducible real-app captures.
Linux/macOS routing is covered with explicit platform fixtures on Windows, not native Linux/macOS runs. The UI status screenshots use synthetic catalog replies inside the isolated real application; they do not certify completed plugin installations. The full packaged/store-install qualification was not rerun for these three follow-up commits. Current GitHub CI is tracked in the PR Checks tab; independent external audit is pending.