refactor(rebuild): collapse recovery planning layers - #6585
Conversation
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
E2E Target Results — ✅ All requested jobs passedRun: 29033782610
|
E2E Target Results — ✅ All requested jobs passedRun: 29033782708
|
E2E Target Results — ✅ All requested jobs passedRun: 29033782690
|
E2E Target Results — ✅ All requested jobs passedRun: 29033782685
|
E2E Target Results — ✅ All requested jobs passedRun: 29034110518
|
E2E Target Results — ✅ All requested jobs passedRun: 29034110604
|
E2E Target Results — ✅ All requested jobs passedRun: 29034110505
|
E2E Target Results — ✅ All requested jobs passedRun: 29034110486
|
|
Closing this draft stack as requested while the broader human-and-agent lifecycle architecture is reconsidered. |
Summary
This stacked draft consolidates the durable rebuild recovery boundary after the behavior-proving rollout in #6574. It preserves recovery behavior while removing two pass-through production modules, their duplicate plan object, and split transaction-generation routing. The full PR is exactly line-neutral at
+258/-258; production code is+120/-218(net-98) versus #6574, while tests are+138/-40(net+98).Related Issue
Closes #6580.
Part of #6433.
Changes
decideRebuildRecoveryas the independently tested pure phase/observation decision boundary.rebuild-recovery-plan.tsandrebuild-recovery-preflight.tsproduction modules.adopt,create,recreate, orresume.RebuildTransactionCoordinator.startOrResumethe single typed owner of active/completed generation selection, prepare/refresh routing, and observed-deletion reconciliation; the recovery orchestrator now delegates instead of repeating those phase decisions.rebuild-recovery.ts, transaction generation/phase routing in the coordinator, and replacement revalidation/receipt publication in the recovery orchestrator. The decision remains independently testable; another pass-through decision file would recreate the layer this PR removes.rebuild-pipeline.tsby one line, leave the durable transaction-store implementation untouched, and keeprebuild-preflight-phase.tsnet neutral.+120/-218(net-98), tests+138/-40(net+98), and total+258/-258(net0) versus test(rebuild): prove live recovery boundaries #6574.+1957; tests rise to net+3494and test-only config remains net+8, leaving the cumulative total unchanged at net+5459while increasing durable proof.adoptandresumerequire present correlated registry evidence, while registry repair is reachable only forcreatewith a missing row. The 120-case decision matrix, focused missing-row restoration/refusal tests, replacement-boundary tests, and direct action-derived presence mapping cover the reachable legacy semantics.resolveLiveStatenull propagation unchanged: every production null path already prints/logs the specific failure and invokesbailinsideresolveRebuildLiveState; adding a second generic log or bail in the transparent collector would duplicate operator output and introduce behavior into this refactor.StartOrResumeRebuildTransactionInputfixture and assert exact object identity plus receipt ordering. Nested target/recreate values are intentionally opaque at this forwarding-only boundary; the coordinator matrix owns their routing behavior.startOrResume, andloadRebuildRecoveryrejects changed backup/registry fingerprints. Focused boundary tests cover fresh prepared refresh, post-delete intent drift, and changed recovery evidence.restoreRebuildRegistryRecoveryIfMissingindependently takes the registry lock, reloads current state, and refuses an existing name before its atomic save. The apparent read/restore TOCTOU does not bypass that locked compare-and-add.registryRestoredlocal to the effect site: no downstream branch depends on it; the only observable consequence is the success log emitted immediately when the locked restore returns true. Reintroducing a carried boolean would recreate the duplicate plan state this PR removes.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpm run typecheck:cli; 77 focused CLI cases covering the exhaustive decision table, recovery preflight, start/resume owner, orchestrator, transaction/replacement boundaries, and installer recovery (the stateful replacement-boundary file is green in its required isolated run); 6 process-death integration tests;npm run test:projects:check;npm run test:titles:check.npm run docsbuilds without warnings (doc changes only)Signed-off-by: Julie Yaunches jyaunches@nvidia.com