Skip to content

catgraph: typed rejection variants for RewriteRule::new / optimize #251

Description

@tsondru

RewriteRule::new enforces four distinct, documented conditions — parallel sides, revalidated well-formedness, non-empty lhs, mono lhs interface (prop/presentation/rewrite.rs:226-294 at v0.11.0) — but every rejection surfaces as CatgraphError::Presentation { message: String }. A consumer validating a rule set programmatically cannot match on which condition failed without parsing the message, and the same stringly channel serves optimize/replay entry rejections.

Ask: dedicated error variants (or a #[non_exhaustive] rule-rejection enum wrapped in CatgraphError) so rule-validation failures are attributable in code.

Filed promptly per the file-early posture; unscheduled, rank by value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions