Skip to content

fix(status): lead unresponsive documents with the typed reason - #320

Merged
ScriptedAlchemy merged 4 commits into
masterfrom
fix/status-unreachable-reason
Sep 26, 2026
Merged

ScriptedAlchemy merged 4 commits into
masterfrom
fix/status-unreachable-reason

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Why

AGENTS.md requires a daemon the probe could not reach to render with its typed reason. hauler status against 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. loadHaulerSnapshot already put socket could not be opened (EACCES) in snapshot.summary. withDaemonLine in src/internal/operations/inspection.ts kept that line only for skewed, and statusSummary replaced it with the fixed daemonHeader('unresponsive') text.

Scope

withDaemonLine now leads with the snapshot summary for unresponsive as well as skewed. This covers status, log, and last in one place. daemonHeader('unresponsive') in src/internal/operations/status-filter.ts now reads "cargo-hauler daemon is unresponsive (showing ledger data)" with no claim that the daemon is up. The dashboard contention section in src/mcp/hauler/apps/dashboard.tsx shows the summary's first line for unresponsive, the same way it already did for skewed, instead of the hardcoded "the machine is saturated" text. No schema changed. The daemonStatusSchema doc comment names the three unresponsive causes. artifact/ is regenerated.

Blast Radius

Only documents for an unresponsive daemon change. The first line of status, log, and last is now the typed reason, one of did not answer within 5s, closed the connection mid-status, or socket could not be opened (<errno>). summary in --json gains that line before the existing text. running, stopped, and skewed output is unchanged.

Verification

A new case in tests/packaging/stopped-daemon-ticket-cli.test.ts runs the built dist/bin/hauler.js status against a chmod 000 listening socket. It asserts the literal --json summary 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 existing last case in that file and the statusSummary header case in tests/integration/query.test.ts now assert the new literal text. The CLI repro against a real chmod 000 socket now prints cargo-hauler daemon socket could not be opened (EACCES); showing ledger data (0 recorded). pnpm run check passes.

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.

@changeset-bot

changeset-bot Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 249d840

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cargo-hauler Patch

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T00:28:08.505457Z 8a90ff2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/status-unreachable-reason branch from 8a90ff2 to 249d840 Compare September 26, 2026 00:50
@ScriptedAlchemy
ScriptedAlchemy merged commit 89174bd into master Sep 26, 2026
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/status-unreachable-reason branch September 26, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant