# issue-23413 fresh post-mainmerge service evidence

Base production: `4040867bb46a90a8f41c687d7b454b5ece97a34f`.
Final production and test fixture: `fa4f43f61f279921eb7b9803c01f812d0d779efa`.
Branch: `fix/issue-23413`; task checkout: `/home/ubuntu/wt/issue-23413` (clean before and after).
Captured 2026-10-22 UTC. Linux 6.1.102 x86_64 / glibc 2.39; OpenSSH_9.6p1 Ubuntu-3ubuntu13.19, OpenSSL 3.0.13.

## Results

| Row | Fixture | Baseline | Final | Proof |
| --- | --- | --- | --- | --- |
| O1 | Agent advertises accepted ED25519 key, refuses signing; password-enabled host | 2 attempts / 2 prompts; prompt cancellation hides signing error | 2 attempts / 0 prompts; original SshCommandError, exit 255, exact stderr retained on each | [before](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/fdb5bf00a4211464/before-O1.log) / [after](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/273f926e4321c2d5/after-O1.log) |
| O2 | Agent disconnects during signing; password-enabled host | 2 attempts / 2 prompts | 2 attempts / 0 prompts; original communication-with-agent signing stderr, SshCommandError, exit 255 retained | [before](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/56424ceb531abb69/before-O2.log) / [after](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/57f0117b804fb5f9/after-O2.log) |
| O3 | Agent refuses signing; publickey-only host | 2 attempts / 2 prompts | 2 attempts / 0 prompts; original signing stderr, SshCommandError, exit 255 retained | [before](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c7c8dc9d2ced284c/before-O3.log) / [after](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1c24a04ac0385c92/after-O3.log) |
| O4 | Identity fetch fails before key offered; password host (mocked command) | 1 prompt | 1 prompt | Same final tunnel.test.ts fixture, red/green tests |
| O5 | Standalone publickey denial, no signing diagnostic (mocked command) | 1 prompt | 1 prompt | Red/green tests; prior real encrypted-disk-key control: raw SSH BatchMode=yes exits 255; BatchMode=no + askpass authenticates and printf AUTHENTICATED exits 0 |
| O6 | Ordinary password and keyboard-interactive denials (two mocked command cases) | 1 prompt each | 1 prompt each | Red/green tests |

The fresh real-runtime baseline and final captures use the same local protocol-agent fixture and real SshEnvironmentManager/OpenSSH against 127.0.0.1:44231. Only production imports, password mode, and agent failure mode vary as recorded in each log header. Both probes are otherwise identical. The fixture now awaits bounded socket readiness before invoking the manager, identically for both revisions. Readiness causes an expected pre-auth connection-close entry in sshd stderr.

`validate.py` parses all twelve ATTEMPT JSON records, checks total and actual prompt invocations, two accepted-key/signing requests per run, revision stamps, original command exit codes, expected diagnostics/method lists, and compares each final returned stderr byte-for-byte with both its command failure and the corresponding baseline command failure. All assertions passed; see assertions.log.

## Tests and commands

Command for both revisions: `vp test run packages/ssh/src/auth.test.ts packages/ssh/src/tunnel.test.ts`.
Baseline: disposable detached checkout `/tmp/t3-issue-23413-proof-base` at the exact base, dependencies installed with `pnpm install --frozen-lockfile`, and only final-head tunnel.test.ts copied over the existing test path. Original production remained untouched. Result: exactly three signing cases fail (expected 0 prompts, actual 1), 13 pass, exit 1. Controls O4–O6 pass.
Final checkout: same command, 16 pass, exit 0. auth.test.ts is unchanged across revisions.

Runtime command template: `PROOF_WORKTREE=<checkout> PROOF_PROBE=<probe.ts|probe-base.ts> PASSWORD_AUTH=<yes|no> AGENT_FAILURE=<refuse|disconnect> python3 /tmp/issue-23413-runtime/run.py`. Exact invocation, SHA, capture timestamp, environment, Node/pnpm and SSH versions appear in every runtime log. Validation: `python3 /tmp/issue-23413-runtime/validate.py`.

## Scope and limits

Full base-to-final diff inspected: only auth.ts (+4) and tunnel.test.ts (+96), 100 insertions. Production adds only the agent-signing guard. The original fallback regex is unchanged; no Set/parser rewrite remains. Changed service result: signing errors bypass the prompt and retain the original error. Non-agent fallback remains eligible in all four negative-control test cases.

Visual matrix EMPTY accepted: no render path changed. No browser, screenshot, recording, visual fixture, or seed data was needed or committed; behavioral fixtures live in the existing repository test file.

Not verified: macOS, Electron IPC/dialog presentation, real 1Password/Secretive lock/unlock and retry, Windows, or successful manager-mediated passphrase retry. The encrypted-key control is the prior lead-verified raw-SSH transcript, reused and revalidated, not rerun here and independent of application revision. Its successful command is harmless printf, not the manager's remote launch script. No successful manager passphrase retry is claimed.

## Safety and cleanup

Task branch/worktree preserved with no edits, commits, pushes, merges, PR creation, or forge comments. No forge commands were needed. All fixture sshd processes started here received TERM by captured Popen PID and were waited for; no service manager or pattern kills used. Port 44231 has no listener after runs. The copied test was restored, disposable baseline confirmed clean and removed. Live T3 state was not accessed.

Only allowlisted safe scripts/logs/diff were uploaded after inspection and marker checks. Generated keys, askpass helper, passphrase-check.py (contains fixture credentials), configuration/credential files, and node_modules were excluded.

FRICTION: cached baseline dependency linking took several minutes under host load. First focused test capture hit its external 180-second wrapper limit before a result; incomplete log preserved. Rerun with a 900-second wrapper limit completed with expected red/green results; no test code or test timeout was changed. Existing bounded readiness fixture reused unchanged. Prior revision artifacts preserved at /tmp/issue-23413-runtime-pre-mainmerge and /tmp/issue-23413-evidence-index-pre-mainmerge.md. All runtime/test captures freshly rerun after required main merge; prior raw encrypted-key control remains explicitly revision-independent. No remaining evidence blocker within accepted O1–O6 service scope; platform/GUI limits above remain explicit.

## Published files (verbatim ghdrop -m output)

[before-O1.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/fdb5bf00a4211464/before-O1.log)
[after-O1.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/273f926e4321c2d5/after-O1.log)
[before-O2.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/56424ceb531abb69/before-O2.log)
[after-O2.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/57f0117b804fb5f9/after-O2.log)
[before-O3.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c7c8dc9d2ced284c/before-O3.log)
[after-O3.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1c24a04ac0385c92/after-O3.log)
[red-tests.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1e3cd3a2b14bf712/red-tests.log)
[green-tests.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/770b81c839ed4ecb/green-tests.log)
[assertions.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/59061150a1ce2555/assertions.log)
[run.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/27b497cc9fcf4f15/run.py)
[probe.ts](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/88b52ea487ab92d9/probe.ts)
[probe-base.ts](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/dabc78e0b9e8c21d/probe-base.ts)
[validate.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/35dc5a2500567c9a/validate.py)
[refresh.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0fd409b273baf89b/refresh.py)
[refresh-tests.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f9250aa66bccd528/refresh-tests.py)
[final-diff.patch](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1827f78fbda89b5c/final-diff.patch)
[passphrase-check.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/eba12da3013d350e/passphrase-check.log)
[red-tests-incomplete-host-load.log](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b05e236c485b5089/red-tests-incomplete-host-load.log)
