Skip to content

refactor(ide): share python install helper across jupyter and marimo - #1684

Open
skevetter wants to merge 2 commits into
mainfrom
refactor/surface-python-ide-install
Open

skevetter wants to merge 2 commits into
mainfrom
refactor/surface-python-ide-install

Conversation

@skevetter

@skevetter skevetter commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add serverutil.InstallPythonTool (pkg/ide/internal/serverutil/python.go) to own the existence check, install command selection, log lines, and error wrapping.
  • jupyter and marimo Install() now call the helper with their own Name, Package, and Executable. The duplicated installNotebook/installMarimo bodies are removed.
  • Argv and working dir are unchanged: SuOrSh(user, cmd, "") produces the same su/sh -c argv as before.

Why

Both IDEs carried a ~30-line copy of the same Python install path. The shared helper keeps install behavior and error wrapping consistent across tools, using the existing serverutil internal utility.

Validation

Head 748f41ff08cd1b6199acd9bc05b70f1ff2a31a36.

  • CI Lint on 84a3290 failed on the new python_test.go (funcorder, gosec G306, gosec G304). Local cli:lint:ci at 84a3290 used --new-from-patch, which skips untracked files, so it did not cover that file. The earlier "0 issues" result did not include it.
  • Fix in 748f41f: useFakeUv moved after the exported tests; the stub is written with os.OpenFile(filepath.Clean(path), …, 0o600) and f.Chmod(0o700) on the open handle; the read uses filepath.Clean. No nolint or #nosec added.
  • mise run cli:format: clean.
  • go test ./pkg/ide/internal/serverutil/... -count=1: pass.
  • golangci-lint run ./pkg/ide/... (full, no new-from-patch): no findings in serverutil/python*.go, jupyter/jupyter.go, or marimo/marimo.go. The package still reports pre-existing findings in untouched files (rstudio, jetbrains, openvscode, zed, vscode, fleet, opener); out of scope.
  • prek run --all-files: all hooks passed, including golangci-lint.
  • jupyter and marimo have no test files; no E2E run.

CodeRabbit CLI

Blocked: free OSS quota exhausted (rate_limit). Attempts at 84a3290 (--agent --fresh --committed) both returned rate_limit, about 5 min wait. A third attempt on 748f41f (--agent --fresh --committed) also returned rate_limit (waitTime 2 min). No review on 748f41f; no findings verified. GitHub review gates still apply.

Auto-merge

Eligible under devsy-auto-refactor: behavior-preserving internal API change, +54 / -64 (118 non-test lines, cap 300), no excluded paths. Subject to all coordinator gates.

@skevetter skevetter added the surface-refactor Unattended refactor (surface) label Oct 24, 2026
@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 748f41f
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6adc5c5fa5427685f78314b6

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0773fd30-7bee-46ca-b4c8-7dcf8d1c1bb3
Commits

Reviewing files that changed from the base of the PR and between df78ff3 and 748f41f.

Files selected for processing: 4
  • pkg/ide/internal/serverutil/python.go
  • pkg/ide/internal/serverutil/python_test.go
  • pkg/ide/jupyter/jupyter.go
  • pkg/ide/marimo/marimo.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 748f41f
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6adc5c5f570879468a0c1c00

@skevetter
skevetter marked this pull request as ready for review October 24, 2026 08:17
@skevetter

Copy link
Copy Markdown
Contributor Author

Needs human: current head 748f41f has a failing Windows ssh-tunnel-mode test (job 120819045768), so CI Success failed. The sequential-SSH spec failed during startDetachedTunnelUp with deadline_exceeded before workspace creation; three preceding specs passed. Logs do not prove a transient infrastructure failure, so no rerun or unrelated source change was made. All other CI checks are terminal. Non-test diff remains +54/-64 (118 lines); both commits are signed and verified. Auto-merge is blocked pending investigation and passing CI. Local CodeRabbit CLI was quota-limited; GitHub completed review is still required.

@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the shared helper preserves the existing install behavior.

Summary

Moves the shared Python install steps into serverutil.InstallPythonTool.

  • Jupyter Notebook and marimo use one shared Python installer.

Reviews (1) · Last reviewed commit: "test(ide): satisfy lint in python instal..." · Reviewed by Greptile

@skevetter

Copy link
Copy Markdown
Contributor Author

Final cycle disposition: needs human. Greptile completed on 748f41f with 5/5 confidence, four files reviewed and no findings. CodeRabbit CLI and GitHub are quota-limited; the GitHub success status says Review rate limited and is not completed review coverage (reset advertised in 39 minutes at 08:17 UTC). CI is terminal: 99 successes including Greptile, 3 conditional skips, 7 neutral checks, and 2 failures (Windows ssh-tunnel-mode plus CI Success). No unresolved review threads. No rerun was made because logs do not establish a transient infrastructure failure. PR is ready for human investigation; workspace and branch retained for the next cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l surface-refactor Unattended refactor (surface)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant