std: classify every public error type by CLOSED-TRAITS decision 7.3 #744
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language#744
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Decision 7.3 of
docs/design/CLOSED-TRAITS.mdsays a public type with cases never grows, and what must grow is a newtype. The record classifies the error types it knew. The audit finds public error types ofstdthe record does not name, two whose case count drifted since, and three shapes of error side by side (plain cases, a record with a public*Problemtype, a newtype with a private kind).Not named in the record:
CliError(8 cases,std/cli/src/error.trb:13),ResourceError(4,std/resource/src/error.trb:27),StorageFailure(5,std/storage/src/storage.trb:13),CipherError(2,std/cipher/src/error.trb:7),FramingError(2,std/stream/src/reader.trb:36),PoolError(2,std/task/src/pool.trb:30),JsonPointerProblem(7,std/json/src/pointer.trb:140),PatchProblem(7,std/json-patch/src/error.trb:6).Drifted:
SignatureErrorhas 6 cases (the record says 4,std/signature/src/error.trb:7),UriErrorhas 12 (the record says 11,std/uri/src/error.trb:8).Source
docs/project/2026-11-cleanup-audit.md.Goal
The table of 7.3 names every public type with cases that
stdexports as an error, each with one verdict: frozen (its cases are complete by construction) or newtype (it mirrors an open set: an operating system, a protocol, a format that gains codes). After this issue the conversions of step 7.3 of #713 are a closed list.Design record point
docs/design/CLOSED-TRAITS.md7.2, decision 7.3 (rules 1 to 5), 9.4 (the last row).Acceptance criteria
public typewithcasemembers understd/*/srcwhose name ends inError,FailureorProblem, and the list is in the PR descriptionSignatureErrorandUriErrormatch the sourceProblemshape is rightstd/orcompiler/changes in this PRDependencies
None. The naming question (
StorageFailurebeside*Error) is an owner decision listed in the audit report; this issue records the rule and does not rename.Seed
None (documentation only).
Size
One PR, one commit.
[loop:torbscript] claim intake by session:loop-torbscript-20261114-0802 until 2026-11-14T10:02:00Z
[loop:torbscript] refine: single task, no split. Checked against
docs/design/CLOSED-TRAITS.md: decision 7.3 (rules 1-5) and the 7.3 table ("What it means forstd") match the issue; the table currently listsSignatureErrorwith 4 cases andUriErrorwith 11 (the issue reports 6 and 12 from source), and has no rows for the eight unnamed types. Section 9.3 holds the "Beside the phases" newtype list that step 7.3 of #713 mirrors. Scope is documentation only (one PR, one commit), no seed impact, no dependencies; #713 and #742 are open and the audit report exists atdocs/project/2026-11-cleanup-audit.md. No duplicate among open issues.[loop:torbscript] decided by the loop: the per-type verdicts (frozen vs newtype) are a technical classification under the already owner-decided rule 7.3 (newtype where the set mirrors an OS, protocol or format that gains codes; frozen where cases are complete by construction), so no owner question. The
StorageFailurenaming stays out of scope as the issue states. Implementer note: verify each case count against source when writing the table, since the issue figures may drift again.next: implement (label
readyset)[loop:torbscript] release intake by session:loop-torbscript-20261114-0802