Skip to content

fix(server): report scenario open questions and assumptions in validate_event_model - #203

Merged
yordis merged 1 commit into
TrogonStack:mainfrom
enilsen16:enilsen16/fix-annotation-findings
Oct 20, 2026
Merged

yordis merged 1 commit into
TrogonStack:mainfrom
enilsen16:enilsen16/fix-annotation-findings

Conversation

@enilsen16

@enilsen16 enilsen16 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

apply reports OPEN_QUESTION_PRESENT and ASSUMPTION_PRESENT only for scenario metadata. validate_event_model reports them only for entity metadata. No single call lists all open questions and assumptions in a model.

Change

  • Move the scenario annotation walk into one helper, push_scenario_annotation_findings. validate_scenarios (apply) and validate_model both call it, so the two surfaces give the same finding for the same scenario annotation (same message, subject and subject_field: scenarios[].metadata).
  • validate_model now reports annotations on the scenarios of each CommandSlice, ReadModelSlice and AutomationSlice member, next to the entity-level annotations.
  • validate_model reports the annotations of a member once, also when the model lists that member more than once.

Test

  • validate_model reports two OPEN_QUESTION_PRESENT findings for a CommandSlice with an open question on the slice and one on a scenario (metadata and scenarios[].metadata). The scenario finding is equal to the finding that validate_scenarios gives.
  • The same check for ASSUMPTION_PRESENT.
  • A model that lists the same slice two times gives each finding once.
  • cargo test -p trogon-atlas-server and cargo clippy -p trogon-atlas-server --all-targets -- -D warnings pass.

Closes #92


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…te_event_model

Signed-off-by: Erik Nilsen <enilsen16@live.com>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a071ee47-1b63-4093-a855-4ed9c49edbb9
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@enilsen16
enilsen16 marked this pull request as ready for review October 20, 2026 15:19
@cursor

cursor Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes only add informational validation findings and deduplicate reporting; no auth, persistence, or blocking validation behavior.

Overview
validate_event_model now surfaces open questions and assumptions on scenario metadata, so one validation pass can answer what is still open at both entity and scenario level—matching what apply already reported via validate_scenarios.

Scenario annotation handling is centralized in push_scenario_annotation_findings, used by slice validation during apply and by the model-wide member walk. Duplicate model members no longer duplicate Info findings thanks to a per-member dedup set.

Tests assert slice + scenario metadata / scenarios[].metadata findings, parity between validate_model and validate_scenarios for the same scenario annotation, and single reporting when a member is listed twice.

Reviewed by Cursor Bugbot for commit fd302bc. Bugbot is set up for automated code reviews on this repo. Configure here.

@yordis
yordis merged commit ce76384 into TrogonStack:main Oct 20, 2026
28 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.

Open-question and assumption findings are split between apply and validate_event_model

2 participants