Audiencetypeno test imports ittype Audience = "Public" | "Assessor" | "Internal";Who a rendering is for (ifqs:Public, ifqs:Assessor, ifqs:Internal).
Audiences and redaction (commons 0001-quality-evidence FR-057 to FR-059): each rendering of evidence is for one audience (ifqs:Audience), and what it leaves out follows from who reads it.
Public: a figure, an identifier, a grade and a failure's requirement and reason. Left out: what 0006-signals FR-006 redacts (secrets), the names of people, customers and hosts, the paths and names of private repositories, and any value a failure message holds beyond its requirement and reason. The rendering says how many values it redacted.Assessor: the full records, with secrets and personal data (an e-mail address) redacted only.Internal: the harness's own people through its console: secrets only.Redaction is deterministic and changes no figure: the same text and the same rules give the same bytes and the same count, and the count of a grade, a digest or a total of a narrower audience is the wider audience's (withheld is how a value dropped whole is counted).
terms are the names the harness knows must never be public: its customers, its people, its hosts and its private repositories. A pattern cannot tell a person's name from a word, so a name is removed where the harness lists it; the patterns find what has a shape (an address, a URL, an IP address, an absolute path, a secret). The audience words are the keys of ifqs:Audience (ifqs-ontology.test.ts asserts it).
import { redactFor } from "./audience.ts";
redactFor("Public", { terms: ["Acme Ltd"] }, "failed for Acme Ltd at https://db.acme.example/x").text;
// "failed for REDACTED at REDACTED"Audiencetypeno test imports ittype Audience = "Public" | "Assessor" | "Internal";Who a rendering is for (ifqs:Public, ifqs:Assessor, ifqs:Internal).
AUDIENCESconstconst AUDIENCES: readonly Audience[]Every audience, widest first.
isAudiencefunctionno test imports itfunction isAudience(text: string): text is AudienceWhether a text is an audience.
RedactionRulestypeno test imports ittype RedactionRules = { readonly terms: readonly string[] };What a harness lists besides the patterns: names that must never reach the public (customers, people, hosts, private repositories).
Redactedtypeno test imports ittype Redacted = { readonly text: string; readonly count: number };A text redacted for an audience, and how many values were redacted.
redactForfunctionfunction redactFor(audience: Audience, rules: RedactionRules, text: string): RedactedA text redacted for an audience (FR-058, FR-059): see the module's account of what each audience leaves out.
showsMessagesfunctionno test imports itfunction showsMessages(audience: Audience): booleanWhether a rendering for this audience carries the words of a failure's message (FR-058: the public does not).