Skip to content

docs: one file per log entry and per experiment, the shared files generated, so PRs stop conflicting #709

Done

Description

@aledbf

The problem. Two files take an edit in almost every PR. Counted on main, 2026-11-23:

file lines commits in the last 7 days
docs/log.md 799 (239 dated entries) 177 of 568
docs/boot-time.md 514 80

What the repository already does right. docs/releases.md is generated from one JSON record per release (docs/releases/*.json, spin-machine-dev releases doc). A test fails when the page is not what the records say. Two releases never touch the same record.

Proposal: the same for the log and the experiments.

  • One file per log entry, docs/log/<date>-<slug>.md. Front matter (YAML) carries the date, the area (kernel, qemu, image, lab, machine, release), the issues, the runs and the PR. The body is the prose entry as today. A new file never conflicts.
  • One record per decided experiment, docs/experiments/<issue>.json or front matter on its log entry. It carries the change, the phase, the shape, the numbers (Δp50, interval, runs), the decision (kept, rejected, open, carried) and the date. The tables in docs/boot-time.md ("What the machine carries", "Measured and rejected" and its sections, "Open experiments") are generated from them. The hand-written prose sections of boot-time.md stay hand-written.
  • The generated pages are not committed, or are committed and never hand-edited. Two options; decide on what a conflict costs:
    1. Not committed. The pages site and the release render them, and docs/ links to the directory. That costs readers of the raw tree an index.
    2. Committed. The gate fails when they differ from the records, as releases.md does, and a conflict in them is resolved by re-running the generator. That needs .gitattributes merge=union or a regenerate step after a rebase.
  • A format that exists. Markdown with YAML front matter (Hugo/Jekyll style) for entries, so prose stays prose and the metadata is machine-read. JSON, like docs/releases/*.json, for the experiment records, whose fields are numbers and a decision. No XML: nothing here reads it.
  • References keep working. A doc citing "docs/log.md, 11-23" cites the entry's file. The refs lint (task lint) checks they resolve. Section 2, "Rework cycles", stays one hand-written file: it is read as a narrative and changes rarely.

Migration. A one-off spin-machine-dev docs split turns today's 239 entries and the tables' rows into files. Generating the pages from them must give today's text back byte for byte; that is the check that nothing was lost. AGENTS.md's rules that name docs/log.md and boot-time's tables ("Remove an experiment once its question is answered…") then name the directories.

When. After the batch in flight (#698, #660, #627, #708) and the next release: it touches every open PR's docs, so it goes in with nothing else open.

Activity

  1. aledbf commented on Nov 23, 2026

    @aledbf
    MemberAuthor

    Decided: the aggregates are not committed. Committing generated pages, as releases.md does, would not end the conflicts. Every PR would still regenerate the same committed docs/log.md, and two PRs in flight would still touch one file. Only files that each PR adds and no other PR edits make the conflict go away.

    • The log. docs/log/<YYYY-MM-DD>-<slug>.md, one file per entry, front matter plus prose. GitHub's listing of the directory, sorted by name, is the chronological index. Section 2, "Rework cycles", stays one hand-written file, docs/log/rework.md, because it is a narrative and rarely changes.
    • The experiments. docs/experiments/<issue>-<slug>.json, one record per decided or open experiment. Its fields are the change, the phase, its section (kernel, firmware, systemd/image, login, restore, QMP/vsock, memory), the shape, the numbers (Δp50, interval, runs), the decision (carried, rejected, open) and the date. The fields are what boot-time.md's tables hold today.
    • The pages. spin-machine-dev docs log and spin-machine-dev docs tables render them, to stdout or to a file. The pages site (pages.yml, releases site) publishes both. docs/boot-time.md keeps its prose and links each table to the site and to the verb.
    • The migration. spin-machine-dev docs split turns today's 239 entries and the tables' rows into files, once. Rendering them back must give today's text, byte for byte. That is the test that nothing was lost, and the verb is deleted after.
    • What holds the format. A gate test refuses an entry or record without its required fields, a decision outside the three, or a run id that is not a number. The refs lint resolves docs/log/... paths. AGENTS.md's rules that name docs/log.md and the tables then name the directories.
  2. aledbf commented on Nov 23, 2026

    @aledbf
    MemberAuthor

    Done in #712: the log is one file per entry (docs/log/), boot-time.md's tables one record per row (docs/experiments/), neither page committed; spin-machine-dev docs log|tables and the site render them. Proven byte for byte against the old files before they were deleted. AGENTS.md says how to add an entry and a record.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions