Skip to content

Type: duration (records retention / TTL / SLA) + timestamp arithmetic #96

@rrrodzilla

Description

@rrrodzilla

Workstream: Type system · Part of #89

Context

CEL has a first-class duration type; SchemaForge has none — @format("Duration") is display-only over an int. Duration is the highest-value missing type for a federal records platform: retention windows, TTLs, SLA timers.

Scope

  • New FieldType::Duration + DynamicValue::Duration (crates/schema-forge-core/src/types/field_type.rs, dynamic_value.rs).
  • DSL syntax + literal form (e.g. duration("2555d")).
  • Timestamp↔duration arithmetic in rules (pairs with existing DateTime).

Acceptance

  • A duration field round-trips; rules can compute now() - created_at > duration(...).

Enables records-retention rules in the rules engine (#89).


Dependencies: Parallelizable now — independent of the substrate decision. Soft.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions