Skip to content

fix(opencode): use neutral admission rejection guidance - #2002

Open
decode2 wants to merge 1 commit into
Gentleman-Programming:mainfrom
decode2:fix/opencode-admission-guidance
Open

fix(opencode): use neutral admission rejection guidance#2002
decode2 wants to merge 1 commit into
Gentleman-Programming:mainfrom
decode2:fix/opencode-admission-guidance

Conversation

@decode2

@decode2 decode2 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked Issue

Closes #2000


🏷️ PR Type

  • type:bug — Bug fix (non-breaking change that fixes an issue)
  • type:feature — New feature (non-breaking change that adds functionality)
  • type:docs — Documentation only
  • type:refactor — Code refactoring (no functional changes)
  • type:chore — Build, CI, or tooling changes
  • type:breaking-change — Breaking change (fix or feature that changes existing behavior)

📝 Summary

  • Remove severe-finding-specific guidance from generic reviewer admission rejection errors.
  • Preserve the typed decision, opaque native diagnostic boundary, relaunch instruction, and rejected payload recovery.
  • Cover incomplete inspection with zero findings through the embedded OpenCode plugin harness.

📂 Changes

File / Area What Changed
internal/assets/opencode/plugins/review-result-artifacts.ts Uses neutral recovery guidance for all typed admission rejections.
internal/assets/review_plugin_recovery_test.go Covers out_of_scope and incomplete with zero findings while asserting diagnostic opacity and payload preservation.

🧪 Test Plan

Unit Tests

go test ./internal/assets -count=1
go test ./... -count=1

Go Format

go run ./internal/gofmtcheck

E2E Tests (Docker required)

cd e2e && ./docker-test.sh
  • Unit tests pass (go test ./...)
  • Go format passes (go run ./internal/gofmtcheck)
  • E2E tests pass (cd e2e && ./docker-test.sh)
  • Manually tested locally

E2E was not run locally because Docker is unavailable (docker: command not found). GitHub CI remains authoritative for the Docker run.


🤖 Automated Checks

Check Status Description
Check PR Cognitive Load 62 changed lines, below the 400-line budget
Check Issue Reference Closes approved issue #2000
Check Issue Has status:approved Issue #2000 is approved
Check PR Has type:* Label Pending maintainer label application
Unit Tests go test ./...
Go Format go run ./internal/gofmtcheck
E2E Tests cd e2e && ./docker-test.sh

✅ Contributor Checklist

  • PR is linked to an issue with status:approved
  • PR stays within 400 changed lines
  • I have added the appropriate type:* label to this PR
  • Unit tests pass (go test ./...)
  • Go format passes (go run ./internal/gofmtcheck)
  • E2E tests pass (cd e2e && ./docker-test.sh)
  • Documentation is not required for this diagnostic-only behavior correction
  • My commits follow Conventional Commits format
  • My commits do not include Co-Authored-By trailers

💬 Notes for Reviewers

The admission decision intentionally remains the only native detail surfaced through the opaque binding. This change removes an unsupported causal inference without exposing native diagnostic prose or altering capture, preservation, or retry semantics.

Receipt-driven development was disabled by maintainer decision after the existing local lineage became unrecoverable due to an artifact-subject schema mismatch. Delivery proceeds under ordinary repository policy; no review receipt is claimed.

Summary by CodeRabbit

  • Bug Fixes
    • Simplified reviewer recovery guidance when a review result is rejected.
    • Improved handling of out-of-scope and incomplete review decisions.
    • Prevented internal diagnostic details and irrelevant guidance from appearing in recovery messages.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 37b87aea-ab5c-419d-8608-86df912b3f64

📥 Commits

Reviewing files that changed from the base of the PR and between dea2f94 and 57fc768.

📒 Files selected for processing (2)
  • internal/assets/opencode/plugins/review-result-artifacts.ts
  • internal/assets/review_plugin_recovery_test.go

📝 Walkthrough

Walkthrough

The admission-rejection recovery message is shortened to remove unconditional severe-finding guidance. Regression coverage now tests both out_of_scope and incomplete decisions, including diagnostic suppression and relaunch instructions.

Changes

Admission rejection recovery

Layer / File(s) Summary
Neutral admission guidance
internal/assets/opencode/plugins/review-result-artifacts.ts
The admission-rejection error message no longer appends severe-finding anchoring guidance.
Admission rejection regression coverage
internal/assets/review_plugin_recovery_test.go
Table-driven tests cover out_of_scope and zero-finding incomplete decisions, preserving typed classes and payload markers while suppressing native diagnostics and same-binding retry guidance.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels: type:bug

Suggested reviewers: alan-thegentleman

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: neutralizing OpenCode admission rejection guidance.
Linked Issues check ✅ Passed The changes match #2000 by making admission guidance neutral, preserving typed decisions, and adding incomplete-case regression coverage.
Out of Scope Changes check ✅ Passed The PR stays focused on the admission-rejection message and its regression test, with no obvious unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@decode2 decode2 added the type:bug Bug fix label Jul 30, 2026

@dnlrsls dnlrsls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recovery guidance is now neutral across typed admission rejections while preserving the decision class, opaque diagnostics, relaunch instruction, and recovery payload. The regression coverage includes the zero-finding incomplete case.

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

Labels

type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(opencode): use neutral admission rejection guidance

2 participants