From 1ad20a6cd6d1033f141ee21faa66abb1e8dc280c Mon Sep 17 00:00:00 2001 From: jesse23 <643912+jesse23@users.noreply.github.com> Date: Thu, 15 Oct 2026 09:53:54 -0400 Subject: [PATCH] docs(adr): use a generic example command in ADRs 027 and 029 --- docs/adrs/027.server.execute-resilience.md | 10 +++++----- docs/adrs/029.cli.exec.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/adrs/027.server.execute-resilience.md b/docs/adrs/027.server.execute-resilience.md index dd8692a..6835b4c 100644 --- a/docs/adrs/027.server.execute-resilience.md +++ b/docs/adrs/027.server.execute-resilience.md @@ -80,18 +80,18 @@ Option B is chosen because it adds machine-readable error context to the one lin **Scenario 1 — Command not found (ENOENT)** -1. Agent POSTs `{ cmd: "tc", args: ["search", "*"] }` to `/s/main/execute`. -2. `tc` is not on `PATH`. +1. Agent POSTs `{ cmd: "mytool", args: ["search", "*"] }` to `/s/main/execute`. +2. `mytool` is not on `PATH`. 3. Server spawns the process; Node.js emits `error` on the child with code `ENOENT`. 4. Handler writes `{ stream: "stderr", data: "spawn ENOENT: …\n" }` to the response. 5. Handler writes `{ exit: 1, error: "spawn ENOENT: …", code: "ENOENT" }` and ends. 6. webtty continues serving other requests. Server does not exit. -7. Agent reads `exit: 1, code: "ENOENT"` and surfaces: *"tc is not installed — run: bunx @awc/cli@next …"* +7. Agent reads `exit: 1, code: "ENOENT"` and surfaces: *"mytool is not installed — install it and retry"* **Scenario 2 — Command exits non-zero** -1. Agent POSTs `{ cmd: "tc", args: ["search", "bad-query"] }`. -2. `tc` runs, returns exit code 2. +1. Agent POSTs `{ cmd: "mytool", args: ["search", "bad-query"] }`. +2. `mytool` runs, returns exit code 2. 3. Handler writes stderr chunks as they arrive, then `{ exit: 2 }`. 4. No `error` or `code` fields on the exit line — this is a command-level failure, not a spawn failure. 5. Agent reads `exit: 2`, inspects stderr, and decides whether to retry or surface the error. diff --git a/docs/adrs/029.cli.exec.md b/docs/adrs/029.cli.exec.md index 23b28f3..4e48f52 100644 --- a/docs/adrs/029.cli.exec.md +++ b/docs/adrs/029.cli.exec.md @@ -123,7 +123,7 @@ webtty run main cat package.json | jq '.version' | Session not found | `webtty: session not found: ` | | PTY not running | `webtty: PTY not running for session: ` | | WebSocket connection failed (warm-up) | `webtty: failed to start PTY: ` | -| Spawn failure (ENOENT) | `webtty: spawn tc: No such file or directory` | +| Spawn failure (ENOENT) | `webtty: spawn mytool: No such file or directory` | | Other HTTP error | `webtty: run failed ()` | ---