[PR #802] [CLOSED] fix(reconstruction): preserve unknown graph limitations #2252

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/802
Author: @kaoru0822-kitauji
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: fix/reconstruction-unknown-node-limitation


📝 Commits (1)

  • f98bac9 fix(reconstruction): preserve unknown graph limitations

📊 Changes

2 files changed (+116 additions, -1 deletions)

View changed files

➕ src/application/ReconstructionObligationCandidates.test.ts (+109 -0)
📝 src/application/ReconstructionObligationCandidates.ts (+7 -1)

📄 Description

Summary

Preserve an admitted unknown application-graph node as an explicit reconstruction-obligation generation limitation, even when structural graph coverage is complete.

Fixes #796.

Problem and expected behavior

The candidate generator skips application-node kinds without an obligation policy. That is intentional for ordinary structural nodes, but it also silently skipped the schema-admitted unknown kind. In a mixed complete graph, known nodes still produced candidates, so the zero-candidate fail-closed guard did not apply and the unresolved frontier disappeared from qualification.

A complete graph may prove structural enumeration; it does not resolve the semantics of an admitted unknown node. The generator should retain that uncertainty without inventing an obligation for the node.

Change and scope

  • Add one deterministic generation limitation for each application node whose kind is exactly unknown.
  • Keep ordinary policy-less structural nodes outside the obligation set without adding limitations.
  • Keep unknown nodes out of the generated obligation set; this change preserves uncertainty rather than guessing an obligation policy.
  • Add a regression with a complete mixed graph containing known obligation-bearing nodes and one admitted unknown node.

Contract and boundary impact

  • Semantic owner and earliest changed stage: reconstruction-obligation candidate generation from authenticated application-graph Evidence.
  • CLI/MCP/tool catalog: no name, schema, or catalog change. Existing ledger results can now be unknown when their complete input graph explicitly contains an unresolved node.
  • Evidence/provenance: the exact graph and node identifiers are retained in the limitation.
  • Provider, process, authorization, cleanup, package, and installation behavior: unchanged.

Evidence and regression coverage

  • Baseline reproduction on current main: known candidates were generated, the unknown node produced no candidate, and limitations was empty.
  • After the fix, the unknown node still produces no invented obligation, while its exact graph/node identity appears in the sole generation limitation.
  • The exact-one assertion also proves that ordinary non-policy structural nodes in the same complete graph do not become limitations.
  • Material unverified coverage: no full deterministic suite, CLI/MCP process, or real provider workflow was run; hosted CI is pending.

Validation performed

  • vitest run src/application/ReconstructionObligationCandidates.test.ts src/application/ReconstructionObligationLedger.authority.test.ts src/application/ReconstructionObligationLedger.closure.test.ts --coverage.enabled=false — 8 passed.
  • npm exec --package=typescript@5.9.3 -- tsc --noEmit — passed.
  • Changed-file lint with --deny-warnings — passed.
  • Changed-file oxfmt --check, npm run knip, npm run metadata:check, and git diff --check — passed.
  • npm run check could not complete in this container because the repository TypeScript 7 binary requires /proc/self/exe, which is unavailable here; the stable TypeScript check and the other constituent checks above passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Generated metadata or documentation impact: none.
  • Security/privacy: no new data source or authority; an already-admitted uncertainty is retained instead of discarded.
  • AI-assisted implementation and tests; I reviewed the final diff and validation output.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • The related issue is linked.
  • Tests cover the changed observable behavior and the mixed known/unknown case.
  • No owning docs, contracts, or generated metadata require updates.
  • The final diff contains no unrelated cleanup or unsupported coverage claims.

🔄 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/802 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/reconstruction-unknown-node-limitation` --- ### 📝 Commits (1) - [`f98bac9`](https://github.com/morluto/rea/commit/f98bac9d8a87e3c22ea4f576771a8e9208dc8049) fix(reconstruction): preserve unknown graph limitations ### 📊 Changes **2 files changed** (+116 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `src/application/ReconstructionObligationCandidates.test.ts` (+109 -0) 📝 `src/application/ReconstructionObligationCandidates.ts` (+7 -1) </details> ### 📄 Description ## Summary Preserve an admitted `unknown` application-graph node as an explicit reconstruction-obligation generation limitation, even when structural graph coverage is `complete`. Fixes #796. ## Problem and expected behavior The candidate generator skips application-node kinds without an obligation policy. That is intentional for ordinary structural nodes, but it also silently skipped the schema-admitted `unknown` kind. In a mixed complete graph, known nodes still produced candidates, so the zero-candidate fail-closed guard did not apply and the unresolved frontier disappeared from qualification. A complete graph may prove structural enumeration; it does not resolve the semantics of an admitted `unknown` node. The generator should retain that uncertainty without inventing an obligation for the node. ## Change and scope - Add one deterministic generation limitation for each application node whose kind is exactly `unknown`. - Keep ordinary policy-less structural nodes outside the obligation set without adding limitations. - Keep unknown nodes out of the generated obligation set; this change preserves uncertainty rather than guessing an obligation policy. - Add a regression with a complete mixed graph containing known obligation-bearing nodes and one admitted unknown node. ## Contract and boundary impact - Semantic owner and earliest changed stage: reconstruction-obligation candidate generation from authenticated application-graph Evidence. - CLI/MCP/tool catalog: no name, schema, or catalog change. Existing ledger results can now be `unknown` when their complete input graph explicitly contains an unresolved node. - Evidence/provenance: the exact graph and node identifiers are retained in the limitation. - Provider, process, authorization, cleanup, package, and installation behavior: unchanged. ## Evidence and regression coverage - Baseline reproduction on current `main`: known candidates were generated, the unknown node produced no candidate, and `limitations` was empty. - After the fix, the unknown node still produces no invented obligation, while its exact graph/node identity appears in the sole generation limitation. - The exact-one assertion also proves that ordinary non-policy structural nodes in the same complete graph do not become limitations. - Material unverified coverage: no full deterministic suite, CLI/MCP process, or real provider workflow was run; hosted CI is pending. ## Validation performed - `vitest run src/application/ReconstructionObligationCandidates.test.ts src/application/ReconstructionObligationLedger.authority.test.ts src/application/ReconstructionObligationLedger.closure.test.ts --coverage.enabled=false` — 8 passed. - `npm exec --package=typescript@5.9.3 -- tsc --noEmit` — passed. - Changed-file lint with `--deny-warnings` — passed. - Changed-file `oxfmt --check`, `npm run knip`, `npm run metadata:check`, and `git diff --check` — passed. - `npm run check` could not complete in this container because the repository TypeScript 7 binary requires `/proc/self/exe`, which is unavailable here; the stable TypeScript check and the other constituent checks above passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Generated metadata or documentation impact: none. - Security/privacy: no new data source or authority; an already-admitted uncertainty is retained instead of discarded. - AI-assisted implementation and tests; I reviewed the final diff and validation output. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] The related issue is linked. - [x] Tests cover the changed observable behavior and the mixed known/unknown case. - [x] No owning docs, contracts, or generated metadata require updates. - [x] The final diff contains no unrelated cleanup or unsupported coverage claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16:18 +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#2252
No description provided.