IF Commons GitHub

physical/problem

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0006-estate-fleet-store FR-008

What a fleet store reports (commons estate 0006-estate-fleet-store): a closed union of the ways it does not do what it was asked, each with the facts a person needs, and the sentence for each. A problem of a document or of the store below it is carried as it is; the rules of the estate and the identity of the store are the fleet's own.

import { describeFleetProblem } from "./problem.ts";
describeFleetProblem({ kind: "no-manifest" }); // "the store holds no manifest: open it with create to make a fleet store of it"

Source: commons/estate/src/physical/problem.ts

2 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

FleetProblemtype
type FleetProblem = /** A document or the store below it said no (a conflict, a refusal, an outage, a document that ca… (1412 characters)
type FleetProblem =
  /** A document or the store below it said no (a conflict, a refusal, an outage, a document that cannot be read). */
  | { readonly kind: "documents"; readonly problem: DocProblem }
  /** The store holds no manifest and was not opened to make one. */
  | { readonly kind: "no-manifest" }
  /** The store is kept at a newer schema than this code reads. */
  | { readonly kind: "newer-schema"; readonly found: number; readonly reads: number }
  /** The store is kept in a layout this code does not name. */
  | { readonly kind: "other-layout"; readonly found: number; readonly names: number }
  /** The store is another fleet's than the one asked for. */
  | { readonly kind: "other-fleet"; readonly asked: string; readonly found: string }
  /** What was given is not what the estate accepts: each reason is a sentence. */
  | { readonly kind: "refused"; readonly reasons: readonly string[] }
  /** An observation of that asset at that instant is kept and says something else. */
  | { readonly kind: "exists"; readonly path: string }
  /** The mirror said no. */
  | { readonly kind: "mirror"; readonly problem: MirrorProblem }
  /** The fleet store was opened with no replicas, so it has no mirror to ask. */
  | { readonly kind: "no-mirror" }
  /** The replica asked about is not one of this store's, or it keeps no history. */
  | { readonly kind: "no-history"; readonly replica: string };

Why a fleet store could not be opened or did not do what it was asked.

Imported by 12 tests of the run (12 passed, 0 failed): the library's results

documentsProblemconstno test imports it
const documentsProblem: (problem: DocProblem) => FleetProblem

A problem of a document, as a fleet problem.

describeFleetProblemfunction
function describeFleetProblem(problem: FleetProblem): string

A problem as one sentence.

Imported by 12 tests of the run (12 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.