Lem/Docs

citation-harvest verify

Verify the reading record against its bound manuscript.

Invocation#

Shell
lem-cli citation-harvest <id-or-title> verify

Inputs and options#

  • id-or-title selects the paper, manuscript, and harvest record.
  • verify takes no documented options; trailing arguments are currently ignored.

Output and state#

Prints checked, failures, and full failure detail as JSON. It checks the corpus against the manuscript it claims to have been read for and does not repair the record.

Reading notes are judged through the configured Brama model, one planned batch per request; unplanned notes are judged together. The model decides whether each note argues priority instead of recording what a paper establishes. A word appearing in a note is not by itself a failure.

The judgment is returned as the arguments of the required reading_note_judgments function with a strict schema: judgments contains a key, boolean dispute and reason for each note. Lem checks that every supplied note is answered exactly once and that every reason is nonempty; it does not parse a judgment from free-form prose.

Refusals#

  • Any verification failures are printed, then cause a nonzero exit.
  • Paper, local-source, and manuscript lookup failures refuse before verification.
  • A notes directory that cannot be listed, or a note that cannot be read, is a failure of its own — “harvest notes <path> cannot be read: <cause>; the notes were not checked” — never read as no notes; the remaining checks run over the notes that could be read. An absent notes directory holds no notes.
  • Extracted-text selection ignores only a missing file. A filesystem metadata error, missing regular-file classification, or a non-regular text path is reported with that path under “harvest manifest”; it cannot silently shorten the checked corpus. A selected text that cannot be decoded or read is a verification failure naming its key, path and cause.
  • A flagged note is reported as “<key> argues priority instead of recording the reading: <reason>”. Unavailable Brama configuration, credential refusal, a missing or incorrect function answer, or an omitted, repeated or invented note causes “reading notes were not judged through Brama: <cause>”, never a passing judgment.