[PR #4991] feat(reconstruction)!: require failing verifier controls #6714

Open
opened 2026-11-01 21:42:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4991
Author: @Croesus-K
Created: 10/18/2026
Status: 🔄 Open

Base: main ← Head: fix/reconstruction-verifier-negative-controls


📝 Commits (6)

  • 688d918 feat(reconstruction)!: require failing verifier controls
  • 9472804 refactor(reconstruction): relocate proof authority to domain
  • 50edc2f refactor(reconstruction): relocate control assessment to domain
  • 2129aff fix(reconstruction): authenticate controls at every closure boundary
  • 900154f Merge branch 'main' into fix/reconstruction-verifier-negative-controls
  • 5848ce1 fix(reconstruction): preserve verifier controls in shared fixture

📊 Changes

16 files changed (+1378 additions, -117 deletions)

View changed files

📝 docs/reconstruction-obligation-ledgers.md (+38 -1)
📝 src/application/ReconstructionObligationLedger.authority.test.ts (+3 -3)
📝 src/application/ReconstructionObligationLedger.closure.test.ts (+611 -0)
📝 src/application/ReconstructionObligationLedger.fixture.ts (+102 -48)
📝 src/application/ReconstructionObligationLedgerEvaluation.ts (+9 -55)
📝 src/application/ReconstructionObligationLedgerProjection.ts (+6 -1)
📝 src/application/ReconstructionObligationOriginalCases.ts (+1 -1)
📝 src/contracts/applicationToolContracts.ts (+1 -1)
📝 src/contracts/reconstructionReadinessExample.ts (+66 -3)
📝 src/domain/reconstructionObligationAuthority.ts (+17 -3)
📝 src/domain/reconstructionObligationLedgerIntegrity.ts (+6 -1)
📝 src/domain/reconstructionObligationLedgerSchemas.ts (+17 -0)
➕ src/domain/reconstructionObligationVerifier.ts (+73 -0)
➕ src/domain/reconstructionObligationVerifierControls.ts (+150 -0)
📝 src/domain/reconstructionReadiness.test.ts (+246 -0)
📝 src/domain/reconstructionReadinessIntegrityFindings.ts (+32 -0)

📄 Description

Summary

Refs #4396. Add negative controls to reconstruction verifier bindings so a passing verifier must also demonstrate that it rejects a deliberately wrong candidate before an obligation can close.

Change and scope

  • Record the verifier implementation digest, control candidate, deliberate defect, and result Evidence.
  • Use one shared domain assessment for ledger construction and readiness. Both verify the positive result and control Evidence against the verifier, claim, obligation, candidate, digest, and authority.
  • Count only authenticated behavior mismatches as failed controls. An observed passing control reports vacuous-verifier regardless of its declared status; unknown, unsupported, skipped, missing, or mismatched controls block closure even when another control fails.
  • Reject reused positive candidate identities. Include control Evidence in ledger links and closure identity while preserving historical ledger bytes and digests.

CLI and MCP share the ledger evaluator. Verifier execution stays with the caller.

The proposed closure policy keeps unchallenged obligations implemented and newly built ledgers open. Maintainer confirmation of that policy is still pending.

Validation performed

Synced with main at 01788ba. The conflict resolution keeps the upstream shared ready-ledger fixture and preserves its negative-control proof, positive candidate identity, and existing CLI consumers.

  • 61 focused source tests and 5 README conformance tests passed.
  • npm run test:focused -- tests/boundary/cli/reconstructionObligationLedgerCli.test.ts tests/boundary/mcp/reconstructionObligationLedgerMcp.test.ts — 8 tests passed.
  • npm run check — passed, including compilation, typecheck, lint, formatting, knip, metadata, module boundaries, and architecture guards.
  • npm run docs:check — passed.
  • Published and tested Git trees match exactly.

The false-closure regressions reproduced the reviewed failures before their fixes and remain covered after this sync. Verified on Windows with the pinned Node 24.18.0 and npm 11.16.0. Coverage uses synthetic Evidence; no real-provider run was recorded.

Compatibility

This changes closure semantics. Existing manifests still parse, but rebuilding them requires a digest-bound failing control to restore closure. Readiness reassesses historical verified obligations through the same proof checks without modifying the stored ledger.

Author readiness

Human owner: @Croesus-K

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4991 **Author:** [@Croesus-K](https://github.com/Croesus-K) **Created:** 10/18/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/reconstruction-verifier-negative-controls` --- ### 📝 Commits (6) - [`688d918`](https://github.com/morluto/rea/commit/688d918982c4c1091da554d0c10127a3b85e88c3) feat(reconstruction)!: require failing verifier controls - [`9472804`](https://github.com/morluto/rea/commit/94728045e7537462fa4863749f74c31b3471e44f) refactor(reconstruction): relocate proof authority to domain - [`50edc2f`](https://github.com/morluto/rea/commit/50edc2f04e1e3e4fe4b3665a3188be85b584aa87) refactor(reconstruction): relocate control assessment to domain - [`2129aff`](https://github.com/morluto/rea/commit/2129affed275a784e650ac765d83975e4172b491) fix(reconstruction): authenticate controls at every closure boundary - [`900154f`](https://github.com/morluto/rea/commit/900154fbee16e526f0e3a3c62c4af9ec8bdc4c78) Merge branch 'main' into fix/reconstruction-verifier-negative-controls - [`5848ce1`](https://github.com/morluto/rea/commit/5848ce132c659928a66d9aff96aaf9a0a3dee43f) fix(reconstruction): preserve verifier controls in shared fixture ### 📊 Changes **16 files changed** (+1378 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `docs/reconstruction-obligation-ledgers.md` (+38 -1) 📝 `src/application/ReconstructionObligationLedger.authority.test.ts` (+3 -3) 📝 `src/application/ReconstructionObligationLedger.closure.test.ts` (+611 -0) 📝 `src/application/ReconstructionObligationLedger.fixture.ts` (+102 -48) 📝 `src/application/ReconstructionObligationLedgerEvaluation.ts` (+9 -55) 📝 `src/application/ReconstructionObligationLedgerProjection.ts` (+6 -1) 📝 `src/application/ReconstructionObligationOriginalCases.ts` (+1 -1) 📝 `src/contracts/applicationToolContracts.ts` (+1 -1) 📝 `src/contracts/reconstructionReadinessExample.ts` (+66 -3) 📝 `src/domain/reconstructionObligationAuthority.ts` (+17 -3) 📝 `src/domain/reconstructionObligationLedgerIntegrity.ts` (+6 -1) 📝 `src/domain/reconstructionObligationLedgerSchemas.ts` (+17 -0) ➕ `src/domain/reconstructionObligationVerifier.ts` (+73 -0) ➕ `src/domain/reconstructionObligationVerifierControls.ts` (+150 -0) 📝 `src/domain/reconstructionReadiness.test.ts` (+246 -0) 📝 `src/domain/reconstructionReadinessIntegrityFindings.ts` (+32 -0) </details> ### 📄 Description ## Summary Refs #4396. Add negative controls to reconstruction verifier bindings so a passing verifier must also demonstrate that it rejects a deliberately wrong candidate before an obligation can close. ## Change and scope - Record the verifier implementation digest, control candidate, deliberate defect, and result Evidence. - Use one shared domain assessment for ledger construction and readiness. Both verify the positive result and control Evidence against the verifier, claim, obligation, candidate, digest, and authority. - Count only authenticated behavior mismatches as failed controls. An observed passing control reports `vacuous-verifier` regardless of its declared status; unknown, unsupported, skipped, missing, or mismatched controls block closure even when another control fails. - Reject reused positive candidate identities. Include control Evidence in ledger links and closure identity while preserving historical ledger bytes and digests. CLI and MCP share the ledger evaluator. Verifier execution stays with the caller. The proposed closure policy keeps unchallenged obligations `implemented` and newly built ledgers `open`. Maintainer confirmation of that policy is still pending. ## Validation performed Synced with `main` at `01788ba`. The conflict resolution keeps the upstream shared ready-ledger fixture and preserves its negative-control proof, positive candidate identity, and existing CLI consumers. - 61 focused source tests and 5 README conformance tests passed. - `npm run test:focused -- tests/boundary/cli/reconstructionObligationLedgerCli.test.ts tests/boundary/mcp/reconstructionObligationLedgerMcp.test.ts` — 8 tests passed. - `npm run check` — passed, including compilation, typecheck, lint, formatting, knip, metadata, module boundaries, and architecture guards. - `npm run docs:check` — passed. - Published and tested Git trees match exactly. The false-closure regressions reproduced the reviewed failures before their fixes and remain covered after this sync. Verified on Windows with the pinned Node 24.18.0 and npm 11.16.0. Coverage uses synthetic Evidence; no real-provider run was recorded. ## Compatibility This changes closure semantics. Existing manifests still parse, but rebuilding them requires a digest-bound failing control to restore closure. Readiness reassesses historical verified obligations through the same proof checks without modifying the stored ledger. ## Author readiness Human owner: @Croesus-K - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6714
No description provided.