Repository navigation
Conversation
The menu bar can start an unlimited session directly or convert a running timed session without stopping it. Unlimited sessions show infinity instead of a countdown and retain battery and thermal protections. A failed conversion leaves the timed deadline intact. Unlimited sessions record the owning process identity. The backstop checks that identity and attempts restoration when the owner is gone; a later launch cleans up rather than resumes the interrupted session. Legacy timed sessions remain readable, and a missing deadline never authorizes unlimited operation. The backstop and uninstall scripts, session and UI tests, shell recovery tests, documentation and review rules follow the new session mode.
The session text validator skipped ownerIdentity as an opaque value, letting duplicate identity fields reach plutil's last-value view while the app reads the first. Both recovery scripts now reject repeated startedAt, startedAtMicros and bootSession fields inside that object, including escaped key spellings. Unknown nested objects stay ignored. Regression tests exercise both validators and live-owner shell fixtures, checking restoration, evidence quarantine and duplicate-field diagnostics.
Preserve unlimited-session guidance alongside the menu-bar clarification. Record the validators' existing SC2071 suppressions in upstream's new hidden-findings inventory.
Real-Mac validationCommit:
Evidence: Per-case results, logs, power samples and build provenance |
|
a feature i didnt even realize i absolutely needed. curious what your using this for |
Sometimes I have a very long running agent session where I leave it overnight and I have no idea when will it ends |
|
makes sense, i see this as super useful for people turning old macbooks as "always on" compute for their agents. thanks for this! |
Keep explicit duration types, both release checklists, and owner-aware recovery alongside the idle fast path. Pin unlimited-session fast-path exclusion in the recovery fixture.
Why
Awake sessions currently require a deadline, with a maximum of 30 days. For work with no known finish time, an explicit unlimited session avoids choosing an arbitrary duration or repeatedly extending it. Unlimited means no time limit, not keeping the Mac awake after Quit or bypassing battery and thermal protections.
What changed
Tests
Regression coverage includes unlimited start and manual end; Quit and safety endings; asynchronous confirmation and Quit races; timed-to-unlimited conversion and its former expiry; failed confirmation and journal writes; legacy decoding and malformed sessions; launch-time cleanup and failed-restoration retry; menu-bar activation, keyboard access, input restoration and the static ∞ display.
The shell fixtures cover live and mismatched owners, PID reuse, force recovery, malformed and duplicate session fields, journal failures, lock contention, helper/app recovery ordering, executable paths with spaces, and preservation of unlimited-session evidence when uninstall cannot restore.
Review follow-up
I fixed the conflicting-owner-fields finding in
a15f72d. Bothbackstop.shanduninstall.shnow check the fields insideownerIdentityfor duplicates before trustingplutil. RepeatedstartedAt,startedAtMicrosandbootSessionfields are rejected, including escaped key spellings. Unrelated nested objects remain ignored.The regression test failed before the fix because both scripts accepted conflicting owner fields. The new fixtures check both validators and verify that recovery restores the journaled changes, quarantines the conflicting session and logs the duplicate-field diagnostic.
Latest validation
Latest automated results for
a15f72don Apple Silicon, macOS 26.7 (25G227), Apple Swift 6.4:git diff --check: passed./bin/bash -n scripts/backstop.sh scripts/uninstall.sh Tests/Shell/backstop-unlimited.sh: passed.swift test --filter 'RecoveryScriptTests/(testConflictingOwnerIdentityFieldsAreRefusedByBothScripts|testUnlimitedRecoveryFixtureSuite|testUninstallPreservesValidUnlimitedEvidenceWhenRestoreFails)': 3 tests passed, 0 failures, including the complete unlimited-recovery shell fixture suite and corrected escaped-key cases.

Confidence Score: 5/5
The PR appears safe to merge; no new actionable issue was established.Summary
Adds timed and unlimited sessions with owner-aware recovery.
Review was based on source and test inspection. Native macOS tests and visual checks were not run on this Linux host.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Start session] --> B[Save session and journal] B --> C[Confirm recovery agent] C --> D[Disable sleep] D --> E{Session mode} E -->|Timed| F[Deadline controls expiry] E -->|Unlimited| G[Recovery checks recorded owner] F --> H[End and restore journal] G -->|Owner gone or cannot be verified| H I[Launch after interruption] -->|Unlimited session saved| H H --> J{Restore succeeded?} J -->|No| K[Keep entries for retry] J -->|Yes| L[Cleanup complete]Reviews (5) · Last reviewed commit: "Merge upstream main and preserve unlimit..." · Reviewed by Greptile