configuration/strings/coverage.strings.ts

configuration/strings/coverage.strings.ts is a file in Bane's Lab Content. 41 lines of code and 27 definitions.

const DIGEST_SHOWN = 12;

export const SECTION_UNDECLARED =
    "The built payload carries this section and the content graph does not declare it; declare what it teaches or mark it narrative.";

export const SECTION_UNTAUGHT =
    "This section teaches no concept and is not declared narrative; a section is either a lesson or declared narrative.";

export const TRACE_UNKNOWN = "This section traces to an id neither the rule inventory nor the lesson seeds carry: ";

export const CONCEPT_TAUGHT_TWICE =
    "A concept is taught in more than one place; a concept has one home and every other mention links to it: ";

export const REQUIRES_UNKNOWN = "This section requires a concept no section teaches: ";

export const REQUIRES_FORWARD =
    "This section requires a concept taught later in the tab order; the levels are the topological order of the concepts: ";

export const CYCLE_FOUND = "This section sits on a cycle of requirements; a requirement graph is acyclic.";

export const GRAPHS_VALIDATED = " content graph(s) validated over ";

export const GROUNDING_CONTRADICTED =
    "This section is grounded in constructs of the tree and also declared absent; a section is one or the other.";

export const GROUNDING_UNDECLARED =
    "The evidence registry names a section no content graph declares; point it at a real section or remove it.";

export const CITE_NODE = "The EVIDENCE entry names ";

const LIST_SEPARATOR = ", ";

const LIST_LAST = " or ";

export const citeUnresolved = function citeUnresolved(trees: readonly string[]): string {
    const named =
        trees.length > 1 ? trees.slice(0, -1).join(LIST_SEPARATOR) + LIST_LAST + String(trees.at(-1)) : trees.join("");
    return `, and no file, folder or definition in the ${named} has that name. A rename, a move or a deletion leaves an entry like this; change the entry to the current name, or remove it.`;
};

export const CITE_TREE_ONLY = ", which exists only in the ";

export const CITE_UNQUALIFIED =
    " tree. A name without a tree prefix is looked up in the Site tree first, so a Site file with the same name would take its place; write the entry as ";

export const GROUNDING_SUMMARY = "Teaching sections grounded in the tree, declared absent, and not yet assessed: ";

export const GROUNDING_UNASSESSED = "This teaching section is in neither EVIDENCE nor EVIDENCE_ABSENT.";

export const PAGES_SUFFIX = " page(s).";

export const LEAK_INLINE = "carries an internal identifier inside inline code: ";

export const LEAK_IDENTIFIER = "carries an internal identifier: ";

export const LEAK_PATH = "carries a workspace path: ";

export const privateTermLine = function privateTermLine(line: number, digest: string): string {
    return `carries a private term at line ${String(line)}, digest ${digest.slice(0, DIGEST_SHOWN)}. Remove the term, or allow the exact string that carries it.`;
};

export const machinePathLine = function machinePathLine(line: number): string {
    return `carries an absolute workspace path at line ${String(line)}. Publish the path relative to the workspace root.`;
};

export const PAYLOAD_MISSING = "The built payload for this page is missing; build the site first: ";