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): put the WSL probeDistro answers on their own lines by dezren39 · Pull Request #301 · developing-today-forks/opencode

Conversation

@dezren39

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

Uh oh!

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

Copy link
Copy Markdown

Closes #294

Problem

probeDistro in packages/gui-extensions/src/wsl/runtime.ts ran command -v bash >/dev/null && printf yes || printf no (and the curl twin) via runWslSh — a login shell (sh -lc). The printf had no leading newline, and parseProbeAnswer reads the last non-empty trimmed line, requiring it to be exactly yes. If preceding login-shell output (banner/MOTD/profile) ended without a trailing newline, the answer glued onto it — welcome to dev boxyes ≠ yes — so an installed bash/curl read as missing and the distro could never become ready. This was the one sibling read left unframed by #293.

Reproduced on main 291ff1e4e3 with the real probe command: unterminated preceding output yields stdout welcome to dev boxyes, parsed ≠ yes.

Solution

Following the #293 / version-frame precedent (leading newline in the probe print):

  • Extracted the probe command into an exported probeScript(tool) that prints printf '\nyes\n' / printf '\nno\n' — the answer always lands on its own line, whatever preceded it.
  • probeDistro now runs probeScript("bash") / probeScript("curl"). parseProbeAnswer is unchanged: the last line is the answer, so a banner ending in yes cannot become a false positive for a missing tool (the glued-no and banner-yes cases are covered by tests).

Single-repo: GitHub code search confirms no parseProbeAnswer/probeDistro copies in developing-today/code, developing-today/openchamber, or dezren39/nix.

Tests

  • New tests in runtime.test.ts run the real probeScript through sh and read it with the real parseProbeAnswer: no preceding output, terminated preceding output, and unterminated preceding output — for bash and curl (yes) and for a missing tool (no), including banners ending in yes.
  • Ablation: removing the leading newlines makes the new through-the-script test fail with the exact reported welcome to dev boxyes.
  • bun test src/ in packages/gui-extensions: 212 pass, 1 skip (WSL-only), 0 fail. Package typecheck passes. lint:changed against origin/main: 0 problems in the 2 changed files.

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 detection of Bash and curl availability in WSL environments when shell startup messages appear before the probe result.
    • Probe results are now separated from preceding shell output, helping ensure available tools are recognized and missing tools are reported accurately.

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@dezren39
fix(gui-extensions): put the WSL probeDistro answers on their own lines
920bf7e
@github-actions github-actions Bot added the needs:compliance label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

All reactions

Sorry, something went wrong.

Uh oh!

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026

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 🔄 Running since 2026-10-22T22:48:35.824555Z 920bf7e 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 22, 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: 1147cd9c-499e-4792-851a-e11cadbd4b5e
📥 Commits

Reviewing files that changed from the base of the PR and between 291ff1e and 920bf7e.

📒 Files selected for processing: 2
  • 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 Bash and curl availability checks now use newline-delimited probe answers. Tests verify that preceding login-shell output does not alter the parsed result.

Changes: WSL tool probe framing

Layer / File(s) Summary
Probe answer framing
packages/gui-extensions/src/wsl/runtime.ts, packages/gui-extensions/src/wsl/runtime.test.ts
probeScript surrounds yes and no answers with newlines. probeDistro uses the helper for its Bash and curl checks. Tests cover preceding output with and without a trailing newline, including output ending in yes.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: hona

Merge Risk: ⚪ Minimal · up to 920bf

The WSL probe answer framing appears ready to 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 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 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 primary WSL probeDistro fix.
Description check Passed The description explains the issue, solution, verification steps, test results, and linked issue. It omits the template's explicit Type of change and Checklist sections, but the required technical con…
Linked Issues check Passed The pull request addresses all coding requirements in [#294]. probeScript(tool) adds leading and trailing newlines to both yes and no answers. probeDistro uses it for both the bash and curl ch…
Out of Scope Changes check Passed The changes stay within [#294]. The source change extracts the WSL probe script and updates only the bash and curl probe calls. The added tests directly verify the required probe behavior. No unrelate…
Full details: Description check

Explanation

The description explains the issue, solution, verification steps, test results, and linked issue. It omits the template's explicit Type of change and Checklist sections, but the required technical context is otherwise complete.

Full details: Linked Issues check

Explanation

The pull request addresses all coding requirements in [#294]. probeScript(tool) adds leading and trailing newlines to both yes and no answers. probeDistro uses it for both the bash and curl checks. Tests execute the real script through sh and parse output with parseProbeAnswer for no preceding output, terminated output, unterminated output, available tools, and a missing tool. The tests also cover banners ending in yes. The changed parser behavior preserves whole-line matching. The reported WSL suite and typecheck pass.

Full details: Out of Scope Changes check

Explanation

The changes stay within [#294]. The source change extracts the WSL probe script and updates only the bash and curl probe calls. The added tests directly verify the required probe behavior. No unrelated product behavior or repository scope is changed.

✨ 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.

@github-actions

github-actions Bot commented Oct 22, 2026

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
dezren39 merged commit 4f05b14 into main Oct 22, 2026
22 of 24 checks passed

Uh oh!

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

@dezren39
dezren39 deleted the sweep/294-probe-distro-frame branch October 22, 2026 22:54
This was referenced Oct 22, 2026
docs: ROADMAP Done table omits the #299 and #294 completions (PRs #300, #301) #302
Closed
docs(roadmap): record the #299 and #294 completions in Done #303
Merged
docs: ROADMAP Done table omits the #302 completion (PR #303) #304
Closed
docs(roadmap): record the #302 completion in Done (#304) #305
Merged
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

needs:compliance

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fix(gui-extensions): WSL probeDistro printf yes/no glues onto unterminated login-shell output — installed bash/curl read as missing

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.