Skip to main content

Module codes

Module codes 

Source
Expand description

The canonical validation issue codes — one constant per row of the SPEC.md § Validation table. Call sites reference these instead of bare strings so the code and the SPEC table can never silently drift.

Constants§

DB_MD_BAD_TYPE
the store’s DB.md is not type: db-md.
DB_MD_MISSING_FIELD
the store’s DB.md frontmatter lacks scope or owner.
DB_MD_UNKNOWN_SECTION
DB.md has an ## section other than the three recognized ones.
DUP_COMPANY_DOMAIN
two companys share domain.
DUP_CONTACT_EMAIL
two contacts share email.
DUP_EMAIL_REINGEST
two emails share (from, subject, date) (re-ingest).
DUP_EXPENSE_TUPLE
two expenses share (date, amount, vendor).
DUP_ID
two files declare the same explicit id.
DUP_INVOICE_TUPLE
two invoices share (vendor, date, amount).
DUP_MEETING_TUPLE
two meetings share (date, sorted-attendees-set).
FM_BAD_TIMESTAMP
created / updated / a date field isn’t ISO-8601.
FM_MALFORMED_YAML
frontmatter block isn’t valid YAML.
FM_MISSING_TYPE
content file has no type:.
INDEX_JSONL_DESYNC
a file isn’t in the index.jsonl, or a jsonl record points at a missing file.
INDEX_JSONL_MISSING
a type-folder’s index.jsonl twin is missing.
INDEX_JSONL_STALE
a index.jsonl record’s fields don’t match the file’s frontmatter.
INDEX_MISSING
a non-empty canonical folder lacks index.md.
INDEX_MISSING_ENTRY
a file isn’t listed in its folder’s index.md.
INDEX_ORPHAN
an index.md sits in an empty / non-canonical folder.
INDEX_STALE_ENTRY
an index.md lists a file that no longer exists.
INDEX_SUMMARY_MISMATCH
an index entry’s text doesn’t match the target file’s summary.
INDEX_WRONG_SCOPE
an index’s scope: doesn’t match its filesystem location.
LAYER_TYPE_MISMATCH
a recognized type: sits in a layer other than its canonical one.
LOG_BAD_TIMESTAMP
a log.md entry header timestamp is unparseable.
LOG_OUT_OF_ORDER
log.md entries aren’t in non-decreasing time order (possible rewrite).
LOG_UNKNOWN_KIND
a log.md entry kind isn’t recognized.
NOT_A_STORE
path has no DB.md; not a db.md store.
POLICY_FROZEN_PAGE
a write was attempted on a ### Frozen pages path (write-time).
POLICY_IGNORED_TYPE_DERIVED
a wiki-page derives from an ignored-type record.
POLICY_IGNORED_TYPE_PRESENT
a file with an ### Ignored types type exists.
SCHEMA_ENUM_VIOLATION
a value isn’t in the schema’s enum.
SCHEMA_LINK_PREFIX_MISMATCH
a link to <prefix>/ field has a plain or wrong-prefix value.
SCHEMA_MISSING_REQUIRED
a DB.md schema requires a field that’s absent.
SCHEMA_SHAPE_MISMATCH
a value doesn’t match the schema’s shape modifier.
SUMMARY_EMPTY
summary present but empty.
SUMMARY_MISSING
content file has no summary.
SUMMARY_MULTILINE
summary contains newlines.
SUMMARY_TOO_LONG
summary > 200 chars.
TAGS_MALFORMED
tags isn’t a flat YAML list of short scalar labels.
WIKI_LINK_AMBIGUOUS
wiki-link target matches multiple files (defensive).
WIKI_LINK_BROKEN
wiki-link target file doesn’t exist.
WIKI_LINK_FLOW_FORM_LIST
frontmatter list uses inline [[[a]], [[b]]] — use block form.
WIKI_LINK_HAS_EXTENSION
wiki-link target carries a .md extension — drop it.
WIKI_LINK_SHORT_FORM
wiki-link target isn’t a full store-relative path.