safety: complete STPA steps 2-4 (control structure, UCAs, loss scenarios)#46
Merged
safety: complete STPA steps 2-4 (control structure, UCAs, loss scenarios)#46
Conversation
…ios) Add the remaining STPA analysis artifacts for the synth compiler: - Step 2: Control structure with 6 controllers (instruction selector, peephole optimizer, ARM encoder, ELF builder, ISA validator, Z3 verifier), 3 controlled processes, and 10 control actions. - Step 3: 18 unsafe control actions across all controllers covering providing, not-providing, too-early-too-late, and stopped-too-soon categories. 18 corresponding controller constraints. - Step 4: 12 loss scenarios with causal factors covering inadequate control algorithms, inadequate process models, and sensor failures. - System constraints: 10 system-level safety constraints derived from the hazards defined in Step 1. All files validate with `rivet validate` (PASS, no new errors). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
avrabe
added a commit
that referenced
this pull request
Mar 19, 2026
Complex test case (#36): 17 end-to-end control flow tests covering nested blocks, loops with br_if exit, if/else, br_table dispatch, fibonacci, factorial, deeply nested blocks, loop re-entry, call in loop, early return, unreachable traps, and sequential loops. Rivet artifacts for full traceability: - component-model.yaml: 14 artifacts (CM-001..005 system-reqs, CM-TR-001..006 sw-reqs, CM-VER-001..003 verification) tracing WASI Component Model integration with kiln via BA RFC #46 - target-platforms.yaml: 8 artifacts (TP-001..008) capturing Cortex-M4F/M7/M33 targets, STM32F407/nRF52840 board profiles, vector tables, MPU, and Renode emulation platform - zephyr-integration.yaml: 10 artifacts (ZI-001..010) for Zephyr RTOS integration including CMake build, AAPCS compliance, memory domains, calculator app, PID demo, and linker scripts Closes #36 Implements: FR-002 Implements: FR-005 Trace: skip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
avrabe
added a commit
that referenced
this pull request
Mar 19, 2026
…54) Complex test case (#36): 17 end-to-end control flow tests covering nested blocks, loops with br_if exit, if/else, br_table dispatch, fibonacci, factorial, deeply nested blocks, loop re-entry, call in loop, early return, unreachable traps, and sequential loops. Rivet artifacts for full traceability: - component-model.yaml: 14 artifacts (CM-001..005 system-reqs, CM-TR-001..006 sw-reqs, CM-VER-001..003 verification) tracing WASI Component Model integration with kiln via BA RFC #46 - target-platforms.yaml: 8 artifacts (TP-001..008) capturing Cortex-M4F/M7/M33 targets, STM32F407/nRF52840 board profiles, vector tables, MPU, and Renode emulation platform - zephyr-integration.yaml: 10 artifacts (ZI-001..010) for Zephyr RTOS integration including CMake build, AAPCS compliance, memory domains, calculator app, PID demo, and linker scripts Closes #36 Implements: FR-002 Implements: FR-005 Trace: skip Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the STPA analysis for synth. Step 1 (losses + hazards) was merged in PR #40. This adds:
Total artifacts: 130 (up from 53).
rivet validatepasses with 14 warnings (down from 24).Key traceability example: H-4 (ISA variant mismatch) → UCA-1 (emit FPU on non-FPU target) → LS-1 (incomplete ISA feature database) → SC-4 (ISA variant gating required) — and PR #45 implements exactly this.
Test plan
rivet validatepasses (14 warnings, no errors)rivet statsshows 130 artifacts🤖 Generated with Claude Code