Harden OpenCode compatibility CI and watcher

This commit is contained in:
2026-07-18 23:07:50 -07:00
parent 84c0d80b76
commit 105550a8b4
19 changed files with 1906 additions and 139 deletions

View File

@@ -13,13 +13,22 @@ module OpenCodeCompat
end
def assert_model_request_count!(value)
count = Integer(value, 10)
count = Integer(value.to_s, 10)
return if count == 1
raise ContractError, "Expected exactly one deterministic model request, got #{count}"
rescue ArgumentError, TypeError
raise ContractError, "Deterministic model request count is not an integer: #{value.inspect}"
end
def assert_authoritative_assistant_count!(value)
count = Integer(value.to_s, 10)
return if count == 1
raise ContractError, "Expected exactly one authoritative assistant message, got #{count}"
rescue ArgumentError, TypeError
raise ContractError, "Authoritative assistant message count is not an integer: #{value.inspect}"
end
end
end