cmux-next: error journal reads the build's acpmux home and flushes on a DemandTimer (drops #21981's allowlist entries)
#21981 cleared the error journal's two guard reds with allowlist entries: a state-roots baseline row for the literal ~/.acpmux/daemon.log, and concurrency-allow/wakeup-allow comments on the flush sleep. This replaces both with the fixes the guards ask for.
- State root: the app's own acpmux log now comes from
environment.build.acpmuxHome(userHome:), the homeAcpmuxEnvironmentstarts the daemon in. That is still~/.acpmuxfor NIGHTLY, and now the right~/.acpmux/builds/<key>for every other build, which the literal missed. The baseline row is gone. - Flush delay:
ErrorJournalbatches writes on aDemandTimer(scheduleIfIdle, so new records don't push the deadline back;flush()cancels it), not a rawTask+clock.sleep. Same timing, and the injected clock still drives it. The allow comments on it are gone. The 300 s harvest loop keeps its reviewedwakeup-allow, since that one really is a periodic cadence. ci-target-graph.jsonregenerated for the newCmuxNextWakeupsdependency. It was also missingCmuxNextTerminalGeometryon the base.- Crash safety (base red since this PR opened): the journal's eight
try! NSRegularExpressionliterals now usetry?, asFeedSecretScrubberdoes. The parser and normalizer skip a pattern that fails to compile. The redactor fails closed: if any of its rules is missing, it returns<redacted>, so a secret never passes through unredacted.check-crash-safetypasses.
Evidence: the first commit removes only the allowlist entries, and check-state-roots.sh and check-concurrency.sh both fail on it. The second commit makes them pass. ci-target-graph.py --check is fresh, and check-app-size.sh --base shows no CmuxNextApp source growth. swift test --filter CmuxNextErrorJournalTests ran on cosmic-gray with this same ErrorJournal change and passed 18 of 18. The app-side line compiles in CI.
Changelog: none
๐ค Generated with Claude Code
(Adopted by the orphan sweep 2026-10-21: base merged in at 7a07d90. The try! part is on base already via #22630, so this merge took base's ErrorNormalizer, ErrorRedactor and LogLineParser; what remains is the build-home acpmux log and the DemandTimer flush. ci-target-graph.json is left to the base autofix since #22238.)
No capture: no UI change (error journal internals).
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Replaces #21981's allowlist carve-outs for the error journal with real fixes, so the state-roots and concurrency guards pass without exceptions.
- The app's own acpmux log now comes from
environment.build.acpmuxHome(userHome:)โ still~/.acpmuxfor NIGHTLY, the correct~/.acpmux/builds/<key>for every other build โ and its state-roots baseline row is dropped. ErrorJournalbatches writes on aDemandTimer(scheduleIfIdle, so new records don't push the deadline back;flush()cancels it) instead of a rawTask+clock.sleep, with the same timing and injected clock.- Adds the
CmuxNextWakeupsdependency and regeneratesci-target-graph.jsonandschemas/defaults/cmux-next.jsonvia PR autofix. - Merges keep the base's
chiefAcpmuxLoghandling (#22900) and thetry!โtry?work (#22630); a recent merge picks up base compile fix #23286.
No UI change.