fix(opencode): scope coverage artifacts to workflow attempts - #1278
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
| - name: Prepare pull request merge tree for coverage measurement | ||
| env: | ||
| COVERAGE_SOURCE_ARCHIVE: ${{ runner.temp }}/opencode-coverage-artifact/opencode-coverage-source.tar |
There was a problem hiding this comment.
📝 Info: Single artifact-ids download extracts directly to path
The consumer reads opencode-coverage-artifact/opencode-coverage-source.tar after a by-artifact-ids download, relying on single-ID extraction landing directly in path (not a per-artifact subdir). exact-artifact-sbom-attestation.yml:114-118 with root.iterdir() in scripts/ci/verify_exact_artifact_sbom_handoff.py:253 already depends on this, so the path resolves.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if ! [[ "$CURRENT_RUN_ATTEMPT" =~ ^[1-9][0-9]*$ ]] || \ | ||
| [ "$COVERAGE_SOURCE_RUN_ATTEMPT" != "$CURRENT_RUN_ATTEMPT" ]; then | ||
| echo "::error::Coverage source was not produced in current workflow attempt ${CURRENT_RUN_ATTEMPT:-missing}; producer attempt=${COVERAGE_SOURCE_RUN_ATTEMPT:-missing}." | ||
| echo "::error::Use a full rerun or a fresh repository dispatch; failed-jobs-only reruns cannot reuse prior-attempt source evidence." | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
📝 Info: Attempt-mismatch guard depends on preserved outputs
On a failed-jobs-only rerun the non-rerun producer keeps its original run_attempt output, so the guard compares the stale producer attempt against the new github.run_attempt and fails closed. The whole fail-closed contract hinges on GitHub preserving the earlier attempt's job outputs unchanged.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Pull request overview
OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.
Findings
1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
- Problem: Failed same-head checks remain for
baf7811960b0f4940856b9a39b7bf78ad28d15ee. - Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
- Fix: Read and fix the failed check logs below, then rerun the current-head checks.
- Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.
Failed checks:
- Strix Security Scan/strix: FAILURE (https://github.com/ContextualWisdomLab/.github/actions/runs/32660152954/job/97244953174)
- Strix Security Scan/strix: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/32660152954/job/97244953174)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Changed file: CHANGELOG.md"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
R2 --> V2["required checks"]
Evidence --> S3["Docs: opencode-coverage-artifact-reruns.md"]
S3 --> I3["operator or user guidance"]
I3 --> R3["Review risk: Docs: opencode-coverage-artifact-reruns.md"]
R3 --> V3["docs review"]
Evidence --> S4["Test (3 files)"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test (3 files)"]
R4 --> V4["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed. Findings1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
Failed checks:
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Changed file: CHANGELOG.md"]
S2 --> I2["repository behavior"]
I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
R2 --> V2["required checks"]
Evidence --> S3["Docs: opencode-coverage-artifact-reruns.md"]
S3 --> I3["operator or user guidance"]
I3 --> R3["Review risk: Docs: opencode-coverage-artifact-reruns.md"]
R3 --> V3["docs review"]
Evidence --> S4["Test (3 files)"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test (3 files)"]
R4 --> V4["targeted test run"]
|
4967b28
into
codex/pr904-current-main-replacement-20260824
Summary
github.run_attemptStack and scope
mainVerification
46 passed1,398 passed, 1 skipped, 16 subtests passed8,346 statements / 3,214 branches, 100%100%actionlint -shellcheck=andgit diff --check: PASS