app.storage.errata_values

Erratum value type crossing the storage port.

A plain frozen dataclass, independent of any ORM; kept apart from app.storage.values only to keep modules small. Import it through app.storage.port, which re-exports it.

Only rendered, sanitized HTML is stored for the erratum sections: the raw Markdown is already kept in the immutable revision snapshot of the row’s digest, which is what diffs and approval evidence use.

Public API: StoredErratum, LinkTarget.

class app.storage.errata_values.StoredErratum(*, type, section, reported_by, reported_date, original_html, corrected_html, notes_html)

Bases: object

The stored content of one erratum record.

Parameters:
  • type (ErratumType | None) – Erratum type, None if missing or invalid.

  • section (str | None) – Where in the decision the error is, if given.

  • reported_by (str | None) – Free-text reporter; informational only, never an identity.

  • reported_date (date | None) – Authored report date, if valid.

  • original_html (str | None) – Sanitized HTML of “Original text”, if any.

  • corrected_html (str) – Sanitized HTML of “Corrected text”; empty when the section is missing.

  • notes_html (str | None) – Sanitized HTML of the notes, if any.

type: ErratumType | None
section: str | None
reported_by: str | None
reported_date: date | None
original_html: str | None
corrected_html: str
notes_html: str | None
class app.storage.errata_values.LinkTarget(*, summary, title)

Bases: object

A published row that a link may resolve to, with its title.

Used to label erratum search hits (“Erratum for <title>”) without one query per hit.

Parameters:
  • summary (RecordSummary) – Relationship summary, keyed by str(record id).

  • title (str) – Display title of the row.

summary: RecordSummary
title: str