Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Rules pipeline contract - Flow and algorithm

Platform spec article

Rules pipeline contract - Flow and algorithm

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki
  1. Host finishes mod collect/generate/merge and bumps syntax_generation_id.
  2. Inspector-only meta runs (if any) without mutating the merged tree.
  3. SemanticPipelineRule stages execute in registration order within staged.rs.
  4. stage8_metaprogramming validates meta-produced attributes; it does not replace mod host orchestration.
  5. Diagnostics publish to CLI/LSP snapshot; pipeline continues only if policy allows after error count.
  6. HIR normalization and resolution consume the same generation id before lowering.
sequenceDiagram
  participant Host
  participant ModHost
  participant Rules as SemanticPipelineRule
  participant Lower
  Host->>ModHost: collect generate merge
  ModHost-->>Host: syntax_generation_id++
  Host->>Rules: run staged rules
  Rules-->>Host: diagnostics
  Host->>Lower: lower_program on stable snapshot
  • compiler/crates/beskid_analysis/src/analysis/rules/
  • compiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rs
  • compiler/crates/beskid_analysis/src/services.rs