# ============================================================
# src/accountable_record/stage_080_generated/base/constants.py
# ============================================================
"""Generated-artifact-stage structural constants.

WHY:
    Stage 080 validates the generated artifacts that earlier stages refer to
    by digest. Stage 060 exports element artifacts; stage 070 locks them and
    records, per locked record, a digest over a canonical-generated-json
    target.

    This module names only the stage's structural vocabulary: generated-artifact
    roots, element artifact locations, identity keys, and digest vocabulary.
    Diagnostic definitions live in base/diagnostics.py so diagnostic codes,
    severities, and messages stay bound together.

OBS (boundary):
    s080 owns generated-artifact validation. It does not build the catalog
    (s050), validate export pairs (s060), validate or build resolution locks
    (s070), or render documentation (s090). It consumes the stage 060 exports
    artifact and the stage 070 resolution artifact from pipeline state; it does
    not rebuild either one.

OBS (generated-artifact scope):
    For the current AR pipeline, generated element artifacts are represented by
    the exported element artifacts discovered by stage 060 under data/export/.
    The locked element records from data/locks/elements.lock.json name, per
    element, a digest_algorithm, a digest_target, and a digest. Stage 080 checks
    that a generated/exported artifact is present for each locked element.

OBS (digest scope):
    This base layer names the digest vocabulary the lock already declares
    (sha256 over canonical-generated-json). Whether s080 recomputes digests or
    only checks presence/coverage is a validation-layer decision, not a Layer 0
    one. The constants here do not assume recomputation.

OBS (data-driven):
    No hardcoded element ids, category names, versions, or counts. The locked
    element set comes from state; generated artifacts come from the stage 060
    export registry.
"""

STAGE_NAME = "stage_080_generated"

# Default generated-artifact root for target repositories. In AR, generated
# element artifacts are represented by exported canonical JSON artifacts.
GENERATED_DIRNAME = "data/export"

# The element-generated namespace beneath the generated root. Reconciliation
# against the lock is scoped to element artifacts.
GENERATED_ELEMENTS_SUBDIR = "elements"

# The per-element generated artifact file. Kept as structural vocabulary for
# digest recomputation support; current s080 validation uses the s060 export
# registry as the generated-artifact registry.
GENERATED_ELEMENT_FILENAME = "element.generated.json"

# Loci within a generated element artifact for the structural cross-link back to
# the locked identity, matching the exported/authored side.
GENERATED_ELEMENT_IDENTITY = "identity"
GENERATED_ELEMENT_COMPACT_ID_KEY = "compact_id"

# Digest vocabulary already declared by the stage 070 lock. Named here so the
# generated stage speaks the same words as the lock it reconciles against.
DIGEST_ALGORITHM_SHA256 = "sha256"
DIGEST_TARGET_CANONICAL_GENERATED_JSON = "canonical-generated-json"
