{
 "model": "claude-haiku-5-5",
 "category": "background",
 "scenarios": [
  {
   "id": "d1-two-servers",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "Both python http.servers (8810, 8811) started and curl returned 200 on each. TaskStop stopped only bg-55b71d4d (stopped, exit 143; 8810 curl exit 7, 8811 still 200). TaskOutput and the tasks frames agree. Exit 0, 8/8 tool pairs, saved session pairs complete, leftovers empty (8811 gone after driver exit), cost matches recompute (0.00220479).",
   "notes": "The server address was detected, so the background Bash returned in about 480 ms. No .tmp or lock leftovers."
  },
  {
   "id": "d2-bad-bg-command",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "The bad command settled failed with exit 127 and its bash stderr. The sh command settled failed with exit 3 and 'starting/crashed'. TaskOutput and the tasks frames show failed with the right codes, nothing hung. Exit 0, sessions paired, leftovers empty, cost matches (0.00109603).",
   "notes": "Exit code repeated in the result is the known, deliberate wording. Model report is accurate."
  },
  {
   "id": "d3-unicode-bg",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "Chinese, emoji, ZWJ sequence and ANSI output intact in the Bash result, both TaskOutputs, every tasks frame tail and the saved session. 0 U+FFFD and 0 lone surrogates. Final status completed, exit 0, ESC bytes preserved as \\u001b. Leftovers empty, cost matches (0.00110631).",
   "notes": "Model timing: both TaskOutput calls came after the task ended, so the 'while running' read was really the Bash result's 'Output so far' (progress 1-4), which the model presented as its first read. It also guessed that the tool strips ESC, but the wire result carries it. G-Code behaved correctly."
  },
  {
   "id": "d4-watcher-left-running",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "node --watch started, curl returned 'ok', FileEdit changed the text, the watcher restarted and curl returned 'updated'; project file confirmed on disk. Left running at turn end as asked; after driver exit (exit 0, immediate) leftovers are empty by command+cwd and port, including the watch child. Cost matches (0.00129171).",
   "notes": "Task frame and TaskOutput showed 'Change detected / Restarting' while running. Empty ~/.gcode/locks is expected."
  },
  {
   "id": "d5-max-bg",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "8 sleeps started. #9 failed with the clear '8 background tasks are already running. Stop one with TaskStop first.' (state failed). #10, identical, was stopped by the repeat guard (state refused, 'Not run', quoting the cause). 8 TaskStops each returned exit 143, TaskList lists all as stopped. Exit 0, 19/19 saved pairs, no sleep left by cwd check, cost matches (0.002437415).",
   "notes": "The refused call has a tool-result with no tool-use frame, which is by design. Model correctly reported 8 started and 2 not started."
  },
  {
   "id": "d6-interrupt-resume",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "SIGINT arrived during TaskStop. TaskStop settled cancelled with one interrupted message, the unstarted FileRead cancelled as Not run, the error frame read 'Stopped before this turn finished.', saved as interrupted with reason 'Stopped by user' and synthetic results; no SIGHUP text. Resume kept the same session, no 400, and was told bg-564ff73d ended with the process; 8835 confirmed free. /time added, verified, server stopped. Both exits 0, 14/14 pairs, cache ratio 0.967, leftovers empty, cost matches (0.003617765).",
   "notes": "The model did not repeat npm or the file write. Its closing line 'didn't stop cleanly' is loose wording; the record shows stopped, exit 143. The 2 s SIGKILL wording matches stop() in backgroundShells.ts:548."
  },
  {
   "id": "d7-sigkill-orphan",
   "status": "pass",
   "product_defects": [],
   "task_outcome": "During foreground sleep 200 the CLI was SIGKILLed (exit 137 expected): result.json sigkill killed true, serverGoneMs 732, and the leftover check found no server or sleep by command, cwd or port. The saved session was already journaled as interrupted, with the sleep call paired to 'No result was recorded...'; 4/4 pairs. Cost matches (0.001010765).",
   "notes": "A stale <session>.lock remains because the process was killed; store.ts takes over locks whose process is gone. background-tasks.jsonl keeps 'running', which the next process reads as ended with its process. Across all 7 runs: no sandbox-exec, network-incident, unexplained-kill, DiagnosticReports, log show, incidents or dsh folder; 31 tools with the 6-skill catalog; .err files empty; no listeners on 8810-8841 at review time."
  }
 ]
}