Skip to content

Extend EventValue with std::string and double payload types - #6

Merged
alexcvc merged 1 commit into
mainfrom
add-string-double-event-value
Jul 26, 2026
Merged

Extend EventValue with std::string and double payload types#6
alexcvc merged 1 commit into
mainfrom
add-string-double-event-value

Conversation

@alexcvc

@alexcvc alexcvc commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extend EventValue (include/tickguard/EventValue.hpp) to std::variant<bool, std::int32_t, double, std::string>
  • Add representative Catch2 coverage per new type in tests/EventDescriptorTests.cpp: initial image/snapshot, debounce send-vs-suppress, heartbeat resend, equality-driven suppression
  • Add tests/EventDescriptorTypeMismatchDeathTest.cpp — a CTest death test proving the documented std::get<TValue>std::terminate() crash contract still holds on a genuine type mismatch (EventDescriptor<bool> fed a std::string)
    • WILL_FAIL/PASS_REGULAR_EXPRESSION can't detect a signal-killed subprocess (CTest reports it as an unconditional "Exception"), so the test runs through tests/run_death_test.sh, which absorbs the signal itself and reports pass/fail via a normal exit code. POSIX-only, gated by if(UNIX) in tests/CMakeLists.txt.
  • Update AGENTS.md and doc/developer-guide.md to reflect the extended variant

Test plan

  • cmake --build build succeeds
  • ctest --test-dir build --output-on-failure — 26/26 tests pass (was 17 before this branch of work)
  • clang-format --dry-run --Werror clean
  • clang-tidy clean on include/tickguard/EventValue.hpp

Add std::string and double as EventValue alternatives alongside bool
and int32_t. Add representative Catch2 coverage for each new type
(initial image/snapshot, debounce send-vs-suppress, heartbeat resend,
equality-driven suppression), plus a CTest death test proving the
documented std::get<TValue> -> std::terminate() crash contract still
holds on a genuine type mismatch. WILL_FAIL/PASS_REGULAR_EXPRESSION
can't detect a signal-killed subprocess, so the death test runs
through run_death_test.sh, which absorbs the signal and reports
pass/fail via a normal exit code (POSIX-only, gated by if(UNIX)).

Update AGENTS.md and doc/developer-guide.md to reflect the extended
variant.
@alexcvc
alexcvc merged commit 43d1827 into main Jul 26, 2026
6 checks passed
@alexcvc
alexcvc deleted the add-string-double-event-value branch July 26, 2026 07:37
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