GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — fix(shell): preserve literal carriage returns in captured values by Lucenx9 · Pull Request #35702 · pingdotgg/t3code Conversation
Contributor
ProblemShell environment capture strips a literal trailing carriage return from a value when the probe uses LF delimiters. For example, an exported ChangeUse the opening marker's newline to remove exactly one delimiter at each boundary, preserving CR characters that belong to the value. Desktop now uses the shared decoder for its login-shell and PowerShell probes, replacing its duplicate decoder with the same bug. Missing and empty variables remain omitted. For an LF-framed value, flowchart LR
A["Socket pathname ends in CR"] --> B["LF-framed capture"]
B --> C["Before: strips CR + LF"]
B --> D["After: strips only LF"]
C --> E["Different socket: connection fails"]
D --> F["Original socket: agent reachable"]
ScopeA small fix for an obvious value-corruption bug; no issue required under CONTRIBUTING.md. Command generation, environment forwarding and wire contracts are unchanged. Targeted duplicate searches and inspection of the closest PRs found no equivalent decoder fix; #32646 fixes DEBUG-trap output and #35617 fixes Verification
Linux Bash and native OpenSSH only; no native macOS/Windows or interactive desktop session. Local Node 24.15 differs from the repository's Node 26.12.1. Independent read-only reviews: Daybreak Blue high, Sonnet medium, Opus 5.5 medium and Gemini 4 Argon all APPROVE; no blocking findings. Reviewers did not rerun tests. Gemini was used only as a reviewer. Authored with GPT-6.1 Sol in the Codex harness.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Shell environment capture now preserves literal carriage returns and uses one shared decoder across desktop probes. Commands and environment selection remain unchanged, keeping the change narrowly scoped to value preservation. You can add or adjust custom eligibility rules. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Extraction behavior and desktop probe integration packages/shared/src/shell.ts, packages/shared/src/shell.test.ts, apps/desktop/src/shell/DesktopShellEnvironment.ts |
The extraction utility removes at most one leading and trailing line ending, using CRLF framing when present and LF otherwise. Tests cover both framing types and preserve the captured value. Login-shell and PowerShell probes now call the shared utility. Its result type is Record<string, string>. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
extractEnvironmentValues to read shell environment values and merge PATH and JAVA_HOME into the process environment.Suggested reviewers: juliusmarminge, serendeep, macroscopeapp
3ea68The change preserves literal trailing carriage returns in captured shell environment values. No actionable merge-blocking risk was identified.
Explanation
The title names the fix and its subject: literal carriage returns are preserved in captured shell environment values. It follows the conventional commit format, is one sentence, and matches the described change in the summary and objectives. It does not cover the desktop decoder swap, but that is expected.
Explanation
The description follows the template's Problem, Change, Scope, and Verification sections. It explains the bug with a concrete SSH_AUTH_SOCK example and reproduction. It describes the shared decoder change and states that no issue is needed for this small fix. Verification gives specific test counts and observed results. It also states which checks were not run, such as native macOS and Windows. The description is long, and some verification detail goes beyond what the template asks for. It also mentions a Node version mismatch and reviewer tooling, which the template does not require. The required sections are all present and substantive, so the check passes.
81d2e92c-45b2-41f5-9131-f6a1d2c5778fapps/desktop/src/shell/DesktopShellEnvironment.tspackages/shared/src/shell.test.tspackages/shared/src/shell.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
EvidenceRan the same Linux Electron reproduction on fresh synthetic state, light theme, 1440×900. A private empty SSH agent used a socket pathname ending in literal CR, exported only by .bash_profile. Added an empty local Git project, created a replay thread, and checked the inherited value and ssh-add status in its non-login terminal, followed by a bash -lc control. The displayed pathname is limited to its basename for privacy.
The login-shell control preserves CR and reaches the empty agent on both commits. Exit code 1 means the reachable agent has no identities. Reproduction and capture driver · Run metadata and observations Not shown:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.