Repository navigation
cmux NEXT updater: a log file at ~/Library/Logs/cmux-next/<bundle>-updater.log - #34635
teamleaderleo wants to merge 4 commits into
Conversation
…dle>-updater.log Unified logging kept none of a nightly's updater lines on Leo's Mac, so what relaunched cmux after his Download click (ask-8112d98df7) could not be traced. Every updater line now also goes to the file, stamped with its time and pid, in order on one BackgroundWork files lane that quit waits for; past 1 MB the file moves to .1. A launch line names the build and whether an automatic install reopened it behind; Download and Restart to Update clicks are logged. No file in test processes or with recordsUpdates off. Leo-ask: ask-8112d98df7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-72382ad86fc1ae47e75d
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
|
…es not wait for the lane Review follow-up at ebc43c3: nothing calls BackgroundWork.shutdown() at quit, so blockShutdown alone did not keep the lines before an install's quit. Leo-ask: ask-8112d98df7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-72382ad86fc1ae47e75d
|
Review (subagent claude-opus-5-5 medium): SHIP at 4faa6d9 What it checked: compile surface (imports, Sendable and nonisolated, the date-format chain, the checked file seams); line order (one serial files-lane slot per priority); no file IO on the main thread; no log file from a test process; the tests; no private data in the new lines. The second commit addresses its first two follow-ups (write priority, and the comment about quit). Follow-ups:
|
|
Found 3 test failures on Blacksmith runners: Failures
|
|
Review (codex, router-review): SHIP at 4faa6d9 Reviewer: codex gpt-6.1-sol xhigh, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at 4faa6d9
Swift tests were unavailable in this Linux box. Follow-ups:
|
A newer verdict blocks 2a53531 (no independent SHIP at the head).
|
Review (codex gpt-6.1-sol high, sweep, via the review router; full diff from merge base 851f9ed to this head): SHIP at 2a53531 [P2] [follow-up] Packages/macOS/CmuxNext/Sources/CmuxNextUpdater/UpdateLogFile.swift:52 - Log entries are only queued asynchronously, while Sparkle can terminate the process without draining |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo-ask: ask-8112d98df7
Leo, 2026-11-04: "i only clicked the "download" button and it allegedly "updated" but i didnt restart the app/get a prompt to?"
Two explanations are on record for that relaunch: #34612 cites an install click 3.3 s after Restart to Update appeared, and the #34477 helper concluded it was an automatic install that reopened cmux behind his frontmost app. Neither can be checked on his Mac:
log showreturns nocom.cmuxterm.app.nextupdater lines there, not even for the last 5 minutes, and~/Library/Logs/cmux-nextholds no updater file. This adds that file, as classic'scmux-update.logwas.What changed
UpdateLogFile(new): everyUpdateLogBufferline also goes to~/Library/Logs/cmux-next/<bundle>-updater.log(for examplecom.cmuxterm.app.nightly-updater.log) as<ISO 8601 time> [<pid>] <message>. Lines are written in order on oneBackgroundWorkfiles lane at one priority, never on the caller's thread. They are postedblockShutdown, so quit waits for the lines before an install's quit. At 1 MB the file moves to.1, replacing the older one, so the pair stays under 2 MB. A failed write drops only that line; memory and unified logging still have it. No timer and no observer.UpdaterService.initlogs a launch line with the version, build, track and pid, and says whether the launch was "reopened behind by an automatic install" (--cmux-update-reopened-behind).downloadClicked()andinstallClicked()each log the click and the flow phase. The checks, found and no-update results, which path installed (automatic=, Sparkle's silent stage, quit-for-install) and the relaunch reason were already log lines; they now persist.swiftpm-testing-helper,xctest, the XCTest variables) or withrecordsUpdates: false.logPath()(shown in update error details) gives the file's path when there is one.Tests
UpdateLogFileTests: 50 lines reach the file in order with the pid; a full file moves aside before the next line; a test process gets no file.Observed / Not run
Observed: prepush gate clean. The fleet compile and
UpdateLogFileTestsresults are added below when they finish.risk: normal (diagnostics only; no update behaviour changes).
Changelog
none
Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds a file-backed log for the cmux NEXT updater at
~/Library/Logs/cmux-next/<bundle>-updater.logso update flows can be traced after the fact. Unified logging kept no updater lines on the affected user's Mac, so the relaunch after a Download click could not be explained..1. The block-shutdown lines just before an install's quit land within milliseconds, well before Sparkle's quit ends, since that quit does not drain the lane.recordsUpdatesis off.Written for commit d970c51. Summary will update on new commits.