Skip to content

feat(review): validate shadow recorded judgment source selections - #1387

Merged
EffortlessSteven merged 5 commits into
mainfrom
shadow/1013-recorded-judgment-validation
Oct 31, 2026
Merged

EffortlessSteven merged 5 commits into
mainfrom
shadow/1013-recorded-judgment-validation

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Adds #1013's minimum shadow-only recorded judgment source-object validator for the later #1335 export consumer. Base 777d86a; head 8cf90cd; tree 9044d922e93a1e8cf18fc778b1e12e2f9ed72942.

The real value entrypoint validates a separately pinned recorded final answer against full RevisionIdentity, repository/spec/pass/attempt, the existing active ClaimGraph, claim-bound byte-verified evidence, and a recomputed source manifest. Imported CI stays opaque and byte-identical. Absent/invalid lead is explicit; no committee or Markdown-derived verdict. Unknown fields, CI/policy/delivery/dispatch fields, stale/forged identities, duplicate references and cross-claim evidence are rejected. Clean requires the upstream recorded completeness flag, no graph gaps or unresolved claims, and no selections. Findings remain separate from scope completeness.

This is a bounded v1 subset under the canonical #1013 owner, not a parallel semantic engine. Source admission, evidence authenticity, completeness and final-lead qualification remain upstream obligations; pins must be independently retained, never copied from the answer. Anchors/suggestions/prose are unsupported and rejected in this version. The current binary/compiler remains authoritative. No CLI, model call, credentials, proof executor, network/provider path, posting, scheduler, CI writer, release or activation is introduced. #1349 remains UNADOPTED; all #1013/#1014/#1277 live prerequisites remain intact. Neither #1013's full final-lead call nor #1335 export is complete.

Ownership: read #1013/#1014/#1335/#1338/#1349, #945/#1216 and merged decision packet; live 29-PR inventory and changed-file lists found no competing judgment implementation. Existing transport #1317/#1370, bytes #1343/#1379, adapter #1344, admission #1347 and README #1354 are untouched; main.rs adds only one module declaration.

Validation: all seven local baseline checks pass at this exact head (1,260 top-level test passes; zero failures; one intentional ignored driver). Four focused real-entrypoint tests pass. The compiled claim-edge mutant fails the cross-claim oracle; restored source passes the full suite. Policy inventory/TOML sweep/diff checks also pass. Staged precommit on the identical tree passes, while cargo-allow/RIPR/unsafe-review/ast-grep remain explicitly missing. Hosted exact-head independent baseline38143923408 passed. The required product gate38143923336/job114483218782 is terminal FAIL: RIPR124 new unsuppressed / maximum0; artifact contract passed. Shadow task-projection reports37 issues, currently unattributed; the assigned artifact reader is classifying them once. Independent source review is still exercising controls. Local/source-test correctness and strict required-gate qualification remain separate: qualification is blocked. Await concrete review and artifact findings; no source rewrites, reruns or suppression changes. Exact-head raw receipt hashes and command details are in the PR conversation.

Policy receipt: policy/allow.toml#recorded-judgment-shadow-1013 narrowly owns temporary dead_code for the unconnected pure module. No thresholds, suppressions for analyzers, tool pins, workflows or Required policy changed. CI budget: default existing lanes only.

Handoff to #1335: consume this recorded validation entrypoint first; retain immutable source/answer identities and source graph scope/gaps. Add the separate immutable public-plan and append-only delivery-observation view after their canonical owner contracts exist; missing/invalid lead stays unavailable/limited, missing delivery remains remotely unknown, and confirmed history/currentness are separate. A later real export command and all full producer/public authority acceptance remain pending. Draft only; parent owns independent exact-head review. No Ready or merge.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 3fd3802c-f1dd-45fb-9b3f-e88f4b622486
Commits

Reviewing files that changed from the base of the PR and between 4bf14df and 2b13282.

Files selected for processing: 1
  • .ripr/suppressions.toml

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 6e7353dd-2e97-4ecf-a1f2-7b4d1db3c545
Commits

Reviewing files that changed from the base of the PR and between 8cf90cd and 4bf14df.

