Skip to content

fix(reconstruction): preserve unknown graph limitations - #802

Closed
kaoru0822-kitauji wants to merge 1 commit into
morluto:mainfrom
kaoru0822-kitauji:fix/reconstruction-unknown-node-limitation
Closed

kaoru0822-kitauji wants to merge 1 commit into
morluto:mainfrom
kaoru0822-kitauji:fix/reconstruction-unknown-node-limitation

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

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 [email protected] -- 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.

@morluto

morluto commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Superseded by #815, which integrated this change and has now merged (3af3811). Thanks @kaoru0822-kitauji for the fix and tests — much appreciated!

@morluto morluto closed this Oct 7, 2026
@morluto morluto added bug Something isn't working area: evidence Evidence, artifacts, and reconstruction labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve uncertainty when complete application graphs contain admitted unknown nodes

2 participants