Skip to content

Remote: one POSIX shell-quoting function and one SSH connection policy instead of 4+ copies #92

Description

@arzafran

The same POSIX single-quote escaping algorithm and the same non-interactive SSH policy (timeouts, keepalive, StrictHostKeyChecking, BatchMode) are hand-copied at least 4 times across Workspace.swift / WorkspaceRemoteSession.swift / WorkspaceRemoteDaemon.swift, twice within a single file. Drift in a sibling copy already produced the stale-state bug tracked separately (reconfigure issue).

Also found: two independent "upload dropped files over scp with cancel-then-cleanup" implementations for the two SSH code paths.

Fix: one ShellQuote helper, one SSHConnectionPolicy, one upload routine parameterized by path.


From the 2026-07-09 nuclear review (10 module reviewers + Codex cross-model pass, disprove-first). Line refs are against the reductive-audit branch (PR #81).

Metadata

Metadata

Assignees

No one assigned

    Labels

    nuclear-reviewFrom the 2026-07-09 whole-codebase nuclear reviewremote-daemonSSH-remote daemon (programad-remote)tech-debtKnown latent issue / maintenance debt

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions