Split out of #401, which fixed the same defect in index and deliberately left this one because it changes an output contract rather than adding a report.
Reproduced
A fresh clone whose refs/notes/commitlore was never fetched, holding a record that lives only in a note upstream:
$ commitlore init
✓ Hooks
✓ Index
✓ Agent integration
✓ Final check
init: ready
✓ Index and ready. Nothing about the mirror. The index it just built covers the commit messages alone.
Every query path in the product is honest about this state — context exits 3 and says the answer may be missing records, stale reports the scan is incomplete, guard exits 3, validate says references not checked, and after #401 so does index. init is now the one command that reports success over it in silence.
Why this one is worse than index was
init is the first thing a user runs, and for most users it is the only thing they run before forming a view of whether the tool works. A clone with unfetched notes is not an edge case — git fetch does not fetch refs/notes/commitlore by default, which is the entire reason doctor --fix and the refspec exist. So the default path for a new user on an existing repository is: run init, see ready, and hold an index that is missing every record the team kept in notes.
The sentence already exists. init's doctor --fix step produces it — under --verbose only.
Why it was not fixed in #401
test/init-output.test.ts pins plain init at no more than six lines, deliberately: [T-1012] made the clean run result-oriented rather than a list of internal steps. Adding a line means deciding that this state is worth one of those six, which is a decision about the command's contract, not a missing report.
That decision looks easy from here — a ready that is not ready costs more than a sixth line — but it belongs in its own change with its own test, not smuggled into a fix for a different command.
Expected
init says the mirror is unfetched when it is, in its default output, without becoming a step list again. Exit code should stay 0: an unfetched mirror is not an init failure, and #401 settled that for index.
Split out of #401, which fixed the same defect in
indexand deliberately left this one because it changes an output contract rather than adding a report.Reproduced
A fresh clone whose
refs/notes/commitlorewas never fetched, holding a record that lives only in a note upstream:✓ Indexandready. Nothing about the mirror. The index it just built covers the commit messages alone.Every query path in the product is honest about this state —
contextexits 3 and says the answer may be missing records,stalereports the scan is incomplete,guardexits 3,validatesaysreferences not checked, and after #401 so doesindex.initis now the one command that reports success over it in silence.Why this one is worse than
indexwasinitis the first thing a user runs, and for most users it is the only thing they run before forming a view of whether the tool works. A clone with unfetched notes is not an edge case —git fetchdoes not fetchrefs/notes/commitloreby default, which is the entire reasondoctor --fixand the refspec exist. So the default path for a new user on an existing repository is: runinit, seeready, and hold an index that is missing every record the team kept in notes.The sentence already exists.
init'sdoctor --fixstep produces it — under--verboseonly.Why it was not fixed in #401
test/init-output.test.tspins plaininitat no more than six lines, deliberately: [T-1012] made the clean run result-oriented rather than a list of internal steps. Adding a line means deciding that this state is worth one of those six, which is a decision about the command's contract, not a missing report.That decision looks easy from here — a
readythat is not ready costs more than a sixth line — but it belongs in its own change with its own test, not smuggled into a fix for a different command.Expected
initsays the mirror is unfetched when it is, in its default output, without becoming a step list again. Exit code should stay 0: an unfetched mirror is not an init failure, and #401 settled that forindex.