test(meta): raise meta coverage to >=90% + fix ffi CallbackRegistry crash
MA
4mo ago+19275+19275+01234567890123456789012345678901234567890123456789-38241-38241-01234567890123456789012345678901234567890123456789
Summary
Brings the atom/meta test suite to comprehensive, 1:1-with-headers coverage and fixes two latent bugs in ffi.hpp uncovered along the way.
Tests
- Add the previously-missing
tests/meta/reflection/test_refl_field.cpp(coversFieldBase: construction/defaults, member-pointer binding, validators, and the C++23 deducing-thisbuilders incl. derived-type preservation). - Expand the meta test suites so every header with runtime code reaches ≥90% deduplicated source-line coverage (33 of 34 at 92.5%–100%). Coverage was measured per-test to avoid gcov's per-instantiation line inflation, which otherwise makes template headers report 5–15× their real line count.
facade_anystops at its reachable ceiling (~88%): the remaining lines are defensive proxy-callcatchblocks and the never-invokedless_than_impl, unreachable without fault injection.- Full suite: 1233 test cases, 0 failures across all 37 meta test executables.
ffi fixes
- CallbackRegistry SIGSEGV:
registerCallbackstored the raw closure type instd::anywhilegetCallback<Sig>retrieved it asstd::function<Sig>; the pointer-formany_castreturnednullptron the mismatch (it does not throw, so the surroundingcatchwas dead code) and the null was wrapped in a success result, so callers dereferenced null and crashed. Now the callable is wrapped in astd::functionwith the deduced signature (sync + async paths), andgetCallbacknull-guards to returnTypeMismatch. - Lazy
getHandle:DynamicLibrary::getHandlenow honours the load strategy likegetFunction(Lazy/Immediate load on access; OnDemand still needs an explicitloadLibrary()).
Note on scope
This branch also carries 6 pre-existing branch-sync / pre-commit.ci bot commits that were already on local dev but not yet on upstream dev; they appear in the diff but are not part of the substantive change above.
🤖 Generated with Claude Code
Summary by cubic
Raises atom/meta runtime-header coverage to ≥90% and fixes an ffi callback crash. Adds hot-reloadable components via meta::DynamicLibrary, switches scripting to Python, and adopts atom::type::expected for serialization results.
-
New Features
- Implemented hot reload:
Registry::loadComponentFromFileloads modules viameta::DynamicLibrary(opt-inATOM_COMPONENTS_ENABLE_HOT_RELOAD/hot_reload). - Added
tests/meta/reflection/test_refl_field.cppand split shared field logic intoatom/meta/refl_field.hpp. - Completed the
componentsevent system withEvent,EventCallback,EventCallbackIdincore/types.hpp; enabled events by default; addedRegistry::registerComponentInstance.
- Implemented hot reload:
-
Refactors and Fixes
- Scripting: replaced phantom ChaiScript with real
Pythonsupport and updated language detection. - Serialization: APIs now return
atom::type::expected(SerializationOutcome/DeserializationOutcome); structuredSerializationErroradded. - Type module: moved public symbols into
atom::type(e.g.,NonCopyable,StaticString,Trackable,PointerSentinel) and updated call sites. - Containers:
componentsoptionally usesatom::containersfast containers whenATOM_USE_BOOST_CONTAINERSis set. - FFI:
CallbackRegistrystoresstd::function<Sig>and returnsTypeMismatchon signature mismatch;DynamicLibrary::getHandlerespects load strategy. - Consolidated “advanced_*” variants:
componentsbindings moved toscripting/bindings;system/command’s advanced executor merged intoexecutorwith a newcommand/command.hppumbrella. - Fixed module macros and re-enabled types/macros tests; demoted hot-path logging to trace/debug; formatted exception messages via
fmt::format; removed deadcomponents/data/type_conversion.hppand the Abseil dependency frompackage.hpp. - Misc: added missing standard headers; aligned event data correctly; updated docs (
WARP.md,components/CLAUDE.md) and bumpedpre-commit-hookstov6.0.0.
- Scripting: replaced phantom ChaiScript with real