learningequality / learningequality/ricecooker

`remote/transport.py` — build and execute `ssh`/`rsync` argv

Open
#704 1 comment 1 reaction 1 assignee View on GitHub

@rtibblesbot is already working on this.

Since Jul 24, 2026.

TAG: new feature
Dominant language
Python
Stars
31
Forks
77
Avg merge
5d 4h
Merged PRs (30d)
3

Description

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

A transport.py module that builds and executes the ssh and rsync argv for sync, pull, and remote command execution. All external-process execution flows through one injectable runner, so tests can substitute a fake box. No ssh/rsync string is constructed anywhere else in the codebase.

Complexity: Medium
Target branch: main

Context
  • Consumes the resolved profile from config.py (#703): ssh destination, remote_root, name, protect, exclude.
  • The injectable runner is the seam the whole test strategy depends on — the one place a subprocess is actually spawned.
The Change
  • Provide argv builders for three operations: sync, pull, and remote command execution.
  • Give ssh exec two forms, because attach needs a terminal but preflight does not.
  • Combine the chef's .gitignore with hardcoded protect rules so --delete cannot destroy box-managed state.
  • Route every execution through one runner, so the external boundary can be replaced by a fake in tests.
Out of Scope
  • tmux session semantics (session.py).
  • Which command runs and how its env is assembled (driver.py).
Acceptance Criteria
  • Sync argv is rsync -a --delete with --filter=':- .gitignore'.
  • Sync argv carries the hardcoded protect rules plus profile protect/exclude.
  • Sync transfers laptop→box only, into <remote_root>/<name>/.
  • Pull transfers box→laptop, source path relative to the remote chef dir.
  • ssh exec offers a non-interactive form and a -t PTY form.
  • All execution flows through one injectable runner.
  • No module outside transport.py calls subprocess or constructs an ssh/rsync string.
AI usage

Claude (Claude Code) drafted this from the design spec; I directed the design and reviewed it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.