Implement modular IR, validation, and JSON serialization #6

Closed
opened 2026-06-01 13:43:26 +02:00 by yorunikakeru · 0 comments
Owner

Parent: #1

Goal

Implement the declarative IR layer produced by the eDSL and consumed by FrogOS.

Architecture

  • Closed root Condition, Policy, and Action sums.
  • Separate domain modules for service, process, power, network, and later domains.
  • UnvalidatedConfiguration as builder output.
  • Validated IR with hidden constructor.
  • Domain validators plus global cross-domain conflict checks.
  • Explicit IR version and stable JSON encoding.

Validation boundary

The validator checks intent correctness, document integrity, value ranges, duplicates, and incompatible nodes. It does not check current system state or resource availability; those checks belong to the FrogOS engine.

Implementation issues

  • #7 Implement core IR document and closed domain sums
  • #11 Implement semantic validation and conflict accumulation
  • #8 Implement stable versioned JSON serialization for validated IR

Acceptance criteria

  • validate :: UnvalidatedConfiguration -> Either [ValidationError] IR accumulates all detected errors.
  • Only validated IR can be serialized.
  • README examples encode to the documented JSON shape.
  • Unknown node types are treated as IR version incompatibility.
  • Domain validators can evolve independently while root sums remain exhaustive.
Parent: #1 ## Goal Implement the declarative IR layer produced by the eDSL and consumed by FrogOS. ## Architecture - Closed root `Condition`, `Policy`, and `Action` sums. - Separate domain modules for service, process, power, network, and later domains. - `UnvalidatedConfiguration` as builder output. - Validated `IR` with hidden constructor. - Domain validators plus global cross-domain conflict checks. - Explicit IR version and stable JSON encoding. ## Validation boundary The validator checks intent correctness, document integrity, value ranges, duplicates, and incompatible nodes. It does not check current system state or resource availability; those checks belong to the FrogOS engine. ## Implementation issues - [ ] #7 Implement core IR document and closed domain sums - [ ] #11 Implement semantic validation and conflict accumulation - [ ] #8 Implement stable versioned JSON serialization for validated IR ## Acceptance criteria - `validate :: UnvalidatedConfiguration -> Either [ValidationError] IR` accumulates all detected errors. - Only validated `IR` can be serialized. - README examples encode to the documented JSON shape. - Unknown node types are treated as IR version incompatibility. - Domain validators can evolve independently while root sums remain exhaustive.
yorunikakeru changed title from Define IR serialization, validation, and conflict checks to Implement modular IR, validation, and JSON serialization 2026-06-06 14:02:07 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
FrogOS/DSL#6
No description provided.