Skip to content

tests: cover EDA event bus edge cases#199

Draft
cursor[bot] wants to merge 3 commits into
next-gen-5from
cursor/missing-test-coverage-c6e2
Draft

tests: cover EDA event bus edge cases#199
cursor[bot] wants to merge 3 commits into
next-gen-5from
cursor/missing-test-coverage-c6e2

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 7, 2026

Risky behavior now covered

  • EDA event bus disabled-cvar gating, channel capacity, case-insensitive channel reuse, payload bounds, FIFO peek/pop/drain ordering, telemetry, and full ring-buffer wraparound.
  • Fixes a discovered edge case where a full EDA ring buffer (s_qHead == s_qTail with s_qCount == EDA_MAX_QUEUE) was treated as empty by EDA_Pop/EDA_Peek.

Test files added/updated

  • Added tests/unit/test_eda.c
  • Added tests/stub_eda_runtime.c
  • Registered unit_eda in CMakeLists.txt
  • Updated tests/README.md

Why these tests reduce regression risk

  • The EDA bus is shared game infrastructure used by AIML/Lua/game systems, so queue-ordering or drop bugs have a wide blast radius.
  • The tests exercise actual C behavior with deterministic stubs and catch capacity/wraparound conditions that source guards would miss.

Validation

  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=ON
  • cmake --build build-coverage-tests --target unit_eda
  • ctest --test-dir build-coverage-tests -R unit_eda --output-on-failure
Open in Web View Automation 

cursoragent and others added 3 commits May 7, 2026 10:10
Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.com>
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