Skip to content

Commit 937e08c

Browse files
author
Peter Steinberger
committed
docs(exec): document suppression diagnostics
1 parent d4365ea commit 937e08c

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

docs/cli/gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ openclaw gateway stability --json
229229

230230
<AccordionGroup>
231231
<Accordion title="Privacy and bundle behavior">
232-
- Records keep operational metadata: event names, counts, byte sizes, memory readings, queue/session state, channel/plugin names, and redacted session summaries. They do not keep chat text, webhook bodies, tool outputs, raw request or response bodies, tokens, cookies, secret values, hostnames, or raw session ids. Set `diagnostics.enabled: false` to disable the recorder entirely.
232+
- Records keep operational metadata: event names, counts, byte sizes, memory readings, queue/session state, approval ids, channel/plugin names, and redacted session summaries. They do not keep chat text, webhook bodies, tool outputs, raw request or response bodies, tokens, cookies, secret values, hostnames, or raw session ids. Set `diagnostics.enabled: false` to disable the recorder entirely.
233233
- On fatal Gateway exits, shutdown timeouts, and restart startup failures, OpenClaw writes the same diagnostic snapshot to `~/.openclaw/logs/stability/openclaw-stability-*.json` when the recorder has events. Inspect the newest bundle with `openclaw gateway stability --bundle latest`; `--limit`, `--type`, and `--since-seq` also apply to bundle output.
234234

235235
</Accordion>

docs/gateway/opentelemetry.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ to them directly without OTLP export.
412412
- `exec.process.completed` - terminal outcome, duration, target, mode, exit
413413
code, and failure kind. Command text and working directories are not
414414
included.
415+
- `exec.approval.followup_suppressed` - stale approval follow-up dropped after
416+
a session rebound. Includes `approvalId`, `reason` (`session_rebound`),
417+
`phase` (`direct_delivery` or `gateway_preflight`), and the dispatcher
418+
timestamp. Session keys, routes, and command text are not included.
415419

416420
## Without an exporter
417421

src/agents/bash-tools.exec-approval-followup.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ describe("exec approval followup", () => {
232232
const sessionStore = writeTempSessionStore({
233233
"agent:main:main": { sessionId: "session-after-reset" },
234234
});
235+
const diagnostics: DiagnosticEventPayload[] = [];
236+
onDiagnosticEvent((event) => {
237+
diagnostics.push(event);
238+
});
235239

236240
const result = await sendExecApprovalFollowup({
237241
approvalId: "req-finished-rebound",
@@ -245,6 +249,15 @@ describe("exec approval followup", () => {
245249
});
246250

247251
expect(result).toBe(false);
252+
await waitForDiagnosticEventsDrained();
253+
expect(diagnostics).toContainEqual(
254+
expect.objectContaining({
255+
type: "exec.approval.followup_suppressed",
256+
approvalId: "req-finished-rebound",
257+
reason: "session_rebound",
258+
phase: "direct_delivery",
259+
}),
260+
);
248261
expect(sendMessage).not.toHaveBeenCalled();
249262
expect(callGatewayTool).not.toHaveBeenCalled();
250263
});

src/infra/diagnostic-events.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@ describe("diagnostic-events", () => {
822822
approvalId: "approval-123",
823823
reason: "session_rebound",
824824
phase: "gateway_preflight",
825+
ts: expect.any(Number),
825826
}),
826827
);
827828
});

0 commit comments

Comments
 (0)