Skip to content

Validate review claims against saved assignment scope (T36) - #188

Merged
erickb336 merged 1 commit into
mainfrom
codex/t36-review-claims
Oct 13, 2026
Merged

erickb336 merged 1 commit into
mainfrom
codex/t36-review-claims

Conversation

@erickb336

@erickb336 erickb336 commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Closes #187
Sage task T36

Review reports now have a shared validator that checks their claims against the saved branch, commit, round and cycle. A clean review or QA pass cannot contain a medium or high finding. Invalid shapes, unanswered questions, mismatched targets and contradictory results refuse with fixed errors.

The helper returns decoded claims only. It does not write state, accept verdicts, count cycles, verify current Git or authorize merging. The chief/state-tool caller must still verify the current assignment and records. This is a prerequisite for #88 and #138; installed automatic Sage remains disabled.

Sources: packages/sage-core/review.mjs, exports and admission documentation. Both provider copies come from the build. No state.mjs or Claude-hook changes. Compared with the broader integration, the public helper also checks the structured report shape and bounds its total string data before JSON parsing.

Validation on ecee6f4:

  • npm run build: provider bundles generated.
  • npm run check: all checks pass.
  • node --test --test-name-pattern='review claims' scripts/providers.test.mjs: 3 tests, 3 pass, 0 fail.
  • Detached main e1b590f with only the new tests: 3 tests, 0 pass, 3 fail because parseReviewReport is absent. These failures establish missing support, not behavior of an earlier implementation.
  • Code, security and QA each passed two clean cycles on the unchanged final commit.
  • npm test -- --test-concurrency=1: 1,143 tests, 1,143 pass, 0 fail, 0 skipped.
  • Exact-head CI run 38431096618: check passed; 1,143 tests, 1,143 pass, 0 fail.

Tests cover every review role, clean and failure kinds, low and blocking findings, exact target matching, malformed structures, fixed errors, caller mutation and unchanged admission state. Existing tests are unchanged. Every test uses fake ps, pgrep and kill first on PATH. No report input runs in a shell.

Not verified: native review dispatch, accepted verdicts, current Git/logbook state, real-model behavior, or installed automatic Sage. All local PR tests and their owned workers have finished.

@erickb336
erickb336 marked this pull request as ready for review October 13, 2026 16:41
@erickb336
erickb336 merged commit 8af7caa into main Oct 13, 2026
1 check 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.

Validate review report claims against their saved target (T36)

1 participant