Repository navigation
fix(onboard): terminal hatch connects after guided setup - #130082
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 26, 2026, 7:51 AM ET / 11:51 UTC. ClawSweeper reviewWhat this changesThe PR removes the embedded-local hatch launch mode after guided onboarding so a newly created setup session connects to its running Gateway. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThe prior P1 finding remains on the same head: this fixes fresh setup but makes configured reruns use a Gateway client even though that branch deliberately does not start or verify the Gateway. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGuided onboarding either applies setup, which starts and checks the machine Gateway, or recognizes an existing configuration and leaves its service untouched. Both branches can open the terminal hatch, whose mode selects an embedded runtime or a Gateway client. flowchart LR
A[Guided onboarding] --> B{Existing configuration?}
B -->|No| C[Apply setup and verify Gateway]
B -->|Yes| D[Keep service untouched]
C --> E[Terminal hatch]
D --> E
E --> F{Hatch mode}
F -->|Gateway client| G[Gateway chat]
F -->|Embedded runtime| H[Local chat]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +20. Total +20 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Carry verified Gateway ownership into the hatch decision, using the client only after service verification and preserving a tested recovery path otherwise. Do we have a high-confidence way to reproduce the issue? Yes, from source: an existing Gateway configuration enters the alreadyConfigured branch, skips setup, and reaches the changed non-local hatch launch. Is this the best way to solve the issue? No: globally removing embedded mode is too broad because a configured rerun has not necessarily verified a live Gateway. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e2e5d1bca685. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
669c65c to
a04841c
Compare
|
@clawsweeper re-review The prior configured-rerun blocker is addressed on exact head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…0082) * fix(onboard): connect guided hatch through Gateway * fix(onboard): preserve local hatch reruns --------- Co-authored-by: Amp <[email protected]>
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where users completing guided local setup with the terminal handoff could see the hatch TUI fail immediately because the newly started Gateway already owned the state directory.
Why This Change Was Made
Fresh guided setup now opens the hatch TUI through the Gateway it just installed and verified instead of starting a second embedded local runtime. Configured reruns, which deliberately do not start or verify a Gateway, retain the embedded local hatch. The first-run hatch message and non-delivery behavior stay unchanged.
User Impact
The terminal hatch can open normally after fresh guided setup instead of refusing startup with an active-Gateway state-lock error, without making configured reruns depend on an unverified Gateway.
Evidence
Exact head
a04841cd9de6e871bdfddfff1bd85650c1519b4erebased ontoorigin/maine6ed7e30cc5ff26be72f81edfe590a0288caa4b2:localand use the running Gateway; configured reruns are asserted to preservelocal: trueand skip setup apply.onboard-guided.test.ts, 27 tests passed.pnpm check:changed: passed, including core/test typechecks, lint, boundaries, and import-cycle checks.