Skip to content

fix: export SSH_TTY for remote sessions (#425) - #825

Merged
MisterTea merged 7 commits into
masterfrom
issue-425
Sep 28, 2026
Merged

MisterTea merged 7 commits into
masterfrom
issue-425

Conversation

@MisterTea

@MisterTea MisterTea commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Sets SSH_TTY from the allocated pseudo-terminal immediately before starting the remote shell, and leaves it unset when no terminal name is available.

The regression test drives PseudoUserTerminal::setup() into runTerminal() with a custom SHELL that prints $SSH_TTY, so the check fails if that setenv is removed. Confirmed locally: the test fails with the setenv commented out and passes with it restored. Full local ctest was 505/505 after merging current master.

Closes #425.

Set SSH_TTY to allocated remote tty; test alongside SSH_AUTH_SOCK etc.
@MisterTea MisterTea changed the title Issue: issue-425 test: sketch SSH_TTY coverage for #425 Sep 20, 2026
@MisterTea MisterTea changed the title test: sketch SSH_TTY coverage for #425 fix: export SSH_TTY for remote sessions (#425) Sep 20, 2026
@MisterTea
MisterTea marked this pull request as draft September 20, 2026 16:37
@MisterTea
MisterTea marked this pull request as ready for review September 22, 2026 16:56
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.60000% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.73%. Comparing base (044bcb5) to head (69d82a7).

Files with missing lines Patch % Lines
test/unit_tests/SSH_TTY_Test.cpp 57.62% 26 Missing and 24 partials ⚠️
src/terminal/PseudoUserTerminalUnix.hpp 57.14% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #825      +/-   ##
==========================================
- Coverage   79.88%   79.73%   -0.16%     
==========================================
  Files         152      153       +1     
  Lines       22144    22268     +124     
  Branches    14338    14410      +72     
==========================================
+ Hits        17690    17755      +65     
- Misses       2641     2668      +27     
- Partials     1813     1845      +32     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jasongauci-webai and others added 2 commits September 27, 2026 14:17
Co-authored-by: Cursor <cursoragent@cursor.com>
Drive setup()/runTerminal() with a custom SHELL so CI fails if the
production setenv("SSH_TTY", ...) is removed (#425).

Co-authored-by: Cursor <cursoragent@cursor.com>
@MisterTea
MisterTea merged commit 662c332 into master Sep 28, 2026
37 checks passed
@MisterTea
MisterTea deleted the issue-425 branch September 28, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSH_TTY env var not set when connecting via ET

2 participants