I1110 — The second run changes nothing, and a test says so
Make reconciliation idempotent: running it against a conforming repository produces no change at all, and prove it with a test rather than with an observation.
BLOCKED wave 5 · p0 · implementation profile · parallel safe
Blocked. This issue cannot start until I1109 is done. The status is derived from that, not declared.
Objective
Make reconciliation idempotent: running it against a conforming repository produces no change at all, and prove it with a test rather than with an observation.
Why
Idempotence is what separates a reconciler from a script that happens to run twice. It is also the cheapest possible regression test for the whole desired-state machinery: if the second run does something, the first one did something it could not describe.
Current state
Initialisation is not idempotent and nothing measures whether it is.
Desired state
A second reconciliation reports zero changes, the working tree is byte-identical, and a test fails the moment that stops being true.
Scope
- test/cases
Out of scope
- Achieving stillness by making the second run skip work it should do
- Ignoring a difference because it is only in a generated file
Dependencies
What waits on this
- I1116BLOCKED This repository's own footprint moves, through the reconciler
- I1118BLOCKED Every invariant of this milestone is a rule with a check that runs
- I1122BLOCKED A foreign repository, adopted, upgraded and given back
Acceptance criteria
- Reconciling a conforming repository twice leaves the tree byte-identical, including every generated artifact
- The second run reports no change rather than reporting changes it then does not make
- The test covers a repository that was already adopted, one adopted by an older version, and one where a person edited a bridge
- A deliberate divergence makes the test fail, proving it can
Validation
- bash test/run.sh
- majordomus init --dry-run
Evidence required
- second_run_empty
- negative_test
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Risk
The easy way to pass this test is to make the second run do nothing on principle. The test has to distinguish a reconciler that found nothing to do from one that did not look.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I1110.yaml. Read it back with majordomus plan show I1110.