The source for the typed issues of a library (0037-planningFR-024): the folder issues/ as data 0044-issuesFR-002 lays it out, one NNNNN-slug.ts for each issue, listed in order by mod.ts. A file is read without being run: its issue({ ... }) call is parsed as a literal (strings, numbers, booleans, arrays and objects), so that every field is kept as read in the observation (its severity as the source's own value, priority, size, goals, engines, citations, evidence, links, status and day raised) and the span of the status is known. The status is the one thing written back, as the one replaced value, keeping every other byte.
The status of an issue is a sum whose cases carry what they need: a fixed issue its proof, a duplicate its original, a refused one its reason. A change of status that needs what the event does not carry (a close: the proof, the original or the reason) cannot be written and goes to the outbox; the source writes the reopening (open), a start (in progress, by the actor of the event) and a deferral that names its reason and a day. The until of a deferral in these files is free text and the model's is a day: a deferral whose until is not a day is read as open with a finding that holds the text (commons planning 0004-planning-sources OQ-1).
import { parseIssueFile } from"./issues.ts";
// parseIssueFile(text) is a Result of the record and the span of its status