GeezerVison is showing github.com — fix(ssh): failed launches report only their own output by saphid · Pull Request #35717 · pingdotgg/t3code
Conversation
Problem
A failed managed SSH launch shows errors from an earlier server because every launch appends to the same server.log. A silent new failure can therefore point the user at the wrong cause.
Change
Unlink the log immediately before starting a new managed server. An earlier process can keep writing to its old open descriptor without contaminating the new log; truncating the file would keep that problem. Reconnecting to a running server preserves its log.
Scope
Fresh recovery of #22333, closed for age. This uses @MarMarLabs's smaller original fix from #8930, now that Julius's home-wide launch lock in #32587 serializes startup and reuse. Three files, one diagnostic bug; no new setting or runtime-log retention scheme. Maria's earlier OpenSSH/Electron verification on the closed PR is historical.
Verification
- The added tunnel regression fails on main and with truncation in place of unlinking. It passes with the fix, including a late write through an earlier process's open descriptor. All 26 tunnel tests pass.
CI=true vp run check:changed 39f465a926ca95496708f798a823600e07fe6060 passes format, lint, knip, typechecks for five packages and 28 tests across two files on Linux/Node 26.12.1. All three contribution files match the frozen reviewed tree byte-for-byte in the source-synced sandbox; its Git anchor is synthetic.
- Real isolated loopback OpenSSH 9.6 with the generated launch script and real port/readiness helpers: main reports
FIRST_FAILURE plus SECOND_FAILURE; candidate reports only SECOND_FAILURE. A subsequent silent failure reports It wrote nothing to …/server.log. Recovery succeeds, and reconnect preserves the same server PID and log inode.
- That runtime diagnostic uses a temporary home, a forced shell command, shorter readiness timeouts and a miniature Node HTTP server. It is not packaged T3/Electron, an ordinary login-shell session, remote macOS, Windows-client or archive-download proof. The focused shell regression separately covers the old-descriptor case.
- Independent review: OpenAI GPT-6.1 Sol (high), Codex through T3
delegate_task, completed on frozen tree b8f61f85cf29 with no actionable findings; task 6292d880-2c72-4bd6-8759-848db6ae392a. The reviewer inspected supplied test logs without rerunning them. Hosted CI is pending.
Original fix by MarMar Labs; recovery implementation by Claude Opus 5.5 in Claude Code through T3 Code. Integration and verification by GPT-6.1 Sol (high), Codex in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
A managed SSH launch appended to the previous launch's server.log, so a
launch whose server exited silently showed an earlier server's errors
and never reached the "It wrote nothing" message. Unlink the log right
before each new managed launch. A process left from an earlier launch
keeps writing to the unlinked file, so its late output cannot reach the
new log, as it could after truncation. The remote launch lock from
pingdotgg#32587 already serializes launches on one home, so a waiting launch
reuses a running server instead of unlinking its log.
Original fix by MarMarLabs in pingdotgg#8930. Replaces pingdotgg#22333.
Co-authored-by: MarMar Labs <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Nov 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Each SSH-managed server launch removes the existing server.log before startup. A regression test checks that earlier process output does not appear in the new launch’s error. The observability documentation describes this log behavior.
Changes: SSH launch log isolation
| Layer / File(s) |
Summary |
Unlink and validate the launch log packages/ssh/src/tunnel.ts, packages/ssh/src/tunnel.test.ts, docs/operations/observability.md |
The launch script unlinks the prior log before starting a server. A regression test checks that earlier output is excluded from the new launch’s error. The documentation states that the log contains output from the latest launch. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to ccd71
-
SSH-managed launches now report only their own output when they fail. The change is small, reversible, and covered by a regression test, so merge risk is minimal.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: failed managed SSH launches now report only their own output. It is a conventional commit title in plain language. The changeset unlinks server.log before a new manage… |
| Description check |
 |
The description follows the template. It has Problem, Change, Scope, and Verification sections, each with substantive content. The Problem section states the cause and the impact. The Change section e… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: failed managed SSH launches now report only their own output. It is a conventional commit title in plain language. The changeset unlinks server.log before a new managed server starts, and the added test checks that a failed launch shows no earlier-launch output. The title is specific and matches the objectives.
Full details: Description check
-
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, each with substantive content. The Problem section states the cause and the impact. The Change section explains the unlink approach and why truncation is not enough. The Scope section links the related PRs and explains why the change is a bug fix. The Verification section lists focused tests, a repo check command, a runtime OpenSSH diagnostic, and an independent review, and it states the limits of that testing. The description does not state a reproduction step for a user-facing environment beyond the diagnostic, and it does not include the model and harness line in the required form. Those gaps are minor.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between dbdae22 and ccd7144.
Files selected for processing: 2
-
packages/ssh/src/tunnel.test.ts
packages/ssh/src/tunnel.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — Failed SSH launches will report only their own output, without stale errors from earlier launches. This also discards prior persisted launch logs, requiring a human decision on the change to default log retention.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Linux desktop, Electron 44.10.1, light theme, 1280 × 900. Independently built commits, fresh T3 homes, real loopback OpenSSH, synthetic data only.
Settings → Environments → Add environment → SSH (t3repro): launch FIRST_FAILURE, retry with SECOND_FAILURE, then retry with a silent executable. Each attempt uses the full readiness timeout. Separately, connect two fresh desktops to one real running server.
Reuse recordings join the two connection attempts and omit first-run setup between them. The reuse transcript records unchanged PID and inode, retained sentinel, and exactly one managed launch on both commits.
Scripts: failed-launch driver, SSH fixture setup, reuse driver. Launch errors and remote log transcript.
Not shown:
- A prior process continuing to write through an already-open log descriptor was not exercised; the reported failure fixture exits immediately.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
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.
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.
|