HomeDocs-Technical WhitePaper05-EFT.WP.Core.Errors v1.0

Appendix A — Error Code Registry Schema


I. Purpose and Scope


II. Naming and Coding Conventions

  1. Code structure: code = "E.<DOMAIN>.<GROUP>.<KEY>[.NNN]"
    • <DOMAIN>: top-level domain (e.g., METROLOGY, MEASUREMENT, NUMERICS, DATA_QUALITY, MODEL, PIPELINE, CALIBRATION, REFCOND, REPORT, IO, SECURITY).
    • <GROUP>: second-level grouping (e.g., UNIT, TRACE, INTEGRATION, OUTLIER, FIT, TIME, LINEAR, etc.).
    • <KEY>: specific fault key (UPPER_SNAKE_CASE, semantically stable).
    • Optional suffix .NNN: scenario split under the same key (starting from 001).
  2. Regex constraint: ^E\.[A-Z][A-Z0-9_]*\.[A-Z][A-Z0-9_]*\.[A-Z][A-Z0-9_]*(\.[0-9]{3})?$.
  3. Global uniqueness: code is unique across the registry; the version for a given code increases monotonically.
  4. Semantic stability: the message template may evolve but must not change the root-cause/domain/severity semantics.

III. Field Dictionary and Required Items

  1. Required
    • code:str (globally unique; see naming rules)
    • name:str (human-readable short title, English)
    • severity:str ∈ {INFO, WARN, ERROR, FATAL}
    • domain:str (matches <DOMAIN>)
    • message:str (templated with placeholders like {{var}})
    • remediation:str (preferred action, e.g., retry(policy={{pid}}), fallback(model={{mid}}), graceful_degradation(mode={{m}}), recalibrate(proc={{rid}}))
  2. Recommended
    • see:list[str] (cross-volume anchors like I50-4, I40-9, S88-1)
    • tags:list[str] (keywords, e.g., ["T_arr","gamma(ell)","n_eff","c_ref"])
    • cause:str (direct cause)
    • effect:str (user impact, incl. SLI/SLO touchpoints)
    • detection:str (criteria, e.g., |z| > 3.5, chi2/dof > t0)
    • context_schema:list[str] (minimal context keys; see §IV)
    • metrics:list[str] (quantitative indicators to log, e.g., ["chi2","r_bar_max","latency_ms","pass_rate"])
    • policy_hint:str (strategy hint, e.g., prefer_robust_loss=Huber)
  3. Lifecycle
    • version:str (semantic version, e.g., 1.0.0)
    • status:str ∈ {DRAFT, ACTIVE, DEPRECATED, RETIRED}
    • created_at:str, updated_at:str (ISO8601)
    • deprecates:list[str], replaces:list[str] (compatibility relations)

IV. Minimal Context Keys (Trace & Reproducibility)


V. Severity → Recommended Action Mapping


VI. Normalization and Validation Rules


VII. Reference JSON Schema (Outline)

  1. type: object
  2. required: [ "code","name","severity","domain","message","remediation" ]
  3. properties:
    • code: string, pattern ^E\.[A-Z][A-Z0-9_]*\.[A-Z][A-Z0-9_]*\.[A-Z][A-Z0-9_]*(\.[0-9]{3})?$
    • severity: string, enum [ "INFO","WARN","ERROR","FATAL" ]
    • domain: string
    • name: string
    • message: string
    • remediation: string
    • see: array(string)
    • tags: array(string)
    • cause: string
    • effect: string
    • detection: string
    • context_schema: array(string)
    • metrics: array(string)
    • policy_hint: string
    • version: string
    • status: string, enum [ "DRAFT","ACTIVE","DEPRECATED","RETIRED" ]
    • created_at: string (date-time)
    • updated_at: string (date-time)
    • deprecates: array(string)
    • replaces: array(string)

VIII. Implementation Bindings (I50- Correspondence)**


IX. Example Entries (Cross-Domain Minimal Set)


X. Maintenance and Governance

  1. Version and status
    • New entries start as DRAFT; switch to ACTIVE after integration and regression pass.
    • When superseded, mark as DEPRECATED pointing to the new code; freeze the old entry allowing only remediation strengthening and see additions.
    • After migration, mark RETIRED; keep read-only for historical report parsing.
  2. Change admission
    • Any severity change requires cross-volume review and updates to set_error_policy.
    • When adding message placeholders, extend context_schema and update producers.
    • Regression guard: verify deviations against baselines with compare_reports(a,b, metrics=["mean","U","pass_rate"]).

XI. Quick Pre-Registration Checklist


XII. Alignment with Metrology Anchors


XIII. Deliverables and Operationalization

  1. Deliverables
    • Standard schema files (export as both YAML and JSON), published via the same pipeline as export_units("yaml") and export_refcond("yaml").
    • An example library (≥ 20 entries to be extended during implementation), delivered with the default set_error_policy bundle.
  2. Landing steps
    • Bulk-register core entries using this schema (prioritize METROLOGY, MEASUREMENT, NUMERICS, DATA_QUALITY).
    • Enable normalize_error in the integrated environment to unify log and report formats.
    • Link error codes to SLI/SLO gates to trigger automated chains of retry / fallback / graceful_degradation.

Copyright & License (CC BY 4.0)

Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.

First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/