fix(status): lead unresponsive documents with the typed reason - #320
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 249d840 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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. |
ScriptedAlchemy
force-pushed
the
fix/status-unreachable-reason
branch
from
September 26, 2026 00:50
8a90ff2 to
249d840
Compare
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 free
to 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.
Why
AGENTS.md requires a daemon the probe could not reach to render with its typed reason.
hauler statusagainst a socket that refuses the open with EACCES printed "cargo-hauler daemon is up but did not answer in time (showing ledger data)". That is false. The daemon is not known to be up, and the errno was dropped.loadHaulerSnapshotalready putsocket could not be opened (EACCES)insnapshot.summary.withDaemonLineinsrc/internal/operations/inspection.tskept that line only forskewed, andstatusSummaryreplaced it with the fixeddaemonHeader('unresponsive')text.Scope
withDaemonLinenow leads with the snapshot summary forunresponsiveas well asskewed. This coversstatus,log, andlastin one place.daemonHeader('unresponsive')insrc/internal/operations/status-filter.tsnow reads "cargo-hauler daemon is unresponsive (showing ledger data)" with no claim that the daemon is up. The dashboard contention section insrc/mcp/hauler/apps/dashboard.tsxshows the summary's first line forunresponsive, the same way it already did forskewed, instead of the hardcoded "the machine is saturated" text. No schema changed. ThedaemonStatusSchemadoc comment names the three unresponsive causes.artifact/is regenerated.Blast Radius
Only documents for an
unresponsivedaemon change. The first line ofstatus,log, andlastis now the typed reason, one ofdid not answer within 5s,closed the connection mid-status, orsocket could not be opened (<errno>).summaryin--jsongains that line before the existing text.running,stopped, andskewedoutput is unchanged.Verification
A new case in
tests/packaging/stopped-daemon-ticket-cli.test.tsruns the builtdist/bin/hauler.js statusagainst a chmod 000 listening socket. It asserts the literal--jsonsummary and the first Markdown line. It failed on master with"summary": "cargo-hauler daemon is up but did not answer in time (showing ledger data); 0 active, 1 recent"and passes with the fix. The existinglastcase in that file and thestatusSummaryheader case intests/integration/query.test.tsnow assert the new literal text. The CLI repro against a real chmod 000 socket now printscargo-hauler daemon socket could not be opened (EACCES); showing ledger data (0 recorded).pnpm run checkpasses.Principles
Fix root causes. The reason already existed in the snapshot, so the fix stops the one shared function from discarding it. Laziness protocol. No new field was threaded through the schema, because the dashboard reads the same summary line it already reads for
skewed. Test behavior, not implementation. The test drives the real CLI and asserts the literal text a user sees.