Files selected for processing: 2
  • .ripr/suppressions.toml
  • src/main.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Summary by CodeRabbit

  • New Features
    • Added validation for recorded review results, checking that they match the relevant source, revision, evidence, and imported CI data.
  • Bug Fixes
    • Inconsistent or malformed review results are rejected, including when source or CI data does not match.
    • Clean results are accepted only when the review is complete and no unresolved claims or evidence gaps remain.

Walkthrough

The change adds a crate-private recorded-judgment model and validator. The validator checks judgments against pinned review inputs, including the source manifest, revision, claim graph, evidence bytes, and imported CI bytes. Tests cover accepted, absent, and invalid judgments.

Changes

Recorded Judgment Validation

Layer / File(s) Summary
Judgment and source contracts
src/review_judgment.rs
Adds judgment, subject, selection, and source-input structures, plus recorded validation outcomes and source-manifest hashing.
Pinned-input validation and coverage
src/review_judgment.rs, src/main.rs, src/review_judgment/tests.rs, .ripr/suppressions.toml
Adds validation against pinned source and answer data, declares the private module, tests valid and rejected cases, and records exposure-gap suppressions.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: Moderate · previous review 4bf14

The reported analysis still has 124 unresolved issues, so this validation change is not ready to qualify or merge.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 8cf90

The new contract remains shadow-only and has no production consumers. Its validator checks pinned identities and bytes without changing runtime decisions, granting authority or performing privileged operations. No material security risk introduced by this PR was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — Caller tracing found only test consumers of the new entrypoints. The current change does not connect recorded answers to posting, CI decisions, policy enforcement or privileged sinks.

Trust Boundaries and Controls

  • observed — Recorded-answer bytes cannot supply their own authority within the validator: acceptance requires separately supplied answer and source pins, matching subject and revision, byte-verified evidence, and evidence bound to each selected claim. Duplicate selections and references, rejected claims and unsupported-assertion edges are rejected.
  • observed — Independent pin retention, source admission, evidence qualification and completeness remain caller obligations. Validated denotes shadow consistency, not semantic adjudication or final public authority; the future consumer is outside the inspected implementation.
Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description is detailed and directly covers the change scope, policy receipt, verification results, CI budget, limitations, ownership, and unresolved required-gate failure. It does not reproduce e…
Title check Passed The title clearly identifies the primary change: adding validation for shadow recorded judgment source selections.
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and directly covers the change scope, policy receipt, verification results, CI budget, limitations, ownership, and unresolved required-gate failure. It does not reproduce every template heading or checkbox, but it provides the required information and is mostly complete.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks each claim in the moonlit glow.
Pinned bytes and evidence line up in a row.
Clean or findings, the rules make them clear.
Invalid answers do not pass here.
Then the rabbit hops home, ears held high.

Copy link
Copy Markdown
Member Author

Exact-head local receipt — 2026-10-11 UTC

Base/main: 777d86a.
Published/local head: 8cf90cd.
Tree: 9044d922e93a1e8cf18fc778b1e12e2f9ed72942.
Remote main/head rechecked unchanged; author checkout clean. Rust 1.95.0 (59807616e).

PASS: cargo fmt --all -- --check; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test --workspace --all-targets --locked; cargo doc --workspace --no-deps --locked; cargo run --locked --package xtask -- policy-check; Python artifact-verifier --self-test. Workspace tests: 1,260 top-level passes, zero failures, one intentional ignored subprocess driver (the nested driver also passes). All four new real-entrypoint controls pass after restoration.

Also PASS: policy-inventory, 11-file policy/root/.cargo TOML parse sweep, diff hygiene. Existing overdue policy warnings are retained; no unrelated receipt changes.

Runtime calibration: changed only edge.reference == *reference to true. Mutant compiled; stale_forged_cross_claim_and_authority_fields_are_rejected failed with exit 101 because unrelated evidence was incorrectly Validated. Pristine source restored byte-for-byte; full workspace tests then passed on the exact published tree. This establishes discrimination for that binding check only.

