architecture.md (#314) locks the vocabulary for the error domain and states
the rule this issue carries out:
Existing documents and code get aligned to this section retroactively.
The engine still speaks the pre-registry vocabulary: policy where the registry
says error mode, diagnostic where it says printed error, and
collect/collection where it says printing failures. This issue is the
retroactive alignment — mechanical renames, zero behavior change.
Rename pairs
| From |
To |
<CollectFailures> |
<PrintErrors> |
collectFailures() |
printErrors() |
collectsFailures() |
printsErrors() |
useFailureCollection() |
useFailurePrinting() |
ErrorPolicy |
ErrorMode |
AmbientErrorPolicy |
ErrorMode (context const merged onto the type's name) |
"component.errorPolicy" |
"component.errorMode" |
"collect" (mode value) |
"print" |
AssertionDiagnostic |
AssertionReport (.diagnostic → .report) |
The union becomes "print" | "throw". "output" and fail-fast semantics are
not part of this issue — that is the semantics work, tracked separately.
Prose in the spec, code comments, and test names moves with the identifiers:
"policy" becomes error mode, "diagnostic" in the rendered-error sense becomes
printed error, and "collection"/"collects" in the error sense becomes printing
vocabulary. Test files carrying the old vocabulary get renamed.
Breaking changes
printErrors() replaces the published collectFailures() export, and
AssertionReport replaces AssertionDiagnostic. No aliases — the repo's
precedent for breaking renames. <CollectFailures> resolves like any other
unknown component afterward.
Sweep discipline
Every remaining occurrence of collect, collection, policy, diagnostic, capture,
and divergence gets audited into an explicit allowed category, listed in the PR.
Known legitimate survivors: <Capture> / <Capture as> (content binding, keeps
its name by decision), review and permission policies, lint diagnostics, the
diagnostic JSONL trace, and "divergence" in replay contexts.
Context: #314.
Correction applied (see comment): AssertionDiagnostic becomes
AssertionReport, not AssertionPrintedError. The class holds a rendered
Markdown assertion report written as ordinary content, not an ErrorSegment,
so a registered term must not name it. Its .diagnostic field becomes
.report, and buildDiagnostic() / failureDiagnostic() become
buildReport() / failureReport(). Where packages/testing prose does mean an
ErrorSegment — validationError(), the raise interception in <Test> — it
becomes printed error.
Second correction applied: the ambient context const is exported under the
type's own name — export type ErrorMode = "print" | "throw" beside
export const ErrorMode: Context<ErrorMode>, the same shape as Result/Ok.
There is no AmbientErrorMode. The "component.errorMode" key is unchanged.
architecture.md(#314) locks the vocabulary for the error domain and statesthe rule this issue carries out:
The engine still speaks the pre-registry vocabulary:
policywhere the registrysays error mode,
diagnosticwhere it says printed error, andcollect/collectionwhere it says printing failures. This issue is theretroactive alignment — mechanical renames, zero behavior change.
Rename pairs
<CollectFailures><PrintErrors>collectFailures()printErrors()collectsFailures()printsErrors()useFailureCollection()useFailurePrinting()ErrorPolicyErrorModeAmbientErrorPolicyErrorMode(context const merged onto the type's name)"component.errorPolicy""component.errorMode""collect"(mode value)"print"AssertionDiagnosticAssertionReport(.diagnostic→.report)The union becomes
"print" | "throw"."output"and fail-fast semantics arenot part of this issue — that is the semantics work, tracked separately.
Prose in the spec, code comments, and test names moves with the identifiers:
"policy" becomes error mode, "diagnostic" in the rendered-error sense becomes
printed error, and "collection"/"collects" in the error sense becomes printing
vocabulary. Test files carrying the old vocabulary get renamed.
Breaking changes
printErrors()replaces the publishedcollectFailures()export, andAssertionReportreplacesAssertionDiagnostic. No aliases — the repo'sprecedent for breaking renames.
<CollectFailures>resolves like any otherunknown component afterward.
Sweep discipline
Every remaining occurrence of collect, collection, policy, diagnostic, capture,
and divergence gets audited into an explicit allowed category, listed in the PR.
Known legitimate survivors:
<Capture>/<Capture as>(content binding, keepsits name by decision), review and permission policies, lint diagnostics, the
diagnostic JSONL trace, and "divergence" in replay contexts.
Context: #314.
Correction applied (see comment):
AssertionDiagnosticbecomesAssertionReport, notAssertionPrintedError. The class holds a renderedMarkdown assertion report written as ordinary content, not an
ErrorSegment,so a registered term must not name it. Its
.diagnosticfield becomes.report, andbuildDiagnostic()/failureDiagnostic()becomebuildReport()/failureReport(). Wherepackages/testingprose does mean anErrorSegment—validationError(), the raise interception in<Test>— itbecomes printed error.
Second correction applied: the ambient context const is exported under the
type's own name —
export type ErrorMode = "print" | "throw"besideexport const ErrorMode: Context<ErrorMode>, the same shape asResult/Ok.There is no
AmbientErrorMode. The"component.errorMode"key is unchanged.