fix: policy-gate reviewer verification_missing by evidence policy + fix OOS review matrix evaluator#330
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two fixes in one PR (the second was needed to ship the first):
1. Policy-gate
verification_missingemitter (subagent-report.ts)The
verificationWarnings()function unconditionally emittedverification_missingfor everyadv-reviewerreport, regardless of the task's evidence policy. Forreview-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 astype:ops.Fix: resolve the task's evidence policy via
resolveTaskEvidence(task)and suppressverification_missingwhen policy isreview. Fortest/static_check, current behavior is preserved (durableadv_run_testevidence still required).2. Fix OOS review matrix evaluator (
gate-readiness.ts)The acceptance gate readiness evaluator flagged review matrix rows for
out_of_scopecontract items asunknown. Theunknownfilter checked againstexpectedIds(required items only) instead ofallContractIds(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
allContractIdsrather thanexpectedIds.Spec law
New requirement
rq-reviewerEvidenceAuthority01(4 scenarios) codifies the authority partition inadvance-workflow:reviewpolicy → reviewer report IS authoritative; emitter suppressesverification_missingtest/static_check→ durableadv_run_testevidence required; reviewer insufficientVerification
pnpm run checkclean (schemas, typecheck, manifests, test-isolation, lockfile, lint, format)Files
.adv/specs/advance-workflow/spec.json—rq-reviewerEvidenceAuthority01(4 scenarios)plugin/src/tools/subagent-report.ts— policy-gate emitter (3 lines)plugin/src/tools/subagent-report.test.ts— TDD red→green testsplugin/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 assertionsContext
Investigation refuted the original hypothesis ("only
review:acceptancescope accepted"). Source confirmed task-scopedadv-reviewerreports link correctly — the friction was the unconditionalverification_missingconsumer_warning blocking gate readiness. Full RCA in the proposal artifact.