[PR #3802] [CLOSED] fix(reconstruction): evaluate declared dependency closure and risks #5907

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3802
Author: @SII-YDD
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/reconstruction-transitive-inventory


📝 Commits (10+)

  • 4b4a864 fix(reconstruction): check transitive dependency inventory
  • 9315aa6 fix(reconstruction): preserve closure across evidence index refactor
  • bd57b40 test(browser): assert cancelled capture partial outcome
  • c8e8492 fix(reconstruction): sync owner-confirmed cleanup baseline
  • 2803054 chore(reconstruction): sync validated upstream fixes
  • ae3f1cc fix(process): retain executable read ownership and repair CI contracts
  • 449f91e fix(process): preserve rejected-read cancellation facts
  • 7d0ec5b fix(reconstruction): retain closure and verified lifecycle regressions
  • 892b451 fix(reconstruction): apply contradictions to reachable dependencies
  • f2b3be3 fix(reconstruction): retain declared scope with accepted CI repairs

📊 Changes

10 files changed (+641 additions, -64 deletions)

View changed files

📝 src/domain/flutter/flutterBuildAnalysis.ts (+2 -1)
📝 src/domain/reconstructionCoverage.fixture.ts (+49 -0)
📝 src/domain/reconstructionCoverage.test.ts (+342 -0)
📝 src/domain/reconstructionCoverage.ts (+2 -2)
📝 src/domain/reconstructionCoverageEvaluation.ts (+17 -7)
➕ tests/boundary/cli/reconstructionCoverageCli.test.ts (+76 -0)
📝 tests/boundary/mcp/reconstructionCoverageMcp.test.ts (+103 -1)
📝 tests/process-global/cutterDescriptorLifetime.test.ts (+33 -17)
📝 tests/process-global/processPrelaunchCancellation.test.ts (+9 -3)
📝 tests/process-global/processSnapshotCleanupMcp.test.ts (+8 -33)

📄 Description

Superseded by main (2026-10-26). The original issue #3354 is resolved by the maintainer implementation a35b9335a. Current-main verification and closure rationale. Closed without merging; branch and historical validation below are preserved. Human readiness declarations remain unchecked.

Problem and outcome

Fixes #3354. For cli.help -> dep -> absent, inspecting only the required root's direct dependencies could incorrectly report ready. Traverse the declared dependency closure, retain dependency Evidence, and report the existing gap reason and input-update probe on the surface that references the missing dependency. Cycles terminate; unrelated inventory remains outside the boundary.

The automated P1 and P2 findings exposed a second scope error: risk evaluation considered only required roots, and then only present dependency nodes. evaluateReconstructionSurfaces now returns its traversal-owned reachable set to evaluateReconstructionCoverageRisks. Every declared dependency ID enters this set; only first-seen, present surfaces enter the work queue. Active contradictions on present or unregistered reachable dependencies therefore fail with their original Evidence. Resolving a contradiction leaves any remaining inventory gap partial; registering the missing surface then allows ready.

Required-claim applicability, explicit owner/package obligations and counts, unrelated/resolved contradictions, and input immutability keep their scope. Traversal costs O(Vr + Er) time and O(Vr) auxiliary space, in addition to existing Evidence/owner/risk work. No measured speedup or accuracy claim.

Failed-suite repairs

  • Retain the accepted #5224/#5249 repairs by gensokyo-dev and the budget-test repair 84c89d1 by morluto, with their attribution. Remove the superseded local reader. Real heap-pressure/source Evidence and controlled parent-budget admission using an owned Node analyzer are separate checks; the original hosted alternative failure stage was not captured.
  • Preserve actual Cutter retention barriers before peer cancellation, read-stage cancellation/no-launch/exact-cleanup controls, shared MCP harness and connection pings, and upstream diagnostics. Use an owning ABI hex-slash pattern that remains valid after hooks and advertised v conversion.
  • CI 39568410433 hit the PE-resource acceptance test's original 30-second limit. Adopt morluto's accepted repair c76edbeb through actual upstream ancestry: pass the exact advertised named MCP definitions to avoid repeated full-catalog validator compilation. All original fresh CLI calls, real stdio MCP, output validation, scenario assertions, cleanup and the unchanged deadline remain. Remove the superseded own PE test diff. Its earlier local CLI-startup measurements did not identify the exact hosted stalled operation and are not evidence for this accepted repair.

Executed validation

Commit f2b3be33f6612d983889c1360c2d16c896a6b41f, integrated upstream base aa53c065387c58b4189d82c47f1f3445fc505e30; 10 files, 641 insertions and 64 deletions.

  • Domain, compiled CLI and actual SDK MCP: P1 red 6 failed / 32 passed, then 38 passed; P2 red 5 failed / 36 passed, then 41 passed. Cover direct/transitive/shared/cyclic dependencies, resolved/unrelated controls, exact reasons/probes/Evidence and explicit counts. Read actual advertised schemas and ping the same connection after failed assessments, invalid-boundary errors and corrected inputs. Probe names describe input-update actions, not separately advertised MCP tools.
  • Independent Floyd–Warshall reference: 512 graphs × 8 missing-edge masks × 5 targets × 2 statuses = 40,960 cases, 0 mismatches. This finite authored input space is not a universal proof or benchmark. The existing progress comment contains the exact executed reference script and its environment.
  • 35 affected files: 348 passed / 2 existing platform skips. npm run check:fast, npm run check, npm run check:ci, npm run docs:check, npm run verify:test-discovery (1,916 files), original hooks, and unchanged-hook-tree checks passed.
  • npm run test:prepare, all six official npm run test:ci:shard:run -- --shard=N/6 invocations, and npm run test:ci:merge with original full thresholds: 23,966 passed / 371 skipped / 0 failed, 1,916 files. All shard/aggregate exits are zero, with the same clean committed head before and after. Skipped cases remain unexecuted.
  • Budget controls: 4 passed; forced retainGraph=true was rejected, then exact source restoration passed. The fresh exact upstream lock was installed with npm ci in the isolated environment; upstream's new msgpack dependency is not an own package change.

Environment: ordinary UID 1000, Linux arm64, Node 24.18 / npm 11.16, 2 CPU / 6 GiB, normal Docker bridge DNS, and env -i without GitHub/model credentials. The prior local full diagnostic run completed with 23,794 passed / 363 skipped / 2 failed. The accepted CLI omission-oracle fixes (19f2969 / 5eebe2f) now arrive through their actual upstream ancestry. The other failure was offline DNS returning EAI_AGAIN rather than ENOTFOUND; all seven original cases pass unchanged with normal DNS. The current head was rerun completely after synchronizing the signed aa53c065 baseline and removing the superseded PE change. Original upstream signatures and Git object identities were preserved, not recreated under this account. An earlier old-head run intentionally stopped after two passing shards is not counted as a full pass.

Remaining gates and disclosure

Current-head CI 39599928776 completed successfully: 17 successful jobs, 19 conditionally skipped, 0 failed, 0 pending. All Source tests and eight built shards, static checks, package baseline, Portable tests and CI required passed. The actual tested merge 5f0c43f166a4edf3f885ca764114295d8102011c has verified parents 25e1a24a3ed3671a0148757555f18d16c29d936a and f2b3be33f6612d983889c1360c2d16c896a6b41f. This is the fast tier's complete portable selection, not full remote coverage/provider/native-host qualification. Both current-head automated reviews reported no new actionable findings; this is not maintainer approval. Full remote coverage/provider/native-host qualification remains separate from fast CI and local coverage and is requested through ci:full. Own-fork dispatch previously returned an Actions-disabled 422. No real Hopper/JADX/GDB/Windows validation, maintainer approval, completed quality delivery or merge is claimed. AI-assisted; the author's initial readiness declarations remain unfilled.

Author readiness

Human owner: @SII-YDD

  • 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.

Prepared with AI assistance and initially published as a draft. Maintainer @kaoru0822-kitauji marked it ready for review at2026-10-15T06:16:09Z; that external action has been preserved. The human owner's three declarations above remain unchecked. AI review, CI, and the readiness toggle do not establish that the owner reviewed the diff or evidence.


🔄 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/3802 **Author:** [@SII-YDD](https://github.com/SII-YDD) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/reconstruction-transitive-inventory` --- ### 📝 Commits (10+) - [`4b4a864`](https://github.com/morluto/rea/commit/4b4a8640dbd415c4551c15f5b163eeed4e84d14b) fix(reconstruction): check transitive dependency inventory - [`9315aa6`](https://github.com/morluto/rea/commit/9315aa6698bcf5d595978a375c5f2ac299081185) fix(reconstruction): preserve closure across evidence index refactor - [`bd57b40`](https://github.com/morluto/rea/commit/bd57b400e34f73374834a20b22a80d3d053f5413) test(browser): assert cancelled capture partial outcome - [`c8e8492`](https://github.com/morluto/rea/commit/c8e8492e02e61890ce55e6427fafa0c96493460d) fix(reconstruction): sync owner-confirmed cleanup baseline - [`2803054`](https://github.com/morluto/rea/commit/28030549fbaca4a8c29ecc4e285ca3279b589147) chore(reconstruction): sync validated upstream fixes - [`ae3f1cc`](https://github.com/morluto/rea/commit/ae3f1cc624352fe1f5366c0343b7ff778b634061) fix(process): retain executable read ownership and repair CI contracts - [`449f91e`](https://github.com/morluto/rea/commit/449f91ee8f32b75841db6a585b02bb93fa6b7637) fix(process): preserve rejected-read cancellation facts - [`7d0ec5b`](https://github.com/morluto/rea/commit/7d0ec5b623fb063bb569e8a268f009f058c6768b) fix(reconstruction): retain closure and verified lifecycle regressions - [`892b451`](https://github.com/morluto/rea/commit/892b4515844785a521320a6e90c78c852b09d17e) fix(reconstruction): apply contradictions to reachable dependencies - [`f2b3be3`](https://github.com/morluto/rea/commit/f2b3be33f6612d983889c1360c2d16c896a6b41f) fix(reconstruction): retain declared scope with accepted CI repairs ### 📊 Changes **10 files changed** (+641 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/flutter/flutterBuildAnalysis.ts` (+2 -1) 📝 `src/domain/reconstructionCoverage.fixture.ts` (+49 -0) 📝 `src/domain/reconstructionCoverage.test.ts` (+342 -0) 📝 `src/domain/reconstructionCoverage.ts` (+2 -2) 📝 `src/domain/reconstructionCoverageEvaluation.ts` (+17 -7) ➕ `tests/boundary/cli/reconstructionCoverageCli.test.ts` (+76 -0) 📝 `tests/boundary/mcp/reconstructionCoverageMcp.test.ts` (+103 -1) 📝 `tests/process-global/cutterDescriptorLifetime.test.ts` (+33 -17) 📝 `tests/process-global/processPrelaunchCancellation.test.ts` (+9 -3) 📝 `tests/process-global/processSnapshotCleanupMcp.test.ts` (+8 -33) </details> ### 📄 Description > **Superseded by main (2026-10-26).** The original issue #3354 is resolved by the maintainer implementation a35b9335a. [Current-main verification and closure rationale](https://github.com/morluto/rea/pull/3802#issuecomment-6409226997). Closed without merging; branch and historical validation below are preserved. Human readiness declarations remain unchecked. ## Problem and outcome Fixes #3354. For `cli.help -> dep -> absent`, inspecting only the required root's direct dependencies could incorrectly report `ready`. Traverse the declared dependency closure, retain dependency Evidence, and report the existing gap reason and input-update probe on the surface that references the missing dependency. Cycles terminate; unrelated inventory remains outside the boundary. The automated [P1](https://github.com/morluto/rea/pull/3802#discussion_r4326058247) and [P2](https://github.com/morluto/rea/pull/3802#discussion_r4334623862) findings exposed a second scope error: risk evaluation considered only required roots, and then only present dependency nodes. `evaluateReconstructionSurfaces` now returns its traversal-owned reachable set to `evaluateReconstructionCoverageRisks`. Every declared dependency ID enters this set; only first-seen, present surfaces enter the work queue. Active contradictions on present **or unregistered** reachable dependencies therefore fail with their original Evidence. Resolving a contradiction leaves any remaining inventory gap `partial`; registering the missing surface then allows `ready`. Required-claim applicability, explicit owner/package obligations and counts, unrelated/resolved contradictions, and input immutability keep their scope. Traversal costs O(Vr + Er) time and O(Vr) auxiliary space, in addition to existing Evidence/owner/risk work. No measured speedup or accuracy claim. ## Failed-suite repairs - Retain the accepted #5224/#5249 repairs by gensokyo-dev and the budget-test repair `84c89d1` by morluto, with their attribution. Remove the superseded local reader. Real heap-pressure/source Evidence and controlled parent-budget admission using an owned Node analyzer are separate checks; the original hosted alternative failure stage was not captured. - Preserve actual Cutter retention barriers before peer cancellation, read-stage cancellation/no-launch/exact-cleanup controls, shared MCP harness and connection pings, and upstream diagnostics. Use an owning ABI hex-slash pattern that remains valid after hooks and advertised `v` conversion. - [CI 39568410433](https://github.com/morluto/rea/actions/runs/39568410433) hit the PE-resource acceptance test's original 30-second limit. Adopt morluto's accepted repair [`c76edbeb`](https://github.com/morluto/rea/commit/c76edbebbe1e25c2bf821ec04d08dc851e37626c) through actual upstream ancestry: pass the exact advertised named MCP definitions to avoid repeated full-catalog validator compilation. All original fresh CLI calls, real stdio MCP, output validation, scenario assertions, cleanup and the unchanged deadline remain. Remove the superseded own PE test diff. Its earlier local CLI-startup measurements did not identify the exact hosted stalled operation and are not evidence for this accepted repair. ## Executed validation Commit `f2b3be33f6612d983889c1360c2d16c896a6b41f`, integrated upstream base `aa53c065387c58b4189d82c47f1f3445fc505e30`; 10 files, 641 insertions and 64 deletions. - Domain, compiled CLI and actual SDK MCP: P1 red **6 failed / 32 passed**, then **38 passed**; P2 red **5 failed / 36 passed**, then **41 passed**. Cover direct/transitive/shared/cyclic dependencies, resolved/unrelated controls, exact reasons/probes/Evidence and explicit counts. Read actual advertised schemas and ping the **same connection** after failed assessments, invalid-boundary errors and corrected inputs. Probe names describe input-update actions, not separately advertised MCP tools. - Independent Floyd–Warshall reference: 512 graphs × 8 missing-edge masks × 5 targets × 2 statuses = **40,960 cases, 0 mismatches**. This finite authored input space is not a universal proof or benchmark. The [existing progress comment](https://github.com/morluto/rea/pull/3802#issuecomment-6182852051) contains the exact executed reference script and its environment. - **35 affected files: 348 passed / 2 existing platform skips**. `npm run check:fast`, `npm run check`, `npm run check:ci`, `npm run docs:check`, `npm run verify:test-discovery` (1,916 files), original hooks, and unchanged-hook-tree checks passed. - `npm run test:prepare`, all six official `npm run test:ci:shard:run -- --shard=N/6` invocations, and `npm run test:ci:merge` with original full thresholds: **23,966 passed / 371 skipped / 0 failed**, 1,916 files. All shard/aggregate exits are zero, with the same clean committed head before and after. Skipped cases remain unexecuted. - Budget controls: 4 passed; forced `retainGraph=true` was rejected, then exact source restoration passed. The fresh exact upstream lock was installed with `npm ci` in the isolated environment; upstream's new msgpack dependency is not an own package change. Environment: ordinary UID 1000, Linux arm64, Node 24.18 / npm 11.16, 2 CPU / 6 GiB, normal Docker bridge DNS, and `env -i` without GitHub/model credentials. The prior local full diagnostic run completed with 23,794 passed / 363 skipped / 2 failed. The accepted CLI omission-oracle fixes (`19f2969` / `5eebe2f`) now arrive through their actual upstream ancestry. The other failure was offline DNS returning `EAI_AGAIN` rather than `ENOTFOUND`; all seven original cases pass unchanged with normal DNS. The current head was rerun completely after synchronizing the signed `aa53c065` baseline and removing the superseded PE change. Original upstream signatures and Git object identities were preserved, not recreated under this account. An earlier old-head run intentionally stopped after two passing shards is not counted as a full pass. ## Remaining gates and disclosure Current-head [CI 39599928776](https://github.com/morluto/rea/actions/runs/39599928776) completed successfully: 17 successful jobs, 19 conditionally skipped, 0 failed, 0 pending. All Source tests and eight built shards, static checks, package baseline, Portable tests and CI required passed. The actual tested merge `5f0c43f166a4edf3f885ca764114295d8102011c` has verified parents `25e1a24a3ed3671a0148757555f18d16c29d936a` and `f2b3be33f6612d983889c1360c2d16c896a6b41f`. This is the fast tier's complete portable selection, not full remote coverage/provider/native-host qualification. Both current-head automated reviews reported no new actionable findings; this is not maintainer approval. Full remote coverage/provider/native-host qualification remains separate from fast CI and local coverage and is [requested through `ci:full`](https://github.com/morluto/rea/pull/3802#issuecomment-6311542336). Own-fork dispatch previously returned an Actions-disabled 422. No real Hopper/JADX/GDB/Windows validation, maintainer approval, completed quality delivery or merge is claimed. AI-assisted; the author's initial readiness declarations remain unfilled. ## Author readiness Human owner: @SII-YDD - [ ] 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. Prepared with AI assistance and initially published as a draft. Maintainer @kaoru0822-kitauji marked it ready for review at2026-10-15T06:16:09Z; that external action has been preserved. The human owner's three declarations above remain unchecked. AI review, CI, and the readiness toggle do not establish that the owner reviewed the diff or evidence. --- <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:21 +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#5907
No description provided.