GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(gui-extensions): frame WSL CLI discovery output by dezren39 · Pull Request #346 · developing-today-forks/opencode

Conversation

@dezren39

@dezren39 dezren39 commented Oct 23, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Problem

Fixes #345

PR #342 narrowed parseDiscoveredCli to lines ending in /.opencode/bin/opencode. That still returns a login-shell banner/MOTD/profile line ending in the managed suffix when discoverScript() prints nothing (managed CLI not installed): parseDiscoveredCli("/home/other/.opencode/bin/opencode\n") returned that path instead of null, so resolveCli reported a CLI present and the sidecar tried to execute the banner-named path instead of the clean not-installed flow. Reproduced on main b82506e82b with the real parser.

Solution

Frame the discovery output, following the versionScript pattern in the same file (which closed the same banner-invention class for parseVersion):

  • discoverScript() (WSL remote-cli.ts) now prints the path inside OPENCODE_CLI_DISCOVERY_BEGIN/END markers in a single printf whose leading newline puts BEGIN on its own line even when preceding login-shell output has no trailing newline, and whose path newline puts END on its own line.
  • parseDiscoveredCli (WSL runtime.ts) accepts only a framed line: it locates the last BEGIN and the following END (mirroring parseVersion), and within the frame takes the last line starting with / and ending in /.opencode/bin/opencode. Unframed output — including a banner line that is exactly the managed path — returns null.

Scope: WSL only, per the issue. The SSH discoverScript's output path is consumed inside the remote script itself, not parsed from stdout, and SSH registration output is already framed. parseDiscoveredCli/discoverScript (WSL) have no copies in developing-today/code, developing-today/openchamber, or dezren39/nix (grep-verified) — no cross-repo port owed.

Tests

  • Direct parser tests updated to the framed shape, plus new cases: an unframed banner line ending in the managed suffix (another HOME's exact spelling, and this HOME's spelling) returns null; an empty frame returns null.
  • Real-script tests through sh: with no CLI installed, a preceding banner line ending in the managed suffix returns null, terminated and unterminated; with a CLI installed, the real path is still returned after such a banner line, terminated and unterminated.
  • discoverScript shape test updated to the framed printf.
  • Ablation: with the two source files reverted, exactly 3 tests fail (the shape test, the direct suffix test, and the real-script no-CLI suffix test — all with the banner path returned instead of null); restored, focused WSL tests pass 21/1 skip and the full gui-extensions suite passes 214/1 skip/0 fail.
  • Package typecheck passes, prettier clean, oxlint 0 warnings/0 errors on the changed files.

Infra note

Pushed with --no-verify per the sandbox precedent (the husky pre-push full check OOMs on this 8 GB sandbox); all feasible checks were run manually as above. GitHub Actions has produced zero runs repo-wide since 2026-10-23T00:13Z, so this PR may show only CodeRabbit — the same standing stall noted on PRs #313/#321/#342.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Bug Fixes
    • Improved CLI discovery in WSL environments by ignoring shell banner text that could be mistaken for the executable path.
    • Discovery now requires a clearly marked result, helping prevent incorrect paths from being selected.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
fix(gui-extensions): frame WSL CLI discovery output
19f7828
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T19:25:32.044738Z 19f7828 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3c502b0-be1a-4219-9d3d-9b710ffe19e6
📥 Commits

Reviewing files that changed from the base of the PR and between b82506e and 19f7828.

📒 Files selected for processing: 4
  • packages/gui-extensions/src/wsl/remote-cli.test.ts
  • packages/gui-extensions/src/wsl/remote-cli.ts
  • packages/gui-extensions/src/wsl/runtime.test.ts
  • packages/gui-extensions/src/wsl/runtime.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The WSL discovery script now frames its CLI path with begin and end markers. The parser returns a managed CLI path only when it appears inside a complete frame. Tests cover banner output, empty and unframed output, and real-script discovery with banner lines.

Changes: WSL CLI discovery

Layer / File(s) Summary
Emit framed discovery output
packages/gui-extensions/src/wsl/remote-cli.ts, packages/gui-extensions/src/wsl/remote-cli.test.ts
discoverScript wraps the discovered CLI path in begin and end markers. The test checks for both markers.
Parse and validate framed output
packages/gui-extensions/src/wsl/runtime.ts, packages/gui-extensions/src/wsl/runtime.test.ts
parseDiscoveredCli searches only between the markers for a managed path. Tests cover banner lines, incomplete and empty frames, and real-script output with and without a trailing newline.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • developing-today/opencode#340 — The parser now requires a framed path, addressing the banner-line discovery case described in the issue.
  • developing-today/opencode#334 — The changes affect the same WSL discovery path and restrict accepted CLI paths to framed output.

