[GH-ISSUE #268] Build an evidence-backed reconstruction workspace and coverage closure workflow #157

Closed
opened 2026-10-15 18:21:47 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @morluto on GitHub (Jul 16, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/268

Problem

Passing component tests and individual differential fixtures does not prove that every shipped surface has been reconstructed. Large reconstruction projects need a durable, evidence-linked account of what exists in the authority, who owns each reconstructed surface, what verifier exercises it, and which claims remain unknown or contradicted.

Today agents often maintain separate spreadsheets, Markdown plans, generated manifests, process-parity reports, and residual-unknown ledgers. These drift independently. A narrow green verifier can be mistaken for replacement readiness even when commands, event families, persistence formats, UI states, native boundaries, or packaged workflows remain unowned.

Outcome

Add an evidence-backed reconstruction workspace and fail-closed coverage-closure workflow.

The workspace is not a project manager or source generator. It is a typed, durable graph connecting authoritative surfaces, evidence, reconstruction ownership, specifications, verifier results, residual unknowns, and replacement/completion claims.

Domain model

Represent at least:

  • authoritative artifact/version/environment;
  • surface family and stable surface ID;
  • artifact occurrence and exact source/binary location;
  • observed, derived, inferred, historical, or external authority;
  • reconstructed package/module/export/process owner;
  • finite behavioral, structural, protocol, persistence, UI, native, or packaging claim;
  • characterization fixture and evidence bundle;
  • verifier, required dimensions, latest result, freshness, and coverage;
  • normalization rules and rationales;
  • residual unknowns, contradictions, unavailable authority, and recommended probes;
  • replacement boundary and executable/package integration proof;
  • dependency relationships between surfaces and claims.

Surface families must be extensible and include CLI commands/options/output, MCP tools/schemas/dispatch, protocols/endpoints/events, state and persistence formats, process lifecycles, UI routes/states/interactions, native exports/ABI behavior, packaged files, and installation/upgrade behavior.

Discovery and inventory

Build workspace inventories from explicit authoritative evidence:

  • artifact graphs and semantic indexes;
  • protocol and schema catalogs;
  • process/browser/Electron/native captures;
  • imported historical-source mappings;
  • user-supplied finite specifications;
  • generated route/operation/export manifests.

Discovery never silently creates a completion claim. Unsupported or truncated inventory creates scoped unknown coverage.

Ownership

Each required surface maps to exactly one primary reconstructed owner or an explicit external/non-goal disposition. Detect:

  • missing owner;
  • duplicate or conflicting owners;
  • implementation routing back into the authority;
  • copied generated/runtime helpers outside an approved adapter;
  • owner path no longer present;
  • surface present in code but absent from distributable/package;
  • claim covered only by a mock or weaker boundary than required.

Ownership is architectural evidence, not proof of behavioral parity.

Verification graph

A verifier registration declares:

  • claims and surfaces it covers;
  • authority and candidate bindings;
  • required evidence dimensions;
  • acceptable freshness and repeat count;
  • approved normalization contract;
  • pass/fail/unknown/unsupported/truncated semantics;
  • output artifacts and evidence IDs.

The workspace computes closure only from current compatible results. Test counts, builds, or a parent aggregate cannot cover unnamed claims.

Replacement readiness

A replacement boundary requires proof that:

  • every required surface has an owner or accepted disposition;
  • all finite claims pass at comparable authority;
  • no required verifier is missing, stale, skipped, truncated, or unknown;
  • no active contradiction affects the boundary;
  • the distributable routes through reconstructed owners;
  • authority imports/runtime delegation are absent;
  • clean installation/build/package/runtime workflows pass;
  • residual unknowns are bounded and permitted by the completion specification.

Return partial, failed, unknown, or ready. Never collapse partial into ready.

Durable workflow

Provide operations to:

  1. create/open a workspace under an approved evidence root;
  2. import/update authoritative surface inventories;
  3. register reconstructed owners and replacement boundaries;
  4. register finite claims and verifier contracts;
  5. ingest canonical Evidence v2 bundles and verifier results;
  6. reconcile changed artifacts, code, schemas, or evidence;
  7. query missing/duplicate/stale/contradicted coverage;
  8. recommend the next highest-impact probe or verifier;
  9. produce deterministic machine and human reports;
  10. verify a named replacement/completion specification.

Use monotonic CAS revisions so concurrent agents cannot overwrite newer state. Preserve invalidated history rather than deleting old claims.

Anti-cheating rules

  • A verifier cannot broaden its coverage after the fact without a contract revision.
  • Weak evidence cannot satisfy a stronger required authority.
  • Normalization cannot remove fields or dimensions.
  • Snapshot updates require semantic review.
  • Mock-only results cannot prove real process/browser/native/package behavior.
  • Missing or stale evidence is unknown, not pass.
  • External/non-goal dispositions require an explicit rationale and completion-spec allowance.
  • Completion cannot be inferred from absence of discovered gaps.

Acceptance criteria

  • A provider-neutral workspace schema models surfaces, owners, claims, verifiers, evidence, unknowns, contradictions, and replacement boundaries.
  • Inventories are deterministic and tied to artifact/evidence digests.
  • Missing, duplicate, stale, authority-routing, and undistributed owners are detected.
  • Verifier coverage is explicit per finite claim and cannot be inferred from test counts.
  • Changed artifacts, owners, schemas, normalization, or verifier contracts invalidate dependent closure.
  • CAS revisions prevent lost concurrent updates.
  • Reports distinguish pass, fail, unknown, unsupported, truncated, stale, contradicted, and accepted disposition.
  • A deliberately incomplete CLI/package fixture remains partial despite all registered component tests passing.
  • Adding the missing process fixture advances only the claims it actually covers.
  • A distributable that still imports the authority fails replacement readiness.
  • Clean-check mode regenerates deterministic reports and detects manual tampering.
  • The workflow integrates residual unknowns from #73 and generated ledgers from #72 without duplicating their authority.
  • verify_reconstruction can consume a named workspace specification and canonical evidence bundle.
  • Large reports and inventories are exposed as MCP resources.
  • CLI/MCP behavior, typed errors, progress, cancellation, and Tasks support remain equivalent.

Relationships

  • Differential and reconstruction workflows: #37
  • Generated evidence/completion ledgers: #72
  • Residual unknown registry: #73
  • Artifact graph: #35
  • Evidence v2 and resources: #48, #49, and #99
  • Fixture export: #62
  • JavaScript and historical mapping: #117, #68, and #67
  • Browser/Electron comparison: #63 through #65

Non-goals

  • Generating reconstruction source code automatically.
  • Replacing Git, issue trackers, or project plans.
  • Declaring global equivalence from a finite specification.
  • Treating architecture ownership as behavioral proof.
  • Requiring unavailable private implementation details when client-observable contracts are the declared boundary.
Originally created by @morluto on GitHub (Jul 16, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/268 ## Problem Passing component tests and individual differential fixtures does not prove that every shipped surface has been reconstructed. Large reconstruction projects need a durable, evidence-linked account of what exists in the authority, who owns each reconstructed surface, what verifier exercises it, and which claims remain unknown or contradicted. Today agents often maintain separate spreadsheets, Markdown plans, generated manifests, process-parity reports, and residual-unknown ledgers. These drift independently. A narrow green verifier can be mistaken for replacement readiness even when commands, event families, persistence formats, UI states, native boundaries, or packaged workflows remain unowned. ## Outcome Add an evidence-backed reconstruction workspace and fail-closed coverage-closure workflow. The workspace is not a project manager or source generator. It is a typed, durable graph connecting authoritative surfaces, evidence, reconstruction ownership, specifications, verifier results, residual unknowns, and replacement/completion claims. ## Domain model Represent at least: - authoritative artifact/version/environment; - surface family and stable surface ID; - artifact occurrence and exact source/binary location; - observed, derived, inferred, historical, or external authority; - reconstructed package/module/export/process owner; - finite behavioral, structural, protocol, persistence, UI, native, or packaging claim; - characterization fixture and evidence bundle; - verifier, required dimensions, latest result, freshness, and coverage; - normalization rules and rationales; - residual unknowns, contradictions, unavailable authority, and recommended probes; - replacement boundary and executable/package integration proof; - dependency relationships between surfaces and claims. Surface families must be extensible and include CLI commands/options/output, MCP tools/schemas/dispatch, protocols/endpoints/events, state and persistence formats, process lifecycles, UI routes/states/interactions, native exports/ABI behavior, packaged files, and installation/upgrade behavior. ## Discovery and inventory Build workspace inventories from explicit authoritative evidence: - artifact graphs and semantic indexes; - protocol and schema catalogs; - process/browser/Electron/native captures; - imported historical-source mappings; - user-supplied finite specifications; - generated route/operation/export manifests. Discovery never silently creates a completion claim. Unsupported or truncated inventory creates scoped unknown coverage. ## Ownership Each required surface maps to exactly one primary reconstructed owner or an explicit external/non-goal disposition. Detect: - missing owner; - duplicate or conflicting owners; - implementation routing back into the authority; - copied generated/runtime helpers outside an approved adapter; - owner path no longer present; - surface present in code but absent from distributable/package; - claim covered only by a mock or weaker boundary than required. Ownership is architectural evidence, not proof of behavioral parity. ## Verification graph A verifier registration declares: - claims and surfaces it covers; - authority and candidate bindings; - required evidence dimensions; - acceptable freshness and repeat count; - approved normalization contract; - pass/fail/unknown/unsupported/truncated semantics; - output artifacts and evidence IDs. The workspace computes closure only from current compatible results. Test counts, builds, or a parent aggregate cannot cover unnamed claims. ## Replacement readiness A replacement boundary requires proof that: - every required surface has an owner or accepted disposition; - all finite claims pass at comparable authority; - no required verifier is missing, stale, skipped, truncated, or unknown; - no active contradiction affects the boundary; - the distributable routes through reconstructed owners; - authority imports/runtime delegation are absent; - clean installation/build/package/runtime workflows pass; - residual unknowns are bounded and permitted by the completion specification. Return partial, failed, unknown, or ready. Never collapse partial into ready. ## Durable workflow Provide operations to: 1. create/open a workspace under an approved evidence root; 2. import/update authoritative surface inventories; 3. register reconstructed owners and replacement boundaries; 4. register finite claims and verifier contracts; 5. ingest canonical Evidence v2 bundles and verifier results; 6. reconcile changed artifacts, code, schemas, or evidence; 7. query missing/duplicate/stale/contradicted coverage; 8. recommend the next highest-impact probe or verifier; 9. produce deterministic machine and human reports; 10. verify a named replacement/completion specification. Use monotonic CAS revisions so concurrent agents cannot overwrite newer state. Preserve invalidated history rather than deleting old claims. ## Anti-cheating rules - A verifier cannot broaden its coverage after the fact without a contract revision. - Weak evidence cannot satisfy a stronger required authority. - Normalization cannot remove fields or dimensions. - Snapshot updates require semantic review. - Mock-only results cannot prove real process/browser/native/package behavior. - Missing or stale evidence is unknown, not pass. - External/non-goal dispositions require an explicit rationale and completion-spec allowance. - Completion cannot be inferred from absence of discovered gaps. ## Acceptance criteria - [ ] A provider-neutral workspace schema models surfaces, owners, claims, verifiers, evidence, unknowns, contradictions, and replacement boundaries. - [ ] Inventories are deterministic and tied to artifact/evidence digests. - [ ] Missing, duplicate, stale, authority-routing, and undistributed owners are detected. - [ ] Verifier coverage is explicit per finite claim and cannot be inferred from test counts. - [ ] Changed artifacts, owners, schemas, normalization, or verifier contracts invalidate dependent closure. - [ ] CAS revisions prevent lost concurrent updates. - [ ] Reports distinguish pass, fail, unknown, unsupported, truncated, stale, contradicted, and accepted disposition. - [ ] A deliberately incomplete CLI/package fixture remains partial despite all registered component tests passing. - [ ] Adding the missing process fixture advances only the claims it actually covers. - [ ] A distributable that still imports the authority fails replacement readiness. - [ ] Clean-check mode regenerates deterministic reports and detects manual tampering. - [ ] The workflow integrates residual unknowns from #73 and generated ledgers from #72 without duplicating their authority. - [ ] verify_reconstruction can consume a named workspace specification and canonical evidence bundle. - [ ] Large reports and inventories are exposed as MCP resources. - [ ] CLI/MCP behavior, typed errors, progress, cancellation, and Tasks support remain equivalent. ## Relationships - Differential and reconstruction workflows: #37 - Generated evidence/completion ledgers: #72 - Residual unknown registry: #73 - Artifact graph: #35 - Evidence v2 and resources: #48, #49, and #99 - Fixture export: #62 - JavaScript and historical mapping: #117, #68, and #67 - Browser/Electron comparison: #63 through #65 ## Non-goals - Generating reconstruction source code automatically. - Replacing Git, issue trackers, or project plans. - Declaring global equivalence from a finite specification. - Treating architecture ownership as behavioral proof. - Requiring unavailable private implementation details when client-observable contracts are the declared boundary.
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#157
No description provided.