tarlatan
    Preparing search index...

    Function decodeFindingsBlock

    • Decodes the findings block of a reviewer's final message text: the last fenced block whose info string, trimmed, is exactly json. Fails with NoFindingsBlock when there is none, and with MalformedFindings when its text is not a JSON list of findings or two findings share an id (the reason names the first repeated id). An empty list decodes to no findings. Earlier blocks are not read, so a malformed draft followed by a valid block decodes.

      Parameters

      • text: string

      Returns Result<
          readonly {
              file: Option<string>;
              id: string;
              severity: string;
              summary: string;
          }[],
          NoFindingsBlock
          | MalformedFindings,
      >