refactor(ssh): keep package internals private#10144

merged1
main
cleanup-ssh/private-exports
openedSep 5, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

SSH exported 16 values and one type that have no consumers outside their defining modules. Keep those declarations private without changing their implementations or existing tests.

Checked repository-wide named references and the desktop namespace imports. Remote runner, authentication, shutdown, and config discovery behavior remain unchanged. The package is private to this monorepo.

Verification: all 42 tests across five SSH suites pass; SSH typecheck, targeted lint, and the scoped Knip export scan pass. Knip reports zero SSH export/type findings after the change, down from 17. Formatting reflows one helper after removing its export modifier. No UI changes.

Model: gpt-6 astra. Harness: Codex in T3 Code.

Note

Remove export from ssh package internal helpers and constants

  • Removes the export modifier from helpers, constants, and types across auth.ts, command.ts, config.ts, and tunnel.ts
  • Keeps these symbols private to their modules: SshAskpassFile, ASKPASS_* scripts, getDefaultSshAskpassDirectory, ensureSshAskpassHelpers, buildSshHostSpec, collectSshConfigAliasesFromFile, DEFAULT_REMOTE_PORT, normalizeSshErrorMessage, and REMOTE_* scripts
  • Risk: any out-of-tree code importing these now-private symbols will break at compile time

Macroscope summarized 957f823.

Added 1 commit

  • refactor(ssh): keep package internals private957f823
Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire13.5 KiB13.5 KiB+16 B (+0.1%)15.1 KiB✅
CodexThread snapshot wire7.0 KiB7.0 KiB+6 B (+0.1%)7.3 KiB✅
CodexLive turn WebSocket wire6.5 KiB6.5 KiB+10 B (+0.2%)7.8 KiB✅
CodexLive turn WebSocket decoded57.0 KiB57.0 KiB0 B (0.0%)66.4 KiB✅
CodexLive turn messages880 (0.0%)21✅
ClaudeTotal thread wire13.6 KiB13.5 KiB−12 B (−0.1%)15.1 KiB✅
ClaudeThread snapshot wire7.0 KiB7.0 KiB−6 B (−0.1%)7.3 KiB✅
ClaudeLive turn WebSocket wire6.5 KiB6.5 KiB−6 B (−0.1%)7.8 KiB✅
ClaudeLive turn WebSocket decoded57.8 KiB57.8 KiB−44 B (−0.1%)66.4 KiB✅
ClaudeLive turn messages98−1 (−11.1%)21✅

Baseline: 761d4ba · PR result: 957f823 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The implementation is largely a mechanical visibility refactor with no observed runtime or product-default changes. Human review is still required because the PR modifies SSH authentication code, which is treated as sensitive regardless of diff size.

You can add or adjust custom eligibility rules. Learn more.