[PR #940] [MERGED] perf(setup): reuse initial diagnostics during planning #2517

Closed
opened 2026-10-17 21:07:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/940
Author: @morluto
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @morluto

Base: main ← Head: codex/setup-build-audit


📝 Commits (4)

  • 6a97bc0 perf(setup): reuse initial diagnostics during planning
  • 1f04284 test(setup): verify post-configuration doctor refresh
  • 36d68fc Merge remote-tracking branch 'origin/main' into codex/setup-build-audit
  • 4043ea0 style(setup): remove extra test spacing

📊 Changes

6 files changed (+105 additions, -4 deletions)

View changed files

📝 src/application/Setup.fixture.ts (+5 -0)
➕ src/application/Setup.initialSnapshot.test.ts (+51 -0)
📝 src/application/Setup.ts (+12 -2)
📝 src/application/SetupHost.ts (+25 -1)
📝 src/application/SetupPlan.ts (+4 -1)
📝 src/application/SetupTypes.ts (+8 -0)

📄 Description

Summary

rea setup ran a full doctor diagnosis three times during initial planning: once to resolve the Hopper path, once to collect provider registration settings, and once to discover setup state. Production setup now captures those facts in one initial snapshot and shares its diagnosis across planning. The separate post-action doctor call remains fresh, so the returned readiness reflects changes made by setup. Plan disclosure, approval, and dry-run behavior are preserved; this change adds no installation effects.

Validation

  • 50 focused setup service and CLI boundary tests passed, including a regression that checks the post-configuration health result comes from a fresh doctor call.
  • npm run build:cached passed.
  • npm run check:fast -- --force passed after merging current origin/main.
  • A 10-round interleaved dry-run benchmark measured 484.08 ms baseline and 446.38 ms candidate median on this host (about 7.8% lower; individual runs had noise). Both plans were 13,078 bytes. Their hashes match after normalizing each worktree root; raw hashes differ because the selected CLI entrypoint path includes the worktree root.

🔄 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/940 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/setup-build-audit` --- ### 📝 Commits (4) - [`6a97bc0`](https://github.com/morluto/rea/commit/6a97bc0ab13ffb120f43fe08ab9490b4814ac832) perf(setup): reuse initial diagnostics during planning - [`1f04284`](https://github.com/morluto/rea/commit/1f04284b3b62545049d632648c576e029859ad01) test(setup): verify post-configuration doctor refresh - [`36d68fc`](https://github.com/morluto/rea/commit/36d68fcc11da4f8c24dd8d6ff28e60cc7702dcf4) Merge remote-tracking branch 'origin/main' into codex/setup-build-audit - [`4043ea0`](https://github.com/morluto/rea/commit/4043ea0023b1865e32b2991e7c8ce832a749d5b6) style(setup): remove extra test spacing ### 📊 Changes **6 files changed** (+105 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/application/Setup.fixture.ts` (+5 -0) ➕ `src/application/Setup.initialSnapshot.test.ts` (+51 -0) 📝 `src/application/Setup.ts` (+12 -2) 📝 `src/application/SetupHost.ts` (+25 -1) 📝 `src/application/SetupPlan.ts` (+4 -1) 📝 `src/application/SetupTypes.ts` (+8 -0) </details> ### 📄 Description ## Summary `rea setup` ran a full doctor diagnosis three times during initial planning: once to resolve the Hopper path, once to collect provider registration settings, and once to discover setup state. Production setup now captures those facts in one initial snapshot and shares its diagnosis across planning. The separate post-action doctor call remains fresh, so the returned readiness reflects changes made by setup. Plan disclosure, approval, and dry-run behavior are preserved; this change adds no installation effects. ## Validation - 50 focused setup service and CLI boundary tests passed, including a regression that checks the post-configuration health result comes from a fresh doctor call. - `npm run build:cached` passed. - `npm run check:fast -- --force` passed after merging current `origin/main`. - A 10-round interleaved dry-run benchmark measured 484.08 ms baseline and 446.38 ms candidate median on this host (about 7.8% lower; individual runs had noise). Both plans were 13,078 bytes. Their hashes match after normalizing each worktree root; raw hashes differ because the selected CLI entrypoint path includes the worktree root. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:04 +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#2517
No description provided.