Skip to content

Commit 729628c

Browse files
bloveclaude
andauthored
chore(recorders): consolidate per-cap record scripts to the generic recorder (#496)
Five per-cap record scripts removed in favor of scripts/record-aimock-cap.sh (shipped in PR #482). The generic recorder reads cap metadata from the capability registry and drives any normal LLM-call → tool_call → continuation flow: Deleted (5): - cockpit/chat/generative-ui/angular/e2e/scripts/record-c-generative-ui.sh - cockpit/chat/a2ui/angular/e2e/scripts/record-c-a2ui.sh - cockpit/chat/subagents/angular/e2e/scripts/record-c-subagents.sh - cockpit/langgraph/streaming/angular/e2e/scripts/record-streaming.py - cockpit/chat/tool-calls/angular/e2e/scripts/record-c-tool-calls.py The 2 Python recorders predated the shell pattern entirely; they hand-instantiated ChatOpenAI and saved responses directly, drifting from real cap behavior over time. The generic recorder runs the actual cap backend through aimock --record, giving authoritative captures. Kept (1) as documented special case: - cockpit/chat/interrupts/angular/e2e/scripts/record-c-interrupts.sh c-interrupts requires interrupt-resume handshake (interrupt() inside ToolNode pauses the run with status=interrupted; the client must POST command.resume to continue). The generic recorder doesn't drive that two-phase dance — it treats `interrupted` as terminal. Header block in the kept script now explains why it's the special case. Identified during the post-Task-#4 e2e audit (item #4). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7077ed0 commit 729628c

6 files changed

Lines changed: 14 additions & 683 deletions

File tree

cockpit/chat/a2ui/angular/e2e/scripts/record-c-a2ui.sh

Lines changed: 0 additions & 166 deletions
This file was deleted.

cockpit/chat/generative-ui/angular/e2e/scripts/record-c-generative-ui.sh

Lines changed: 0 additions & 170 deletions
This file was deleted.

cockpit/chat/interrupts/angular/e2e/scripts/record-c-interrupts.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66
# flows in sequence so the recorded fixture covers both confirm and cancel
77
# resume paths.
88
#
9+
# WHY THIS IS A SPECIAL-CASE SCRIPT (not using the generic
10+
# scripts/record-aimock-cap.sh):
11+
#
12+
# Most caps' flows are normal LLM-call → tool_call → continuation cycles
13+
# that complete in a single run; the generic recorder handles those by
14+
# polling for terminal status (success/error/timeout/interrupted) and then
15+
# merging the captured fixture files. c-interrupts is different: the graph
16+
# calls langgraph's interrupt() inside a ToolNode, which pauses the run
17+
# (status=interrupted) and requires the client to POST a `command.resume`
18+
# value back to continue. The recorded fixture has to capture BOTH the
19+
# pre-interrupt LLM call AND the post-resume continuation, which means
20+
# driving the resume API call from the recorder script. The drive_flow
21+
# helper below handles that two-phase dance.
22+
#
923
# Run from repo root:
1024
# OPENAI_API_KEY=sk-... bash cockpit/chat/interrupts/angular/e2e/scripts/record-c-interrupts.sh
1125
set -euo pipefail

0 commit comments

Comments
 (0)