Staged cargo xtask precommit --staged passed in an isolated base checkout with this PR patch staged; git write-tree equals 9044d922e93a1e8cf18fc778b1e12e2f9ed72942. fmt/check/diff Clippy passed. cargo-allow, ripr, unsafe-review and ast-grep were explicitly MISSING; actionlint skipped because there is no workflow change. Exit 0 does not establish those missing tools' proof.

Raw local receipts retained at /workspace/scratch/1013/:

  • test.log SHA256 ee5d175e31b164ffccd8f9d54d453caecbdc7bb1dbc9485b6d551b0552aa6a85
  • clippy.log SHA256 8b9159ae4bbf881e71a6bc47da836363502353fe23b5b5d6c4b2634ce6920d97
  • mutant-cross-claim.log SHA256 00be9cacb67e5497d1b858fc0503d02dab874454df2401a6b44fb99c05bc0941
  • precommit.log SHA256 33655f7c6b4452194a93a8f60321eb80341b12389345c7c367ea2093b0e6d825
  • precommit-receipts/ retains raw missing-tool and staged-diff receipts.

Hosted gate https://github.com/EffortlessMetrics/ub-review/actions/runs/38143923336 remains in progress at this observation; no hosted clearance or independent source-review clearance claimed. Parent owns independent exact-head review. Draft/unmerged; no Ready, dispatch, merge, release or activation.

Bounded claim: pure recorded source-object selection validity and CI byte invariance, not upstream admission authenticity/completeness, full #1013 lead call, #1014 authority migration, #1277 qualification, or #1335 export completion. #1349 is still UNADOPTED.

Copy link
Copy Markdown
Member Author

Terminal hosted status supersedes the earlier in-progress checkpoint. Exact head 8cf90cd, tree 9044d922e93a1e8cf18fc778b1e12e2f9ed72942.

Hosted exact-head independent baseline38143923408 passed. The required product gate38143923336/job114483218782 is terminal FAIL: RIPR124 new unsuppressed / maximum0; artifact contract passed. Shadow task-projection reports37 issues, currently unattributed; the assigned artifact reader is classifying them once. Independent source review is still exercising controls. Local/source-test correctness and strict required-gate qualification remain separate: qualification is blocked. Await concrete review and artifact findings; no source rewrites, reruns or suppression changes.

Draft, unmerged and not cleared. No Ready, merge, activation or private artifact links. Earlier local/mutant receipts remain bounded evidence for their exercised controls; they do not waive the failed required gate.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent exact-head source review of the complete five-file diff at 8cf90cd found no blocking defect within the bounded shadow-only consistency contract. No production consumer, CLI, provider call, dispatch, delivery or CI writer is introduced; canonical-owner preparation does not adopt #1349 or complete #1013/#1335.

Independent executable controls exercised revision/graph/manifest/pass/evidence mismatches; duplicate and conflicting source IDs; duplicate selections/references; cross-claim, Refuted/Dropped and UnsupportedAssertion selections; unknown authority fields in 44 placements; duplicate JSON keys, malformed/trailing JSON, invalid UTF-8 and excessive nesting; absent versus invalid lead; clean with incomplete scope, unresolved states or evidence gaps; independently recomputed manifest digests and CI byte/digest invariance. Four independent control groups passed. A compiled UnsupportedAssertion-guard removal mutant failed as expected with exit 101, and restored controls passed. Pristine four entrypoint tests, fmt, workspace/all-target check and policy-check also passed independently.

Important limit: self-consistent resealed producer inputs can validate. This proves consistency, not admission authenticity or qualified evidence; caller-owned pins, provenance and completeness remain prerequisites. Explicit allocation/cardinality limits are absent. Full canonical lead qualification, public plan/export and activation remain separate.

Hosted product gate 38143923336 failed at 124 findings/max0 while the baseline and artifact contract passed. That remains a merge blocker. The source verdict neither clears the required gate nor treats its count as 124 independently demonstrated defects. No private artifact is shared in this review.

Steven Zimmerman and others added 4 commits October 31, 2026 14:00
@EffortlessSteven
EffortlessSteven force-pushed the shadow/1013-recorded-judgment-validation branch from 04ce5e8 to 4bf14df Compare October 31, 2026 18:00
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