Skip to content

fix(opencode): install system llvm tools for coverage sandbox - #1069

Closed
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-coverage-llvm-tools
Closed

fix(opencode): install system llvm tools for coverage sandbox#1069
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-coverage-llvm-tools

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

OpenCode coverage-evidence fails on Rust workspaces (observed on ContextualWisdomLab/TEPP#46 @ 835922c) with:

cargo llvm-cov --workspace --all-features --fail-under-lines 100 --show-missing-lines
error: failed to find llvm-tools-preview

Root cause: the trusted coverage Docker image installs apt cargo/rustc and a musl cargo-llvm-cov binary, but not rustup llvm-tools-preview. TEPP (and other repos) already declare the component in rust-toolchain.toml; apt rustc ignores that.

Fix

  • Install Debian llvm in the coverage tool image
  • Symlink llvm-cov / llvm-profdata into /usr/local/bin
  • Set LLVM_COV / LLVM_PROFDATA image env
  • Export the same tools from ensure_rust_toolchain when present

Test plan

  • Merge this workflow change to main
  • Re-dispatch OpenCode Review for TEPP#46 and confirm coverage-evidence no longer fails on llvm-tools-preview
  • Confirm a non-Rust repo coverage image still builds

Summary by CodeRabbit

  • 개선 사항
    • 코드 커버리지 측정 환경을 안정화했습니다.
    • 커버리지 실행 시 필요한 LLVM 도구를 자동으로 인식하고 사용하도록 개선했습니다.
    • 신뢰된 커버리지 환경에서 도구 경로가 일관되게 설정되어 측정 결과의 재현성이 향상되었습니다.

The trusted coverage sandbox image ships cargo-llvm-cov but only apt
cargo/rustc without rustup llvm-tools-preview. cargo-llvm-cov then fails
with "failed to find llvm-tools-preview" on Rust workspaces (e.g. TEPP),
blocking OpenCode approval despite green repository CI.

Install the Debian llvm package, symlink llvm-cov/llvm-profdata into PATH,
export LLVM_COV/LLVM_PROFDATA, and teach ensure_rust_toolchain to prefer
those tools when rustup components are absent.
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d8f86b90-958f-459a-bc5f-ae16d56e033c

📥 Commits

Reviewing files that changed from the base of the PR and between c47afc2 and e69a81e.

📒 Files selected for processing (1)
  • .github/workflows/opencode-review-dispatch.yml

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Coverage Docker 이미지에 LLVM 도구를 추가합니다. llvm-covllvm-profdata를 표준 경로에 연결합니다. Rust coverage 실행 시 기존 설정이 없으면 시스템 LLVM 도구 경로를 사용합니다.

Changes

LLVM coverage 도구 설정

Layer / File(s) Summary
LLVM 설치 및 경로 설정
.github/workflows/opencode-review-dispatch.yml
Coverage 이미지에 llvm을 설치합니다. llvm-covllvm-profdata/usr/local/bin에 연결합니다. 기존 LLVM_COVLLVM_PROFDATA 값이 없으면 시스템 도구 경로를 설정합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e69a8

This localized workflow change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 coverage 샌드박스에 시스템 LLVM 도구를 설치하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/opencode-coverage-llvm-tools

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by #1081 (same llvm coverage-image fix). #1069 OpenCode concurrency group was held by a non-cancellable hung model-pool job; v2 uses a new PR number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant