Avoid consumer-inline access to DLL-owned thread-local storage by copying
the scope span returned by the existing out-of-line current_scopes function.
Keep the owned snapshot at its original initializer position and preserve
filtering, scope order and exception behavior.
Add direct-call regressions for nested buffered ownership, overlapping
producer scopes and immediate sink reentry. All 14 focused shared-library
tests pass on Linux and the two-file candidate passed independent review.
Native UCRT64 linking and runtime verification follow through Engine CI.
Request::timeout was declared but never used — every sync Asio
operation (TLS handshake, read, write) blocked without bound, so a
stalled peer hung the calling thread indefinitely (observed: a stalled
CDN download blocking a host's shutdown join forever).
SO_RCVTIMEO cannot fix this: Asio's sync emulation treats the
resulting EAGAIN as would-block and poll()s with no deadline. Instead
a per-request DeadlineGuard watchdog ::shutdown()s the descriptor on
expiry, which wakes any blocked sync op with EOF and fails the
request. Declaration order in send() keeps the descriptor owners alive
past the guard. Resolution and connect() remain on kernel defaults.
Regression test: a stalled localhost server is bounded at ~1s.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018yj92cCihyaYtf4gKCT3nv
- copy_on_load: dlopen a fresh-inode temp copy on first load (reloads
already did), so deployments that rewrite the plugin file in place —
e.g. a build writing its output — cannot corrupt the mapped image.
The registry keeps addressing the original path for watch/reload.
- hotswap_copy now generates a unique temp name per copy. glibc dedupes
dlopen by pathname, so the previous fixed ".void_hotswap" name made
every second reload through the same path silently return the
already-mapped OLD image instead of the new bytes.
- hot_reload_under_concurrent_load now asserts the true downgrade
semantics (v2 -> v1 is rejected transactionally, v2 stays); it only
ever passed the old all-succeed expectation via the dedup bug, since
no flip after the first actually took effect.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018yj92cCihyaYtf4gKCT3nv
Host-side additions for applications embedding a plugin system:
- PluginManager::load_directory(dir) loads every shared-library file in
a directory (filename order) with per-file expected results.
- PluginManager::unload(name) drops the registry entry; the instance
dies with its last pinned handle (RCU semantics, as on reload).
- Optional C entry void_plugin_configure(inst, config): fed from
PluginManagerOptions::config_provider after create and after each
reload swap, before on_load().
- on_reloaded() is now multi-observer: returns a ReloadCallbackId,
remove_on_reloaded() unregisters. Manual reload() now notifies
observers too (previously only watched reloads did, contradicting
the documented contract). PluginServiceBinding deregisters its
callback on destruction (was a dangling-callback hazard).
- PluginManager::serialize_state/deserialize_state expose the plugin's
v2 state exports so an embedder can carry plugin state through its
own hot reload.
- ServiceRegistry::remove<I>() withdraws a provided service (child
removal re-exposes a parent's entry).
- EventBus::subscribe_scoped<E>() returns a move-only RAII
Subscription that unsubscribes on destruction.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018yj92cCihyaYtf4gKCT3nv
Every log line showed LoggingAdapter.hpp as its source because make_sink
called Void::Logging::Logger::log() with a defaulted source_location captured
inside the adapter, discarding the real call site.
Capture std::source_location at each Void::Log::{info,warn,...} call via an
FmtLoc wrapper (the same trick Logger uses internally), thread it through a
4-argument Sink, and forward it from make_sink to logger.log(). Sinks now
receive the originating file/line/function.
Formatted emission is routed through a single non-overloaded Detail::emit():
forwarding a (level, module, std::string, source_location) call to the public
log() would otherwise also match the variadic log() overload, deducing
source_location as a format argument and failing in FmtLoc's consteval ctor.
Sink is now a 4-arg callable; updated the bundled tests accordingly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Value::has / get_str / get_num / get_bool / child_object / child_array —
convenience getters for walking dynamic JSON without manual find()+type-check
chains. Missing or wrong-typed keys yield the supplied default (scalars) or
nullptr (children); never throw. Tests in JsonAccessors.cpp.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ServiceRegistry::provide<I> cross-cast to IService via dynamic_cast, which
fails to compile when I is a plain (non-polymorphic) value type. Guard the
cross-cast with std::is_polymorphic_v<I>; non-polymorphic services are
stored and resolvable but carry no lifecycle aspect. Test added.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>