From da6f0d5b923f1da95f3d6d436975f20389b8ef27 Mon Sep 17 00:00:00 2001 From: Felix Faerber Date: Thu, 2 Jul 2026 15:14:37 +0300 Subject: [PATCH] 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) --- .gitea/workflows/agent.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitea/workflows/agent.yml b/.gitea/workflows/agent.yml index 4d1dd40..21786aa 100644 --- a/.gitea/workflows/agent.yml +++ b/.gitea/workflows/agent.yml @@ -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: