Skip to content

The append-only ledger and handover store have retention caps that are checked

state/ledger.jsonl and state/handovers/ only ever grow. The policy sets a cap for each (ledger.retention_max_lines, handover.retention_max_files); doctor and watch report when a cap is exceeded. Nothing is deleted by Majordomus; the cap makes growth visible before it becomes a problem.

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: not run Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

What it means

state/ledger.jsonl and state/handovers/ only ever grow. The policy sets a cap for each (ledger.retention_max_lines, handover.retention_max_files); doctor and watch report when a cap is exceeded. Nothing is deleted by Majordomus; the cap makes growth visible before it becomes a problem.

How it works

lib/doctor.sh counts ledger lines and handover files and compares each with the policy value, failing when over. lib/watch.sh reports the same condition as retention drift. The counts are printed even when under the cap, so the trend is visible on every run.

How to see it

sed -i.bak 's/retention_max_lines: 5000/retention_max_lines: 1/' .ai/repo/policy.yaml
majordomus doctor
# FAIL retention   ledger — 3 lines over cap 1

What it does not cover

Rotation and archiving are the operator's decision; Majordomus never removes a record. It tells you when to look.

Why it exists

A session-notes directory in the source environment grew to ten gigabytes and over a thousand files, and a metrics store accumulated hundreds of forty-megabyte snapshots that nothing ever read back. Nothing had ever deleted anything because nothing had ever said the store was full.

Detail rendered from docs/claims/retention-caps.md.

From the statement to the proof

  1. 1 · the public statement

    The append-only ledger and handover store have retention caps that are checked

    Made on Provenance, Doctor.

  2. 2 · the canonical claim

    retention-capsdeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in read it on this site · share/skeleton/policy.yaml

  3. 3 · the implementation

    lib/doctor.sh · majordomus doctor

  4. 4 · the test and the scenarios

    Test: test/cases/02_doctor_basic.sh

    Executed in Read back what happened, and keep the ledger within its cap.

  5. 5 · the recorded runs

    recorded evidence: not run how evidence is recorded

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 02_doctor_basic

Where this claim is used

Related claims same implementation

The moments this answers

Searches the titles and descriptions of every page this site publishes.