Skip to content

coverage-evidence: trusted coverage tool image build fails — requirements-noema-document-ci-hashes.txt never staged into build context, blocks every PR's opencode-review #2273

Description

@seonghobae

Symptom

coverage-evidence (part of the opencode-review gate) fails on every PR with:

#13 ERROR: failed to calculate checksum of ref ...: "/requirements-noema-document-ci-hashes.txt": not found
ERROR: failed to build: failed to solve: failed to compute cache key: ...
##[error]Trusted coverage tool image build failed before PR execution.

Observed live on .github PR #2065 (run 35283384170, job 105472318967, head f2b5ecae4865ef2ba630d15abcde007ba57bd126, base a1d00341a5d559d99e36e1c0d575c1597a9f88ba). Because coverage-evidence fails, opencode-review publishes COVERAGE_BLOCKED / REQUEST_CHANGES regardless of the PR's actual diff — PR #2065's own diff is one .gitleaks.toml allowlist entry, unrelated to this failure.

Root cause

opencode-review-dispatch.yml's coverage-tool-image build step assembles a minimal Docker build context in $coverage_build_dir before invoking docker build. The trusted Dockerfile heredoc COPYs two requirements-hash files:

COPY requirements-opencode-review-ci-hashes.txt requirements-noema-document-ci-hashes.txt /tmp/
RUN python3 -m pip install ... -r /tmp/requirements-opencode-review-ci-hashes.txt -r /tmp/requirements-noema-document-ci-hashes.txt ...

But the staging step right before the Dockerfile heredoc only copies the first file into that context:

trusted_ci_requirements="${GITHUB_WORKSPACE}/requirements-opencode-review-ci-hashes.txt"
...
install -m 0644 "$trusted_ci_requirements" \
  "$coverage_build_dir/requirements-opencode-review-ci-hashes.txt"

There is no matching trusted_..._requirements variable, existence/symlink check, or install -m 0644 call for requirements-noema-document-ci-hashes.txt, even though that file exists at the repo root on main (git ls-tree confirms it). The docker build context is the narrow $coverage_build_dir, not the full checkout, so the second COPY target is genuinely absent from what Docker sees — this is a real build defect, not a scanner false positive.

Why it started now

git log --oneline -- requirements-noema-document-ci-hashes.txt on main shows it was introduced by #2172 (04d0f65b, "fix(noema): extract office documents for review context"), which added the second requirements file and the Dockerfile's second COPY/-r reference but did not add the corresponding staging line. #2191 (open, coverage-only follow-up to #2172) doesn't touch this workflow file, so it doesn't fix this either.

Why it will affect every PR

coverage-evidence runs as part of the required opencode-review gate for every repository that routes through this central dispatch workflow, so every PR that reaches this step hits the same Docker build failure and gets COVERAGE_BLOCKED regardless of its own diff.

Proposed patch (narrow, mirrors the existing pattern exactly)

In .github/workflows/opencode-review-dispatch.yml, alongside the existing trusted_ci_requirements block (~line 634 area):

trusted_ci_requirements="${GITHUB_WORKSPACE}/requirements-opencode-review-ci-hashes.txt"
trusted_noema_document_ci_requirements="${GITHUB_WORKSPACE}/requirements-noema-document-ci-hashes.txt"
trusted_base_python_installer="${GITHUB_WORKSPACE}/scripts/ci/install_base_python_locks.py"
...
if [ ! -f "$trusted_noema_document_ci_requirements" ] || [ -L "$trusted_noema_document_ci_requirements" ]; then
  echo "::error::Trusted Noema document CI requirements must be a regular non-symlink file."
  exit 1
fi
...
install -m 0644 "$trusted_ci_requirements" \
  "$coverage_build_dir/requirements-opencode-review-ci-hashes.txt"
install -m 0644 "$trusted_noema_document_ci_requirements" \
  "$coverage_build_dir/requirements-noema-document-ci-hashes.txt"

i.e. add one variable, one symlink/existence guard, and one install -m 0644 call, following the exact shape already used for requirements-opencode-review-ci-hashes.txt. No Dockerfile change needed — only the context-staging step is missing its second file.

Notes for whoever picks this up

Activity

  1. added
    bugSomething isn't working
    priority: criticalImmediate blocker, P0, urgent deadlock, or critical incident
    on Sep 19, 2026
  2. seonghobae commented on Sep 22, 2026

    @seonghobae
    ContributorAuthor

    Fresh downstream canary from ContextualWisdomLab/LineageWeave#1121@dbabff85c72801a1a72a33dc69f969e032dc17b2: OpenCode dispatch run 35563120694, coverage-evidence job 106336347655, reproduced this exact canonical defect before any target-PR execution. The trusted workflow source was .github@e6334e229581a918e2f22de18733b76fa65d7e71; Dockerfile line 89 COPYed both requirements-opencode-review-ci-hashes.txt and requirements-noema-document-ci-hashes.txt, but the narrow build context did not contain the Noema lock. BuildKit failed with "/requirements-noema-document-ci-hashes.txt": not found, followed by Trusted coverage tool image build failed before PR execution. OpenCode consequently published CHANGES_REQUESTED on LineageWeave #1121 even though its review body explicitly reports no source-backed product finding. This is therefore another exact consumer proof for this owner issue, not a LineageWeave coverage defect. Canonical repair remains #2286 at current exact c4a73a174e6bf54cde1ac996bc7df1a94de949fa; its fresh Python Security/SAST/CodeQL/Security runs are still queued, and it has no qualifying approval yet. Keep #1121 fail-closed without review dismissal, leaf wake commit, blind rerun, or copied owner source until #2286 obtains hosted acceptance and protected integration, then reacquire a genuine current-head OpenCode receipt.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: criticalImmediate blocker, P0, urgent deadlock, or critical incident

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions