@agent-relay/factory 0.1.64 → 0.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/cli/diagnose.d.ts +92 -0
- package/dist/cli/diagnose.d.ts.map +1 -0
- package/dist/cli/diagnose.js +346 -0
- package/dist/cli/diagnose.js.map +1 -0
- package/dist/cli/fleet.d.ts +9 -1
- package/dist/cli/fleet.d.ts.map +1 -1
- package/dist/cli/fleet.js +87 -4
- package/dist/cli/fleet.js.map +1 -1
- package/dist/config/schema.d.ts +69 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +32 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/fleet/internal-fleet-client.d.ts +16 -0
- package/dist/fleet/internal-fleet-client.d.ts.map +1 -1
- package/dist/fleet/internal-fleet-client.js +228 -13
- package/dist/fleet/internal-fleet-client.js.map +1 -1
- package/dist/hosted/orchestrator.d.ts.map +1 -1
- package/dist/hosted/orchestrator.js +1 -4
- package/dist/hosted/orchestrator.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/observability/error-class.d.ts +29 -0
- package/dist/observability/error-class.d.ts.map +1 -0
- package/dist/observability/error-class.js +36 -0
- package/dist/observability/error-class.js.map +1 -0
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +1 -0
- package/dist/observability/index.js.map +1 -1
- package/dist/orchestrator/factory.d.ts.map +1 -1
- package/dist/orchestrator/factory.js +649 -46
- package/dist/orchestrator/factory.js.map +1 -1
- package/dist/orchestrator/index.d.ts +1 -0
- package/dist/orchestrator/index.d.ts.map +1 -1
- package/dist/orchestrator/index.js +1 -0
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/public-health.d.ts +82 -0
- package/dist/orchestrator/public-health.d.ts.map +1 -0
- package/dist/orchestrator/public-health.js +372 -0
- package/dist/orchestrator/public-health.js.map +1 -0
- package/dist/ports/state.d.ts +16 -0
- package/dist/ports/state.d.ts.map +1 -1
- package/dist/state/file-state-store.d.ts +8 -0
- package/dist/state/file-state-store.d.ts.map +1 -1
- package/dist/state/file-state-store.js +12 -2
- package/dist/state/file-state-store.js.map +1 -1
- package/dist/state/in-memory-state-store.d.ts +8 -0
- package/dist/state/in-memory-state-store.d.ts.map +1 -1
- package/dist/state/in-memory-state-store.js +12 -2
- package/dist/state/in-memory-state-store.js.map +1 -1
- package/dist/types.d.ts +106 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,6 +140,7 @@ After init, add the `factory` label to an open issue and run a dry run below.
|
|
|
140
140
|
| `factory triage <KEY\|path>` | Triage one issue and print the decision. |
|
|
141
141
|
| `factory dispatch <KEY\|path>` | Triage + dispatch one issue. Honors `--dry-run`. |
|
|
142
142
|
| `factory babysit <PR\|PR-URL>` | Spawn a one-shot babysitter for an existing open PR, even when it was not created by Factory. |
|
|
143
|
+
| `factory diagnose --deployed <url>` | Ask a **deployed** instance why it is or is not dispatching. Reads the unauthenticated `/healthz` diagnostics block — readiness failure count, error class, in-flight sweep age — with no credential; `--token` (or `FACTORY_EVIDENCE_TOKEN`) also reads the gated `/evidence` message. Exits non-zero when the instance is not dispatching. See [deployed diagnostics](docs/deployed-diagnostics.md). |
|
|
143
144
|
| `factory canary <KEY\|path>` | Assert a known "Ready for Agent" issue is dispatch-ready by the real dry-run triage path. Prints `{ok,issue,status,reason}`; exits non-zero (with the skip reason) if it isn't. |
|
|
144
145
|
| `factory reap-orphans [--include-held]` | Report stale factory processes and held agents. By default held agents are visible but retained; `--include-held` releases held agents whose configured deadline has elapsed. Kubernetes cleanup is reported as not applicable when no environment provider is configured. |
|
|
145
146
|
| `factory featuremap check [--manifest <path>] [--base <ref>]` | Validate the repository feature/test manifest and optionally report advisory drift for unchanged entries whose locations changed. |
|
|
@@ -183,6 +184,14 @@ state advances from `retrying` to `degraded` after three consecutive periodic
|
|
|
183
184
|
discovery failures and returns to `healthy` after a successful checkpoint.
|
|
184
185
|
The same record includes the last error, attempt duration, and failure count.
|
|
185
186
|
|
|
187
|
+
Those counters only move when a sweep *settles*, so a sweep that hangs would
|
|
188
|
+
leave every field reading `healthy` forever. `readinessReconcile` therefore
|
|
189
|
+
also carries `intervalMs` and `inFlightMs`, and reports `stalled` when a pass
|
|
190
|
+
has been in flight for more than ten sweep intervals. The redacted subset of
|
|
191
|
+
this record is published on the deployed instance's `/healthz` and is what
|
|
192
|
+
`factory diagnose --deployed` reads — see
|
|
193
|
+
[deployed diagnostics](docs/deployed-diagnostics.md).
|
|
194
|
+
|
|
186
195
|
Dispatch lifecycle writes are claim-critical. Factory applies the
|
|
187
196
|
`factory:in-progress` label/state before the dispatch comment, confirms the
|
|
188
197
|
GitHub label by provider read-back, and retries either write three times. An
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { FactoryPublicHealth } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* `factory diagnose --deployed <url>` (#295).
|
|
4
|
+
*
|
|
5
|
+
* The command a lane brief can name. Every other route to a deployed
|
|
6
|
+
* Factory's health is local-only (`factory status`, `factory loop-status`),
|
|
7
|
+
* Worker-scope (`wrangler tail`), blocked by network shape (the container is
|
|
8
|
+
* private-networked with no sshd), or gated behind a per-deploy credential
|
|
9
|
+
* that no longer exists. This pulls the answer through the Worker, which is
|
|
10
|
+
* the only path that survives that shape.
|
|
11
|
+
*
|
|
12
|
+
* It works with no credential at all: `/healthz` is unauthenticated, and
|
|
13
|
+
* since #295 it carries the failure count, the error class and the in-flight
|
|
14
|
+
* age. A token, when the operator has one, adds `/evidence` — the free-text
|
|
15
|
+
* `lastError` that must not be on the public surface.
|
|
16
|
+
*/
|
|
17
|
+
export interface DeployedEvidenceSummary {
|
|
18
|
+
fetched: boolean;
|
|
19
|
+
httpStatus?: number;
|
|
20
|
+
/** Why the evidence surface was not read. */
|
|
21
|
+
reason?: string;
|
|
22
|
+
phase?: string;
|
|
23
|
+
lastError?: string;
|
|
24
|
+
consecutiveFailures?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface DeployedLegacyHealth {
|
|
27
|
+
phase?: string;
|
|
28
|
+
factoryProcess?: string;
|
|
29
|
+
heartbeatStatus?: string;
|
|
30
|
+
heartbeatUpdatedAt?: string;
|
|
31
|
+
readinessReconcile?: string;
|
|
32
|
+
eventListener?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DeployedFactoryDiagnosis {
|
|
35
|
+
url: string;
|
|
36
|
+
reachable: boolean;
|
|
37
|
+
httpStatus?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The instance's own liveness verdict, computed against ITS clock.
|
|
40
|
+
*
|
|
41
|
+
* The daemon stamps the health block when it writes the heartbeat, so the
|
|
42
|
+
* block's `ageMs` is 0 and `stale` false *in the file*. If the daemon dies
|
|
43
|
+
* and the container keeps serving that file, the block stays green forever.
|
|
44
|
+
* The container recomputes liveness from `updatedAtMs` on every request, so
|
|
45
|
+
* its verdict is the fresh one and it wins (#300 review, P1).
|
|
46
|
+
*
|
|
47
|
+
* `false` only when the INSTANCE answered no — a 503 health body, or
|
|
48
|
+
* `ok: false`. A 404, 401 or 502 from a proxy in front of it is not the
|
|
49
|
+
* instance speaking at all, and leaves this `undefined` (#300 review,
|
|
50
|
+
* CodeRabbit).
|
|
51
|
+
*/
|
|
52
|
+
live?: boolean;
|
|
53
|
+
/** The endpoint answered, but not with anything this command can read. */
|
|
54
|
+
unreadable?: boolean;
|
|
55
|
+
/** Allowlisted class of a transport failure; the message is not reported. */
|
|
56
|
+
errorClass?: string;
|
|
57
|
+
dispatching: boolean;
|
|
58
|
+
verdict: string;
|
|
59
|
+
health?: FactoryPublicHealth;
|
|
60
|
+
/**
|
|
61
|
+
* The Worker answered without probing the container.
|
|
62
|
+
*
|
|
63
|
+
* In event-driven short-sleep mode `/healthz` terminates at the Worker on
|
|
64
|
+
* purpose, so anonymous polling cannot wake the container and defeat
|
|
65
|
+
* scale-to-zero. That answer is Worker liveness and says nothing about
|
|
66
|
+
* Factory (factory-cloud#40 review).
|
|
67
|
+
*/
|
|
68
|
+
workerOnly?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The container's own bootstrap phase, when it reports one.
|
|
71
|
+
*
|
|
72
|
+
* `booting`/`rendering-config`/`preflight` answer `ok: false` exactly like a
|
|
73
|
+
* wedged instance does, and telling someone three minutes into a boot that
|
|
74
|
+
* their Factory process is gone sends them to the wrong problem.
|
|
75
|
+
*/
|
|
76
|
+
phase?: string;
|
|
77
|
+
/** Present when the instance predates the `/healthz` diagnostics block. */
|
|
78
|
+
legacy?: DeployedLegacyHealth;
|
|
79
|
+
evidence?: DeployedEvidenceSummary;
|
|
80
|
+
}
|
|
81
|
+
export interface DiagnoseDeployedOptions {
|
|
82
|
+
url: string;
|
|
83
|
+
token?: string;
|
|
84
|
+
timeoutMs?: number;
|
|
85
|
+
fetch?: typeof fetch;
|
|
86
|
+
}
|
|
87
|
+
export declare function formatDuration(ms: number | undefined): string;
|
|
88
|
+
/** Read a deployed instance's public health, plus `/evidence` when a token is held. */
|
|
89
|
+
export declare function diagnoseDeployedFactory(options: DiagnoseDeployedOptions): Promise<DeployedFactoryDiagnosis>;
|
|
90
|
+
/** Human-readable rendering; `--json` prints the diagnosis object instead. */
|
|
91
|
+
export declare function renderDeployedDiagnosis(diagnosis: DeployedFactoryDiagnosis): string;
|
|
92
|
+
//# sourceMappingURL=diagnose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/cli/diagnose.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,C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,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ7D;AAED,uFAAuF;AACvF,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC,CA0CnC;AA8CD,8EAA8E;AAC9E,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,wBAAwB,GAAG,MAAM,CAsEnF"}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { telemetryErrorClass } from '../observability/error-class.js';
|
|
2
|
+
import { normalizePublicHealth } from '../orchestrator/public-health.js';
|
|
3
|
+
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
4
|
+
/** Container bootstrap phases: `ok: false` here means "not yet", not "wedged". */
|
|
5
|
+
const BOOT_PHASES = new Set(['booting', 'rendering-config', 'preflight']);
|
|
6
|
+
const MAX_EVIDENCE_TEXT = 2_000;
|
|
7
|
+
const endpoint = (base, path) => `${base.replace(/\/+$/u, '')}${path}`;
|
|
8
|
+
/**
|
|
9
|
+
* Strip control characters before anything remote reaches a terminal.
|
|
10
|
+
*
|
|
11
|
+
* `/evidence` is authenticated and returns the operator's own instance, but
|
|
12
|
+
* its `lastError` is still dependency-controlled text, and a terminal
|
|
13
|
+
* interprets escape sequences.
|
|
14
|
+
*/
|
|
15
|
+
const forTerminal = (value) =>
|
|
16
|
+
// C0 and C1 alike (#300 review, P2, cubic): some terminals treat the C1
|
|
17
|
+
// range as escape introducers, so stripping only C0 is not enough.
|
|
18
|
+
value.replace(/[\u0000-\u001F\u007F-\u009F]+/gu, ' ').trim().slice(0, MAX_EVIDENCE_TEXT);
|
|
19
|
+
const asRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
20
|
+
? value
|
|
21
|
+
: {};
|
|
22
|
+
const asText = (value) => typeof value === 'string' && value.trim() ? forTerminal(value) : undefined;
|
|
23
|
+
const asCount = (value) => typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
24
|
+
async function getJson(fetchImpl, url, opts) {
|
|
25
|
+
const response = await fetchImpl(url, {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
headers: {
|
|
28
|
+
accept: 'application/json',
|
|
29
|
+
...(opts.token ? { authorization: `Bearer ${opts.token}` } : {}),
|
|
30
|
+
},
|
|
31
|
+
signal: AbortSignal.timeout(opts.timeoutMs),
|
|
32
|
+
});
|
|
33
|
+
let body;
|
|
34
|
+
try {
|
|
35
|
+
body = await response.json();
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
body = undefined;
|
|
39
|
+
}
|
|
40
|
+
return { status: response.status, body };
|
|
41
|
+
}
|
|
42
|
+
function legacyHealth(body) {
|
|
43
|
+
const heartbeat = asRecord(body.heartbeat);
|
|
44
|
+
return {
|
|
45
|
+
...(asText(body.phase) ? { phase: asText(body.phase) } : {}),
|
|
46
|
+
...(asText(body.factoryProcess) ? { factoryProcess: asText(body.factoryProcess) } : {}),
|
|
47
|
+
...(asText(heartbeat.status) ? { heartbeatStatus: asText(heartbeat.status) } : {}),
|
|
48
|
+
...(asText(heartbeat.updatedAt) ? { heartbeatUpdatedAt: asText(heartbeat.updatedAt) } : {}),
|
|
49
|
+
...(asText(heartbeat.readinessReconcile)
|
|
50
|
+
? { readinessReconcile: asText(heartbeat.readinessReconcile) }
|
|
51
|
+
: {}),
|
|
52
|
+
...(asText(heartbeat.eventListener) ? { eventListener: asText(heartbeat.eventListener) } : {}),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function verdictFor(diagnosis) {
|
|
56
|
+
if (!diagnosis.reachable) {
|
|
57
|
+
return {
|
|
58
|
+
dispatching: false,
|
|
59
|
+
verdict: `unreachable: ${diagnosis.url} did not answer (${diagnosis.errorClass ?? 'no response'})`,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// Before any subsystem reading: a snapshot served by a container whose
|
|
63
|
+
// daemon has stopped updating it describes a process that is no longer
|
|
64
|
+
// there. The instance already said so.
|
|
65
|
+
if (diagnosis.live === false) {
|
|
66
|
+
if (diagnosis.phase !== undefined && BOOT_PHASES.has(diagnosis.phase)) {
|
|
67
|
+
return {
|
|
68
|
+
dispatching: false,
|
|
69
|
+
verdict: `not dispatching yet: the instance is still starting (phase ${diagnosis.phase}). ` +
|
|
70
|
+
'A cold container hydrates its Relayfile mirror before the first pass, which #36 measured ' +
|
|
71
|
+
'at up to 61 minutes; re-run this in a few minutes before treating it as wedged.',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
dispatching: false,
|
|
76
|
+
verdict: `not dispatching: the instance reports itself not live (HTTP ${diagnosis.httpStatus ?? '?'}` +
|
|
77
|
+
`${diagnosis.phase ? `, phase ${diagnosis.phase}` : ''}). ` +
|
|
78
|
+
'Its loop heartbeat is stale or the Factory process is gone, so any health block it still ' +
|
|
79
|
+
'serves describes the last write, not the present.',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (diagnosis.unreadable) {
|
|
83
|
+
return {
|
|
84
|
+
dispatching: false,
|
|
85
|
+
verdict: `cannot tell: the endpoint answered HTTP ${diagnosis.httpStatus ?? '?'} and carried no Factory ` +
|
|
86
|
+
'health. Something other than the instance may be answering this URL — a gateway, an auth ' +
|
|
87
|
+
'proxy, or a load balancer. Check the URL, then pass --token to read /evidence.',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
if (diagnosis.workerOnly) {
|
|
91
|
+
return {
|
|
92
|
+
dispatching: false,
|
|
93
|
+
verdict: 'cannot tell: this deployment answers /healthz at the Worker without probing the container ' +
|
|
94
|
+
'(event-driven short-sleep), so the response is Worker liveness and carries no Factory ' +
|
|
95
|
+
'health. Pass --token to read /evidence, which does reach the container.',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const health = diagnosis.health;
|
|
99
|
+
if (!health) {
|
|
100
|
+
const legacy = diagnosis.legacy ?? {};
|
|
101
|
+
if (!legacy.readinessReconcile && !legacy.eventListener) {
|
|
102
|
+
return {
|
|
103
|
+
dispatching: false,
|
|
104
|
+
verdict: 'cannot tell: this response carried no Factory health at all — no diagnostics block and ' +
|
|
105
|
+
'no subsystem state strings. Pass --token to read /evidence.',
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
dispatching: false,
|
|
110
|
+
verdict: 'cannot tell: this instance predates the /healthz diagnostics block (#295), so it publishes ' +
|
|
111
|
+
`state strings only — readinessReconcile=${legacy.readinessReconcile ?? 'unknown'}, ` +
|
|
112
|
+
`eventListener=${legacy.eventListener ?? 'unknown'}. ` +
|
|
113
|
+
'Upgrade the deployed Factory, or pass --token to read /evidence.',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (health.stale || health.loopStatus === 'stopping') {
|
|
117
|
+
return {
|
|
118
|
+
dispatching: false,
|
|
119
|
+
verdict: `not dispatching: ${health.reason ?? 'the loop heartbeat is not current'}`,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const readiness = health.readinessReconcile;
|
|
123
|
+
if (readiness?.state === 'stalled') {
|
|
124
|
+
const missed = readiness.missedPasses ?? 0;
|
|
125
|
+
return {
|
|
126
|
+
dispatching: false,
|
|
127
|
+
verdict: `not dispatching: the readiness sweep is stalled — one pass has been in flight for ` +
|
|
128
|
+
`${formatDuration(readiness.inFlightMs)} (${missed} missed passes at ` +
|
|
129
|
+
`${formatDuration(readiness.intervalMs)} cadence). The loop only re-arms when a sweep ` +
|
|
130
|
+
'settles, so a hung pass stops dispatch permanently.',
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
if (readiness && (readiness.state === 'degraded' || readiness.state === 'retrying')) {
|
|
134
|
+
return {
|
|
135
|
+
dispatching: false,
|
|
136
|
+
verdict: `not dispatching: readinessReconcile is ${readiness.state} after ` +
|
|
137
|
+
`${readiness.consecutiveFailures} consecutive failures ` +
|
|
138
|
+
`(threshold ${readiness.failureThreshold}), last failure class ` +
|
|
139
|
+
`${readiness.lastErrorClass ?? 'unknown'}. ` +
|
|
140
|
+
'Pass --token to read the message at /evidence.',
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
if (health.eventListener?.state === 'not-listening') {
|
|
144
|
+
return {
|
|
145
|
+
dispatching: false,
|
|
146
|
+
verdict: 'not dispatching: the daemon is not listening for Relayfile events.',
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
if (health.status === 'unknown') {
|
|
150
|
+
return {
|
|
151
|
+
dispatching: false,
|
|
152
|
+
verdict: 'cannot tell: the health block did not report a status this version understands. ' +
|
|
153
|
+
'Pass --token to read /evidence.',
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (health.status !== 'ok') {
|
|
157
|
+
return { dispatching: false, verdict: `not dispatching: ${health.reason ?? 'a subsystem is degraded'}` };
|
|
158
|
+
}
|
|
159
|
+
// Review follow-up on #300 (P1, cubic). An empty `degradedSubsystems` on a
|
|
160
|
+
// block that never reported the readiness sweep is an absence of evidence,
|
|
161
|
+
// not evidence of health.
|
|
162
|
+
if (!readiness || readiness.state === 'unknown') {
|
|
163
|
+
return {
|
|
164
|
+
dispatching: false,
|
|
165
|
+
verdict: 'cannot tell: the health block carries no readiness-reconcile state, so nothing here says ' +
|
|
166
|
+
'whether discovery is running. Pass --token to read /evidence.',
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
if (readiness.state === 'not-running') {
|
|
170
|
+
return {
|
|
171
|
+
dispatching: false,
|
|
172
|
+
verdict: 'not dispatching: the readiness loop is not running — this instance is not a live daemon.',
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
dispatching: true,
|
|
177
|
+
verdict: 'dispatching: readinessReconcile is healthy' +
|
|
178
|
+
(readiness?.intervalMs ? ` on a ${formatDuration(readiness.intervalMs)} cadence` : '') +
|
|
179
|
+
`, and the event listener is ${health.eventListener?.state ?? 'unknown'}.`,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
export function formatDuration(ms) {
|
|
183
|
+
if (ms === undefined)
|
|
184
|
+
return 'unknown';
|
|
185
|
+
if (ms < 1_000)
|
|
186
|
+
return `${ms}ms`;
|
|
187
|
+
const seconds = Math.floor(ms / 1_000);
|
|
188
|
+
if (seconds < 60)
|
|
189
|
+
return `${seconds}s`;
|
|
190
|
+
const minutes = Math.floor(seconds / 60);
|
|
191
|
+
if (minutes < 60)
|
|
192
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
193
|
+
return `${Math.floor(minutes / 60)}h ${minutes % 60}m`;
|
|
194
|
+
}
|
|
195
|
+
/** Read a deployed instance's public health, plus `/evidence` when a token is held. */
|
|
196
|
+
export async function diagnoseDeployedFactory(options) {
|
|
197
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
198
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
199
|
+
const url = options.url.replace(/\/+$/u, '');
|
|
200
|
+
let base;
|
|
201
|
+
try {
|
|
202
|
+
const health = await getJson(fetchImpl, endpoint(url, '/healthz'), { timeoutMs });
|
|
203
|
+
const body = asRecord(health.body);
|
|
204
|
+
// The container serves the daemon's block inside its heartbeat projection;
|
|
205
|
+
// accept a top-level copy too, so a proxy that hoists it still works.
|
|
206
|
+
const published = normalizePublicHealth(body.health ?? asRecord(body.heartbeat).health);
|
|
207
|
+
const workerOnly = body.eventDrivenSleep === true || body.container === 'not-probed';
|
|
208
|
+
// A container answering its own health says `ok`; the 503 path is the
|
|
209
|
+
// service-level negative. Anything else that answers on this URL — a
|
|
210
|
+
// gateway 404, an auth proxy 401, a load balancer 502 — never asked the
|
|
211
|
+
// container, and cannot support a statement about Factory.
|
|
212
|
+
// The container's health response always carries a top-level `ok`. A
|
|
213
|
+
// status code alone is not enough: a gateway can answer 200 with an error
|
|
214
|
+
// page or 503 with its own, and neither asked the container (#300 review,
|
|
215
|
+
// cubic).
|
|
216
|
+
const instanceAnswered = typeof body.ok === 'boolean';
|
|
217
|
+
base = {
|
|
218
|
+
url,
|
|
219
|
+
reachable: true,
|
|
220
|
+
httpStatus: health.status,
|
|
221
|
+
...(instanceAnswered
|
|
222
|
+
? { live: health.status === 200 && body.ok !== false }
|
|
223
|
+
: { unreadable: true }),
|
|
224
|
+
...(asText(body.phase) ? { phase: asText(body.phase) } : {}),
|
|
225
|
+
...(workerOnly ? { workerOnly: true } : {}),
|
|
226
|
+
...(published ? { health: published } : { legacy: legacyHealth(body) }),
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
base = { url, reachable: false, errorClass: telemetryErrorClass(error) };
|
|
231
|
+
}
|
|
232
|
+
if (base.reachable) {
|
|
233
|
+
base = { ...base, evidence: await readEvidence(fetchImpl, url, options.token, timeoutMs) };
|
|
234
|
+
}
|
|
235
|
+
return { ...base, ...verdictFor(base) };
|
|
236
|
+
}
|
|
237
|
+
async function readEvidence(fetchImpl, url, token, timeoutMs) {
|
|
238
|
+
if (!token) {
|
|
239
|
+
return {
|
|
240
|
+
fetched: false,
|
|
241
|
+
reason: 'no operator token supplied — pass --token or set FACTORY_EVIDENCE_TOKEN to read the ' +
|
|
242
|
+
'free-text lastError at /evidence',
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
try {
|
|
246
|
+
const evidence = await getJson(fetchImpl, endpoint(url, '/evidence'), { token, timeoutMs });
|
|
247
|
+
if (evidence.status !== 200) {
|
|
248
|
+
// Only 401/403 are statements about the credential. A 404 means this
|
|
249
|
+
// deployment exposes no /evidence route and a 5xx means the endpoint
|
|
250
|
+
// failed — sending someone to rotate a working token for either is the
|
|
251
|
+
// wrong-problem failure again (#300 review, CodeRabbit).
|
|
252
|
+
const reason = evidence.status === 401 || evidence.status === 403
|
|
253
|
+
? `/evidence answered HTTP ${evidence.status}; the token was not accepted`
|
|
254
|
+
: evidence.status === 404
|
|
255
|
+
? `/evidence answered HTTP 404; this deployment exposes no /evidence route (the token is not the problem)`
|
|
256
|
+
: `/evidence request failed with HTTP ${evidence.status}; the endpoint errored (the token is not the problem)`;
|
|
257
|
+
return { fetched: false, httpStatus: evidence.status, reason };
|
|
258
|
+
}
|
|
259
|
+
const body = asRecord(evidence.body);
|
|
260
|
+
const readiness = asRecord(body.readinessReconcile);
|
|
261
|
+
return {
|
|
262
|
+
fetched: true,
|
|
263
|
+
httpStatus: evidence.status,
|
|
264
|
+
...(asText(body.phase) ? { phase: asText(body.phase) } : {}),
|
|
265
|
+
...(asText(readiness.lastError) ? { lastError: asText(readiness.lastError) } : {}),
|
|
266
|
+
...(asCount(readiness.consecutiveFailures) !== undefined
|
|
267
|
+
? { consecutiveFailures: asCount(readiness.consecutiveFailures) }
|
|
268
|
+
: {}),
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
return { fetched: false, reason: `/evidence request failed (${telemetryErrorClass(error)})` };
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/** Human-readable rendering; `--json` prints the diagnosis object instead. */
|
|
276
|
+
export function renderDeployedDiagnosis(diagnosis) {
|
|
277
|
+
const lines = [`factory diagnose — ${diagnosis.url}`];
|
|
278
|
+
lines.push(` reachable : ${diagnosis.reachable ? `yes (HTTP ${diagnosis.httpStatus ?? '?'})` : `no (${diagnosis.errorClass ?? 'no response'})`}`);
|
|
279
|
+
if (diagnosis.phase !== undefined) {
|
|
280
|
+
lines.push(` phase : ${diagnosis.phase}`);
|
|
281
|
+
}
|
|
282
|
+
if (diagnosis.live === false) {
|
|
283
|
+
lines.push(' instance liveness : NOT LIVE (the instance\'s own verdict, on its own clock)');
|
|
284
|
+
}
|
|
285
|
+
const health = diagnosis.health;
|
|
286
|
+
if (health) {
|
|
287
|
+
lines.push(` liveness (ok) : ${health.ok} (as of the last heartbeat write)`);
|
|
288
|
+
lines.push(` status : ${health.status}`);
|
|
289
|
+
lines.push(` loop : ${health.loopStatus ?? 'unknown'}, heartbeat ${formatDuration(health.ageMs)} old${health.stale ? ' (STALE)' : ''}`);
|
|
290
|
+
if (health.degradedSubsystems.length > 0) {
|
|
291
|
+
lines.push(` degraded subsystems : ${health.degradedSubsystems.join(', ')}`);
|
|
292
|
+
}
|
|
293
|
+
const readiness = health.readinessReconcile;
|
|
294
|
+
if (readiness) {
|
|
295
|
+
lines.push(' readinessReconcile:');
|
|
296
|
+
lines.push(` state : ${readiness.state}`);
|
|
297
|
+
lines.push(` consecutiveFailures: ${readiness.consecutiveFailures} (threshold ${readiness.failureThreshold})`);
|
|
298
|
+
lines.push(` lastErrorClass : ${readiness.lastErrorClass ?? '—'}`);
|
|
299
|
+
lines.push(` cadence : ${formatDuration(readiness.intervalMs)}`);
|
|
300
|
+
if (readiness.inFlightMs !== undefined) {
|
|
301
|
+
lines.push(` pass in flight : ${formatDuration(readiness.inFlightMs)} (${readiness.missedPasses ?? 0} missed passes)`);
|
|
302
|
+
}
|
|
303
|
+
lines.push(` lastStartedAt : ${formatInstant(readiness.lastStartedAtMs)}`);
|
|
304
|
+
lines.push(` lastCompletedAt : ${formatInstant(readiness.lastCompletedAtMs)}`);
|
|
305
|
+
lines.push(` lastFailureAt : ${formatInstant(readiness.lastFailureAtMs)}`);
|
|
306
|
+
}
|
|
307
|
+
lines.push(` eventListener : ${health.eventListener?.state ?? 'unknown'}`);
|
|
308
|
+
}
|
|
309
|
+
else if (diagnosis.unreadable) {
|
|
310
|
+
lines.push(' health block : none — this response carried no Factory health');
|
|
311
|
+
}
|
|
312
|
+
else if (diagnosis.workerOnly) {
|
|
313
|
+
// Not an old instance — an unprobed one. Saying "predates #295" here would
|
|
314
|
+
// send an operator to upgrade a Factory that is fine.
|
|
315
|
+
lines.push(' health block : not requested — the Worker answered without probing the container');
|
|
316
|
+
lines.push(' mode : event-driven short-sleep');
|
|
317
|
+
}
|
|
318
|
+
else if (diagnosis.legacy?.readinessReconcile || diagnosis.legacy?.eventListener) {
|
|
319
|
+
lines.push(' health block : absent — state strings only (instance predates #295)');
|
|
320
|
+
lines.push(` readinessReconcile : ${diagnosis.legacy.readinessReconcile ?? 'unknown'}`);
|
|
321
|
+
lines.push(` eventListener : ${diagnosis.legacy.eventListener ?? 'unknown'}`);
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
// No block and no state strings: the response carried no Factory health at
|
|
325
|
+
// all. That is a statement about this response, not about the instance.
|
|
326
|
+
lines.push(' health block : absent, and no subsystem state strings in the response');
|
|
327
|
+
}
|
|
328
|
+
const evidence = diagnosis.evidence;
|
|
329
|
+
if (evidence) {
|
|
330
|
+
lines.push(` evidence : ${evidence.fetched ? `read (HTTP ${evidence.httpStatus ?? 200})` : `not read — ${evidence.reason ?? 'unavailable'}`}`);
|
|
331
|
+
if (evidence.lastError)
|
|
332
|
+
lines.push(` lastError : ${evidence.lastError}`);
|
|
333
|
+
}
|
|
334
|
+
lines.push('');
|
|
335
|
+
lines.push(`verdict: ${diagnosis.verdict}`);
|
|
336
|
+
return `${lines.join('\n')}\n`;
|
|
337
|
+
}
|
|
338
|
+
const formatInstant = (ms) => {
|
|
339
|
+
if (ms === undefined)
|
|
340
|
+
return '—';
|
|
341
|
+
// Belt and braces with `normalizePublicHealth`'s range check: a renderer
|
|
342
|
+
// asked to explain an outage must never be the thing that throws.
|
|
343
|
+
const instant = new Date(ms);
|
|
344
|
+
return Number.isNaN(instant.getTime()) ? 'unknown' : instant.toISOString();
|
|
345
|
+
};
|
|
346
|
+
//# sourceMappingURL=diagnose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/cli/diagnose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AA4FxE,MAAM,kBAAkB,GAAG,MAAM,CAAA;AAEjC,kFAAkF;AAClF,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAA;AACzE,MAAM,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MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5B,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAA;AAC5E,CAAC,CAAA"}
|
package/dist/cli/fleet.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export interface FleetCliDeps {
|
|
|
45
45
|
cloudAccessTokenFetch?: typeof fetch;
|
|
46
46
|
/** Hermetic Cloud telemetry transport for CLI integration tests. */
|
|
47
47
|
cloudReporterFetch?: typeof fetch;
|
|
48
|
+
/** Hermetic deployed-instance transport for `diagnose --deployed` tests. */
|
|
49
|
+
diagnoseFetch?: typeof fetch;
|
|
48
50
|
isInteractive?: () => boolean;
|
|
49
51
|
confirmIntegrationConnect?: (provider: FactoryIntegrationProvider) => Promise<boolean>;
|
|
50
52
|
openIntegrationUrl?: (url: string) => void | Promise<void>;
|
|
@@ -121,6 +123,12 @@ type ParsedCommand = {
|
|
|
121
123
|
kind: 'factory-init';
|
|
122
124
|
repo?: string;
|
|
123
125
|
workspaceId?: string;
|
|
126
|
+
} | {
|
|
127
|
+
kind: 'factory-diagnose';
|
|
128
|
+
url: string;
|
|
129
|
+
token?: string;
|
|
130
|
+
json: boolean;
|
|
131
|
+
timeoutMs?: number;
|
|
124
132
|
} | {
|
|
125
133
|
kind: 'notion-intake';
|
|
126
134
|
manifestPath: string;
|
|
@@ -133,7 +141,7 @@ type ParsedCommand = {
|
|
|
133
141
|
statePath?: string;
|
|
134
142
|
};
|
|
135
143
|
export declare function runFleetCli(argv: string[], deps?: FleetCliDeps): Promise<number>;
|
|
136
|
-
export declare function parseFleetCommand(args: string[]): ParsedCommand;
|
|
144
|
+
export declare function parseFleetCommand(args: string[], env?: NodeJS.ProcessEnv): ParsedCommand;
|
|
137
145
|
export declare function parseGlobalOptions(argv: string[]): {
|
|
138
146
|
globals: GlobalOptions;
|
|
139
147
|
args: string[];
|
package/dist/cli/fleet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/cli/fleet.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG1E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/cli/fleet.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG1E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAWnG,OAAO,EAKL,aAAa,EACb,WAAW,EAEX,iBAAiB,EAmBjB,2BAA2B,EAQ3B,KAAK,UAAU,EACf,KAAK,OAAO,EAEZ,KAAK,oBAAoB,EAGzB,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EAEX,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAGhB,KAAK,WAAW,EAChB,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAA;AAIjB,OAAO,EAAmB,KAAK,sBAAsB,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAQxG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAShD,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC/B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAQL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAE7B,MAAM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