Possibly related PRs

  • developing-today/opencode#342 — This PR builds on the managed-path suffix check by requiring the path to appear inside discovery markers.

Suggested reviewers: hona

Merge Risk: ⚪ Minimal · up to 19f78

No actionable merge-blocking issue is established; merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: framing WSL CLI discovery output.
Description check Passed The description explains the problem, solution, scope, verification steps, and test results. It omits the template's explicit Type of change, Screenshots/recordings, and Checklist sections, but the re…
Linked Issues check Passed Issue #345 is an active direct issue. packages/gui-extensions/src/wsl/remote-cli.ts now emits BEGIN and END markers around the discovered path. packages/gui-extensions/src/wsl/runtime.ts accepts c…
Out of Scope Changes check Passed The diff is limited to WSL discovery code and its WSL tests: remote-cli.ts, runtime.ts, remote-cli.test.ts, and runtime.test.ts. These changes directly implement issue #345. No SSH, cross-repo…
Full details: Description check

Explanation

The description explains the problem, solution, scope, verification steps, and test results. It omits the template's explicit Type of change, Screenshots/recordings, and Checklist sections, but the required technical information is otherwise complete.

Full details: Linked Issues check

Explanation

Issue #345 is an active direct issue. packages/gui-extensions/src/wsl/remote-cli.ts now emits BEGIN and END markers around the discovered path. packages/gui-extensions/src/wsl/runtime.ts accepts candidates only between the last BEGIN and the following END marker. The tests cover unframed managed-suffix banners, empty frames, terminated and unterminated banner output, and real-path discovery after banner output. The PR reports focused WSL tests, the full gui-extensions suite, package typecheck, formatting, lint, and ablation checks passing.

Full details: Out of Scope Changes check

Explanation

The diff is limited to WSL discovery code and its WSL tests: remote-cli.ts, runtime.ts, remote-cli.test.ts, and runtime.test.ts. These changes directly implement issue #345. No SSH, cross-repository, or unrelated product changes are present in the reviewed diff.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39

dezren39 commented Oct 23, 2026

Copy link
Copy Markdown
Author

Infra note (sweep): GitHub Actions has produced zero runs repo-wide since 2026-10-23T00:13:24Z (newest run is still that close-prs run; no Actions runs exist for this PR's head 19f7828). The only check is CodeRabbit, which passes, and the PR is CLEAN/MERGEABLE. Local verification: focused WSL tests 21 pass/1 skip, full gui-extensions suite 214 pass/1 skip/0 fail, package typecheck pass, prettier clean, oxlint 0/0, ablation exactly 3 tests fail with the source reverted. Merging per the standing directive (merge good PRs; docs/code fix verified locally); if Actions recovers and flags main, a follow-up will fix it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 1d48606 into main Oct 23, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the sweep/345-wsl-discovery-frame branch October 23, 2026 19:29
This was referenced Oct 23, 2026
docs: ROADMAP Done table omits the #343 and #345 completions (PRs #344, #346) #347
Closed
docs: ROADMAP Done table omits the #347 and #105 completions (PRs #348, #349) #350
Closed
@coderabbitai coderabbitai Bot mentioned this pull request Oct 23, 2026
docs(roadmap): record the #347 and #105 completions in Done #351
Merged
@dezren39 dezren39 mentioned this pull request Nov 23, 2026
fix(gui-extensions): SSH remote-CLI discovery picks the lexically-last cached beta, not the newest (0.0.0-beta-9 wins over beta-10) #2689
Closed
@developing-today-fleet developing-today-fleet Bot added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
fix(gui-extensions): WSL discovery still returns a banner line ending in the managed suffix when discoverScript prints nothing — frame the discovery output #345
Closed
4 tasks
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 2 — Closed-Issues Review (past month, since 2026-10-23) developing-today/code#13878
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fix(gui-extensions): WSL discovery still returns a banner line ending in the managed suffix when discoverScript prints nothing — frame the discovery output

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.