Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
30b2d78
test(opencode): add empirical reviewer baseline
seonghobae Aug 8, 2026
1b1b391
test(opencode): specify empirical quality scorer contracts
seonghobae Aug 8, 2026
9354156
ci(opencode): add empirical review quality gate
seonghobae Aug 8, 2026
209a730
feat(opencode): score empirical review quality
seonghobae Aug 8, 2026
e1aa8d0
test(opencode): cover empirical review scorer
seonghobae Aug 8, 2026
0d8054f
fix(opencode): bind quality scorer input explicitly
seonghobae Aug 8, 2026
f3124e0
docs(opencode): doctor empirical review quality program
seonghobae Aug 8, 2026
48ddca4
docs(opencode): specify commercial review quality design
seonghobae Aug 8, 2026
d1f441b
docs(opencode): plan measured review quality rollout
seonghobae Aug 8, 2026
b4a47c3
docs(opencode): record empirical review quality gate
seonghobae Aug 8, 2026
cc9183f
test(opencode): fail on incomparable review evidence
seonghobae Aug 8, 2026
86edc28
ci(opencode): execute evidence-integrity regressions
seonghobae Aug 8, 2026
c6484a9
fix(opencode): bind quality evidence to exact heads
seonghobae Aug 8, 2026
30c9529
test(opencode): harden exact-head quality evidence
seonghobae Aug 8, 2026
7373198
test(opencode): bind review-quality fixtures to exact heads
seonghobae Aug 8, 2026
a62c72c
fix(opencode): enforce exact review-evidence schema
seonghobae Aug 8, 2026
0e15c56
test(opencode): align missing-reviewer fail-closed contract
seonghobae Aug 8, 2026
523e883
test(opencode): cover sparse lifecycle reviewer evidence
seonghobae Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/opencode-review-quality-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: OpenCode Review Quality CI

on:
pull_request:
branches: [main]
paths:
- ".github/workflows/opencode-review-quality-ci.yml"
- "benchmarks/opencode_review/**"
- "scripts/ci/opencode_review_quality_score.py"
- "tests/test_opencode_review_quality_score.py"
- "tests/test_opencode_review_quality_evidence_contract.py"
- "docs/doctoring/opencode-review-quality-evaluation.md"
- "docs/superpowers/specs/2026-08-08-opencode-review-quality.md"
- "docs/superpowers/plans/2026-08-08-opencode-review-quality.md"
- "CHANGELOG.md"

permissions:
contents: read

concurrency:
group: opencode-review-quality-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
empirical-review-quality:
name: empirical-review-quality
if: github.event_name != 'pull_request' || github.event.action != 'closed'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout exact source revision
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"

- name: Install exact hash-verified test runner dependencies
env:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_INPUT: "1"
shell: bash --noprofile --norc -e -o pipefail {0}
run: |
cat >"${RUNNER_TEMP}/opencode-review-quality-requirements.txt" <<'EOF'
coverage==7.15.2 --hash=sha256:b9a6367e4aff723e8ee8190836836124284e8fcd4265e307c844010cfa074f3f
iniconfig==2.1.0 --hash=sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760
packaging==26.2 --hash=sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e
pluggy==1.6.0 --hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746
pygments==2.20.0 --hash=sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176
pytest==9.1.1 --hash=sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c
EOF
python -m pip install \
--only-binary=:all: \
--require-hashes \
-r "${RUNNER_TEMP}/opencode-review-quality-requirements.txt"

- name: Verify empirical review quality contracts
shell: bash --noprofile --norc -e -o pipefail {0}
run: |
test "$(git rev-parse HEAD)" = "${{ github.event.pull_request.head.sha || github.sha }}"
python -m coverage run \
--branch \
--source=scripts/ci \
-m pytest \
tests/test_opencode_review_quality_score.py \
tests/test_opencode_review_quality_evidence_contract.py \
-q
python -m coverage report \
--include='scripts/ci/opencode_review_quality_score.py' \
--fail-under=100 \
--show-missing
python scripts/ci/opencode_review_quality_score.py \
--input benchmarks/opencode_review/pilot_baseline_v1.json \
--json-output "${RUNNER_TEMP}/opencode-review-quality.json" \
--markdown-output "${RUNNER_TEMP}/opencode-review-quality.md"
python -m json.tool "${RUNNER_TEMP}/opencode-review-quality.json" >/dev/null
python -m json.tool benchmarks/opencode_review/pilot_baseline_v1.json >/dev/null
grep -Fq 'Parity gate: **INSUFFICIENT_EVIDENCE**' \
"${RUNNER_TEMP}/opencode-review-quality.md"
cat "${RUNNER_TEMP}/opencode-review-quality.md" >>"$GITHUB_STEP_SUMMARY"
python -m compileall -q \
scripts/ci/opencode_review_quality_score.py \
tests/test_opencode_review_quality_score.py \
tests/test_opencode_review_quality_evidence_contract.py
git diff --exit-code
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Semantic Versioning where the repository publishes a release.

### Added

- Added an empirical OpenCode review-quality benchmark, fail-closed scorer, exact-head quality workflow, and APA 7th doctoring that keep lifecycle-yield evidence separate from head-matched expert-gold precision and recall, require Wilson-bound non-inferiority before any CodeRabbit-parity claim, and preserve 100% production statement/branch/docstring evidence.
- Added a trusted pull-request comment router for `@cwl-noema-review` and review-only `@opencode-agent` dispatches, with an organization sweep, exact-head receipts, repository allowlisting, fixed runners, immutable checkout pins, and a permanent 100% statement/branch/docstring quality gate.
- Added exact-base `uv.lock` materialization that reconstructs standalone nested projects with a checksum-pinned official `uv` exporter, isolated frozen/offline execution, strict exact-pin and SHA-256 output validation, and complete Python 3.10/3.14 quality evidence.

Expand Down
186 changes: 186 additions & 0 deletions benchmarks/opencode_review/pilot_baseline_v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"schema_version": "1.0",
"benchmark_id": "cwl-opencode-lifecycle-pilot-2026-08-08",
"evaluation_mode": "historical_lifecycle",
"limitations": [
"The three pull requests were deliberately selected because both OpenCode and CodeRabbit evidence was observable; this is not a random organization-wide sample.",
"Reviewer outputs were produced on different lifecycle heads, so actionable yield is an operational contrast rather than a head-matched precision or recall comparison.",
"Actionable means that the reviewer emitted a concrete source-oriented finding; this pilot does not label each finding as an expert-verified true positive.",
"CodeRabbit rate-limited evidence is counted only when a GitHub record was directly observed, so availability may be overestimated.",
"No parity claim is permitted until a stratified head-matched expert-gold benchmark satisfies the configured sample-size floor."
],
"parity_policy": {
"candidate_reviewer": "opencode",
"reference_reviewer": "coderabbit",
"minimum_head_matched_cases": 50,
"minimum_gold_findings": 50,
"non_inferiority_margin": 0.05,
"required_critical_high_recall": 1.0
},
"cases": [
{
"case_id": "disksage-pr-140",
"repository": "ContextualWisdomLab/disksage",
"pull_request_number": 140,
"head_match": false,
"diff_size_bucket": "small",
"primary_language": "rust",
"gold_findings": [],
"reviewers": {
"opencode": {
"triggered_attempts": 4,
"completed_attempts": 4,
"rate_limited_attempts": 0,
"infrastructure_only_reviews": 4,
"duplicate_reviews": 3,
"findings": []
},
"coderabbit": {
"triggered_attempts": 2,
"completed_attempts": 1,
"rate_limited_attempts": 1,
"infrastructure_only_reviews": 0,
"duplicate_reviews": 0,
"findings": [
{
"finding_id": "coderabbit-disk-140-publish-boundary",
"gold_finding_id": null,
"severity": "medium",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
}
]
}
}
},
{
"case_id": "egressweave-pr-62",
"repository": "ContextualWisdomLab/EgressWeave",
"pull_request_number": 62,
"head_match": false,
"diff_size_bucket": "medium",
"primary_language": "python",
"gold_findings": [],
"reviewers": {
"opencode": {
"triggered_attempts": 2,
"completed_attempts": 2,
"rate_limited_attempts": 0,
"infrastructure_only_reviews": 2,
"duplicate_reviews": 1,
"findings": []
},
"coderabbit": {
"triggered_attempts": 1,
"completed_attempts": 1,
"rate_limited_attempts": 0,
"infrastructure_only_reviews": 0,
"duplicate_reviews": 0,
"findings": [
{
"finding_id": "coderabbit-egress-62-intermediate-symlink",
"gold_finding_id": null,
"severity": "high",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
},
{
"finding_id": "coderabbit-egress-62-positive-regression",
"gold_finding_id": null,
"severity": "medium",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
}
]
}
}
},
{
"case_id": "inkspan-pr-65",
"repository": "ContextualWisdomLab/inkspan",
"pull_request_number": 65,
"head_match": false,
"diff_size_bucket": "large",
"primary_language": "typescript",
"gold_findings": [],
"reviewers": {
"opencode": {
"triggered_attempts": 2,
"completed_attempts": 2,
"rate_limited_attempts": 0,
"infrastructure_only_reviews": 2,
"duplicate_reviews": 1,
"findings": []
},
"coderabbit": {
"triggered_attempts": 1,
"completed_attempts": 1,
"rate_limited_attempts": 0,
"infrastructure_only_reviews": 0,
"duplicate_reviews": 0,
"findings": [
{
"finding_id": "coderabbit-inkspan-65-doctoring-dates",
"gold_finding_id": null,
"severity": "low",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
},
{
"finding_id": "coderabbit-inkspan-65-security-doc-sync",
"gold_finding_id": null,
"severity": "medium",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
},
{
"finding_id": "coderabbit-inkspan-65-memory-claim",
"gold_finding_id": null,
"severity": "medium",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
},
{
"finding_id": "coderabbit-inkspan-65-plan-count",
"gold_finding_id": null,
"severity": "low",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
},
{
"finding_id": "coderabbit-inkspan-65-word-fixture-budget",
"gold_finding_id": null,
"severity": "high",
"actionable": true,
"source_backed": true,
"line_anchored": true,
"has_fix_direction": true,
"has_regression_test_direction": true
}
]
}
}
}
]
}
Loading
Loading