Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/status-unreachable-reason.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-hauler": patch
---

`hauler status`, `log`, `last`, and the dashboard now lead with why an unresponsive daemon could not be read, such as `socket could not be opened (EACCES)`, instead of claiming the daemon is up but slow.
2 changes: 1 addition & 1 deletion artifact/agent-bundle.compile-evidence.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifact/agent-bundle.manifest.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions artifact/bin/cargo-hauler-flight.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20369,7 +20369,8 @@ const savedComputeSourceSchema = zod__rspack_import_1/* ["enum"] */.k5n([
'estimate'
]);
/**
* `unresponsive`: the socket exists and a process holds it, but it did not answer in time.
* `unresponsive`: the socket exists but did not answer (timed out, closed, or refused the open);
* the summary's first line names which.
* `skewed`: a live daemon of another release or build answered with a status report this
* client cannot decode; tickets come from the ledger with their recorded status.
*/ const daemonStatusSchema = zod__rspack_import_1/* ["enum"] */.k5n([
Expand Down Expand Up @@ -22799,7 +22800,7 @@ __webpack_require__.d(__webpack_exports__, {



/** A skewed daemon's rows read as live, so its summary line (what it is, the fix) leads. */ const withDaemonLine = (snapshot, summary)=>snapshot.daemon === 'skewed' ? `${snapshot.summary}\n${summary}` : summary;
/** A skewed or unresponsive daemon's summary line (what failed, the fix) leads. */ const withDaemonLine = (snapshot, summary)=>snapshot.daemon === 'skewed' || snapshot.daemon === 'unresponsive' ? `${snapshot.summary}\n${summary}` : summary;
// Through the ticket boundary runner so MCP/CLI cancellation aborts the
// socket wait and replacement failures become clear transport diagnostics.
const loadSnapshot = (limit, options)=>(0,_ticket_errors_js__rspack_import_2/* .runTicketEffect */.n)((0,_status_js__rspack_import_1/* .loadHaulerSnapshot */.M3)({
Expand Down Expand Up @@ -22912,7 +22913,7 @@ const daemonHeader = (daemon)=>{
case 'stopped':
return 'cargo-hauler daemon is not running';
case 'unresponsive':
return 'cargo-hauler daemon is up but did not answer in time (showing ledger data)';
return 'cargo-hauler daemon is unresponsive (showing ledger data)';
case 'skewed':
return 'cargo-hauler daemon is running but its status report is unreadable (showing ledger data)';
default:
Expand Down
7 changes: 4 additions & 3 deletions artifact/bin/cargo-hauler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22211,7 +22211,8 @@ const savedComputeSourceSchema = zod__rspack_import_1/* ["enum"] */.k5n([
'estimate'
]);
/**
* `unresponsive`: the socket exists and a process holds it, but it did not answer in time.
* `unresponsive`: the socket exists but did not answer (timed out, closed, or refused the open);
* the summary's first line names which.
* `skewed`: a live daemon of another release or build answered with a status report this
* client cannot decode; tickets come from the ledger with their recorded status.
*/ const daemonStatusSchema = zod__rspack_import_1/* ["enum"] */.k5n([
Expand Down Expand Up @@ -31964,7 +31965,7 @@ __webpack_require__.d(__webpack_exports__, {



/** A skewed daemon's rows read as live, so its summary line (what it is, the fix) leads. */ const withDaemonLine = (snapshot, summary)=>snapshot.daemon === 'skewed' ? `${snapshot.summary}\n${summary}` : summary;
/** A skewed or unresponsive daemon's summary line (what failed, the fix) leads. */ const withDaemonLine = (snapshot, summary)=>snapshot.daemon === 'skewed' || snapshot.daemon === 'unresponsive' ? `${snapshot.summary}\n${summary}` : summary;
// Through the ticket boundary runner so MCP/CLI cancellation aborts the
// socket wait and replacement failures become clear transport diagnostics.
const loadSnapshot = (limit, options)=>(0,_ticket_errors_js__rspack_import_2/* .runTicketEffect */.n)((0,_status_js__rspack_import_1/* .loadHaulerSnapshot */.M3)({
Expand Down Expand Up @@ -32077,7 +32078,7 @@ const daemonHeader = (daemon)=>{
case 'stopped':
return 'cargo-hauler daemon is not running';
case 'unresponsive':
return 'cargo-hauler daemon is up but did not answer in time (showing ledger data)';
return 'cargo-hauler daemon is unresponsive (showing ledger data)';
case 'skewed':
return 'cargo-hauler daemon is running but its status report is unreadable (showing ledger data)';
default:
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-session-start.claude.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79622,7 +79622,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "session/start";
const capabilityRevision = "2.1.260";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-session-start.codex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79622,7 +79622,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "session/start";
const capabilityRevision = "0.147.0";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-session-start.cursor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79622,7 +79622,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "session/start";
const capabilityRevision = "2026-08-28";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-stop.claude.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79622,7 +79622,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "stop";
const capabilityRevision = "2.1.260";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-stop.codex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79622,7 +79622,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "stop";
const capabilityRevision = "0.147.0";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-stop.cursor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79622,7 +79622,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "stop";
const capabilityRevision = "2026-08-28";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-after.claude.execute.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79621,7 +79621,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "tool/after";
const capabilityRevision = "2.1.260";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-after.claude.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28148,7 +28148,7 @@ const prepareRouteInvocation = async (nativeInput, signal, observer, receipt)=>{
return withEventState(signal, async (bindings)=>{
const gate = await (0,_agent_bundle_runtime_request__rspack_import_6/* .runAgentRequest */.iC)({
invocation: {
artifactEpoch: "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822",
artifactEpoch: "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416",
hostContractRevision: capabilityRevision,
kind: "event",
operationId: `event:${canonicalEvent}`,
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-after.codex.execute.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79621,7 +79621,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "tool/after";
const capabilityRevision = "0.147.0";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-after.codex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28148,7 +28148,7 @@ const prepareRouteInvocation = async (nativeInput, signal, observer, receipt)=>{
return withEventState(signal, async (bindings)=>{
const gate = await (0,_agent_bundle_runtime_request__rspack_import_6/* .runAgentRequest */.iC)({
invocation: {
artifactEpoch: "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822",
artifactEpoch: "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416",
hostContractRevision: capabilityRevision,
kind: "event",
operationId: `event:${canonicalEvent}`,
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-after.cursor.execute.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79621,7 +79621,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "tool/after";
const capabilityRevision = "2026-08-28";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-after.cursor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28148,7 +28148,7 @@ const prepareRouteInvocation = async (nativeInput, signal, observer, receipt)=>{
return withEventState(signal, async (bindings)=>{
const gate = await (0,_agent_bundle_runtime_request__rspack_import_6/* .runAgentRequest */.iC)({
invocation: {
artifactEpoch: "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822",
artifactEpoch: "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416",
hostContractRevision: capabilityRevision,
kind: "event",
operationId: `event:${canonicalEvent}`,
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-before.claude.execute.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79621,7 +79621,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "tool/before";
const capabilityRevision = "2.1.260";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-before.claude.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25375,7 +25375,7 @@ const prepareRouteInvocation = async (nativeInput, signal, observer, receipt)=>{
return withEventState(signal, async (bindings)=>{
const gate = await (0,_agent_bundle_runtime_request__rspack_import_6/* .runAgentRequest */.iC)({
invocation: {
artifactEpoch: "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822",
artifactEpoch: "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416",
hostContractRevision: capabilityRevision,
kind: "event",
operationId: `event:${canonicalEvent}`,
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-before.codex.execute.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79621,7 +79621,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "tool/before";
const capabilityRevision = "0.147.0";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-before.codex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25375,7 +25375,7 @@ const prepareRouteInvocation = async (nativeInput, signal, observer, receipt)=>{
return withEventState(signal, async (bindings)=>{
const gate = await (0,_agent_bundle_runtime_request__rspack_import_6/* .runAgentRequest */.iC)({
invocation: {
artifactEpoch: "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822",
artifactEpoch: "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416",
hostContractRevision: capabilityRevision,
kind: "event",
operationId: `event:${canonicalEvent}`,
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-before.cursor.execute.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79621,7 +79621,7 @@ __webpack_require__.a(__webpack_module__, async function (__rspack_load_async_de



const artifactEpoch = "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822";
const artifactEpoch = "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416";
const flightArtifactEpoch = "cargo-hauler@0.9.13";
const canonicalEvent = "tool/before";
const capabilityRevision = "2026-08-28";
Expand Down
2 changes: 1 addition & 1 deletion artifact/hooks/event-route-tool-before.cursor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25375,7 +25375,7 @@ const prepareRouteInvocation = async (nativeInput, signal, observer, receipt)=>{
return withEventState(signal, async (bindings)=>{
const gate = await (0,_agent_bundle_runtime_request__rspack_import_6/* .runAgentRequest */.iC)({
invocation: {
artifactEpoch: "502ed577e2fc2110182a9a185970474ea06163ed49e1683d179f38e74288c822",
artifactEpoch: "f95bb0a6cd75d8eb752f255d57139cfdd021ca0340f405564fc562b21e2ac416",
hostContractRevision: capabilityRevision,
kind: "event",
operationId: `event:${canonicalEvent}`,
Expand Down
2 changes: 1 addition & 1 deletion artifact/mcp-apps/dashboard.html

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions artifact/mcp/mcp-hauler-2b8242f9-flight.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22599,7 +22599,8 @@ const savedComputeSourceSchema = zod__rspack_import_1/* ["enum"] */.k5n([
'estimate'
]);
/**
* `unresponsive`: the socket exists and a process holds it, but it did not answer in time.
* `unresponsive`: the socket exists but did not answer (timed out, closed, or refused the open);
* the summary's first line names which.
* `skewed`: a live daemon of another release or build answered with a status report this
* client cannot decode; tickets come from the ledger with their recorded status.
*/ const daemonStatusSchema = zod__rspack_import_1/* ["enum"] */.k5n([
Expand Down Expand Up @@ -26898,7 +26899,7 @@ __webpack_require__.d(__webpack_exports__, {



/** A skewed daemon's rows read as live, so its summary line (what it is, the fix) leads. */ const withDaemonLine = (snapshot, summary)=>snapshot.daemon === 'skewed' ? `${snapshot.summary}\n${summary}` : summary;
/** A skewed or unresponsive daemon's summary line (what failed, the fix) leads. */ const withDaemonLine = (snapshot, summary)=>snapshot.daemon === 'skewed' || snapshot.daemon === 'unresponsive' ? `${snapshot.summary}\n${summary}` : summary;
// Through the ticket boundary runner so MCP/CLI cancellation aborts the
// socket wait and replacement failures become clear transport diagnostics.
const loadSnapshot = (limit, options)=>(0,_ticket_errors_js__rspack_import_2/* .runTicketEffect */.n)((0,_status_js__rspack_import_1/* .loadHaulerSnapshot */.M3)({
Expand Down Expand Up @@ -27011,7 +27012,7 @@ const daemonHeader = (daemon)=>{
case 'stopped':
return 'cargo-hauler daemon is not running';
case 'unresponsive':
return 'cargo-hauler daemon is up but did not answer in time (showing ledger data)';
return 'cargo-hauler daemon is unresponsive (showing ledger data)';
case 'skewed':
return 'cargo-hauler daemon is running but its status report is unreadable (showing ledger data)';
default:
Expand Down
11 changes: 6 additions & 5 deletions artifact/mcp/mcp-hauler-2b8242f9.mjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion artifact/scripts/hauler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11197,7 +11197,8 @@ const savedComputeSourceSchema = zod__rspack_import_1/* ["enum"] */.k5n([
'estimate'
]);
/**
* `unresponsive`: the socket exists and a process holds it, but it did not answer in time.
* `unresponsive`: the socket exists but did not answer (timed out, closed, or refused the open);
* the summary's first line names which.
* `skewed`: a live daemon of another release or build answered with a status report this
* client cannot decode; tickets come from the ledger with their recorded status.
*/ const daemonStatusSchema = zod__rspack_import_1/* ["enum"] */.k5n([
Expand Down
3 changes: 2 additions & 1 deletion src/internal/contracts/tool-schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const requestStatusSchema = z.enum(requestStatuses);
const attachModeSchema = z.enum(attachModes);
const savedComputeSourceSchema = z.enum(['exact', 'estimate']);
/**
* `unresponsive`: the socket exists and a process holds it, but it did not answer in time.
* `unresponsive`: the socket exists but did not answer (timed out, closed, or refused the open);
* the summary's first line names which.
* `skewed`: a live daemon of another release or build answered with a status report this
* client cannot decode; tickets come from the ledger with their recorded status.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/internal/operations/inspection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export interface InspectOptions {
readonly signal: AbortSignal;
}

/** A skewed daemon's rows read as live, so its summary line (what it is, the fix) leads. */
/** A skewed or unresponsive daemon's summary line (what failed, the fix) leads. */
const withDaemonLine = (snapshot: HaulerSnapshot, summary: string): string =>
snapshot.daemon === 'skewed' ? `${snapshot.summary}\n${summary}` : summary;
snapshot.daemon === 'skewed' || snapshot.daemon === 'unresponsive' ? `${snapshot.summary}\n${summary}` : summary;

// Through the ticket boundary runner so MCP/CLI cancellation aborts the
// socket wait and replacement failures become clear transport diagnostics.
Expand Down
2 changes: 1 addition & 1 deletion src/internal/operations/status-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const daemonHeader = (daemon: DaemonStatus): string => {
case 'stopped':
return 'cargo-hauler daemon is not running';
case 'unresponsive':
return 'cargo-hauler daemon is up but did not answer in time (showing ledger data)';
return 'cargo-hauler daemon is unresponsive (showing ledger data)';
case 'skewed':
return 'cargo-hauler daemon is running but its status report is unreadable (showing ledger data)';
default: {
Expand Down
7 changes: 1 addition & 6 deletions src/mcp/hauler/apps/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1301,13 +1301,8 @@ const DashboardContent = ({ structured }: { readonly structured: DashboardStatus
maxConcurrent={maxConcurrent}
/>
</div>
) : daemonState === 'skewed' ? (
) : daemonState === 'skewed' || daemonState === 'unresponsive' ? (
<p className="down-cue">{structured?.summary.split('\n', 1)[0]}</p>
) : daemonState === 'unresponsive' ? (
<p className="down-cue">
Daemon is up but did not answer in time — the machine is saturated. Rows below
come from the ledger and in-flight runs are still live; this refreshes on the next poll.
</p>
) : (
<p className="down-cue">
Daemon is not running — it starts on demand with any cargo exec, or run{' '}
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ describe('status scoping', () => {

it('distinguishes an unresponsive daemon from a stopped one in the header', () => {
expect(statusSummary('running', [], [])).toBe('cargo-hauler daemon is running; 0 active, 0 recent');
expect(statusSummary('unresponsive', [running], [])).toContain(
'daemon is up but did not answer in time',
expect(statusSummary('unresponsive', [], [])).toBe(
'cargo-hauler daemon is unresponsive (showing ledger data); 0 active, 0 recent',
);
expect(statusSummary('stopped', [], [])).toContain('daemon is not running');
});
Expand Down
17 changes: 16 additions & 1 deletion tests/packaging/stopped-daemon-ticket-cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,29 @@ describe.skipIf(!existsSync(haulerEntry))('ticket reads on a stopped daemon', ()
expect(haulerJson('await', 'cc-1')).toEqual(unreachable());
});

it('reports status with the errno the socket refused, not a daemon that is up', () => {
const summary = [
'cargo-hauler daemon socket could not be opened (EACCES), so status shows ledger data (1 recorded)',
'cargo-hauler daemon is unresponsive (showing ledger data); 0 active, 1 recent',
];
expect(haulerJson('status')).toMatchObject({
code: 0,
json: { daemon: 'unresponsive', operation: 'status', summary: summary.join('\n') },
stderr: '',
});
const run = hauler('status');
expect(run.code).toBe(0);
expect(run.stdout.split('\n', 1)).toEqual(summary.slice(0, 1));
});

it('reports last on an unresponsive daemon, not a stopped one', () => {
expect(haulerJson('last')).toEqual({
code: 0,
json: {
daemon: 'unresponsive',
operation: 'last',
request: { ...seededRecord, error: 'daemon did not answer, so ownership is unconfirmed', status: 'orphaned' },
summary: 'cc-1 orphaned',
summary: 'cargo-hauler daemon socket could not be opened (EACCES), so status shows ledger data (1 recorded)\ncc-1 orphaned',
},
stderr: '',
});
Expand Down
Loading