Skip to content

tests: cover EDA event queue edge cases#209

Draft
cursor[bot] wants to merge 2 commits into
next-gen-5from
cursor/regression-test-coverage-3f55
Draft

tests: cover EDA event queue edge cases#209
cursor[bot] wants to merge 2 commits into
next-gen-5from
cursor/regression-test-coverage-3f55

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 14, 2026

Risky behavior now covered

  • EDA disabled gating, channel validation, case-insensitive channel reuse, auto-registration, null payload handling, FIFO drain/peek/pop behavior, channel capacity, payload truncation, full queue overflow rejection, full-ring wraparound, and queue-depth telemetry.
  • Fixes the ring-buffer full-queue condition so a valid full queue (s_qHead == s_qTail with s_qCount == EDA_MAX_QUEUE) remains readable.

Test files added/updated

  • tests/unit/test_eda.c
  • CMakeLists.txt
  • tests/README.md
  • src/game/g_eda.c (minimal bug fix exposed by the regression test)

Why this reduces regression risk

  • EDA is a shared gameplay-facing event path used by Lua/AIML/ECS integration. These tests exercise data validation and queue edge cases that can silently drop events or break integrations.

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 2 commits May 14, 2026 10:05
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