Skip to content

Replace the checkpoint reason string bridge with generated-enum parity #286

Description

@flyingrobots

Classification

Contract/semantic-domain debt exposed by PR #282. Blocked by flyingrobots/echo#679.

Problem

Jim owns the checkpoint reason domain, but the transitional GraphQL contract currently declares reason: String!. The generated request model therefore accepts an arbitrary string, while native Jim separately defines the closed CheckpointReason enum and maintains handwritten string-to-enum and enum-to-string mappings.

The current native witnesses are intentionally fail-closed and prove the five accepted values. They do not give schema-to-native compile-time exhaustiveness: a future variant can drift across the authored schema, generated ABI, native enum, mapping functions, and tests.

Evidence

Why it matters

A checkpoint reason changes the meaning and identity of Jim's checkpoint proposition. Treating that domain as an open string in one layer makes semantic drift a runtime concern at an authority boundary.

Constraints

  • Do not hand-edit generated artifacts.
  • Jim continues to own checkpoint semantics.
  • Echo continues to own admission, scheduling, receipts, ticks, WAL, and causal history.
  • Invalid or unknown values must fail before admission.
  • Keep this as compatibility work; Edict remains the intended native invocation path.

Acceptance criteria

  • Fix or consume echo-wesley-gen emits uncompilable Rust for GraphQL enums echo#679 before changing the schema.
  • Author a GraphQL RopeCheckpointReason enum with exactly Jim's supported values.
  • Regenerate the request ABI without artifact edits.
  • Keep one explicit, exhaustive conversion from the generated enum into Jim's native semantic enum.
  • Add a bijection/exhaustiveness witness over every generated and native variant.
  • Adding or removing a variant on either side fails generation, compilation, or the deterministic witness.
  • Unknown wire values remain a typed, pre-admission failure.
  • Document the later Edict replacement seam.

Related

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

    causal-ropeCausal rope text authority roadmapenhancementNew feature or requestsliceImplementable roadmap slicework-in-progressCycle or PR is intentionally in progress and not ready to merge

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions