Skip to content

fix(review): Rust 1.97.1로 오프라인 커버리지 복구#592

Open
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-rust-coverage-toolchain
Open

fix(review): Rust 1.97.1로 오프라인 커버리지 복구#592
seonghobae wants to merge 2 commits into
mainfrom
fix/opencode-rust-coverage-toolchain

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Closes #591

원인

ContextualWisdomLab/codec-carver#250 current-head OpenCode 실행 https://github.com/ContextualWisdomLab/.github/actions/runs/29676953842 에서 Python 561개 테스트·라인 커버리지·문서화는 모두 100%였지만, 중앙 coverage 이미지의 Ubuntu Cargo 1.75.0이 Rust 2024 매니페스트를 파싱하지 못했습니다.

정확한 실패는 feature edition2024 is required이며 애플리케이션 테스트가 시작되기 전의 중앙 도구체인 결함입니다.

변경

  • 공식 Rust 1.97.1 linux/amd64 이미지를 아키텍처 manifest SHA-256으로 고정합니다.
  • distro cargo/rustc 설치를 제거합니다.
  • 네트워크가 허용된 신뢰 이미지 빌드에서 llvm-tools-preview를 설치하고 버전을 검증합니다.
  • 공식 이미지의 world-writable Rust 경로를 root 소유·group/world 비쓰기 상태로 재봉인합니다.
  • 비특권·무토큰 PR 실행에는 신뢰된 RUSTUP_HOME과 Rust proxy 경로만 읽기 전용으로 노출합니다.
  • 실제 증거에 Rust/Cargo/cargo-llvm-cov 버전을 기록합니다.
  • 이미지 다이제스트, 1.97.1, LLVM 도구, 도구체인 권한, 오프라인 환경을 정적 회귀 계약으로 고정합니다.

PR 코드는 기존과 동일하게 docker run --network=none, --cap-drop ALL, UID/GID 65532에서 실행되며 Docker 소켓과 자격 증명은 노출되지 않습니다.

검증

  • python3 -m pytest -q: 634 passed
  • coverage run -m pytest -q tests && coverage report --fail-under=100: 5,527 statements, 100%
  • python3 -m interrogate .: 100%
  • OpenCode/security/queue focused tests: 118 passed
  • STRIX_TEST_CASE_FILTER=success bash scripts/ci/test_strix_quick_gate.sh: passed
  • Ruff check (changed Python), Actionlint, Bash syntax, git diff --check: passed
  • CodeGraph initialized before exploration and synced after edits: 88 files, 1,871 nodes, 4,649 edges; 2 changed files resynced

전체 Ruff format 검사는 main에 이미 존재하는 44개 파일의 포맷 차이를 보고하므로 이번 범위에서 기계적으로 변경하지 않았습니다. 변경한 Python 파일의 Ruff check는 통과했습니다.

공유 로컬 Podman 저장소 공간 부족으로 공식 Rust 이미지 풀은 완료하지 못했습니다. 기존 사용자 이미지는 정리하지 않았으며, exact-head 호스티드 coverage 이미지 빌드를 통합 증거로 사용합니다.

Unblocks: ContextualWisdomLab/codec-carver#250

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores offline Rust coverage compatibility for Rust 2024 manifests by updating the trusted OpenCode coverage tool image to a digest-pinned official Rust 1.97.1 base, removing reliance on stale distro cargo/rustc, and hardening the toolchain exposure inside the no-network sandbox. It also updates model-candidate ordering and tightens central fallback timeouts, with contract tests updated to lock the new behavior.

Changes:

  • Switch trusted coverage-tool Docker base image to digest-pinned rust:1.97.1 and install/verify llvm-tools-preview; remove distro cargo/rustc.
  • Harden Rust toolchain directories and expose RUSTUP_HOME + /usr/local/cargo/bin in sandbox runtime, recording Rust/Cargo/cargo-llvm-cov versions as evidence.
  • Reorder OpenCode model candidates and reduce central review-process fallback timeout/budget; update contract assertions accordingly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/test_opencode_agent_contract.py Updates contract assertions to pin the new Rust toolchain image/digest, sandbox env exposure, version evidence, and updated model/fallback settings.
.github/workflows/opencode-review.yml Updates the trusted offline coverage tool image build to Rust 1.97.1 + llvm-tools, tightens toolchain permissions, adjusts sandbox PATH/RUSTUP_HOME, and revises model ordering + fallback time budgets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

fix(review): update offline Rust coverage toolchain

2 participants