Skip to content

feat: complex control flow tests + platform/CM/Zephyr rivet artifacts#54

Merged
avrabe merged 1 commit intomainfrom
feat/complex-tests-and-artifacts
Mar 19, 2026
Merged

feat: complex control flow tests + platform/CM/Zephyr rivet artifacts#54
avrabe merged 1 commit intomainfrom
feat/complex-tests-and-artifacts

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Mar 19, 2026

Summary

  • 17 complex control flow tests (closes Complex test case #36): nested blocks, loops, br_if, br_table, fibonacci, factorial, deeply nested blocks, loop re-entry, call-in-loop, early return, unreachable traps, sequential loops
  • 14 Component Model artifacts (component-model.yaml): canonical ABI compat with kiln, BA RFC safety: complete STPA steps 2-4 (control structure, UCAs, loss scenarios) #46 lowering, host intrinsic ABI, WASI P2 dispatch, async intrinsics — cross-linked to kiln: artifacts
  • 8 target platform artifacts (target-platforms.yaml): Cortex-M4F/M7/M33 targets, STM32F407/nRF52840 board profiles, vector tables, MPU allocation, Renode emulation platform
  • 10 Zephyr integration artifacts (zephyr-integration.yaml): CMake build, AAPCS compliance, memory domains, calculator app (Create Zephyr calculator application #21), hardware testing (Test calculator on real hardware #22), PID demo, linker scripts, meld runtime integration

Rivet coverage: 89.7% overall, 100% on all STPA/verification chains. All 18 remaining errors are external cross-refs (kiln:/sigil:) that resolve when externals are synced.

Test plan

  • cargo test --workspace — all tests pass (0 failures)
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --check — clean
  • rivet validate — 0 local errors
  • rivet coverage — 89.7%

🤖 Generated with Claude Code

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>
@avrabe avrabe merged commit ee68d38 into main Mar 19, 2026
6 checks passed
@avrabe avrabe deleted the feat/complex-tests-and-artifacts branch March 19, 2026 07:16
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.

Complex test case

1 participant