Skip to content

the README teaches a defect and hides four flags #642

Description

@haribo

Why

Three statements in the user-facing docs, each verified against the code.

1. README.md:214 teaches the defect of #486. The tutorial def is:

def install(pkg: str) as root {
  observe {
    return state(installed: shell { dpkg -s "$pkg" >/dev/null 2>&1 }.exit == 0)
  }

The real apt.install carries, in its own source, the reason that is wrong:

dpkg -s was the wrong question: it exits 0 for a package in state rc — removed
without --purge, so its record and config files survive while its binaries are gone —
and the def then reported already on a host where the package was not installed.

So the README hands a newcomer, as the model to copy, the exact observe that cost #486
the first instance of the class this project has now paid for six times.

2. Four real flags are documented nowhere. --json, --parallel, --limit appear in
neither README.md nor docs/language.md, and -v only as a badge URL. All four are
accepted by run.

3. README.md:160 is stale. "at-rest secrecy is not yet solved" — ADR-0025 put the
workdir on tmpfs precisely so that "secret plaintext … never touch persistent disk: not in
a root-filesystem backup, not in a disk snapshot, and not recoverable by undelete."
What
remains true is the sentence before it: root on the target can read the secret in memory and
in the process environment. The limit is real; its name is wrong.

Not in this issue

  • docs/design/inventory.md was corrected in the README and inventory design doc contradict the binary #602 and carries its superseded note.
  • docs/dogfood.md is a dated report of an experiment, not a document that drifts. An
    external review called it stale; it is not, it is history, and history is allowed to
    describe a world the code has left.
  • language.md having no chapter for on, parallel or the inventory is real but larger
    than a correction: those live in docs/design/orchestration.md, so it is a question of
    what the language spec is for. Its own header declares only as <user> as missing, which
    understates it — worth its own issue.

Build

  • Replace the README's dpkg -s example. The point it illustrates (an observe that asks a
    question) does not need the wrong question — command -v, or the real apt.install
    spelling, teaches the same thing without teaching the bug.
  • Document --json, --parallel, --limit, -v where the other flags are.
  • Rewrite the secrecy limit to say what is actually unsolved: a secret in memory and in the
    environment on the target, readable by root there.

Validation

  • grep -n "dpkg -s" README.md returns nothing.
  • Every flag runCmd registers appears in README.md — checked by loop against the source,
    not by eye.
  • grep -n "at-rest secrecy is not yet solved" README.md returns nothing, and what replaces
    it does not contradict ADR-0025.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: docsdocumentation change

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions