TEMP: debug step to capture opencode --format json event schema
Runs a tiny Sonnet probe and dumps the raw events to the Actions log so we can build the PR-progress parser against the real schema. Removed once captured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
6b5c1bb888
commit
da6f0d5b92
@@ -174,6 +174,23 @@ jobs:
|
||||
"### comment by \($who):\n\(.body)\n"' > /tmp/thread.md 2>/dev/null || true
|
||||
echo "thread comments fetched: $(grep -c '^### comment by ' /tmp/thread.md 2>/dev/null || echo 0)"
|
||||
|
||||
# TEMPORARY: capture opencode's --format json event schema so we can build the PR-progress
|
||||
# parser. Runs a tiny tool-using probe with Sonnet, dumps the events, then this step is removed.
|
||||
- name: DEBUG capture --format json schema
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
run: |
|
||||
cd /tmp && rm -f probe.txt
|
||||
opencode run --model anthropic/claude-sonnet-5 --auto --format json \
|
||||
"Create a file /tmp/probe.txt containing the word hi, then say one sentence about what you did." \
|
||||
> /tmp/events.jsonl 2>/tmp/events.err || true
|
||||
echo "=== lines: $(wc -l < /tmp/events.jsonl) ==="
|
||||
echo "=== distinct top-level event types ==="
|
||||
jq -rc '.type // (keys|join("+"))' /tmp/events.jsonl 2>/dev/null | sort | uniq -c
|
||||
echo "=== every event (compact, truncated to 600 chars/line) ==="
|
||||
jq -c '.' /tmp/events.jsonl 2>/dev/null | cut -c1-600 || cat /tmp/events.jsonl
|
||||
echo "=== stderr tail ==="; tail -15 /tmp/events.err
|
||||
|
||||
- name: Run agent
|
||||
id: run
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user