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 — test(shared): login-shell capture test no longer copies printenv by IzonIcy · Pull Request #40473 · pingdotgg/t3code

Conversation

@IzonIcy

@IzonIcy IzonIcy commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Problem

readEnvironmentFromLoginShell's profile-replaces-PATH test copies the host's printenv into a temporary prefix to simulate a machine whose login shell has no printenv on PATH. On macOS /usr/bin/printenv is a shared-cache stub, so the copy cannot execute: it is killed with SIGKILL, every capture comes back empty, and the test fails on every run.

$ vp test run packages/shared/src/shell.test.ts -t "captures values when the profile replaces PATH"
× captures values when the profile replaces PATH and a DEBUG trap echoes commands
  → expected {} to deeply equal { Object (PATH) }
Tests  1 failed | 79 skipped (80)

$ cp /usr/bin/printenv /tmp/printenv && /tmp/printenv PATH
Killed: 9

Expected: the test passes on macOS, like it does on the Linux runners that run it in CI. Actual: packages/shared is red on a clean macOS checkout for every contributor, and Linux-only CI cannot see it.

Change

Write a two-line #!/bin/sh shim named printenv in the private prefix instead of copying the system binary. The capture only needs the value of the named variable, which the shim reads from the environment. The assertions and the simulated host are unchanged.

Scope and approval

Test-only fix for an obvious defect, so it needs no prior discussion: no product behavior changes, one test, and the failing assertion is the defect. It is not a skipped or weakened test; the same assertions run, and the test still fails when the behavior it covers regresses.

Verification

  • vp test run packages/shared/src/shell.test.ts → 80 tests, 77 passed, 3 skipped (before: 1 failed / 76 passed).
  • vp test run packages/shared/src → 108 files, 1892 passed, 5 skipped.
  • vp lint packages/shared/src/shell.test.ts → 0 warnings, 0 errors.
  • vp run --filter @t3tools/shared typecheck → 0 errors.
  • Mutation check: reverting the shim and empty-ing the inherited PATH argument in buildEnvironmentCaptureCommand makes the test fail again, so the test still covers the fallback it was written for.

Could not check: the CI-only Linux path, which is unchanged in behavior (/bin/sh reads the same variable the copied binary did).

DeepSeek V4.1 Flash via Capy

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
@IzonIcy
test(shared): login-shell capture test no longer copies printenv
e4309b6
The test copied /usr/bin/printenv into a private prefix to stand in for a
host whose login shell lacks it. On macOS that binary is a shared-cache
stub, and the copy dies with SIGKILL, so every capture comes back empty
and the test fails on every run there. A two-line shell shim reads the
same variable from the environment and runs anywhere.
Copilot AI balanced review requested due to automatic review settings November 21, 2026 18:34
Copilot AI reviewed Nov 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The 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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T18:36:22.889630Z e4309b6 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.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Bash login-shell test now creates a private printenv script instead of copying the host executable. Its comment describes a non-FHS host where only the private prefix contains printenv.

Changes: Bash login-shell test

Layer / File(s) Summary
Private printenv test setup
packages/shared/src/shell.test.ts
The test writes an executable printenv script in the temporary tools directory. The comment describes a non-FHS host where only the private prefix contains printenv.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: lucenx9, macroscopeapp

Merge Risk: Minimal · up to e4309

This change only makes a shell environment test work on macOS by using a simple script in place of a copied system binary. It does not alter production behavior, and merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(shared): login-shell capture test no longer copies printenv" directly describes the main change: the login-shell capture test now creates a shim instead of copying the host printenv bi…
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section explains the macOS SIGKILL failure and reproduction steps. The Change section explains the …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(shared): login-shell capture test no longer copies printenv" directly describes the main change: the login-shell capture test now creates a shim instead of copying the host printenv binary. It is specific, follows the conventional commit style used by the repository template, and matches the raw summary and objectives.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section explains the macOS SIGKILL failure and reproduction steps. The Change section explains the two-line #!/bin/sh shim. The Scope section explains why no prior issue is linked and states that the change is test-only. The Verification section lists focused and repo-wide test, lint, and typecheck results, plus a mutation check and an unchecked Linux CI path. The description states the model used at the end, as the template asks. The Scope section gives a reason for omitting a linked issue, which the template permits for small obvious fixes. Overall the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 194025e
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4883f24c-6b72-462d-8183-e43d8db78152
Commits

Reviewing files that changed from the base of the PR and between 194025e and e4309b6.

Files selected for processing: 1

  • packages/shared/src/shell.test.ts

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@callmemorgan callmemorgan mentioned this pull request Nov 21, 2026
fix(shared): macOS bare spawns no longer allocate ghost PIDs for each PATH miss #40612
Open

This branch has not been deployed

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

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

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

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@IzonIcy
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.