Skip to content

feat(emv2): error-propagation traversal across AADL connection graph (v0.10.x)#225

Open
avrabe wants to merge 3 commits into
mainfrom
feat/v0.10.x-emv2-propagation
Open

feat(emv2): error-propagation traversal across AADL connection graph (v0.10.x)#225
avrabe wants to merge 3 commits into
mainfrom
feat/v0.10.x-emv2-propagation

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 14, 2026

Summary

  • Closes the single biggest gap vs OSATE/HAMR: EMV2 error-propagation traversal now walks the AADL semantic connection graph to compute which downstream components inherit each declared error type (structural fault tree + cut sets were already present)
  • New emv2_propagation.rs module: Emv2Overlay carries in/out propagation and flow declarations; compute_error_propagation returns ErrorPropagationReport with chains, local flows, and diagnostics; analysis only, no codegen
  • Wired into register_all / register_all_except_wctt; adds REQ-EMV2-PROPAGATION-001 + TEST-EMV2-PROPAGATION to artifact YAML files

Example chain from test fixture

Single-hop test (emv2_propagation_single_hop): component sensor (Device) declares out propagation { BadValue }, component controller (Process) declares in propagation { BadValue }, one semantic connection between them. Result:

ErrorPropagationChain {
    origin: sensor,
    error_type: "BadValue",
    downstream: [controller],
    via_connections: [c_0_1],
}

Test plan

  • cargo test -p spar-analysis emv2_propagation — 6 tests pass (single-hop, 3-hop chain, cycle detection, path-flow isolation, case-insensitive match, no-connection baseline)
  • cargo clippy -p spar-analysis -- -D warnings — clean
  • cargo fmt --check — clean
  • rivet validate — YAML parse error at line 1615 of verification.yaml is pre-existing (confirmed against main), not introduced by this PR

🤖 Generated with Claude Code

…(v0.10.x)

Introduces emv2_propagation.rs — a new analysis module that walks the
semantic connection graph to compute which downstream components inherit
each declared error type.  The Emv2Overlay carries in/out propagation and
flow declarations (not yet integrated into SystemInstance); compute_error_
propagation returns ErrorPropagationReport with chains, local_flows, and
diagnostics.  Cycle detection tracks (component, error_type) pairs.  6 unit
tests cover single-hop, 3-hop chain, cycle, path-flow isolation, case-
insensitive matching, and no-connection baseline.  Wired into register_all /
register_all_except_wctt.  Adds REQ-EMV2-PROPAGATION-001 + TEST-EMV2-
PROPAGATION to artifact YAML files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@avrabe avrabe enabled auto-merge (squash) May 14, 2026 17:19
avrabe and others added 2 commits May 15, 2026 12:12
Two surgical fixes surfaced by the gate after smithy resumed:

1. crates/spar-analysis/src/emv2_propagation.rs:487 — clippy
   `let_and_return`: dropped the bound `idx` and returned `alloc(...)`
   directly. Pure refactor, no behavior change.
2. crates/spar-analysis/src/tests.rs:1640 — `test_register_all_count`
   expected 30 passes; the new emv2_propagation pass makes it 31.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
# Conflicts:
#	artifacts/requirements.yaml
#	artifacts/verification.yaml
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.

1 participant