refactor(notebook): extract runtime selection workflows - #652
Merged
Conversation
Codex ReviewVerdict: mergeable No actionable findings. Summary: Static inspection found no concrete merge-blocking defects in the pull request changes. Branch and title prechecks are valid; tests and validation commands were not run per instruction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Notebook runtime selection behavior still lived inside Electron IPC registration: discovery, external-runtime validation, overlay preparation, persistence ordering, enablement, disable/revoke sequencing, usage projection, installation authorization, and manual interpreter catalog mutation. This made transport code the implicit application interface and obscured which component owned failure semantics.
Proposed change
Extract a transport-neutral
RuntimeSelectionWorkflowsmodule with nine application commands, then reduceruntime-ipc.tsto unchanged channel registration plus the one genuine Electron host adapter: the native interpreter picker.The workflow owns:
survey,listEnvironments,setSelection,getEnablement, anddescribeUsage;setEnvironmentEnabled,setInstallAuthorized,register, andunregister.Scope and non-goals
runtime:pick-interpreter.readiness -> prepare -> persist -> fresh survey -> selected-runtime readinessordering.src/main/ipc.ts, preload/Web/HTTP/CLI/shared contracts, wire schemas, persistence format, data relationships, UI, or capability availability.Commits and size
refactor(notebook): extract runtime selection workflowsFinal diff: four Notebook files. Production churn is 427 changed lines; test churn is 945 changed lines because behavior coverage moved from the IPC harness to the workflow seam. The production diff is within the 425–505 preflight estimate and below the 520 re-review stop and 700 hard stop.
Acceptance criteria and validation
Branch head
3274846is based onorigin/main5cfd4d1, ahead/behind1/0, with a clean worktree.5cfd4d1.npm run typecheck-> passed on the final head.--max-warnings=0-> passed with zero findings.npm run lint-> 0 errors; 18 warnings are unchanged baseline files.npm test-> passed on the final head. The pre-rebase full run reported 685 files passed / 15 skipped and 10,024 tests passed / 184 skipped; after the non-overlapping Global Search rebase, the exact final suite again exited successfully.git diff --check-> passed.The branch rebased without production/test conflicts from
38be3a8to5cfd4d1. The named pre-rebase stash remains as a temporary recoverable backup and is not part of the commit.Review focus
Residual risk
No live interpreter selection, packaged Electron picker, or manually paired remote-browser journey was run locally. Focused integration tests cover the workflow/adapter and surface contracts; exact-head CI remains the merge gate.