Repository navigation
fix(desktop): credit smd-submitted Start at Login job on macOS (#7019) - #7033
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Deterministic PR hygiene checks passed. |
32aaeaf to
0291050
Compare
macOS Background Task Management resubmits the OpenCodex LaunchAgent through smd, so launchctl print reports path = (submitted by smd.<pid>) with managed_by = com.apple.xpc.ServiceManagement. Startup Safety and the tray realpath'd that value, failed, and marked a valid login item unverified. Credit that shape only for this copy's program and an unchanged registration re-read, in both implementations, with shared fixture cases.
0291050 to
44e678e
Compare
Summary
On macOS 13+, Background Task Management can take over the
OpenCodexLaunchAgent and resubmit it throughsmd.launchctl print gui/<uid>/OpenCodexthen reportspath = (submitted by smd.<pid>),type = Submittedandmanaged_by = com.apple.xpc.ServiceManagementin place of the plist path. Startup Safety (src/service/desktop-startup.ts) and the tray's Start at Login item (desktop/src-tauri/src/login_registration.rs) both ranrealpathon thatpathvalue. It failed, so a registered, enabled, current-copy login item was treated as unverified. The result wasRestart safety: AT RISK ... desktop startup could not be verifiedinocx status/ocx doctor, as reported in #7019.Both judgments now accept that loaded shape only when all of these hold:
pathis exactly(submitted by smd.<digits>)managed_byiscom.apple.xpc.ServiceManagementprogramis this app copy (another copy still reads as other-copy)print-disabledoverride) re-reads unchangedThe last condition is the same rule already applied when launchd reports the job as not found. Such a job is credited as
loaded. Every other submitter, a missing or differentmanaged_by, or a malformed pid stays unverified.The submitted-job output shape was confirmed against real smd-managed jobs on macOS 27.0 (
path = (submitted by smd.104),managed_by = com.apple.xpc.ServiceManagement).2.84.1 hotfix candidate.
Fixes #7019
Verification
tests/fixtures/desktop-login-registration-cases.json, run by both implementations. The [Bug][macOS] Startup Safety remains AT RISK on 2.84.0 with enabled current-app login item #7019 case fails on unpatched code on both sides: TS givesloginEnabled: false, Rust givesunknown. It passes after the fix.bun teston the 6 desktop-startup service test files: 215 pass, 0 fail.cargo test --lib login_registration(5 pass, fixture 66 cases),cargo fmt --check,cargo clippy --all-targets -- -D warnings: clean.bun run typecheck,bun run structure:check: clean.macLoginFactsForstill reportsregistered-not-loaded, so the existing path is unchanged. I could not force an smd resubmission of the OpenCodex job locally, so the loaded-and-submitted path is covered by the fixture rather than live.Checklist
structure/desktop-start-at-login.md)Summary by CodeRabbit