learningequality / learningequality/ricecooker

`remote/config.py` — resolve host profile and per-chef sync settings

Open
#703 2 comments 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 config.py module in ricecooker/utils/remote/ that resolves which box a run targets and the per-chef sync settings, from two TOML layers. It is the foundation the rest of the --remote feature builds on. No network or subprocess.

Complexity: Low
Target branch: main

Context
  • Global, one per laptop: ~/.config/ricecooker/remote.toml — host profiles (ssh, remote_root) and a top-level default.
  • Per-chef, in the chef dir: .ricecooker-remote.tomlname, protect, exclude.
  • ssh = "<alias>" is any ssh destination or ~/.ssh/config Host alias.
The Change
  • Load both layers and expose a resolved profile: ssh destination, remote_root, and the per-chef name/protect/exclude.
  • name defaults to the local dir basename when the per-chef file is absent or omits it.
  • Host resolution order: --remote=<name> > global default.
  • The per-chef file selects no host — only sync settings.
Out of Scope
  • Any ssh/rsync/tmux execution (that's transport.py).
  • venv/environment fields and box-owned env (consumed by driver.py).
  • ssh connection details (ports, keys, jump hosts) — delegated to ~/.ssh/config.
Acceptance Criteria
  • Global profiles parse: ssh, remote_root, top-level default.
  • Per-chef file parses name, protect, exclude.
  • name defaults to the local dir basename when unset.
  • Host resolves --remote=<name> first, else global default.
  • No profile configured raises a remote:-prefixed error carrying a paste-ready config example.
  • An unknown --remote=<name> raises a remote:-prefixed error naming the missing profile.
  • Resolution order is covered by tests over tmpdir TOML files.
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.