Uh oh!
There was an error while loading. Please reload this page.
daemon stability wave 2: health you can see, someone else's Mac - #130
Merged
Conversation
…e can't cause a duplicate delivery (S096)
…launchd-frozen snapshot (S046)
…d of a phantom record (S051)
…can't surface as a failed post (S052)
… and report truncation at 100 files (S053, S086)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s on refresh (S057)
…-043/S050/S054/S083-085/S092)
…/gitq/deck) on a same-named PATH collision (S066)
…ULL-keyed presence row (S076)
…ry retire, not just createTree's path (S078)
…t + supervision design
… a configured root that is an ancestor of the repo (S079)
… (S054) api-server captured the token once at boot while the secrets handler called loadOrCreateApiToken() fresh on every request; an external rotation or an unwritable token dir left the two permanently disagreeing about the current token. getApiToken/reloadApiToken share one in-memory cache between both consumers, and a persist failure now logs a warning instead of failing silently.
…pid after binds Boot failures on the prod path used to leave a live-pid zombie: a stale rt.pid could get written before the socket/API binds even attempted, so a failed boot exited without ever removing it. runDaemon() now wraps its body in try/catch (log.fatal + flush + exit 1 on any failure), and rt.pid is only written once both servers.socket and servers.api are assigned. installCrashHandlers gains an opts.booting predicate: unhandledRejection is fatal + exit 1 while true (boot phase, nothing worth staying up for), and logs only (today's behavior) once bootPhase flips to "ready" right before "daemon ready".
…rly instead of racing a retry into a second pane (S087)
…k that the sync path enforces (S088)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review fix (round 1): runDaemon() now catches and exit(1)s internally on boot failure, so startDaemon()'s outer try/catch never runs, and its JSDoc claiming otherwise was misleading. Replaced with a one-line comment stating the real constraint.
…eplenish don't race git ref locks (S089)
…t (S005/S006/S040/S041/S084)
…per-chunk, so a split multibyte char survives (S095)
…scope side effect Hoists redirectNativeStderr() to the first executable statement and installCrashHandlers() to right after the logger resolves, both before createEventsBus, cron, sweep timers, and home-snapshot construction. A pre-startDaemon throw (e.g. a corrupt events.db) now lands in daemon-stderr.log instead of vanishing down a discarded fd 2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…linked or case-variant root matches lsof (S097)
…0/R043) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…h/metrics/eventLoop in status/tray:status/ping status-identity.test.ts's fakeCtx() gained getHealth/heartbeatSeq stubs to match the widened HandlerContext.
…es (R043) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…069 part 1) Also updates the two other BranchCacheStore implementers (lib/daemon.ts's delegating facade, fake-cache-store.ts's test double) and one exact-key-set test assertion so tsc stays clean; store PK/upsert/delete/gc behavior is unchanged.
…fence (S069 part 1) get/getByBranch on the BranchCacheStore interface forced an edit to lib/daemon.ts's cache facade, which is under a write fence owned by the p2-health lane. Drop get entirely (Task 10 consumers will use entries[composeKey(identity, branch)] directly); reshape getByBranch into a free function over an entries map instead of a store method, so the interface -- and daemon.ts's facade -- do not change. Reverts the daemon.ts and fake-cache-store.ts edits from the prior commit.
…-now items Applies the final whole-branch review's approved fix wave for the rt daemon health feature: maxLagMs now decays as a windowed max instead of a lifetime high-water mark (and currentlyStalled drops its redundant maxLagMs OR-leg), the health degraded threshold for event-loop lag is named instead of hardcoded, one branch-introduced em dash is fixed, a process-citation is dropped from a comment, the daemon log-level resolver validates against pino's level set, and the heartbeat reader now shape-guards against a partial-but-valid JSON object.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…consumers (S069) Consumers updated: store put (keys off entry.repoName), enrich (cold-start sets identity from remoteUrl), notifier (composite fired-state), worktree-reconciler (branchOf/mrKey), freshness (composeKey lookups), handlers/cache (bare-branch read contract + optional repoIdentity), handlers/system-processes and handlers/worktree (repo-scoped lookups), status/data (branchOf display). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…or/identity check Two earlier-committed behavior changes broke four consumer test fixtures: the dev-mode wrapper detector now requires a real marker (# mattstack-dev-mode or RT_LAUNCH_CWD) instead of treating any file's presence as dev mode, and commitInitialUserRepo now checks git identity before committing. Production code is unchanged; fixtures now plant a recognized wrapper and answer the git config user.name/email probes, matching the pattern already used in home-snapshot.test.ts's defaultResponders.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Warning Review limit reachedNext included review available in 21 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 72 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (93)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Daemon stability wave 2: health you can see, someone else's Mac
Stacked on #127. Executes phases 2 and 6 of
docs/daemon-stability-audit-2026-08.md: each phase ran as a design lane (brainstorm, spec, plan, subagent-driven TDD) with an independent Opus review of both the spec and the plan before execution.What changed
Phase 2, health you can see (RT-79; spec
docs/superpowers/specs/2026-08-28-p2-health-design.md)ok/degraded/unhealthy, naming the failing subsystem) plus memory, uptime, watcher and client metrics onstatus,tray:status, andping(R011, R012)rt.logLevelsetting plus a livert daemon log-levelverb; log size cap, per-(cmd,error) suppression, pino stream error listener, stderr demotion, deduped resolver warn sink (R004, S031, S032, S033, R005)Phase 6, someone else's Mac (RT-83; spec
docs/superpowers/specs/2026-08-28-p6-portability-design.md)-lcbase plus a bounded best-effort-ilcoverlay in a killable process group,rt.daemonPathoverride, missing-tool warning; the sync-exec gate loses itsuser-path.tsallowlist entry (S013, S014, S062)rt home initvia hardware UUID, data-preserving for existing machines (S071)branch_cachekeyedidentity:branchwith every consumer repo-scoped and bare-branch lookups preserved (S069)Follow-up
summaryCacheeviction and the two-layer restart wait indaemon-client.tsremain parked minors from wave 1Checklist
rt.logLevel,rt.daemonPath) default to prior behavior.🤖 Generated with Claude Code