# ============================================================
# src/accountable_record/stage_030_sources/base/constants.py
# ============================================================
"""Sources-stage constants and diagnostic codes (Layer 0).

WHY:
    Stage 030 establishes the target repository's *source materials*: the
    traceable origins that later stages reference. This module is the stage's
    Layer 0 vocabulary: the AR.SR.* diagnostic codes plus the structural
    constants that bound what discovery is permitted to look at.

OBS (structural, not interpretive):
    Discovery may consider only *structural* facts: a path's existence, its
    location relative to the target root, a declared source role, and a stable
    identifier. It MUST NOT read, parse, judge, or interpret source *content*.
    The constants here therefore describe where sources are declared and which
    structural attributes are recognized - never what a source means. AR.SOURCE
    .RECORD requires sources be "distinguishable from records that interpret or
    derive from them" and "not modified to reflect interpretation"; keeping
    discovery structural is how this stage honors that at the code level.

REQ:
    - No internal dependencies beyond the shared Layer 0 diagnostics module.
    - Concern is Concern.SOURCES ("SR"), already defined in the shared
      diagnostics enum; 030 does not mint new concerns.
"""

STAGE_NAME = "stage_030_sources"

# WHERE sources are declared. A target repository declares its source
# materials in its manifest; the conventional on-disk location is a sources
# directory. Both are structural anchors, owned here in one place so a layout
# change is a one-line edit.
SOURCES_TABLE = "sources"
SOURCES_KEY_ROOT = "root"
SOURCES_KEY_ENTRIES = "entries"

# Per-entry structural keys. These are the ONLY attributes discovery reads
# from a declared source entry. Note the deliberate absence of any content,
# meaning, truth, or authority field.
ENTRY_KEY_ID = "id"
ENTRY_KEY_PATH = "path"
ENTRY_KEY_ROLE = "role"

# Conventional source directory name, used when the manifest declares no
# explicit root. Structural default only.
DEFAULT_SOURCES_DIRNAME = "sources"
