[GH-ISSUE #6893] [Bug] Readiness closure history counts one obligation twice and reports pass #4229

Closed
opened 2026-10-31 00:47:53 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @coygeek on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6893

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Evidence, artifacts, or reconstruction

Observed behavior

The internal reconstruction-readiness report accepts the same obligation twice as two newly verified obligations. Starting from the shipped passing example, set the first history entry's required_open to 2 and the final entry's newly_verified_obligation_ids to ["obl.readiness", "obl.readiness"]. The ledger contains only one required obligation. The evaluator nevertheless returns status: "pass", nine passed required stages, and no findings.

Observed by calling the source evaluator directly. This is the internal report used by the repository verifier, not a public CLI/MCP operation. No provider or target execution was involved.

Reproduction

With locked dependencies installed at the revision below, place this fixture at ../evidence-state/closure-history-probe.mts beside a checkout named rea:

import assert from 'node:assert/strict';
import { RECONSTRUCTION_READINESS_EXAMPLE } from '../rea/src/contracts/reconstructionReadinessExample.ts';
import { createReconstructionReadinessReport } from '../rea/src/domain/reconstructionReadiness.ts';

const baseline = createReconstructionReadinessReport(
  structuredClone(RECONSTRUCTION_READINESS_EXAMPLE)
);
assert.equal(baseline.status, 'pass');

const input = structuredClone(RECONSTRUCTION_READINESS_EXAMPLE);
input.closure_history[0]!.required_open = 2;
input.closure_history[1]!.newly_verified_obligation_ids = [
  'obl.readiness', 'obl.readiness'
];
const report = createReconstructionReadinessReport(input);
console.log(JSON.stringify({
  actual_required_obligations: input.obligation_ledger.summary.required,
  status: report.status,
  findings: report.findings
}, null, 2));

From the checkout, run:

node --import ./node_modules/tsx/dist/loader.mjs ../evidence-state/closure-history-probe.mts

One original probe run completed with exit 0. Its baseline passed; the modified history also passed. The retained probe additionally emitted the exact history and full result summary. No post-draft reproduction is claimed.

Expected behavior

Reject duplicate newly verified IDs, or produce a non-passing closure finding. One obligation cannot account for two newly closed obligations. The existing transition check intends to reconcile count decreases with newly verified obligations. The documented internal conformance contract requires incremental verifier closure and fail-closed report behavior.

Impact and scope

A malformed closure history receives an affirmative readiness verdict, so the report fails to detect this bookkeeping error. Demonstrated scope is the internal evaluator with the supplied synthetic input; no observed production CI run contained this history, and no global reconstruction equivalence or target behavior claim is made. Reproduction frequency: once in one targeted invocation.

A practical workaround is to reject duplicate IDs and reconcile the unique IDs with the count transition before passing history to the evaluator. This is a proposed caller-side check, not an executed workaround.

REA version

6.7.0; tested source SHA ef475fcf8b0601c61052b7091568ba574546417d.

Runtime and platform

Node.js v24.22.1, Linux 7.2.8-9-omarchy, x86_64. Locked tsx loader; no installed REA, native provider, full build, or complete test suite used.

Target and artifact context

The source-owned RECONSTRUCTION_READINESS_EXAMPLE and its valid embedded Evidence bundle. Only two closure-history fields changed; the ledger and its commitment remain unchanged.

Interface

Other — direct source call to the internal reconstruction-readiness evaluator.

Earliest failure stage

Transport or result projection

Relevant output or evidence

Original output subset:

{
  "actual_required_obligations": 1,
  "observed": {
    "status": "pass",
    "summary": {
      "stages": 9,
      "required_stages": 9,
      "passed_required_stages": 9,
      "findings": 0,
      "failed_findings": 0,
      "unknown_findings": 0
    },
    "findings": []
  }
}

The full original output and fixture are retained by the reporting parent. Verifier consumer. The full verifier was not executed with this input.

Typed outcome or recovery expected

A validation error or a non-passing verify-reconstruction-closure finding identifying the repeated obligation.

Analysis or suspected cause

Source-derived: closure validation compares array length with the decrease in required_open, then checks each ID independently against the final verified ledger. It does not check uniqueness. The input schema also accepts repeated IDs.

Additional context

Open and closed issue searches included "closure" "readiness", "closure history", and "newly_verified_obligation_ids". No matching report found. #3363 concerns missing manifest Evidence; #3889 concerns conflicting package proofs in the separate coverage evaluator. Neither describes this history count error. Last-known-good version: NOT_ENOUGH_INFO; no historical revision was tested.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The executed internal report incorrectly passes an inconsistent closure history with zero findings; observed impact is bounded to readiness report validation.
  • Workaround status: unverified
  • Workaround basis: Caller-side uniqueness and transition checks could reject the demonstrated input, but that workaround was not executed; no production CI occurrence was established.
Originally created by @coygeek on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6893 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Evidence, artifacts, or reconstruction ### Observed behavior The internal reconstruction-readiness report accepts the same obligation twice as two newly verified obligations. Starting from the shipped passing example, set the first history entry's `required_open` to 2 and the final entry's `newly_verified_obligation_ids` to `["obl.readiness", "obl.readiness"]`. The ledger contains only one required obligation. The evaluator nevertheless returns `status: "pass"`, nine passed required stages, and no findings. Observed by calling the source evaluator directly. This is the internal report used by the repository verifier, not a public CLI/MCP operation. No provider or target execution was involved. ### Reproduction With locked dependencies installed at the revision below, place this fixture at `../evidence-state/closure-history-probe.mts` beside a checkout named `rea`: ```ts import assert from 'node:assert/strict'; import { RECONSTRUCTION_READINESS_EXAMPLE } from '../rea/src/contracts/reconstructionReadinessExample.ts'; import { createReconstructionReadinessReport } from '../rea/src/domain/reconstructionReadiness.ts'; const baseline = createReconstructionReadinessReport( structuredClone(RECONSTRUCTION_READINESS_EXAMPLE) ); assert.equal(baseline.status, 'pass'); const input = structuredClone(RECONSTRUCTION_READINESS_EXAMPLE); input.closure_history[0]!.required_open = 2; input.closure_history[1]!.newly_verified_obligation_ids = [ 'obl.readiness', 'obl.readiness' ]; const report = createReconstructionReadinessReport(input); console.log(JSON.stringify({ actual_required_obligations: input.obligation_ledger.summary.required, status: report.status, findings: report.findings }, null, 2)); ``` From the checkout, run: ```sh node --import ./node_modules/tsx/dist/loader.mjs ../evidence-state/closure-history-probe.mts ``` One original probe run completed with exit 0. Its baseline passed; the modified history also passed. The retained probe additionally emitted the exact history and full result summary. No post-draft reproduction is claimed. ### Expected behavior Reject duplicate newly verified IDs, or produce a non-passing closure finding. One obligation cannot account for two newly closed obligations. The existing [transition check](https://github.com/morluto/rea/blob/ef475fcf8b0601c61052b7091568ba574546417d/src/domain/reconstructionReadinessIntegrityFindings.ts#L229-L252) intends to reconcile count decreases with newly verified obligations. The [documented internal conformance contract](https://github.com/morluto/rea/blob/ef475fcf8b0601c61052b7091568ba574546417d/docs/reconstruction-readiness.md#L27-L49) requires incremental verifier closure and fail-closed report behavior. ### Impact and scope A malformed closure history receives an affirmative readiness verdict, so the report fails to detect this bookkeeping error. Demonstrated scope is the internal evaluator with the supplied synthetic input; no observed production CI run contained this history, and no global reconstruction equivalence or target behavior claim is made. Reproduction frequency: once in one targeted invocation. A practical workaround is to reject duplicate IDs and reconcile the unique IDs with the count transition before passing history to the evaluator. This is a proposed caller-side check, not an executed workaround. ### REA version `6.7.0`; tested source SHA `ef475fcf8b0601c61052b7091568ba574546417d`. ### Runtime and platform Node.js `v24.22.1`, Linux `7.2.8-9-omarchy`, x86_64. Locked `tsx` loader; no installed REA, native provider, full build, or complete test suite used. ### Target and artifact context The source-owned `RECONSTRUCTION_READINESS_EXAMPLE` and its valid embedded Evidence bundle. Only two closure-history fields changed; the ledger and its commitment remain unchanged. ### Interface Other — direct source call to the internal reconstruction-readiness evaluator. ### Earliest failure stage Transport or result projection ### Relevant output or evidence Original output subset: ```json { "actual_required_obligations": 1, "observed": { "status": "pass", "summary": { "stages": 9, "required_stages": 9, "passed_required_stages": 9, "findings": 0, "failed_findings": 0, "unknown_findings": 0 }, "findings": [] } } ``` The full original output and fixture are retained by the reporting parent. [Verifier consumer](https://github.com/morluto/rea/blob/ef475fcf8b0601c61052b7091568ba574546417d/scripts/verify-reconstruction-readiness.mjs#L100-L127). The full verifier was not executed with this input. ### Typed outcome or recovery expected A validation error or a non-passing `verify-reconstruction-closure` finding identifying the repeated obligation. ### Analysis or suspected cause Source-derived: [closure validation](https://github.com/morluto/rea/blob/ef475fcf8b0601c61052b7091568ba574546417d/src/domain/reconstructionReadinessIntegrityFindings.ts#L229-L252) compares array length with the decrease in `required_open`, then checks each ID independently against the final verified ledger. It does not check uniqueness. The [input schema](https://github.com/morluto/rea/blob/ef475fcf8b0601c61052b7091568ba574546417d/src/domain/reconstructionReadinessSchemas.ts#L155-L162) also accepts repeated IDs. ### Additional context Open and closed issue searches included `"closure" "readiness"`, `"closure history"`, and `"newly_verified_obligation_ids"`. No matching report found. [#3363](https://github.com/morluto/rea/issues/3363) concerns missing manifest Evidence; [#3889](https://github.com/morluto/rea/issues/3889) concerns conflicting package proofs in the separate coverage evaluator. Neither describes this history count error. Last-known-good version: NOT_ENOUGH_INFO; no historical revision was tested. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: The executed internal report incorrectly passes an inconsistent closure history with zero findings; observed impact is bounded to readiness report validation. - Workaround status: unverified - Workaround basis: Caller-side uniqueness and transition checks could reject the demonstrated input, but that workaround was not executed; no production CI occurrence was established.
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#4229
No description provided.