Repository navigation
fix(server): recover the login shell SSH agent - #10312
yashranaway wants to merge 6 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Restores the login shell’s SSH agent when the server starts without one, while preserving inherited sockets and prepared environments. The change reuses the existing startup probe and does not modify keys or persistent configuration. You can add or adjust custom eligibility rules. Learn more. |
|
Note This comment is posted by Julius' dot The reporter in #10179 returned “absent” when the login shell started without SSH_AUTH_SOCK, and this patch reads that same login-shell environment. Can you remove the “Fixes #10179” claim and limit the stated coverage to agents available from the login shell, or provide evidence showing how this path recovers that reporter's socket? The verification requirement calls for evidence matching the claimed fix; #5740 remains a useful, distinct case. |
…e-03/10312 # Conflicts: # apps/server/src/os-jank.test.ts # apps/server/src/os-jank.ts
|
Taking over this one. I’m retaining @yashranaway’s login-shell agent recovery, resolving main’s PATH/mise and prepared-environment conflicts, and replacing the test-only hydrator seam with startup behavior coverage. Headless Linux proof uses two isolated SSH agents. Leaving it unmerged for credential-propagation review. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Takeover complete at d189ceac58. Current-head build, lint, and test jobs pass; skipped jobs remain skipped. No unresolved inline findings. One full independent review round with Claude Opus 5.5 and GPT-6-Sol found no code blockers. The PR body contains the current focused tests, headless proof, original-author credit, and platform limits. Macroscope correctness passed. Its neutral approvability result explicitly requires human review of login-shell credential propagation. Leaving unmerged. |
Resolve the conflict with JAVA_HOME hydration by reading JAVA_HOME and SSH_AUTH_SOCK from the same login-shell probe, and fold the SSH agent tests into one case alongside main's JAVA_HOME test. AI-assisted; verified with the tests and tools listed above.
EvidenceThe shared POSIX startup/signing behavior reproduces on Linux. Windows desktop launching WSL was not exercised. On both commits: launch the real server without SSH_AUTH_SOCK, expose a loaded signing agent through its login shell, enable SSH commit signing, modify README.md, and submit the same explicit message through Git action options > Commit.
Base creates no commit. Its actual toast exposes a generic Git failure; the subsequent terminal diagnostic shows Both recordings are continuous 30 fps captures without splicing, reordering, or speed changes. Stills were extracted from the processed recordings. Only the repository path is masked in the base toast; the terminal error remains visible and untouched. The inherited-socket guard also passed: the login-shell agent has no identities, the inherited agent contains the signing identity, and the app creates distinct synthetic commit Inherited-agent continuous recording · Driver and seed scripts · Supplementary verification transcript AI-assisted; verified with the tests and tools listed above. Not shown:
|
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo Closing. This PR has been open for more than 3 weeks, and |



Problem
The Windows desktop WSL backend can start without
SSH_AUTH_SOCKeven when its login shell exports a working agent. With SSH commit signing enabled, Commit, Commit & push, and Commit, push & PR then fail at the commit step.Change
Recover a missing
SSH_AUTH_SOCKalongside PATH from the accepted login-shell probe during unprepared Linux/macOS server startup. Preserve an inherited socket, the prepared-environment early return, and PATH/mise hydration.Scope and approval
Fixes #5740
GitCafe: https://git.cafe/pingdotgg/t3code/issues/5740
Triaged bug via the automated issue flow. Existing contributor implementation and maintainer takeover retained. Limited to agent sockets exported by the login shell; it does not address #10179.
Verification
Rechecked during issue triage on October 22:
vp test run apps/server/src/os-jank.test.ts packages/shared/src/shell.test.ts: 63 passed, 1 skipped at the PR head.fixPathplus real Git SSH signing, using an isolated agent, disposable key and a wrapper shell: current main 3b95e7831b leaves the socket absent and commit exits 128; PR head recovers the socket, commit exits 0, and the commit contains an SSH signature. This is a direct server-startup behavior check, not a Windows/WSL desktop reproduction.cannot-verify desktop-wslbecausewsl.exeis unavailable here.5740-runtime.mjs
5740-runtime-current-main.log
5740-runtime-pr.log
Previously recorded verification follows:
Verification on d189ceac58:
fixPaththrough a real login-shell wrapper and two temporary empty SSH agents:The wrapper avoids user profiles; mise’s record was synthetic. Empty-agent connectivity does not establish key signing, remote Git authentication, or a provider CLI flow. macOS, Windows, iOS, Android, Electron desktop, OrbStack, and WSL were not verified live. No visual UI change; screenshots do not apply.
One independent review round (Claude Opus 5.5 and GPT-6-Sol) found no code blockers. Historical GitHub findings were rechecked against this revision. Windows desktop/WSL remains unverified (
cannot-verify desktop-wsl); this Linux VM has nowsl.exe.Tests: GPT-6-Astra; implementation: GPT-6.1-Sol; adversarial reviews: Claude Opus 5.5 and GPT-6-Sol. T3 Code using the Codex and Claude harnesses.