Pre-flight Checklist
Bug Description
A negotiated bounded review exposes provider-owned artifact_subject, exact candidate diff, and changed-path manifest through START/status. The selected OpenCode reviewer correctly returns the strict native model-owned shape {findings,evidence}. The managed review-result-artifacts.ts hook forwards that JSON unchanged to review capture-result, but native admission requires the capture-only envelope to also contain provider-derived top-level subject_hash and inspection. Capture therefore fails with reviewer artifact admission incomplete: reviewer result omitted the provider-owned artifact subject, preserves the raw result, and leaves authority in reviewing with no admitted lens result.
This is a product/integration regression or incomplete acceptance from merged PR #1550, which introduced provider-owned artifact admission and claimed managed OpenCode support. It is distinct from #1610 (authority revision propagation), #1411 (capture incident preservation/recovery), and #1454 (immutable diff/manifest delivery). The reviewer must not emit or construct provider-owned metadata; the adapter owns enrichment.
Steps to Reproduce
- Install/sync a Gentle AI beta containing provider-owned reviewer artifact admission and use OpenCode.
- Start or resume a negotiated review whose native next transition is
collect/reviewer_results_required; verify it provides artifact_subject, candidate_diff, and changed_path_manifest.
- Launch the selected bound reviewer through the managed hook.
- Let the reviewer return valid strict JSON with only
findings and evidence, as required by its agent contract.
- Observe the after-hook extract that JSON and forward it unchanged to
review capture-result.
- Observe capture fail with the admission-incomplete error and preserve the raw reviewer result while authority remains unchanged.
Expected Behavior
The managed adapter should build a capture-only envelope by combining reviewer-owned findings/evidence with provider-owned subject_hash from artifact_subject.subject_hash and inspection: {status: "completed", paths: [...]} derived from the exact ordered changed-path manifest. Models must continue returning only findings/evidence. The same deterministic enrichment path should support replaying a preserved raw result through full native verification without rerunning the lens or opening another review budget.
Actual Behavior
The installed plugin and the current beta managed asset both forward reviewer output unchanged. Preflight/transition context contains the provider-owned subject and manifest, but the after-hook does not retain or merge them into capture stdin. Native capture sees an empty subject hash and rejects admission.
Environment
- Gentle AI Version: beta module
v1.49.1-0.20260722122850-8881b60b01c7, revision 8881b60b01c7 (post-v2.1.11 development build)
- Operating System: Windows
- AI Agent / Client: OpenCode
- Affected Area: Installation Pipeline (managed OpenCode plugin)
Logs / Error Output
gentle-ai review capture-result failed (1): Error: reviewer artifact admission incomplete: reviewer result omitted the provider-owned artifact subject
Additional Context
Verified source-backed causal chain:
internal/cli/review_start_contract.go and internal/cli/review_next_transition.go expose the provider-owned subject/diff/manifest.
internal/cli/review_facade.go decodes capture input with top-level subject_hash, inspection, findings, and evidence.
internal/reviewtransaction/artifact_admission.go rejects a missing subject hash.
internal/assets/opencode/plugins/review-result-artifacts.ts extracts reviewer JSON and forwards it unchanged; the installed managed plugin has the same ownership gap.
Acceptance criteria:
- Reviewer output contract remains strict
{findings,evidence} only.
- Adapter retains provider preflight/transition context for the exact bound slot.
- Adapter constructs capture stdin with provider-derived
subject_hash and ordered completed inspection.paths.
- Models never construct hashes, manifests, inspection metadata, or canonical artifacts.
- Preserved raw results can pass through the same enrichment and native verification path without another reviewer invocation.
- A behavioral managed-hook test mocks preflight/transition context, supplies findings/evidence-only output, asserts exact capture stdin, and covers preserved-result recovery and idempotent replay.
Pre-flight Checklist
status:approved.Bug Description
A negotiated bounded review exposes provider-owned
artifact_subject, exact candidate diff, and changed-path manifest through START/status. The selected OpenCode reviewer correctly returns the strict native model-owned shape{findings,evidence}. The managedreview-result-artifacts.tshook forwards that JSON unchanged toreview capture-result, but native admission requires the capture-only envelope to also contain provider-derived top-levelsubject_hashandinspection. Capture therefore fails withreviewer artifact admission incomplete: reviewer result omitted the provider-owned artifact subject, preserves the raw result, and leaves authority inreviewingwith no admitted lens result.This is a product/integration regression or incomplete acceptance from merged PR #1550, which introduced provider-owned artifact admission and claimed managed OpenCode support. It is distinct from #1610 (authority revision propagation), #1411 (capture incident preservation/recovery), and #1454 (immutable diff/manifest delivery). The reviewer must not emit or construct provider-owned metadata; the adapter owns enrichment.
Steps to Reproduce
collect/reviewer_results_required; verify it providesartifact_subject,candidate_diff, andchanged_path_manifest.findingsandevidence, as required by its agent contract.review capture-result.Expected Behavior
The managed adapter should build a capture-only envelope by combining reviewer-owned
findings/evidencewith provider-ownedsubject_hashfromartifact_subject.subject_hashandinspection: {status: "completed", paths: [...]}derived from the exact ordered changed-path manifest. Models must continue returning onlyfindings/evidence. The same deterministic enrichment path should support replaying a preserved raw result through full native verification without rerunning the lens or opening another review budget.Actual Behavior
The installed plugin and the current beta managed asset both forward reviewer output unchanged. Preflight/transition context contains the provider-owned subject and manifest, but the after-hook does not retain or merge them into capture stdin. Native capture sees an empty subject hash and rejects admission.
Environment
v1.49.1-0.20260722122850-8881b60b01c7, revision8881b60b01c7(post-v2.1.11 development build)Logs / Error Output
Additional Context
Verified source-backed causal chain:
internal/cli/review_start_contract.goandinternal/cli/review_next_transition.goexpose the provider-owned subject/diff/manifest.internal/cli/review_facade.godecodes capture input with top-levelsubject_hash,inspection,findings, andevidence.internal/reviewtransaction/artifact_admission.gorejects a missing subject hash.internal/assets/opencode/plugins/review-result-artifacts.tsextracts reviewer JSON and forwards it unchanged; the installed managed plugin has the same ownership gap.Acceptance criteria:
{findings,evidence}only.subject_hashand ordered completedinspection.paths.