Skip to content
Closed
Changes from all 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
17 changes: 17 additions & 0 deletions tests/test_hourly_opencode_nvidia_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,20 @@ def test_buyer_readme_identifies_the_opencode_nvidia_maintainer() -> None:
assert "bounded OpenCode maintainer" in readme
assert "`NVIDIA_NIM_API_KEY`" in readme
assert "COPILOT_GITHUB_TOKEN" not in readme


def test_product_workflow_keeps_printf_escapes_on_indented_yaml_lines() -> None:
"""Keep shell format escapes on one YAML line so workflow parsing succeeds."""
workflow_lines = _read(PRODUCT_WORKFLOW_PATH).splitlines()
checksum_line = (
" printf '%s %s\\n' "
'"$OPENCODE_SHA256" "$archive" | sha256sum --check -'
)
fallback_line = (
" printf '%s\\n' "
"'{\"type\":\"error\",\"message\":\"OpenCode produced no final result\"}' "
'>"$result_file"'
)

assert checksum_line in workflow_lines
assert fallback_line in workflow_lines
Loading