Skip to content

Composite tree schema validation — compile-time max depth / parent-child type compatibility / node count #218

Description

@Skymly

Motivation

ROADMAP long-term exploration candidate: Composite tree schema validation.

Existing Composite diagnostics (DP010-DP015, DP040-DP041) cover key uniqueness, parent key existence, cycle detection, contract implementation, constructor, DI registration — but do not validate the overall tree structure shape. This feature adds compile-time validation for max depth, parent-child type compatibility, and node count.

Design

RFC: docs/rfc/CompositeTreeSchemaValidation.md

API

  • [CompositeSchema(MaxDepth, MaxNodes)] on contract interface — global tree constraints
  • [CompositePart(AllowedChildTypes)] on parent nodes — per-node child type restriction

Diagnostics

  • DP063: CompositeTreeMaxDepthExceeded (Warning)
  • DP064: CompositeChildTypeNotAllowed (Error)
  • DP065: CompositeNodeCountExceeded (Warning)

Backward compatibility

All constraints are opt-in. Unmarked contracts behave as before — zero breaking changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions