Repository navigation
fix(opencode-review): accept int-typed run_id/run_attempt in control JSON - #1246
seonghobae wants to merge 9 commits into
Conversation
…JSON A model may copy the sentinel line's bare digits (`run_id=32601740155`, shown unquoted in the HTML-comment sentinel it is told to copy from) into the control JSON without adding quotes, producing a JSON number instead of the documented string. `current_run_control_candidate()` and `valid_control()` both compared this untrusted field with a bare `==` against the trusted `str` expected value, so an int-typed but otherwise correct run_id/run_attempt was always rejected — surfacing as "CONTROL_REJECTED: no top-level current-run control JSON object was found" / NO_CONCLUSION even when the model's answer was for the right run (observed on .github#1238/#624, including the default, non-retired nvidia-nim candidate). `numeric_identity_field()` widens acceptance to int (and its exact decimal string) without weakening the check: an int only ever stringifies to its own digit string, so no two distinct run identities can collide, and no candidate that would have failed the strict string comparison can newly pass. Only run_id/run_attempt are touched — head_sha stays a pure string comparison since it is not a decimal value.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 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 |
# Conflicts: # CHANGELOG.md
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
f88499b708a90edb6a538aeb2c397e14304681ad. - 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/32642837908/job/97202469082)
- Strix Security Scan/strix: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/32642837908/job/97202469082)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: CHANGELOG.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: CHANGELOG.md"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: opencode-llm-review-publication.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: opencode-llm-review-publication.md"]
R2 --> V2["docs review"]
Evidence --> S3["CI script: opencode_review_normalize_output.py"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script: opencode_review_normalize_output.py"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_opencode_review_normalize_output.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_opencode_review_normalize_output.py"]
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["Changed file: CHANGELOG.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: CHANGELOG.md"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: opencode-llm-review-publication.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: opencode-llm-review-publication.md"]
R2 --> V2["docs review"]
Evidence --> S3["CI script: opencode_review_normalize_output.py"]
S3 --> I3["review and security gate shell path"]
I3 --> R3["Review risk: CI script: opencode_review_normalize_output.py"]
R3 --> V3["bash -n plus Strix self-test"]
Evidence --> S4["Test: test_opencode_review_normalize_output.py"]
S4 --> I4["regression suite"]
I4 --> R4["Review risk: Test: test_opencode_review_normalize_output.py"]
R4 --> V4["targeted test run"]
|
|
|
…iew-numeric-identity-coercion # Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
Stale base resolved — merged current
|
|
2026-09-20 protected-base admission correction for GitHub reports this Ready PR mechanically non-mergeable. Exact comparison with protected Moving the PR to Draft / Proposed preserves every commit, review, thread, and valid delta. This is not closure or abandonment. Reconcile protected main through an ordinary non-force merge, repair valid findings, run terminal exact-head protection, and obtain qualifying independent current-head approval before returning to Ready. No review dismissal, synthetic status, manual rerun, bypass, Force Push, merge, or Close is authorized. |
Problem
OpenCode's trusted sentinel renders
run_idandrun_attemptas bare digits. A model can therefore emit those exact identities as JSON numbers even though the control-schema example shows strings.The normalizer accepted that equivalent representation for current-run matching, but republished the model's raw numeric type.
opencode_review_approve_gate.shindependently requires both fields to be non-empty strings, so the normalized control still ended asNO_CONCLUSION.Repair
head_sha, result, evidence, finding, language, and publication gatesExact-head verification
f88499b708a90edb6a538aeb2c397e14304681ad885f2cd251999f21cf562cab3e2d9cc3cc3ec737run_id must be a non-empty string, then accepted the canonicalized publication1,397 passed, 1 skipped, 16 subtests passed100%(8,354statements /3,220branches)100%PASSThe isolated local suite used the
pipdevelopment dependency already owned by #1231; this PR does not duplicate that configuration change.This does not convert an incorrect identity, boolean, float, object, list, or mismatched current-run claim into valid review evidence.