Skip to content

fix: policy-gate reviewer verification_missing by evidence policy + fix OOS review matrix evaluator#330

Merged
JRedeker merged 5 commits into
trunkfrom
change/fixReviewerEvidence
Jul 25, 2026
Merged

fix: policy-gate reviewer verification_missing by evidence policy + fix OOS review matrix evaluator#330
JRedeker merged 5 commits into
trunkfrom
change/fixReviewerEvidence

Conversation

@JRedeker

Copy link
Copy Markdown
Contributor

What

Two fixes in one PR (the second was needed to ship the first):

1. Policy-gate verification_missing emitter (subagent-report.ts)

The verificationWarnings() function unconditionally emitted verification_missing for every adv-reviewer report, regardless of the task's evidence policy. For review-policy tasks, the reviewer IS the authority — the warning was a false positive that blocked gate readiness and forced operators to cancel+re-add tasks as type:ops.

Fix: resolve the task's evidence policy via resolveTaskEvidence(task) and suppress verification_missing when policy is review. For test/static_check, current behavior is preserved (durable adv_run_test evidence still required).

2. Fix OOS review matrix evaluator (gate-readiness.ts)

The acceptance gate readiness evaluator flagged review matrix rows for out_of_scope contract items as unknown. The unknown filter checked against expectedIds (required items only) instead of allContractIds (all contract items). This blocked every change with OOS contract items from completing acceptance — a recurring bug observed across multiple changes and agents.

Fix: check unknown rows against allContractIds rather than expectedIds.

Spec law

New requirement rq-reviewerEvidenceAuthority01 (4 scenarios) codifies the authority partition in advance-workflow:

  • review policy → reviewer report IS authoritative; emitter suppresses verification_missing
  • test/static_check → durable adv_run_test evidence required; reviewer insufficient

Verification

  • 42 asset tests pass (spec requirement presence + structure)
  • 66 subagent-report tests pass (TDD red→green: review suppresses, test preserves)
  • 103 gate-readiness tests pass (AC1 no-block, AC2 block-remains, AC3 warn-first, AC4 change-scoped rejected)
  • Full pnpm run check clean (schemas, typecheck, manifests, test-isolation, lockfile, lint, format)

Files

  • .adv/specs/advance-workflow/spec.jsonrq-reviewerEvidenceAuthority01 (4 scenarios)
  • plugin/src/tools/subagent-report.ts — policy-gate emitter (3 lines)
  • plugin/src/tools/subagent-report.test.ts — TDD red→green tests
  • plugin/src/temporal/gate-readiness.test.ts — regression tests (AC1-AC4)
  • plugin/src/temporal/gate-readiness.ts — OOS evaluator fix (2 lines)
  • plugin/src/adv-autonomy-quality-assets.test.ts — spec presence assertions

Context

Investigation refuted the original hypothesis ("only review:acceptance scope accepted"). Source confirmed task-scoped adv-reviewer reports link correctly — the friction was the unconditional verification_missing consumer_warning blocking gate readiness. Full RCA in the proposal artifact.

JRedeker added 5 commits July 25, 2026 18:00
Change: fixReviewerEvidence
Task: tk-f0b4525a6dd8
Mode: complete
Verification: Spec rq-reviewerEvidenceAuthority01 added (4 scenarios, AC1/AC2/AC5 warrants + ownership scenario). Asset test extended. TDD red→green→verify: tr_ms0u6cch (RED 7 fail), tr_ms0u6shx (GREEN 42 pass), tr_ms0u8b5f (full check clean). Engineer report submitted with durable run IDs, 0 verification warnings.
Change: fixReviewerEvidence
Task: tk-feabc293e2b7
Mode: complete
Verification: Policy-gate emitter fix: resolveTaskEvidence(task).policy check in verificationWarnings() adv-reviewer branch. Review-policy → return [] (no verification_missing). Test/static_check → current behavior preserved. TDD: tr_ms0uizpf (RED 1 fail), tr_ms0ujmvp (GREEN 66/66), tr_ms0ukubc (full check clean). Engineer report submitted with durable run IDs, 0 verification warnings.
Change: fixReviewerEvidence
Task: tk-0c23472dfede
Mode: complete
Verification: Regression tests added: AC1 (review-policy no block), AC2 (test-policy block remains), AC3 (warn-first non-blocking), AC4 (change-scoped rejected). 103 gate-readiness tests pass (tr_ms0v2cg0). Full pnpm run check clean (tr_ms0v3ky5). Engineer report with durable run IDs, 0 verification warnings.
…contract IDs

The acceptance gate readiness evaluator incorrectly flagged review matrix
rows for out_of_scope contract items as 'unknown'. The filter checked
against expectedIds (verificationRequired: true items only) instead of
all contract item IDs, causing OOS rows to be rejected despite the items
existing in the contract.

This blocked every change with OOS contract items from completing
acceptance (recurring bug observed across fixReviewerEvidence,
fixOpsResolutionProjection, and likely others).

Fix: check unknown rows against allContractIds (all contract items)
rather than expectedIds (required items only). OOS items remain excluded
from required coverage (missing check unchanged).

Refs: bl-Do-akUeH
@JRedeker
JRedeker merged commit aeb2495 into trunk Jul 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant