Skip to content

Setup: edit an existing User config in place #128

Closed

Description

@JacobStephens2

Parent

#126

What to build

thirdshift setup over an existing User config. It edits the file in place with a format-preserving TOML editor (pure Rust, so it builds under musl per ADR-0003): comments, key order and existing values survive, and any key this version knows but the file lacks is added at its default with its comment. So after any Setup, the file lists every key the installed version knows, and an unattended ssh host thirdshift setup can never reset a configured machine.

A User config that doesn't parse under the rules a Run uses is refused: Setup exits 1 with the same error a Run gives and leaves the file byte-for-byte as it was. See the spec in #126.

Acceptance criteria

  • With no terminal, thirdshift setup over a partial User config keeps its values and hand-written comments, and adds each missing key at its default with its comment.
  • Over a complete User config, it leaves the file's settings unchanged.
  • Over a User config that isn't valid TOML, or has an unknown key or a wrongly typed value, it exits 1 with the Run's error naming the file and key, and the file is unchanged.
  • A Run reads the resulting file with the same settings it had before, plus defaults for the added keys.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions