Skip to content

refactor(yaml): simplify event declarations - #437

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
johanpel:yaml-consistent-event-fields
Jul 22, 2026
Merged

refactor(yaml): simplify event declarations#437
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
johanpel:yaml-consistent-event-fields

Conversation

@johanpel

Copy link
Copy Markdown
Contributor

Description

Simplifies entity event declarations. Events default to once-cardinality and use multi: true when repeatable. Entity events and FSM states use attributes:, while records retain fields:.

Written by Codex.

Related Issues

This will also make additional syntax introduced by #427 across FSM and entity blocks consistent.

Signed-off-by: Johan Peltenburg <johan.peltenburg+code@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: QUIET

Plan: Enterprise

Run ID: 8515526d-20e5-4c16-ae18-e9d87c60c8b3

📥 Commits

Reviewing files that changed from the base of the PR and between fd9ef1a and 5262c68.

📒 Files selected for processing (6)
  • crates/instrumentation-build/example/model.yaml
  • crates/yaml/src/ast.rs
  • crates/yaml/src/lower.rs
  • crates/yaml/tests/diagnostics.rs
  • crates/yaml/tests/fsm.rs
  • crates/yaml/tests/references.rs

📝 Walkthrough

Walkthrough

Event YAML declarations now use explicit multi and attributes fields. The AST and lowering logic were simplified accordingly, and diagnostics, reference, FSM, and instrumentation fixtures were updated to validate the new representation.

Changes

Event schema update

Layer / File(s) Summary
Explicit event representation
crates/yaml/src/ast.rs, crates/instrumentation-build/example/model.yaml
Event deserialization now uses a structured event with annotations, a boolean multi flag, and an attributes mapping; example event declarations use the new shape.
Schema event lowering
crates/yaml/src/lower.rs
Event fields and annotations are lowered from the new structure, with multi selecting Cardinality::Multi or Cardinality::Once.
Validation and reference coverage
crates/yaml/tests/diagnostics.rs, crates/yaml/tests/fsm.rs, crates/yaml/tests/references.rs
Tests validate boolean multi parsing, updated event fixtures, and expected cardinality for reference-related events.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: dhruv9vats, mbrobbel

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: simplifying YAML event declarations.
Description check ✅ Passed It covers the change and related issue, and the missing Testing/Screenshots sections are non-critical.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@mbrobbel mbrobbel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@johanpel

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 0f12728 into rapidsai:main Jul 22, 2026
11 checks passed
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.

2 participants