Skip to content

Add named error code catalog and diagnostics #5324

Description

@tclune

Summary

Introduce stable named error codes across MAPL error handling, backed by a versioned YAML catalog read through ESMF HConfig.

Scope

  • Add hardwired diagnostics for missing, malformed/partial, and _VERIFY failures.
  • Preserve stack/status context and standard-output reporting in serial and MPI paths.
  • Add code-bearing _ASSERT_CODE and _FAIL_CODE forms while preserving legacy macro forms.
  • Cover existing MAPL codes and staged migration of representative macro sites.
  • Group semantically equivalent errors through maintainer-reviewed merge decisions; wording similarity alone is insufficient.

Acceptance Criteria

  • Catalog validation rejects duplicate, missing, malformed, partial, unsupported-version, and undefined-code cases without replacing valid mappings.
  • Same-path initialization is idempotent; invalid or different-path replacement preserves active mappings.
  • Migrated assertion/failure sites use canonical codes and retain useful context.
  • _VERIFY uses hardwired propagation diagnostics.
  • Tests cover catalog, fallback, macro, stdout, and semantic-merge requirements.

Design Artifacts

  • specs/001-named-error-codes/spec.md
  • specs/001-named-error-codes/plan.md
  • specs/001-named-error-codes/tasks.md

Implementation must link this issue before source modification, per MAPL constitution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions