Skip to content

Release 1.7.0: Analysis passes, validation enhancements, diagram extensions#720

Merged
reid-spencer merged 11 commits into
mainfrom
development
Feb 9, 2026
Merged

Release 1.7.0: Analysis passes, validation enhancements, diagram extensions#720
reid-spencer merged 11 commits into
mainfrom
development

Conversation

@reid-spencer
Copy link
Copy Markdown
Contributor

Summary

  • New analysis passes: MessageFlowPass, EntityLifecyclePass, DependencyAnalysisPass in passes/shared/.../analysis/
  • ValidationPass enhancements: Handler completeness classification, RecognizedOptions registry (~25 options), streaming reachability checks, new semantic validations for entities, projectors, repositories, adaptors, sagas, and schemas
  • DiagramsPass extensions: Populated DataFlowDiagramData with resolved connections; added DomainDiagramData with processors/subdomains/contexts/epics
  • StatsPass behavioral statistics: Statement classification into prompt and executable categories
  • RiddlLib/RiddlAPI: New getHandlerCompleteness(), getMessageFlow(), getEntityLifecycles() methods on shared trait + JS facade
  • StatementParser cleanup: Minor IntelliJ IDEA warnings resolved

All changes are additive (no breaking API changes). 734 tests, 0 failures.

Test plan

  • sbt clean cJVM compiles successfully
  • sbt tJVM — 734 tests pass, 0 failures
  • CI validates all platforms (JVM, JS, Native)

🤖 Generated with Claude Code

respencer-ncl and others added 11 commits February 6, 2026 07:14
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix three bugs: SagaStep checked doStatements twice instead of
undoStatements for revert validation, SagaStep shape check compared
getClass of identical types (always true), and validateState called
checkMetadata twice.

Add validation for previously unvalidated definitions: Schema
(kind vs structure compatibility, data/link/index ref resolution)
and Relationship (processor ref resolution).

Add semantic validations: streamlet shape vs inlet/outlet count,
handler requirements for streamlets/adaptors/repositories, adaptor
empty handler warning, projector repository ref resolution,
epic/usecase user story user ref resolution, and function
input/output type expression validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three new CollectingPass subclasses in passes/shared/.../analysis/:
- MessageFlowPass: builds directed message flow graph (producers,
  consumers, message types, flow mechanisms)
- EntityLifecyclePass: extracts entity state machines (states,
  transitions, initial/terminal states)
- DependencyAnalysisPass: builds cross-context and cross-entity
  dependency graphs (contextDeps, entityDeps, typeDeps, adaptorBridges)

Each requires ResolutionPass and runs via
Pass.standardPasses :+ XxxPass.creator().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… and streaming checks

ValidationOutput: Add HandlerCompleteness and BehaviorCategory enum to
classify handlers as Executable, PromptOnly, or Empty.

ValidationPass: Collect handler-parent mappings during processing and
classify handlers in postProcess(). Add new validations for:
- Entity handler command/query handling
- FSM entity morph/become statement check
- Repository handler command/query handling
- Projector handler event handling
- Adaptor message type cross-referencing
- Schema relational link validation
- SagaStep do/undo compensation symmetry

DefinitionValidation: Add RecognizedOptions registry (~25 options) with
OptionSpec for name, arity, and parent type validation. Unrecognized
options produce StyleWarning (not Error) to keep extensible.

StreamingValidation: Implement checkStreamingUsage with isolated
streamlet detection and source-to-sink reachability via BFS.

Update everything.check and saga.check with expected new warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Populate DataFlowDiagramData with resolved connections (outlet→inlet
via connectors), streamlets, and message types per context.

Add DomainDiagramData case class with processors, subdomains, contexts,
and epics. Add DataFlowConnection case class for resolved edges.

Replace DomainDiagramData type alias with proper case class. Add
domainDiagrams map to DiagramsPassOutput.

Update DiagramsPassTest to expect non-empty dataFlowDiagrams.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unnecessary braces in wildcard import (AST.{*} → AST.*)
- Simplify unnecessary case pattern match to plain lambda
- Add private modifier to setOfStatements (unused outside trait)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Classify statements into prompt (prompt "...") and executable
(tell, send, morph, set, become, error, code) categories.

Add numPromptStatements and numExecutableStatements fields to
DefinitionStats and KindStats. Refactor computeNumStatements into
computeStatementCounts returning a StatementCounts case class
that accumulates totals, prompts, and executables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RiddlLib (shared trait + object): Add getHandlerCompleteness(),
getMessageFlow(), and getEntityLifecycles() methods. Each parses
source, runs the appropriate pass pipeline, and returns typed results.

RiddlAPI (JS facade): Add corresponding @JSExport methods that
delegate to RiddlLib and convert results to plain JS objects for
TypeScript consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLAUDE.md: Add notes 38-42 covering analysis passes, RecognizedOptions
registry, RiddlLib analysis API, HandlerCompleteness, and downstream
integration plans.

NOTEBOOK.md: Document February 8 session work (phases 4-5), update
changes-since-release section, reorder release history chronologically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 9, 2026

@reid-spencer reid-spencer merged commit c570bf8 into main Feb 9, 2026
15 checks passed
@reid-spencer reid-spencer deleted the development branch February 9, 2026 02:02
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21809821363

Details

  • 310 of 686 (45.19%) changed or added relevant lines in 10 files are covered.
  • 40 unchanged lines in 23 files lost coverage.
  • Overall coverage decreased (-1.4%) to 62.391%

Changes Missing Coverage Covered Lines Changed/Added Lines %
language/shared/src/main/scala/com/ossuminc/riddl/language/parsing/StatementParser.scala 0 1 0.0%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/stats/StatsPass.scala 45 50 90.0%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/validate/DefinitionValidation.scala 49 57 85.96%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/diagrams/DiagramsPass.scala 36 45 80.0%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/validate/StreamingValidation.scala 43 53 81.13%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/analysis/EntityLifecyclePass.scala 0 54 0.0%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/validate/ValidationPass.scala 136 225 60.44%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/analysis/DependencyAnalysisPass.scala 0 97 0.0%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/analysis/MessageFlowPass.scala 0 103 0.0%
Files with Coverage Reduction New Missed Lines %
commands/shared/src/main/scala/com/ossuminc/riddl/commands/FlattenCommand.scala 1 13.04%
commands/shared/src/main/scala/com/ossuminc/riddl/commands/FromCommand.scala 1 52.63%
language/shared/src/main/scala/com/ossuminc/riddl/language/AST.scala 1 58.85%
language/shared/src/main/scala/com/ossuminc/riddl/language/bast/BASTUtils.scala 1 27.03%
language/shared/src/main/scala/com/ossuminc/riddl/language/Finder.scala 1 88.68%
language/shared/src/main/scala/com/ossuminc/riddl/language/Messages.scala 1 87.69%
language/shared/src/main/scala/com/ossuminc/riddl/language/parsing/ParsingErrors.scala 1 93.55%
language/shared/src/main/scala/com/ossuminc/riddl/language/parsing/RiddlParserInput.scala 1 85.42%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/diagrams/DiagramsPass.scala 1 76.77%
passes/shared/src/main/scala/com/ossuminc/riddl/passes/prettify/RiddlFileEmitter.scala 1 49.06%
Totals Coverage Status
Change from base Build 21738399926: -1.4%
Covered Lines: 6017
Relevant Lines: 9644

💛 - Coveralls

scala-steward pushed a commit to scala-steward/riddl-1 that referenced this pull request Feb 20, 2026
Release 1.7.0: Analysis passes, validation enhancements, diagram extensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants