[PR #3826] [MERGED] fix(reconstruction): retain semantic unknowns in obligation ledgers #5928

Closed
opened 2026-10-31 01:10:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3826
Author: @maxazure
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @morluto

Base: main ← Head: fix/ledger-semantic-unknowns-3370


📝 Commits (2)

  • eac4ea1 fix(reconstruction): retain semantic unknowns in obligation ledgers
  • c9da97d Merge origin/main into fix/ledger-semantic-unknowns-3370

📊 Changes

4 files changed (+334 additions, -7 deletions)

View changed files

➕ src/application/ReconstructionObligationCandidates.semantic.test.ts (+205 -0)
📝 src/application/ReconstructionObligationCandidates.test.ts (+4 -1)
📝 src/application/ReconstructionObligationCandidates.ts (+34 -5)
📝 tests/boundary/cli/reconstructionObligationLedgerCli.test.ts (+91 -1)

📄 Description

Summary

Fixes #3370. Reconstruction obligation ledgers dropped unresolved semantic facts and could report complete coverage even when the source semantic graph was unknown.

Problem and expected behavior

The original dynamic EventEmitter example produces 11 semantic unknowns. Its ledger kept the event obligation but discarded its residual unknown and all source uncertainty. The reproduced ledger was open for other reasons; this does not claim a false ready result.

Change and scope

At candidate derivation, retain the actual unknown IDs bound to each semantic node. Keep every source frontier and semantic coverage limitation visible, including unknowns without an obligation policy. Candidate node IDs remain possibilities, not definite bindings. Merge residual IDs deterministically when several Evidence records describe one obligation. Existing evaluation and integrity code continue to derive diagnostics, coverage and status.

Contract and boundary impact

  • Owner: application-level obligation candidate derivation from validated Evidence.
  • Scope decision: not applicable; correctness fix within the existing static workflow.
  • CLI/MCP schemas, Evidence authentication, target selection and package/generated metadata: unchanged.
  • No target execution or network access added; the reproduction reads inert local source.

Evidence and regression coverage

Executed the issue's authentic analyzer → Evidence bundle → public ledger CLI flow on base 4692bb3:

  • Before: semantic coverage unknown, 11 unknowns; ledger open/complete with empty residual report and limitations.
  • After: the matching event obligation retains its actual residual ID and diagnostic; all 11 unknowns stay visible; all 3 original obligations remain. Existing evaluation produces unknown/partial.
  • Tests cover node-bound and unbound frontiers, unknowns without policy, semantic coverage without a frontier record, and deterministic union across partially overlapping Evidence observations.
  • Complete semantic source control still produces complete ledger coverage and remains open for its missing proof.

Validation performed

Linux cloud, pinned Node 24.18.0 / npm 11.16.0:

  • 23 focused tests across 6 files passed, including public CLI and MCP boundaries.
  • Added regressions failed against the original implementation for the expected missing-uncertainty behavior.
  • Build prerequisite, npm run check:fast, npm run check, npm run verify:test-discovery (1,302 files), and diff checks passed.
  • Normal local commit hooks passed. Published tree 578e969336 matches the validated local tree.
  • Independent source review found no actionable issues; it did not independently run tests.
  • A local full-suite/coverage run is not claimed as passed.

Compatibility, safety, and release

No schema or package change. Previously omitted uncertainty is now visible and may make ledger status unknown rather than open. Source Evidence is retained unchanged; no source application is executed.

Current-head CI

CI run 38851799042, attempt 1, completed successfully on 2026-10-16 at 04:54:39 UTC for c9da97d836. This is the current PR head; the earlier failure on eac4ea1 does not describe the current CI result. Skipped jobs are not verification evidence.

Author readiness

Human owner: @maxazure

  • 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/3826 **Author:** [@maxazure](https://github.com/maxazure) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/ledger-semantic-unknowns-3370` --- ### 📝 Commits (2) - [`eac4ea1`](https://github.com/morluto/rea/commit/eac4ea148deb70c0822210b3d70b9b016ee4e510) fix(reconstruction): retain semantic unknowns in obligation ledgers - [`c9da97d`](https://github.com/morluto/rea/commit/c9da97d836fe940cb7b61b24c50787130c40fa54) Merge origin/main into fix/ledger-semantic-unknowns-3370 ### 📊 Changes **4 files changed** (+334 additions, -7 deletions) <details> <summary>View changed files</summary> ➕ `src/application/ReconstructionObligationCandidates.semantic.test.ts` (+205 -0) 📝 `src/application/ReconstructionObligationCandidates.test.ts` (+4 -1) 📝 `src/application/ReconstructionObligationCandidates.ts` (+34 -5) 📝 `tests/boundary/cli/reconstructionObligationLedgerCli.test.ts` (+91 -1) </details> ### 📄 Description ## Summary Fixes #3370. Reconstruction obligation ledgers dropped unresolved semantic facts and could report complete coverage even when the source semantic graph was unknown. ## Problem and expected behavior The original dynamic EventEmitter example produces 11 semantic unknowns. Its ledger kept the event obligation but discarded its residual unknown and all source uncertainty. The reproduced ledger was open for other reasons; this does not claim a false ready result. ## Change and scope At candidate derivation, retain the actual unknown IDs bound to each semantic node. Keep every source frontier and semantic coverage limitation visible, including unknowns without an obligation policy. Candidate node IDs remain possibilities, not definite bindings. Merge residual IDs deterministically when several Evidence records describe one obligation. Existing evaluation and integrity code continue to derive diagnostics, coverage and status. ## Contract and boundary impact - Owner: application-level obligation candidate derivation from validated Evidence. - Scope decision: not applicable; correctness fix within the existing static workflow. - CLI/MCP schemas, Evidence authentication, target selection and package/generated metadata: unchanged. - No target execution or network access added; the reproduction reads inert local source. ## Evidence and regression coverage Executed the issue's authentic analyzer → Evidence bundle → public ledger CLI flow on base 4692bb3: - Before: semantic coverage unknown, 11 unknowns; ledger open/complete with empty residual report and limitations. - After: the matching event obligation retains its actual residual ID and diagnostic; all 11 unknowns stay visible; all 3 original obligations remain. Existing evaluation produces unknown/partial. - Tests cover node-bound and unbound frontiers, unknowns without policy, semantic coverage without a frontier record, and deterministic union across partially overlapping Evidence observations. - Complete semantic source control still produces complete ledger coverage and remains open for its missing proof. ## Validation performed Linux cloud, pinned Node 24.18.0 / npm 11.16.0: - 23 focused tests across 6 files passed, including public CLI and MCP boundaries. - Added regressions failed against the original implementation for the expected missing-uncertainty behavior. - Build prerequisite, `npm run check:fast`, `npm run check`, `npm run verify:test-discovery` (1,302 files), and diff checks passed. - Normal local commit hooks passed. Published tree 578e969336bb064108480a9ed2ad4348abf91c96 matches the validated local tree. - Independent source review found no actionable issues; it did not independently run tests. - A local full-suite/coverage run is not claimed as passed. ## Compatibility, safety, and release No schema or package change. Previously omitted uncertainty is now visible and may make ledger status unknown rather than open. Source Evidence is retained unchanged; no source application is executed. ## Current-head CI [CI run 38851799042](https://github.com/morluto/rea/actions/runs/38851799042), attempt 1, completed successfully on 2026-10-16 at 04:54:39 UTC for c9da97d836fe940cb7b61b24c50787130c40fa54. This is the current PR head; the earlier failure on eac4ea1 does not describe the current CI result. Skipped jobs are not verification evidence. ## Author readiness Human owner: @maxazure - [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>
bsakaguchi 2026-10-31 01:10:30 +00:00
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#5928
No description provided.