Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions scripts/ci/opencode_review_normalize_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pathlib import Path
from typing import Any


STRUCTURAL_FAILURE_PHRASES = (
"structural exploration was not possible",
"structural exploration not possible",
Expand Down Expand Up @@ -199,20 +198,19 @@ def iter_json_objects(text: str) -> list[Any]:
decoder = json.JSONDecoder()
values: list[Any] = []

try:
values.append(json.loads(text))
except json.JSONDecodeError:
# OpenCode exports may contain prose around the JSON control object.
pass

for index, character in enumerate(text):
if character != "{":
continue
index = 0
while True:
index = text.find("{", index)
if index == -1:
break
try:
value, _ = decoder.raw_decode(text[index:])
except json.JSONDecodeError:
value, next_index = decoder.raw_decode(text, index)
values.append(value)
index = next_index
continue
values.append(value)
except json.JSONDecodeError:
pass
index += 1

return values

Expand Down
38 changes: 38 additions & 0 deletions test_out.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FAIL: opencode approval gate refuses to approve invalid model output when peer checks and human threads are clean (missing 'it will not approve without source-backed current-head review evidence')
FAIL: opencode model-failure fallback requests changes instead of approving invalid model output (missing 'no valid source-backed review output was available')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config declares MCP servers (missing '"mcp"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config declares the CodeGraph MCP server (missing '"codegraph"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config declares the DeepWiki MCP server (missing '"deepwiki"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config declares the Context7 MCP server (missing '"context7"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config declares the web search MCP server (missing '"web_search"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config points DeepWiki at the official remote MCP endpoint (missing '"url": "https://mcp.deepwiki.com/mcp"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config pins the Context7 MCP package (missing '"@upstash/context7-mcp@3.1.0"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config pins the web search MCP package (missing '"@guhcostan/web-search-mcp@1.0.5"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config launches CodeGraph in MCP mode (missing '"serve", "--mcp"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config uses a reachable DeepSeek V3 small model (missing '"small_model": "github-models/deepseek/deepseek-v3-0324"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config defines GitHub Models GPT-5 with full model id (missing '"openai/gpt-5"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config defines DeepSeek R1 fallback (missing '"deepseek/deepseek-r1-0528"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config defines DeepSeek V3 fallback (missing '"deepseek/deepseek-v3-0324"')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config uses the GitHub Models GPT-5 200k context window (missing '"context": 200000')
grep: /app/opencode.jsonc: No such file or directory
FAIL: opencode config uses the GitHub Models GPT-5 100k output window (missing '"output": 100000')
grep: /app/opencode.jsonc: No such file or directory
grep: /app/opencode.jsonc: No such file or directory
grep: /app/opencode.jsonc: No such file or directory
NO_CONCLUSION
NO_CONCLUSION
NO_CONCLUSION
Loading