fix(opencode-review): surface exact coverage setup failures - #759
fix(opencode-review): surface exact coverage setup failures#759seonghobae wants to merge 174 commits into
Conversation
📝 WalkthroughWalkthrough커버리지 진단 출력, TypeScript type-only 변경 판정, Atheris 잠금 파일 분리, Strix 경로 검증을 추가했습니다. GitHub Actions에 Python 3.10·3.14 품질 게이트와 관련 계약 테스트를 구성했습니다. Changes커버리지 진단 및 CI 보안 강화
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Materializers
participant CoverageGate
participant Tests
GitHubActions->>Materializers: Python 3.10 materialization 실행
Materializers->>GitHubActions: 실패 summary 게시
GitHubActions->>CoverageGate: Python 3.14 품질 게이트 실행
CoverageGate->>Tests: 커버리지 및 계약 테스트 실행
Tests->>GitHubActions: 검증 결과 반환
Possibly related issues
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
|
|
@coderabbitai review |
|
Pull request was converted to draft
|
@opencode-agent @cwl-noema-review exact-current-head review requested for |
|
@opencode-agent @cwl-noema-review Please perform an independent exact-current-head review of |
Pull request was converted to draft
|
@coderabbitai review Please review exact current head |
|
|
|
@opencode-agent @cwl-noema-review Please independently review exact current head |
|
@opencode-agent @cwl-noema-review Please independently review exact current head |
|
@coderabbitai review Review exact current head |
|
|
|
@opencode-agent Implement the remaining exact-head GREEN repair directly on this PR branch. Current head is
Keep #759 Draft. Preserve every image/action/archive pin, exact-head materialization, no-network/no-credential sandbox, native-fuzz separation, Git isolation, NVIDIA NIM autofix credential boundary, and 100% statement/branch/public-docstring gates. Do not add a patch artifact, one-shot/self-modifying workflow, |
|
Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
@opencode-agent address Exact current head
Keep the PR Draft until a new GREEN head exists. Do not weaken the tests, reuse predecessor-head evidence, mark Ready, approve, merge, release, or modify branch protection. |
|
@coderabbitai autofix |
|
@coderabbitai autofix Exact current head is |
|
Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
|
Exact-current-head implementation request for |
|
@opencode-agent address exact current head Repair
Run |
|
/oc Apply the remaining LLVM runtime-boundary repair directly to this PR's current branch. Do not create another workflow, branch, PR, patch artifact, or encoded helper. In Run |
|
@coderabbitai review Please review exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Checked-out commit =='
git rev-parse HEAD
git status --short
printf '%s\n' '== Workflow outline =='
ast-grep outline .github/workflows/opencode-review-dispatch.yml --items all 2>/dev/null || true
printf '%s\n' '== Docker and LLVM evidence in workflow =='
rg -n -C 12 -- \
'docker run|LLVM_COV|LLVM_PROFDATA|ensure_rust_toolchain|cargo llvm-cov|cargo-llvm-cov|test -x' \
.github/workflows/opencode-review-dispatch.yml
printf '%s\n' '== LLVM contract assertions =='
ast-grep outline tests/test_opencode_rust_coverage_toolchain_contract.py --items all 2>/dev/null || true
rg -n -C 10 -- \
'LLVM_COV|LLVM_PROFDATA|docker run|ensure_rust_toolchain|cargo llvm-cov|cargo-llvm-cov|test -x|assert' \
tests/test_opencode_rust_coverage_toolchain_contract.pyLength of output: 17446
P1 — The isolated container does not receive or revalidate the reviewed LLVM tool paths.
Also, This fails the permanent contract deterministically:
The workflow must add the two literal Docker bindings before I completed static source inspection only. The sandbox does not execute repository tests.
|
|
@coderabbitai fix-ci commit Fix only the three currently failing exact-head assertions on
Do not create a new branch or PR, do not add a patch artifact or workflow, do not change any other file, do not weaken sandboxing or tests, and keep the PR Draft. |
|
Please apply these changes manually.
Lines 773–778 --env RUNNER_TEMP=/secure-output \
--env GITHUB_OUTPUT=/secure-output/github-output \
--env GITHUB_STEP_SUMMARY=/secure-output/step-summary \
+ --env LLVM_COV=/usr/bin/llvm-cov-19 \
+ --env LLVM_PROFDATA=/usr/bin/llvm-profdata-19 \
"$coverage_tool_image" \
/bin/bash /trusted-measure-step.sh || sandbox_status=$?Lines 796–801 exit 0
fi
+ # Revalidate the reviewed LLVM 19 toolchain constants immediately
+ # inside the isolated runtime, before any coverage command runs.
+ # The Docker boundary above binds LLVM_COV/LLVM_PROFDATA by value;
+ # this closes the gap between "the host asked for the reviewed
+ # paths" and "the isolated runtime actually received executable
+ # binaries at those exact paths."
+ if [ "${LLVM_COV:-}" != "/usr/bin/llvm-cov-19" ] \
+ || [ "${LLVM_PROFDATA:-}" != "/usr/bin/llvm-profdata-19" ] \
+ || ! test -x "$LLVM_COV" \
+ || ! test -x "$LLVM_PROFDATA"; then
+ echo "::error::Isolated coverage runtime did not receive the reviewed, executable LLVM_COV/LLVM_PROFDATA toolchain constants."
+ exit 1
+ fi
+
# Use a fixed nobody-like identity that cannot traverse the host-owned
# /out bind mount. This prevents even a daemonized test process from
# racing trusted result publication.View agent analysis |
|
/oc Existing exact-head CI already supplies the required RED test-first evidence: OpenCode Coverage Toolchain Quality and Trusted uv full-suite failures on |
|
@opencode-agent review Run the existing read-only exact-head review path for |
|
@jules Apply |
|
/oc Single-writer repair request for Draft PR #759 only. Starting PR head must be exactly Apply only the permanent RED contract already present in Run the focused exact-head toolchain contract first, then the complete repository quality/security/coverage/docstring/package/provenance gates. Keep #759 Draft and leave |
|
/opencode Supersede every earlier mutation trigger and operate on exact live head Apply strict RED→GREEN to
Preserve the digest-pinned trusted image, Debian LLVM 19 provisioning, Dockerfile ENV values and ordered pre-archive executable preflight, pinned cargo-llvm-cov v0.8.7 URL/SHA-256, exact-head materialization, Do not add, restore, invoke, or retain any staged patch artifact, one-shot/self-modifying workflow, |
|
@opencode-agent Implement the bounded GREEN LLVM runtime-boundary repair on exact current head Modify only
Run |
|
Closing this review path as superseded by #812 to prevent duplicate writes against |
|
/oc Continue from the exact current head, not predecessor evidence. Re-read every unresolved human, CodeRabbit, GHAS, OpenCode, Noema, Strix, and CI finding. If the LLVM runtime-boundary blocker remains, fix it directly in the permanent workflow: pass literal |
|
@cwl-noema-review @opencode-agent Please review the exact current head after the LLVM runtime-boundary repair. Treat every predecessor-head verdict as stale. |
Purpose
Make central OpenCode coverage failures actionable without weakening fail-closed review, credential, dependency, exact-head, scanner-filesystem, protected-main, or branch-writer boundaries. This branch also carries the conservative TypeScript type-only coverage boundary, trusted materializer hardening, permanent exact-head quality evidence, and the NVIDIA NIM-only model credential contract for the write-capable OpenCode autofix worker.
Exact integration identity
dcb87ea3421ec87ce6acc62b04beef56758aa33ef070c504c1cb06891b800d7ab0cf6ac7d3cf8eaeEvery check, review, approval, or commit status from an earlier head is historical only. Pending, queued, cancelled, absent, predecessor-head, skipped-required, or synthetic-merge evidence is not success.
Completed scope
repair-pr*, encoded-patch, staged-patch, or write-capable repair workflow;/usr/bin/llvm-cov-19and/usr/bin/llvm-profdata-19image bindings and ordered build-time executable preflight before the pinned cargo-llvm-cov archive;pr-review-autofix.ymlmigrated from GitHub Models to the NVIDIA NIM provider for both ordinary autofix and merge-conflict resolution;nvidia-nim/nvidia/llama-3.3-nemotron-super-49b-v1.5, small modelnvidia-nim/meta/llama-3.3-70b-instruct, andNVIDIA_NIM_API_KEY→NVIDIA_API_KEYbinding;CHANGELOG.mdevidence.Remaining RED contract: isolated LLVM runtime boundary
The permanent toolchain contract requires all of the following on one exact head:
llvm-19in the existing digest-pinned trusted coverage image.LLVM_COV=/usr/bin/llvm-cov-19andLLVM_PROFDATA=/usr/bin/llvm-profdata-19.docker runboundary.cargo llvm-covinvocation.The production workflow satisfies items 1–3 and 6 but not items 4–5.
31148385426on predecessor head98d28b0d7559a6fc09deff899d074ef0e59dee2efailed attest_isolated_runtime_receives_reviewed_llvm_constants.31148385442on that predecessor head proved 69 focused trusted-uv tests and 100% focused statement/branch coverage, then failed the complete repository gate only on the same three LLVM runtime-boundary assertions: missing second executable checks, missing Docker constant bindings, and missing post-boundary revalidation.Required GREEN implementation
Repair
.github/workflows/opencode-review-dispatch.ymldirectly on this branch:--env LLVM_COV=/usr/bin/llvm-cov-19and--env LLVM_PROFDATA=/usr/bin/llvm-profdata-19to the existing isolateddocker runbefore the image argument.ensure_rust_toolchain, fail closed before acceptingcargo-llvm-covunless both variables equal the reviewed versioned paths and both paths are executable. The permanent test requires literaltest -x "$LLVM_COV"andtest -x "$LLVM_PROFDATA"checks after the Docker boundary and before the firstcargo llvm-covinvocation.tests/test_opencode_rust_coverage_toolchain_contract.pyfirst, then the complete exact-head repository CI, security, coverage, docstring, packaging, provenance, and automated-review suite.Do not create, restore, or retain any one-shot, self-modifying,
repair-pr*, encoded-patch, staged-patch, branch-local write-capable, or competing branch-writer workflow. Keep Draft until the authoritative source repair is committed and every current-head gate reruns.Consolidation
The complete exact head of superseded PR #794,
6bd29ccd394a94b6018cb0985d0febee186124bf, remains preserved as the second parent of commit894c6597a0abf3bdef47c485cf063a0a900ab25f. Its valid production workflow and exact-head quality surfaces remain integrated. The duplicate PR is closed, preventing a competing merge path.Merge gate
Do not mark Ready or merge until a new GREEN exact head has:
No evidence from
dcb87ea3421ec87ce6acc62b04beef56758aa33eor another predecessor transfers to the future GREEN head.Dependency boundary
This central prerequisite must merge before contextual-orchestrator PR #96 can regenerate trusted current-head coverage and independent-review evidence. Inkspan PR #65 remains downstream of that dependency chain. No stacked result may substitute for the ordered
.github#759→contextual-orchestrator#96→inkspan#65review boundary.