Repository navigation
feat(platform): durably retire the legacy GUI capture writer - #965
Draft
simonvanlaak wants to merge 7 commits into
Draft
simonvanlaak wants to merge 7 commits into
simonvanlaak wants to merge 7 commits into
Conversation
…orm-legacy-capture-retirement
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The replacement host needs a durable way to stop the existing GUI from admitting new captures before adopting its writer role. This adds the fixed, privileged
@apparent/native-host/legacy-captureport: read the GUI writer state, then explicitly retire it using that process's epoch/revision. It seals admission before the config transaction and persists the protectedlegacyCaptureWritermarker. Restart observes the marker and continues refusing legacy starts. Active work is preserved; busy or uncertain ownership cannot authorize retirement.The operation requires a strong generated process incarnation and refuses an unqualified fallback before configuration observation. Ordinary config writes cannot create, remove, or overwrite the marker. An uncertain publication keeps the live process sealed and reports unknown; the client never retries automatically. Existing snapshot, pen, clipboard and installed routes retain their contracts.
Validation: independent source review and repaired-delta rechecks approved; 13 focused root tests, the native config suite, 21 public-client tests and the ordinary packed headless consumer passed. The full Linux root suite passed 958 tests with 14 existing ignored on the frozen source. After current-base integration, root compilation and the focused native/config suites passed again; the newer Engine changes affect Mac source and still need Mac qualification.
Native Linux: frozen source
d5c8421911614fee847a5a6f939dd769b439d3c6, executable SHA-25657d528cd3f619f6634a031272c075e5210860e4704458196ddfd14934bf9d97b. The public compiled client exercised the actual GUI in local Xvfb and one isolated Omarchy guest: exact PID/start/socket ownership, foreign and stale refusal, one durable retirement, unchanged synthetic settings, rejected legacy starts, restart with a new epoch, persisted retired-observed state and old-epoch refusal. No recording, clipboard or permission action was requested. Guest retention verified; disk and expiry were cleaned up. The affected source files are unchanged by the integrated base. These are native-port tests, not pill/window or installed-route proof.Native Mac: the normal installer built and signed source
8101e0fe4f1e37ff56073a168ac5dc6eefebebf8on macOS 26.6.2 ARM64 with Rust 1.99.1, Swift 6.4 and SDK 27. The public compiled port passed installed-GUI retirement, stale/foreign refusal, legacy-start refusal, restart persistence and exact PID/start/socket cleanup. The first driver attempt stopped before any retirement request on a/tmpversus/private/tmppath-string comparison; the same built app passed after filesystem-realpath comparison and a native alias/foreign-path control. That original failure remains retained. The initial Mac filesystem suite exposed a timestamp-based temporary-directory collision (4 passed, 1 setup failure); the existing host-fixture atomic-counter pattern repairs it, and all 6 unchanged-plus-regression cases passed on Linux and Mac. No product implementation changed for that fixture fix.Source inputs were checked against all 1,675 original tracked blobs before and after the app build. The GUI executable SHA-256 was
09e482eb520e8ffb31396f7a3713d6980f024c4397e00c7bf7c0a599efd12377. Logs, signature and inventory evidence were retained and key hashes checked. The full private app archive was created remotely but was not downloaded before the session cap; it is unavailable locally and is not an admitted artifact. Provider cleanup is confirmed, the owned queue ticket is absent, and the run cost $0.45 for 30 billed minutes.Current-base integration includes main
a68e8d495ca4f5a55a34dc212012926b4eb73ff6; compilation, all 13 focused writer tests and all 6 config integration cases passed. Required fresh PR checks and affected Mac compilation remain gates. Exact-main GUI/package admission, compatible old-binary/bootstrap transition qualification and installed adoption remain separate delivery/activation gates. This scope covers only the legacy GUI capture writer. It supplies no global SDK/runtime clearance, owning-client close, hotkey release, capture exclusion, new dispatcher, Onboarding change, installed activation or release authorization.