Skip to content

Peer matrix: good and malicious scripted peers per bus - #49

Merged
ShahriarAhnaf merged 2 commits into
agent/peer-examples-c4e8from
agent/peer-matrix-b9d2
Oct 11, 2026
Merged

ShahriarAhnaf merged 2 commits into
agent/peer-examples-c4e8from
agent/peer-matrix-b9d2

Conversation

@ShahriarAhnaf

@ShahriarAhnaf ShahriarAhnaf commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #48 (base is agent/peer-examples-c4e8); retarget to main after #48 merges.

Moves the #48 peers to examples/peers// and adds, per bus (UART, I2C, SPI, CAN, Ethernet), a good and a fault-injecting peer, a per-bus scenario and a matrix table in examples/README.md.

Gate: examples/tests/test_peer_mocks.py drives every peer through its callbacks with a mock ctx and asserts exact bytes (known-answer vectors for good peers, the specific fault for malicious ones).

End-to-end: each example was run in sim 0.6.6 against an STM32H753 flight-controller build (UART/I2C/SPI/CAN) and a Zephyr Ethernet listener; results are in the README 'Verified' table. Runs found and fixed three peer bugs (GPS stream rate, INA228 energy/charge, send_wire caveat). good_arp_udp is mock-tested only.

🤖 Generated with Claude Code

ShahriarAhnaf and others added 2 commits October 11, 2026 02:29
Moves the three existing peers into examples/peers/<bus>/, adds a per-bus
scenario, a matrix README, and examples/tests/test_peer_mocks.py which drives
every peer through its callbacks with a mock ctx (no firmware, no sim).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
good_gps re-arms its stream when the rate arrives after NAV-PVT enable,
good_ina228 serves ENERGY/CHARGE, malicious_tf02 NACKs the first address
phases, send_wire caveat corrected for sim 0.6.6.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@ShahriarAhnaf
ShahriarAhnaf marked this pull request as ready for review October 11, 2026 19:02
@ShahriarAhnaf
ShahriarAhnaf merged commit 3a3152d into agent/peer-examples-c4e8 Oct 11, 2026
8 checks passed
@ShahriarAhnaf
ShahriarAhnaf deleted the agent/peer-matrix-b9d2 branch October 11, 2026 19:04
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