105 Commits
Author SHA1 Message Date
faumaray 38436b18c8 update version
Release / release (push) Failing after 5m4s
Signed-off-by: faumaray <faumaray@gmail.com>
2026-11-29 07:06:52 +03:00
faumaray 7d7d23ec0a Merge branch 'feat/roadmap-p3-wave10' (P3 Discovery, Scheduler, Messaging) 2026-11-27 05:55:45 +03:00
faumaray f3f66e0c8c docs(workflow): record Wave 10 P3 Discovery, Scheduler, and Messaging verification 2026-11-27 05:55:45 +03:00
faumaray 60ee28e4ca feat(messaging): implement P3 S-MESSAGING-01..04 Messaging queue, StorageQueue/OutboxInbox, and MessagingRpc adapter 2026-11-27 05:45:43 +03:00
faumaray aaeab50758 feat(scheduler): implement P3 S-SCHEDULER-01..04 Scheduler engine, calendar/DST, and SchedulerStorage durable store 2026-11-27 05:38:06 +03:00
faumaray ec8c0bd40a feat(discovery): implement P3 S-DISCOVERY-01..04 Discovery catalog and optional DiscoveryRpc adapter 2026-11-27 05:25:43 +03:00
faumaray 0cf187d664 docs(wave10): add P3 Discovery, Scheduler, and Messaging specs and error domains 2026-11-27 05:14:52 +03:00
faumaray 65ad9b3f31 Merge branch 'feat/roadmap-p2-wave9' (P2 Net, TestingMock, ShortUrl, RPC) 2026-11-27 01:37:15 +03:00
faumaray 385a441b0b docs(workflow): record Wave 9 P2 Net, TestingMock, ShortUrl, and RPC verification 2026-11-27 01:37:15 +03:00
faumaray 5184d1cf8c feat(rpc): implement P2 S-RPC-01..03 Wire v1 binary codec and unary HTTP/1.1 RPC subsystem 2026-11-27 01:27:32 +03:00
faumaray 691808eab6 feat(shorturl): complete P2 M-SHORTURL-01..04 V2 local, storage, and remote providers with frozen V1 2026-11-27 01:27:32 +03:00
faumaray 658c21a2fa feat(testing-mock): complete P2 M-TESTINGMOCK-01..04 sessions, action-outside-lock, move-only, combinators 2026-11-27 01:15:36 +03:00
faumaray 86d777eae6 feat(net): complete P2 M-NET-01..05 codec, pool, safe static open, redirects, and RFC 6455 WebSocket 2026-11-27 01:15:36 +03:00
faumaray 700024a24d docs(wave9): add P2 Net, TestingMock, ShortUrl, and RPC task specs and error domains 2026-11-26 22:58:30 +03:00
faumaray 3e254055e0 Merge branch 'feat/upstream-vbs-requests' (VL-001..VL-013) 2026-11-26 22:01:33 +03:00
faumaray bb0b2e1701 docs(workflow): record VL-001..VL-013 verification and completion state 2026-11-26 22:01:33 +03:00
faumaray 9920bfdaac fix(net): scope GCC -Wno-tsan to Http.cpp and fix StallServer race 2026-11-26 22:00:17 +03:00
faumaray 66baae74a0 feat(net): implement VL-004 HttpServer and VL-005 streaming HttpClient with secure TLS 2026-11-26 21:47:15 +03:00
faumaray 22c8538754 feat(crypto,archive): implement VL-007 built-in hashes and VL-006 archive creation/gzip/tar fallback 2026-11-26 20:55:45 +03:00
faumaray b50131f52e feat(system,config,sqlite): implement VL-001, VL-003, VL-010, VL-011 2026-11-26 20:45:52 +03:00
faumaray adfc8548dc feat(data,text,testing): implement VL-002 TOML, VL-008 StrictJson UTF-8, VL-009 native tests, and VL-013 Semver shorthands 2026-11-26 20:27:42 +03:00
faumaray 53d42bda42 merge: Wave 8 P2 Service, Plugin, Configuration, and Fsm lifecycle hardening 2026-11-26 20:19:09 +03:00
faumaray 9be51134e8 docs(workflow): record Wave 8 Service, Plugin, Configuration, and Fsm verification 2026-11-26 20:19:09 +03:00
faumaray cb988fa985 fix(test): hold owning ServiceHandle across hot-reload calls in FsmServiceHotReload 2026-11-26 17:10:54 +03:00
faumaray 1a54f3857e fix(plugin): use POSIX pthreads in C11 test fixture for TSan compatibility 2026-11-26 17:10:54 +03:00
faumaray 40b579d683 fix(fsm): publish terminal status after exit hooks and join worker before derived teardown 2026-11-26 17:10:54 +03:00
faumaray ef5312c4b3 feat(fsm): structured scopes, race-loser join, boundary checkpoints, and bounded supervision 2026-11-26 16:51:35 +03:00
faumaray 1dc51d5c43 feat(configuration): bounded schemas, provenance/redaction, and async transactional ReloadController 2026-11-26 16:30:30 +03:00
faumaray a24e086e47 feat(plugin): add CAbi.h v1, CModuleHost quiesce/reload/pins, and unlocked PluginManager staging 2026-11-26 16:16:29 +03:00
faumaray 1474a69ab1 feat(service): immutable snapshots, owning ServiceHandle, DAG lifecycle, and ServicePlugin split 2026-11-26 16:03:31 +03:00
faumaray 6b3dededac chore(wave8): reserve lifecycle error domains, support .h headers, add task specs 2026-11-26 15:57:01 +03:00
faumaray d83d0f4533 merge: Wave 7 P2 Sqlite, SqliteAsync, and Storage engine 2026-11-26 15:48:13 +03:00
faumaray 76ad7d1b39 docs(workflow): record Wave 7 verification evidence and tasks 2026-11-26 15:48:13 +03:00
faumaray 84e6fe81ed fix(sqlite): eliminate lock-order inversion between progress trampoline and interrupt_mu 2026-11-26 15:43:02 +03:00
faumaray fdf0da5ca8 feat(storage): implement original V1 durable Storage engine, tools, and async adapter 2026-11-26 15:32:43 +03:00
faumaray 427cc9a843 feat(sqlite): harden Sqlite lifecycle/transactions/migrations/ops and add SqliteAsync pool 2026-11-26 15:17:59 +03:00
faumaray 9925ea1764 docs(workflow): add Wave 7 task specs for Sqlite, SqliteAsync, and Storage 2026-11-25 21:15:10 +03:00
faumaray 43922d1ad4 merge: Wave 6B P2 Crypto, Security, Archive, and Update hardening 2026-11-25 21:12:30 +03:00
faumaray 9ef425c36c docs(workflow): record Wave 6B verification evidence and tasks 2026-11-25 21:12:30 +03:00
faumaray 47736cb6ce feat(update): fix schema-3 verify-before-parse and add replay floor, TrustStore, pin pruning, and InstallCoordinator 2026-11-25 21:04:52 +03:00
faumaray 00d7478335 feat(archive): add streaming Reader, atomic StagedTree publication, reproducible creation, and isolated worker 2026-11-25 20:54:10 +03:00
faumaray 713d2dc656 feat(security): add SecureBuffer, VSEC envelopes, authorization, and SecurityAsync Authenticator 2026-11-25 20:44:31 +03:00
faumaray eb42228604 feat(crypto): harden Crypto primitives and add optional CryptoAsync adapter 2026-11-25 06:28:50 +03:00
faumaray 8a1c15f9c0 docs(workflow): add Wave 6B task specs for Crypto, Security, Archive, Update 2026-11-25 06:03:36 +03:00
faumaray acd77ee67a feat(data): support RFC 8259 decimal numbers in StrictJson 2026-11-25 05:59:21 +03:00
faumaray 9931c5ffc4 Merge feat/roadmap-p2-wave6a: P2 System, SystemAsync, and IPC 2026-11-24 15:37:17 +03:00
faumaray e43eee738c docs(workflow): record Wave 6A verification evidence and tasks 2026-11-24 15:36:45 +03:00
faumaray 39a48d5c0a feat(IPC): add V1 VDIP framed codec, quota reservations, local UDS/pipe transport, full-duplex Session, and IPCOnly consumer (S-IPC-01..03) 2026-11-24 15:27:40 +03:00
faumaray 9a3c5d86ef feat(SystemAsync): add async IO ProcessManager/communicate and shared WatcherService with WatchSubscription (M-SYSTEM-03, M-SYSTEM-04) 2026-11-24 14:46:46 +03:00
faumaray fcdbc063b2 feat(System): harden OwnedFd/Child process spawn, full-duplex bounds, durable replace_file, safe TempFile/TempDir, and SystemOnly consumer (M-SYSTEM-01, M-SYSTEM-02, M-SYSTEM-05) 2026-11-24 14:32:05 +03:00
faumaray 3f67b1ecb7 chore(wave6a): reserve P2 error domains, guard IO pipe SIGPIPE, extend ProcessHelper, and add Wave 6A specs 2026-11-24 10:56:39 +03:00
faumaray 44799602c9 Merge feat/roadmap-p2-wave5: P2 Observability, Resilience, Log, and Stacktrace 2026-11-24 10:39:26 +03:00
faumaray 1e2fb8b5c6 docs(workflow): record Wave 5 (P2 Observability, Resilience, Log, Stacktrace) verification evidence and D-032 2026-11-24 10:39:16 +03:00
faumaray 7b57b355cd feat(Stacktrace): split capture/resolve, add capabilities, bounded resolver cache, safe source snippets, and crash marker (M-STACKTRACE-01..04) 2026-11-24 10:26:24 +03:00
faumaray 3d8dfb0ea2 fix(cmake): check test header requirements against active module headers 2026-11-24 10:26:19 +03:00
faumaray a74a402938 feat(Log): harden LogState facade, bounded Logger delivery/tickets/quarantine, file sync/reopen, redaction, and separate LogConfig (M-LOG-01..05) 2026-11-24 10:16:35 +03:00
faumaray 18a623aa62 feat(Resilience): add validated configs, RAII breaker/resource permits, bounded keyed cleanup, ResilienceAsync composition, and reserve P2 error domains (M-RESILIENCE-01..04) 2026-11-24 10:06:35 +03:00
faumaray fe99051ded feat(Observability): add zero-dep hooks, HookLease, ContextSnapshot, bounded metrics/tracing, and snapshot exporter (S-OBSERVABILITY-01..04) 2026-11-24 09:57:48 +03:00
faumaray 809b6f548d docs(workflow): add Wave 5 (P2 Observability, Resilience, Log, Stacktrace) task specs and error domains 2026-11-24 09:51:55 +03:00
faumaray 1e901ce256 Merge feat/roadmap-p1-wave4b: P1 IO, Runtime, and Testing foundations 2026-11-24 09:42:32 +03:00
faumaray f6c359400a docs(workflow): record Wave 4B (P1 IO, Runtime, Testing) verification evidence 2026-11-24 09:42:23 +03:00
faumaray de8a981893 feat(Testing): add per-run owned reporters, strict config validation, FailureCapture, subprocess isolation, and deterministic property/schedule harness (M-TESTING-02, M-TESTING-03) 2026-11-24 09:36:59 +03:00
faumaray 1b3331e3a8 feat(Runtime): add inert Host, validated RuntimeLimits, EmbeddedResources, and topological ResourceGraph (S-RUNTIME-01) 2026-11-24 09:33:03 +03:00
faumaray 673bb7e8b4 feat(IO): add portable Driver/ByteStream/BufferLease, mock backend, and Linux epoll driver (S-IO-01, S-IO-02) 2026-11-24 09:31:13 +03:00
faumaray 9918ed4760 docs(workflow): add Wave 4B (P1 IO, Runtime, Testing) task specs 2026-11-24 03:57:29 +03:00
faumaray 2e5d1ef5e5 Merge feat/roadmap-p1-wave4a: P1 Algorithms, Unicode, and Async execution foundations 2026-11-24 03:53:02 +03:00
faumaray b0cb598aad docs(workflow): record Wave 4A (P1 Algorithms, Unicode, Async) verification evidence 2026-11-24 03:53:02 +03:00
faumaray c75056fe07 feat(Async): add OperationOptions, OperationState, ResumeTicket, TaskScope, and bounded executor tickets (M-ASYNC-02, M-ASYNC-03) 2026-11-24 03:48:55 +03:00
faumaray 4369fde867 feat(Unicode): add Unicode 17.0.0 manifest and strict/repair/streaming UTF codecs (S-UNICODE-01, S-UNICODE-02) 2026-11-24 03:38:53 +03:00
faumaray bfd6246d32 feat(Algorithms): add indexed graph views, work budgets, and iterative traversals/topology (S-ALGORITHMS-02) 2026-11-24 03:36:10 +03:00
faumaray 710a9c1833 docs(workflow): add Wave 4A (P1 Algorithms, Unicode, Async) task specs 2026-11-24 03:33:45 +03:00
faumaray 5754a7fd06 Merge feat/roadmap-p0-p1-foundations: P0 baseline and P1 foundation/data/containers/binary/text waves 2026-11-24 03:29:32 +03:00
faumaray 155b47d4d5 docs(workflow): record Wave 3 (P1 Text, Containers, Binary, Data) verification evidence 2026-11-24 03:29:32 +03:00
faumaray 692f5ba5b2 feat(Data): add exact 64-bit signed/unsigned JSON numbers and checked conversion (M-DATA-02) 2026-11-24 03:25:17 +03:00
faumaray eacb8a4602 feat(Binary): add Writer, ByteBuffer, DecodeBudget, and explicit endian codecs (M-BINARY-02, M-BINARY-03) 2026-11-24 03:21:02 +03:00
faumaray 9ac76bbcf9 feat(Containers): fix pool lease lifetimes/budgets and non-spinning MPSC ring (M-CONTAINERS-02, M-CONTAINERS-03) 2026-11-24 03:20:04 +03:00
faumaray 883bbdcf38 feat(Text): add ASCII-explicit helpers and bounded split/replace/repeat/join (M-TEXT-02) 2026-11-24 03:14:41 +03:00
faumaray 68963fcd1d docs(workflow): add Wave 3 (P1 Text, Containers, Binary, Data) task specs 2026-11-24 03:12:16 +03:00
faumaray 1d34a93a3f docs(workflow): record P1 Gate 1 verification evidence 2026-11-24 03:00:07 +03:00
faumaray 6cac781f3a fix(Math): guard 64-bit precision shift in checked_cast for long double 2026-11-24 02:55:35 +03:00
faumaray 91e2beb5d4 feat(Math): add span-safe parsers, checked_cast, and checked_mul_add (M-MATH-02) 2026-11-24 02:53:46 +03:00
faumaray 4d48f2a8f2 feat(Memory): add Memory subsystem with BudgetResource, Arena, and BlockPool (S-MEMORY-02..04) 2026-11-24 02:49:28 +03:00
faumaray 4227348051 feat(Time): add MonotonicClock/CivilClock/ManualClock and bounded Stopwatch (M-TIME-02) 2026-11-24 02:46:25 +03:00
faumaray 7f3395cb74 feat(Functional): add compact Status, ErrorKind/ErrorCode, bounded chains, and Adapters (M-FUNCTIONAL-02) 2026-11-24 02:45:17 +03:00
faumaray 284d9635b5 fix(Testing): prevent VoidTestScanner from dropping tests after unbalanced brackets 2026-11-24 02:44:47 +03:00
faumaray cbc900412b feat(Core): detach Uuid from Math, add CheckedBits and portable Hash (M-CORE-02, M-CORE-03) 2026-11-24 02:39:35 +03:00
faumaray 8d28c7e3c4 docs(workflow): add P1 Gate 1 foundation implementation task specs 2026-11-24 02:37:43 +03:00
faumaray 196ed251f9 bench: add reproducible foundation benchmark harness and record P0 baseline (X-BASE-05) 2026-11-24 02:35:43 +03:00
faumaray c64fa93373 build: add compiler, reflection, and sanitizer capability probes (X-BASE-04) 2026-11-24 02:34:11 +03:00
faumaray cd6fc7e5f5 build: reconcile module dependency closures, Log.hpp ownership, and consumer tests (X-BASE-03) 2026-11-24 02:28:33 +03:00
faumaray e385746b74 build: mark fetched Boost headers as SYSTEM for clean -Werror on GCC 16 (X-BASE-02) 2026-11-24 02:15:22 +03:00
faumaray 340acaec34 test(System): replace host /bin utility assumptions with VoidProcessHelper (X-BASE-01) 2026-11-24 02:10:06 +03:00
faumaray 563da02c0f docs(workflow): add P0 baseline implementation task specs (X-BASE-01..05) 2026-11-24 02:05:08 +03:00
faumaray faa8a5198d docs: add expansion roadmap and workflow baseline 2026-11-24 02:04:38 +03:00
faumaray f1f9ba375b log: snapshot scopes through the shared library boundary
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.
2026-11-15 03:25:25 +03:00
faumarayandClaude Opus 5.5 5464e9fa35 Testing: an exception that escapes a test fails it
execute_test and execute_test_parallel set Failed when the body threw,
then recomputed the state from the recorded assertions alone, so a test
whose body threw before any failed assertion was reported as passed.
The state now stays Failed when an unhandled exception was recorded.
Found by a Void Engine test that threw on its first line and passed;
it hid two failing engine tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:31:09 +03:00
faumarayandClaude Opus 5.5 cd237207d4 Log: one facade state per process, in a LogState library
Release / release (push) Failing after 5s
Void::Log::Detail::state() was a static in an inline function, which is
one object per DLL on Windows: a sink set from one DLL never saw events
from another (a plugin's log lines, or any module but the one that set
it). The state now lives in Void::LogState, a small compiled module with
no dependencies, linked by every module that includes the facade
(Async, System, Stacktrace, Testing; the rest through them), so
INTERFACE modules can still log and no dependency cycle appears.

Tests: VoidTests 1242 pass, 3 skip; run_with_args_builds_correct_argv
and run_stdin_forwarded_to_cat fail on NixOS, which has no
/bin/echo or /bin/cat (exit 127).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:43:45 +03:00
faumarayandClaude Opus 5.5 20893d1bf3 Module selection, and test signal handlers on Windows
VOID_ENABLED_MODULES (cache, empty for all) configures only the named
modules and their INTERNAL_DEPS, followed transitively; OPTIONAL_DEPS
are used when named too. A project embedding Void configures what it
links, so the packages of modules it never builds (LibArchive, OpenSSL,
SQLite, libsodium) need not exist, as in a mingw-w64 cross build.

Testing's crash handlers use the C runtime's signal() on Windows, which
has no sigaction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:13:42 +03:00
Aleksey SelihovandClaude Opus 5.5 3ef1013b85 Prepare VoidLibrary 1.2.1
Release / release (push) Successful in 1m52s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:55:10 +00:00
Aleksey SelihovandClaude Opus 5.5 ff70dc685d Install the shared Void/Detail headers
include/Void/Detail/Enum.hpp is included by public headers of Core
(Meta.hpp), Log (Level.hpp, LoggingAdapter.hpp), Configuration
(Config.hpp) and Data (Reflect.hpp), but belongs to no module's
FILE_SET, so `cmake --install` never copied it and every consumer of
an installed VoidLibrary failed to compile those headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:55:03 +00:00
faumaray d95e11ea3e Prepare VoidLibrary 1.2.0
Release / release (push) Successful in 27m41s
2026-08-02 02:07:30 +03:00
faumaray 531b604154 Add configurable split file logging 2026-08-02 01:47:22 +03:00
faumaray 8531bea681 Use organization release token 2026-08-01 20:12:32 +03:00
faumaray 68d86f76a2 Build release artifacts with RelWithDebInfo
Release / release (push) Successful in 29m41s
2026-08-01 18:07:13 +03:00
faumaray cb58236538 Release 1.1.0 with transactional plugin validation 2026-08-01 17:59:57 +03:00
568 changed files with 123942 additions and 4904 deletions

No files matched your search

+10 -6
View File
@@ -45,16 +45,17 @@ jobs:
- name: Configure
run: |
cmake -S . -B build-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
cmake -S . -B build-relwithdebinfo -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=ON \
-DVOID_ENABLE_TESTING=ON \
-DVOID_WARNINGS_AS_ERRORS=ON
- name: Build and test
run: |
cmake --build build-release --parallel
ctest --test-dir build-release --output-on-failure
cmake --build build-relwithdebinfo --config RelWithDebInfo --parallel
ctest --test-dir build-relwithdebinfo \
--build-config RelWithDebInfo --output-on-failure
- name: Install and package
shell: bash
@@ -63,8 +64,11 @@ jobs:
version="${GITHUB_REF_NAME#v}"
package="voidlibrary-${version}-linux-x86_64"
epoch="$(git show -s --format=%ct HEAD)"
cmake --install build-release \
cmake --install build-relwithdebinfo \
--config RelWithDebInfo \
--prefix "$PWD/stage/$package"
python3 .release-tools/scripts/verify-relwithdebinfo.py \
--root "$PWD/stage/$package"
mkdir -p dist
SOURCE_DATE_EPOCH="$epoch" \
tar --sort=name --mtime="@$epoch" \
@@ -78,7 +82,7 @@ jobs:
- name: Publish native Gitea release
env:
GITEA_RELEASE_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
run: |
python3 .release-tools/scripts/gitea_release.py \
--api-url "${{ gitea.api_url }}" \
+54 -1
View File
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 4.0.0)
project(Void VERSION 1.0.0 LANGUAGES CXX)
project(Void VERSION 1.2.3 LANGUAGES C CXX)
if(PROJECT_IS_TOP_LEVEL)
option(BUILD_SHARED_LIBS "Build Void modules as shared libraries" ON)
elseif(NOT DEFINED BUILD_SHARED_LIBS)
@@ -8,9 +8,11 @@ elseif(NOT DEFINED BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON)
endif()
option(VOID_ENABLE_TESTING "Build the test suite" ON)
option(VOID_ENABLE_BENCHMARKS "Build reproducible benchmark baselines" OFF)
option(VOID_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
option(VOID_ENABLE_ASAN "Enable AddressSanitizer (Clang/GCC)" OFF)
option(VOID_ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (Clang/GCC)" OFF)
option(VOID_ENABLE_TSAN "Enable ThreadSanitizer (Clang/GCC)" OFF)
option(VOID_ENABLE_COVERAGE "Enable code coverage instrumentation" OFF)
set(CMAKE_CXX_STANDARD 26)
@@ -28,10 +30,51 @@ include(CMakePackageConfigHelpers)
set(EXPORT_SET_NAME ${PROJECT_NAME}Targets)
include(cmake/Capabilities.cmake)
void_probe_capabilities()
include(cmake/Module.cmake)
# Modules to configure, with the modules they need (INTERNAL_DEPS, followed
# transitively); empty configures every module. OPTIONAL_DEPS are used only
# when named too. A project that embeds Void selects what it links, so the
# external packages of modules it never builds (LibArchive, OpenSSL, SQLite,
# libsodium) need not exist, as when cross-compiling.
set(VOID_ENABLED_MODULES "" CACHE STRING
"Void modules to configure (and their internal dependencies); empty for all")
set(_void_selected "")
if(VOID_ENABLED_MODULES)
set(_void_pending ${VOID_ENABLED_MODULES})
while(_void_pending)
list(POP_FRONT _void_pending _void_module)
if(_void_module IN_LIST _void_selected)
continue()
endif()
set(_void_module_file "${CMAKE_CURRENT_SOURCE_DIR}/src/${_void_module}/module.cmake")
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/${_void_module}")
message(FATAL_ERROR "[Void] VOID_ENABLED_MODULES names an unknown module '${_void_module}'")
endif()
list(APPEND _void_selected ${_void_module})
if(EXISTS "${_void_module_file}")
file(READ "${_void_module_file}" _void_text)
# The words after INTERNAL_DEPS up to the next keyword or ')'.
if(_void_text MATCHES "INTERNAL_DEPS([^)]*)")
separate_arguments(_void_words UNIX_COMMAND "${CMAKE_MATCH_1}")
foreach(_void_word IN LISTS _void_words)
if(_void_word MATCHES "^(INTERNAL_DEPS|EXTERNAL_DEPS|OPTIONAL_DEPS|DEPS_WIN32|DEPS_UNIX|OPTIONS_WIN32|OPTIONS_UNIX|EXTRA_HEADERS|EXCLUDE_HEADERS)$")
break()
endif()
list(APPEND _void_pending ${_void_word})
endforeach()
endif()
endif()
endwhile()
endif()
file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/*)
foreach(module_path ${children})
if(_void_selected AND NOT module_path IN_LIST _void_selected)
continue()
endif()
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/${module_path})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/${module_path}/module.cmake)
include(src/${module_path}/module.cmake)
@@ -41,12 +84,16 @@ foreach(module_path ${children})
endif()
endforeach()
void_finalize_modules()
void_report_capabilities()
if(VOID_ENABLE_TESTING)
enable_testing()
add_subdirectory(tests)
endif()
if(VOID_ENABLE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
get_property(ALL_DISCOVERED_MODULES GLOBAL PROPERTY VOID_MODULES)
get_property(ALL_MODULE_DEPENDENCY_RECORDS GLOBAL PROPERTY
VOID_MODULE_DEPENDENCY_RECORDS)
@@ -71,6 +118,12 @@ configure_package_config_file(
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
# Support headers shared by several modules (e.g. Void/Detail/Enum.hpp, used by
# Core, Log, Configuration and Data). They belong to no module's FILE_SET, so
# they are installed here; every module's install include dir covers them.
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/Void/Detail"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/Void")
install(EXPORT ${EXPORT_SET_NAME}
NAMESPACE ${PROJECT_NAME}::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
+4
View File
@@ -4,6 +4,10 @@ A modular C++26 shared library. Each module is an independently installable
CMake target under the `Void::` namespace; the build system auto-discovers
modules under `src/` and links them together.
The [expansion roadmap](docs/roadmap/README.md) contains the approved architecture,
module and subsystem plans, delivery phases, and verification requirements for future
development. Planned capabilities are distinguished from the current implementation.
## Build
Requires CMake 4.0+ and a C++26 compiler. GCC 16+ is the default — it ships
+50
View File
@@ -0,0 +1,50 @@
foreach(_req IN ITEMS Core Functional Containers Math Time Binary Data)
if(NOT TARGET Void::${_req})
message(FATAL_ERROR
"[Void] VOID_ENABLE_BENCHMARKS=ON requires foundation module '${_req}' to be enabled")
endif()
endforeach()
set(_void_git_rev "unknown")
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse --short=12 HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE _git_out
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if(_git_out)
set(_void_git_rev "${_git_out}")
endif()
endif()
add_executable(VoidFoundationBench FoundationBench.cpp)
set_target_properties(VoidFoundationBench PROPERTIES
CXX_STANDARD 26
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
VOID_TESTING_NO_AUTO_SCAN TRUE
)
target_link_libraries(VoidFoundationBench PRIVATE
Void::Core
Void::Functional
Void::Containers
Void::Math
Void::Time
Void::Binary
Void::Data
)
target_compile_definitions(VoidFoundationBench PRIVATE
VOID_GIT_REVISION="${_void_git_rev}"
VOID_BUILD_TYPE="$<IF:$<BOOL:${CMAKE_BUILD_TYPE}>,${CMAKE_BUILD_TYPE},unspecified>"
)
if(VOID_WARNINGS_AS_ERRORS)
target_compile_options(VoidFoundationBench PRIVATE
"$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-Wall;-Wextra;-Wpedantic;-Werror;-Wno-missing-field-initializers>"
"$<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-missing-designated-field-initializers>"
"$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX>"
)
endif()
+441
View File
@@ -0,0 +1,441 @@
#include <Void/Binary/Reader.hpp>
#include <Void/Containers/LRU.hpp>
#include <Void/Containers/Ring.hpp>
#include <Void/Core/Hash.hpp>
#include <Void/Core/Uuid.hpp>
#include <Void/Data/Json.hpp>
#include <Void/Functional/Error.hpp>
#include <Void/Functional/Result.hpp>
#include <Void/Math/Numeric.hpp>
#include <Void/Time/Bench.hpp>
#include <algorithm>
#include <array>
#include <bit>
#include <charconv>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <sstream>
#include <string>
#include <string_view>
#include <thread>
#include <vector>
namespace
{
struct CliOptions {
std::size_t warmup = 5;
std::size_t reps = 20;
std::size_t ops = 10'000;
std::string json_path;
std::string filter;
};
bool parse_size(std::string_view text, std::size_t& out) noexcept
{
if (text.empty()) {
return false;
}
const char* begin = text.data();
const char* end = text.data() + text.size();
auto [ptr, ec] = std::from_chars(begin, end, out, 10);
return ec == std::errc{} && ptr == end && out > 0;
}
bool parse_args(int argc, char** argv, CliOptions& opts)
{
for (int i = 1; i < argc; ++i) {
const std::string_view arg{argv[i]};
auto need_val = [&](std::string_view flag) -> const char* {
if (i + 1 >= argc) {
std::cerr << "VoidFoundationBench: missing value for " << flag
<< '\n';
return nullptr;
}
return argv[++i];
};
if (arg == "--warmup") {
const char* v = need_val(arg);
if (!v || !parse_size(v, opts.warmup)) {
return false;
}
} else if (arg == "--reps") {
const char* v = need_val(arg);
if (!v || !parse_size(v, opts.reps)) {
return false;
}
} else if (arg == "--ops") {
const char* v = need_val(arg);
if (!v || !parse_size(v, opts.ops)) {
return false;
}
} else if (arg == "--json") {
const char* v = need_val(arg);
if (!v) {
return false;
}
opts.json_path = v;
} else if (arg == "--filter") {
const char* v = need_val(arg);
if (!v) {
return false;
}
opts.filter = v;
} else {
std::cerr << "VoidFoundationBench: unknown argument: " << arg
<< '\n';
return false;
}
}
return true;
}
struct Stats {
double median_ns_per_op{0.0};
double min_ns_per_op{0.0};
double max_ns_per_op{0.0};
double p95_ns_per_op{0.0};
double p99_ns_per_op{0.0};
double ci95_half_width_ns{0.0};
double ops_per_sec{0.0};
};
double nearest_rank(const std::vector<double>& sorted, double quantile)
{
if (sorted.empty()) {
return 0.0;
}
const std::size_t n = sorted.size();
const double raw = std::ceil(quantile * static_cast<double>(n));
const std::size_t rank =
std::clamp(static_cast<std::size_t>(raw), std::size_t{1}, n);
return sorted[rank - 1];
}
Stats summarize(const std::vector<double>& samples_ns_per_op)
{
Stats s{};
if (samples_ns_per_op.empty()) {
return s;
}
std::vector<double> sorted = samples_ns_per_op;
std::sort(sorted.begin(), sorted.end());
const std::size_t n = sorted.size();
s.min_ns_per_op = sorted.front();
s.max_ns_per_op = sorted.back();
if (n % 2 == 1) {
s.median_ns_per_op = sorted[n / 2];
} else {
s.median_ns_per_op = 0.5 * (sorted[n / 2 - 1] + sorted[n / 2]);
}
s.p95_ns_per_op = nearest_rank(sorted, 0.95);
s.p99_ns_per_op = nearest_rank(sorted, 0.99);
const double mean =
std::accumulate(sorted.begin(), sorted.end(), 0.0) /
static_cast<double>(n);
if (n > 1) {
double sq = 0.0;
for (double v : sorted) {
const double d = v - mean;
sq += d * d;
}
const double stdev = std::sqrt(sq / static_cast<double>(n - 1));
s.ci95_half_width_ns =
1.96 * stdev / std::sqrt(static_cast<double>(n));
}
s.ops_per_sec =
s.median_ns_per_op > 0.0 ? 1'000'000'000.0 / s.median_ns_per_op : 0.0;
return s;
}
struct WorkloadRecord {
std::string name;
std::vector<double> raw_ns_per_op;
Stats stats;
};
template <class Fn>
WorkloadRecord run_workload(std::string name, const CliOptions& opts, Fn&& fn)
{
using Clock = std::chrono::steady_clock;
for (std::size_t w = 0; w < opts.warmup; ++w) {
for (std::size_t i = 0; i < opts.ops; ++i) {
fn(i);
}
}
WorkloadRecord rec;
rec.name = std::move(name);
rec.raw_ns_per_op.reserve(opts.reps);
for (std::size_t r = 0; r < opts.reps; ++r) {
const auto t0 = Clock::now();
for (std::size_t i = 0; i < opts.ops; ++i) {
fn(i);
}
const auto dt = std::chrono::duration<double, std::nano>(Clock::now() - t0).count();
rec.raw_ns_per_op.push_back(dt / static_cast<double>(opts.ops));
}
rec.stats = summarize(rec.raw_ns_per_op);
return rec;
}
std::string json_escape(std::string_view in)
{
std::string out;
out.reserve(in.size() + 8);
for (char ch : in) {
switch (ch) {
case '"': out += "\\\""; break;
case '\\': out += "\\\\"; break;
case '\n': out += "\\n"; break;
case '\r': out += "\\r"; break;
case '\t': out += "\\t"; break;
default: out += ch; break;
}
}
return out;
}
std::string compiler_label()
{
std::ostringstream oss;
#if defined(__clang__)
oss << "Clang " << __clang_major__ << "." << __clang_minor__ << "."
<< __clang_patchlevel__;
#elif defined(__GNUC__)
oss << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "."
<< __GNUC_PATCHLEVEL__;
#else
oss << "unknown";
#endif
return oss.str();
}
void write_json(const std::string& path, const CliOptions& opts,
const WorkloadRecord& harness,
const std::vector<WorkloadRecord>& records)
{
std::ofstream out{path};
if (!out) {
std::cerr << "VoidFoundationBench: failed to open JSON output: "
<< path << '\n';
return;
}
auto emit_record = [&](const WorkloadRecord& rec, const char* indent) {
out << indent << "{\n";
out << indent << " \"name\": \"" << json_escape(rec.name) << "\",\n";
out << indent << " \"median_ns_per_op\": " << std::fixed
<< std::setprecision(4) << rec.stats.median_ns_per_op << ",\n";
out << indent << " \"min_ns_per_op\": " << rec.stats.min_ns_per_op
<< ",\n";
out << indent << " \"max_ns_per_op\": " << rec.stats.max_ns_per_op
<< ",\n";
out << indent << " \"p95_ns_per_op\": " << rec.stats.p95_ns_per_op
<< ",\n";
out << indent << " \"p99_ns_per_op\": " << rec.stats.p99_ns_per_op
<< ",\n";
out << indent << " \"ci95_half_width_ns\": "
<< rec.stats.ci95_half_width_ns << ",\n";
out << indent << " \"ops_per_sec\": " << std::setprecision(2)
<< rec.stats.ops_per_sec << ",\n";
out << indent << " \"raw_samples_ns_per_op\": [";
out << std::setprecision(4);
for (std::size_t i = 0; i < rec.raw_ns_per_op.size(); ++i) {
if (i > 0) {
out << ", ";
}
out << rec.raw_ns_per_op[i];
}
out << "]\n";
out << indent << "}";
};
out << "{\n";
out << " \"schema_version\": 1,\n";
out << " \"git_revision\": \"" << json_escape(VOID_GIT_REVISION) << "\",\n";
out << " \"compiler\": \"" << json_escape(compiler_label()) << "\",\n";
out << " \"build_type\": \"" << json_escape(VOID_BUILD_TYPE) << "\",\n";
out << " \"hardware_concurrency\": "
<< std::thread::hardware_concurrency() << ",\n";
out << " \"warmup\": " << opts.warmup << ",\n";
out << " \"repetitions\": " << opts.reps << ",\n";
out << " \"ops_per_rep\": " << opts.ops << ",\n";
out << " \"harness_baseline\": ";
emit_record(harness, " ");
out << ",\n";
out << " \"workloads\": [\n";
for (std::size_t i = 0; i < records.size(); ++i) {
emit_record(records[i], " ");
if (i + 1 < records.size()) {
out << ",";
}
out << "\n";
}
out << " ]\n";
out << "}\n";
}
} // namespace
int main(int argc, char** argv)
{
CliOptions opts;
if (!parse_args(argc, argv, opts)) {
return 2;
}
// Separate empty-loop harness baseline (not subtracted from results).
const auto harness = run_workload("harness_empty_loop", opts, [](std::size_t i) {
Void::Bench::do_not_optimize(i);
});
std::array<std::byte, 256> payload{};
for (std::size_t i = 0; i < payload.size(); ++i) {
payload[i] = static_cast<std::byte>((i * 131u + 17u) & 0xFFu);
}
const std::string_view payload_sv{
reinterpret_cast<const char*>(payload.data()), payload.size()};
const std::string_view uuid_text = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
const auto parsed_uuid = Void::Uuid::parse(uuid_text).value();
const std::string_view small_json_text =
R"({"id":42,"name":"void-bench","active":true,"tags":["p0","foundation"]})";
const auto small_json_val = Void::Json::parse(small_json_text).value();
const std::array<std::byte, 8> be_u64{
std::byte{0x01}, std::byte{0x23}, std::byte{0x45}, std::byte{0x67},
std::byte{0x89}, std::byte{0xAB}, std::byte{0xCD}, std::byte{0xEF}};
Void::Ring::SpscRing<std::uint64_t, 64> ring;
Void::LRU::LruCache<std::uint64_t, std::uint64_t> lru{128};
for (std::uint64_t k = 0; k < 128; ++k) {
lru.put(k, k * 3);
}
std::vector<WorkloadRecord> records;
auto maybe_run = [&](std::string_view name, auto&& fn) {
if (!opts.filter.empty() && name.find(opts.filter) == std::string_view::npos) {
return;
}
records.push_back(run_workload(std::string{name}, opts, fn));
};
maybe_run("core_uuid_parse_hyphenated", [&](std::size_t) {
auto u = Void::Uuid::parse(uuid_text);
Void::Bench::do_not_optimize(u);
});
maybe_run("core_uuid_to_string", [&](std::size_t) {
auto s = parsed_uuid.to_string();
Void::Bench::do_not_optimize(s);
});
maybe_run("core_hash_fnv1a64_256b", [&](std::size_t) {
auto h = Void::Hash::fnv1a64(std::span<const std::byte>{payload});
Void::Bench::do_not_optimize(h);
});
maybe_run("core_hash_murmur3_256b", [&](std::size_t i) {
auto h = Void::Hash::murmur3_32(payload_sv, static_cast<std::uint32_t>(i));
Void::Bench::do_not_optimize(h);
});
maybe_run("functional_result_ok_chain", [&](std::size_t i) {
auto r = Void::Result::ok(static_cast<int>(i))
.transform([](int v) { return v + 1; })
.and_then([](int v) -> Void::Result::Result<int> {
return Void::Result::ok(v * 2);
});
Void::Bench::do_not_optimize(r);
});
maybe_run("functional_error_with_context", [&](std::size_t) {
Void::Result::Result<int> base = Void::Result::fail("io error");
auto wrapped = Void::Result::with_context(std::move(base), "read header");
Void::Bench::do_not_optimize(wrapped);
});
maybe_run("math_checked_add_loop", [&](std::size_t i) {
auto r = Void::Numeric::checked_add(static_cast<std::uint64_t>(i),
std::uint64_t{42});
Void::Bench::do_not_optimize(r);
});
maybe_run("containers_spsc_ring_push_pop", [&](std::size_t i) {
const bool pushed = ring.push(static_cast<std::uint64_t>(i));
auto popped = ring.pop();
Void::Bench::do_not_optimize(pushed);
Void::Bench::do_not_optimize(popped);
});
maybe_run("containers_lru_get_put", [&](std::size_t i) {
const std::uint64_t key = static_cast<std::uint64_t>(i) & 255u;
auto hit = lru.get(key);
if (!hit) {
lru.put(key, key * 3);
}
Void::Bench::do_not_optimize(hit);
});
maybe_run("binary_reader_u64_be", [&](std::size_t) {
Void::Binary::Reader reader{be_u64};
auto v = reader.read<std::uint64_t>(std::endian::big);
Void::Bench::do_not_optimize(v);
});
maybe_run("data_json_parse_small_object", [&](std::size_t) {
auto v = Void::Json::parse(small_json_text);
Void::Bench::do_not_optimize(v);
});
maybe_run("data_json_serialize_small_object", [&](std::size_t) {
auto s = Void::Json::serialize(small_json_val);
Void::Bench::do_not_optimize(s);
});
std::cout << "VoidFoundationBench (rev=" << VOID_GIT_REVISION
<< ", build=" << VOID_BUILD_TYPE
<< ", compiler=" << compiler_label()
<< ", warmup=" << opts.warmup
<< ", reps=" << opts.reps
<< ", ops=" << opts.ops << ")\n\n";
std::cout << std::left << std::setw(34) << "Workload"
<< std::right << std::setw(11) << "Med(ns)"
<< std::setw(11) << "p95(ns)"
<< std::setw(11) << "p99(ns)"
<< std::setw(11) << "CI95(+-)"
<< std::setw(14) << "Ops/s\n";
std::cout << std::string(92, '-') << '\n';
auto print_row = [](const WorkloadRecord& r) {
std::cout << std::left << std::setw(34) << r.name
<< std::right << std::fixed << std::setprecision(2)
<< std::setw(11) << r.stats.median_ns_per_op
<< std::setw(11) << r.stats.p95_ns_per_op
<< std::setw(11) << r.stats.p99_ns_per_op
<< std::setw(11) << r.stats.ci95_half_width_ns
<< std::setprecision(0)
<< std::setw(13) << r.stats.ops_per_sec << '\n';
};
print_row(harness);
for (const auto& rec : records) {
print_row(rec);
}
if (!opts.json_path.empty()) {
write_json(opts.json_path, opts, harness, records);
}
return 0;
}
+107
View File
@@ -0,0 +1,107 @@
include(CheckCXXSourceCompiles)
include(CMakePushCheckState)
function(_void_probe_sanitizer option_name compile_flags link_flag cache_var)
if(NOT ${option_name})
return()
endif()
if(MSVC)
message(FATAL_ERROR
"[Void] ${option_name}=ON is not supported with MSVC via this probe")
endif()
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "${compile_flags}")
set(CMAKE_REQUIRED_LINK_OPTIONS "${link_flag}")
check_cxx_source_compiles(
"int main() { int x = 0; return x; }\n"
${cache_var}
)
cmake_pop_check_state()
if(NOT ${cache_var})
message(FATAL_ERROR
"[Void] ${option_name}=ON requested, but ${CMAKE_CXX_COMPILER_ID} "
"${CMAKE_CXX_COMPILER_VERSION} failed to compile/link with '${link_flag}'.")
endif()
endfunction()
function(void_probe_capabilities)
if(VOID_ENABLE_ASAN AND VOID_ENABLE_TSAN)
message(FATAL_ERROR
"[Void] VOID_ENABLE_ASAN and VOID_ENABLE_TSAN are mutually exclusive")
endif()
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "-std=c++26")
check_cxx_source_compiles(
"#include <expected>\nint main() { std::expected<int, int> e{0}; return *e; }\n"
VOID_HAS_STD_EXPECTED
)
cmake_pop_check_state()
if(NOT VOID_HAS_STD_EXPECTED)
message(FATAL_ERROR
"[Void] Compiler/stdlib lacks C++23/26 <expected> support required by Void")
endif()
cmake_push_check_state(RESET)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16)
set(CMAKE_REQUIRED_FLAGS "-std=c++26 -freflection")
else()
set(CMAKE_REQUIRED_FLAGS "-std=c++26")
endif()
check_cxx_source_compiles(
"#include <meta>\nconsteval bool probe() { constexpr auto r = ^^int; return std::meta::is_type(r); }\nstatic_assert(probe());\nint main() { return 0; }\n"
VOID_HAS_CXX26_REFLECTION
)
cmake_pop_check_state()
_void_probe_sanitizer(VOID_ENABLE_ASAN
"-fsanitize=address -fno-omit-frame-pointer" "-fsanitize=address"
VOID_COMPILER_SUPPORTS_ASAN)
_void_probe_sanitizer(VOID_ENABLE_UBSAN
"-fsanitize=undefined" "-fsanitize=undefined"
VOID_COMPILER_SUPPORTS_UBSAN)
_void_probe_sanitizer(VOID_ENABLE_TSAN
"-fsanitize=thread" "-fsanitize=thread"
VOID_COMPILER_SUPPORTS_TSAN)
endfunction()
function(void_report_capabilities)
get_property(_mods GLOBAL PROPERTY VOID_MODULES)
list(LENGTH _mods _mod_count)
if(VOID_HAS_CXX26_REFLECTION)
set(_refl "yes")
else()
set(_refl "no")
endif()
if(VOID_HAS_STD_EXPECTED)
set(_exp "yes")
else()
set(_exp "no")
endif()
set(_sans "")
if(VOID_ENABLE_ASAN)
list(APPEND _sans "ASan")
endif()
if(VOID_ENABLE_UBSAN)
list(APPEND _sans "UBSan")
endif()
if(VOID_ENABLE_TSAN)
list(APPEND _sans "TSan")
endif()
if(NOT _sans)
set(_sans_str "none")
else()
string(REPLACE ";" "+" _sans_str "${_sans}")
endif()
message(STATUS
"[Void] Capabilities: compiler=${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, "
"reflection=${_refl}, expected=${_exp}, shared=${BUILD_SHARED_LIBS}, "
"werror=${VOID_WARNINGS_AS_ERRORS}, sanitizers=${_sans_str}, modules=${_mod_count}")
endfunction()
+99 -2
View File
@@ -112,9 +112,26 @@ function(void_fetch_dependency DEP_NAME)
FetchContent_Declare(Boost
URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz
URL_HASH SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e
SYSTEM
)
FetchContent_MakeAvailable(Boost)
foreach(_boost_target IN ITEMS
boost_headers
boost_beast
boost_asio
boost_url
boost_system
boost_stacktrace_addr2line
boost_stacktrace_windbg
boost_intrusive
boost_core
boost_mp11)
if(TARGET ${_boost_target})
set_property(TARGET ${_boost_target} PROPERTY SYSTEM TRUE)
endif()
endforeach()
if(NOT TARGET Boost::${_stacktrace_component} AND
TARGET boost_${_stacktrace_component})
add_library(Boost::${_stacktrace_component}
@@ -141,9 +158,89 @@ function(void_fetch_dependency DEP_NAME)
endif()
if(DEP_NAME STREQUAL "SQLite3")
if(NOT TARGET SQLite3::SQLite3 AND NOT TARGET SQLite::SQLite3)
find_package(SQLite3 REQUIRED)
if(TARGET SQLite3::SQLite3)
return()
endif()
if(TARGET SQLite::SQLite3)
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
return()
endif()
set(_void_sqlite_dir "${VOID_SQLITE3_AMALGAMATION_DIR}")
if(NOT _void_sqlite_dir)
find_package(SQLite3 QUIET)
if(TARGET SQLite3::SQLite3)
return()
endif()
if(TARGET SQLite::SQLite3)
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
return()
endif()
endif()
option(VOID_FETCH_SQLITE3
"Allow FetchContent SQLite3 amalgamation fallback when system SQLite3 is unavailable"
ON)
set(VOID_SQLITE3_AMALGAMATION_DIR "" CACHE PATH
"Path containing pre-downloaded sqlite3.c and sqlite3.h amalgamation sources")
set(VOID_SQLITE3_FETCH_URL
"https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip"
CACHE STRING "SQLite3 amalgamation archive URL for FetchContent fallback")
set(VOID_SQLITE3_FETCH_HASH "" CACHE STRING
"Optional SHA256 hash (SHA256=...) for VOID_SQLITE3_FETCH_URL")
if(NOT _void_sqlite_dir AND VOID_FETCH_SQLITE3 AND
NOT CMAKE_DISABLE_FIND_PACKAGE_SQLite3)
message(STATUS "[Void] System SQLite3 not found — falling back to SQLite3 amalgamation")
if(VOID_SQLITE3_FETCH_HASH)
FetchContent_Declare(SQLite3
URL "${VOID_SQLITE3_FETCH_URL}"
URL_HASH "${VOID_SQLITE3_FETCH_HASH}"
SYSTEM
)
else()
FetchContent_Declare(SQLite3
URL "${VOID_SQLITE3_FETCH_URL}"
SYSTEM
)
endif()
FetchContent_MakeAvailable(SQLite3)
if(EXISTS "${sqlite3_SOURCE_DIR}/sqlite3.c")
set(_void_sqlite_dir "${sqlite3_SOURCE_DIR}")
else()
file(GLOB _found_sqlite_c LIST_DIRECTORIES FALSE
"${sqlite3_SOURCE_DIR}/*/sqlite3.c")
if(_found_sqlite_c)
list(GET _found_sqlite_c 0 _first_sqlite_c)
get_filename_component(_void_sqlite_dir "${_first_sqlite_c}" DIRECTORY)
endif()
endif()
endif()
if(_void_sqlite_dir AND EXISTS "${_void_sqlite_dir}/sqlite3.c" AND
EXISTS "${_void_sqlite_dir}/sqlite3.h")
void_fetch_dependency(Threads)
add_library(void_sqlite3_amalgamation STATIC
"${_void_sqlite_dir}/sqlite3.c")
set_target_properties(void_sqlite3_amalgamation PROPERTIES
POSITION_INDEPENDENT_CODE ON
C_STANDARD 11
SYSTEM TRUE)
target_include_directories(void_sqlite3_amalgamation SYSTEM PUBLIC
"${_void_sqlite_dir}")
target_compile_definitions(void_sqlite3_amalgamation PRIVATE
SQLITE_THREADSAFE=1
SQLITE_ENABLE_FTS5
SQLITE_ENABLE_JSON1
SQLITE_DQS=0)
target_link_libraries(void_sqlite3_amalgamation PUBLIC
Threads::Threads
"$<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS};m>")
add_library(SQLite3::SQLite3 ALIAS void_sqlite3_amalgamation)
return()
endif()
find_package(SQLite3 REQUIRED)
if(NOT TARGET SQLite3::SQLite3 AND TARGET SQLite::SQLite3)
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
endif()
+53 -14
View File
@@ -1,17 +1,29 @@
set_property(GLOBAL PROPERTY VOID_MODULES "")
set_property(GLOBAL PROPERTY VOID_MODULE_DEPENDENCY_RECORDS "")
set_property(GLOBAL PROPERTY VOID_PENDING_OPTIONAL_DEPS "")
set_property(GLOBAL PROPERTY VOID_ACTIVE_PUBLIC_HEADERS "")
function(void_add_module MODULE_NAME)
cmake_parse_arguments(ARG "" ""
"INTERNAL_DEPS;EXTERNAL_DEPS;OPTIONAL_DEPS;DEPS_WIN32;DEPS_UNIX;OPTIONS_WIN32;OPTIONS_UNIX"
"INTERNAL_DEPS;EXTERNAL_DEPS;OPTIONAL_DEPS;DEPS_WIN32;DEPS_UNIX;OPTIONS_WIN32;OPTIONS_UNIX;EXTRA_HEADERS;EXCLUDE_HEADERS"
${ARGN})
set(TGT ${PROJECT_NAME}_${MODULE_NAME})
set(ALIAS ${PROJECT_NAME}::${MODULE_NAME})
file(GLOB_RECURSE SRC CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/${MODULE_NAME}/*.cpp")
file(GLOB_RECURSE HDR CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/Void/${MODULE_NAME}/*.hpp")
file(GLOB_RECURSE HDR CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/include/Void/${MODULE_NAME}/*.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/Void/${MODULE_NAME}/*.h")
foreach(_excl IN LISTS ARG_EXCLUDE_HEADERS)
list(REMOVE_ITEM HDR "${CMAKE_CURRENT_SOURCE_DIR}/include/${_excl}")
endforeach()
foreach(_extra IN LISTS ARG_EXTRA_HEADERS)
list(APPEND HDR "${CMAKE_CURRENT_SOURCE_DIR}/include/${_extra}")
endforeach()
if(HDR)
list(REMOVE_DUPLICATES HDR)
endif()
if(NOT SRC AND NOT HDR)
return()
@@ -52,6 +64,10 @@ function(void_add_module MODULE_NAME)
add_library(${ALIAS} ALIAS ${TGT})
set_property(GLOBAL APPEND PROPERTY VOID_MODULES ${MODULE_NAME})
foreach(_hdr IN LISTS HDR)
file(RELATIVE_PATH _rel_hdr "${CMAKE_CURRENT_SOURCE_DIR}/include" "${_hdr}")
set_property(GLOBAL APPEND PROPERTY VOID_ACTIVE_PUBLIC_HEADERS "${_rel_hdr}")
endforeach()
set(_module_external_deps "")
foreach(ext_dep IN LISTS ARG_EXTERNAL_DEPS)
# FindSQLite3's package name and imported-target namespace differ.
@@ -183,6 +199,15 @@ function(void_add_module MODULE_NAME)
)
endif()
if(VOID_ENABLE_TSAN)
target_compile_options(${TGT} PUBLIC
"$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-fsanitize=thread>"
)
target_link_options(${TGT} PUBLIC
"$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-fsanitize=thread>"
)
endif()
if(VOID_ENABLE_COVERAGE)
target_compile_options(${TGT} PUBLIC
"$<$<CXX_COMPILER_ID:GNU>:--coverage;-fprofile-update=atomic>"
@@ -202,7 +227,10 @@ function(void_add_module MODULE_NAME)
EXPORT_NAME ${MODULE_NAME}
)
if(UNIX AND _module_target_type STREQUAL "SHARED_LIBRARY")
set_property(TARGET ${TGT} PROPERTY INSTALL_RPATH "$ORIGIN")
set_target_properties(${TGT} PROPERTIES
INSTALL_RPATH "$ORIGIN"
INSTALL_RPATH_USE_LINK_PATH TRUE
)
endif()
if(WIN32 AND _module_target_type STREQUAL "SHARED_LIBRARY")
# Void's public headers do not require consumers to opt into a DLL
@@ -212,23 +240,34 @@ function(void_add_module MODULE_NAME)
endif()
# GCC 16+ exposes experimental C++26 reflection (P2996) via -freflection.
# Apply it to every module unconditionally so any module is free to use
# ^^T / std::meta::* without per-module wiring.
if(SRC AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16)
target_compile_options(${TGT} PUBLIC -freflection)
# Propagate it on every module (including INTERFACE modules like Core and
# Data) so standalone installed consumers receive the required flag.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16)
target_compile_options(${TGT} ${SCOPE}
"$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,16>>:-freflection>")
endif()
if(HDR)
target_sources(${TGT} ${SCOPE} FILE_SET HEADERS BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include" FILES ${HDR})
endif()
target_sources(${TGT} ${SCOPE} FILE_SET HEADERS BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include" FILES ${HDR})
target_include_directories(${TGT} ${SCOPE}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
install(TARGETS ${TGT} EXPORT ${EXPORT_SET_NAME}
FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
if(HDR)
install(TARGETS ${TGT} EXPORT ${EXPORT_SET_NAME}
FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
else()
install(TARGETS ${TGT} EXPORT ${EXPORT_SET_NAME}
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
endif()
endfunction()
# Resolve OPTIONAL_DEPS recorded by void_add_module(). Must be called once
+12 -1
View File
@@ -2,7 +2,14 @@ if(NOT INPUT_FILE OR NOT OUTPUT_FILE OR NOT SUITE_NAME)
message(FATAL_ERROR "INPUT_FILE, OUTPUT_FILE, and SUITE_NAME must be provided.")
endif()
file(STRINGS ${INPUT_FILE} lines)
file(READ "${INPUT_FILE}" _raw_content)
string(REPLACE "\r\n" "\n" _raw_content "${_raw_content}")
string(REPLACE "\r" "\n" _raw_content "${_raw_content}")
string(REPLACE "\\" "__VOID_SCAN_BS__" _raw_content "${_raw_content}")
string(REPLACE ";" "__VOID_SCAN_SC__" _raw_content "${_raw_content}")
string(REPLACE "[" "__VOID_SCAN_LB__" _raw_content "${_raw_content}")
string(REPLACE "]" "__VOID_SCAN_RB__" _raw_content "${_raw_content}")
string(REPLACE "\n" ";" lines "${_raw_content}")
# Forward-slash path for C++ string literals / #include (always set, so files
# whose tests are all reflection-registered Suite<> structs still emit a valid
@@ -21,6 +28,10 @@ set(current_skip "")
foreach(line IN LISTS lines)
math(EXPR line_number "${line_number} + 1")
string(REPLACE "__VOID_SCAN_RB__" "]" line "${line}")
string(REPLACE "__VOID_SCAN_LB__" "[" line "${line}")
string(REPLACE "__VOID_SCAN_SC__" ";" line "${line}")
string(REPLACE "__VOID_SCAN_BS__" "\\" line "${line}")
# Parse preceding comments for @tag and @skip
string(REGEX MATCH "//[ \t]*@tag[ \t]+(.*)" _tag_match "${line}")
+75
View File
@@ -0,0 +1,75 @@
# Decision ledger
Date: 2026-11-24. Baseline: `main` at `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
## User-confirmed decisions
| ID | Decision | Status/source |
| --- | --- | --- |
| D-001 | Generic library spanning small foundations, complete modules, and full optional application platforms | CONFIRMED; discovery correction and follow-up answers |
| D-002 | Linux-first portable design | CONFIRMED |
| D-003 | Versioned modernization, with major-release breaks and migration guidance | CONFIRMED |
| D-004 | C++26 and reflection remain defining choices | CONFIRMED |
| D-005 | Full roadmap with phased delivery and expanded plans throughout | CONFIRMED |
| D-006 | General software infrastructure domain; no GUI/media/scientific/embedded platform expansion | CONFIRMED domain selection; general Math utilities remain in scope |
| D-007 | Prefer native implementations, deciding backend use separately for each module | CONFIRMED correction to blanket dependency choices |
| D-008 | Prioritize runtime/memory and separate workload profiles together | CONFIRMED combined selection |
| D-009 | Embedded and managed execution modes | CONFIRMED |
| D-010 | Include broad module completion, networked platform, and reloadable platform | CONFIRMED all three; sequencing follows dependencies |
| D-011 | First-class SQLite API using SQLite, plus a separate original Void engine | CONFIRMED explicit clarification |
| D-012 | Original engine starts with a transactional key-value core | CONFIRMED |
| D-013 | Full distributed platform roadmap in later phases | CONFIRMED |
| D-014 | Convenient C++ plugins plus a stable C boundary | CONFIRMED |
| D-015 | Standard-library-only foundation | CONFIRMED |
| D-016 | One expanded file per public module and new area | CONFIRMED |
| D-017 | Author the approved planning package now; feature implementation follows separately | APPROVED by “Implement the plan” after the proposal explicitly bounded that deliverable |
## Root-owned technical defaults
These are design choices made within the approved planning scope, not claims that the
user individually selected each algorithm or that any new implementation exists.
| ID | Choice and rationale | Contract |
| --- | --- | --- |
| D-018 | One authoritative owner for each shared interface; acyclic layered packages | C-01, C-13 |
| D-019 | Native level-triggered epoll sockets, bounded file workers, optional later io_uring | C-06; simple initial semantics and portable operation contract |
| D-020 | Original append WAL, ordered memory index, immutable sorted tables/checkpoints; serialized writer first | C-08; explicit durable core before concurrency/compaction expansion |
| D-021 | Preserve OpenSSL/libsodium for initial cryptographic implementations | C-06; native surrounding logic without changing cryptographic primitives |
| D-022 | Cooperative structured cancellation, one terminal completion, explicit admission bounds | C-03–C-05 |
| D-023 | Fixed-membership Raft first; deterministic core and separate replication adapters | C-12; avoid bootstrap cycles and unsupported reliability claims |
| D-024 | Quorum-confirmed consistent reads; stale reads explicit; no implied cross-shard transaction | C-12 |
| D-025 | Existing strict signed parsing, exact payloads, update commit markers, and frozen V1 remain protected | C-07, C-09, C-10 |
| D-026 | No deadline or staffing assumption; evidence-gated milestones | Delivery plan |
## Approved execution fallback
On 2026-11-24 the configured Sol model for T-DOC-104 reported capacity exhaustion before
starting the assignment. The user explicitly selected “Use configured Astra implementer.”
T-DOC-104 therefore uses the configured astra_implementer at XHigh with exactly the same
ten documentation files and task contract. The failed worker was closed. Other task
ownership and the documentation-only objective are unchanged. Model execution identity
remains configured rather than independently attested.
## Review decisions
- T-DISC-001: configured astra_planner completed the architecture investigation; source
and coverage gaps were reported. Runtime model identity was not independently attested.
- T-DISC-002: configured astra_researcher checked primary documentation for I/O,
persistence, consensus, and TLS; no runtime claims came from that research.
- T-PLAN-003: fresh configured astra_reviewer returned READY for plan-file authoring.
Its P3 distinction between future reference apps/proposed commands and existing
artifacts/evidence was incorporated. This was preflight, not review of written files.
Further decisions must identify affected contract IDs, compatibility impact, and the
plans requiring updates. Do not record a proposal as user approval.
## User-confirmed implementation decisions (2026-11-24)
| ID | Decision | Status/source |
| --- | --- | --- |
| D-027 | Execute in roadmap order: complete P0 baseline (`X-BASE-01`..`X-BASE-05`), then start P1 foundations (`Core`, `Functional`, `Time`, `Memory`, `Math`) | CONFIRMED by user |
| D-028 | Keep `docs/roadmap/` clean; author detailed per-task implementation specifications under `docs/agent-workflow/tasks/` prior to coding each wave | CONFIRMED by user |
| D-029 | Follow `MIGRATION.md` Wave A+B: keep 1.x public APIs and existing tests compiling/passing while introducing NEW APIs and adapters beside them | CONFIRMED by user |
| D-030 | Create dedicated git branch (`feat/roadmap-p0-p1-foundations`) and make focused commits per completed milestone/task; leave local untracked files (`.env`, `.serena/`, `WG.conf`, `keys`) untouched | CONFIRMED by user |
| D-031 | Proceed continuously across roadmap waves without pausing for confirmation between waves, and merge verified waves locally into `main` (without pushing to remote) | CONFIRMED by user |
| D-032 | Push verified `main` (and active feature branches) to `origin` (`git@git.faumaray.com:Void/VoidLibrary.git`) after each verified wave merge, superseding the local-only constraint in `D-031` | CONFIRMED by user ("dont forget to push") |
+372
View File
@@ -0,0 +1,372 @@
# Workflow state
Updated: 2026-11-27.
Repository: VoidLibrary; active branch `feat/roadmap-p3-wave10` (from `main`
at `65ad9b3`, merged Waves 1–9 + `VL-001`..`VL-013` and pushed to `origin/main`).
## Completed objective
1. Approved multi-file expansion planning package committed (`faa8a51`): 54 roadmap
documents with 300 planned feature tasks and workflow records.
2. **Wave 1 / P0 Reliable Baseline (`X-BASE-01`..`X-BASE-05`) implemented & verified**:
- `X-BASE-01`: Replaced hardcoded `/bin/echo`, `/bin/cat`, and `seq` in process tests
with standard-library `VoidProcessHelper`.
- `X-BASE-02`: Marked FetchContent Boost 1.84 as `SYSTEM` so `-DVOID_WARNINGS_AS_ERRORS=ON`
succeeds cleanly on GCC 16.2.0 (`-std=c++26`).
- `X-BASE-03`: Transferred `<Void/Log/Log.hpp>` header ownership to `LogState`,
reconciled acyclic `INTERNAL_DEPS` across 10 `module.cmake` files, added
`Void::FunctionalCoreFormatting`, propagated `-freflection` on `INTERFACE` modules,
filtered `VoidTests` by `ACTIVE_MODULES`, and verified minimal, `System`-only,
embedded `add_subdirectory`, static, and relocated installed consumers.
- `X-BASE-04`: Added `cmake/Capabilities.cmake` (`VOID_HAS_STD_EXPECTED`,
`VOID_HAS_CXX26_REFLECTION`, sanitizer probes, `ASan`+`TSan` mutual exclusion) and
`VOID_ENABLE_TSAN`; verified Debug ASan+UBSan+`-Werror` full suite and TSan subset.
- `X-BASE-05`: Added `VOID_ENABLE_BENCHMARKS` (`benchmarks/FoundationBench.cpp`) and
`tests/corpus/README.md`; recorded P0 foundation benchmark manifest.
3. **Wave 2 / P1 Foundations Gate 1 implemented & verified**:
- Specs authored under `docs/agent-workflow/tasks/` (`8d28c7e`).
- `Core` (`M-CORE-02`, `M-CORE-03`, `cbc9004`): detached `Uuid` from `Math`/`<format>`,
added `GenerateError`, `v4(G&)`, `try_v4()`, span-safe `constexpr` `parse`/`v5_lite`/
`format_chars`, `CheckedBits`, endian-portable `Hash` helpers, and `CoreOnly` consumer.
- `VoidTestScanner` fix (`284d963`): prevented unbalanced `[` in C++ strings from dropping
downstream test discovery in `cmake/VoidTestScanner.cmake`.
- `Functional` (`M-FUNCTIONAL-02`, `7f3395c`): added `ErrorKind`/`ErrorCode`, zero-alloc
`Status`, bounded `Error` chains (16 frames / 1 KiB / 16 KiB) with iterative destructor,
`Result::fail` overloads, and `Adapters.hpp`.
- `Time` (`M-TIME-02`, `4227348`): added `Clock.hpp` (`MonotonicClock`, `CivilClock`,
`SystemMonotonicClock`, `SystemCivilClock`, atomic `ManualClock`, `ManualCivilClock`,
`remaining_until`) and upgraded `Stopwatch` with clock injection, `resume()`,
`try_lap()`, single-sample `split()`, and `kDefaultMaxLaps = 4096`.
- `Memory` subsystem (`S-MEMORY-02..04`, `4d48f2a`): added `Resource.hpp`,
`BudgetResource.hpp`, `Arena.hpp` (`Arena::Checkpoint`, `Arena::TypedScope`,
`ArenaResource`), `BlockPool.hpp` (`BlockPool`, `SynchronizedBlockPool`), and
`MemoryOnly` installed consumer.
- `Math` (`M-MATH-02`, `91e2beb`, `6cac781`): added `Error::{Inexact,NonFinite}`,
`Rounding`, `kMaxNumericTokenBytes = 256`, portable `constexpr` overflow helpers with
guarded builtins, `checked_mul_add`, `checked_cast`, span-safe `parse_integer`/
`parse_real`, and delegated `parse_int`/`parse_double`.
4. **Wave 3 / P1 Text, Containers, Binary, Data implemented & verified**:
- Task specs committed under `docs/agent-workflow/tasks/` (`68963fc`) plus user
decision `D-031` in `DECISIONS.md`.
- `Text` (`M-TEXT-02`, `883bbdc`): added locale-independent ASCII-only helpers in
`include/Void/Text/Str.hpp`, new `include/Void/Text/Bounded.hpp` (`TextLimits`,
`TextError`, `split_views`, `replace_bounded`, `repeat_bounded`, `join_bounded`), and
boundary tests in `tests/standalone/Text/{Str,Bounded}.cpp`.
- `Containers` (`M-CONTAINERS-02`, `M-CONTAINERS-03`, `9ac76bb`): updated
`src/Containers/module.cmake` to `INTERNAL_DEPS Core Memory`; upgraded `ObjectPool` and
`BufferPool` with stationary `std::shared_ptr<State>`, zero-alloc recycling, explicit
`std::pmr::memory_resource*`, admission/byte limits, and exception-safe slot rollback;
upgraded `Ring.hpp` with Vyukov sequence-based non-spinning `MpscRing::try_pop()`,
`close()`, and quiesced destructor cleanup.
- `Binary` (`M-BINARY-02`, `M-BINARY-03`, `eacb8a4`): updated `src/Binary/module.cmake`
to `INTERNAL_DEPS Functional Memory`; added `Budget.hpp` (`BinaryErrorCode`,
`DecodeLimits`, `DecodeBudget`), `Writer.hpp`, `ByteBuffer.hpp` (`FrozenBytes`,
`ByteBuffer`), and upgraded `Reader.hpp` (pre-consume endian check, strict `readBool`,
IEEE `readF32`/`readF64`, `Transaction`, checked cumulative budget readers); expanded
installed `Binary` consumer.
- `Data` (`M-DATA-02`, `692f5ba`): updated `src/Data/module.cmake` to
`INTERNAL_DEPS Core Math Time`; added `std::int64_t`/`std::uint64_t`/`double`
alternatives to `Void::Json::Value`, `NumberKind`, `number_as`, strict RFC 8259
number parsing, exact cross-type `operator==`, `try_serialize`, typed SAX
`on_int`/`on_uint`, and exact reflection/config formatting (`StrictJson` untouched).
## Baseline and authorization
User decisions D-027..D-032 authorize continuous roadmap-order execution across dedicated
wave branches (`feat/roadmap-*`), per-task workflow specs in
`docs/agent-workflow/tasks/`, Wave A+B API compatibility, `--no-ff` merges of verified
waves into `main`, and pushing verified `main` and active feature branches to `origin`
while leaving local untracked files untouched.
## Verification already observed (P0)
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` via
`dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium`: build passed (exit 0);
`ctest` 2/2 passed (`VoidTests` 1,249 passed / 3 intentional skips / 0 failed;
`VoidInstalledComponentConsumers` including relocated `Foundation` and `External` passed).
- Minimal foundation subset, `System` without `Log` (`Log.hpp` installed), embedded
`add_subdirectory`, and static (`BUILD_SHARED_LIBS=OFF`) builds/tests all passed.
- Full Debug ASan+UBSan+`-Werror`: `VoidTests` 1,249 passed, 3 skipped, 0 failed, 0 leaks/UB.
- Debug TSan subset (`Async;Time;Core;Functional;Testing`): 389 passed, 2 skipped, 0 failed.
- `VoidFoundationBench` (RelWithDebInfo, 5 warmup, 20 reps, 10,000 ops/rep): 12 workloads +
empty-harness baseline recorded to `/tmp/void-p0-bench/baseline.json`.
## Verification already observed (P1 Gate 1)
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-p1-full`, 29 modules,
`6cac781`): `VoidTests` 1,310 tests — 1,307 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (3.72s);
`ctest` 2/2 passed (`VoidTests` 3.81s, `VoidInstalledComponentConsumers` 11.95s, total
15.75s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-p1-asan`, 29 modules,
`6cac781`): `VoidTests` 1,310 tests — 1,307 passed, 3 skipped, 0 failed (10.70s), 0 leaks,
0 UB.
- Standalone `Memory;Testing` (`8/8`) + isolated `-DVOID_ENABLED_MODULES=Memory` consumer
`/tmp/void-p1-memory-only-consumer/void_memory_only_consumer` passed (`4d48f2a`).
- `VoidFoundationBench` post-P1 (`rev=6cac781f3a5f`, `/tmp/void-p1-full/post-p1.json`):
`harness_empty_loop` 0.20 ns, `core_uuid_parse_hyphenated` 25.26 ns (down from 88.76 ns),
`core_uuid_to_string` 16.73 ns (down from 498.11 ns).
## Verification already observed (Wave 3)
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w3-full`, 29 modules,
`692f5ba`): `VoidTests` 1,332 tests — 1,329 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (3.83s);
`ctest` 2/2 passed (`VoidTests` 3.81s, `VoidInstalledComponentConsumers` 12.38s, total
16.20s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w3-asan`, 29 modules,
`692f5ba`): `VoidTests` 1,332 tests — 1,329 passed, 3 skipped, 0 failed (10.83s), 0 leaks,
0 UB.
- Debug TSan subset (`Containers;Async;Time;Testing`, `/tmp/void-w3-tsan`, `692f5ba`):
`Ring*|Pool*|BufferPool*|Clock*|Stopwatch*` 67/67 passed (69.8ms), 0 TSan data races.
- `VoidFoundationBench` post-W3 (`rev=692f5ba5b2f9`, `/tmp/void-w3-full/post-w3.json`):
`harness_empty_loop` 0.39 ns, `core_uuid_parse_hyphenated` 24.94 ns,
`core_uuid_to_string` 16.88 ns, `containers_spsc_ring_push_pop` 8.85 ns,
`containers_lru_get_put` 20.59 ns, `binary_reader_u64_be` 1.31 ns,
`data_json_parse_small_object` 325.73 ns, `data_json_serialize_small_object` 164.76 ns.
## Verification already observed (Wave 4A — P1 Algorithms, Unicode, Async)
- Standalone `Algorithms;Testing` (`-Werror`, `/tmp/void-w4a-alg`, `bfd6246`): `Graph`
4/4 passed (64.2ms); `ctest` 2/2 passed (including `AlgorithmsOnly` installed consumer).
- Standalone `Unicode;Testing` (`-Werror`, `/tmp/void-w4a-unicode`, `4369fde`): `Utf`
4/4 passed (0.3ms); `ctest` 2/2 passed (including `UnicodeOnly` installed consumer).
- Standalone `Async;Testing` (`-Werror`, `/tmp/void-w4a-async`, `c75056f`):
`OperationScope*|Executor*|Coro*` 28/28 passed (4.1ms); `ctest` 2/2 passed.
- Debug TSan subset (`Async;Testing`, `/tmp/void-w4a-async-tsan`, `c75056f`):
`OperationScope*|Executor*|ThreadPool*` 20/20 passed (34.6ms), 0 TSan races.
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w4a-full`, 31 modules,
`c75056f`): `VoidTests` 1,345 tests — 1,342 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (3.75s);
`ctest` 2/2 passed (`VoidTests` 3.77s, `VoidInstalledComponentConsumers` 14.45s, total
18.21s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w4a-asan`, 31 modules,
`c75056f`): `VoidTests` 1,345 tests — 1,342 passed, 3 skipped, 0 failed (11.00s), 0 leaks,
0 UB.
- `VoidFoundationBench` post-W4A (`rev=c75056fe0707`, `/tmp/void-w4a-full/post-w4a.json`):
`harness_empty_loop` 0.39 ns, `core_uuid_parse_hyphenated` 25.48 ns,
`core_uuid_to_string` 17.09 ns, `containers_spsc_ring_push_pop` 9.16 ns,
`containers_lru_get_put` 21.81 ns, `binary_reader_u64_be` 1.36 ns,
`data_json_parse_small_object` 319.83 ns, `data_json_serialize_small_object` 168.13 ns.
## Verification already observed (Wave 4B — P1 IO, Runtime, Testing)
- Standalone `IO` (`-Werror`, `/tmp/void-w4b-io`, `673bb7e`): `IoDriver` 4/4 passed (7.5 ms);
`ctest` 2/2 passed (`VoidTests` 1.50 s, `VoidInstalledComponentConsumers` including `IOOnly`
6.08 s); Debug TSan `/tmp/void-w4b-io-tsan` `IoDriver` 4/4 passed (12.8 ms, 0 races).
- Standalone `Runtime` (`-Werror`, `/tmp/void-w4b-runtime`, 11 modules, `1b3331e`):
`RuntimeHost` 3/3 passed (0.5 ms); `ctest` 2/2 passed (`VoidTests` 1.54 s,
`VoidInstalledComponentConsumers` including `RuntimeOnly` 8.01 s).
- Standalone `Testing` (`Core;Testing`, `-Werror`, `/tmp/void-w4b-testing`, `de8a981`):
`FrameworkHardening*|Deterministic*|Math*|ContainerFixture*|StructRepr*` 16 tests — 14
passed, 2 intentional skips (`broken_feature`, `unquoted_skip`), 0 failed (301.1 ms);
`ctest` 2/2 passed (2.82 s).
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w4b-full`, 33 modules,
`de8a981`): `VoidTests` 1,359 tests — 1,356 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (5.08 s);
`ctest` 2/2 passed (`VoidTests` 4.50 s, `VoidInstalledComponentConsumers` 19.77 s, total
24.27 s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w4b-asan`, 33 modules,
`de8a981`): `VoidTests` 1,359 tests — 1,356 passed, 3 skipped, 0 failed (14.87 s), 0 leaks,
0 UB.
- Debug TSan subset (`IO;Async;Containers;Time;Testing`, `/tmp/void-w4b-tsan`, 9 active
modules, `de8a981`): `Io*|OperationScope*|Executor*|Ring*|Pool*|Clock*` 80/80 passed
(60.7 ms), 0 TSan data races.
- `VoidFoundationBench` post-W4B (`rev=de8a981893d8`, `/tmp/void-w4b-full`, `post-w4b.json`):
`harness_empty_loop` 0.39 ns, `core_uuid_parse_hyphenated` 25.28 ns,
`core_uuid_to_string` 16.94 ns, `core_hash_fnv1a64_256b` 184.30 ns,
`core_hash_murmur3_256b` 69.63 ns, `functional_result_ok_chain` 1.16 ns,
`functional_error_with_context` 60.17 ns, `math_checked_add_loop` 0.48 ns,
`containers_spsc_ring_push_pop` 9.06 ns, `containers_lru_get_put` 21.30 ns,
`binary_reader_u64_be` 1.35 ns, `data_json_parse_small_object` 316.78 ns,
`data_json_serialize_small_object` 168.16 ns.
## Verification already observed (Wave 5 — P2 Operations Foundations)
- `ObservabilityHooks` + `Observability` (`fe99051`): `Observability*` 4/4 passed
(12.1 ms); `ctest` 2/2 passed (including `ObservabilityHooksOnly` &
`ObservabilityOnly`, 7.03 s).
- `Resilience` + `ResilienceAsync` + P2 error domains (`18a623a`): standalone 21/21
(2.8 ms) + `AsyncPolicy*` 6/6 (1.3 ms); `ctest` 2/2 (5.99 s including `ResilienceOnly`).
- `LogState` + `Log` + `LogConfig` (`a74a402`): `Log;Testing` `724 ✔`, `2 ⊘`
(`broken_feature`, `unquoted_skip`), `0 ✘` (799.2 ms); `ctest` 2/2 (`LogOnly` 7.15 s,
total 8.09 s); `LogConfig;Testing` 12/12 (28.9 ms).
- CMake `VOID_ACTIVE_PUBLIC_HEADERS` fix (`3d8dfb0`) + `Stacktrace` (`7b57b35`):
`Stacktrace;Testing` `Stacktrace*` 4/4 passed (374.2 ms) without selecting `Log`.
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w5-full`, 37 modules,
`7b57b35`): `VoidTests` 1,378 tests — 1,375 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (7.49 s);
`ctest` 2/2 passed (`VoidTests` 8.09 s, `VoidInstalledComponentConsumers` all 16 consumers
66.12 s, total 74.22 s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w5-asan`, 37
modules, `7b57b35`): initial run hit 1 timing assertion in unrelated existing
`internal_fsm_service_hot_reload_under_load` (`FsmServiceHotReload.cpp:119`); clean
re-run passed all 1,378 tests — 1,375 passed, 3 skipped, 0 failed (50.16 s), 0 leaks,
0 UB.
- Wave 5 Debug TSan subset (`/tmp/void-w5-tsan`, 15 modules, `7b57b35`):
`Observability*|ResilienceHardening*|AsyncPolicy*|Log*|AsyncLogger*|LogScopeSnapshot*|Io*|OperationScope*`
68/68 passed (7.01 s), 0 TSan data races.
- `VoidFoundationBench` post-W5 (`rev=7b57b355cd75`, `/tmp/void-w5-full`, `post-w5.json`):
`harness_empty_loop` 0.75 ns, `core_uuid_parse_hyphenated` 43.49 ns,
`core_uuid_to_string` 32.51 ns, `core_hash_fnv1a64_256b` 213.37 ns,
`core_hash_murmur3_256b` 92.34 ns, `functional_result_ok_chain` 1.65 ns,
`functional_error_with_context` 94.82 ns, `math_checked_add_loop` 0.86 ns,
`containers_spsc_ring_push_pop` 10.76 ns, `containers_lru_get_put` 31.99 ns,
`binary_reader_u64_be` 2.24 ns, `data_json_parse_small_object` 576.81 ns,
`data_json_serialize_small_object` 284.87 ns.
## Verification already observed (Wave 6A — P2 System, SystemAsync, IPC)
- Wave 6A prep & P2/P3 error domains (`3f67b1e`): reserved `kIpcErrorDomain = 16`..
`kSqliteErrorDomain = 21` in `Error.hpp`, added thread-safe pipe `ENOTSOCK` fallback in
`EpollDriver.cpp`, enabled `VoidProcessHelper` for `Void::System` OR `Void::IPC`, added
`M-SYSTEM-01-05.md` and `S-IPC-01-03.md`.
- `System` (`fcdbc06`): `System;Testing` (`/tmp/void-w6a-system`, `-Werror`) `System*`
53/53 passed (226.6 ms); `ctest` 2/2 (`VoidTests` 0.57 s,
`VoidInstalledComponentConsumers` including `SystemOnly` 3.95 s).
- `SystemAsync` (`9a3c5d8`): `SystemAsync;Testing` (`/tmp/void-w6a-sysasync`, `-Werror`)
`SystemAsync*` 2/2 passed (211.5 ms); `ctest` 2/2 (`VoidTests` 1.15 s,
`VoidInstalledComponentConsumers` including `SystemAsyncOnly` 9.43 s).
- `IPC` (`39a48d5`): `IPC;Testing` (`/tmp/void-w6a-ipc`, `-Werror`) `Ipc*` 3/3 passed
(8.8 ms); `ctest` 2/2 (`VoidTests` 0.49 s, `VoidInstalledComponentConsumers` including
`IPCOnly` 12.20 s, total 12.70 s).
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w6a-full`, 39 modules,
`39a48d5`): `VoidTests` 1,386 tests — 1,383 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (4.68 s);
`ctest` 2/2 passed (`VoidTests` 4.58 s, `VoidInstalledComponentConsumers` 19 consumer
builds incl. `SystemOnly`, `SystemAsyncOnly`, `IPCOnly`, `RelocatedFoundation`,
`RelocatedExternal`, 31.05 s, total 35.63 s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w6a-asan`, 39
modules, `39a48d5`): `VoidTests` 1,386 tests — 1,383 passed, 3 skipped, 0 failed
(19.34 s), 0 ASan/LSan leaks, 0 UBSan errors.
- Wave 6A Debug TSan subset (`/tmp/void-w6a-tsan`, 14 modules, `39a48d5`):
`Process*|SystemHardening*|SystemAsync*|Ipc*|FileWatcher*|IoDriver*|OperationScope*`
35/35 passed (609.4 ms), 0 TSan data races.
- `VoidFoundationBench` post-W6A (`rev=39a48d5c0a72`, `/tmp/void-w6a-full/post-w6a.json`):
`harness_empty_loop` 0.38 ns, `core_uuid_parse_hyphenated` 24.92 ns,
`core_uuid_to_string` 17.45 ns, `core_hash_fnv1a64_256b` 181.41 ns,
`core_hash_murmur3_256b` 67.93 ns, `functional_result_ok_chain` 1.13 ns,
`functional_error_with_context` 58.77 ns, `math_checked_add_loop` 0.47 ns,
`containers_spsc_ring_push_pop` 8.80 ns, `containers_lru_get_put` 20.61 ns,
`binary_reader_u64_be` 1.31 ns, `data_json_parse_small_object` 311.16 ns,
`data_json_serialize_small_object` 162.52 ns.
## Verification already observed (StrictJson RFC 8259 decimals — `acd77ee`, on `main`)
- Added `ParseOptions{maximumDepth, allowDecimals = true}` and `double` variant
alternative to `Void::Json::Strict` (`include/Void/Data/StrictJson.hpp`) for LSP
messages while preserving exact `int64_t` integer semantics and `allowDecimals = false`
opt-out (`tests/standalone/Data/StrictJson.cpp` 6/6 tests).
- Verified in RelWithDebInfo `-Werror` (`49/49`, `ctest` 2/2) and Debug ASan+UBSan
`-Werror` (`/tmp/void-strictjson-asan`, `49/49` in 7.0 ms, 0 leaks, 0 UB); pushed to
`origin/main`.
## Verification already observed (Wave 6B — P2 Crypto, Security, Archive, Update)
- Wave 6B task specs (`8a1c15f`): added `M-CRYPTO-01-05.md`, `M-SECURITY-01-04.md`,
`M-ARCHIVE-01-05.md`, and `M-UPDATE-01-06.md`.
- `Crypto` & `CryptoAsync` (`eb42228`): `Crypto;CryptoAsync;Testing` (`/tmp/void-w6b-crypto`,
`-Werror`, `-p openssl`, 10 modules) `Crypto*|crypto_*` 8/8 (`Crypto` 3,
`CryptoHardening` 3, `CryptoAsync` 2); `ctest` 2/2 (`7.22 s`, including `CryptoOnly` &
`CryptoAsyncOnly`).
- `Security` & `SecurityAsync` (`713d2dc`): `Security;SecurityAsync;Testing`
(`/tmp/void-w6b-security`, `-Werror`, `-p libsodium`, 10 modules) `Security*|security_*`
14/14 (`720.7 ms`: `SecurityTests` 8, `SecurityHardening` 4, `SecurityAsync` 2);
`ctest` 2/2 (`8.46 s`, including `SecurityOnly` & `SecurityAsyncOnly`).
- `Archive` (`00d7478`): `Archive;Testing` (`/tmp/void-w6b-archive`, `-Werror`,
`-p libarchive`, 7 modules) `Archive*|archive_*` 9/9 (`259.0 ms`: `Archive` 6,
`ArchiveHardening` 3); `ctest` 2/2 (`5.76 s`, including `ArchiveOnly`).
- `Update` (`47736cb`): `Update;Testing` (`/tmp/void-w6b-update`, `-Werror`,
`-p libarchive -p openssl`, 12 modules) `Update*|update_*|component_feed_*|readable_component_*|version_store_*`
25/25 (`1.91 s`: `Update` 22, `UpdateHardening` 3); `ctest` 2/2 (`10.64 s`, including
`UpdateOnly`).
- Full RelWithDebInfo + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w6b-full`, 41 modules,
`47736cb`): `VoidTests` 1,406 tests — 1,403 passed, 3 intentional skips
(`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed
(`6.26 s`); `ctest` 2/2 passed (`VoidTests` 7.34 s, `VoidInstalledComponentConsumers`
all 25 consumers incl. `CryptoOnly`, `CryptoAsyncOnly`, `SecurityOnly`,
`SecurityAsyncOnly`, `ArchiveOnly`, `UpdateOnly`, `RelocatedFoundation`,
`RelocatedExternal`, 40.73 s, total 48.07 s).
- Full Debug ASan + UBSan + `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w6b-asan`, 41
modules, `47736cb`): `VoidTests` 1,406 tests — 1,403 passed, 3 skipped, 0 failed
(`21.78 s`), 0 ASan/LSan leaks, 0 UBSan errors.
- Wave 6B Debug TSan subset (`CryptoAsync;SecurityAsync;Update;Testing`,
`/tmp/void-w6b-tsan`, 20 modules, `47736cb`): 56/56 passed (`4.86 s`), 0 TSan data races.
- `VoidFoundationBench` post-W6B (`rev=47736cb6ce2f`, `/tmp/void-w6b-full/post-w6b.json`):
`harness_empty_loop` 0.38 ns, `core_uuid_parse_hyphenated` 24.52 ns,
`core_uuid_to_string` 16.53 ns, `core_hash_fnv1a64_256b` 179.95 ns,
`core_hash_murmur3_256b` 67.37 ns, `functional_result_ok_chain` 1.12 ns,
`functional_error_with_context` 58.37 ns, `math_checked_add_loop` 0.47 ns,
`containers_spsc_ring_push_pop` 8.76 ns, `containers_lru_get_put` 21.02 ns,
`binary_reader_u64_be` 1.31 ns, `data_json_parse_small_object` 333.32 ns,
`data_json_serialize_small_object` 165.99 ns.
### Wave 7 (P2 Persistence & Storage: `Sqlite`, `SqliteAsync`, and NEW Original `Storage` — `G-STORE` Gate)
- Task specs committed on `feat/roadmap-p2-wave7` (`9925ea1`): `tasks/M-SQLITE-01-05.md`, `tasks/S-STORAGE-01-06.md`.
- **`Void::Sqlite` & `Void::SqliteAsync`** (`427cc9a`, TSan lock-order fix `84e6fe8`): hardened `ConnectionState`, `open_database`/`OpenOptions` with checked WAL/FULL/`foreign_keys` pragmas and disabled extension loading, checked positional/named binds, borrowed lifetime owners, strict typed `RowView`/getters, `Transaction` (`sqlite3_get_autocommit`), `Savepoint`, `close()` busy guard, `migrate_checked` with `_void_schema_migrations`, `checkpoint`/`backup_to`/`restore_from`/`health`, exception-safe callbacks, `ScopedFaultGuard`, plus optional `Void::SqliteAsync` (`AsyncPool`, bounded workers, leased interrupt cleanup) and `SqliteOnly`/`SqliteAsyncOnly` installed consumers.
- **`Void::Storage` (`G-STORE` Gate)** (`fdf0da5`): built NEW original durable single-writer key-value storage engine with zero SQLite or external dependencies (`Crc32c`, `Types`, `FilePort`/`PosixFilePort`/`FaultInjectingFilePort`, V1 binary codecs `VOIDWAL1`/`VOIDTBL1`/`VOIDMNF1`/`VOIDCUR1`, `Batch` with preconditions, `Engine` with bootstrap/recovery/tail-truncation/checkpoint/incremental compaction/backup, `Tools` verify/restore/salvage, `AsyncStorageAdapter` C-03 stop-race conformance) and `StorageOnly` installed consumer.
- Integrated verification (`84e6fe8`): `VoidTests` 1,417 tests (1,414 passed, 3 intentionally skipped hardware/root checks, 0 failed across 43 modules in 21.06s), `ctest` 2/2 (all 28 installed consumers in 65.05s), Debug ASan+UBSan 1,417 tests (0 leaks, 0 UB in 36.47s), TSan (`SqliteAsync;Storage;Testing`) 19/19 in 15.38s with 0 warnings, and post-Wave-7 `VoidFoundationBench`.
### Wave 8 (P2 Lifecycle: `Service`, `ServicePlugin`, `Plugin`, `Configuration`, `ConfigurationAsync`, and `Fsm`)
- Task specs committed on `feat/roadmap-p2-wave8` (`6b3dede`): `tasks/M-SERVICE-01-05.md`, `tasks/M-PLUGIN-01-06.md`, `tasks/M-CONFIGURATION-01-05.md`, `tasks/M-FSM-01-05.md`; error domains `22..25` reserved in `Functional/Error.hpp` (`kServiceErrorDomain`, `kPluginErrorDomain`, `kConfigurationErrorDomain`, `kFsmErrorDomain`); `cmake/Module.cmake` updated to install `*.h` headers.
- **`Void::Service` & `Void::ServicePlugin`** (`1474a69`): immutable `ServiceSnapshot`, owning `ServiceHandle<I>`, transactional DAG `ProviderSet`/`prepare_batch`/`start_staged`/`publish`/`start_and_publish`/`close_and_join`, split `Void::ServicePlugin` helper target, and `ServiceOnly`/`ServicePluginOnly` installed consumers.
- **`Void::Plugin`** (`a24e086`, TSan pthread fixture fix `1a54f38`): pure-C11 `include/Void/Plugin/CAbi.h` v1 (`VOID_PLUGIN_ABI_VERSION`), `CModuleHost` (pins/quiesce/checkpoint/replace/degraded state/retention/byte budgets/dep topological batching), `CAbiAdapter`, unlocked `PluginManager` staging, 9 pure-C11 `-Werror` test fixtures, and `PluginOnly` installed consumer.
- **`Void::Configuration` & `Void::ConfigurationAsync`** (`1dc51d5`): `Bind.hpp` attributes (`Secret`, `RestartRequired`, `Deprecated`, `IntRange`, `RealRange`), bounded `Schema<T>` reflection/provenance/redaction/deprecation validation, async transactional `ReloadController<T>` + `Snapshot<T>` + `prepare_external` + coalescing `WatcherService`, and `ConfigurationOnly`/`ConfigurationAsyncOnly` installed consumers.
- **`Void::Fsm`** (`ef5312c`, TSan fixes `40b579d`, `cb988fa`): `terminal(Status)`/`TerminationReason`, `FsmErrorCode`/`kFsmErrorDomain = 25`, `FsmLimits`, `ExecutionBinding`, `Checkpoint`/`StateId`, hardened `Detail/Engine` (`MonotonicClock`, bounded `try_post`, `m_control_queue`, `ScopeId` waiter/timer tracking, 64-event/1ms turn budget), `Detail/Awaiter` (scope+user `stop_token` cancellation), `Machine::run`/`acquire_service`/`run_parallel_structured`/`run_parallel_any_structured`/`request_checkpoint`/`restore_checkpoint`, `Orchestrator` (`StopOnFault`/`BoundedRestart`, unlocked observers), `tests/standalone/Fsm/FsmHardening.cpp`, and `FsmOnly` installed consumer.
- Integrated verification (`cb988fa`, `-DVOID_WARNINGS_AS_ERRORS=ON`):
- Full RelWithDebInfo (`/tmp/void-w8-full`, 45 modules): `VoidTests` 1,437 tests (1,434 passed, 3 skipped, 0 failed, `20.99s`); `ctest` 2/2 (`77.11s`, all 34 installed consumers); `VoidFoundationBench` post-W8 (`rev=cb988fa98509`, `/tmp/void-w8-full/post-w8.json`): `harness_empty_loop` 0.38ns, `core_uuid_parse_hyphenated` 24.71ns, `core_uuid_to_string` 16.45ns, `core_hash_fnv1a64_256b` 179.94ns, `core_hash_murmur3_256b` 67.31ns, `functional_result_ok_chain` 1.12ns, `functional_error_with_context` 57.98ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.72ns, `containers_lru_get_put` 20.58ns, `binary_reader_u64_be` 1.30ns, `data_json_parse_small_object` 319.62ns, `data_json_serialize_small_object` 167.55ns.
- Full Debug ASan+UBSan (`/tmp/void-w8-asan`, 45 modules): `VoidTests` 1,437 tests (`37.13s`), 0 leaks, 0 UB.
- Debug TSan (`/tmp/void-w8-tsan`, `ServicePlugin;ConfigurationAsync;Fsm;Testing`, 20 modules): `VoidTests` 1,110 tests (1,107 passed, 3 skipped, 0 failed, `11.49s`), 0 data races.
### VoidBuildSystem Upstream Feature Wave (`VL-001`..`VL-013`, `feat/upstream-vbs-requests`)
- **Batch A (`adfc854`, `VL-002`, `VL-008`, `VL-009`, `VL-012`, `VL-013`)**:
- Reserved `kNetErrorDomain = 26`; enforced `PascalCase` types / `snake_case` methods naming (`VL-012`); added strict RFC 3629/8259 UTF-8 validation in `StrictJson`, `Semver` shorthand comparators (`^1`, `^1.0`, `~1.2`, `>=1.2 <2`), header-only `Data/Toml.hpp` TOML 1.0 parser/serializer with `Origin`, and zero-CMake self-registering `VOID_TEST*` macros.
- Verified (`Data;Text;Testing`, `-Werror`): `690 tests (687 ✔, 3 ⊘)` in `351.9ms`; pure `g++` multi-file stem-collision binary `4/4` (`0.1ms`).
- **Batch B (`b50131f`, `VL-001`, `VL-003`, `VL-010`, `VL-011`)**:
- Full process-group supervision (`PR_SET_CHILD_SUBREAPER`, `waitpid(-pgid)`, `SIGKILL` escalation), `FileLock` / `atomic_symlink_swap` / `reflink_copy_file` / `set_timestamps_nofollow`, Linux `inotify` recursive `DirectoryWatcher`, `Argparse` subcommands/`option_many`/`positional_many`/`ParseOutcome`, top-level `LANGUAGES C CXX`, and FetchContent SQLite3 amalgamation fallback.
- Verified (`/tmp/void-vbs-b`, `-Werror`): `791 tests (788 ✔, 3 ⊘)` in `1.72s`, `ctest` `2/2` (`14.44s` incl. `SystemOnly`, `ConfigurationOnly`, `SqliteOnly`).
- **Batch C (`22c8538`, `VL-006`, `VL-007`)**:
- Optional `OpenSSL::Crypto` (`VOID_CRYPTO_HAS_OPENSSL`) + pure-C++ FIPS 180-4 SHA-1/256/512 & RFC 7693 BLAKE2b-256/512 + HMAC/HKDF + `snake_case` aliases; optional `LibArchive` (`VOID_ARCHIVE_HAS_LIBARCHIVE`) + pure-C++ USTAR/PAX tar & deterministic `ArchiveCompression::Gzip` + `create()`.
- Verified zero-OpenSSL (`534 ✔ / 3 ⊘`, `ctest` `2/2` `5.59s`), zero-LibArchive (`405 ✔ / 3 ⊘`, `ctest` `2/2` `6.22s`), and full backends (`888 ✔ / 3 ⊘`, `ctest` `2/2` `15.53s`).
- **Batch D (`66baae7`, `VL-004`, `VL-005`) + TSan/race fix (`9920bfd`)**:
- POSIX TCP HTTP/1.1 `HttpServer`, streaming `HttpClient` + `HttpClient::secure()` TLS >= 1.2 + CA/SAN verification + cross-origin/downgrade/redaction + `std::stop_token` cancellation + `NetOnly` consumer (`66baae7`); scoped GCC `-Wno-tsan` to `src/Net/Http.cpp` and fixed `StallServer` join order (`9920bfd`).
- Verified `Net;System;Crypto;Testing` (`563 ✔ / 3 ⊘`, `ctest` `2/2` `8.48s` incl. `NetOnly`).
- **Full-suite & sanitizer checks**:
- Full RelWithDebInfo (`/tmp/void-vbs-full`, 45 modules, `-Werror`): `VoidTests` `1,456` discovered (`1,452 ✔`, `4 ⊘`, `0 ✘`) in `21.94s` (`22.09s` post-`9920bfd`), `ctest` `2/2` in `82.82s` (`VoidTests` `22.03s`, `VoidInstalledComponentConsumers` `60.79s` across all `35` consumers incl. `NetOnly`), `VoidFoundationBench` (`rev=66baae74a0b7`) recorded.
- Full Debug ASan+UBSan (`/tmp/void-vbs-asan`, 45 modules, `-Werror`): `1,456` discovered (`1,452 ✔`, `4 ⊘`, `0 ✘`) in `39.11s`, `0` leaks, `0` UB (+ post-`9920bfd` `Http|Net|Server` `9/9 ✔` in `1.58s`).
- Debug TSan (`/tmp/void-vbs-tsan`, `Net;System;SystemAsync;Configuration;Crypto;Archive;Data;Text;Testing`, 17 modules, `-Werror`): `957` discovered (`954 ✔`, `3 ⊘`, `0 ✘`) in `10.65s`, `0` data races, `0` lock-order warnings.
### Wave 9 — P2 Completion: `Net`, `TestingMock`, `ShortUrl`, `RPC` (`feat/roadmap-p2-wave9`)
- **Specs & Error Domains (`700024a`)**: authored `M-NET-01-05.md`, `M-TESTINGMOCK-01-04.md`, `M-SHORTURL-01-04.md`, `S-RPC-01-03.md`; reserved `kTestingMockErrorDomain = 27`, `kShortUrlErrorDomain = 28`, `kRpcErrorDomain = 29`, `kDiscoveryErrorDomain = 30`.
- **`Net` P2 Hardening (`86d777e`, `M-NET-01..05`)**: native incremental RFC 9110/9112 `HttpRequestParser` / `HttpResponseParser`, bounded `ConnectionPool` (`PoolKey` origin+proxy+TLS generation, `MonotonicClock` idle eviction, RAII `ConnectionLease`), descriptor-pinned `StaticFileResolver::open_safe()` (`openat`+`O_NOFOLLOW`), `HttpClient` `303`/`307` redirect & single-deadline hardening, RFC 6455 `WebSocket` codec/decoder/`WebSocketClient` & `HttpServer::add_websocket_route()`.
- **`TestingMock` P2 Hardening (`658c21a`, `M-TESTINGMOCK-01..04`)**: explicit `MockSession` (`freeze`, `verify_and_close`, `MockLimits`, `RegistrationToken`), `Sequence` order groups, action-outside-lock reservation (same-thread reentry + `ConcurrentActions`), perfect forwarding + `returns_once`/`invokes_once` move-only support, `never()`/`at_least`/`at_most`/`between`, matcher combinators (`Ne`, `EndsWith`, `IsNull`, `NotNull`, `NotOf`, `AllOf`, `AnyOf`, depth bound 32), `TestingMockOnly` consumer.
- **`ShortUrl` P2 Completion (`691808e`, `M-SHORTURL-01..04`)**: preserved frozen `V1` ABI; added `Void::ShortUrl::V2` (`LocalProvider`, URL/key validation, base62 keys, civil expiry, tombstone non-reuse, 24h idempotency, `V1Adapter`), separate `ShortUrlStorage` (`Void::Storage` conditional batches + `SecurityRandomBytesPort`), separate `ShortUrlRemote` (pre-mutation capability checks, `Retry-After`, `UnknownOutcome`), `ShortUrlOnly` consumer.
- **`RPC` Subsystem (`5184d1c`, `S-RPC-01..03`)**: NEW `Void::RPC` module with Wire v1 deterministic binary envelope codec (`VRPC`, fail-closed on unknown major/required flags/reserved/overflow, skippable minor extensions, `Binary::Reader` `std::memcpy` fix), unary `/void-rpc/v1/call` HTTP/1.1 `Server` & `Client` (`AuthHook`, schema check, timeout clamp, sanitized exceptions, `Registration::unregister_and_drain()`), `RpcOnly` consumer.
- **Full-suite & sanitizer checks**:
- Full integrated RelWithDebInfo (`/tmp/void-w9-full`, 48 modules, `-Werror`): `VoidTests` `1,470` discovered (`1,466 ✔`, `4 ⊘`, `0 ✘`) in `23.56s`; `ctest` `2/2` in `91.13s` (`VoidTests` `23.27s`, `VoidInstalledComponentConsumers` `67.86s` across all `38` consumers); `VoidFoundationBench` (`rev=5184d1cf8cdd`) recorded.
- Full Debug ASan+UBSan (`/tmp/void-w9-asan`, 48 modules, `-Werror`): `1,470` discovered (`1,466 ✔`, `4 ⊘`, `0 ✘`) in `41.95s`, `0` leaks, `0` UB.
- Debug TSan (`/tmp/void-w9-tsan`, `Net;TestingMock;ShortUrl;ShortUrlStorage;ShortUrlRemote;RPC;System;Testing`, 22 modules, `-Werror`): `943` discovered (`940 ✔`, `3 ⊘`, `0 ✘`) in `24.15s`, `0` data races, `0` lock-order warnings.
### Wave 10 — P3 Core Subsystems: `Discovery`, `Scheduler`, `Messaging` (`feat/roadmap-p3-wave10`)
- **Specs & Error Domains (`0cf187d`)**: authored `S-DISCOVERY-01-04.md`, `S-SCHEDULER-01-04.md`, `S-MESSAGING-01-04.md`; reserved `kSchedulerErrorDomain = 31` and `kMessagingErrorDomain = 32` (`kDiscoveryErrorDomain = 30` reserved in Wave 9).
- **`Discovery` & `DiscoveryRpc` (`ec8c0bd`, `S-DISCOVERY-01..04`)**: NEW zero-external-dep `Void::Discovery` subsystem (`Catalog` with pure thread-free construction, atomic `replace_static()`, provider generation resets, local RAII `Registration` handles with steady-clock leases & zero-TTL rejection, `ManagedLeaseRenewer`, bounded `WatchHandle` with coalesced `ResyncRequired` overflow recovery + self-cancel + `SelfJoin` diagnosis, `WeightedRoundRobinSelector`, HRW `AffinitySelector`) + separate `Void::DiscoveryRpc` endpoint adapter preserving `expected_tls_name` / blocking TLS downgrades while keeping `RPC` independent; `DiscoveryOnly` consumer (`_no_external_deps`).
- **`Scheduler` & `SchedulerStorage` (`aaeab50`, `S-SCHEDULER-01..04`)**: NEW zero-external-dep `Void::Scheduler` subsystem (monotonic min-heap ordered by `(due_time, sequence)`, one-shot/fixed-delay/fixed-rate, 5-field `CalendarExpression`, explicit `TimezoneRegistry` with DST gap/fold & unknown-zone rejection without silent UTC fallback, O(1) backward-scanning `CoalesceLatest` over millions of missed slots, 100/pass `CatchUpBounded`, `Forbid`/`QueueOne`/`AllowBounded` overlap, exponential full-jitter retries & dead-letter acknowledgement, revision invalidation watermark, `close_and_join` returning incomplete report on deadline) + durable `Void::SchedulerStorage` (`StorageJobStore` on `Void::Storage::Engine` conditional batches, exclusive owner lock, unique civil-slot dedup, startup `Running -> Pending` recovery preserving `OccurrenceId`, `UnknownOutcome`, retention-cap pause without cursor loss); `SchedulerOnly` consumer (`_no_external_deps`).
- **`Messaging`, `MessagingStorage`, & `MessagingRpc` (`60ee28e`, `S-MESSAGING-01..04`)**: NEW zero-external-dep `Void::Messaging` subsystem (explicit `PublishDurability::{Memory,Durable}`, `InMemoryQueue` rejecting `Durable`, `Pending -> InFlight(generation, visibility_deadline) -> Acked | Pending | DeadLetter`, competing & `SingleActive` groups, stale-receipt fencing & idempotent repeat ack, bounded retries -> DLQ, corrupt-payload quarantine) + `Void::MessagingStorage` (`StorageQueue` on `Void::Storage::Engine` conditional batches, restart `InFlight -> Pending` generation bump preserving attempts, atomic DLQ move & `stuck_dlq_count`, bounded 24h/100k idempotency ledger refusing silent eviction, `BlockAtQuota` default & clock-health expiry pause, `OutboxInbox` single-batch local helper) + `Void::MessagingRpc` (`RpcQueueServer`/`RpcQueueClient`); `MessagingOnly` consumer (`_no_external_deps`).
- **Full-suite & sanitizer checks**:
- Full integrated RelWithDebInfo (`/tmp/void-w10-full`, 55 modules, `-Werror`): `VoidTests` `1,484` discovered (`1,480 ✔`, `4 ⊘`, `0 ✘`) in `23.80s`; `ctest` `2/2` in `94.93s` (`VoidTests` `23.93s`, `VoidInstalledComponentConsumers` `71.00s` across all `41` consumers incl. `DiscoveryOnly`, `SchedulerOnly`, `MessagingOnly` with `_no_external_deps`); `VoidFoundationBench` (`rev=60ee28e4ca9b`) recorded.
- Full Debug ASan+UBSan (`/tmp/void-w10-asan`, 55 modules, `-Werror`): `VoidTests` `1,484` discovered (`1,480 ✔`, `4 ⊘`, `0 ✘`) in `42.48s`, `0` leaks, `0` UB.
- Debug TSan (`/tmp/void-w10-tsan`, `Discovery;DiscoveryRpc;Scheduler;SchedulerStorage;Messaging;MessagingStorage;MessagingRpc;System;Testing`, 23 modules, `-Werror`): `903` discovered (`900 ✔`, `3 ⊘`, `0 ✘`) in `23.20s`, `0` data races, `0` lock-order warnings.
## Ownership and next step
Waves 1–10 (`P0`, `P1`, all `P2` modules, `VL-001`..`VL-013`, and P3 core
subsystems `Discovery`, `Scheduler`, `Messaging`) are complete, verified, and
ready for `--no-ff` merge to `main`. Next wave: **Wave 11 — P3 Completion**
(`S-RPC-04..05` WebSocket multiplexed streaming + `NetworkedApplications` &
`ReloadableApplications` platform integrations), followed by **P4**
(`Coordination`, `Replication`, `DistributedStorage`, `DistributedApplications`).
+143
View File
@@ -0,0 +1,143 @@
# Documentation delivery tasks
Baseline: `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`; approved 2026-11-24.
These tasks author plans. Future feature task IDs inside those plans remain planned.
| ID | Deliverable | Owner | State | Dependencies |
| --- | --- | --- | --- | --- |
| T-DOC-ROOT | Shared contracts, requirements, index, delivery, quality, migration and workflow records | Root | VERIFIED | All 54 roadmap files present; complete-package checks pass; independent reviews A/B READY |
| T-DOC-101 | Foundation/data module and subsystem plans | sol_implementer | VERIFIED | 11 plans, 70 planned feature tasks; worker checks passed; review A READY after corrections |
| T-DOC-102 | Runtime/system/service plans and reloadable platform | sol_implementer | VERIFIED | 11 plans, 59 planned feature tasks; worker checks passed; review B READY after corrections |
| T-DOC-103 | Network/security/distributed plans | sol_implementer | VERIFIED | 12 plans, 73 planned feature tasks; worker checks passed; review B READY |
| T-DOC-104 | Storage/operations/quality plans and networked platform | astra_implementer | VERIFIED | 10 plans, 66 planned feature tasks; worker checks passed; user-approved fallback; review B READY after corrections |
| T-DOC-REVIEW-A | Fresh independent shared/foundation review | astra_reviewer | READY | All 21 documents reviewed; P2 dependency correction and current/proposed Update wording rechecked; no remaining actionable findings |
| T-DOC-REVIEW-B | Fresh independent runtime/storage/network/platform review | astra_reviewer | READY | All 33 area plans reviewed; three P2 corrections and affected acceptance rows rechecked; no remaining actionable findings |
## Wave 1 — P0 Baseline Implementation (`feat/roadmap-p0-p1-foundations`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| X-BASE-01 | Controlled `VoidProcessHelper` replacing `/bin/echo`, `/bin/cat`, `seq` | [X-BASE-01](tasks/X-BASE-01.md) | VERIFIED | `Process`/`ProcessStream` 13/13; full `VoidTests` 1,249 passed, 3 skipped |
| X-BASE-02 | Boost 1.84 FetchContent `SYSTEM` isolation for `-Werror` | [X-BASE-02](tasks/X-BASE-02.md) | VERIFIED | Full `-DVOID_WARNINGS_AS_ERRORS=ON` build exit 0; `VoidTests` 1,249 passed |
| X-BASE-03 | `Log.hpp` in `LogState`, acyclic closures, `FunctionalCoreFormatting`, `-freflection` propagation, subset/relocated/static/embedded checks | [X-BASE-03](tasks/X-BASE-03.md) | VERIFIED | Full `ctest` 2/2 passed (`VoidTests` + relocated consumers), plus minimal, `System`-only, embedded, static passed |
| X-BASE-04 | `cmake/Capabilities.cmake`, reflection/`expected`/sanitizer probes, `VOID_ENABLE_TSAN` | [X-BASE-04](tasks/X-BASE-04.md) | VERIFIED | ASan+UBSan+`-Werror` full `VoidTests` 1,249 passed (0 leaks/UB); TSan subset 389 passed |
| X-BASE-05 | `benchmarks/FoundationBench.cpp` (`VOID_ENABLE_BENCHMARKS`) + `tests/corpus/README.md` | [X-BASE-05](tasks/X-BASE-05.md) | VERIFIED | RelWithDebInfo `-Werror` build passed; 12 workloads + harness JSON baseline validated |
## Wave 2 — P1 Foundations Gate 1 (`feat/roadmap-p0-p1-foundations`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| M-CORE-02, M-CORE-03 | Detached zero-alloc `Uuid`, `CheckedBits`, endian-portable `Hash`, `CoreOnly` consumer (`cbc9004`) | [M-CORE-02-03](tasks/M-CORE-02-03.md) | VERIFIED | `Uuid` 21/21, `Bits` 23/23, `Hash` 18/18 passed in full RelWithDebInfo & ASan+UBSan; `CoreOnly` consumer passed |
| VoidTestScanner fix | Escape `[`/`]` in `cmake/VoidTestScanner.cmake` preventing dropped tests (`284d963`) | — | VERIFIED | Restored missing suites; full `VoidTests` discovers 1,310 tests |
| M-FUNCTIONAL-02 | `ErrorKind`/`ErrorCode`, compact `Status`, bounded `Error` chains, `Adapters.hpp` (`7f3395c`) | [M-FUNCTIONAL-02](tasks/M-FUNCTIONAL-02.md) | VERIFIED | `ErrorStatus` 6/6 and `Result*` passed in full RelWithDebInfo & ASan+UBSan |
| M-TIME-02 | `Clock.hpp` (`MonotonicClock`, `CivilClock`, `ManualClock`) & clock-injected bounded `Stopwatch` (`4227348`) | [M-TIME-02](tasks/M-TIME-02.md) | VERIFIED | `Clock` 6/6 and `Stopwatch` 14/14 passed in full RelWithDebInfo & ASan+UBSan |
| S-MEMORY-02..04 | `Memory` subsystem (`Resource`, `BudgetResource`, `Arena`, `BlockPool`, `MemoryOnly`) (`4d48f2a`) | [S-MEMORY-02-04](tasks/S-MEMORY-02-04.md) | VERIFIED | `Arena` 3/3, `BlockPool` 2/2, `BudgetResource` 3/3 passed; isolated `MemoryOnly` & integrated consumers passed |
| M-MATH-02 | Span-safe `parse_integer`/`parse_real`, `checked_cast`, `checked_mul_add`, portable overflow (`91e2beb`, `6cac781`) | [M-MATH-02](tasks/M-MATH-02.md) | VERIFIED | `Numeric` 35/35 passed in Debug `-Werror`, full RelWithDebInfo, & full Debug ASan+UBSan |
## Wave 3 — P1 Text, Containers, Binary, Data (`feat/roadmap-p0-p1-foundations`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| M-TEXT-02 | ASCII-explicit helpers in `Str.hpp` + `Bounded.hpp` (`883bbdc`) | [M-TEXT-02](tasks/M-TEXT-02.md) | VERIFIED | `Str` 25/25, `Bounded` 2/2 passed in `Text;Testing` `-Werror`, full RelWithDebInfo, & ASan+UBSan |
| M-CONTAINERS-02, M-CONTAINERS-03 | Stationary `shared_ptr<State>` & bounded `ObjectPool`/`BufferPool` + Vyukov non-spinning `MpscRing` (`9ac76bb`) | [M-CONTAINERS-02-03](tasks/M-CONTAINERS-02-03.md) | VERIFIED | `Pool` 13/13, `BufferPoolTests` 8/8, `Ring` 15/15 passed in RelWithDebInfo, ASan+UBSan, & Debug TSan (`67/67`, 0 races) |
| M-BINARY-02, M-BINARY-03 | `Budget.hpp`, `Writer.hpp`, `ByteBuffer.hpp`, upgraded `Reader.hpp`, expanded `Binary` consumer (`eacb8a4`) | [M-BINARY-02-03](tasks/M-BINARY-02-03.md) | VERIFIED | `Reader` 4/4, `Writer` 2/2, `ByteBuffer` 1/1 passed; `VoidInstalledComponentConsumers` (`Binary`, `RelocatedBinary`) passed |
| M-DATA-02 | Exact `int64`/`uint64` JSON numbers, `number_as`, strict parser, exact `operator==`, `try_serialize`, SAX `on_int`/`on_uint`, exact reflection/config (`692f5ba`) | [M-DATA-02](tasks/M-DATA-02.md) | VERIFIED | `Json` 34/34, `Reflect` 14/14, `StrictJson` 3/3, `Update` 22/22, `Config` 12/12 passed in full RelWithDebInfo & ASan+UBSan |
## Wave 4A — P1 Algorithms, Unicode, Async (`feat/roadmap-p1-wave4a`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| S-ALGORITHMS-02 | `src/Algorithms/module.cmake`, `Graph.hpp` (`WorkLimits`, `IndexedGraphView`, `HasVersionStamp`, `AdjacencyView`, iterative `bfs`/`dfs`/`shortest_path_unweighted`/`topological_order` + cycle witness), `AlgorithmsOnly` consumer (`bfd6246`) | [S-ALGORITHMS-02](tasks/S-ALGORITHMS-02.md) | VERIFIED | `Graph` 4/4 and `AlgorithmsOnly` passed in `Algorithms;Testing`, full RelWithDebInfo (1,342 ✔), & ASan+UBSan (0 leaks/UB) |
| S-UNICODE-01, S-UNICODE-02 | `src/Unicode/module.cmake`, `MANIFEST.md` (Unicode 17.0.0), `Utf.hpp` (`data_version`, `Scalar`, `UtfPolicy`, strict/one-unit-repair codecs, `_into` span transcoders, `Utf8StreamDecoder`/`Utf16StreamDecoder`), `UnicodeOnly` consumer (`4369fde`) | [S-UNICODE-01-02](tasks/S-UNICODE-01-02.md) | VERIFIED | `Utf` 4/4 and `UnicodeOnly` passed in `Unicode;Testing`, full RelWithDebInfo (1,342 ✔), & ASan+UBSan (0 leaks/UB) |
| M-ASYNC-02, M-ASYNC-03 | `src/Async/module.cmake` (`INTERNAL_DEPS Functional Time LogState`), `Detail/Types.hpp`, `Operation.hpp` (`ResumeTicket`, `OperationState`), upgraded `Executor.hpp` (`try_post`, `post_completion`, bounded `ManualExecutor`, clock/stop `schedule_on`), `TaskScope.hpp` (`TaskScope`, `JoinHandle`, `DetachedOwner`) (`c75056f`) | [M-ASYNC-02-03](tasks/M-ASYNC-02-03.md) | VERIFIED | `OperationScope*|Executor*|Coro*` 28/28, Debug TSan 20/20 (0 races), full RelWithDebInfo (1,342 ✔), & ASan+UBSan (0 leaks/UB) |
## Wave 4B — P1 IO, Runtime, Testing (`feat/roadmap-p1-wave4b`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| S-IO-01, S-IO-02 | `src/IO/module.cmake` (`Core Functional Time Memory Async`), `Types.hpp`, `Detail/Backend.hpp`, `Stream.hpp`, `Driver.hpp`, `src/IO/EpollDriver.cpp` (mock + Linux level-triggered epoll, `(slot, generation)` tokens, `eventfd`, `BufferLease` PMR/quota, `MockController`, `read_exact`/`write_all`), `IOOnly` consumer (`673bb7e`) | [S-IO-01-02](tasks/S-IO-01-02.md) | VERIFIED | `IoDriver` 4/4, `IOOnly` & `ctest` 2/2 passed; Debug TSan `IoDriver` 4/4 (0 races), full RelWithDebInfo (1,356 ✔) & ASan+UBSan (0 leaks/UB) |
| S-RUNTIME-01 | `CMakeLists.txt` explicit `void_add_module` keyword matching fix, `src/Runtime/module.cmake` (`Core Functional Time Memory Algorithms Async IO`), `Options.hpp`, `ResourceGraph.hpp`, `Host.hpp`, `RuntimeOnly` consumer (`1b3331e`) | [S-RUNTIME-01](tasks/S-RUNTIME-01.md) | VERIFIED | `RuntimeHost` 3/3, `RuntimeOnly` & `ctest` 2/2 passed (11-module closure); full RelWithDebInfo (1,356 ✔) & ASan+UBSan (0 leaks/UB) |
| M-TESTING-02, M-TESTING-03 | `OwningJUnitReporter`, strict CLI/config validation (`--allow-empty`, `--selftest-child`), bounded assertion/failure capture, `Subprocess` POSIX runner, frozen v1 `DeterministicRng`/`ReplayToken`/`check_property` shrinker & `DeterministicRun` (`de8a981`) | [M-TESTING-02-03](tasks/M-TESTING-02-03.md) | VERIFIED | `Core;Testing` 14 ✔ / 2 ⊘ & `ctest` 2/2 passed; full RelWithDebInfo (1,356 ✔) & ASan+UBSan (0 leaks/UB) |
## Wave 5 — P2 Operations Foundations (`feat/roadmap-p2-wave5`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| Wave 5 specs & P2 error domains | Per-task specs under `docs/agent-workflow/tasks/` and reserved P2 domain IDs (`kRuntimeErrorDomain = 11`, `kLogErrorDomain = 12`, `kStacktraceErrorDomain = 13`, `kObservabilityErrorDomain = 14`, `kResilienceErrorDomain = 15`) (`809b6f5`, fixed in `18a623a`) | — | VERIFIED | Integrated RelWithDebInfo & ASan+UBSan passed with zero domain collisions |
| S-OBSERVABILITY-01..04 | `ObservabilityHooks` std-only `INTERFACE`, `Observability` (`Hooks`, `Context`, `AsyncContext`, thread-sharded `Metrics`, sampled/budgeted `Tracing`), `ObservabilityHooksOnly` & `ObservabilityOnly` consumers (`fe99051`) | [S-OBSERVABILITY-01-04](tasks/S-OBSERVABILITY-01-04.md) | VERIFIED | `Observability` 4/4, Debug TSan 4/4 (0 races), `ObservabilityHooksOnly`/`ObservabilityOnly` consumers, full RelWithDebInfo (1,375 ✔) & ASan+UBSan (0 leaks/UB) |
| M-RESILIENCE-01..04 | `Resilience` (`Types`, `RateLimiter`, bounded cursor `KeyedRateLimiter`, generation-bound `Breaker`/`BreakerPermit`, overflow-safe `ResourceMonitor`/`ResourcePermit`) & `ResilienceAsync` (`AsyncPolicy` FIFO `Bulkhead`, `execute_resilient`), `ResilienceOnly` consumer (`18a623a`) | [M-RESILIENCE-01-04](tasks/M-RESILIENCE-01-04.md) | VERIFIED | Standalone 21/21 & `AsyncPolicy` 6/6, Debug TSan `ResilienceHardening`+`AsyncPolicy` 6/6 (0 races), `ResilienceOnly` consumer, full RelWithDebInfo (1,375 ✔) & ASan+UBSan |
| M-LOG-01..05 | Hardened `LogState` (`SinkRegistration`, `detach_and_drain`, reentrancy cap 8), bounded `Logger` (`DeliveryLimits`, `LoggerOptions`, `try_submit`, `flush_through`, quarantine, `set_mode` barrier), redaction/escaping `Formatter`, `MultiLogger::try_add` cap 8 + cycle check, `FileLogger`/`RotatingFileLogger` `fsync`/`reopen`, separate `LogConfig`, `LogOnly` consumer (`a74a402`) | [M-LOG-01-05](tasks/M-LOG-01-05.md) | VERIFIED | `Log;Testing` 724 ✔ / 2 ⊘ & `LogConfig;Testing` 12/12, Debug TSan 36/36 (`Log*`, `AsyncLogger*`, `LogScopeSnapshot*`, `LogHardening*`), `LogOnly` consumer, full RelWithDebInfo & ASan+UBSan |
| CMake test header check fix | Track `VOID_ACTIVE_PUBLIC_HEADERS` in `cmake/Module.cmake` so `tests/CMakeLists.txt` maps split `EXTRA_HEADERS` (e.g. `Void/Log/Log.hpp` -> `LogState`) accurately (`3d8dfb0`) | — | VERIFIED | `Stacktrace;Testing` discovers and passes `Stacktrace*` 4/4 without `Log`; full suite discovers all 1,378 tests |
| M-STACKTRACE-01..04 | `src/Stacktrace/module.cmake` (`INTERNAL_DEPS Functional Time LogState`), split `capture()` (<=256 frames, zero log/source IO) & `Resolver` (1024-entry / 4 MiB cache, `invalidate_module`), `Capabilities`, checked `read_source_snippet_checked` (roots, symlink-escape & `..` rejection, overflow-safe `int64_t` math), `format_resolved_trace`, `write_fatal_signal_marker`, `tests/standalone/Stacktrace/Stacktrace.cpp` (`7b57b35`) | [M-STACKTRACE-01-04](tasks/M-STACKTRACE-01-04.md) | VERIFIED | `Stacktrace;Testing` `Stacktrace*` 4/4 (374.2ms), full RelWithDebInfo (1,375 ✔) & ASan+UBSan (0 leaks/UB) |
## Wave 6A — P2 System, SystemAsync, IPC (`feat/roadmap-p2-wave6a`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| Wave 6A prep, error domains & helper modes | Reserved P2/P3 domain IDs (`kIpcErrorDomain = 16`..`kSqliteErrorDomain = 21`) in `Error.hpp`, thread-safe pipe `ENOTSOCK` fallback in `EpollDriver.cpp`, enabled `VoidProcessHelper` for `Void::System` OR `Void::IPC` with `ignore-sigterm`, `simultaneous-io`, `flood`, `long-line`, `check-fds`, `env-dump`, `cwd`, `ipc-pipe-echo`, task specs (`3f67b1e`) | — | VERIFIED | Compiled cleanly with `-Werror`; verified via Wave 6A `System`, `SystemAsync`, `IPC`, ASan+UBSan, and TSan suites |
| M-SYSTEM-01..05 | Hardened `System` (`Types.hpp`, `Process.{hpp,cpp}`, `Path.hpp`, `Query.hpp`, `TempFile.hpp`, `TempDir.hpp`, `Metrics.hpp`), strict non-shell spawning + fd hygiene, pipe/arg limits, duplex `communicate()` & bounded escalation, `query_process` /proc validation, symlink-safe atomic `TempFile`/`TempDir`, `/bin/sh`-free `ProcessStream.cpp`, `SystemHardening.cpp`, `SystemOnly` consumer (`fcdbc06`) | [M-SYSTEM-01-05](tasks/M-SYSTEM-01-05.md) | VERIFIED | `System*` 53/53 (`226.6ms`), `ctest` 2/2 (`SystemOnly` `3.95s`), full RelWithDebInfo (`1,383 ✔`), ASan+UBSan (0 leaks/UB), TSan `16/16` (0 races) |
| M-SYSTEM-06 | Split async `SystemAsync` (`INTERNAL_DEPS System Async IO Time Functional LogState`, `EXTRA_HEADERS` `AsyncProcess.hpp`/`AsyncWatcher.hpp`), `ProcessManager`, `ManagedChild`, async `communicate`/`wait`/`close_and_join`, `WatcherService`/`WatchSubscription`, `SystemAsync.cpp`, `SystemAsyncOnly` consumer (`9a3c5d8`) | [M-SYSTEM-01-05](tasks/M-SYSTEM-01-05.md) | VERIFIED | `SystemAsync*` 2/2 (`211.5ms`), `ctest` 2/2 (`SystemAsyncOnly` `9.43s`), full RelWithDebInfo (`1,383 ✔`), ASan+UBSan (0 leaks/UB), TSan `2/2` (0 races) |
| S-IPC-01..03 | New `IPC` module (`src/IPC/module.cmake`, `Types.hpp`, `Codec.hpp`, `Transport.hpp`, `Session.hpp`, `IPC.hpp`), V1 `VDIP` 24B big-endian framing & pre-alloc `BufferQuota`/`QuotaPermit`, `LocalListener`/`connect_local` (`O_NOFOLLOW`, `0700`/`0600`, `flock`, `SO_PEERCRED` fail-closed), `adopt_pipe_pair`/`create_socket_pair_transports`, full-duplex `Session` with control lane/tombstones/token-bucket/graceful drain, `Ipc.cpp`, `IPCOnly` consumer (`39a48d5`) | [S-IPC-01-03](tasks/S-IPC-01-03.md) | VERIFIED | `Ipc*` 3/3 (`8.8ms`), `ctest` 2/2 (`IPCOnly` `12.20s`), full RelWithDebInfo (`1,383 ✔`), ASan+UBSan (0 leaks/UB), TSan `3/3` (0 races) |
## Out-of-band Priority Fix (`main`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| StrictJson decimals | RFC 8259 decimal numbers (`double` variant alternative + `ParseOptions::allowDecimals = true`) in `Void::Json::Strict` (`include/Void/Data/StrictJson.hpp`, `tests/standalone/Data/StrictJson.cpp`) (`acd77ee`) | — | VERIFIED | `StrictJson` 6/6 (`49/49` Data suite, `ctest` 2/2), Debug ASan+UBSan `49/49` (0 leaks/UB); pushed to `origin/main` |
## Wave 6B — P2 Crypto, Security, Archive, Update (`feat/roadmap-p2-wave6b`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| M-CRYPTO-01..05 | Hardened `Crypto` (OpenSSL 3.5.9 non-deprecated `EVP_MD`/`EVP_MAC`/`EVP_KDF`/`EVP_PKEY`, poisoned `Hasher`, 16 MiB Ed25519 cap, 4 KiB HKDF cap & overlap/wipe guards, `constant_time_equal`, `secure_wipe`, `kCryptoErrorDomain = 18`) + optional `CryptoAsync` (`hash_stream`, `AsyncFileHasher` 8/32/8 MiB budget, `close_and_join`), `CryptoOnly` & `CryptoAsyncOnly` consumers (`8a1c15f`, `eb42228`) | [M-CRYPTO-01-05](tasks/M-CRYPTO-01-05.md) | VERIFIED | `Crypto` 3 + `CryptoHardening` 3 + `CryptoAsync` 2 = 8/8, `ctest` 2/2 (`7.22s`), full RelWithDebInfo (`1,403 ✔`), ASan+UBSan (0 leaks/UB), TSan 8/8 (0 races) |
| M-SECURITY-01..04 | Hardened `Security` (`kSecurityErrorDomain = 19`, `SecureBuffer` with lock policies & wipe counter, input caps, `parse_argon2id_cost`, `verify_password_budgeted`, `VSEC` v1 `xchacha20poly1305_ietf` `Envelope`/`SecretKeyRing` without legacy fallback, bounded default-deny `Authorization`) + `SecurityAsync` (`Authenticator`, `AccountSessionPort`, fail-closed `AuditSink`, `PasswordJobBudget`, `SessionPolicy`, dummy-hash parity, version CAS, `close_and_join`), `SecurityOnly` & `SecurityAsyncOnly` consumers (`713d2dc`) | [M-SECURITY-01-04](tasks/M-SECURITY-01-04.md) | VERIFIED | `SecurityTests` 8 + `SecurityHardening` 4 + `SecurityAsync` 2 = 14/14 (`720.7ms`), `ctest` 2/2 (`8.46s`), full RelWithDebInfo (`1,403 ✔`), ASan+UBSan (0 leaks/UB), TSan 14/14 (0 races) |
| M-ARCHIVE-01..05 | Hardened `Archive` (`kArchiveErrorDomain = 17`, streaming `Reader` + forensic listing, file-as-parent conflict rejection, exclusive `0700` `StagedTree` + bottom-up `fsync` + Linux `SYS_renameat2(RENAME_NOREPLACE)` atomic `publish()` with `PublicationOutcome::Unknown`, `cleanup_stale_staging`, reproducible `O_NOFOLLOW` `create_archive`, isolated `VoidArchiveWorker` extraction with rlimits + RSS check + parent inventory verification), `ArchiveOnly` consumer (`00d7478`) | [M-ARCHIVE-01-05](tasks/M-ARCHIVE-01-05.md) | VERIFIED | `Archive` 6 + `ArchiveHardening` 3 = 9/9 (`259.0ms`), `ctest` 2/2 (`5.76s`), full RelWithDebInfo (`1,403 ✔`), ASan+UBSan (0 leaks/UB), TSan 9/9 (0 races) |
| M-UPDATE-01..06 | Hardened `Update` (`kUpdateErrorDomain = 20`, schema-3 verify-before-payload-parse fix, `StrictJsonProfile` integer-only option, non-forgeable `VerifiedSelection`, `VersionStore::pruneWithPins`, atomic checksummed `ReplayFloorStore`, Ed25519 `TrustStore` rotation/revocation, `ArtifactTransport`, `LifecycleHooks`, checksummed `OperationJournal` halting with `RecoveryRequired`, `InstallCoordinator` with staged archive + `CleanupPending` + idempotent `reconcile`/`retry_cleanup`), `UpdateOnly` consumer (`47736cb`) | [M-UPDATE-01-06](tasks/M-UPDATE-01-06.md) | VERIFIED | `Update` 22 + `UpdateHardening` 3 = 25/25 (`1.91s`), `ctest` 2/2 (`10.64s`), full RelWithDebInfo (`1,403 ✔`), ASan+UBSan (0 leaks/UB), TSan 25/25 (0 races) |
## Wave 7 — P2 Sqlite, SqliteAsync, and Storage (`feat/roadmap-p2-wave7`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| M-SQLITE-01..05 | Hardened `Sqlite` (`kSqliteErrorDomain = 21`, `ConnectionState`, `OpenOptions` checked WAL/FULL/FK pragmas & disabled extension loading, checked binds & borrowed lifetime owners, typed `RowView`, `Transaction` autocommit/busy guards, `Savepoint`, `migrate_checked`, `checkpoint`/`backup_to`/`restore_from`/`health`, exception-safe callbacks, `ScopedFaultGuard`, TSan lock-order fix outside `interrupt_mu`) + optional `SqliteAsync` (`AsyncPool`), `SqliteOnly` & `SqliteAsyncOnly` consumers (`427cc9a`, `84e6fe8`) | [M-SQLITE-01-05](tasks/M-SQLITE-01-05.md) | VERIFIED | Standalone `Sqlite` 14/14 (`426.5ms`), `ctest` 2/2 (`5.11s`), TSan 19/19 (`15.38s`, 0 warnings), full RelWithDebInfo (`1,414 ✔`), ASan+UBSan (0 leaks/UB) |
| S-STORAGE-01..06 | NEW original `Void::Storage` (`kStorageErrorDomain = 9`, zero SQLite/external deps, `Crc32c`, `PosixFilePort`/`FaultInjectingFilePort`, V1 `VOIDWAL1`/`VOIDTBL1`/`VOIDMNF1`/`VOIDCUR1` codecs, `Batch` preconditions, single-writer `Engine` with recovery/tail-truncation/checkpoint/compaction/backup, `Tools` verify/restore/salvage, `AsyncStorageAdapter` C-03 stop-race conformance), `G-STORE` gate, `StorageOnly` consumer (`fdf0da5`) | [S-STORAGE-01-06](tasks/S-STORAGE-01-06.md) | VERIFIED | Standalone zero-ext-deps `Storage` 5/5 (`14.53s`), `ctest` 2/2 (`24.07s`), TSan 19/19 (`15.38s`, 0 warnings), full RelWithDebInfo (`1,414 ✔`), ASan+UBSan (0 leaks/UB) |
## Wave 8 — P2 Service, Plugin, Configuration, and Fsm (`feat/roadmap-p2-wave8`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| M-SERVICE-01..05 | Hardened `Service` (`kServiceErrorDomain = 22`, immutable `ServiceSnapshot`, owning `ServiceHandle<I>`, transactional DAG `ProviderSet`/`prepare_batch`/`start_staged`/`publish`/`start_and_publish`/`close_and_join`, retained generation cap) + split `ServicePlugin` (`acquire_plugin_service<I>`, `PluginServiceBinding`), `ServiceOnly` & `ServicePluginOnly` consumers (`6b3dede`, `1474a69`) | [M-SERVICE-01-05](tasks/M-SERVICE-01-05.md) | VERIFIED | Standalone `Service;ServicePlugin;Testing` 18/18, `ctest` 2/2 (`7.47s`), Debug TSan 1,107 ✔ (0 races), full RelWithDebInfo (`1,434 ✔`), ASan+UBSan (0 leaks/UB) |
| M-PLUGIN-01..06 | Hardened `Plugin` (`kPluginErrorDomain = 23`, pure-C11 `CAbi.h` v1, `CModuleHost` activity pins/quiesce/checkpoint/replace/degraded state/retention/byte budgets/dep topological batching, `CAbiAdapter`, unlocked `PluginManager` staging), `PluginOnly` consumer (`a24e086`, `1a54f38`) | [M-PLUGIN-01-06](tasks/M-PLUGIN-01-06.md) | VERIFIED | Standalone `Plugin;ServicePlugin;Testing` 32 ✔ / 1 skip (`194.5ms`), `ctest` 2/2 (`9.45s`), Debug TSan 1,107 ✔ (0 races), full RelWithDebInfo (`1,434 ✔`), ASan+UBSan (0 leaks/UB) |
| M-CONFIGURATION-01..05 | Hardened `Configuration` (`kConfigurationErrorDomain = 24`, `Bind.hpp` attributes, bounded `Schema<T>` reflection/provenance/redaction/deprecation checks) + split `ConfigurationAsync` (transactional `ReloadController<T>`, `Snapshot<T>`, `prepare_external`, coalescing `WatcherService` integration), `ConfigurationOnly` & `ConfigurationAsyncOnly` consumers (`1dc51d5`) | [M-CONFIGURATION-01-05](tasks/M-CONFIGURATION-01-05.md) | VERIFIED | Standalone `ConfigurationAsync;Testing` `Configuration*` 6/6 (`0.7ms`), `ctest` 2/2 (`13.75s`), Debug TSan 1,107 ✔ (0 races), full RelWithDebInfo (`1,434 ✔`), ASan+UBSan (0 leaks/UB) |
| M-FSM-01..05 | Hardened `Fsm` (`kFsmErrorDomain = 25`, shared `terminal(Status)` incl. `Faulted`, `TerminationReason`, `FsmLimits` bounds & reserved control lane, `MonotonicClock` & borrowed `ExecutionBinding`, per-state stop scopes & waiter/timer purge before `on_exit()`, `run_parallel_structured` / `run_parallel_any_structured` loser stop+join & tie-break, boundary `request_checkpoint` / `safe_point` / `restore_checkpoint` / `restore_legacy_checkpoint`, `acquire_service<I>()`, hardened `Orchestrator` `StopOnFault`/`BoundedRestart` & `FsmModel::~FsmModel()` worker join), `FsmOnly` consumer (`ef5312c`, `40b579d`, `cb988fa`) | [M-FSM-01-05](tasks/M-FSM-01-05.md) | VERIFIED | Standalone `Fsm;Testing` 814 ✔ / 2 skips (`789.1ms`), `ctest` 2/2 (`9.59s`), Debug TSan 1,107 ✔ (0 races, `internal_FsmServiceHotReload` 4/4), full RelWithDebInfo (`1,434 ✔`, `ctest` 2/2 `77.11s`), ASan+UBSan (`1,434 ✔`, 0 leaks/UB) |
## VoidBuildSystem Upstream Requests (`VL-001`..`VL-013`, `feat/upstream-vbs-requests`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| VL-002, VL-008, VL-009, VL-012, VL-013 | `Data/Toml.hpp` (TOML 1.0 parser/serializer + `Origin`), strict RFC 3629/8259 UTF-8 in `StrictJson`, zero-CMake self-registering `VOID_TEST*` macros, `Semver` shorthand comparators (`^1`, `^1.0`, `~1.2`, `>=1.2 <2`), `PascalCase`/`snake_case` naming (`VL-012`), `kNetErrorDomain = 26` (`adfc854`) | — | VERIFIED | Standalone `Data;Text;Testing` `-Werror` `687 ✔ / 3 ⊘` (`351.9ms`); pure `g++` zero-CMake multi-file stem collision binary `4/4` (`0.1ms`), `--list`, `--filter from_dir_b` `1/1`; full RelWithDebInfo (`1,452 ✔`), ASan+UBSan (`0` leaks/UB), TSan (`954 ✔`, `0` races) |
| VL-001, VL-003, VL-010, VL-011 | Process-group supervision (`PR_SET_CHILD_SUBREAPER`, `waitpid(-pgid)`, leader-exit `SIGKILL` escalation), `FileLock` / `atomic_symlink_swap` / `reflink_copy_file` / `set_timestamps_nofollow`, Linux `inotify` recursive `DirectoryWatcher`, `Argparse` subcommands/`option_many`/`positional_many`/`ParseOutcome`, top-level `LANGUAGES C CXX` & FetchContent SQLite3 amalgamation (`b50131f`) | — | VERIFIED | Standalone `/tmp/void-vbs-b` `-Werror` `788 ✔ / 3 ⊘` (`1.72s`), `ctest` `2/2` (`14.44s`, incl. `SystemOnly`, `ConfigurationOnly`, `SqliteOnly`); full RelWithDebInfo (`1,452 ✔`), ASan+UBSan (`0` leaks/UB), TSan (`954 ✔`, `0` races) |
| VL-006, VL-007 | Optional `OpenSSL::Crypto` (`VOID_CRYPTO_HAS_OPENSSL`) + pure-C++ FIPS 180-4 SHA-1/256/512 & RFC 7693 BLAKE2b-256/512 + HMAC/HKDF + `snake_case` hash aliases (`22c8538`); optional `LibArchive` (`VOID_ARCHIVE_HAS_LIBARCHIVE`) + pure-C++ USTAR/PAX tar & deterministic `ArchiveCompression::Gzip` + `create()` (`22c8538`) | — | VERIFIED | Zero-OpenSSL `534 ✔ / 3 ⊘` (`1.09s`, `ctest` `2/2` `5.59s`); zero-LibArchive `405 ✔ / 3 ⊘` (`1.45s`, `ctest` `2/2` `6.22s`); full-backend `888 ✔ / 3 ⊘` (`3.70s`, `ctest` `2/2` `15.53s`); full RelWithDebInfo (`1,452 ✔`), ASan+UBSan (`0` leaks/UB), TSan (`954 ✔`, `0` races) |
| VL-004, VL-005 | POSIX TCP HTTP/1.1 `HttpServer` (`query`, `file_body`/`from_file`, `Router::allowed_methods`, `bound_port`, `431`/`413`, TE+CL smuggling `400`, streaming `BodyReader`, `HEAD`->`GET`, `shutdown`), streaming `HttpClient` + `HttpClient::secure()` TLS >= 1.2 + CA/SAN + cross-origin/downgrade/redaction + `NetErrorCode` (`kNetErrorDomain = 26`) + `std::stop_token` + `NetOnly` consumer (`66baae7`) + TSan `-Wno-tsan` scope & `StallServer` fix (`9920bfd`) | — | VERIFIED | Standalone `Net;System;Crypto;Testing` `563 ✔ / 3 ⊘` (`2.36s`), `ctest` `2/2` (`8.48s` incl. `NetOnly`); Debug TSan `954 ✔ / 3 ⊘` (`10.65s`, `0` races); full RelWithDebInfo `1,452 ✔ / 4 ⊘` (`22.09s`), `ctest` `2/2` (`82.82s`, `35` consumers); ASan+UBSan `1,452 ✔` (`39.11s`) + `Http\|Net\|Server` `9/9` (`1.58s`, `0` leaks/UB) |
## Wave 9 — P2 Completion: Net, TestingMock, ShortUrl, RPC (`feat/roadmap-p2-wave9`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| M-NET-01..05 | Native incremental RFC 9110/9112 `HttpRequestParser` / `HttpResponseParser` (smuggling rejection, 1xx/HEAD/chunked/trailers/EOF), bounded `ConnectionPool` (`PoolKey` origin+proxy+TLS generation, `MonotonicClock` idle eviction, RAII `ConnectionLease`), descriptor-pinned `StaticFileResolver::open_safe()` (`openat`+`O_NOFOLLOW`), `HttpClient` `303`/`307` redirect & single-deadline hardening, RFC 6455 `WebSocket` codec/decoder/`WebSocketClient` & `HttpServer::add_websocket_route()` (`86d777e`) | [M-NET-01-05](tasks/M-NET-01-05.md) | VERIFIED | Standalone `Net;System;Crypto;TestingMock;Testing` `44/44 ✔` (`1.31s`), `ctest` `2/2` (`10.96s` incl. `NetOnly`); Debug TSan `940 ✔ / 3 ⊘` (`24.15s`, `0` races); full RelWithDebInfo `1,466 ✔ / 4 ⊘` (`23.56s`, `ctest` `2/2` `91.13s`, `38` consumers); ASan+UBSan `1,466 ✔` (`41.95s`, `0` leaks/UB) |
| M-TESTINGMOCK-01..04 | Explicit `MockSession` (`kTestingMockErrorDomain = 27`, `freeze(SingleThread\|ConcurrentActions)`, `verify_and_close()`, `MockLimits`, `RegistrationToken`), `Sequence` order groups, action-outside-lock reservation (same-thread reentry + concurrent actions), perfect forwarding + `returns_once`/`invokes_once` move-only support, `never()`/`at_least`/`at_most`/`between`, matcher combinators (`Ne`, `EndsWith`, `IsNull`, `NotNull`, `NotOf`, `AllOf`, `AnyOf`, depth bound 32), `TestingMockOnly` consumer (`658c21a`) | [M-TESTINGMOCK-01-04](tasks/M-TESTINGMOCK-01-04.md) | VERIFIED | Standalone `TestingMock*` 18/18 ✔ + `ctest` `TestingMockOnly`; Debug TSan `940 ✔ / 3 ⊘` (`24.15s`, `0` races); full RelWithDebInfo `1,466 ✔` (`38` consumers); ASan+UBSan `1,466 ✔` (`0` leaks/UB) |
| M-SHORTURL-01..04 | Frozen `V1` ABI preserved + additive `Void::ShortUrl::V2` (`kShortUrlErrorDomain = 28`, URL/key validation, base62 rejection-sampled keys, civil expiry, tombstone non-reuse, 24h idempotency, `LocalProvider`, `V1Adapter`), separate `ShortUrlStorage` (`Void::Storage` conditional batches + `SecurityRandomBytesPort`), separate `ShortUrlRemote` (capability pre-checks, `Retry-After`, `UnknownOutcome`), `ShortUrlOnly` consumer (`691808e`) | [M-SHORTURL-01-04](tasks/M-SHORTURL-01-04.md) | VERIFIED | Standalone `ShortUrl;ShortUrlStorage;ShortUrlRemote;RPC;System;Testing` `ShortUrl*` 5/5 ✔, `ctest` `2/2` (`36.84s` incl. `ShortUrlOnly`); Debug TSan `940 ✔ / 3 ⊘` (`24.15s`, `0` races); full RelWithDebInfo `1,466 ✔` (`38` consumers); ASan+UBSan `1,466 ✔` (`0` leaks/UB) |
| S-RPC-01..03 | NEW `Void::RPC` subsystem (`kRpcErrorDomain = 29`), Wire v1 big-endian binary envelope codec (`VRPC`, fail-closed on unknown major/required flags/reserved/overflow, skippable minor extensions, `Binary::Reader` `std::memcpy` fix), unary `/void-rpc/v1/call` HTTP/1.1 `Server` & `Client` with `AuthHook`, schema negotiation, timeout clamping, sanitized handler exceptions, `Registration::unregister_and_drain()`, `RpcOnly` consumer (`5184d1c`) | [S-RPC-01-03](tasks/S-RPC-01-03.md) | VERIFIED | Standalone `Rpc` 2/2 ✔, `ctest` `2/2` (`36.84s` incl. `RpcOnly`); Debug TSan `940 ✔ / 3 ⊘` (`24.15s`, `0` races); full RelWithDebInfo `1,466 ✔` (`38` consumers); ASan+UBSan `1,466 ✔` (`0` leaks/UB) |
## Wave 10 — P3 Core Subsystems: Discovery, Scheduler, Messaging (`feat/roadmap-p3-wave10`)
| ID | Deliverable | Spec | State | Verification summary |
| --- | --- | --- | --- | --- |
| S-DISCOVERY-01..04 | NEW `Void::Discovery` (`kDiscoveryErrorDomain = 30`, pure `Catalog`, atomic `replace_static()`, provider generation resets, local RAII `Registration` + steady-clock leases & zero-TTL rejection, `ManagedLeaseRenewer`, bounded `WatchHandle` with coalesced `ResyncRequired` + self-cancel + `SelfJoin`, `WeightedRoundRobinSelector`, HRW `AffinitySelector`) + separate `Void::DiscoveryRpc` (identity-preserving TLS refresh; `RPC` remains Discovery-free), `DiscoveryOnly` consumer (`ec8c0bd`) | [S-DISCOVERY-01-04](tasks/S-DISCOVERY-01-04.md) | VERIFIED | Standalone `Discovery;DiscoveryRpc;Testing` `5/5 ✔` (`9.4ms`), `ctest` `2/2` (`11.26s` incl. `DiscoveryOnly` `_no_external_deps` & `RpcOnly`); Debug TSan `900 ✔ / 3 ⊘` (`23.20s`, `0` races); full RelWithDebInfo `1,480 ✔ / 4 ⊘` (`41` consumers); ASan+UBSan `1,480 ✔` (`0` leaks/UB) |
| S-SCHEDULER-01..04 | NEW `Void::Scheduler` (`kSchedulerErrorDomain = 31`, monotonic min-heap, one-shot/fixed-delay/fixed-rate, 5-field `CalendarExpression`, explicit `TimezoneRegistry` DST gap/fold & unknown-zone rejection, O(1) `CoalesceLatest` over >2.6M missed minutes, 100/pass `CatchUpBounded`, overlap policies, retries/dead-letter, revision invalidation watermark, `close_and_join`) + durable `Void::SchedulerStorage` (`StorageJobStore` exclusive owner lock, unique civil-slot dedup, crash `Running -> Pending` recovery preserving `OccurrenceId`, `UnknownOutcome`, retention-cap pause), `SchedulerOnly` consumer (`aaeab50`) | [S-SCHEDULER-01-04](tasks/S-SCHEDULER-01-04.md) | VERIFIED | Standalone `Scheduler;SchedulerStorage;System;Testing` `5/5 ✔` (`167.3ms`), `ctest` `2/2` (`30.06s` incl. `SchedulerOnly` `_no_external_deps`); Debug TSan `900 ✔ / 3 ⊘` (`23.20s`, `0` races); full RelWithDebInfo `1,480 ✔` (`41` consumers); ASan+UBSan `1,480 ✔` (`0` leaks/UB) |
| S-MESSAGING-01..04 | NEW `Void::Messaging` (`kMessagingErrorDomain = 32`, explicit `PublishDurability`, nondurable `InMemoryQueue`, `Pending -> InFlight(gen, visibility) -> Acked \| Pending \| DeadLetter`, competing/`SingleActive` groups, stale-receipt fencing, idempotent ack, retries/DLQ, corrupt quarantine) + `Void::MessagingStorage` (`StorageQueue` durable batches, restart generation bump preserving attempts, atomic DLQ move & `stuck_dlq_count`, bounded 24h/100k idempotency, `BlockAtQuota` & clock-health pause, `OutboxInbox` single-batch local helper) + `Void::MessagingRpc` (`RpcQueueServer`/`RpcQueueClient`), `MessagingOnly` consumer (`60ee28e`) | [S-MESSAGING-01-04](tasks/S-MESSAGING-01-04.md) | VERIFIED | Standalone `Messaging;MessagingStorage;MessagingRpc;System;Testing` `4/4 ✔` (`217.4ms`), `ctest` `2/2` (`31.73s` incl. `MessagingOnly` `_no_external_deps` & `RpcOnly`); Debug TSan `900 ✔ / 3 ⊘` (`23.20s`, `0` races); full RelWithDebInfo `1,480 ✔` (`41` consumers); ASan+UBSan `1,480 ✔` (`0` leaks/UB) |
All workers share the checkout and have disjoint file ownership defined in their
persisted task specifications. Root owns all cross-cutting files and resolves contract
changes. No worker owns application code, build files, existing docs/short-url.md, or Git
operations. Configured roles use XHigh; runtime model identity is not independently
verified by the available spawn response.
+306
View File
@@ -0,0 +1,306 @@
# Verification record
Repository baseline: `main`, `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
Date: 2026-11-24. Cwd for repository commands: `/home/faumaray/Projects/VoidLibrary`.
## Discovery baseline, before document authoring
| Check | Outcome |
| --- | --- |
| Git root/branch/HEAD/status | Correct repository and baseline; tracked tree clean; unrelated untracked files preserved |
| Serena manual/project | Manual read; active VoidLibrary project confirmed |
| Code graph identity/freshness/coverage | Exact repository project verified; cited paths checked; flagged ranges read directly; graph remains best-effort evidence |
| Configure fresh full build | Passed with existing cached Boost source path |
| Build with warnings-as-errors | Failed in Boost 1.84 headers due to GCC 16/C++26 deprecation diagnostics |
| Ordinary full build | Passed, exit 0 |
| CTest | Exit 8: VoidTests 1,245 passed, 2 failed, 3 skipped; installed consumers passed |
| Two process-test failures | Explicit absent `/bin/echo` and `/bin/cat` paths; exit 127 matches inspected exec failure path |
| Tracked diff after discovery | Empty |
Exact build/test commands and environmental prerequisites are in
[VALIDATION.md](../roadmap/VALIDATION.md). Results were observed during the same
conversation before authoring; they are not new-feature verification.
## Planning and delegation evidence
- T-DISC-001: architecture planner returned source-backed dependencies and opportunities;
no file edits or tests by that worker.
- T-DISC-002: researcher returned primary-source guidance for I/O, durability, consensus,
and TLS; no runtime evidence claimed.
- T-PLAN-003: fresh reviewer returned READY for the authoring contract. P3 wording about
future examples/commands was corrected before execution.
- Persisted T-DOC-101 through T-DOC-104 specifications passed the supplied task linter.
Structural lint is not semantic approval; root reviewed ownership/contracts separately.
- T-DOC-104's configured Sol model reported capacity exhaustion. The user approved the
configured Astra implementer/XHigh fallback; the revised specification passed lint.
- Model roles/efforts are configured; the spawn response does not independently attest
the actual executing model identity.
## Documentation verification
Status: COMPLETE. Both independent review slices are READY after all four P2 findings
were corrected and rechecked. Complete-package documentation checks pass. This verdict
applies to planning quality, not implementation or release readiness.
| Authored packet | Worker-reported scoped checks | Integration status |
| --- | --- | --- |
| T-DOC-101 | 11 files, 70 unique planned tasks; source links, placeholders, fences/whitespace and scoped diff checks passed; 122 source/test/build paths received coverage checks and flagged ranges were read | Review A READY after focused corrections |
| T-DOC-102 | 11 files, 59 planned tasks; source links, task DAG, status/fences/whitespace and scoped diff checks passed; 76 cited source paths checked with partial ranges read | Review B READY after focused corrections |
| T-DOC-103 | 12 files, 73 planned tasks; source links, task DAG, placeholders/fences/whitespace and scoped diff checks passed; 38 source/document paths checked | Review B READY |
| T-DOC-104 | 10 files, 66 planned tasks; 155 local links, whitespace/fences/placeholders and scoped diff checks passed; 106 scoped source paths checked and 13 partially parsed files read directly | Review B READY after focused corrections |
Root's read-only `/tmp/void-roadmap-check.py` currently checks expected coverage against
the actual src module inventory, relative files/headings, task definitions/references and
explicit dependency cycles, and required content signals. Partial runs at 45 and 47 of
54 documents, followed by 51 and 53 of 54, reported only links/files still being authored;
they were not final passes. Direct whitespace/fence/final-newline checks passed for the
53 present roadmap documents, workflow Markdown and README. Graph coverage for those 53
roadmap paths reported no recorded issue with matching metadata; source evidence still
received separate exact-path coverage and direct reads. Root additionally checked 42
source anchors in packet104, reading all five partial files' reported ranges.
The script reads documentation only and does not change repository state. Its heuristic
task graph does not replace semantic review of named cross-area gates.
`git diff --check` passed, and the scoped implementation/build/existing ShortUrl-document
diff was empty. New untracked Markdown also requires direct checker/worker inspection;
tracked Git diff alone does not cover it.
Root integration identified two ownership/wording issues: Storage checksum helpers belong
to Storage rather than an undeclared Binary feature; replication recovery must follow the
durably published CURRENT/generation pointer, never select an uncommitted newer manifest.
These corrections are subject to the integrated review, not claims of runtime behavior.
Independent review A inspected the ten shared documents and eleven foundation plans and
reported one P2 dependency contradiction. The root map allowed Algorithms to import
Containers while the detailed plans required Containers→Algorithms; Math's vague container
prerequisite could also close that cycle. Root split the map, prohibited those reverse
imports, and made Algorithms' scalar arithmetic prerequisite explicitly M-MATH-02.
ARCHITECTURE, DEPENDENCIES, Math and Algorithms now state the same direction. Review A
rechecked the affected contracts and marked the original finding resolved.
Root also reconciled the finished Update plan with C-07 and Data's baseline wording.
Direct inspection of Feed.cpp confirmed general Json use and schema-3 readable-document
comparison before signature verification. The shared/Data plans now label verification-
before-payload-parsing as future hardening and preserve legacy parsing separately from
StrictJson. Coverage was checked for Feed.cpp/Feed.hpp and their flagged ranges were read.
Review A independently verified these corrections against source and returned READY for
its original 21-document slice, with no remaining actionable findings. Its final checker
run passed at 54/54 files, 878 local links and 300 task definitions. Review B subsequently
completed the remaining 33-area review and the root finalized integrated records/checks.
## Review B corrections
Review B inspected the remaining 33 plans and shared interfaces, returning three P2
planning findings. Root corrected each boundary; focused independent recheck returned
READY with every original finding resolved and no new actionable defect.
1. Async's first-stop-wins wording conflicted with Storage/Update committed outcomes.
C-03 and Async now separate stop intent, domain-result classification and single
delivery. IO preserves late successful/failed sync evidence rather than replacing it
with timeout. Storage and fake-adapter acceptance cases cover stop before append,
pending sync, success after stop and failure after stop.
2. Runtime stopped execution resources before exporter flushing. Shutdown now separates
business work from bounded cleanup/export scopes, joins exporters before their IO and
workers stop, and retains those resources after an expired flush/shutdown budget.
Runtime and the NetworkedApplications plan include the timed-out in-flight-export case.
3. Storage's first durability milestone lacked its required manifest implementation.
S-STORAGE-03 now owns minimal CURRENT/manifest bootstrap, WAL-segment publication and
creation/rotation crash tests; S-STORAGE-04 extends it with tables/checkpoints. The
filesystem fault harness is required from the first durability milestone.
These are document corrections, not implemented C++ repairs or observed runtime failures.
After all corrections, the root documentation checker passed again: 54/54 documents,
75,163 words, 878 local links and 300 planned task definitions. The amended review-B task
specification passed structural lint, and `git diff --check` passed.
Review B independently repeated the checker and affected-document/source-scope checks,
confirmed the unchanged baseline and empty application/build diff, and accepted the
previously reviewed 33-plan slice. Both review agents have been closed.
## Complete-package root checks
Root ran `python3 -B /tmp/void-roadmap-check.py` after all documents existed: PASS,
54/54 files, 74,290 words, 878 local links, 300 planned feature task definitions.
Coverage is 26 existing public modules, 15 new subsystems, three platforms and ten shared
documents. `git diff --check` passed. All six persisted author/review task specifications
passed `python3 -B /home/faumaray/.codex/astra-workflow/tools/tasklint.py` (structure only).
The scoped diff over include/, src/, tests/, CMake/build/CI files and existing ShortUrl
documentation was empty. These results precede review B's final disposition; affected
checks will be repeated only if review corrections require it.
After the last author returned DONE, root's direct whitespace/fence/final-newline audit
covered all 65 changed/new Markdown files (roadmap, workflow/specifications and README):
zero issues. Git again reported branch main and the unchanged baseline HEAD; the scoped
implementation diff remained empty. No staging, commit, push or deployment occurred.
All 54 roadmap paths received matching-metadata coverage checks. Packet104's final source
anchor count is 49; the additional Json/Feed flagged ranges were read directly. Matching
metadata does not prove graph completeness: the existing verifyEnvelope source function
was not returned by the scoped symbol query, so its implementation was inspected directly.
## Unrun checks and limits
No C++ source or build-system modification is part of this delivery. Application tests
are not rerun solely for Markdown authoring. Sanitizers, fuzzing, benchmarks, alternative
platforms, NEW APIs, native storage and distributed scenarios remain unrun/planned.
Written designs and proposed commands do not establish implementation or release readiness.
## Wave 1 / P0 Implementation Verification (2026-11-24)
Branch: `feat/roadmap-p0-p1-foundations`. Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Task | Command & scope | Observed outcome |
| --- | --- | --- |
| X-BASE-01 | `/tmp/void-p0-base/tests/VoidTests --filter "Process*"` and full `/tmp/void-p0-base/tests/VoidTests` | `Process`+`ProcessStream` 13/13 passed; full `VoidTests` 1,249 passed, 3 intentional skips, 0 failed (`340acae`) |
| X-BASE-02 | Full RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` build & `VoidTests` in `/tmp/void-p0-werror` | Exit 0 (all 691 Ninja targets clean); `VoidTests` 1,249 passed, 3 skipped, 0 failed (`e385746`) |
| X-BASE-03 | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium -c ctest --test-dir /tmp/void-p0-closures --output-on-failure --timeout 120` | 2/2 passed: `VoidTests` + `VoidInstalledComponentConsumers` (`Binary`, `Foundation`, `Audited`, `External`, `RelocatedFoundation`, `RelocatedExternal`) (`cd6fc7e`) |
| X-BASE-03 | Minimal (`Time;Math;Text;Binary;Functional;FunctionalCoreFormatting;Testing`), `System;Testing`, `tests/package/Embedded`, static (`BUILD_SHARED_LIBS=OFF`) | All 4 passed; `System` without `Log` installs `include/Void/Log/Log.hpp` and passes `Process*` |
| X-BASE-04 | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium -c bash -lc 'ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-p0-asan/tests/VoidTests'` | 1,249 passed, 3 skipped, 0 failed, 0 ASan/UBSan/LSan errors (`c64fa93`) |
| X-BASE-04 | `dev cpp-gcc -c /tmp/void-p0-tsan/tests/VoidTests` (`Async;Time;Core;Functional;Testing`, Debug, `-DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`) | Capabilities: `reflection=yes, expected=yes, sanitizers=TSan`; 389 passed, 2 skipped, 0 failed, 0 TSan races |
| X-BASE-05 | `dev cpp-gcc -c /tmp/void-p0-bench/benchmarks/VoidFoundationBench --json /tmp/void-p0-bench/baseline.json` (RelWithDebInfo, `-DVOID_WARNINGS_AS_ERRORS=ON`, 5 warmup, 20 reps, 10k ops/rep) | Exit 0; JSON schema_version 1 validated. Key baselines: `harness_empty_loop` 0.38ns, `core_uuid_parse_hyphenated` 88.76ns, `core_uuid_to_string` 498.11ns, `data_json_parse_small_object` 295.46ns |
## Wave 2 / P1 Foundations Gate 1 Verification (2026-11-24)
Branch: `feat/roadmap-p0-p1-foundations`. Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| M-CORE-02..03 (`cbc9004`) | `Core` standalone + `CoreOnly` installed consumer (`tests/package/CoreOnly`) | `ctest --test-dir /tmp/void-p1-core` 2/2 passed; `Core`-only install contains no `include/Void/Math` and links cleanly |
| Scanner fix (`284d963`) | `/tmp/void-p1-scanner-check/tests/VoidTests --filter "^(Sources\|Watch\|Json\|Pattern)\."` | 52/52 passed (`Sources` 7, `Watch` 3, `Json` 30, `Pattern` 12) |
| M-FUNCTIONAL-02 (`7f3395c`) | `/tmp/void-p1-functional/tests/VoidTests --filter "ErrorStatus*\|Result*"` & `ctest` | 21/21 passed; `ctest` 2/2 passed |
| M-TIME-02 (`4227348`) | `/tmp/void-p1-time/tests/VoidTests --filter "Clock*\|Stopwatch*\|Time*\|Bench*"` & `ctest` | 48/48 passed; `ctest` 2/2 passed |
| S-MEMORY-02..04 (`4d48f2a`) | `Memory;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`) & isolated `-DVOID_ENABLED_MODULES=Memory` consumer `/tmp/void-p1-memory-only-consumer/void_memory_only_consumer` | `VoidTests --filter "Budget*\|Arena*\|BlockPool*"` 8/8 (`Arena` 3, `BlockPool` 2, `BudgetResource` 3); `ctest` 2/2; `void_memory_only_consumer` exit 0 |
| M-MATH-02 (`91e2beb`, `6cac781`) | Debug `Math;Testing` `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-p1-math/tests/VoidTests --filter "Numeric*"` & `ctest` | `Numeric` 35/35 passed; `ctest` 2/2 passed |
| Full Integrated RelWithDebInfo (`6cac781`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `/tmp/void-p1-full/tests/VoidTests`, `ctest --test-dir /tmp/void-p1-full --output-on-failure --timeout 180` | `VoidTests`: 1,310 tests — 1,307 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (3.72s); `ctest`: 2/2 passed (`VoidTests` 3.81s + `VoidInstalledComponentConsumers` 11.95s, total 15.75s) |
| Full Integrated ASan+UBSan (`6cac781`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-p1-asan/tests/VoidTests` | 1,310 tests — 1,307 passed, 3 skipped, 0 failed (10.70s), 0 leaks, 0 UB |
| Post-P1 Benchmark (`6cac781`) | `/tmp/void-p1-full/benchmarks/VoidFoundationBench --json /tmp/void-p1-full/post-p1.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.20ns, `core_uuid_parse_hyphenated` 25.26ns, `core_uuid_to_string` 16.73ns, `core_hash_fnv1a64_256b` 183.64ns, `core_hash_murmur3_256b` 68.66ns, `functional_result_ok_chain` 1.14ns, `functional_error_with_context` 59.07ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.51ns, `containers_lru_get_put` 22.29ns, `binary_reader_u64_be` 1.32ns, `data_json_parse_small_object` 290.64ns, `data_json_serialize_small_object` 174.92ns |
## Wave 3 / P1 Text, Containers, Binary, Data Verification (2026-11-24)
Branch: `feat/roadmap-p0-p1-foundations`. Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| M-TEXT-02 (`883bbdc`) | `dev cpp-gcc -c` RelWithDebInfo `Text;Testing` `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-p1-text/tests/VoidTests --filter "Str*\|Bounded*"` & `ctest` | 50/50 passed (`Str` 25, `Bounded` 2, plus active dependencies); `ctest` 2/2 passed |
| M-CONTAINERS-02..03 (`9ac76bb`) | `Containers;Testing` RelWithDebInfo `-Werror` `/tmp/void-p1-containers` & Debug TSan `/tmp/void-p1-containers-tsan` | RelWithDebInfo `Pool*\|BufferPool*\|Ring*` 38/38 & `ctest` 2/2 passed; Debug TSan `Ring*` 15/15 passed (0 races) |
| M-BINARY-02..03 (`eacb8a4`) | `Binary;Testing` RelWithDebInfo `-Werror` `/tmp/void-p1-binary` & `ctest` | `Reader*\|Writer*\|ByteBuffer*` 7/7 passed (`Reader` 4, `Writer` 2, `ByteBuffer` 1); `ctest` 2/2 passed (including expanded `Binary` & `RelocatedBinary` consumers) |
| M-DATA-02 (`692f5ba`) | `dev cpp-gcc -p openssl` RelWithDebInfo `Data;Update;Configuration;Testing` `-Werror` `/tmp/void-p1-data/tests/VoidTests` | Filtered `Json*\|StrictJson*\|Reflect*\|Update*\|Config*` 119/119 passed; full active suite 804 tests: 802 passed, 2 skipped, 0 failed |
| Full Integrated RelWithDebInfo (`692f5ba`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `/tmp/void-w3-full/tests/VoidTests`, `ctest --test-dir /tmp/void-w3-full --output-on-failure --timeout 180` | `VoidTests`: 1,332 tests — 1,329 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (3.83s); `ctest`: 2/2 passed (`VoidTests` 3.81s + `VoidInstalledComponentConsumers` 12.38s, total 16.20s) |
| Full Integrated ASan+UBSan (`692f5ba`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-w3-asan/tests/VoidTests` | 1,332 tests — 1,329 passed, 3 skipped, 0 failed (10.83s), 0 leaks, 0 UB |
| Wave 3 TSan Subset (`692f5ba`) | `dev cpp-gcc -c` Debug (`Containers;Async;Time;Testing`, `-DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `/tmp/void-w3-tsan/tests/VoidTests --filter "Ring*\|Pool*\|BufferPool*\|Clock*\|Stopwatch*"` | 67/67 passed (69.8ms), 0 TSan races (`ThreadPool` 7, `ThreadPoolBackpressure` 2, `BufferPoolTests` 8, `Pool` 13, `Ring` 15, `BlockPool` 2, `Clock` 6, `Stopwatch` 14) |
| Post-W3 Benchmark (`692f5ba`) | `/tmp/void-w3-full/benchmarks/VoidFoundationBench --json /tmp/void-w3-full/post-w3.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.39ns, `core_uuid_parse_hyphenated` 24.94ns, `core_uuid_to_string` 16.88ns, `core_hash_fnv1a64_256b` 181.90ns, `core_hash_murmur3_256b` 68.26ns, `functional_result_ok_chain` 1.13ns, `functional_error_with_context` 58.86ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.85ns, `containers_lru_get_put` 20.59ns, `binary_reader_u64_be` 1.31ns, `data_json_parse_small_object` 325.73ns, `data_json_serialize_small_object` 164.76ns |
## Wave 4A / P1 Algorithms, Unicode, Async Verification (2026-11-24)
Branch: `feat/roadmap-p1-wave4a` (branched from `main` at `5754a7f`). Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| S-ALGORITHMS-02 (`bfd6246`) | `Algorithms;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w4a-alg` (`VoidTests --filter "Graph*"` & `ctest`) | `Graph` 4/4 passed (64.2ms); `ctest` 2/2 passed (`VoidTests` 0.17s, `VoidInstalledComponentConsumers` including `AlgorithmsOnly` 2.55s) |
| S-UNICODE-01..02 (`4369fde`) | `Unicode;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w4a-unicode` (`VoidTests --filter "Utf*"` & `ctest`) | `Utf` 4/4 passed (0.3ms); `ctest` 2/2 passed (`VoidTests` 0.11s, `VoidInstalledComponentConsumers` including `UnicodeOnly` 2.25s) |
| M-ASYNC-02..03 (`c75056f`) | `Async;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w4a-async` & Debug TSan `/tmp/void-w4a-async-tsan` | RelWithDebInfo `OperationScope*\|Executor*\|Coro*` 28/28 (4.1ms) & `ctest` 2/2 (2.74s); Debug TSan `OperationScope*\|Executor*\|ThreadPool*` 20/20 passed (34.6ms, 0 races) |
| Full Integrated RelWithDebInfo (`c75056f`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `/tmp/void-w4a-full/tests/VoidTests`, `ctest --test-dir /tmp/void-w4a-full --output-on-failure --timeout 180` | 31 active modules; `VoidTests`: 1,345 tests — 1,342 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (3.75s); `ctest`: 2/2 passed (`VoidTests` 3.77s + `VoidInstalledComponentConsumers` 14.45s, total 18.21s) |
| Full Integrated ASan+UBSan (`c75056f`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-w4a-asan/tests/VoidTests` | 1,345 tests — 1,342 passed, 3 skipped, 0 failed (11.00s), 0 leaks, 0 UB |
| Post-W4A Benchmark (`c75056f`) | `/tmp/void-w4a-full/benchmarks/VoidFoundationBench --json /tmp/void-w4a-full/post-w4a.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.39ns, `core_uuid_parse_hyphenated` 25.48ns, `core_uuid_to_string` 17.09ns, `core_hash_fnv1a64_256b` 185.25ns, `core_hash_murmur3_256b` 69.37ns, `functional_result_ok_chain` 1.15ns, `functional_error_with_context` 59.77ns, `math_checked_add_loop` 0.48ns, `containers_spsc_ring_push_pop` 9.16ns, `containers_lru_get_put` 21.81ns, `binary_reader_u64_be` 1.36ns, `data_json_parse_small_object` 319.83ns, `data_json_serialize_small_object` 168.13ns |
## Wave 4B / P1 IO, Runtime, Testing Verification (2026-11-24)
Branch: `feat/roadmap-p1-wave4b` (branched from `main` at `2e5d1ef`). Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| S-IO-01..02 (`673bb7e`) | `IO` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w4b-io` (`VoidTests --filter "IoDriver*"`, `ctest`) & Debug TSan `/tmp/void-w4b-io-tsan` | `IoDriver` 4/4 passed (7.5ms); `ctest` 2/2 passed (`VoidTests` 1.50s, `VoidInstalledComponentConsumers` including `IOOnly` 6.08s); Debug TSan `IoDriver` 4/4 passed (12.8ms, 0 races) |
| S-RUNTIME-01 (`1b3331e`) | `Runtime` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w4b-runtime` (`VoidTests --filter "RuntimeHost*"`, `ctest`, 11 modules) | `RuntimeHost` 3/3 passed (0.5ms); `ctest` 2/2 passed (`VoidTests` 1.54s, `VoidInstalledComponentConsumers` including `RuntimeOnly` 8.01s) |
| M-TESTING-02..03 (`de8a981`) | `Core;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w4b-testing` (`VoidTests --filter "FrameworkHardening*\|Deterministic*\|Math*\|ContainerFixture*\|StructRepr*"`, `ctest`) | 16 tests: 14 passed, 2 intentional skips (`broken_feature`, `unquoted_skip`), 0 failed (301.1ms); `ctest` 2/2 passed (2.82s) |
| Full Integrated RelWithDebInfo (`de8a981`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`/tmp/void-w4b-full`, `-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `VoidTests`, `ctest` | 33 active modules; `VoidTests`: 1,359 tests — 1,356 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (5.08s); `ctest`: 2/2 passed (`VoidTests` 4.50s + `VoidInstalledComponentConsumers` 19.77s, total 24.27s) |
| Full Integrated ASan+UBSan (`de8a981`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`/tmp/void-w4b-asan`, `-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-w4b-asan/tests/VoidTests` | 33 active modules; `VoidTests`: 1,359 tests — 1,356 passed, 3 skipped, 0 failed (14.87s), 0 leaks, 0 UB |
| Wave 4B TSan Subset (`de8a981`) | `dev cpp-gcc -c` Debug (`IO;Async;Containers;Time;Testing`, `/tmp/void-w4b-tsan`, `-DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `/tmp/void-w4b-tsan/tests/VoidTests --filter "Io*\|OperationScope*\|Executor*\|Ring*\|Pool*\|Clock*"` | 9 active modules; 80/80 passed (60.7ms), 0 TSan data races |
| Post-W4B Benchmark (`de8a981`, `rev=de8a981893d8`) | `VoidFoundationBench` in `/tmp/void-w4b-full` (`post-w4b.json`) | Medians: `harness_empty_loop` 0.39ns, `core_uuid_parse_hyphenated` 25.28ns, `core_uuid_to_string` 16.94ns, `core_hash_fnv1a64_256b` 184.30ns, `core_hash_murmur3_256b` 69.63ns, `functional_result_ok_chain` 1.16ns, `functional_error_with_context` 60.17ns, `math_checked_add_loop` 0.48ns, `containers_spsc_ring_push_pop` 9.06ns, `containers_lru_get_put` 21.30ns, `binary_reader_u64_be` 1.35ns, `data_json_parse_small_object` 316.78ns, `data_json_serialize_small_object` 168.16ns |
## Wave 5 / P2 Operations Foundations Verification (2026-11-24)
Branch: `feat/roadmap-p2-wave5` (branched from `main` at `1e901ce`, which was pushed to `origin/main`). Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| S-OBSERVABILITY-01..04 (`fe99051`) | `Observability;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w5-obs` (`VoidTests --filter "Observability*"`, `ctest`) | `Observability` 4/4 passed (12.1ms); `ctest` 2/2 passed (`VoidTests` 0.41s, `VoidInstalledComponentConsumers` including `ObservabilityHooksOnly` & `ObservabilityOnly` 6.62s, total 7.03s) |
| M-RESILIENCE-01..04 (`18a623a`) | `Resilience;Testing` (`/tmp/void-w5-resilience`) & `ResilienceAsync;Testing` (`/tmp/void-w5-resilience-async`) RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` | `Resilience` `CircuitBreaker*\|RateLimiter*\|KeyedRateLimiter*\|ResourceMonitor*\|ResilienceHardening*` 21/21 (2.8ms) & `ctest` 2/2 (`5.99s` including `ResilienceOnly`); `ResilienceAsync` `AsyncPolicy*\|ResilienceHardening*` 6/6 (1.3ms) |
| M-LOG-01..05 (`a74a402`) | `Log;Testing` (`/tmp/void-w5-log`, 10 modules) & `LogConfig;Testing` (`/tmp/void-w5-logconfig`, 13 modules) RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` | `Log;Testing` `VoidTests`: 726 tests — 724 passed, 2 intentional skips (`broken_feature`, `unquoted_skip`), 0 failed (799.2ms) & `ctest` 2/2 (8.09s including `LogOnly` 7.15s); `LogConfig;Testing` `LogHardening*\|FromConfig*` 12/12 (28.9ms) |
| M-STACKTRACE-01..04 & CMake fix (`3d8dfb0`, `7b57b35`) | `Stacktrace;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` (`/tmp/void-w5-stacktrace`, 6 active modules, Boost cached) | `Stacktrace*` 4/4 passed (374.2ms); `Log` not required thanks to `VOID_ACTIVE_PUBLIC_HEADERS` mapping |
| Full Integrated RelWithDebInfo (`7b57b35`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`/tmp/void-w5-full`, 37 modules, `-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `/tmp/void-w5-full/tests/VoidTests`, `ctest --test-dir /tmp/void-w5-full --output-on-failure --timeout 180` | `VoidTests`: 1,378 tests — 1,375 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (7.49s); `ctest`: 2/2 passed (`VoidTests` 8.09s + `VoidInstalledComponentConsumers` all 16 consumers 66.12s, total 74.22s) |
| Full Integrated ASan+UBSan (`7b57b35`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`/tmp/void-w5-asan`, 37 modules, `-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-w5-asan/tests/VoidTests` | Initial run hit 1 timing assertion in unrelated existing `internal_fsm_service_hot_reload_under_load` (`FsmServiceHotReload.cpp:119`, 0 leaks/UB); full re-run on same binary passed 1,378 tests — 1,375 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (50.16s), 0 ASan/LSan leaks, 0 UBSan errors |
| Wave 5 TSan Subset (`7b57b35`) | `dev cpp-gcc -c` Debug (`Observability;ResilienceAsync;Log;IO;Async;Time;Testing`, `/tmp/void-w5-tsan`, 15 modules, `-DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `/tmp/void-w5-tsan/tests/VoidTests --filter "Observability*\|ResilienceHardening*\|AsyncPolicy*\|Log*\|AsyncLogger*\|LogScopeSnapshot*\|Io*\|OperationScope*"` | 68/68 passed (7.01s, including `AsyncLogger::async_multi_producer_no_loss` 6.53s, `Observability` 4/4, `ResilienceHardening` 4/4, `AsyncPolicy` 2/2, `Log` 12/12, `LogHardening` 4/4, `LogScopeSnapshot` 3/3, `IoDriver` 4/4, `OperationScope` 5/5), 0 TSan data races |
| Post-W5 Benchmark (`7b57b35`, `rev=7b57b355cd75`) | `/tmp/void-w5-full/benchmarks/VoidFoundationBench --json /tmp/void-w5-full/post-w5.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.75ns, `core_uuid_parse_hyphenated` 43.49ns, `core_uuid_to_string` 32.51ns, `core_hash_fnv1a64_256b` 213.37ns, `core_hash_murmur3_256b` 92.34ns, `functional_result_ok_chain` 1.65ns, `functional_error_with_context` 94.82ns, `math_checked_add_loop` 0.86ns, `containers_spsc_ring_push_pop` 10.76ns, `containers_lru_get_put` 31.99ns, `binary_reader_u64_be` 2.24ns, `data_json_parse_small_object` 576.81ns, `data_json_serialize_small_object` 284.87ns |
## Wave 6A / P2 System, SystemAsync, IPC Verification (2026-11-24)
Branch: `feat/roadmap-p2-wave6a` (branched from `main` at `4479960`, which was pushed to `origin/main`). Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| M-SYSTEM-01..05 (`3f67b1e`, `fcdbc06`) | `System;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w6a-system` (`VoidTests --filter "System*"`, `ctest`) | `System*` 53/53 passed (226.6ms); `ctest` 2/2 passed (`VoidTests` 0.57s, `VoidInstalledComponentConsumers` including `SystemOnly` 3.95s) |
| M-SYSTEM-06 (`9a3c5d8`) | `SystemAsync;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w6a-sysasync` (`VoidTests --filter "SystemAsync*"`, `ctest`) | `SystemAsync*` 2/2 passed (211.5ms); `ctest` 2/2 passed (`VoidTests` 1.15s, `VoidInstalledComponentConsumers` including `SystemAsyncOnly` 9.43s) |
| S-IPC-01..03 (`39a48d5`) | `IPC;Testing` RelWithDebInfo `-DVOID_WARNINGS_AS_ERRORS=ON` `/tmp/void-w6a-ipc` (`VoidTests --filter "Ipc*"`, `ctest`) | `Ipc*` 3/3 passed (8.8ms); `ctest` 2/2 passed (`VoidTests` 0.49s, `VoidInstalledComponentConsumers` including `IPCOnly` 12.20s, total 12.70s) |
| Full Integrated RelWithDebInfo (`39a48d5`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`/tmp/void-w6a-full`, 39 modules, `-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `/tmp/void-w6a-full/tests/VoidTests`, `ctest --test-dir /tmp/void-w6a-full --output-on-failure --timeout 300` | `VoidTests`: 1,386 tests — 1,383 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (4.68s); `ctest`: 2/2 passed (`VoidTests` 4.58s + `VoidInstalledComponentConsumers` 31.05s across 19 consumer runs incl. `SystemOnly`, `SystemAsyncOnly`, `IPCOnly`, `RelocatedFoundation`, `RelocatedExternal`, total 35.63s) |
| Full Integrated ASan+UBSan (`39a48d5`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`/tmp/void-w6a-asan`, 39 modules, `-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `/tmp/void-w6a-asan/tests/VoidTests` | 1,386 tests — 1,383 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (19.34s), 0 ASan/LSan leaks, 0 UBSan errors |
| Wave 6A TSan Subset (`39a48d5`) | `dev cpp-gcc -c` Debug (`SystemAsync;IPC;IO;Async;Resilience;Testing`, `/tmp/void-w6a-tsan`, 14 modules, `-DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `/tmp/void-w6a-tsan/tests/VoidTests --filter "Process*\|SystemHardening*\|SystemAsync*\|Ipc*\|FileWatcher*\|IoDriver*\|OperationScope*"` | 35/35 passed (609.4ms: `OperationScope` 5, `IoDriver` 4, `Ipc` 3, `FileWatcher` 5, `Process` 10, `ProcessStream` 3, `SystemHardening` 3, `SystemAsync` 2), 0 TSan data races |
| Post-W6A Benchmark (`39a48d5`, `rev=39a48d5c0a72`) | `/tmp/void-w6a-full/benchmarks/VoidFoundationBench --json /tmp/void-w6a-full/post-w6a.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.38ns, `core_uuid_parse_hyphenated` 24.92ns, `core_uuid_to_string` 17.45ns, `core_hash_fnv1a64_256b` 181.41ns, `core_hash_murmur3_256b` 67.93ns, `functional_result_ok_chain` 1.13ns, `functional_error_with_context` 58.77ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.80ns, `containers_lru_get_put` 20.61ns, `binary_reader_u64_be` 1.31ns, `data_json_parse_small_object` 311.16ns, `data_json_serialize_small_object` 162.52ns |
## StrictJson RFC 8259 Decimal Verification (2026-11-25)
Branch: `main` (`acd77ee`, pushed to `origin/main`). Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| StrictJson decimals (`acd77ee`) | RelWithDebInfo `-Werror` Data suite & `ctest`, plus Debug ASan+UBSan `-Werror` (`/tmp/void-strictjson-asan`) | RelWithDebInfo: `49/49` (`StrictJson` 6/6), `ctest` 2/2 passed; Debug ASan+UBSan: `49/49` (7.0ms), 0 leaks, 0 UB |
## Wave 6B / P2 Crypto, Security, Archive, Update Verification (2026-11-25)
Branch: `feat/roadmap-p2-wave6b` (branched from `main` at `acd77ee`). Toolchain via `dev cpp-gcc`: GCC 16.2.0, CMake 4.4.4, Ninja 1.13.2, OpenSSL 3.5.9, libsodium 1.0.22, libarchive 3.8.10, SQLite 3.54.0.
| Scope | Command & configuration | Observed outcome |
| --- | --- | --- |
| M-CRYPTO-01..05 (`8a1c15f`, `eb42228`) | `Crypto;CryptoAsync;Testing` RelWithDebInfo `-Werror` `-p openssl` `/tmp/void-w6b-crypto` (10 modules, `VoidTests`, `ctest`) | `CryptoHardening` 3 + `CryptoAsync` 2 (+ `Crypto` 3) passed; `ctest` 2/2 passed (`7.22s`, incl. `CryptoOnly` & `CryptoAsyncOnly`) |
| M-SECURITY-01..04 (`713d2dc`) | `Security;SecurityAsync;Testing` RelWithDebInfo `-Werror` `-p libsodium` `/tmp/void-w6b-security` (10 modules, `VoidTests`, `ctest`) | `Security*\|security_*` 14/14 passed (`720.7ms`: `SecurityTests` 8, `SecurityHardening` 4, `SecurityAsync` 2); `ctest` 2/2 passed (`8.46s`, incl. `SecurityOnly` & `SecurityAsyncOnly`) |
| M-ARCHIVE-01..05 (`00d7478`) | `Archive;Testing` RelWithDebInfo `-Werror` `-p libarchive` `/tmp/void-w6b-archive` (7 modules, `VoidTests`, `ctest`) | `Archive*\|archive_*` 9/9 passed (`259.0ms`: `Archive` 6, `ArchiveHardening` 3); `ctest` 2/2 passed (`5.76s`, incl. `ArchiveOnly`) |
| M-UPDATE-01..06 (`47736cb`) | `Update;Testing` RelWithDebInfo `-Werror` `-p libarchive -p openssl` `/tmp/void-w6b-update` (12 modules, `VoidTests`, `ctest`) | `Update*\|update_*\|component_feed_*\|readable_component_*\|version_store_*` 25/25 passed (`1.91s`: `Update` 22, `UpdateHardening` 3); `ctest` 2/2 passed (`10.64s`, incl. `UpdateOnly`) |
| Full Integrated RelWithDebInfo (`47736cb`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` full build (`/tmp/void-w6b-full`, 41 modules, `-DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_BENCHMARKS=ON`), `/tmp/void-w6b-full/tests/VoidTests`, `ctest --test-dir /tmp/void-w6b-full --output-on-failure --timeout 300` | `VoidTests`: 1,406 tests — 1,403 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (`6.26s`); `ctest`: 2/2 passed (`VoidTests` 7.34s + `VoidInstalledComponentConsumers` 40.73s across 25 consumer runs incl. `CryptoOnly`, `CryptoAsyncOnly`, `SecurityOnly`, `SecurityAsyncOnly`, `ArchiveOnly`, `UpdateOnly`, `RelocatedFoundation`, `RelocatedExternal`, total `48.07s`) |
| Full Integrated ASan+UBSan (`47736cb`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug (`/tmp/void-w6b-asan`, 41 modules, `-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-w6b-asan/tests/VoidTests` | `VoidTests`: 1,406 tests — 1,403 passed, 3 intentional skips (`plugin_load_and_query_skipped`, `broken_feature`, `unquoted_skip`), 0 failed (`21.78s`), 0 ASan/LSan leaks, 0 UBSan errors |
| Wave 6B TSan Subset (`47736cb`) | `dev cpp-gcc -p libarchive -p openssl -p libsodium` Debug (`CryptoAsync;SecurityAsync;Update;Testing`, `/tmp/void-w6b-tsan`, 20 modules, `-DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON`), `/tmp/void-w6b-tsan/tests/VoidTests --filter "Crypto*\|crypto_*\|Security*\|security_*\|Archive*\|archive_*\|Update*\|update_*\|component_feed_*\|readable_component_*\|version_store_*"` | 56/56 passed (`4.86s`: `Archive` 6, `ArchiveHardening` 3, `Crypto` 3, `CryptoHardening` 3, `CryptoAsync` 2, `SecurityTests` 8, `SecurityHardening` 4, `SecurityAsync` 2, `Update` 22, `UpdateHardening` 3), 0 TSan data races |
| Post-W6B Benchmark (`47736cb`, `rev=47736cb6ce2f`) | `/tmp/void-w6b-full/benchmarks/VoidFoundationBench --json /tmp/void-w6b-full/post-w6b.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.38ns, `core_uuid_parse_hyphenated` 24.52ns, `core_uuid_to_string` 16.53ns, `core_hash_fnv1a64_256b` 179.95ns, `core_hash_murmur3_256b` 67.37ns, `functional_result_ok_chain` 1.12ns, `functional_error_with_context` 58.37ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.76ns, `containers_lru_get_put` 21.02ns, `binary_reader_u64_be` 1.31ns, `data_json_parse_small_object` 333.32ns, `data_json_serialize_small_object` 165.99ns |
| Wave 7 `Sqlite` & `SqliteAsync` standalone (`84e6fe8`) | `dev cpp-gcc -p sqlite` RelWithDebInfo (`-Werror`, `/tmp/void-w7-sqlite`), 8 modules, `VoidTests --filter 'Sqlite*\|...'` + `ctest` | **PASSED**: `SqliteTests` 8 + `SqliteHardening` 4 + `SqliteAsync` 2 = 14/14 in `426.5ms`; `ctest` 2/2 in `5.11s` (`VoidTests` 0.87s, `VoidInstalledComponentConsumers` including `SqliteOnly` & `SqliteAsyncOnly` 4.23s) |
| Wave 7 `Storage` standalone (`fdf0da5`, `G-STORE`) | `dev cpp-gcc` zero `-p` external deps RelWithDebInfo (`-Werror`, `/tmp/void-w7-storage`), 10 modules, `VoidTests --filter '^storage_'` + `ctest` | **PASSED**: `Storage` 5/5 in `14.53s`; `ctest` 2/2 in `24.07s` (`StorageOnly` verified with Boost/LibArchive/OpenSSL/PkgConfig/SQLite3/Threads disabled) |
| Wave 7 TSan (`84e6fe8`) | `dev cpp-gcc -p sqlite` Debug TSan (`-Werror`, `/tmp/void-w7-tsan`, `TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1`), 12 modules (`SqliteAsync;Storage;Testing`) | **PASSED**: 19/19 in `15.38s` (`SqliteTests` 8, `SqliteHardening` 4, `SqliteAsync` 2, `Storage` 5), exit 0, 0 TSan data races / lock-order warnings |
| Wave 7 integrated RelWithDebInfo + consumers (`84e6fe8`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` RelWithDebInfo (`-Werror`, `/tmp/void-w7-full`), 43 modules, `VoidTests` + `ctest` | **PASSED**: `1,417` discovered (`1,414 ✔`, `3 ⊘` skipped, `0 ✘`) in `21.06s`; `ctest` 2/2 in `65.05s` (`VoidTests` 20.95s, all 28 installed consumers 44.10s) |
| Wave 7 full Debug ASan+UBSan (`84e6fe8`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug ASan+UBSan (`-Werror`, `/tmp/void-w7-asan`, `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1`, `UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1`), 43 modules | **PASSED**: `1,417` discovered (`1,414 ✔`, `3 ⊘` skipped, `0 ✘`) in `36.47s`, 0 leaks, 0 UB |
| Post-W7 Benchmark (`84e6fe8`, `VOID_GIT_REV=fdf0da5ca883`) | `/tmp/void-w7-full/benchmarks/VoidFoundationBench --json /tmp/void-w7-full/post-w7.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.40ns, `core_uuid_parse_hyphenated` 25.06ns, `core_uuid_to_string` 16.69ns, `core_hash_fnv1a64_256b` 181.03ns, `core_hash_murmur3_256b` 67.90ns, `functional_result_ok_chain` 1.13ns, `functional_error_with_context` 58.24ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.80ns, `containers_lru_get_put` 20.62ns, `binary_reader_u64_be` 1.31ns, `data_json_parse_small_object` 310.70ns, `data_json_serialize_small_object` 160.98ns |
| Wave 8 `Service` & `ServicePlugin` standalone (`1474a69`) | `dev cpp-gcc` RelWithDebInfo (`-Werror`, `/tmp/void-w8-service`, `Service;ServicePlugin;Testing`), `VoidTests` + `ctest` | **PASSED**: `18/18` in `0.4ms`; `ctest` `2/2` in `7.47s` (`ServiceOnly` & `ServicePluginOnly` consumers) |
| Wave 8 `Plugin` standalone (`a24e086`) | `dev cpp-gcc` RelWithDebInfo (`-Werror`, `/tmp/void-w8-plugin`, `Plugin;ServicePlugin;Testing`), 9 pure-C11 `-Werror` fixtures + `VoidTests` + `ctest` | **PASSED**: `33 tests` (`32 ✔`, `1 ⊘` `plugin_load_and_query_skipped`, `0 ✘`) in `194.5ms`; `ctest` `2/2` in `9.45s` (`PluginOnly` consumer) |
| Wave 8 `Configuration` & `ConfigurationAsync` standalone (`1dc51d5`) | `dev cpp-gcc` RelWithDebInfo (`-Werror`, `/tmp/void-w8-config`, `ConfigurationAsync;Testing`), `VoidTests --filter 'Configuration'` + `ctest` | **PASSED**: `ConfigurationHardening` 3/3 + `ConfigurationAsync` 3/3 = `6/6` in `0.7ms`; `ctest` `2/2` in `13.75s` (`ConfigurationOnly` & `ConfigurationAsyncOnly` consumers) |
| Wave 8 `Fsm` standalone (`ef5312c`) | `dev cpp-gcc` RelWithDebInfo (`-Werror`, `/tmp/void-w8-fsm`, `Fsm;Testing`), `VoidTests` + `ctest` | **PASSED**: `816 tests` (`814 ✔`, `2 ⊘`, `0 ✘`) in `789.1ms`; `ctest` `2/2` in `9.59s` (`FsmOnly` consumer) |
| Wave 8 TSan (`cb988fa`) | `dev cpp-gcc` Debug TSan (`-Werror`, `/tmp/void-w8-tsan`, `TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1`), 20 modules (`ServicePlugin;ConfigurationAsync;Fsm;Testing`), `VoidTests` | **PASSED**: `1,110 tests` (`1,107 ✔`, `3 ⊘` skipped, `0 ✘`) in `11.49s` (incl. `ServiceHardening` 5/5, `PluginHardening` 5/5, `Configuration*` 6/6, `FsmHardening` 4/4, `internal_FsmServiceHotReload` 4/4), exit `0`, `0` TSan warnings |
| Wave 8 integrated RelWithDebInfo + consumers (`cb988fa`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` RelWithDebInfo (`-Werror`, `/tmp/void-w8-full`), 45 modules, `VoidTests` + `ctest` | **PASSED**: `1,437` discovered (`1,434 ✔`, `3 ⊘` skipped, `0 ✘`) in `20.99s`; `ctest` `2/2` in `77.11s` (`VoidTests` `20.97s`, all `34` installed consumers `56.13s`) |
| Wave 8 full Debug ASan+UBSan (`cb988fa`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug ASan+UBSan (`-Werror`, `/tmp/void-w8-asan`, `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1`, `UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1`), 45 modules | **PASSED**: `1,437` discovered (`1,434 ✔`, `3 ⊘` skipped, `0 ✘`) in `37.13s`, `0` leaks, `0` UB |
| Post-W8 Benchmark (`cb988fa`, `rev=cb988fa98509`) | `/tmp/void-w8-full/benchmarks/VoidFoundationBench --json /tmp/void-w8-full/post-w8.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.38ns, `core_uuid_parse_hyphenated` 24.71ns, `core_uuid_to_string` 16.45ns, `core_hash_fnv1a64_256b` 179.94ns, `core_hash_murmur3_256b` 67.31ns, `functional_result_ok_chain` 1.12ns, `functional_error_with_context` 57.98ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.72ns, `containers_lru_get_put` 20.58ns, `binary_reader_u64_be` 1.30ns, `data_json_parse_small_object` 319.62ns, `data_json_serialize_small_object` 167.55ns |
| Batch A `VL-002`/`008`/`009`/`012`/`013` (`adfc854`) | `dev cpp-gcc -c` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-a`, `Data;Text;Testing`) + pure `g++` zero-CMake multi-file stem collision binary (`tests/package/TestingNativeGxx/{dir_a,dir_b}/dup.cpp`) | **PASSED**: `VoidTests` `690 tests` (`687 ✔`, `3 ⊘`, `0 ✘`) in `351.9ms`; pure `g++` `4/4` (`0.1ms`), `--list`, `--filter from_dir_b` `1/1` |
| Batch B `VL-001`/`003`/`010`/`011` (`b50131f`) | `dev cpp-gcc -c` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-b`, FetchContent SQLite3 amalgamation), `VoidTests` + `ctest` | **PASSED**: `VoidTests` `791 tests` (`788 ✔`, `3 ⊘`, `0 ✘`) in `1.72s`; `ctest` `2/2` in `14.44s` (`VoidTests` `1.76s`, `VoidInstalledComponentConsumers` `12.68s` incl. `SystemOnly`, `ConfigurationOnly`, `SqliteOnly`) |
| Batch C zero-OpenSSL `VL-007` (`22c8538`) | `dev cpp-gcc -c` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-no-openssl`, `-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=TRUE`, `Crypto;System;Text;Testing`) | **PASSED**: `VoidTests` `537 tests` (`534 ✔`, `3 ⊘`, `0 ✘`) in `1.09s`; `ctest` `2/2` in `5.59s` incl. `CryptoOnly` |
| Batch C zero-LibArchive `VL-006` (`22c8538`) | `dev cpp-gcc -c` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-no-libarchive`, `-DCMAKE_DISABLE_FIND_PACKAGE_LibArchive=TRUE`, `Archive;Testing`) | **PASSED**: `VoidTests` `408 tests` (`405 ✔`, `3 ⊘`, `0 ✘`) in `1.45s`; `ctest` `2/2` in `6.22s` incl. `ArchiveOnly` |
| Batch C full backends `VL-006`/`007` (`22c8538`) | `dev cpp-gcc -p libarchive -p openssl -c` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-c`, `Crypto;CryptoAsync;Archive;Update;Testing`) | **PASSED**: `VoidTests` `891 tests` (`888 ✔`, `3 ⊘`, `0 ✘`) in `3.70s`; `ctest` `2/2` in `15.53s` incl. `CryptoOnly`, `CryptoAsyncOnly`, `ArchiveOnly`, `UpdateOnly`, `Audited` |
| Batch D `VL-004`/`005` (`66baae7`) | `dev cpp-gcc -p openssl -c` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-d`, `Net;System;Crypto;Testing`) | **PASSED**: `VoidTests` `566 tests` (`563 ✔`, `3 ⊘`, `0 ✘`) in `2.36s`; `ctest` `2/2` in `8.48s` (`VoidTests` `2.39s`, `VoidInstalledComponentConsumers` `6.09s` incl. `NetOnly`) |
| Integrated RelWithDebInfo + consumers (`66baae7`, `9920bfd`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` RelWithDebInfo (`-Werror`, `/tmp/void-vbs-full`), 45 modules, `VoidTests` + `ctest` | **PASSED**: `1,456` discovered (`1,452 ✔`, `4 ⊘`, `0 ✘`) in `21.94s`; `ctest` `2/2` in `82.82s` (`VoidTests` `22.03s`, `VoidInstalledComponentConsumers` `60.79s` across all `35` consumers incl. `NetOnly`); post-`9920bfd` rebuild `VoidTests` `1,456` (`1,452 ✔`, `4 ⊘`) in `22.09s` |
| Full Debug ASan+UBSan (`66baae7`, `9920bfd`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug ASan+UBSan (`-Werror`, `/tmp/void-vbs-asan`, `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1`, `UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1`), 45 modules | **PASSED**: `1,456` discovered (`1,452 ✔`, `4 ⊘`, `0 ✘`) in `39.11s`, `0` leaks, `0` UB; post-`9920bfd` incremental `--filter 'Http\|Net\|Server'` `9/9 ✔` in `1.58s` |
| Debug TSan (`9920bfd`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug TSan (`-Werror`, `/tmp/void-vbs-tsan`, `TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1`), 17 modules (`Net;System;SystemAsync;Configuration;Crypto;Archive;Data;Text;Testing`) | **PASSED**: `957` discovered (`954 ✔`, `3 ⊘`, `0 ✘`) in `10.65s`, `0` data races, `0` lock-order warnings |
| Post-VBS Benchmark (`66baae7`, `rev=66baae74a0b7`) | `/tmp/void-vbs-full/benchmarks/VoidFoundationBench --json /tmp/void-vbs-full/post-vbs.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.40ns, `core_uuid_parse_hyphenated` 26.35ns, `core_uuid_to_string` 18.33ns, `core_hash_fnv1a64_256b` 185.86ns, `core_hash_murmur3_256b` 69.58ns, `functional_result_ok_chain` 1.16ns, `functional_error_with_context` 59.59ns, `math_checked_add_loop` 0.48ns, `containers_spsc_ring_push_pop` 8.97ns, `containers_lru_get_put` 21.17ns, `binary_reader_u64_be` 1.34ns, `data_json_parse_small_object` 316.05ns, `data_json_serialize_small_object` 174.83ns |
| Wave 9 `Net` & `TestingMock` standalone (`86d777e`, `658c21a`) | `dev cpp-gcc -p openssl -c` RelWithDebInfo (`-Werror`, `/tmp/void-w9-net`, `Net;System;Crypto;TestingMock;Testing`), filtered `VoidTests` + `ctest` | **PASSED**: `44/44 ✔` in `1.31s` (`NetHardening` 5/5, `SessionHardening` 4/4, all legacy Net/TestingMock suites); `ctest` `2/2` in `10.96s` (`VoidTests` `2.46s`, `VoidInstalledComponentConsumers` `8.50s` incl. `NetOnly` & `TestingMockOnly`) |
| Wave 9 `ShortUrl` & `RPC` standalone (`691808e`, `5184d1c`) | `dev cpp-gcc -p openssl -p libsodium -c` RelWithDebInfo (`-Werror`, `/tmp/void-w9-shorturl-rpc`, `ShortUrl;ShortUrlStorage;ShortUrlRemote;RPC;System;Testing`), filtered `VoidTests` + `ctest` | **PASSED**: `7/7 ✔` in `1.20s` (`Rpc` 2/2, `ShortUrl` 2/2, `ShortUrlV2` 1/1, `StorageRepository` 1/1, `RemoteProvider` 1/1); `ctest` `2/2` in `36.84s` (`VoidTests` `17.31s`, `VoidInstalledComponentConsumers` `19.54s` incl. `ShortUrlOnly` & `RpcOnly`) |
| Wave 9 integrated RelWithDebInfo + consumers (`5184d1c`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` RelWithDebInfo (`-Werror`, `/tmp/void-w9-full`), 48 modules, `VoidTests` + `ctest` | **PASSED**: `1,470` discovered (`1,466 ✔`, `4 ⊘`, `0 ✘`) in `23.56s`; `ctest` `2/2` in `91.13s` (`VoidTests` `23.27s`, `VoidInstalledComponentConsumers` `67.86s` across all `38` consumers incl. `NetOnly`, `TestingMockOnly`, `ShortUrlOnly`, `RpcOnly`) |
| Wave 9 full Debug ASan+UBSan (`5184d1c`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug ASan+UBSan (`-Werror`, `/tmp/void-w9-asan`, `ASAN_OPTIONS=detect_leaks=1:halt_on_error=1`, `UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1`), 48 modules | **PASSED**: `1,470` discovered (`1,466 ✔`, `4 ⊘`, `0 ✘`) in `41.95s`, `0` leaks, `0` UB |
| Wave 9 Debug TSan (`5184d1c`) | `dev cpp-gcc -p openssl -p libsodium` Debug TSan (`-Werror`, `/tmp/void-w9-tsan`, `TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1`), 22 modules (`Net;TestingMock;ShortUrl;ShortUrlStorage;ShortUrlRemote;RPC;System;Testing`) | **PASSED**: `943` discovered (`940 ✔`, `3 ⊘`, `0 ✘`) in `24.15s`, `0` data races, `0` lock-order warnings |
| Post-W9 Benchmark (`5184d1c`, `rev=5184d1cf8cdd`) | `/tmp/void-w9-full/benchmarks/VoidFoundationBench --json /tmp/void-w9-full/post-w9.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.49ns, `core_uuid_parse_hyphenated` 25.02ns, `core_uuid_to_string` 16.55ns, `core_hash_fnv1a64_256b` 183.63ns, `core_hash_murmur3_256b` 69.12ns, `functional_result_ok_chain` 1.15ns, `functional_error_with_context` 59.06ns, `math_checked_add_loop` 0.48ns, `containers_spsc_ring_push_pop` 8.93ns, `containers_lru_get_put` 21.47ns, `binary_reader_u64_be` 1.15ns, `data_json_parse_small_object` 297.72ns, `data_json_serialize_small_object` 172.85ns |
| Wave 10 `Discovery` & `DiscoveryRpc` standalone (`ec8c0bd`) | `dev cpp-gcc -p openssl -c` RelWithDebInfo (`-Werror`, `/tmp/void-w10-m1`, `Discovery;DiscoveryRpc;Testing`), filtered `VoidTests` + `ctest` | **PASSED**: `5/5 ✔` in `9.4ms` (`Catalog` 4/4, `EndpointAdapter` 1/1); `ctest` `2/2` in `11.26s` (`VoidTests` `0.60s`, `VoidInstalledComponentConsumers` `10.66s` incl. `DiscoveryOnly` `_no_external_deps` & `RpcOnly`) |
| Wave 10 `Scheduler` & `SchedulerStorage` standalone (`aaeab50`) | `dev cpp-gcc -c` zero external deps RelWithDebInfo (`-Werror`, `/tmp/void-w10-m2`, `Scheduler;SchedulerStorage;System;Testing`), filtered `VoidTests` + `ctest` | **PASSED**: `5/5 ✔` in `167.3ms` (`Scheduler` 3/3, `StorageJobStore` 2/2); `ctest` `2/2` in `30.06s` (`VoidTests` `16.51s`, `VoidInstalledComponentConsumers` `13.54s` incl. `SchedulerOnly` `_no_external_deps`) |
| Wave 10 `Messaging`, `MessagingStorage`, & `MessagingRpc` standalone (`60ee28e`) | `dev cpp-gcc -p openssl -c` RelWithDebInfo (`-Werror`, `/tmp/void-w10-m3`, `Messaging;MessagingStorage;MessagingRpc;System;Testing`), filtered `VoidTests` + `ctest` | **PASSED**: `4/4 ✔` in `217.4ms` (`Messaging` 1/1, `StorageQueue` 2/2, `RpcAdapter` 1/1); `ctest` `2/2` in `31.73s` (`VoidTests` `16.09s`, `VoidInstalledComponentConsumers` `15.63s` incl. `MessagingOnly` `_no_external_deps` & `RpcOnly`) |
| Wave 10 integrated RelWithDebInfo + consumers (`60ee28e`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` RelWithDebInfo (`-Werror`, `/tmp/void-w10-full`), 55 modules, `VoidTests` + `ctest` | **PASSED**: `1,484` discovered (`1,480 ✔`, `4 ⊘`, `0 ✘`) in `23.80s`; `ctest` `2/2` in `94.93s` (`VoidTests` `23.93s`, `VoidInstalledComponentConsumers` `71.00s` across all `41` consumers incl. `DiscoveryOnly`, `SchedulerOnly`, `MessagingOnly`) |
| Wave 10 full Debug ASan+UBSan (`60ee28e`) | `dev cpp-gcc -p libarchive -p openssl -p sqlite -p libsodium` Debug ASan+UBSan (`-Werror`, `/tmp/void-w10-asan`), 55 modules | **PASSED**: `1,484` discovered (`1,480 ✔`, `4 ⊘`, `0 ✘`) in `42.48s`, `0` leaks, `0` UB |
| Wave 10 Debug TSan (`60ee28e`) | `dev cpp-gcc -p openssl` Debug TSan (`-Werror`, `/tmp/void-w10-tsan`), 23 modules (`Discovery;DiscoveryRpc;Scheduler;SchedulerStorage;Messaging;MessagingStorage;MessagingRpc;System;Testing`) | **PASSED**: `903` discovered (`900 ✔`, `3 ⊘`, `0 ✘`) in `23.20s`, `0` data races, `0` lock-order warnings |
| Post-W10 Benchmark (`60ee28e`, `rev=60ee28e4ca9b`) | `/tmp/void-w10-full/benchmarks/VoidFoundationBench --json /tmp/void-w10-full/post-w10.json` (RelWithDebInfo, warmup=5, reps=20, ops=10000) | Medians: `harness_empty_loop` 0.39ns, `core_uuid_parse_hyphenated` 25.18ns, `core_uuid_to_string` 16.66ns, `core_hash_fnv1a64_256b` 182.46ns, `core_hash_murmur3_256b` 68.53ns, `functional_result_ok_chain` 1.14ns, `functional_error_with_context` 59.10ns, `math_checked_add_loop` 0.47ns, `containers_spsc_ring_push_pop` 8.85ns, `containers_lru_get_put` 20.87ns, `binary_reader_u64_be` 1.14ns, `data_json_parse_small_object` 287.18ns, `data_json_serialize_small_object` 164.76ns |
@@ -0,0 +1,26 @@
# Archive Streaming Reader, Atomic Staged Publication, Reproducible Creation & Child Isolation
Task ID: M-ARCHIVE-01..05
Phase: P2 (Wave 6B)
Status: APPROVED
Contracts: C-02, C-03, C-04, C-05, C-06, C-07
## 1. Context and baseline
`Void::Archive` preserves the existing incremental `extract(path, destination, ExtractionOptions)` API and anti-traversal/symlink-swap/size-limit tests while adding typed error reporting (`kArchiveErrorDomain = 17`), bounded streaming `Reader` (`open_reader`, `next_entry`, `read_chunk`, `skip_entry`, normal/forensic `list_entries`), atomic staged extraction and no-replace directory publication (`StagedTree`, `extract_staged`, `publish`, `cleanup_stale_staging`), reproducible tar/tar.zstd creation (`create_archive`), and hardened child-process isolated extraction (`extract_staged_isolated`, `run_isolated_worker_main`).
## 2. Deliverables
- `src/Archive/module.cmake` (`INTERNAL_DEPS Functional Time System`, `EXTERNAL_DEPS LibArchive::LibArchive`).
- `include/Void/Archive/Types.hpp`: `kArchiveErrorDomain = 17`, `ArchiveErrorCode`, `make_archive_error`, `ReadLimits` (10,000 entries, 512 MiB file, 2 GiB total, 1 GiB compressed, 8 MiB metadata, 64 KiB transfer chunk, 4 KiB path, 255B component, 64 components), `EntryInfo`, `ProgressEvent`, `PublicationOutcome`, `PublicationReceipt`, `CreationOptions`, `IsolationOptions` (128 MiB RSS, 60s timeout), `ByteSource`/`ByteSink` + span/vector/file adapters.
- `include/Void/Archive/Archive.hpp`, `src/Archive/Archive.cpp`, `src/Archive/StagedArchive.cpp`: preserve `extract()`; add `Reader`, `list_entries` (normal + opt-in forensic), `StagedTree`, `extract_staged` (exclusive `0700` dir, `O_NOFOLLOW`, `0644`/`0755`, bottom-up dir `fsync`, completion inventory, no-follow cleanup), `publish` via Linux `renameat2(..., RENAME_NOREPLACE)` (`unsupported_capability` on `ENOSYS`/`EINVAL`, `PublicationOutcome::Unknown` on post-rename parent `fsync` failure), `cleanup_stale_staging`, reproducible `create_archive`, and `extract_staged_isolated` / `run_isolated_worker_main` via `Void::Process::spawn` (ASan-safe rlimits + parent verification of staged inventory).
- `tests/helpers/ArchiveWorker.cpp` wired as `VoidArchiveWorker` in `tests/CMakeLists.txt`, `tests/standalone/Archive/ArchiveHardening.cpp`, `tests/package/ArchiveOnly/*`, registered in `tests/package/InstalledComponents.cmake`.
## 3. Edge cases
- `skip_entry` still decodes and accounts for actual decompressed bytes against per-entry and total limits.
- File-as-parent path conflicts (e.g. file `a` followed by `a/b`, or `a/b` followed by file `a`) and non-zero/zero invalid limits are rejected cleanly.
- Diagnostics cap path rendering at 4 KiB and escape control characters / attacker newlines.
- Post-rename parent `fsync` failure reports `PublicationOutcome::Unknown` without falsely claiming rollback; pre-publish failure cleans only the owned staging descriptor and preserves primary error + staging id if cleanup fails.
- Under `__SANITIZE_ADDRESS__`, child worker avoids fatal `RLIMIT_AS` and enforces `RLIMIT_CPU`/`RLIMIT_FSIZE`/`RLIMIT_NOFILE` + `/proc/self/statm` RSS enforcement.
## 4. Verification commands
```sh
dev cpp-gcc -p libarchive -c bash -lc 'cmake -S . -B /tmp/void-w6b-archive -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Archive;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6b-archive && /tmp/void-w6b-archive/tests/VoidTests --filter "Archive*|archive_*" && ctest --test-dir /tmp/void-w6b-archive --output-on-failure --timeout 120'
```
@@ -0,0 +1,38 @@
# Async OperationState, ResumeTicket, TaskScope, and Bounded Executor Lanes
Task ID: M-ASYNC-02, M-ASYNC-03
Phase: P1
Status: APPROVED
Contracts: C-01, C-04, C-06, C-07
## 1. Context and baseline
`src/Async/module.cmake` currently depends only on `LogState`, while `include/Void/Async/Executor.hpp` provides only void-returning `post()`, `ManualExecutor`, `schedule_on`, and fire-and-forget `spawn()`. Async lacks structured admission control, race-free backend completion vs cancellation settlement, completion-lane backpressure bypass, and structured `TaskScope` join/cancellation/exception ownership.
## 2. Deliverables
- Updated `src/Async/module.cmake` declaring `INTERNAL_DEPS Functional Time LogState`.
- New `include/Void/Async/Operation.hpp`: `OperationOptions`, `AdmissionError`, `AsyncErrorCode` (`kAsyncErrorDomain`), `make_async_error`, `DomainOutcomeKind`, `ResumeTicket`, and `OperationState` managing combined `std::stop_source`, atomic `backend_refs`, single-winner CAS terminal state, and post-backend-release continuation resumption outside locks.
- Upgraded `include/Void/Async/Executor.hpp`: keeps 1.x `post`/`ManualExecutor`/`schedule_on`/`spawn` working while adding `try_post`, `post_completion` (reserved completion lane), `is_executor_thread()`, bounded `ManualExecutor` queue capacity, and cancellable clock-aware `schedule_on(executor, options, clock)`.
- New `include/Void/Async/TaskScope.hpp`: `TaskScopeOptions`, `JoinHandle`, reserve-then-transfer `TaskScope::spawn` (preserving `Task<void>` on admission failure), `request_stop`, `co_await join()`, `join_blocking()` with `self_join` detection, `join_pumping`, and `DetachedOwner`.
- Tests in `tests/standalone/Async/OperationScope.cpp`.
## 3. Exact files and interfaces
- `src/Async/module.cmake`
- `include/Void/Async/Operation.hpp`
- `include/Void/Async/Executor.hpp`
- `include/Void/Async/TaskScope.hpp`
- `tests/standalone/Async/OperationScope.cpp`
## 4. Edge cases
- Failed `TaskScope::spawn` (full or stopped) does not consume or destroy caller's `Coro::Task<void>`.
- Concurrent backend commit vs `std::stop_token` firing resolves to exactly one terminal outcome, releases backend references before resuming continuation outside locks, and supports synchronous completion without double-resume.
- Reserved `post_completion` succeeds even when normal submission queue capacity is saturated.
- `join_blocking()` called from the associated executor thread detects `self_join` rather than deadlocking.
- Concurrent cancellation/completion/join stress passes cleanly under Debug TSan and ASan/UBSan.
## 5. Acceptance criteria
- `OperationScope*`, `Executor*`, `Coro*`, and `ThreadPool*` tests pass under RelWithDebInfo `-Werror`, ASan+UBSan, and Debug TSan (`-DVOID_ENABLE_TSAN=ON`).
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4a-async -G Ninja -DVOID_ENABLED_MODULES="Async;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4a-async && /tmp/void-w4a-async/tests/VoidTests --filter "OperationScope*|Executor*|Coro*" && ctest --test-dir /tmp/void-w4a-async --output-on-failure --timeout 60'
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4a-async-tsan -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Async;Testing" -DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4a-async-tsan && /tmp/void-w4a-async-tsan/tests/VoidTests --filter "OperationScope*|Executor*|ThreadPool*"'
```
@@ -0,0 +1,35 @@
# Binary Writer, Owning ByteBuffer, DecodeBudget, and Endian Codecs
Task ID: M-BINARY-02, M-BINARY-03
Phase: P1
Status: APPROVED
Contracts: C-01, C-02, C-04, C-07
## 1. Context and baseline
`include/Void/Binary/Reader.hpp` provides non-owning bounds-checked reading with native-endian defaults, while Binary lacks `Writer`, `ByteBuffer`, cumulative decode budgets, transaction/rollback helpers, strict bool/IEEE float codecs, and `kBinaryErrorDomain` codes.
## 2. Deliverables
- `src/Binary/module.cmake` updated to `INTERNAL_DEPS Functional Memory`; `tests/package/InstalledComponents.cmake` updated to pass `Memory Core` for `Binary`/`Foundation` component checks.
- New `include/Void/Binary/Budget.hpp`: `BinaryErrorCode`, `make_error`, `DecodeLimits`, `DecodeBudget` (overflow-safe cumulative field bytes and RAII `DepthGuard`).
- Extended `include/Void/Binary/Reader.hpp`: `kBinaryErrorDomain` codes, pre-consume endian check, `readLittle`/`readBig`, strict `readBool`, explicit `readF32`/`readF64` (IEEE binary32/64, no default endian), `checkpoint`/`rollback`/`Transaction`, `readBytesChecked`/`subreaderChecked`.
- New `include/Void/Binary/Writer.hpp`: non-owning mutable `Writer` with pre-write capacity checks, overlapping `memmove`-safe `writeBytes`, explicit-endian `write`/`writeLittle`/`writeBig`/`writeBool`/`writeF32`/`writeF64`/`writeString`, and `checkpoint`/`rollbackPosition`.
- New `include/Void/Binary/ByteBuffer.hpp`: PMR-backed bounded `ByteBuffer` (`max_bytes`, `0` ceiling for empty-only, self-aliasing `append`, `std::bad_alloc` -> `allocation_failed`, preserves committed bytes on failure) and zero-copy `FrozenBytes` via `freeze()`.
- Tests in `tests/standalone/Binary/{Reader,Writer,ByteBuffer}.cpp` and expanded `tests/package/Binary/main.cpp`.
## 3. Exact files and interfaces
- `src/Binary/module.cmake`, `tests/package/InstalledComponents.cmake`, `tests/package/Binary/main.cpp`
- `include/Void/Binary/{Budget,Reader,Writer,ByteBuffer}.hpp`
- `tests/standalone/Binary/{Reader,Writer,ByteBuffer}.cpp`
## 4. Edge cases
- Truncated or unsupported-endian operations leave cursor position and destination buffer untouched.
- `readBool` accepts only `0x00`/`0x01` without consuming invalid bytes; IEEE float width/IEC-559 checked via `static_assert`.
- Shared cumulative `DecodeBudget` enforces total bytes and depth across nested `subreaderChecked`.
- `ByteBuffer` with `BudgetResource` preserves previously written data on ceiling or OOM failure; `freeze()` preserves underlying pointer with zero copy.
## 5. Acceptance criteria
- `Reader*`, `Writer*`, `ByteBuffer*`, and `VoidInstalledComponentConsumers` pass under `-DVOID_WARNINGS_AS_ERRORS=ON`.
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-p1-binary -G Ninja -DVOID_ENABLED_MODULES="Binary;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-p1-binary && /tmp/void-p1-binary/tests/VoidTests --filter "Reader*|Writer*|ByteBuffer*" && ctest --test-dir /tmp/void-p1-binary --output-on-failure --timeout 60'
```
@@ -0,0 +1,21 @@
# M-CONFIGURATION-01..05 — Bounded Schemas, Provenance Redaction & Transactional Async Reload
- **Wave**: Wave 8 (`feat/roadmap-p2-wave8`, branched from `main` at `d83d0f4`)
- **Roadmap reference**: `docs/roadmap/modules/Configuration.md`, `docs/roadmap/DEPENDENCIES.md`
## Scope & Ownership
- `src/Configuration/module.cmake`: `INTERNAL_DEPS Core Functional System Data Time LogState`, `EXCLUDE_HEADERS Void/Configuration/ReloadController.hpp`.
- `src/ConfigurationAsync/module.cmake`: `INTERNAL_DEPS Configuration SystemAsync Async Time Functional LogState`, `EXTRA_HEADERS Void/Configuration/ReloadController.hpp`.
- `include/Void/Configuration/Bind.hpp`: non-breaking field annotations `Secret{}`, `RestartRequired{}`, `Deprecated{}`, `IntRange{}`, `RealRange{}` while keeping `bind<T>` intact.
- `include/Void/Configuration/Schema.hpp` + `src/Configuration/Schema.cpp`:
- `kConfigurationErrorDomain = 24`, `ConfigErrorCode`, `ConfigLimits` (1 MiB/source, 8 sources, 4 MiB merged, 10,000 keys, 4 KiB key, 64 KiB scalar, depth 32, 1,024 vector items, 100 diagnostics, 64 participants, 4 retained generations, 128 notifications, 5s prepare timeout).
- `SourceKind`, `SourceId`, `SourceLocation`, `ValueState` (`Missing`, `Empty`, `Null`, `Present`, `Removed`), `KeyProvenance`, `Provenance`, `SourceSpec`, `SourceSet`, `MergedConfig`.
- `load_sources(...)`: deterministic precedence (defaults < files in order < allowlisted/prefixed env < explicit CLI), rejects literal-dot vs nested JSON collisions, enforces byte/key/depth/vector caps, redacts secrets in diagnostics.
- `Schema<T>`, `validate<T>(...)` (rejects unknown keys by default, rejects vector gaps, no malformed-to-default fallback, cross-field constraints, up to 100 diagnostics with redacted secrets), `detect_restart_required_changes(...)`.
- `include/Void/Configuration/ReloadController.hpp` + `src/ConfigurationAsync/ReloadController.cpp`:
- Immutable `Snapshot<T>`, `PreparedChange`, `ReloadParticipant<T>`, `ReloadReport`, serialized `ReloadController<T>` with fallible `create(...)`, participant prepare/reverse-rollback/join on unregister, 4-generation retention cap, single atomic pointer swap, post-commit stop observation (`committed = true, stop_observed_after_commit = true`), bounded notification queue + exception isolation, external coordinator prepare port, `WatcherService` coalescing adapter.
- Tests & consumers: `tests/standalone/Configuration/ConfigurationHardening.cpp`, `tests/standalone/ConfigurationAsync/ConfigurationAsync.cpp`, `tests/package/ConfigurationOnly/*`, `tests/package/ConfigurationAsyncOnly/*`, `tests/package/InstalledComponents.cmake`.
## Verification Criteria
- Standalone `ConfigurationAsync;Testing` RelWithDebInfo `-Werror`: `Configuration*` tests + `ctest` 2/2 (`ConfigurationOnly`, `ConfigurationAsyncOnly`).
- Full Wave 8 RelWithDebInfo `-Werror`, ASan+UBSan `-Werror`, and Wave 8 TSan.
@@ -0,0 +1,37 @@
# Containers Pool Lease Lifetimes, Budgets, and Non-Spinning Rings
Task ID: M-CONTAINERS-02, M-CONTAINERS-03
Phase: P1
Status: APPROVED
Contracts: C-01, C-04, C-05
## 1. Context and baseline
`include/Void/Containers/Pool.hpp` (`ObjectPool`, `FixedPool`) and `BufferPool.hpp` currently hold raw pool pointers in returned leases/deleters, leak slots on throwing construction, allocate heap nodes on buffer recycle, and lack admission/byte ceilings. `include/Void/Containers/Ring.hpp` currently spins indefinitely in `MpscRing::pop()` while waiting for `ready_[tail]` and lacks destruction of queued items on ring drop and explicit `close()`/`try_pop()` polling states.
## 2. Deliverables
- `src/Containers/module.cmake` declaring `INTERNAL_DEPS Core Memory`.
- Upgraded `include/Void/Containers/Pool.hpp`: stationary `std::shared_ptr<State>`, `std::pmr::memory_resource*` slab allocation, intrusive zero-alloc `noexcept` `Slot` recycling, throwing-ctor rollback, `ObjectPoolLimits`, `PoolError`, `try_acquire`, `live()`, `allocated_bytes()`, and exception-safe `FixedPool::try_acquire`.
- Upgraded `include/Void/Containers/BufferPool.hpp`: stationary `std::shared_ptr<State>`, O(1) power-of-two intrusive buckets (`buckets[65]`), checked `size_class` overflow, `Limits`, `BufferPoolError`, `try_acquire`, extended `Stats`, safe pool move/destruction while leases outlive owner.
- Upgraded `include/Void/Containers/Ring.hpp`: `PushStatus`, `PopStatus`, `PopResult<T>`, Vyukov per-slot sequence `MpscRing` non-spinning `try_pop()`/`close()`, destructor cleanup in `~SpscRing()`/`~MpscRing()`, keeping 1.x `push`/`pop`/`empty`/`full`/`capacity`.
- Expanded tests in `tests/standalone/Containers/{Pool,BufferPool,Ring}.cpp`.
## 3. Exact files and interfaces
- `src/Containers/module.cmake`
- `include/Void/Containers/Pool.hpp`
- `include/Void/Containers/BufferPool.hpp`
- `include/Void/Containers/Ring.hpp`
- `tests/standalone/Containers/{Pool,BufferPool,Ring}.cpp`
## 4. Edge cases
- Owner moved/destroyed while leases/buffers are still live (`~Buffer`/`~Ptr` frees directly via `State` and upstream resource with zero UAF and zero recycle heap allocations).
- `std::construct_at` throwing rolls back slot/budget accounting.
- Delayed MPSC producer paused inside move construction causes consumer `try_pop()` to return `PopStatus::pending` without blocking/spinning, then `PopStatus::ok` once producer completes.
- `> 4 * N` ring wraparound, `close()`, and `~SpscRing()`/`~MpscRing()` item destruction verified under TSan and ASan/UBSan.
## 5. Acceptance criteria
- `Pool*`, `BufferPool*`, and `Ring*` pass under `-DVOID_WARNINGS_AS_ERRORS=ON` and under Debug TSan (`-DVOID_ENABLE_TSAN=ON`).
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-p1-containers -G Ninja -DVOID_ENABLED_MODULES="Containers;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-p1-containers && /tmp/void-p1-containers/tests/VoidTests --filter "Pool*|BufferPool*|Ring*" && ctest --test-dir /tmp/void-p1-containers --output-on-failure --timeout 60'
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-p1-containers-tsan -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Containers;Testing" -DVOID_ENABLE_TSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-p1-containers-tsan && /tmp/void-p1-containers-tsan/tests/VoidTests --filter "Ring*"'
```
+37
View File
@@ -0,0 +1,37 @@
# Core Standalone UUID, Checked Bits, and Portable Hash
Task IDs: M-CORE-02, M-CORE-03
Phase: P1
Status: APPROVED
Contracts: C-01, C-02, C-05
## 1. Context and baseline
`include/Void/Core/Uuid.hpp` currently includes `<Void/Math/Random.hpp>` (an undeclared dependency leak violating C-01), allocates temporary `std::string` objects in `parse()` and `v5_lite()`, and marks `v4()` unconditionally `noexcept`. `include/Void/Core/Bits.hpp` lacks checked boundary variants, and `include/Void/Core/Hash.hpp` uses `__builtin_memcpy` in `murmur3_32`.
## 2. Deliverables
- Portable incremental/constexpr extensions in `include/Void/Core/Hash.hpp`.
- Zero-Math, zero-allocation `Uuid` APIs in `include/Void/Core/Uuid.hpp`.
- `include/Void/Core/CheckedBits.hpp` (`checked_extract`, `checked_deposit`, `checked_align_up`, `checked_align_down`).
- Expanded unit tests in `tests/standalone/Core/{Uuid,Bits,Hash}.cpp` and isolated installed consumer `tests/package/CoreOnly`.
## 3. Exact files and interfaces
- `include/Void/Core/Hash.hpp`: `fnv1a64_offset_basis`, `fnv1a64_update`, `crc32_initial`, `crc32_update`, `crc32_finalize`; endian-portable `constexpr` `murmur3_32`.
- `include/Void/Core/Uuid.hpp`: remove `<Void/Math/Random.hpp>` and `<format>`; add `GenerateError`, `v4(G&)`, `try_v4() noexcept`, throwing `v4()`, `constexpr format_chars`, `constexpr` zero-alloc `parse`, zero-alloc byte-identical `v5_lite`.
- `include/Void/Core/CheckedBits.hpp`: `BitError { invalid_range, invalid_alignment, overflow }`, `checked_extract`, `checked_deposit`, `checked_align_up`, `checked_align_down`.
- `tests/package/CoreOnly/{CMakeLists.txt,main.cpp}`, `tests/package/InstalledComponents.cmake`.
## 4. Edge cases
- `checked_extract`/`checked_deposit`: `offset = width`, `count = 0`, `count = width`, `offset + count` integer overflow.
- `checked_align_up`: `alignment = 0`, non-power-of-two, `value = MAX` overflow.
- `Uuid::v5_lite`: golden byte-for-byte equivalence with 1.x `ns.bytes + name` hash output.
- Throwing custom URBG propagates out of `v4(G&)`; `try_v4()` converts `random_device` failure without returning nil.
## 5. Acceptance criteria
- `-DVOID_ENABLED_MODULES=Core -DVOID_ENABLE_TESTING=OFF` installs and runs `CoreOnly` with all external packages disabled and no `Math` dependency.
- Core tests pass with `-DVOID_WARNINGS_AS_ERRORS=ON` and ASan/UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c cmake -S . -B /tmp/void-p1-core -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Core;Testing" -DVOID_WARNINGS_AS_ERRORS=ON
dev cpp-gcc -c cmake --build /tmp/void-p1-core --parallel 4
dev cpp-gcc -c /tmp/void-p1-core/tests/VoidTests --filter "Uuid*|Bits*|Hash*"
```
@@ -0,0 +1,26 @@
# Crypto Hardening, Signing, MAC/KDF & Optional Async Hash Adapter
Task ID: M-CRYPTO-01..05
Phase: P2 (Wave 6B)
Status: APPROVED
Contracts: C-02, C-03, C-07, C-13
## 1. Context and baseline
`Void::Crypto` preserves all 1.x APIs (`Hasher`, `Digest`, `HashAlgorithm`, `hash`, `hashFile`, `sha1`/`sha256`/`sha512`, `sha*File`, `verifyEd25519` exact-byte false-vs-error semantics) while hardening `Hasher` state poisoning (`Ready -> Updating -> Finalized | Failed`), adding per-context OpenSSL 3 `ProviderOptions` (no process-wide provider mutation), typed Ed25519 wrappers (`Ed25519PublicKey`, `Ed25519Signature`, `Ed25519Seed`, move-only `Ed25519PrivateKey`), `sign_ed25519`, `hmac_sha256`/`hmac_sha256_into`, `hkdf_sha256`, `constant_time_equal`, backend fault injection, and a separate optional `CryptoAsync` module (`hash_stream`, `AsyncFileHasher`) so `Crypto` remains runtime-free.
## 2. Deliverables
- `src/Crypto/module.cmake` (`INTERNAL_DEPS Functional`, `EXTERNAL_DEPS OpenSSL::Crypto`, `EXCLUDE_HEADERS Void/Crypto/AsyncHash.hpp`) & `src/CryptoAsync/module.cmake` (`INTERNAL_DEPS Crypto IO Async Time Functional`, `EXTRA_HEADERS Void/Crypto/AsyncHash.hpp`).
- `include/Void/Crypto/Types.hpp`: `kCryptoErrorDomain = 18`, `CryptoErrorCode`, `make_crypto_error`, `HasherState`, `ProviderOptions`, `CryptoLimits` (`kMaxOneShotMessageBytes = 16 MiB`, `kMaxHkdfOutputBytes = 4 KiB`, `kStreamChunkBytes = 64 KiB`, `kDefaultMaxConcurrentFileHashes = 8`, `kDefaultMaxWaitingFileHashes = 32`, `kDefaultAsyncBufferBudgetBytes = 8 MiB`), `Ed25519PublicKey`, `Ed25519Signature`, `Ed25519Seed` (with explicit wipe).
- `include/Void/Crypto/Crypto.hpp` & `src/Crypto/Crypto.cpp`: OpenSSL 3 non-deprecated EVP APIs (`EVP_MD_fetch`, `EVP_MAC_fetch`, `EVP_KDF_fetch`, `EVP_PKEY_new_raw_*_ex`, `EVP_DigestSignInit_ex`, `EVP_DigestVerifyInit_ex`, `CRYPTO_memcmp`, `OPENSSL_cleanse`), poisoned `Hasher` + `state()`, `Ed25519PrivateKey` (`generate`, `from_raw_seed`, `public_key`, `export_raw_seed`), `sign_ed25519`, typed `verify_ed25519`, `hmac_sha256`, `hmac_sha256_into`, `hkdf_sha256` (4 KiB cap, overlap rejection, wipe-on-error), `constant_time_equal`, and thread-local/scoped backend fault hook.
- `include/Void/Crypto/AsyncHash.hpp` & `src/CryptoAsync/AsyncHash.cpp`: `hash_stream` (64 KiB `BufferLease` chunks, stop/deadline checks between chunks, clean-EOF-only finalize) and `AsyncFileHasher` (8 concurrent / 32 waiters / 8 MiB buffer budget, `close_and_join`).
- `tests/standalone/Crypto/CryptoHardening.cpp`, `tests/standalone/CryptoAsync/CryptoAsync.cpp`, `tests/package/{CryptoOnly,CryptoAsyncOnly}/*`, registered in `tests/package/InstalledComponents.cmake`.
## 3. Edge cases
- Invalid key/signature sizes return `invalid_argument` before touching OpenSSL; well-formed invalid Ed25519 signatures return `true`/`false` (not error).
- One-shot `sign_ed25519`/`verify_ed25519` enforce `16 MiB` limit; `hkdf_sha256` rejects zero/oversized (`> 4 KiB`) output and overlapping input/salt/context/output spans, wiping output on failure.
- Backend error during `Hasher::update`/`finalize` transitions state to `Failed`, rejecting further `update`/`finalize` calls.
- `hash_stream` never returns a digest on partial read + error or stop/EOF cancellation race; `AsyncFileHasher::close_and_join` stops admission and drains in-flight work before returning.
## 4. Verification commands
```sh
dev cpp-gcc -p openssl -c bash -lc 'cmake -S . -B /tmp/void-w6b-crypto -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Crypto;CryptoAsync;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6b-crypto && /tmp/void-w6b-crypto/tests/VoidTests --filter "Crypto*|crypto_*" && ctest --test-dir /tmp/void-w6b-crypto --output-on-failure --timeout 120'
```
+34
View File
@@ -0,0 +1,34 @@
# Data Exact 64-Bit Signed/Unsigned JSON Numbers and Checked Conversion
Task ID: M-DATA-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-05, C-07
## 1. Context and baseline
`include/Void/Data/Json.hpp` currently stores all numbers as `double`, silently rounding integers above `2^53` through parse, DOM construction, equality, serialization, SAX events, and `Reflect.hpp`. StrictJson (`Void::Json::Strict::Value`) is already signed `int64_t` and must remain completely unchanged (C-07).
## 2. Deliverables
- `src/Data/module.cmake` updated to `INTERNAL_DEPS Core Math Time`.
- Extended `include/Void/Data/Json.hpp`: `NumberKind`, `ConversionError`, `int64_t`/`uint64_t`/`double` variant alternatives, unambiguous integral/float constructors, `is_int`/`is_uint`/`is_double`/`is_integer`/`number_kind`/`as_uint`/`get_int`/`get_uint`, `number_as<T>` delegating to `Void::Numeric::checked_cast`, exact cross-type `operator==`, strict RFC 8259 numeric grammar parsing (256-byte limit, `-0` -> integer `0`, `-0.0` preserved as negative double), optional `SaxHandler::{on_int,on_uint}` retaining `on_number` compatibility, exact `std::to_chars` serialization + `try_serialize`.
- Updated `include/Void/Data/Reflect.hpp` (exact integer `leaf_to_json`, `number_as<T>` in `leaf_from_json` and versioned envelopes) and `include/Void/Configuration/Config.hpp` (exact integer stringification).
- Expanded tests in `tests/standalone/Data/{Json,Reflect}.cpp`; `StrictJson.hpp` and `tests/standalone/Data/StrictJson.cpp` untouched.
## 3. Exact files and interfaces
- `src/Data/module.cmake`
- `include/Void/Data/Json.hpp`
- `include/Void/Data/Reflect.hpp`
- `include/Void/Configuration/Config.hpp`
- `tests/standalone/Data/{Json,Reflect}.cpp`
## 4. Edge cases
- `INT64_MIN`, `INT64_MAX`, `UINT64_MAX`, and `2^53 ± 1` survive parse, serialize, equality, and reflection round trips without silent rounding; integers `< INT64_MIN` or `> UINT64_MAX` fail parsing.
- `Value{UINT64_MAX} != Value{static_cast<double>(UINT64_MAX)}` and `Value{(std::uint64_t{1} << 53) + 1} != Value{static_cast<double>(1ULL << 53)}`.
- `number_as<double>` rejects `2^53 + 1` with `Rounding::exact`, succeeds with explicit `Rounding::nearest_even`; `try_serialize` rejects `NaN`/`Inf` with `Error::NonFinite`.
## 5. Acceptance criteria
- `Data;Update;Configuration;Testing` suites (`Json*|StrictJson*|Reflect*|Update*|Config*`) pass under `-DVOID_WARNINGS_AS_ERRORS=ON` without modifying `StrictJson`.
## 6. Verification commands
```sh
dev cpp-gcc -p openssl -c bash -lc 'cmake -S . -B /tmp/void-p1-data -G Ninja -DVOID_ENABLED_MODULES="Data;Update;Configuration;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-p1-data && /tmp/void-p1-data/tests/VoidTests --filter "Json*|StrictJson*|Reflect*|Update*|Config*"'
```
+24
View File
@@ -0,0 +1,24 @@
# M-FSM-01..05 — Structured Scopes, Race-Loser Joins, Boundary Checkpoints & Bounded Supervision
- **Wave**: Wave 8 (`feat/roadmap-p2-wave8`, branched from `main` at `d83d0f4`)
- **Roadmap reference**: `docs/roadmap/modules/Fsm.md`, `docs/roadmap/DEPENDENCIES.md`
## Scope & Ownership
- `src/Fsm/module.cmake`: `INTERNAL_DEPS Async Core Data Functional Time Log Service`.
- `include/Void/Fsm/StateKey.hpp`: `kFsmErrorDomain = 25`, `FsmErrorCode`, `make_fsm_error`, shared `constexpr bool terminal(Status)` including `Faulted`, `TerminationReason`, `FsmLimits` (1,024 mailbox events / 4 MiB, 256 deferred, 1,024 timers, 128 child regions, depth 32, 256 retained transitions, 4 MiB checkpoint, 64 events / 1ms per turn), `Checkpoint`, `ExecutionBinding`, `StateId`.
- `include/Void/Fsm/Detail/Engine.hpp` + `src/Fsm/Engine.cpp`:
- Injected `Time::MonotonicClock` and `FsmLimits` for timers and turn budgeting.
- Bounded `try_post` enforcing mailbox event & byte limits (`overloaded`) alongside a bounded control lane so stop/checkpoint/jump always progress.
- Scope-tracked waiters & timers (`cancel_scope_waiters`) cancelled prior to state destruction.
- `include/Void/Fsm/Machine.hpp`:
- Preserve 100% of existing API (`start`, `wait`, `run_blocking`, `run_parallel`, `run_parallel_any`, `serialize`, `restore`).
- Add `acquire_service<I>()` returning owning `Service::ServiceHandle<I>`, `try_post`, `termination_reason`, bounded `transition_history`, `observer_errors`, `state_stop_token()`, `await_event_cancellable`, `safe_point`.
- Add `run(ExecutionBinding, Async::OperationOptions)` with root + per-state stop scopes, waiter/timer cleanup before `on_exit`, `on_exit` exception faulting, observer error isolation.
- Add `run_parallel_structured` (sibling fault stop/join) and `run_parallel_any_structured` (deterministic tie-break + stop/join all losers).
- Add boundary `request_checkpoint` / `restore_checkpoint` / `restore_legacy_checkpoint`.
- `include/Void/Fsm/Orchestrator.hpp`: fix `FsmHandle::finished()` via `terminal(status())`, clarify `shared_ptr` ownership docs, add `SupervisionPolicy` (`StopOnFault`, `BoundedRestart` 3/60s on injected clock, 1,024 max supervised), unlocked observers, `try_launch`.
- Tests & consumers: `tests/standalone/Fsm/FsmHardening.cpp`, `tests/package/FsmOnly/*`, `tests/package/InstalledComponents.cmake`.
## Verification Criteria
- Standalone `Fsm;Testing` RelWithDebInfo `-Werror`: `Fsm*` tests + `ctest` 2/2 (`FsmOnly`).
- Full Wave 8 RelWithDebInfo `-Werror`, ASan+UBSan `-Werror`, and Wave 8 TSan.
@@ -0,0 +1,39 @@
# Functional Compact Status, Bounded Contexts, and Error Adapters
Task ID: M-FUNCTIONAL-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-02, C-05 (G-ERROR)
## 1. Context and baseline
`include/Void/Functional/Error.hpp` stores free-form message strings and unbounded `shared_ptr<const Error>` chains with recursive destruction and no machine-readable classification.
## 2. Deliverables
- `ErrorKind`, `ErrorCode`, `Status`, reserved domain constants, bounded message/frame/format limits, and iterative `~Error()` in `include/Void/Functional/Error.hpp`.
- `fail(Status)` and `fail(ErrorKind, ...)` factories in `include/Void/Functional/Result.hpp`.
- `include/Void/Functional/Adapters.hpp` (`adapt`, `try_invoke`, `from_errno`).
- `tests/standalone/Functional/ErrorStatus.cpp`.
## 3. Exact files and interfaces
- `include/Void/Functional/Error.hpp`:
- `ErrorKind`: `invalid_argument`, `not_found`, `conflict`, `cancelled`, `timeout`, `overloaded`, `unsupported`, `io`, `corrupt`, `exhausted`, `internal`.
- `Status { ErrorKind kind; ErrorCode code; }` and `explicit Error(Status) noexcept` (zero heap allocation).
- Limits: `kDefaultMaxErrorFrames = 16`, `kDefaultMaxErrorMessageBytes = 1024`, `kDefaultMaxFormattedErrorBytes = 16 * 1024`.
- `with_context()` preserves root `Status` and `std::error_code`, pins the root cause at the tail when capping > 16 frames, and sets `truncated() == true`.
- `include/Void/Functional/Result.hpp`: typed `fail(...)` overloads.
- `include/Void/Functional/Adapters.hpp`: `adapt`, `try_invoke`, `from_errno`.
## 4. Edge cases
- `Error(Status)` makes zero heap allocations.
- `try_invoke` must ALWAYS rethrow `std::bad_alloc` and any exception where `map_exception` returns `std::nullopt`.
- `adapt` handles `void`, move-only values, and never invokes `map_error` on success.
- 20-layer context chains preserve `ErrorKind`, `ErrorCode`, `system_code`, and root cause message.
## 5. Acceptance criteria
- Existing 1.x `Result*` tests pass unchanged; `ErrorStatus` suite passes under `-Werror` and ASan/UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c cmake -S . -B /tmp/void-p1-functional -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Functional;Testing" -DVOID_WARNINGS_AS_ERRORS=ON
dev cpp-gcc -c cmake --build /tmp/void-p1-functional --parallel 4
dev cpp-gcc -c /tmp/void-p1-functional/tests/VoidTests --filter "ErrorStatus*|Result*"
```
+28
View File
@@ -0,0 +1,28 @@
# Log Hardening, Bounded Delivery, File Sync, and LogConfig Separation
Task ID: M-LOG-01..05
Phase: P2
Status: APPROVED
Contracts: C-01, C-02, C-03, C-04, C-05, C-11
## 1. Context and baseline
`Void::Log` (`Log.hpp` + `LogState/State.cpp`) holds `Sink` behind `State::mutex` during emission, and `Void::Logging::Logger` (`src/Log/Logger.cpp`) uses an unbounded batch drain without byte budgeting, contiguous ticket completion, exception quarantine, or file durability/reopen controls, while `Log` links `Configuration` via `FromConfig.hpp`.
## 2. Deliverables
- Split `LogConfig` (`src/LogConfig/module.cmake`, `FromConfig.hpp`/`src/LogConfig/FromConfig.cpp`) out of `Log` (`src/Log/module.cmake`: `INTERNAL_DEPS Async Core Data Functional Memory Time LogState`, `OPTIONAL_DEPS Stacktrace`, `EXCLUDE_HEADERS Void/Log/Log.hpp Void/Log/FromConfig.hpp`).
- `include/Void/Log/Log.hpp` & `src/LogState/State.cpp`: immutable `SinkRegistration`, `register_sink`, `detach_and_drain` (`DrainResult` with `would_deadlock`), outer-of-lock callback invocation & owner destruction, reentrancy guard (depth <= 8) + emergency hook.
- `include/Void/Log/Entry.hpp`: `bool truncated{false};`.
- `include/Void/Log/Logger.hpp` & `src/Log/Logger.cpp`: `LogErrorCode`, `make_log_error` (`kLogErrorDomain = 12`), `DeliveryLimits`, `FailurePolicy`, `LoggerOptions`, `SubmitState`, `Ticket`, `SubmitReceipt`, `FlushDurability`, `FlushOptions`, `CloseOptions`, `FlushReport`, bounded deque with queued+in-flight entry and byte accounting, contiguous ticket watermark, `try_submit`, `flush_through`, `close`, quarantine & reset, admission-barrier `set_mode`, `sync_files()`.
- `include/Void/Log/Sinks.hpp`: `CallbackLogger(Callback, LoggerOptions)`, `MultiLogger::try_add` with max 8 children and cycle check.
- `include/Void/Log/Formatter.hpp` & `src/Log/Formatter.cpp`: field redaction in `FieldFilter`, `LogfmtFormatter` control-char escaping, `JsonLinesFormatter` int64 line numbers, `format_bounded`.
- `FileLogger` / `RotatingFileLogger` / `RollingFile`: explicit `create_directories`, `RotatingFileOptions::roadmap_defaults()`, stream write-error surfacing, `reopen()`, POSIX `::fsync` in `sync_files()`.
- `src/LogConfig/FromConfig.cpp` + moved `tests/standalone/LogConfig/FromConfig.cpp`: strict config value validation.
- `tests/standalone/Log/LogHardening.cpp` and `tests/package/LogOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake`.
## 3. Edge cases
- Legacy 3-argument `Logger` constructor preserves compatibility for existing `LogScopeSnapshot` immediate recursion and `AsyncLogger` 400k stress test (`owned_bytes >= max(8 MiB, entries * 1024)`, `suppress_reentrancy = false`).
- `DropOldest` never evicts already-dispatched in-flight batch entries; `Block` rejects self-blocking on worker (`would_deadlock`).
## 4. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w5-log -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Log;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w5-log && /tmp/void-w5-log/tests/VoidTests && ctest --test-dir /tmp/void-w5-log --output-on-failure --timeout 120'
```
+35
View File
@@ -0,0 +1,35 @@
# Math Span-Safe Parsing, Checked Cast, and Portable Overflow
Task ID: M-MATH-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-02, C-05, C-07
## 1. Context and baseline
`include/Void/Math/Numeric.hpp` currently passes `string_view::data()` to `std::strtol`/`std::strtod` (unsafe on non-NUL-terminated substrings), uses `long long`-based `in_range`/`narrow_cast` (broken for unsigned 64-bit / floating conversions), and lacks `checked_cast`, `checked_mul_add`, and portable non-builtin overflow arithmetic.
## 2. Deliverables
- Extended `include/Void/Math/Numeric.hpp`: `Error::Inexact`, `Error::NonFinite`, `Rounding`, `kMaxNumericTokenBytes = 256`, guarded `__builtin_*_overflow` + portable `constexpr` fallback, `checked_mul_add`, `checked_cast`, `parse_integer`, `parse_real`, and span-safe `parse_int`/`parse_double` adapters.
- Comprehensive boundary tests in `tests/standalone/Math/Numeric.cpp`.
## 3. Exact files and interfaces
- `include/Void/Math/Numeric.hpp`:
- `checked_cast<To, From>(value, Rounding mode = Rounding::exact) noexcept -> std::expected<To, Error>` across all non-`bool` arithmetic pairs.
- `parse_integer<T>(std::string_view, int base = 10) noexcept -> std::expected<T, Error>`.
- `parse_real<T>(std::string_view) noexcept -> std::expected<T, Error>`.
- `checked_mul_add<T>(T a, T b, T c) noexcept -> std::expected<T, Error>`.
## 4. Edge cases
- Non-NUL-terminated substrings adjacent to digits (`"429"` sliced to `"42"` must parse `42`, never `429`).
- `parse_integer`/`parse_real` reject empty strings, `> 256` bytes, leading whitespace, leading `'+'`, trailing characters, and `"nan"`/`"inf"`.
- Float->int checks exact exclusive `2^63` (`9223372036854775808.0`) / `2^64` (`18446744073709551616.0`) boundaries, and `nearest_even` implements deterministic ties-to-even independent of `FE_ROUND`.
- Int->float exactness checks significant bits without UB when negating `INT64_MIN`; preserves `-0.0` sign on float narrowing.
## 5. Acceptance criteria
- Existing `Numeric` tests plus all boundary tests pass under `-Werror` and ASan/UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c cmake -S . -B /tmp/void-p1-math -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Math;Testing" -DVOID_WARNINGS_AS_ERRORS=ON
dev cpp-gcc -c cmake --build /tmp/void-p1-math --parallel 4
dev cpp-gcc -c /tmp/void-p1-math/tests/VoidTests --filter "Numeric*"
```
+29
View File
@@ -0,0 +1,29 @@
# Task Spec: `M-NET-01..05` — P2 Network Hardening, Native HTTP/1.1 Codec, Connection Pool, Safe Static Open & RFC 6455 WebSockets
- **Branch**: `feat/roadmap-p2-wave9` (baseline `main` at `3e25405`, building on `VL-004`/`VL-005` in `66baae7` + `9920bfd`).
- **Roadmap authority**: `docs/roadmap/modules/Net.md` (`M-NET-01`..`M-NET-05`), `ARCHITECTURE.md` C-02..C-06, C-11, C-13.
- **Error domain**: `Void::Result::kNetErrorDomain = 26` (`NetErrorCode` in `include/Void/Net/Http.hpp`).
## Scope & Deliverables
1. **Native Incremental HTTP/1.1 Codec (`include/Void/Net/HttpCodec.hpp`, `src/Net/HttpCodec.cpp`)**:
- `HttpCodecLimits` (defaults: `max_start_line_bytes = 8 KiB`, `max_header_bytes = 32 KiB`, `max_headers = 100`, `max_body_bytes = 8 MiB`, `max_chunk_ext_bytes = 1 KiB`, `max_trailer_bytes = 8 KiB`).
- `HttpRequestParser` and `HttpResponseParser`: byte-by-byte / arbitrary-split incremental RFC 9110/9112 state machines.
- Strict CRLF framing, header field-name token validation, rejection of duplicate/conflicting `Content-Length`, rejection of `Transfer-Encoding` + `Content-Length` smuggling ambiguity, handling of `1xx` informational responses, `HEAD`/`204`/`304` no-body responses, chunked transfer encoding with chunk extensions and trailers, close-delimited response bodies (`finish_eof()`), and explicit `connection_reusable()` check.
2. **Bounded HTTP/1.1 Connection Pool (`include/Void/Net/Pool.hpp`, `src/Net/Pool.cpp`)**:
- `PoolLimits` (defaults: `max_total_connections = 256`, `max_per_origin = 8`, `max_idle_connections = 128`, `idle_timeout = 30s`).
- `PoolKey` keyed by `{scheme, host, port, proxy_identity, tls_policy_generation}` (so changing proxy or trust generation never reuses stale connections).
- `ConnectionPool` using injectable `Void::Time::MonotonicClock` for deterministic idle eviction, returning RAII `ConnectionLease` handles that only return clean, reusable connections to the pool (`mark_reusable(true)`); abandoned/unmarked/dirty/expired leases close cleanly.
3. **Descriptor-Pinned Static File Opening (`include/Void/Net/Server.hpp`, `src/Net/Server.cpp`)**:
- `OpenedStaticFile` (move-only RAII descriptor + `content_type` + `size`, `read_all()`, `native_handle()`).
- `StaticFileResolver::open_safe(std::string_view request_path)` walking components beneath a retained root directory fd (`O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC`), rejecting symlinks/traversal/non-regular files without pathname TOCTOU.
4. **Redirect Compliance in `HttpClient` (`src/Net/Http.cpp`)**:
- Follow only `301`, `302`, `303`, `307`, `308`; `303` converts non-HEAD to `GET` and strips body + `Content-Length`/`Content-Type`; `307`/`308` preserve method/body; resolve relative `Location` references against current URL; reject HTTPS->HTTP downgrade unless `allow_insecure_redirects`; strip `Authorization`, `Cookie`, `Proxy-Authorization`, `X-Api-Key` on cross-origin hops; enforce single absolute steady deadline across redirect hops.
5. **Native RFC 6455 WebSocket Wire Framing & Loopback Transport (`include/Void/Net/WebSocket.hpp`, `src/Net/WebSocket.cpp`, `include/Void/Net/HttpServer.hpp`, `src/Net/HttpServer.cpp`)**:
- `compute_websocket_accept(key)` (RFC 6455 SHA-1 + Base64), `validate_websocket_upgrade_request()` (version 13, `Upgrade: websocket`, `Connection: Upgrade`, 16-byte base64 key, optional origin/subprotocol policy).
- `WebSocketOpcode`, `WebSocketLimits` (`max_message_bytes = 1 MiB`, `max_output_messages = 64`, `max_output_bytes = 4 MiB`), `WebSocketFrame`, `encode_websocket_frame()`, `WebSocketFrameDecoder` enforcing client masking / server non-masking, fragmentation, control-frame rules (<= 125 bytes, FIN=1), strict RFC 3629 UTF-8 validation for text frames & close reasons, ping/pong, and single close handshake.
- `HttpServer::add_websocket_route(pattern, WebSocketSessions&, WebSocketUpgradeOptions)` upgrading incoming HTTP/1.1 requests into live RFC 6455 connections integrated with `WebSocketSessions`, plus loopback `WebSocketClient` for full client/server wire verification.
## Verification
- Standalone `Net;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`): split-byte smuggling & chunked/trailer/1xx/HEAD codec corpus, pool eviction & key isolation, `open_safe` symlink-swap rejection, redirect `303`/`307`/relative/cross-origin tests, RFC 6455 wire & loopback `WebSocketClient`/`HttpServer` ping/pong/fragmented/UTF-8/close/shutdown tests.
- `ctest` `NetOnly` installed consumer, full `RelWithDebInfo`, Debug `ASan+UBSan`, Debug `TSan`.
@@ -0,0 +1,19 @@
# M-PLUGIN-01..06 — Pure C11 ABI (`CAbi.h`), Generation Pins, Quiesce/Reload & Unlocked Staging
- **Wave**: Wave 8 (`feat/roadmap-p2-wave8`, branched from `main` at `d83d0f4`)
- **Roadmap reference**: `docs/roadmap/modules/Plugin.md`, `docs/roadmap/DEPENDENCIES.md` (`G-HOST`)
## Scope & Ownership
- `src/Plugin/module.cmake`: `INTERNAL_DEPS Core Functional System Data Time Async LogState Text Service`, `DEPS_UNIX dl`.
- `include/Void/Plugin/CAbi.h`: strict ISO C11 public ABI (`VOID_STATUS_*`, `VOID_CABI_MAJOR_V1 = 1`, `VOID_CAP_*`, `void_module_query_v1`, `void_bytes_v1`, `void_owned_bytes_v1`, `void_interface_id_v1`, `void_module_info_v1`, `void_op_options_v1`, `void_error_detail_v1`, `void_host_api_v1`, `void_module_api_v1`, `VOID_MODULE_API_V1_MIN_SIZE`) with zero C++/STL types or exceptions.
- `include/Void/Plugin/Host.hpp` + `src/Plugin/Host.cpp` + `include/Void/Plugin/CAbiAdapter.hpp`:
- `kPluginErrorDomain = 23`, `PluginErrorCode`, `PluginHostLimits` (64 modules, 256 interfaces/module, 4 retained generations/module, 64 MiB mapped image file accounting/module, 4 MiB checkpoint, 1 MiB config, 1,024 async ops/gen, 256 pending callbacks, 5s prepare / 5s quiesce / 10s readiness / 30s total reload timeout, `allow_safe_dlclose = false` default).
- Independent `external_refs` and `activity_pins`; host-owned retirement queue executing `deactivate -> destroy -> optional dlclose` only when both reach 0 and never on a plugin callback's stack; uncooperative generations stay mapped and remain visible via `retained_generations()`.
- `CModuleHost`: validates `void_module_query_v1` against truncation/unknown major/non-zero reserved/oversized lengths; per-module unlocked staged reload coordinator (`quiesce -> checkpoint -> restore -> activate -> readiness` sharing one absolute deadline on injected `Time::MonotonicClock`, rollback + `resume` on pre-publication failure or `Degraded` on resume failure, atomic epoch-checked publication + coherent `ServiceRegistry` swap); topological dependency `load_batch` rejecting cycles and `RestartRequired` conflicts.
- `CAbiAdapter.hpp`: exception-safe C++ `IModule` to `void_module_api_v1` shim.
- `src/Plugin/Manager.cpp`: per-entry `reload_mutex` so candidate staging/validators/config/activation run outside `m_mutex` without deadlocking reentrant lookups.
- Tests & consumers: `tests/plugins/CAbiPluginV{1,2}.c`, `tests/standalone/Plugin/PluginHardening.cpp`, `tests/package/PluginOnly/*`, `tests/CMakeLists.txt`, `tests/package/InstalledComponents.cmake`.
## Verification Criteria
- Standalone `Plugin;ServicePlugin;Testing` RelWithDebInfo `-Werror`: `Plugin*` tests + `ctest` 2/2 (`PluginOnly`, `ServicePluginOnly`).
- Full Wave 8 RelWithDebInfo `-Werror`, ASan+UBSan `-Werror`, and Wave 8 TSan.
@@ -0,0 +1,28 @@
# Resilience Hardening, Permits, Bounded Keyed Cleanup, and Async Policy
Task ID: M-RESILIENCE-01..04
Phase: P2
Status: APPROVED
Contracts: C-02, C-03, C-04, C-05, C-11, C-13
## 1. Context and baseline
`Void::Resilience` currently provides `TokenBucket`, `KeyedRateLimiter`, `CircuitBreaker`, and `ResourceMonitor` without config/input validation, overflow-safe `ResourceMonitor` subtraction, synchronized callback setters, single-probe HalfOpen leases, generation binding, bounded keyed cleanup cursors, or optional `Async` bulkhead/retry composition.
## 2. Deliverables
- `src/Resilience/module.cmake` (`INTERNAL_DEPS Functional Time ObservabilityHooks`, `EXCLUDE_HEADERS Void/Resilience/AsyncPolicy.hpp`)
- `src/ResilienceAsync/module.cmake` (`INTERNAL_DEPS Resilience Async Functional Time ObservabilityHooks`, `EXTRA_HEADERS Void/Resilience/AsyncPolicy.hpp`)
- `include/Void/Resilience/Types.hpp`: `ResilienceErrorCode`, `make_resilience_error` (`kResilienceErrorDomain = 15`), `Outcome`, `Admission`, validated `BucketConfig`, `KeyedBucketConfig`, `BreakerConfig`, `MonitorConfig`
- Upgrades in `RateLimiter.hpp`, `KeyedRateLimiter.hpp`, `CircuitBreaker.hpp`, `ResourceMonitor.hpp`, `Resilience.hpp` (`TokenBucket::create`/`try_acquire_checked`/`try_acquire_all`, `BoundedKeyedRateLimiter`, `Breaker`/`BreakerPermit`, overflow-safe `ResourceMonitor`/`ResourcePermit`)
- `include/Void/Resilience/AsyncPolicy.hpp`: `BulkheadConfig`, `Bulkhead`, `BulkheadPermit`, `ResilientRetryConfig` (using `Void::Retry::ExponentialBackoff` + `JitterMode::Full`), `execute_resilient`
- `tests/standalone/Resilience/ResilienceHardening.cpp`, `tests/standalone/ResilienceAsync/AsyncPolicy.cpp`
- `tests/package/ResilienceOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake`
## 3. Edge cases
- Clock regression never moves `last_` backwards or adds tokens; NaN/Inf/negative/oversize costs consume nothing.
- `BreakerPermit` enforces single (or `half_open_max_probes`) concurrent HalfOpen probe, rejects stale-generation completions from closing newer Open state, and releases slot neutrally on abandonment.
- `ResourceMonitor` rejects overflow (`amount > limit - usage`), over-release (`release_checked`), and isolates observer callback exceptions outside locks.
- `execute_resilient` honors composition order, shares total deadline across retries, and never retries non-replay-safe operations.
## 4. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w5-resilience -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Resilience;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w5-resilience && /tmp/void-w5-resilience/tests/VoidTests --filter "CircuitBreaker*|RateLimiter*|KeyedRateLimiter*|ResourceMonitor*|ResilienceHardening*" && ctest --test-dir /tmp/void-w5-resilience --output-on-failure --timeout 120'
```
@@ -0,0 +1,29 @@
# Security Hardening, SecureBuffer, Versioned Envelopes, Authorization & Authenticator
Task ID: M-SECURITY-01..04
Phase: P2 (Wave 6B)
Status: APPROVED
Contracts: C-02, C-03, C-04, C-05, C-07, C-09, C-13
## 1. Context and baseline
`Void::Security` preserves all 1.x APIs (`generateToken`, `hashToken`, `verifyToken`, `hashPassword`, `verifyPassword`, `generateSecretKey`, `sealSecret`, `openSecret`) and the exact legacy secret envelope format (`24B nonce || secretbox_easy(16B MAC + ciphertext)`), while adding `SecureBuffer`, input/cost validation (`parse_argon2id_cost`, `verify_password_budgeted`), versioned `VSEC` v1 AEAD envelopes + `SecretKeyRing` rotation, typed default-deny `Authorization`, and a separate `SecurityAsync` module (`Authenticator`, `AccountSessionPort`, `InMemoryAccountSessionStore`, `PasswordJobBudget`, `AuditSink`) so primitive `Security` remains free of Async/Resilience/Storage dependencies.
## 2. Deliverables
- `src/Security/module.cmake` (`INTERNAL_DEPS Functional Time`, `EXTERNAL_DEPS Sodium::Sodium`, `EXCLUDE_HEADERS Void/Security/Authenticator.hpp`) & `src/SecurityAsync/module.cmake` (`INTERNAL_DEPS Security Async Time Resilience Functional`, `EXTRA_HEADERS Void/Security/Authenticator.hpp`).
- `include/Void/Security/Types.hpp`: `kSecurityErrorDomain = 19`, `SecurityErrorCode`, `make_security_error`, `SecurityLimits` (1 KiB password/hash, 512 B token, 16 MiB plaintext, 64 roles, 4096 rules, 16 predicate depth), `PasswordVerifyBudget`, `Argon2idCost`.
- `include/Void/Security/SecureBuffer.hpp` & `src/Security/SecureBuffer.cpp`: move-only `SecureBuffer` with `LockPolicy::{StandardWiped, LockedOptional, LockedRequired}` (fail-closed if locked allocation fails), `sodium_memzero` wipe on release/move, optional fault hook.
- `include/Void/Security/Security.hpp` & `src/Security/Security.cpp`: preserve 1.x surface + enforce input caps, `parse_argon2id_cost`, `verify_password_budgeted` rejecting excessive `m`/`t` before Argon2id allocation, backend init/randomness fault seam.
- `include/Void/Security/Envelope.hpp` & `src/Security/Envelope.cpp`: versioned `VSEC` v1 `crypto_aead_xchacha20poly1305_ietf` envelope authenticating header + `key_id` + `aad`, `SecretKeyRing` (active-key writes, multi-key reads, checked retirement), zero silent legacy fallback.
- `include/Void/Security/Authorization.hpp` & `src/Security/Authorization.cpp`: `Principal` (<=64 roles), typed `Predicate` (depth <=16), `PolicySnapshot` (<=4096 rules, default-deny, deny-overrides-allow, `authorize`).
- `include/Void/Security/Authenticator.hpp` & `src/SecurityAsync/Authenticator.cpp`: `AccountSessionPort`, `InMemoryAccountSessionStore`, `PasswordJobBudget` (512 MiB / 2 active / 32 waiters), `SessionPolicy` (10,000 total / 16 per subject / 1h TTL / 60s civil-clock rollback check / 256 cleanup batch), mandatory `AuditSink`, `Authenticator` (dummy-hash timing-work parity, credential-version CAS, non-interruptible drain-on-stop, zero positive session cache, `close_and_join`).
- `tests/standalone/Security/SecurityHardening.cpp`, `tests/standalone/SecurityAsync/SecurityAsync.cpp`, `tests/package/{SecurityOnly,SecurityAsyncOnly}/*`, registered in `tests/package/InstalledComponents.cmake`.
## 3. Edge cases
- Legacy `sealSecret`/`openSecret` bytes remain bit-for-bit compatible; `Envelope` never guesses legacy decoding after AEAD failure.
- Unknown account and wrong password execute comparable Argon2id work via a precomputed dummy hash and return identical public denial while recording distinct internal audit reasons.
- Cancelling during password verification returns cancelled, retains budget/buffers until the Argon2id job completes, discards output, and never writes a session.
- Civil-clock rollback exceeding configured tolerance (default 60s) fails session admission until reconciled.
## 4. Verification commands
```sh
dev cpp-gcc -p libsodium -c bash -lc 'cmake -S . -B /tmp/void-w6b-security -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Security;SecurityAsync;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6b-security && /tmp/void-w6b-security/tests/VoidTests --filter "Security*|security_*" && ctest --test-dir /tmp/void-w6b-security --output-on-failure --timeout 120'
```
@@ -0,0 +1,22 @@
# M-SERVICE-01..05 — Owning ServiceHandles, Immutable Snapshots, DAG Lifecycle & ServicePlugin Split
- **Wave**: Wave 8 (`feat/roadmap-p2-wave8`, branched from `main` at `d83d0f4`)
- **Roadmap reference**: `docs/roadmap/modules/Service.md`, `docs/roadmap/DEPENDENCIES.md` (Rule #3, `G-HOST`)
## Scope & Ownership
- `src/Service/module.cmake`: `INTERNAL_DEPS Core Functional Time Async LogState`, `EXCLUDE_HEADERS Void/Service/PluginService.hpp` (zero external deps, zero `Plugin` dependency).
- `src/ServicePlugin/module.cmake`: `INTERNAL_DEPS Service Plugin LogState`, `EXTRA_HEADERS Void/Service/PluginService.hpp`.
- `include/Void/Service/Types.hpp`: `kServiceErrorDomain = 22`, `ServiceErrorCode`, `make_service_error`, `ServiceLimits` (256 providers, 16 parent levels, 1,024 edges, 64 staged changes, 128 lifecycle requests, 4 retained generations), `PublicationEpoch`, `ExpectedEpoch`, `ServicePin`, `ServiceHealth`, `ServiceObservation`, `ShutdownReport`, `IManagedService`, `ServiceHandle<I>`.
- `include/Void/Service/Registry.hpp` + `src/Service/Registry.cpp`:
- Preserve 100% of existing `ServiceRegistry` API (`provide<I>`, `remove<I>`, `get<I>`, `require<I>`, `has<I>`, `start_all`, `stop_all`, `size`).
- Immutable `SnapshotData` swapped atomically under a short guard; old snapshots, destructors, and observers released/invoked outside locks.
- `start_all()`/`stop_all()` copy retained lifecycle list under short lock and invoke callbacks outside locks.
- `ServiceSnapshot` retaining `parent_snapshot` `shared_ptr` so child snapshots outlive parent registries; `snapshot()`, `from_parent_snapshot()`, `refresh_parent()`.
- `acquire<I>() -> Result<ServiceHandle<I>>` returning `service_stopping` when closed or `missing_service` when absent, pinning generation lifetime until handle drop.
- `ProviderSet` (`add`, `add_alias` sharing one lifecycle node per object pointer), `PreparedPublication`, `prepare_batch` (topological sort + cycle/duplicate/missing-dep/limit validation), `start_staged` (topological start + `abort_start()` + reverse rollback preserving active snapshot), `publish` (epoch check + retention cap + atomic swap), `start`, `close_and_join` (dependent-first stop + `incomplete_owners` reporting without freeing live providers), `retained_generation_count()`.
- `include/Void/Service/PluginService.hpp`: preserved `PluginServiceBinding<I>` + `acquire_plugin_service<I>` pinning exact `PluginHandle` via `ServicePin`.
- Tests & consumers: `tests/standalone/Service/ServiceHardening.cpp`, `tests/package/ServiceOnly/*`, `tests/package/ServicePluginOnly/*`, updated `tests/package/InstalledComponents.cmake`.
## Verification Criteria
- Standalone `Service;ServicePlugin;Testing` RelWithDebInfo `-Werror`: `Service*` tests + `ctest` 2/2 (`ServiceOnly`, `ServicePluginOnly`).
- Full Wave 8 RelWithDebInfo `-Werror`, ASan+UBSan `-Werror`, and Wave 8 TSan.
@@ -0,0 +1,27 @@
# Task Spec: `M-SHORTURL-01..04` — Frozen V1, Additive V2 Local/Durable/Remote Providers & V1 Adapter
- **Branch**: `feat/roadmap-p2-wave9` (baseline `main` at `3e25405`).
- **Roadmap authority**: `docs/roadmap/modules/ShortUrl.md` (`M-SHORTURL-01`..`M-SHORTURL-04`), `ARCHITECTURE.md` C-02..C-05, C-09, C-13.
- **Error domain**: `Void::Result::kShortUrlErrorDomain = 28`.
## Scope & Deliverables
1. **Frozen `V1` Contract (`include/Void/ShortUrl/ShortUrl.hpp`, `docs/short-url.md`)**:
- Zero changes to `Void::ShortUrl::V1` layout, enum ordinals, virtual table order, or `docs/short-url.md`.
- Keep `ShortUrl` module's internal dependencies lightweight (`Service Time`), with zero `Storage`, `Net`, or `Security` dependencies.
2. **Additive `Void::ShortUrl::V2` Core & Local Provider (`include/Void/ShortUrl/V2.hpp`)**:
- `V2ErrorCode` mapped via `kShortUrlErrorDomain = 28` (`InvalidUrl`, `InvalidKey`, `InvalidExpiry`, `Conflict`, `NotFound`, `Expired`, `Revoked`, `Unsupported`, `RateLimited`, `QuotaExceeded`, `IdentityExpired`, `StorageError`, `UnknownOutcome`, `ProviderError`, `Timeout`, `Unavailable`).
- `CreateLink`, `ShortenOptions` (`operation_id`, `idempotency_ttl = 24h`), `Link`, `LinkRecord`, `LinkState::{Active, Revoked}`, `LocalProviderLimits` (`max_url_bytes = 8192`, `max_key_bytes = 64`, `generated_key_length = 16`, `max_collision_retries = 8`, `max_retained_identities = 10000`, `max_entries = 100000`, `max_concurrent_ops = 128`).
- Strict target URL validation (absolute `http`/`https`, no userinfo, no control chars, <= 8 KiB, optional host deny predicate) and custom key validation (1..64 `[A-Za-z0-9_-]`, case-sensitive, reserved route rejection).
- Abstract `LinkRepositoryPort` + `RandomBytesPort`, explicitly nondurable `InMemoryLinkRepository` (for unit/semantics tests), rejection-sampled base62 key generation, atomic conditional insert + idempotency record, civil expiry via injected `Void::Time::CivilClock`, tombstone `revoke()` (never reusing revoked keys), `V1Adapter` implementing `V1::IShortener` without modifying `V1`.
3. **Durable Storage Provider (`src/ShortUrlStorage/module.cmake`, `include/Void/ShortUrlStorage/StorageRepository.hpp`, `src/ShortUrlStorage/StorageRepository.cpp`)**:
- Separate module (`INTERNAL_DEPS ShortUrl Storage Security`) keeping `ShortUrl` free of `Storage`/`libsodium`.
- `StorageLinkRepository` backed by `Void::Storage::Engine` conditional `WriteBatch` (versioned records, atomic link + idempotency commit, tombstone persistence, byte quota enforcement, full recovery across engine reopen) + `SecurityRandomBytesPort` backed by `Void::Security::random_bytes`.
4. **Remote Provider SPI (`src/ShortUrlRemote/module.cmake`, `include/Void/ShortUrlRemote/RemoteProvider.hpp`, `src/ShortUrlRemote/RemoteProvider.cpp`)**:
- Separate module (`INTERNAL_DEPS ShortUrl Net Data`) keeping `ShortUrl` free of `Net`/Boost/OpenSSL.
- `RemoteCapabilities`, `RemoteProviderOptions` (explicit origin, secure `HttpClient`, max 1 MiB response, 10s deadline), `RemoteProvider` checking capability flags before network mutation, preserving `Retry-After` and classifying transport failures after send as `UnknownOutcome` without blind replay, plus loopback fixture tests.
5. **Installed Consumers**:
- `tests/package/ShortUrlOnly/` (`ShortUrl` with zero external packages) + `ShortUrlProviders` in `tests/package/InstalledComponents.cmake`.
## Verification
- Standalone `ShortUrl;ShortUrlStorage;ShortUrlRemote;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`), `ctest` (`ShortUrlOnly`, `ShortUrlProviders`), full `RelWithDebInfo`, Debug `ASan+UBSan`, Debug `TSan`.
@@ -0,0 +1,26 @@
# M-SQLITE-01..05 — Hardened Sqlite C API Integration & Optional SqliteAsync Pool
- **Wave**: Wave 7 (`feat/roadmap-p2-wave7`, branched from `main` at `43922d1`)
- **Roadmap reference**: `docs/roadmap/modules/Sqlite.md`, `docs/roadmap/DEPENDENCIES.md`
- **Supported runtime observed**: SQLite 3.54.0 via Nix `sqlite` package
## Scope & Ownership
- `src/Sqlite/module.cmake`: `INTERNAL_DEPS Functional Time`, `EXTERNAL_DEPS SQLite3::SQLite3`, `EXCLUDE_HEADERS Void/Sqlite/AsyncPool.hpp`.
- `include/Void/Sqlite/Types.hpp`: `kSqliteErrorDomain = 21`, `SqliteErrorCode`, `JournalMode`, `SyncMode`, `BeginMode`, `CheckpointMode`, `TransactionState`, `SqliteLimits`, `OpenOptions`, `EffectiveCapabilities`, `ColumnType`, `ValueView`, `OwnedValue`, `OwnedRow`, `CheckpointReport`, `BackupOptions`, `BackupReport`, `CheckedMigration`, `ConnectionHealth`, `ScopedFaultGuard`.
- `include/Void/Sqlite/Sqlite.hpp` + `src/Sqlite/Sqlite.cpp`:
- Shared `ConnectionState` held by `Database`, `Statement`, `Transaction`, and `Savepoint` so moving/destroying `Database` never leaves dangling pointers.
- Preserve 1.x APIs (`Database::open`, `exec`, `prepare`, `begin`, `last_insert_rowid`, `changes`, `user_version`, `migrate`, `Statement::bind`/`step`/`reset`/`clear_bindings`/column getters, `Transaction::commit`/`rollback`, `Migration`, `OpenMode`).
- Add `open_database(path, OpenOptions)` validating limits/pragmas (`WAL`, `FULL`, `foreign_keys`, disabling extension loading by default, querying effective pragma results).
- Add checked `bind_checked` (positional & named, `ValueView`, `max_value_bytes` cap), borrowed lifetime-owned bindings, `reset_checked`, `clear_bindings_checked`, `finalize_checked`, strict single-statement `prepare` (rejecting non-whitespace trailing SQL), `RowView` with expiration generation, strict typed column reads rejecting coercion, `query_all` with row/byte caps.
- Transaction state machine (`Active`, `Committed`, `RolledBack`, `RecoveryRequired`): never mark `Committed` before `COMMIT` succeeds; inspect `sqlite3_get_autocommit` on error; reject nested `begin`; add RAII `Savepoint`.
- Checked `Database::close()` rejecting with `busy` while statements/transactions/savepoints remain open; deferred close in destructor reports errors to optional diagnostic hook.
- Validate migration lists before any SQL; add `migrate_checked` recording `id`+`checksum` in `_void_schema_migrations` in the same transaction as `PRAGMA user_version` and rejecting newer schemas and checksum drift.
- Operational methods: `checkpoint()`, `backup_to()`, `restore_from()`, `health()`, WAL write-admission threshold gating, and exception-safe `create_scalar_function` / `set_authorizer` adapters.
- `src/SqliteAsync/module.cmake` + `include/Void/Sqlite/AsyncPool.hpp` + `src/SqliteAsync/AsyncPool.cpp`:
- Optional async leased connection pool (default 4 readers + 1 writer, bounded blocking workers, `max_queued_jobs = 1024`, `max_pending_input_bytes = 64 MiB`).
- Leases one connection for the complete read/write/transaction with serialized progress/interrupt cleanup so cancellation never leaks to the next borrower.
- Tests & consumers: `tests/standalone/Sqlite/SqliteHardening.cpp`, `tests/standalone/SqliteAsync/SqliteAsync.cpp`, `tests/package/SqliteOnly/*`, `tests/package/SqliteAsyncOnly/*`, updated `tests/package/InstalledComponents.cmake`.
## Verification Criteria
- Standalone `Sqlite;SqliteAsync;Testing` RelWithDebInfo `-Werror` (`-p sqlite`): all `Sqlite*` tests + `ctest` 2/2 (`SqliteOnly`, `SqliteAsyncOnly`).
- Full Wave 7 integrated RelWithDebInfo `-Werror`, full Debug ASan+UBSan `-Werror`, and Wave 7 Debug TSan subset.
@@ -0,0 +1,27 @@
# Stacktrace Split Capture/Resolve, Bounded Cache, Safe Snippets, and Crash Marker
Task ID: M-STACKTRACE-01..04
Phase: P2
Status: APPROVED
Contracts: C-01, C-02, C-03, C-04, C-05
## 1. Context and baseline
`Void::Stacktrace` currently couples raw capture with demangling, source snippet file reads, and `Void::Log` diagnostics, has no explicit `Capabilities` query or async-signal-safe fatal marker helper, and has no standalone test directory under `tests/standalone/Stacktrace/`.
## 2. Deliverables
- `src/Stacktrace/module.cmake`: add `Time` (`INTERNAL_DEPS Functional Time LogState`)
- `include/Void/Stacktrace/Stacktrace.hpp` & `src/Stacktrace/Stacktrace.cpp`:
- Legacy `StackFrame`, `capture_stacktrace`, `read_source_snippet`, `format_stacktrace`, `print_stacktrace` preserved.
- `kStacktraceErrorDomain = 13` `StacktraceErrorCode` + `make_stacktrace_error`.
- `Capabilities` (`raw_capture`, `symbols`, `line_info`, `async_signal_safe = false`, `backend_name`) + `capabilities() noexcept`.
- `CaptureOptions`, owned `RawFrame` (`address`, `module_offset`, `module_path`, `module_id`), `RawTrace`, `capture()` (validates `1 <= max_frames <= 256`, zero source IO, zero `Void::Log` calls).
- `FrameResolveStatus`, `ResolvedFrame`, `ResolvedTrace`, `ResolveOptions`, `Resolver` (bounded `1024` entries / `4 MiB` cache keyed by `(module_id, module_offset)`, `invalidate_module`, `clear_cache`), `read_source_snippet_checked` (allowed roots, symlink-escape rejection, overflow-safe line math, byte limits), `format_resolved_trace`, `write_fatal_signal_marker(int fd, int sig) noexcept`.
- `tests/standalone/Stacktrace/Stacktrace.cpp`
## 3. Edge cases
- Pre-cancelled `stop_token` and expired `ManualClock` deadline return `incomplete == true` while preserving captured raw frames.
- Path traversal (`..`) and symlinks escaping `allowed_source_roots` fail with `unsafe_path`; `INT_MAX` line arithmetic never overflows.
## 4. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w5-stacktrace -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Stacktrace;Testing" -DVOID_WARNINGS_AS_ERRORS=ON -DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src && cmake --build /tmp/void-w5-stacktrace && /tmp/void-w5-stacktrace/tests/VoidTests --filter "Stacktrace*"'
```
@@ -0,0 +1,27 @@
# System Process, Shared Watcher, Durable Filesystem & Temp Factories
Task ID: M-SYSTEM-01..05
Phase: P2 (Wave 6A)
Status: APPROVED
Contracts: C-01, C-02, C-03, C-04, C-05
## 1. Context and baseline
`Void::System` preserves 1.x APIs (`Void::Process::{run,run_streaming,shell,reexec}`, `Void::FileSystem::{FileWatcher,Path,Query,TempFile,TempDir}`, `Void::SystemInfo::CpuSampler`) while fixing legacy bugs (zero-timeout 30s cutoff, full-duplex pipe deadlock, unescalated `SIGTERM` wait hangs, `SIGPIPE` on pipes, TOCTOU temp creation, unsafe `atomic_write`) and adding `System` (`Types`, `OwnedFd`, `Child`, `spawn`, `communicate_blocking`, `replace_file`, bounded `read_file`/`list_directory`, valid `CpuSampler::sample`) plus `Void::SystemAsync` (`ProcessManager`, async `communicate`/`wait`, shared `WatcherService`, `WatchSubscription`).
## 2. Deliverables
- `src/System/module.cmake` (`INTERNAL_DEPS Functional Time LogState`, `EXCLUDE_HEADERS Void/System/AsyncProcess.hpp Void/System/AsyncWatcher.hpp`) & `src/SystemAsync/module.cmake` (`INTERNAL_DEPS System Async IO Time Functional LogState`).
- `include/Void/System/Types.hpp`: `kSystemErrorDomain = 10`, `SystemErrorCode`, `make_system_error`, move-only `OwnedFd`.
- `include/Void/System/Process.hpp` & `src/System/Process.cpp`: legacy compatibility fixes + `SpawnOptions`, `EnvironmentPolicy`, `CaptureLimits`, `OverflowPolicy`, `kMaxSpawnInputBytes = 256 KiB`, move-only `Child`, `spawn`, `communicate_blocking`, `reexec(..., close_extra_fds)`.
- `include/Void/System/{Path,Query,TempFile,TempDir,Metrics}.hpp`: `read_file_bounded`, `list_directory_bounded`, `replace_file` with `ReplaceDurability`/`ReplacePhase`/`ReplaceFaultHook`, atomic `0600`/`0700` `TempFile`/`TempDir` verified by `(dev, ino)` before removal, `CpuSample`.
- `include/Void/System/{AsyncProcess,AsyncWatcher}.hpp` & `src/SystemAsync/{AsyncProcess,AsyncWatcher}.cpp`: `ProcessManager`, async `communicate`/`wait`/`close_and_join`, shared `WatcherService`, `WatchSubscription`.
- `tests/helpers/ProcessHelper.cpp`, `tests/standalone/System/{ProcessStream,SystemHardening}.cpp`, `tests/standalone/SystemAsync/SystemAsync.cpp`, `tests/package/{SystemOnly,SystemAsyncOnly}/*`.
## 3. Edge cases
- Between `fork()` and `exec*()`, strictly async-signal-safe operations only; `exec_failed` preserves `errno` via `CLOEXEC` error pipe and never collides with child exit `127`.
- `replace_file` cleans only owned temp files before rename and reports `visible_on_disk = true, durability_unknown = true` if post-rename directory `fsync` fails.
- `WatcherService::close_and_join()` drains admitted callbacks and rejects self-join.
## 4. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w6a-system -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="System;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6a-system && /tmp/void-w6a-system/tests/VoidTests --filter "Process*|SystemHardening*|Path*|Query*|TempDir*|TempFile*|Metrics*|FileWatcher*|SignalWatcher*" && ctest --test-dir /tmp/void-w6a-system --output-on-failure --timeout 120'
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w6a-sysasync -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="SystemAsync;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6a-sysasync && /tmp/void-w6a-sysasync/tests/VoidTests --filter "SystemAsync*" && ctest --test-dir /tmp/void-w6a-sysasync --output-on-failure --timeout 120'
```
@@ -0,0 +1,38 @@
# Testing Per-Run Reporters, Subprocess Isolation, and Deterministic Harness
Task ID: M-TESTING-02, M-TESTING-03
Phase: P1
Status: APPROVED
Contracts: C-01, C-04, C-16
## 1. Context and baseline
`Testing` (`Runner.cpp`, `Assert.cpp`, `Config.hpp`, `JUnitReporter.cpp`) currently uses a process-global static `std::ofstream` for JUnit reporting, silently turns malformed regex or empty explicit filter selections into passing 0-test runs, retains unbounded per-test assertions, and lacks owned `FailureCapture`, isolated subprocess test execution, versioned deterministic property shrinking, and clock/order-controlled `DeterministicRun`.
## 2. Deliverables
- Updated `include/Void/Testing/{Config,Assert,Runner}.hpp` and `src/Testing/{Assert,Runner}.cpp`:
- Per-run owned JUnit stream checking open/write health cleanly.
- Strict CLI/config validation (invalid regex, unknown reporter, unopenable output path, empty selection without `--allow-empty` fail with exit code 2).
- Bounded per-test assertion retention (`1000` assertions / `1 MiB` diagnostics) and stray-assertion counter.
- Single-teardown fixture lifecycle recording teardown errors in `cleanup_error` without masking primary test failure.
- `--selftest-child <abort|hang|flood>` fixtures inside `Runner::main`.
- New `include/Void/Testing/Capture.hpp` (`FailureCapture`) and `include/Void/Testing/{Subprocess.hpp}` + `src/Testing/Subprocess.cpp` (`current_executable_path`, `run_isolated_subprocess`, `ProcessTestOptions`, `ProcessOutcome`, `ProcessTestResult`).
- New `include/Void/Testing/Deterministic.hpp` (`ReplayToken`, version-1 rejection-mapped `DeterministicRng`, `check_property` with shrinking & budget-exhaustion `inconclusive`, and `DeterministicRun` schedule/clock/timer harness).
- Tests in `tests/standalone/Testing/{FrameworkHardening,Deterministic}.cpp`.
## 3. Exact files and interfaces
- `include/Void/Testing/{Config,Assert,Runner,Capture,Subprocess,Deterministic}.hpp`
- `src/Testing/{Assert,Runner,Subprocess}.cpp`
- `tests/standalone/Testing/{FrameworkHardening,Deterministic}.cpp`
## 4. Edge cases
- Child process `flood` saturating stdout and stderr concurrently drains via non-blocking `poll` with bounded truncation without pipe deadlock.
- Child process `hang` beyond `ProcessTestOptions::timeout` terminates via `SIGKILL` and reports `ProcessOutcome::timed_out`.
- Child process `abort` reports `ProcessOutcome::crashed` (`SIGABRT`) safely even under ASan/UBSan.
- Property shrinking preserves counterexample failure category and reports `inconclusive` on step, time, or discard exhaustion.
## 5. Acceptance criteria
- `FrameworkHardening*|Deterministic*|Math*|ContainerFixture*|StructRepr*` and full 1,345+ `VoidTests` pass under RelWithDebInfo `-Werror` and ASan+UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4b-testing -G Ninja -DVOID_ENABLED_MODULES="Core;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4b-testing && /tmp/void-w4b-testing/tests/VoidTests --filter "FrameworkHardening*|Deterministic*|Math*|ContainerFixture*|StructRepr*" && ctest --test-dir /tmp/void-w4b-testing --output-on-failure --timeout 60'
```
@@ -0,0 +1,28 @@
# Task Spec: `M-TESTINGMOCK-01..04` — Deterministic Sessions, Action-Outside-Lock, Move-Only Forwarding & Matcher Combinators
- **Branch**: `feat/roadmap-p2-wave9` (baseline `main` at `3e25405`).
- **Roadmap authority**: `docs/roadmap/modules/TestingMock.md` (`M-TESTINGMOCK-01`..`M-TESTINGMOCK-04`), `ARCHITECTURE.md` C-02..C-05.
- **Error domain**: `Void::Result::kTestingMockErrorDomain = 27`.
## Scope & Deliverables
1. **Preserve 1.x API & Existing Tests**:
- Existing `Mock<Derived>`, `MockBase`, `MockFunction<R(Args...)>`, `Matcher<T>`, `Eq`, `_`, `Lt`, `Le`, `Gt`, `Ge`, `Range`, `Pred`, `StartsWith`, `Contains`, and all existing tests under `tests/standalone/TestingMock/` continue compiling and passing unchanged.
2. **Matcher Combinators (`include/Void/TestingMock/Matcher.hpp`)**:
- Add `Ne`, `EndsWith`, `Not`, `AllOf`, `AnyOf`, `IsNull`, `NotNull`, with bounded description/nesting depth (`kMaxMatcherDepth = 32`).
3. **Explicit Session, Sequences, Limits & Tokens (`include/Void/TestingMock/Session.hpp`)**:
- `Concurrency::{SingleThread, ConcurrentActions}`.
- `MockLimits{max_expectations = 1024, max_matchers = 64, max_events = 4096, max_diagnostic_bytes = 4 MiB, max_arg_render_bytes = 4 KiB}` (zero means zero capacity, never unlimited).
- `Sequence`: explicit per-group call ordering independent of global registration order.
- `Verification`: structured report (`ok()`, `unmet`, `excess`, `unmatched`, `prohibited`, `matcher_errors`, `threading_errors`, `events_truncated`, `total_events`, `format()`), idempotent across repeated calls.
- `MockSession`: `freeze(Concurrency)` (mutating a frozen session returns `ErrorKind::invalid_argument` / `InvalidState`), `verify_and_close()` (drains/joins active calls; returns `WouldDeadlock` if called from inside an active action), bounded event log with truncation tracking, RAII `RegistrationToken` stopping admission and waiting for admitted calls on unregister.
4. **Hardened `Expectation` & `SessionMockFunction` (`include/Void/TestingMock/Expectation.hpp`, `include/Void/TestingMock/MockFunction.hpp`)**:
- Action-outside-lock reservation protocol: snapshot immutable candidates under short lock -> evaluate matchers outside lock (catching matcher exceptions as `MatcherFailure`) -> reacquire lock to reserve matching unsaturated expectation & sequence slot -> release lock -> execute action -> decrement in-flight counter & record completion.
- Same-thread reentrant calls succeed in `SingleThread`; cross-thread concurrent entry in `SingleThread` reports deterministic threading violation; `ConcurrentActions` permits concurrent action execution safely.
- Perfect argument forwarding (`Args&&...`) to actions; `returns_once(U&&)` for move-only return types (`std::unique_ptr`), `invokes_once(F&&)` for one-shot move-only callables, `at_least(n)`, `at_most(n)`, `between(min, max)`, `never()` (checked before ordinary candidates), `in_sequence(Sequence&)`.
- Non-default-constructible return type on unmatched call records failure and throws TestingMock's invocation-abort exception (never `R{}` fallback).
5. **Installed Consumer (`tests/package/TestingMockOnly/`)**:
- Register `TestingMockOnly` in `tests/package/InstalledComponents.cmake` with `_no_external_deps`.
## Verification
- Standalone `TestingMock;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`), `ctest` `TestingMockOnly`, Debug `ASan+UBSan`, Debug `TSan` (concurrent action reservation & dynamic unregister races).
+29
View File
@@ -0,0 +1,29 @@
# Text ASCII Helpers, View Splitting, and Bounded Growth
Task ID: M-TEXT-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-05, C-13
## 1. Context and baseline
`src/Text/module.cmake` declares zero dependencies. `include/Void/Text/Str.hpp` currently uses `std::isspace`/`std::tolower`/`std::toupper`/`std::isalpha`/`std::isdigit`/`std::isalnum` without an explicit locale-free ASCII byte contract (`0..127` classified, bytes `>= 128` preserved unchanged) and lacks overflow/output-bounded splitting, replacing, repeating, and joining utilities.
## 2. Deliverables
- Extended `include/Void/Text/Str.hpp` adding `constexpr noexcept` ASCII-only classifiers, `trim_*_ascii`, `to_lower_ascii`/`to_upper_ascii`, and `iequals_ascii`.
- New `include/Void/Text/Bounded.hpp` defining `Void::Text::{TextLimits, TextError, EmptyParts, split_views, replace_bounded, repeat_bounded, join_bounded}` and re-exporting ASCII helpers.
- Tests in `tests/standalone/Text/Str.cpp` and `tests/standalone/Text/Bounded.cpp`.
## 3. Exact files and interfaces
- `include/Void/Text/Str.hpp`: keep all 1.x `Void::Str` signatures intact; add `is_ascii_*`, `to_*_ascii_char`, `trim_{left,right,}_ascii`, `to_{lower,upper}_ascii`, `is_{alpha,digit,alnum}_ascii`, `iequals_ascii`.
- `include/Void/Text/Bounded.hpp`: `TextLimits` (`max_input=16MiB`, `max_output=16MiB`, `max_parts=65536`), `TextError`, `split_views`, `replace_bounded`, `repeat_bounded`, `join_bounded`.
## 4. Edge cases
- High bytes `0x80..0xFF` and multi-byte UTF-8 sequences preserved untouched by ASCII trim/case helpers; embedded NUL bytes preserved.
- Empty delimiter/needle rejected with `TextError::Code::invalid_rule`; oversized input/parts/output rejected BEFORE allocating; `SIZE_MAX` count*size multiplication rejected with `TextError::Code::overflow`; shrinking `replace_bounded` verified cleanly.
## 5. Acceptance criteria
- `Str*` and `Bounded*` tests plus full `Text;Testing` suite pass under `-DVOID_WARNINGS_AS_ERRORS=ON` without Unicode linkage.
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-p1-text -G Ninja -DVOID_ENABLED_MODULES="Text;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-p1-text && /tmp/void-p1-text/tests/VoidTests --filter "Str*|Bounded*" && ctest --test-dir /tmp/void-p1-text --output-on-failure --timeout 60'
```
+32
View File
@@ -0,0 +1,32 @@
# Time Injected Clocks and Bounded Stopwatch
Task ID: M-TIME-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-04, C-05
## 1. Context and baseline
`include/Void/Time/Stopwatch.hpp` hardcodes `std::chrono::steady_clock::now()`, grows `laps_` without bound, and lacks `resume()`. No injectable `MonotonicClock` / `CivilClock` / `ManualClock` interface exists yet for deterministic testing or Async deadlines.
## 2. Deliverables
- `include/Void/Time/Clock.hpp` (`MonotonicClock`, `CivilClock`, `SystemMonotonicClock`, `SystemCivilClock`, `ManualClock`, `ManualCivilClock`, `remaining_until`).
- Updated clock-injectable, bounded `Stopwatch` (`resume`, single-sample `split`, `try_lap` capped at 4,096) and `ScopedTimer` clock overload in `include/Void/Time/Stopwatch.hpp`.
- `tests/standalone/Time/Clock.cpp` and deterministic tests in `tests/standalone/Time/Stopwatch.cpp`.
## 3. Exact files and interfaces
- `include/Void/Time/Clock.hpp`: atomic nanosecond storage in `ManualClock`/`ManualCivilClock`, checked `advance` (`negative_step`, `overflow`), monotonic `set` in `ManualClock`, `remaining_until(clock, deadline)`.
- `include/Void/Time/Stopwatch.hpp`: `StopwatchError { not_running, lap_limit_reached }`, `kDefaultMaxLaps = 4096`, borrowed `MonotonicClock` constructors, `resume()`, `try_lap()`, single-sample `split()`, legacy `lap()` compatibility.
## 4. Edge cases
- `ManualClock::advance` with negative duration or `INT64_MAX` overflow leaves time unchanged and returns `ClockError`.
- `Stopwatch::start() -> stop() -> advance(clock) -> resume()` preserves prior elapsed & laps without counting stopped idle time.
- `try_lap()` at `max_laps_` returns `lap_limit_reached` without growing `laps_`.
## 5. Acceptance criteria
- Existing sleep-based `Time`/`Stopwatch` tests pass; deterministic `ManualClock` tests run with zero sleeps under `-Werror`.
## 6. Verification commands
```sh
dev cpp-gcc -c cmake -S . -B /tmp/void-p1-time -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Time;Testing" -DVOID_WARNINGS_AS_ERRORS=ON
dev cpp-gcc -c cmake --build /tmp/void-p1-time --parallel 4
dev cpp-gcc -c /tmp/void-p1-time/tests/VoidTests --filter "Clock*|Stopwatch*|Time*"
```
@@ -0,0 +1,28 @@
# Update Verify-Before-Parse, Replay Floor, Trust Store, Pinned Pruning & Recoverable Install Coordinator
Task ID: M-UPDATE-01..06
Phase: P2 (Wave 6B)
Status: APPROVED
Contracts: C-02, C-03, C-04, C-05, C-06, C-07, C-09, C-10
## 1. Context and baseline
`Void::Update` preserves existing feed/component verification, readable envelopes, greatest-compatible-version selection, and `VersionStore` durable activation/commit/rollback/reconcile/external-health semantics while fixing the schema-3 verify-before-payload-parse bug in `src/Update/Feed.cpp`, introducing explicit `SchemaParsePolicy` (`LegacyGeneralJson` vs `StrictJsonProfile`), non-forgeable `VerifiedSelection`, durable monotonic `ReplayFloorStore`, explicit `TrustStore` rotation/revocation, pin-aware bounded `VersionStore::pruneWithPins`, checksummed `OperationJournal`, and `InstallCoordinator` integrating `Archive`'s staged atomic publication and `VersionStore`'s single commit boundary.
## 2. Deliverables
- `src/Update/module.cmake` (`INTERNAL_DEPS Archive Crypto Data Functional System Text Time`).
- `include/Void/Update/Types.hpp`: `kUpdateErrorDomain = 20`, `UpdateErrorCode`, `make_update_error`, `SchemaParsePolicy`, `InstallState`, `ActivationMode`, `ReleaseIdentity`, `InstallReceipt`, `InstallOptions` (1 active, 8 queued, 2 concurrent downloads, 512 MiB artifact, 2 GiB staging quota, 32 components, 256 edges, 10m deadline, 30s readiness, 1s probe interval, 3 consecutive healthy, 2 retained previous, 16 prune batch).
- `include/Void/Update/Feed.hpp` & `src/Update/Feed.cpp`: move `Crypto::verifyEd25519` strictly BEFORE payload JSON parsing/comparison in schema-3 `verifyEnvelope`, support `SchemaParsePolicy::StrictJsonProfile` (integer-only strict JSON via `Void::Json::Strict::ParseOptions{.allowDecimals = false}`), add non-forgeable `VerifiedSelection` + `verify_and_select_release` / `verify_and_select_component_set`.
- `include/Void/Update/VersionStore.hpp` & `src/Update/VersionStore.cpp`: add `PruneReport` and `pruneWithPins(retainedPreviousVersions, pinnedVersions, batchLimit = 16)`.
- `include/Void/Update/Install.hpp` & `src/Update/Install.cpp` (included from `Update.hpp`): `ReplayFloorStore` (atomic via `Void::FileSystem::replace_file`, monotonic across restarts/key rotations/clock rollback), `TrustStore` (bootstrap, authenticated rotation, revocation), `ArtifactTransport` + `LocalFileArtifactTransport`, `LifecycleHooks`, checksummed `OperationJournal` (`RecoveryRequired` on unknown/corrupt), and `InstallCoordinator` (`install`, idempotent `reconcile`, `retry_cleanup`, `shutdown`).
- `tests/standalone/Update/UpdateHardening.cpp`, `tests/package/UpdateOnly/*`, registered in `tests/package/InstalledComponents.cmake`.
## 3. Edge cases
- Invalid signature over malformed JSON payload in schema-3 envelopes fails at signature verification without ever invoking payload JSON parsing.
- Replay floor never decreases on restart, key rotation, or civil-clock rollback.
- Post-commit cleanup/prune failures transition receipt to `CleanupPending` with retryable diagnostics and NEVER trigger rollback; calling `rollback` after durable healthy marker preserves the committed candidate.
- Unknown/corrupt operation journal entries halt automation with `RecoveryRequired` without discarding evidence.
- Pinned versions cannot be pruned; prune reports skipped-pin pressure rather than breaking live pins.
## 4. Verification commands
```sh
dev cpp-gcc -p libarchive -p openssl -c bash -lc 'cmake -S . -B /tmp/void-w6b-update -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Update;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6b-update && /tmp/void-w6b-update/tests/VoidTests --filter "Update*|update_*|component_feed_*|readable_component_*|version_store_*" && ctest --test-dir /tmp/void-w6b-update --output-on-failure --timeout 120'
```
@@ -0,0 +1,38 @@
# Algorithms Indexed Graph Views, Work Budgets, and Iterative Traversals/Topology
Task ID: S-ALGORITHMS-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-05, C-07
## 1. Context and baseline
VoidLibrary currently has no `Algorithms` module (`src/Algorithms/module.cmake`, `include/Void/Algorithms/`). Graph algorithms are needed as a standalone header-only module with strict dependency discipline (`INTERNAL_DEPS Core Math`), zero unbounded recursion, pre-checked scratch memory budgets, overflow-safe sizing via `Void::Numeric`, and safe cancellation / concurrent graph mutation detection.
## 2. Deliverables
- `src/Algorithms/module.cmake` declaring `INTERNAL_DEPS Core Math`.
- New `include/Void/Algorithms/Graph.hpp` defining `Void::Algorithms::{WorkLimits, AlgorithmError, Topology, TraversalResult, ShortestPathResult, IndexedGraphView, HasVersionStamp, AdjacencyView}` and iterative `bfs`, `dfs`, `shortest_path_unweighted`, and `topological_order`.
- Comprehensive unit and edge-case tests in `tests/standalone/Algorithms/Graph.cpp`.
- Package consumer `tests/package/AlgorithmsOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake` (`Algorithms Math Core`).
## 3. Exact files and interfaces
- `src/Algorithms/module.cmake`
- `include/Void/Algorithms/Graph.hpp`
- `tests/standalone/Algorithms/Graph.cpp`
- `tests/package/AlgorithmsOnly/CMakeLists.txt`
- `tests/package/AlgorithmsOnly/main.cpp`
- `tests/package/InstalledComponents.cmake`
## 4. Edge cases
- Out-of-range source/target vertex IDs or `vertex_count()` exceeding `WorkLimits` rejected before scratch allocations.
- Overflowing edge/vertex scratch budget calculations rejected using `Void::Numeric::checked_mul`/`checked_add`.
- Out-of-range neighbor IDs in adjacency lists diagnosed cleanly without out-of-bounds vector access.
- Deep graphs (`> 100k` vertices / chains) execute strictly iteratively with no stack overflow.
- `topological_order` uses Kahn's algorithm and, on cycle detection, runs iterative 3-color DFS to extract a deterministic cycle witness `[u0, ..., uk, u0]`.
- Periodic `std::stop_token` and `HasVersionStamp::version()` checks abort mid-traversal with `cancelled` / `concurrent_modification`.
## 5. Acceptance criteria
- `Graph*` tests and `VoidInstalledComponentConsumers` (`AlgorithmsOnly`) pass under `-DVOID_WARNINGS_AS_ERRORS=ON` and ASan/UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4a-alg -G Ninja -DVOID_ENABLED_MODULES="Algorithms;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4a-alg && /tmp/void-w4a-alg/tests/VoidTests --filter "Graph*" && ctest --test-dir /tmp/void-w4a-alg --output-on-failure --timeout 60'
```
@@ -0,0 +1,39 @@
# S-DISCOVERY-01..04 — Discovery Subsystem (Catalog, Leases, Watches, Selectors, Optional RPC Adapter)
## Scope
Implement the P1–P3 native `Void::Discovery` subsystem per `docs/roadmap/subsystems/Discovery.md` and `docs/roadmap/DEPENDENCIES.md`, plus the optional `Void::DiscoveryRpc` endpoint adapter living strictly above `RPC` and `Discovery`:
1. **`S-DISCOVERY-01` — Boundary, Error Domain, and Immutable Value Contracts**:
- Module `src/Discovery/module.cmake` (`INTERNAL_DEPS Core Functional Time Async`) with zero network, storage, or consensus dependencies.
- Error domain `kDiscoveryErrorDomain = 30` with `DiscoveryErrorCode` covering validation, conflict, cap exhaustion, expiry, stale/unavailable freshness, cancellation, and self-join diagnosis.
- Strict endpoint/attribute validation before publication (valid scheme/host/port, `weight > 0`, `max_attributes_per_record = 16`, `max_metadata_bytes_per_record = 4096`, `max_services = 1024`, `max_endpoints_per_service = 256`, `max_total_records = 10000`).
2. **`S-DISCOVERY-02` — Pure Catalog, Atomic Static Snapshots, and Local RAII Registrations**:
- Pure `Catalog` construction creating zero hidden threads.
- Atomic candidate `replace_static()` rejecting invalid/conflicting candidates while preserving the active revision; explicit `provider_generation` bump resets revision domain and emits `ResyncRequired`.
- Local move-only RAII `Registration` handles with explicit `LeasePolicy` (default 30s TTL / 10s renew interval via injected `MonotonicClock`; zero TTL rejected as `InvalidArgument`; unleased explicit mode valid until release; static entries never expire).
- Duplicate `(service, instance)` returns `Conflict` without stealing existing handles.
- Deterministic `resolve()` sorted by `instance`, filtering logically expired records before cleanup runs, respecting `ResolvePolicy::allow_stale` and `Freshness`.
3. **`S-DISCOVERY-03` — Bounded Watches, Resync, Client Selectors, and Managed Renewal**:
- Bounded `watch()` (`max_watches = 1024`, `max_events_per_watch = 64`, shared `16 MiB` event budget) emitting `InitialSnapshot`, serialized per-watch `Delta`, and explicit `ResyncRequired` + full latest `Snapshot` on overflow or provider-generation reset.
- Callbacks run outside catalog and watch locks; `cancel()` stops new admission (including self-cancel inside a callback); `join()` drains admitted callbacks and diagnoses synchronous self-join (`SelfJoin`) instead of deadlocking.
- `Catalog::shutdown_and_join()` removes local entries, cancels watches, and joins admitted callbacks; destructor only requests stop.
- `WeightedRoundRobinSelector`, stable HRW `AffinitySelector`, and deterministic `ManagedLeaseRenewer`.
4. **`S-DISCOVERY-04` — Optional RPC Integration (`DiscoveryRpc`)**:
- Separate module `src/DiscoveryRpc/module.cmake` (`INTERNAL_DEPS Discovery RPC`) so `RPC` remains completely independent of `Discovery`.
- `EndpointResolverClient` resolves endpoints from `Discovery::Catalog`, selects via client selector, preserves configured `expected_tls_name` / identity across IP/address refreshes (rejecting TLS scheme/identity downgrade), and executes unary calls via `Void::RPC::Client`.
## File Ownership
- `include/Void/Discovery/{Types,Catalog}.hpp`
- `src/Discovery/{module.cmake,Catalog.cpp}`
- `include/Void/DiscoveryRpc/EndpointAdapter.hpp`
- `src/DiscoveryRpc/{module.cmake,EndpointAdapter.cpp}`
- `tests/standalone/Discovery/Catalog.cpp`
- `tests/standalone/DiscoveryRpc/EndpointAdapter.cpp`
- `tests/package/DiscoveryOnly/{CMakeLists.txt,main.cpp}`
- `tests/package/InstalledComponents.cmake`
## Acceptance & Verification
- Standalone `Discovery;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`) + `DiscoveryOnly` consumer with `_no_external_deps`.
- `DiscoveryRpc` identity-preserving refresh + RPC round-trip tests; `RpcOnly` remains Discovery-free.
- Deterministic fake-clock lease expiry/renewal, atomic bad/good config replacement, duplicate registration conflict, watch overflow -> `ResyncRequired`, self-cancel/self-join, and selector determinism.
- Full `RelWithDebInfo`, `Debug` `ASan+UBSan`, and `Debug` `TSan` with 0 leaks, 0 UB, 0 races.
+37
View File
@@ -0,0 +1,37 @@
# IO Portable Driver, BufferLease, Mock Backend, and Linux Epoll Driver
Task ID: S-IO-01, S-IO-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-02, C-03, C-04, C-06
## 1. Context and baseline
VoidLibrary currently has no `IO` module (`src/IO/`, `include/Void/IO/`). Now that `Async` (`M-ASYNC-02`, `M-ASYNC-03`) and `Time` (`M-TIME-02`) are in place, `IO` can expose a dependency-minimal native descriptor/stream layer (`INTERNAL_DEPS Core Functional Time Memory Async`) with zero dependency on `Net`, `Runtime`, `System`, or `Log`.
## 2. Deliverables
- `src/IO/module.cmake` (`INTERNAL_DEPS Core Functional Time Memory Async`).
- `include/Void/IO/Types.hpp`: `IoErrorCode` (`kIoErrorDomain = 8`), `make_io_error`, `Transfer`, `ComposedTransferError`, `IoLimits`, `BackendPreference`, `BackendOptions`, `DescriptorId`, `DriverTelemetry`, and PMR/quota-tracked `BufferLease`.
- `include/Void/IO/Driver.hpp`, `include/Void/IO/Stream.hpp`, `src/IO/EpollDriver.cpp`:
- `Driver` (`create`, `allocate_buffer`, `create_mock_stream`, `mock_controller`, `adopt_fd`, `create_socket_pair`, `poll_once`, `wake`, `request_stop`, `shutdown_and_join`, `telemetry`, `active_backend`).
- `ByteStream` (`read_some`, `write_some`, `read_some_owned`, `write_some_owned`, `close_and_join`) plus composed `read_exact` / `write_all`.
- Portable `MockBackend` for deterministic concurrency/stop-race verification and Linux level-triggered `EpollBackend` (no `EPOLLET`, `eventfd` wakeups, `(slot, generation)` tokens).
- `tests/standalone/IO/IoDriver.cpp` and installed package consumer `tests/package/IOOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake`.
## 3. Exact files and interfaces
- `src/IO/module.cmake`, `src/IO/EpollDriver.cpp`
- `include/Void/IO/{Types,Driver,Stream}.hpp`
- `tests/standalone/IO/IoDriver.cpp`
- `tests/package/IOOnly/{CMakeLists.txt,main.cpp}`, `tests/package/InstalledComponents.cmake`
## 4. Edge cases
- Zero-length `read_some`/`write_some` succeeds immediately (`Transfer{0, false}`) without probing EOF.
- Same-direction overlapping operation on a stream rejects with `IoErrorCode::busy`; simultaneous `read_some` + `write_some` succeeds.
- Pre-stopped options or expired injected `MonotonicClock` deadline rejected before backend submission; active ops never resume continuations while backend holds `backend_refs` or borrowed buffers.
- Linux epoll level-triggered handling handles `EAGAIN`/`EINTR`/short transfers, drains buffered data before `EOF`/`HUP`, ignores stale `(slot, generation)` events after fd reuse, and keeps `EPOLLOUT` disabled when no write is pending.
## 5. Acceptance criteria
- `Io*` tests and `VoidInstalledComponentConsumers` (`IOOnly`) pass under `-DVOID_WARNINGS_AS_ERRORS=ON`, ASan+UBSan, and Debug TSan (`-DVOID_ENABLE_TSAN=ON`).
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4b-io -G Ninja -DVOID_ENABLED_MODULES="IO;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4b-io && /tmp/void-w4b-io/tests/VoidTests --filter "Io*" && ctest --test-dir /tmp/void-w4b-io --output-on-failure --timeout 60'
```
+27
View File
@@ -0,0 +1,27 @@
# IPC Wire Codec, Quota Reservations, Local UDS/Pipe Transport, and Session
Task ID: S-IPC-01..03
Phase: P2 (Wave 6A)
Status: APPROVED
Contracts: C-01, C-02, C-03, C-04, C-05
## 1. Context and baseline
New subsystem `Void::IPC` (`src/IPC/module.cmake`, `INTERNAL_DEPS Core Functional Memory Time Binary Async IO Resilience`) providing V1 `VDIP` 24-byte big-endian framed RPC/messaging over pathname `AF_UNIX` `SOCK_STREAM` and supervised child pipe pairs (`adopt_pipe_pair`).
## 2. Deliverables
- `include/Void/Functional/Error.hpp`: reserve `kIpcErrorDomain = 16` (plus remaining P2 domains `17..21`).
- `include/Void/IPC/{Types,Codec,Transport,Session,IPC}.hpp` & `src/IPC/{Codec,Transport,Session}.cpp`:
- `IpcErrorCode`, `IpcLimits`, `EffectStatus`, `CallFailure`, `PeerCredentials`, `PeerPolicy`, `HelloInfo`.
- V1 24B `VDIP` codec + `BufferQuota`/`QuotaPermit` + incremental `FrameDecoder` validating magic/version/flags/stream/request ID/limits and reserving global (`64 MiB`) + per-session quotas before payload allocation.
- `LocalListener` (0700 owned parent dir, `sun_path < 108`, startup `flock` + failed `connect` stale cleanup, `SOCK_NONBLOCK|SOCK_CLOEXEC`, `fchmod(0600)` before `bind()`, `SO_PEERCRED`), `connect_local`, `adopt_pipe_pair` (`PeerCredentials::available == false`).
- Full-duplex `Session` (`handshake`, `start`, `request`, `send_one_way`, `send_goaway`, `close_and_join` rejecting `self_join`), monotonic request IDs, `TokenBucket` per-peer rate limit, reserved control lane (`8 KiB`/`16` frames), `256` late-response tombstones, advisory `cancel`, single terminal completion, zero auto-replay.
- `tests/standalone/IPC/Ipc.cpp` & `tests/package/IPCOnly/*`.
## 3. Edge cases
- Oversize/corrupt headers fail before any payload allocation or quota charge.
- Saturated data lane still delivers reserved control-lane `cancel`/`overloaded`/`rate_limited` replies without deadlock.
- Peer disconnect faults active requests once with `transport_lost` and `EffectStatus::unknown`.
## 4. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w6a-ipc -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="IPC;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w6a-ipc && /tmp/void-w6a-ipc/tests/VoidTests --filter "Ipc*" && ctest --test-dir /tmp/void-w6a-ipc --output-on-failure --timeout 120'
```
@@ -0,0 +1,36 @@
# NEW Memory Subsystem Core Allocators and Resources
Task IDs: S-MEMORY-02, S-MEMORY-03, S-MEMORY-04
Phase: P1
Status: APPROVED
Contracts: C-01, C-04, C-05
## 1. Context and baseline
No `src/Memory` module or `include/Void/Memory` headers exist yet. Containers and future IO/Storage modules need bounded PMR budget tracking, bump arenas with checkpoints/typed destructor scopes, and fixed-size block pools.
## 2. Deliverables
- `src/Memory/module.cmake` (`INTERFACE`, depending only on `Core`).
- `include/Void/Memory/{Resource.hpp,BudgetResource.hpp,Arena.hpp,BlockPool.hpp}`.
- `tests/standalone/Memory/{BudgetResource.cpp,Arena.cpp,BlockPool.cpp}`.
- `tests/package/MemoryOnly/{CMakeLists.txt,main.cpp}` wired into `tests/package/InstalledComponents.cmake`.
## 3. Exact files and interfaces
- `Resource.hpp`: `AllocationError`, `UnlimitedTag`/`unlimited`, `ResourceStats`, `is_valid_alignment`.
- `BudgetResource.hpp`: atomic CAS `std::pmr::memory_resource` with reservation rollback on upstream `std::bad_alloc`, overflow detection, zero-limit positive rejection.
- `Arena.hpp`: fixed, growing, and initial+growing modes (`64 KiB` slab, `1 MiB` geometric cap, `16 MiB` default max), address-aligned bump allocation (explicit 1-byte reservation for 0-byte calls), `Checkpoint`/`rewind`/`reset` with generation checks, `TypedScope` (reverse dtor order, exception-safe `emplace`, 4,096 default registrations), `ArenaResource`.
- `BlockPool.hpp`: per-slab intrusive free lists (zero allocations on `deallocate`, safe `trim_idle` of completely idle slabs, default 4,096 blocks / 16 MiB cap) and `SynchronizedBlockPool`.
## 4. Edge cases
- Over-aligned (`alignas(64)`) allocation inside a misaligned/stack fixed buffer aligns the actual pointer address rather than only the offset.
- Stale checkpoint after `reset()` returns `invalid_checkpoint`; `reset()`/`rewind()` while a `TypedScope` is live returns `live_allocations`.
- `BlockPool::trim_idle()` never touches slabs with live blocks and maintains intact per-slab free lists.
## 5. Acceptance criteria
- Standalone `-DVOID_ENABLED_MODULES=Memory -DVOID_ENABLE_TESTING=OFF` installs and runs `MemoryOnly` with zero external packages.
- All Memory tests pass under ASan/UBSan and `-Werror`.
## 6. Verification commands
```sh
dev cpp-gcc -c cmake -S . -B /tmp/void-p1-memory -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DVOID_ENABLED_MODULES="Memory;Testing" -DVOID_WARNINGS_AS_ERRORS=ON
dev cpp-gcc -c cmake --build /tmp/void-p1-memory --parallel 4
dev cpp-gcc -c ctest --test-dir /tmp/void-p1-memory --output-on-failure --timeout 60
```
@@ -0,0 +1,41 @@
# S-MESSAGING-01..04 — Messaging Subsystem (Delivery Model, Ephemeral Queue, Durable Storage Queue, Outbox/Inbox, RPC Adapter)
## Scope
Implement the P1–P3 native `Void::Messaging` subsystem, `Void::MessagingStorage` durable adapter + outbox/inbox helper, and `Void::MessagingRpc` remote adapter per `docs/roadmap/subsystems/Messaging.md` and `docs/roadmap/DEPENDENCIES.md`:
1. **`S-MESSAGING-01..02` — Delivery Model, Receipts, State Machine, and Bounded Ephemeral Queue**:
- Module `src/Messaging/module.cmake` (`INTERNAL_DEPS Core Functional Binary Time Async`) with zero `Storage`, `Net`, or `RPC` dependency.
- Error domain `kMessagingErrorDomain = 32` (`MessagingErrorCode`).
- Explicit `PublishDurability::{Memory, Durable}`: `InMemoryQueue` strictly rejects `PublishDurability::Durable` (`UnsupportedDurability`) and `PublishReceipt` records exact durability so nondurable channels never claim durable success.
- Native state machine `Pending -> InFlight(generation, visibility_deadline) -> Acked | Pending | DeadLetter`.
- FIFO per-queue competing consumers and `ConsumerMode::SingleActive` (blocking group head on retry until ack).
- Visibility timeout (default 30s, explicit extension up to 5m via injected `MonotonicClock`), stale-receipt fencing (`StaleReceipt`), idempotent repeat ack, retry bound (default 5 attempts, full jitter 1s..60s via injectable RNG), corrupt-payload quarantine, and bounded caps (768 KiB message, 8 KiB / 32 headers, 1024 queues, 32 groups/queue, 64 in-flight/group, 1024 waiting receives, 64 MiB transient payload budget).
- Clean `close_and_join()` stopping admission, waking/cancelling waiting receives, and draining active deliveries.
2. **`S-MESSAGING-03` — Durable Storage Queue (`MessagingStorage`)**:
- Module `src/MessagingStorage/module.cmake` (`INTERNAL_DEPS Messaging Storage`).
- `StorageQueue` persists payload, sequence, group state, delivery generation/attempt, DLQ records, and bounded 24h / 100k publish idempotency ledger via `Void::Storage::Engine` conditional batches (`Durability::Sync`).
- At idempotency capacity, rejects new publish (`IdempotencyCapacityExceeded`) instead of silently evicting live contracts.
- On restart/reopen, promotes all prior `InFlight` records to `Pending` with bumped generation so stale worker receipts fail with `StaleReceipt`, preserving attempt counters across restarts.
- Atomic DLQ move (DLQ insert + source group removal in one `Storage::Batch`); when DLQ or persistent quota is full, keeps the message durable, drops zero data, blocks affected admission, and exposes `stuck_dlq_count()`.
- Explicit `RetentionPolicy::BlockAtQuota` default (unread work never silently expired) vs opt-in `DropOldestLossy`, pausing expiry when civil clock health fails; `UnknownOutcome` surfaced on uncertain storage commit.
3. **`S-MESSAGING-04` — Outbox/Inbox Local-Batch Helper and Remote RPC Adapter (`MessagingRpc`)**:
- `OutboxInbox` helper in `MessagingStorage` enabling single-batch local business mutation + outbox insert and single-batch local effect + inbox dedup insert, with explicit documentation that external effects remain outside the local batch boundary.
- Separate module `src/MessagingRpc/module.cmake` (`INTERNAL_DEPS Messaging RPC`) exposing `RpcQueueServer` and `RpcQueueClient` for remote `publish`, `receive`, `ack`, `nack`, and `query_receipt` over Wire v1 unary RPC.
## File Ownership
- `include/Void/Messaging/{Types,Queue}.hpp`
- `src/Messaging/{module.cmake,Queue.cpp}`
- `include/Void/MessagingStorage/{StorageQueue,OutboxInbox}.hpp`
- `src/MessagingStorage/{module.cmake,StorageQueue.cpp}`
- `include/Void/MessagingRpc/RpcAdapter.hpp`
- `src/MessagingRpc/{module.cmake,RpcAdapter.cpp}`
- `tests/standalone/Messaging/Messaging.cpp`
- `tests/standalone/MessagingStorage/StorageQueue.cpp`
- `tests/standalone/MessagingRpc/RpcAdapter.cpp`
- `tests/package/MessagingOnly/{CMakeLists.txt,main.cpp}`
- `tests/package/InstalledComponents.cmake`
## Acceptance & Verification
- Standalone `Messaging;MessagingStorage;MessagingRpc;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`) + `MessagingOnly` consumer with `_no_external_deps`.
- Deterministic tests for ephemeral/durable separation, competing vs single-active ordering, visibility expiry & stale receipt fencing, idempotent ack/publish, restart recovery preserving attempts, poison -> atomic DLQ move, DLQ/quota/idempotency cap pressure, clock-health pause, outbox/inbox single-batch atomicity, and remote RPC round-trip.
- Full `RelWithDebInfo`, `Debug` `ASan+UBSan`, and `Debug` `TSan` with 0 leaks, 0 UB, 0 races.
@@ -0,0 +1,31 @@
# Observability Hooks, Context, Metrics, and Tracing
Task ID: S-OBSERVABILITY-01..04
Phase: P2
Status: APPROVED
Contracts: C-01, C-02, C-03, C-04, C-05
## 1. Context and baseline
`ObservabilityHooks` and `Observability` do not yet exist in `src/` or `include/Void/Observability/`. Higher modules need zero-dependency instrumentation hooks, `HookLease` drain lifetimes, immutable `ContextSnapshot` propagation, bounded producer-sharded metrics, head-sampled bounded tracing, and a deterministic text snapshot exporter with zero dependency on `Async`, `IO`, `Runtime`, `Log`, `Net`, `Configuration`, or `System`.
## 2. Deliverables
- `src/ObservabilityHooks/module.cmake` (header-only `Void/Observability/Hooks.hpp`, zero deps)
- `src/Observability/module.cmake` (`INTERNAL_DEPS ObservabilityHooks Core Functional Time Memory`, `EXCLUDE_HEADERS Void/Observability/Hooks.hpp`)
- `include/Void/Observability/Hooks.hpp`: `MetricKind`, `AttributeView`, `MetricPoint`, `DiagnosticEvent`, `ObservationHooks`, `kNullObservationHooks`, `DrainStatus`, `HookRegistrationId`, `HookLease`, `HookSlot`
- `include/Void/Observability/Context.hpp`: `ObservabilityErrorCode`, `make_observability_error` (`kObservabilityErrorDomain = 14`), `TraceId`, `SpanId`, `TraceContext`, `ContextLimits`, `ContextSnapshot`, `ScopedContext`
- `include/Void/Observability/AsyncContext.hpp`: `bind_context`, `ContextAwaitable` (no `#include <Void/Async/...>`)
- `include/Void/Observability/Metrics.hpp` & `src/Observability/Metrics.cpp`: `MetricsLimits`, `InstrumentSpec`, `InstrumentHandle`, `HistogramSnapshot`, `SeriesSnapshot`, `MetricsSnapshot`, `MetricRegistry`
- `include/Void/Observability/Tracing.hpp` & `src/Observability/Tracing.cpp`: `TracingLimits`, `SpanStatus`, `SpanSpec`, `SpanEvent`, `CompletedSpan`, `ExportBatch`, `ExportReport`, `ExportOptions`, `Span`, `SpanExporter`, `CallbackSpanExporter`, `TextSnapshotExporter`, `Tracer`
- `include/Void/Observability/Observability.hpp`
- `tests/standalone/Observability/Observability.cpp`
- `tests/package/ObservabilityHooksOnly/{CMakeLists.txt,main.cpp}` & `tests/package/ObservabilityOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake`
## 3. Edge cases
- Null hooks allocate zero memory and initialize no backend.
- `HookSlot::detach_and_drain` detects self-drain from within an active callback (`would_deadlock`) and destroys owners strictly outside the lock.
- Exiting producer threads retain their metric shards via `std::shared_ptr<Shard>` in `MetricRegistry` while `thread_local` caches hold `std::weak_ptr<Shard>`, preventing leaks when `MetricRegistry` is destroyed.
- Cardinality overflow routes to `__overflow__` and increments overflow counters; exporting respects span/byte caps, retry limits, and deadline/stop without spawning hidden background threads.
## 4. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w5-obs -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLED_MODULES="Observability;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w5-obs && /tmp/void-w5-obs/tests/VoidTests --filter "Observability*" && ctest --test-dir /tmp/void-w5-obs --output-on-failure --timeout 120'
```
+30
View File
@@ -0,0 +1,30 @@
# Task Spec: `S-RPC-01..03` — NEW `Void::RPC` Subsystem (Wire v1 Binary Codec & Unary HTTP/1.1 Transport)
- **Branch**: `feat/roadmap-p2-wave9` (baseline `main` at `3e25405`).
- **Roadmap authority**: `docs/roadmap/subsystems/RPC.md` (`S-RPC-01`..`S-RPC-03`), `ARCHITECTURE.md` C-02..C-07, C-11..C-13.
- **Error domain**: `Void::Result::kRpcErrorDomain = 29`.
## Scope & Deliverables
1. **Module Boundary (`src/RPC/module.cmake`)**:
- `void_add_module(RPC INTERNAL_DEPS Core Functional Binary Data Time Async Net)`.
- Zero dependency on `Coordination`, `Discovery`, `Replication`, `Security`, or platform hosts.
2. **Types & Limits (`include/Void/RPC/Types.hpp`)**:
- `RpcStatusCode` (`Ok`, `Cancelled`, `InvalidArgument`, `DeadlineExceeded`, `NotFound`, `PermissionDenied`, `Unauthenticated`, `ResourceExhausted`, `FailedPrecondition`, `Unimplemented`, `Unavailable`, `Internal`, `DataLoss`, `UnknownOutcome`, `ProtocolError`, `IncompatibleVersion`).
- `MethodId{service, method}`, `PrincipalView` (immutable authenticated principal attributes), `MetadataEntry`, `MethodDescriptor{id, service_name, method_name, schema_version, replay_safe}`.
- `RpcLimits`: `max_header_bytes = 16 KiB`, `max_metadata_entries = 64`, `max_payload_bytes = 4 MiB`, `max_client_calls = 1024`, `max_server_executing = 256`, `max_server_queued_bytes = 64 MiB`, `max_server_timeout = 30s`.
3. **Wire v1 Binary Envelope Codec (`include/Void/RPC/Codec.hpp`, `src/RPC/Codec.cpp`)**:
- Explicit network byte order via `Void::Binary::Writer`/`Reader`:
- 4-byte magic `VRPC`, `u16 major (1)`, `u16 minor (0)`, `u32 header_length`, `u32 total_length`, `u8 frame_kind`, `u8 flags`, `u16 reserved (0)`, 128-bit `call_id` (`Uuid`), `u64 service_id`, `u32 method_id`, `u32 schema_version`, `u32 remaining_timeout_ms`, `u16 status_code`, `u16 metadata_count`, length-delimited metadata pairs, payload bytes.
- Strict bounds/overflow checks BEFORE allocating metadata/payload; rejects bad magic, unsupported major, non-zero reserved field, unknown required flags, truncated/extra bytes, oversized header/metadata/payload; skips unknown optional minor trailing header extensions cleanly.
4. **Unary HTTP/1.1 Server & Client (`include/Void/RPC/Rpc.hpp`, `src/RPC/Rpc.cpp`)**:
- `CallContext` (`call_id`, `principal`, local steady `deadline`, `remaining_timeout()`, `metadata`, `stop`).
- `AuthHook` (`authenticate(headers, metadata) -> Result<PrincipalView>` and `authorize(MethodDescriptor, PrincipalView) -> Result<void>`) executed outside dispatch locks before handler admission.
- `Server`: binds methods returning move-only RAII `Registration` (destructor/explicit `unregister_and_drain()` stops admission and waits for in-flight calls), mounts `/void-rpc/v1/call` on `Void::Net::HttpServer`, validates wire v1 envelope, schema version, auth/authz, concurrency/payload budgets, clamps relative timeout to `limits.max_server_timeout`, executes handlers outside locks, and translates handler errors/exceptions into sanitized `RpcStatus`.
- `Client`: encodes wire v1 unary request envelope, sends HTTP/1.1 POST to `/void-rpc/v1/call` via `Void::Net::HttpClient`, propagates remaining relative timeout and `std::stop_token`, separates HTTP transport failures from RPC domain status, enforces client concurrency & payload limits, never implicitly retries non-`replay_safe` methods.
5. **Installed Consumer (`tests/package/RpcOnly/`)**:
- Register `RpcOnly` in `tests/package/InstalledComponents.cmake` proving `Void::RPC` links cleanly without `LibArchive`, `PkgConfig`, or `SQLite3`.
## Verification
- Standalone `RPC;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`): wire v1 round-trip, overflow/truncation/unknown-major/reserved-flag rejection, loopback unary calls, schema mismatch, auth/authz denial, deadline clamping, handler exception sanitization, unregister drain under concurrent load.
- `ctest` (`RpcOnly`), full `RelWithDebInfo`, Debug `ASan+UBSan`, Debug `TSan`.
+35
View File
@@ -0,0 +1,35 @@
# Runtime Inert Host, Validated Limits, EmbeddedResources, and ResourceGraph
Task ID: S-RUNTIME-01
Phase: P1
Status: APPROVED
Contracts: C-01, C-04, C-05, C-09
## 1. Context and baseline
VoidLibrary currently has no `Runtime` module (`src/Runtime/`, `include/Void/Runtime/`). P1 establishes the inert managed composition contracts on top of `Core`, `Functional`, `Time`, `Memory`, `Algorithms`, `Async`, and `IO` without implicitly starting worker threads or depending on `System`, `Net`, `Service`, or `Log`.
## 2. Deliverables
- `src/Runtime/module.cmake` (`INTERNAL_DEPS Core Functional Time Memory Algorithms Async IO`).
- `include/Void/Runtime/Options.hpp`: `kRuntimeErrorDomain = 11`, `RuntimeLimits`, `ShutdownPolicy`, `Options`, `validate_options`.
- `include/Void/Runtime/ResourceGraph.hpp`: `ResourceOwnership`, `ResourceKind`, `ResourceNode`, `LifecyclePlan`, and `ResourceGraph` (`add_node`, `add_dependency`, `validate_and_plan` via `Void::Algorithms::topological_order`).
- `include/Void/Runtime/Host.hpp`: `HostState`, `EmbeddedResources`, `ShutdownReport`, inert `Host` (`create`, `create_embedded`), and `HostBuilder`.
- `tests/standalone/Runtime/RuntimeHost.cpp` and installed consumer `tests/package/RuntimeOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake`.
## 3. Exact files and interfaces
- `src/Runtime/module.cmake`
- `include/Void/Runtime/{Options,ResourceGraph,Host}.hpp`
- `tests/standalone/Runtime/RuntimeHost.cpp`
- `tests/package/RuntimeOnly/{CMakeLists.txt,main.cpp}`, `tests/package/InstalledComponents.cmake`
## 4. Edge cases
- `Host::create()` starts zero worker threads and opens zero OS descriptors (`HostState::constructed`).
- Zero worker counts in non-embedded mode, zero limits, `drain_grace > total_timeout`, and submodule `IO::BackendOptions::limits` exceeding global `RuntimeLimits` reject before construction.
- `EmbeddedResources::validate()` rejects null required ports (`executor`, `io`, `clock`).
- `ResourceGraph::validate_and_plan()` catches duplicate node IDs, missing required dependencies, and dependency cycles (preserving cycle witness) while producing deterministic startup order and exact reverse shutdown order.
## 5. Acceptance criteria
- `Runtime*` tests and `VoidInstalledComponentConsumers` (`RuntimeOnly`) pass under `-DVOID_WARNINGS_AS_ERRORS=ON` and ASan+UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4b-runtime -G Ninja -DVOID_ENABLED_MODULES="Runtime;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4b-runtime && /tmp/void-w4b-runtime/tests/VoidTests --filter "Runtime*" && ctest --test-dir /tmp/void-w4b-runtime --output-on-failure --timeout 60'
```
@@ -0,0 +1,40 @@
# S-SCHEDULER-01..04 — Scheduler Subsystem (Timers, Calendar, Durable Storage Store, Operator Controls)
## Scope
Implement the P1–P3 native `Void::Scheduler` subsystem and `Void::SchedulerStorage` durable adapter per `docs/roadmap/subsystems/Scheduler.md` and `docs/roadmap/DEPENDENCIES.md`:
1. **`S-SCHEDULER-01` — In-Memory Heap, Recurrence, Overlap, Cancellation & Shutdown**:
- Module `src/Scheduler/module.cmake` (`INTERNAL_DEPS Core Functional Time Async`) with zero `Storage` dependency.
- Error domain `kSchedulerErrorDomain = 31` (`SchedulerErrorCode`).
- Monotonic min-heap ordered by `(due_time, sequence)` using injected `MonotonicClock` and `CivilClock`, pure construction (no hidden background threads), and `Async::OperationOptions` for deadlines/cancellation.
- One-shot, fixed-delay (advances from durable completion), and fixed-rate (advances from intended schedule time) schedules; `OverlapPolicy` (`Forbid`, `QueueOne`, `AllowBounded`); `RetryPolicy` (default 5 attempts, exponential backoff 1s..5m, x2, injectable full-jitter RNG); callbacks run outside scheduler/store locks.
- `close_and_join()` stops materialization/dispatch, signals active handlers, joins within deadline, and returns `ShutdownReport` preserving running records on timeout.
2. **`S-SCHEDULER-02` — Calendar Grammar, Explicit Timezones/DST, and Bounded Misfire**:
- 5-field cron-like grammar (`minute hour day month weekday` with `*`, lists, ranges, steps; both day-of-month and weekday constraints apply).
- Explicit `TimezoneRegistry` supporting `"UTC"`, fixed offsets (`+HH:MM`/`-HH:MM`), and explicit DST transition rules (`DstGapPolicy::Skip`/`NextValid`, `DstFoldPolicy::First`/`Second`/`Twice` with persisted `fold_index`). Unknown timezone fails with `UnsupportedTimezone` (never silent UTC fallback).
- `MisfirePolicy` (`Skip`, `CoalesceLatest`, `CatchUpBounded` capped at `100` slots/job/pass while preserving remaining cursor state even across millions of missed slots).
3. **`S-SCHEDULER-03` — Durable Persistence Port and `SchedulerStorage` Adapter**:
- `JobStore` port + `InMemoryJobStore` (in `Scheduler`) and `StorageJobStore` (in `src/SchedulerStorage/module.cmake`, `INTERNAL_DEPS Scheduler Storage`) backed by `Void::Storage::Engine` conditional batches (`Durability::Sync`, 1 MiB batch cap).
- Exclusive ownership lock rejecting second concurrent scheduler owner (`OwnershipLocked`).
- Atomic occurrence materialization + cursor advance with unique `(job, revision, civil_slot, fold)` dedup key preventing duplicate materialization on wall-clock rollback.
- Atomic `Pending -> Running` claim checking job tombstone and revision invalidation watermark in the same conditional batch; `Running -> Completed` / `Pending` / `Dead` transitions; `UnknownOutcome` surfaced faithfully on unknown storage write outcome.
- Startup crash recovery returning `Running` occurrences to `Pending` with the exact same `OccurrenceId` (explicit at-least-once semantics).
4. **`S-SCHEDULER-04` — Revision Updates, Tombstone Removal, Retention Caps, and Operator Inspection**:
- `update_job()` bumps revision and atomically writes old-revision invalidation watermark so unstarted old occurrences are cancelled without racing active claims; failed updates leave prior policy intact.
- `remove_job()` writes tombstone, stops admission, and requests stop for active handlers.
- Retention count cap pauses materialization without advancing cursors or deleting unacknowledged work; dead occurrences require explicit `acknowledge_dead()` before pruning; bounded `prune_completed()` / `reclaim_invalidated()` and inspection APIs.
## File Ownership
- `include/Void/Scheduler/{Types,Calendar,Store,Scheduler}.hpp`
- `src/Scheduler/{module.cmake,Calendar.cpp,Scheduler.cpp}`
- `include/Void/SchedulerStorage/StorageJobStore.hpp`
- `src/SchedulerStorage/{module.cmake,StorageJobStore.cpp}`
- `tests/standalone/Scheduler/Scheduler.cpp`
- `tests/standalone/SchedulerStorage/StorageJobStore.cpp`
- `tests/package/SchedulerOnly/{CMakeLists.txt,main.cpp}`
- `tests/package/InstalledComponents.cmake`
## Acceptance & Verification
- Standalone `Scheduler;SchedulerStorage;Testing` (`-DVOID_WARNINGS_AS_ERRORS=ON`) + `SchedulerOnly` consumer with `_no_external_deps`.
- Deterministic fake-clock ordering, overlap, retry/dead-letter, DST gap/fold/unknown-tz, millions-of-missed-slots coalesce/catch-up cap, crash/reopen recovery preserving `OccurrenceId`, revision watermark race, unknown outcome, and retention-cap cursor preservation tests.
- Full `RelWithDebInfo`, `Debug` `ASan+UBSan`, and `Debug` `TSan` with 0 leaks, 0 UB, 0 races.
@@ -0,0 +1,27 @@
# S-STORAGE-01..06 — Original Durable Key-Value Storage Engine (`G-STORE`)
- **Wave**: Wave 7 (`feat/roadmap-p2-wave7`, branched from `main` at `43922d1`)
- **Roadmap reference**: `docs/roadmap/subsystems/Storage.md`, `docs/roadmap/DEPENDENCIES.md`
## Scope & Ownership
- Zero SQLite dependency (`src/Storage/module.cmake`: `INTERNAL_DEPS Core Functional Time Memory Binary IO Async`, zero external deps).
- `include/Void/Storage/Crc32c.hpp`: native Castagnoli CRC32C (`0x1EDC6F41` / reflected `0x82F63B78`, golden `"123456789"` == `0xE3069283`).
- `include/Void/Storage/Types.hpp`: `kStorageErrorDomain = 9`, `StorageErrorCode`, `Sequence`, `ByteView`, `OwnedBytes`, `OwnedValue`, `Durability::{Sync,Buffered}`, `Outcome::{NotCommitted,Committed,Unknown}`, `Limits` (all roadmap defaults + non-zero validation), `CommitReceipt`, `WriteFailure`, `ScanBounds` (with `prefix`), `ScanEntry`, `ScanPage`, `EngineState`, `EngineStats`, unsigned-byte lexicographic comparator.
- `include/Void/Storage/FilePort.hpp` + `src/Storage/FilePort.cpp`: `FilePort`, `FileHandle`, `PosixFilePort` (exclusive `flock`, `EINTR`/short-write loops, file & dir `fsync`, atomic same-dir rename capability check), and `FaultInjectingFilePort` for deterministic power-loss / short-write / sync-failure / rename-failure / unsynced-discard simulation.
- `include/Void/Storage/Format.hpp` + `src/Storage/Format.cpp`:
- V1 WAL (`VOIDWAL1` 64B segment header with CRC32C, 36B `VWR1` record header with header CRC32C checked before allocating payload, 8B trailer with record CRC32C + repeated length, `BEGIN`/`PUT`/`ERASE`/`COMMIT` payloads with aggregate CRC32C).
- V1 Immutable Sorted Table (`VOIDTBL1` header, 32 KiB target sorted blocks with per-block CRC32C, sparse block index, checksummed `VOIDTBF1` footer).
- V1 Immutable Manifest (`VOIDMNF1`) and atomic `CURRENT` (`VOIDCUR1`).
- `include/Void/Storage/Batch.hpp`, `include/Void/Storage/Engine.hpp`, `src/Storage/Engine.cpp`:
- Conditional atomic `Batch` (`put`, `erase`, `require_absent`, `require_version`, `require_value`; rejects duplicate keys/conditions; sequence-based versioning prevents ABA).
- Exclusive directory lock, minimal `CURRENT`/manifest bootstrap & WAL segment rotation publication before write admission, deterministic recovery with tail-only truncation of final active segment and fail-closed `corrupt` on damaged complete records or earlier closed segments.
- Single serialized writer, pre-append reservation/encoding, infallible visibility publication, `RecoveryRequired` + `Outcome::Unknown` on post-append failure, pinned `Snapshot`/`Cursor` with continuation scans and `page_too_small` enforcement.
- `checkpoint()` freezing memtable -> immutable table -> manifest -> `CURRENT` -> deferred retirement after snapshot pins release; bounded incremental `compact()` merging <= 4 overlapping runs while preserving versions needed by live snapshots.
- `include/Void/Storage/Tools.hpp` + `src/Storage/Tools.cpp`: `verify_directory` (full block-level read-only verification), pinned `export_backup` / `restore_backup`, offline `salvage_directory` into a separate destination.
- `include/Void/Storage/AsyncAdapter.hpp` + `src/Storage/AsyncAdapter.cpp`: bounded blocking async adapter following C-03 domain-result classification (`stop before append -> NotCommitted`, `stop during sync -> retain until settled`, `sync succeeds after stop -> CommitReceipt`, `sync fails after append -> Unknown + RecoveryRequired`, single delivery).
- `include/Void/Storage/Storage.hpp`: umbrella header.
- Tests & consumer: `tests/standalone/Storage/Storage.cpp` (CRC32C golden, format/overflow, model checker vs reference map, byte-offset truncation, corruption, fault-injected creation/rotation/sync/checkpoint/compaction crashes, retention under slow snapshots, async stop-race conformance, verify/backup/salvage), `tests/package/StorageOnly/*`, updated `tests/package/InstalledComponents.cmake`.
## Verification Criteria
- Standalone `Storage;Testing` RelWithDebInfo `-Werror` (zero external deps!): `storage_*` tests + `ctest` 2/2 (`StorageOnly`).
- Full Wave 7 integrated RelWithDebInfo `-Werror`, full Debug ASan+UBSan `-Werror`, and Wave 7 Debug TSan subset.
@@ -0,0 +1,38 @@
# Unicode 17.0.0 Manifest and Strict/Repair/Streaming UTF Codecs
Task ID: S-UNICODE-01, S-UNICODE-02
Phase: P1
Status: APPROVED
Contracts: C-01, C-05, C-07
## 1. Context and baseline
VoidLibrary currently has no `Unicode` module (`src/Unicode/`). `Text` handles locale-free ASCII-only operations (`M-TEXT-02`), while UTF-8/UTF-16/UTF-32 validation, transcoding, one-unit repair, and streaming decoding must live in a dedicated `Unicode` module pinning Unicode `17.0.0` metadata and keeping `Text` independent of Unicode data.
## 2. Deliverables
- `src/Unicode/module.cmake` declaring `INTERNAL_DEPS Core Text`.
- `src/Unicode/MANIFEST.md` pinning Unicode `17.0.0`, official UCD source URL, and Unicode license notice.
- New `include/Void/Unicode/Utf.hpp` defining `Void::Unicode::{data_version, is_scalar_value, UtfPolicy, UtfErrorKind, UtfError, Scalar, UtfLimits, TranscodeCounts}`, strict & `replace_one_unit` validation/transcoding functions for UTF-8/UTF-16/UTF-32 (owning and into-`std::span`), and stateful `Utf8StreamDecoder` / `Utf16StreamDecoder`.
- Tests in `tests/standalone/Unicode/Utf.cpp`.
- Package consumer `tests/package/UnicodeOnly/{CMakeLists.txt,main.cpp}` registered in `tests/package/InstalledComponents.cmake` (`Unicode Text Core`).
## 3. Exact files and interfaces
- `src/Unicode/module.cmake`
- `src/Unicode/MANIFEST.md`
- `include/Void/Unicode/Utf.hpp`
- `tests/standalone/Unicode/Utf.cpp`
- `tests/package/UnicodeOnly/CMakeLists.txt`
- `tests/package/UnicodeOnly/main.cpp`
- `tests/package/InstalledComponents.cmake`
## 4. Edge cases
- Rejects overlong UTF-8 sequences, UTF-16 surrogates (`U+D800..U+DFFF`) in UTF-8/UTF-32, unpaired surrogates in UTF-16, code points `> U+10FFFF`, and truncated sequences under `UtfPolicy::reject`.
- One-unit repair (`replace_one_unit`) emits `U+FFFD` per ill-formed unit and advances cleanly by one code unit without skipping subsequent valid units; streaming chunk boundaries match one-shot behavior identically.
- Pre-reserve limit checks against `UtfLimits` reject oversized inputs/outputs before large allocations; periodic `std::stop_token` checks abort long transcodes cleanly.
- Streaming `Utf8StreamDecoder` / `Utf16StreamDecoder` split sequences across arbitrary 1-byte/1-unit boundaries and flush trailing incomplete sequences cleanly at EOF.
## 5. Acceptance criteria
- `Utf*` tests and `VoidInstalledComponentConsumers` (`UnicodeOnly`) pass under `-DVOID_WARNINGS_AS_ERRORS=ON` and ASan/UBSan.
## 6. Verification commands
```sh
dev cpp-gcc -c bash -lc 'cmake -S . -B /tmp/void-w4a-unicode -G Ninja -DVOID_ENABLED_MODULES="Unicode;Testing" -DVOID_WARNINGS_AS_ERRORS=ON && cmake --build /tmp/void-w4a-unicode && /tmp/void-w4a-unicode/tests/VoidTests --filter "Utf*" && ctest --test-dir /tmp/void-w4a-unicode --output-on-failure --timeout 60'
```
+62
View File
@@ -0,0 +1,62 @@
# Foundation and data plans
Task ID: T-DOC-101
Role: sol_implementer
Status: APPROVED
## 1. Context and baseline
Repository/cwd /home/faumaray/Projects/VoidLibrary, main at f1f9ba375b22abf1adcc7c550ec21ac20895c0a4. Tracked tree was clean; unrelated protected untracked .env, WG.conf, keys and .serena untouched. Parent now authors docs/roadmap and docs/agent-workflow in the shared checkout. User approved a detailed planning package with "Implement the plan"; the approved plan explicitly says feature implementation follows separately. Prior astra_planner architecture investigation and fresh astra_reviewer preflight READY completed. You implement documentation only. Requirements R-001 through R-016 in docs/roadmap/REQUIREMENTS.md are authoritative. Role configured Sol/XHigh; no alternate model selection.
## 2. Objective and deliverables
Author all 11 exclusive Markdown files listed below as substantial, individually actionable plans grounded in existing source. Module plans cover existing capabilities and expansion; subsystem/platform plans clearly mark NEW designs. Deliver actual documents, not summaries or placeholders. Each includes source baseline, concrete capability backlog, proposed APIs/types/examples, dataflow/algorithms/ownership/failure behavior, backend rationale, performance/resource limits, ordered implementation tasks, validation and migration. Specific content emphasis: Deepen small utility and data capabilities without layering cycles. Core UUID cannot require broad Math. Functional owns errors/adapters, Time clocks, Memory allocators; Data general parsing must not broaden StrictJson signed-document semantics. New Unicode uses pinned data and explicit UTF error policy; Text dependency stays one-way. Define concrete native structures, numeric representation/checked conversions, binary writer and codec boundaries; specialized containers/algorithms justified by workloads, not wholesale reimplementation of std. Time benchmark changes distinguish measurement overhead. Propose coherent NEW API examples, bounds, migration, and meaningful tasks for every area.
## 3. Scope and non-goals
Only planning documents are implemented. No C++ changes, CMake/CI changes, new runnable applications, dependency installation, benchmark execution, Git commits/pushes, publishing or configuration edits. No edits to another worker's files. Do not reopen the user interview, narrow the approved breadth, or implement features while documenting them. Existing docs/short-url.md remains intact. Do not change shared contracts unilaterally.
## 4. Files to inspect
First read docs/roadmap/REQUIREMENTS.md, docs/roadmap/ARCHITECTURE.md, docs/agent-workflow/DECISIONS.md and /home/faumaray/.codex/skills/code-intelligence/SKILL.md. Inspect exact relevant headers under include/Void/{Core,Functional,Containers,Math,Text,Time,Binary,Data}, sources/module.cmake under src/{Core,Functional,Containers,Math,Text,Time,Binary,Data}, and tests/standalone/{Core,Functional,Containers,Math,Text,Time,Binary,Data}. These are real directories, not permission to traverse secrets. Adjacent explicitly identified shared source files are readable when necessary. CMakeLists.txt, cmake/Module.cmake and tests/CMakeLists.txt define current targets/tests; inspect only as needed, root owns cross-cutting analysis. New subsystems have no current source directory: label proposed paths NEW. Use scoped file inventory before citing any specific file not listed here.
## 5. Write ownership and coordination
Write scope: docs/roadmap/modules/Core.md; docs/roadmap/modules/Functional.md; docs/roadmap/modules/Containers.md; docs/roadmap/modules/Math.md; docs/roadmap/modules/Text.md; docs/roadmap/modules/Time.md; docs/roadmap/modules/Binary.md; docs/roadmap/modules/Data.md; docs/roadmap/subsystems/Memory.md; docs/roadmap/subsystems/Algorithms.md; docs/roadmap/subsystems/Unicode.md
You are not alone in the codebase. All other files are non-owned, including shared roadmap root documents, workflow/task records, existing project docs and application/build/test files. Shared checkout is intentional; do not switch branches, reset, stash, clean, stage or commit. Edit only assigned Markdown files directly with apply_patch; create their parent directories if needed. Do not revert others' work. Root owns shared contracts and master integration. Return any conflict with exact evidence and proposed change to root.
## 6. Implementation or investigation approach
1. Read shared contracts C-01..C-14 and preserve them. Root-owned decisions already select overall scope, boundaries and algorithms; fill bounded details for your assigned areas coherently.
2. Confirm repo and codememory project home-faumaray-Projects-VoidLibrary identity/freshness with index_status. Query only scoped include/src/tests paths. Graph may contain protected data, so no whole-repo text/graph browsing. Use search_graph then trace_path/get_code_snippet for structure; inspect source for important claims. Call check_index_coverage for EVERY relied-on source file and directly read flagged missing ranges. If graph unavailable, use scoped source fallback and disclose. Serena manual must be read if used; project is already active VoidLibrary, do not change activation.
3. For each document, ground existing features/tests and gaps before designing NEW additions. Cite portable relative source links from the file location, not absolute workstation paths. Keep source facts separate from design recommendations.
4. Use sections tailored to the area but cover all deliverables. Each task gets a unique ID M-<MODULE>-NN, S-<SUBSYSTEM>-NN, or P-<PLATFORM>-NN, explicit dependencies, intended implementation scope, acceptance and role recommendation. Use phase P0 baseline, P1 foundations, P2 module completion, P3 initial platforms/optimization, P4 distributed. All feature tasks are PLANNED.
5. Draft concrete representative NEW API/type shapes; preserve existing namespace facts and distinguish illustrative NEW code from compiling examples. Shared types are referenced to their owner, not independently redefined. Choose bounded sensible defaults and explain tradeoffs. Avoid unspecified "consider X or Y" where it changes implementation; select a design or explicitly stage alternatives behind a later named capability gate.
6. Native-vs-external choices are per module. Retain current security primitives as initial implementations. Cite primary sources already supplied below; if new consequential library facts require research, use context7 skill resolving library id first, then official docs/web only, never submit private source.
7. Cross-link shared architecture/performance/validation/migration and relevant area documents. Other workers may still be creating them; expected names in master contract below are valid planned links. Do not repeatedly check unfinished peers.
8. Validate your own documents for ownership, meaningful content, source/path accuracy, unique IDs and no unresolved placeholders. Tell root any shared decision that needs reconciliation. Do not pad every file with repeated common text.
## 7. Interfaces and data contracts
Authoritative shared contracts: architecture C-01 foundation layers; C-02 Result/expected errors; C-03 std::stop_token+steady deadline and one completion; C-04 embedded/managed composition; C-05 bounds; C-06 IO/Net; C-07 general vs strict signed data; C-08 native Storage separate from SQLite; C-09 owning Service/Plugin/C ABI; C-10 FSM/Scheduler/Update commit; C-11 Log/Observability; C-12 distributed ownership/consistency; C-13 naming/migration; C-14 platforms.
Existing names must be source-verified. NEW API illustrations do not claim existence. Detailed task IDs use area names uppercased (e.g. M-ASYNC-01, S-IO-01, P-RELOADABLE-01). Relative references to peers: ../modules/<Name>.md, ../subsystems/<Name>.md or ../platforms/<Name>.md; shared files ../ARCHITECTURE.md, ../REQUIREMENTS.md, ../DEPENDENCIES.md, ../DELIVERY.md, ../PERFORMANCE.md, ../VALIDATION.md, ../MIGRATION.md, ../BUILD-AND-DISTRIBUTION.md, ../DOCUMENTATION.md.
## 8. Dependencies and integration
Parent creates shared root documents and workflow records concurrently. Four worker packages have disjoint ownership. Existing modules planned: Core Functional Containers Math Text Data Async Time Log System Configuration Stacktrace Plugin Service Fsm Testing TestingMock Binary Archive Crypto Security Sqlite Resilience Update ShortUrl Net. NEW subsystems: Memory Algorithms Unicode IO Runtime Scheduler Storage IPC RPC Messaging Observability Discovery Coordination Replication DistributedStorage. Platforms: NetworkedApplications ReloadableApplications DistributedApplications. Only your listed paths are writable. Parent checks integration and commissions fresh adversarial review of actual docs. No dependency on other worker completion before drafting against ARCHITECTURE.md.
## 9. Edge cases security and performance
Never read .env, .env.*, WG.conf, keys or descendants; ~/.config/agent-integrations, ~/.ssh, ~/.gnupg, ~/.opencodex, /run/agenix.d, nixos-config/jev_token. No broad indexing/reindexing and no private source in public queries. No credentials or other repository information in documents.
Specify concrete failure paths, resource accounting, cancellation/shutdown and compatibility relevant to each area. No fabricated performance results, compiler support, test passes or production readiness. Performance profiles measure p50/p95/p99, throughput, allocations, peak RSS/CPU and build cost; avoid arbitrary universal speedup claims. Cryptographic/TLS recommendations based on OpenSSL 3.5 guide; new storage durability methodology on SQLite atomiccommit; Raft paper for consensus. Primary URLs: https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/ ; https://sqlite.org/atomiccommit.html#_testing_atomic_commit_behavior ; https://sqlite.org/wal.html ; https://raft.github.io/raft.pdf ; https://man7.org/linux/man-pages/man7/epoll.7.html . Cite near claims.
## 10. Acceptance criteria
1. All owned documents exist and contain distinct, substantial implementation guidance; no empty boilerplate or arbitrary word-count padding.
2. Source links and existing behavior are checked; NEW contracts clearly labeled; source coverage limitations reported.
3. Each plan has concrete APIs/dataflow, native/backend decision, ownership/failure/resource limits, task DAG/dependencies, test scenarios and compatibility/rollback.
4. Shared C-01..C-14 contracts are respected and cross-links use agreed names.
5. Commands distinguish CURRENT available checks from PROPOSED checks with prerequisites; future reference apps are specified only.
6. No unowned modifications, implementation changes, unsupported measured claims or unresolved high-impact alternatives.
## 11. Verification commands and evidence
Cwd /home/faumaray/Projects/VoidLibrary. Observed current baseline commands: cmake -S . -B /tmp/voidlibrary-discovery-f1f9ba3 -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=OFF -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src ; cmake --build /tmp/voidlibrary-discovery-f1f9ba3 --parallel 4 ; ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60. Do not rerun builds/tests for this documentation task. Normal build passed; VoidTests 1245 passed/2 failed/3 skipped out of1250; failures hard-code absent /bin/echo and /bin/cat; installed component consumers passed. Werror failed in cached Boost1.84 headers. No sanitizer/benchmark/cross-platform checks ran. Actual test runner --filter syntax exists but verify names before showing existing filtered commands. Generic future build paths must be labeled templates/proposed.
Run documentation checks via scoped rg, file inventory and git diff --check -- <owned paths> (new files require direct content inspection too). Root will run full coverage/link/ID validation. Do not add a validation script or tests outside ownership.
## 12. Constraints and stop conditions
No child agents or independent user questions. Stop on ownership collision, a required protected read, unavailable configured role, or a contradiction requiring shared contract change; report to parent with a bounded resolution. Missing graph coverage alone permits scoped direct reads. Do not treat an absent NEW file as a blocker. No commits/pushes or application edits. Finish all owned documents before returning unless a genuine blocker exists.
## 13. Authorization and decisions
User approved this exact planning-package scope on 2026-11-24. Prior architectural planner and fresh preflight reviewer complete; current handoff specifies exclusive documentation ownership. Parent reviewed technical content and will lint full specification before dispatch. Default choices within ARCHITECTURE.md are authorized planning decisions. No permission to implement features is inferred.
## 14. Return format
Return task ID; DONE/BLOCKED/PARTIAL; files changed; concise content/decision highlights; source and graph coverage limitations; exact documentation checks and outcomes; unrun checks; cross-file integration issues. Do not paste full documents or spawn children.
+62
View File
@@ -0,0 +1,62 @@
# Runtime, systems and reloadable platform plans
Task ID: T-DOC-102
Role: sol_implementer
Status: APPROVED
## 1. Context and baseline
Repository/cwd /home/faumaray/Projects/VoidLibrary, main at f1f9ba375b22abf1adcc7c550ec21ac20895c0a4. Tracked tree was clean; unrelated protected untracked .env, WG.conf, keys and .serena untouched. Parent now authors docs/roadmap and docs/agent-workflow in the shared checkout. User approved a detailed planning package with "Implement the plan"; the approved plan explicitly says feature implementation follows separately. Prior astra_planner architecture investigation and fresh astra_reviewer preflight READY completed. You implement documentation only. Requirements R-001 through R-016 in docs/roadmap/REQUIREMENTS.md are authoritative. Role configured Sol/XHigh; no alternate model selection.
## 2. Objective and deliverables
Author all 11 exclusive Markdown files listed below as substantial, individually actionable plans grounded in existing source. Module plans cover existing capabilities and expansion; subsystem/platform plans clearly mark NEW designs. Deliver actual documents, not summaries or placeholders. Each includes source baseline, concrete capability backlog, proposed APIs/types/examples, dataflow/algorithms/ownership/failure behavior, backend rationale, performance/resource limits, ordered implementation tasks, validation and migration. Specific content emphasis: Freeze NEW Async operation options around std::stop_token plus optional steady deadline and reference Time's injectable clock; no separate context types per consumer. Resolve coroutine/frame ownership, cancellation/completion races and safe shutdown. IO uses level-triggered epoll sockets + bounded file workers initially, future optional io_uring. Managed Runtime depends on Async/IO, not vice versa. Service owning handles survive replacement and callbacks run outside registry locks. Plugin C ABI separate from existing C++ descriptors, with explicit generation and async-operation pins, quiescence/readiness and rollback. Fsm checkpoints state boundaries, cancels/joins race losers, consistent fault termination. Scheduler persistent job at-least-once semantics and occurrence IDs; IPC explicit framing and quotas. Configuration validation/reload must be transactional. Platform spec describes future runnable host, never implements it.
## 3. Scope and non-goals
Only planning documents are implemented. No C++ changes, CMake/CI changes, new runnable applications, dependency installation, benchmark execution, Git commits/pushes, publishing or configuration edits. No edits to another worker's files. Do not reopen the user interview, narrow the approved breadth, or implement features while documenting them. Existing docs/short-url.md remains intact. Do not change shared contracts unilaterally.
## 4. Files to inspect
First read docs/roadmap/REQUIREMENTS.md, docs/roadmap/ARCHITECTURE.md, docs/agent-workflow/DECISIONS.md and /home/faumaray/.codex/skills/code-intelligence/SKILL.md. Inspect exact relevant headers under include/Void/{Async,System,Configuration,Service,Fsm,Plugin}, sources/module.cmake under src/{Async,System,Configuration,Service,Fsm,Plugin}, and tests/standalone/{Async,System,Configuration,Service,Fsm,Plugin}. These are real directories, not permission to traverse secrets. Adjacent explicitly identified shared source files are readable when necessary. CMakeLists.txt, cmake/Module.cmake and tests/CMakeLists.txt define current targets/tests; inspect only as needed, root owns cross-cutting analysis. New subsystems have no current source directory: label proposed paths NEW. Use scoped file inventory before citing any specific file not listed here.
## 5. Write ownership and coordination
Write scope: docs/roadmap/modules/Async.md; docs/roadmap/modules/System.md; docs/roadmap/modules/Configuration.md; docs/roadmap/modules/Service.md; docs/roadmap/modules/Fsm.md; docs/roadmap/modules/Plugin.md; docs/roadmap/subsystems/IO.md; docs/roadmap/subsystems/Runtime.md; docs/roadmap/subsystems/Scheduler.md; docs/roadmap/subsystems/IPC.md; docs/roadmap/platforms/ReloadableApplications.md
You are not alone in the codebase. All other files are non-owned, including shared roadmap root documents, workflow/task records, existing project docs and application/build/test files. Shared checkout is intentional; do not switch branches, reset, stash, clean, stage or commit. Edit only assigned Markdown files directly with apply_patch; create their parent directories if needed. Do not revert others' work. Root owns shared contracts and master integration. Return any conflict with exact evidence and proposed change to root.
## 6. Implementation or investigation approach
1. Read shared contracts C-01..C-14 and preserve them. Root-owned decisions already select overall scope, boundaries and algorithms; fill bounded details for your assigned areas coherently.
2. Confirm repo and codememory project home-faumaray-Projects-VoidLibrary identity/freshness with index_status. Query only scoped include/src/tests paths. Graph may contain protected data, so no whole-repo text/graph browsing. Use search_graph then trace_path/get_code_snippet for structure; inspect source for important claims. Call check_index_coverage for EVERY relied-on source file and directly read flagged missing ranges. If graph unavailable, use scoped source fallback and disclose. Serena manual must be read if used; project is already active VoidLibrary, do not change activation.
3. For each document, ground existing features/tests and gaps before designing NEW additions. Cite portable relative source links from the file location, not absolute workstation paths. Keep source facts separate from design recommendations.
4. Use sections tailored to the area but cover all deliverables. Each task gets a unique ID M-<MODULE>-NN, S-<SUBSYSTEM>-NN, or P-<PLATFORM>-NN, explicit dependencies, intended implementation scope, acceptance and role recommendation. Use phase P0 baseline, P1 foundations, P2 module completion, P3 initial platforms/optimization, P4 distributed. All feature tasks are PLANNED.
5. Draft concrete representative NEW API/type shapes; preserve existing namespace facts and distinguish illustrative NEW code from compiling examples. Shared types are referenced to their owner, not independently redefined. Choose bounded sensible defaults and explain tradeoffs. Avoid unspecified "consider X or Y" where it changes implementation; select a design or explicitly stage alternatives behind a later named capability gate.
6. Native-vs-external choices are per module. Retain current security primitives as initial implementations. Cite primary sources already supplied below; if new consequential library facts require research, use context7 skill resolving library id first, then official docs/web only, never submit private source.
7. Cross-link shared architecture/performance/validation/migration and relevant area documents. Other workers may still be creating them; expected names in master contract below are valid planned links. Do not repeatedly check unfinished peers.
8. Validate your own documents for ownership, meaningful content, source/path accuracy, unique IDs and no unresolved placeholders. Tell root any shared decision that needs reconciliation. Do not pad every file with repeated common text.
## 7. Interfaces and data contracts
Authoritative shared contracts: architecture C-01 foundation layers; C-02 Result/expected errors; C-03 std::stop_token+steady deadline and one completion; C-04 embedded/managed composition; C-05 bounds; C-06 IO/Net; C-07 general vs strict signed data; C-08 native Storage separate from SQLite; C-09 owning Service/Plugin/C ABI; C-10 FSM/Scheduler/Update commit; C-11 Log/Observability; C-12 distributed ownership/consistency; C-13 naming/migration; C-14 platforms.
Existing names must be source-verified. NEW API illustrations do not claim existence. Detailed task IDs use area names uppercased (e.g. M-ASYNC-01, S-IO-01, P-RELOADABLE-01). Relative references to peers: ../modules/<Name>.md, ../subsystems/<Name>.md or ../platforms/<Name>.md; shared files ../ARCHITECTURE.md, ../REQUIREMENTS.md, ../DEPENDENCIES.md, ../DELIVERY.md, ../PERFORMANCE.md, ../VALIDATION.md, ../MIGRATION.md, ../BUILD-AND-DISTRIBUTION.md, ../DOCUMENTATION.md.
## 8. Dependencies and integration
Parent creates shared root documents and workflow records concurrently. Four worker packages have disjoint ownership. Existing modules planned: Core Functional Containers Math Text Data Async Time Log System Configuration Stacktrace Plugin Service Fsm Testing TestingMock Binary Archive Crypto Security Sqlite Resilience Update ShortUrl Net. NEW subsystems: Memory Algorithms Unicode IO Runtime Scheduler Storage IPC RPC Messaging Observability Discovery Coordination Replication DistributedStorage. Platforms: NetworkedApplications ReloadableApplications DistributedApplications. Only your listed paths are writable. Parent checks integration and commissions fresh adversarial review of actual docs. No dependency on other worker completion before drafting against ARCHITECTURE.md.
## 9. Edge cases security and performance
Never read .env, .env.*, WG.conf, keys or descendants; ~/.config/agent-integrations, ~/.ssh, ~/.gnupg, ~/.opencodex, /run/agenix.d, nixos-config/jev_token. No broad indexing/reindexing and no private source in public queries. No credentials or other repository information in documents.
Specify concrete failure paths, resource accounting, cancellation/shutdown and compatibility relevant to each area. No fabricated performance results, compiler support, test passes or production readiness. Performance profiles measure p50/p95/p99, throughput, allocations, peak RSS/CPU and build cost; avoid arbitrary universal speedup claims. Cryptographic/TLS recommendations based on OpenSSL 3.5 guide; new storage durability methodology on SQLite atomiccommit; Raft paper for consensus. Primary URLs: https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/ ; https://sqlite.org/atomiccommit.html#_testing_atomic_commit_behavior ; https://sqlite.org/wal.html ; https://raft.github.io/raft.pdf ; https://man7.org/linux/man-pages/man7/epoll.7.html . Cite near claims.
## 10. Acceptance criteria
1. All owned documents exist and contain distinct, substantial implementation guidance; no empty boilerplate or arbitrary word-count padding.
2. Source links and existing behavior are checked; NEW contracts clearly labeled; source coverage limitations reported.
3. Each plan has concrete APIs/dataflow, native/backend decision, ownership/failure/resource limits, task DAG/dependencies, test scenarios and compatibility/rollback.
4. Shared C-01..C-14 contracts are respected and cross-links use agreed names.
5. Commands distinguish CURRENT available checks from PROPOSED checks with prerequisites; future reference apps are specified only.
6. No unowned modifications, implementation changes, unsupported measured claims or unresolved high-impact alternatives.
## 11. Verification commands and evidence
Cwd /home/faumaray/Projects/VoidLibrary. Observed current baseline commands: cmake -S . -B /tmp/voidlibrary-discovery-f1f9ba3 -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=OFF -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src ; cmake --build /tmp/voidlibrary-discovery-f1f9ba3 --parallel 4 ; ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60. Do not rerun builds/tests for this documentation task. Normal build passed; VoidTests 1245 passed/2 failed/3 skipped out of1250; failures hard-code absent /bin/echo and /bin/cat; installed component consumers passed. Werror failed in cached Boost1.84 headers. No sanitizer/benchmark/cross-platform checks ran. Actual test runner --filter syntax exists but verify names before showing existing filtered commands. Generic future build paths must be labeled templates/proposed.
Run documentation checks via scoped rg, file inventory and git diff --check -- <owned paths> (new files require direct content inspection too). Root will run full coverage/link/ID validation. Do not add a validation script or tests outside ownership.
## 12. Constraints and stop conditions
No child agents or independent user questions. Stop on ownership collision, a required protected read, unavailable configured role, or a contradiction requiring shared contract change; report to parent with a bounded resolution. Missing graph coverage alone permits scoped direct reads. Do not treat an absent NEW file as a blocker. No commits/pushes or application edits. Finish all owned documents before returning unless a genuine blocker exists.
## 13. Authorization and decisions
User approved this exact planning-package scope on 2026-11-24. Prior architectural planner and fresh preflight reviewer complete; current handoff specifies exclusive documentation ownership. Parent reviewed technical content and will lint full specification before dispatch. Default choices within ARCHITECTURE.md are authorized planning decisions. No permission to implement features is inferred.
## 14. Return format
Return task ID; DONE/BLOCKED/PARTIAL; files changed; concise content/decision highlights; source and graph coverage limitations; exact documentation checks and outcomes; unrun checks; cross-file integration issues. Do not paste full documents or spawn children.
+62
View File
@@ -0,0 +1,62 @@
# Networking, security and distributed plans
Task ID: T-DOC-103
Role: sol_implementer
Status: APPROVED
## 1. Context and baseline
Repository/cwd /home/faumaray/Projects/VoidLibrary, main at f1f9ba375b22abf1adcc7c550ec21ac20895c0a4. Tracked tree was clean; unrelated protected untracked .env, WG.conf, keys and .serena untouched. Parent now authors docs/roadmap and docs/agent-workflow in the shared checkout. User approved a detailed planning package with "Implement the plan"; the approved plan explicitly says feature implementation follows separately. Prior astra_planner architecture investigation and fresh astra_reviewer preflight READY completed. You implement documentation only. Requirements R-001 through R-016 in docs/roadmap/REQUIREMENTS.md are authoritative. Role configured Sol/XHigh; no alternate model selection.
## 2. Objective and deliverables
Author all 12 exclusive Markdown files listed below as substantial, individually actionable plans grounded in existing source. Module plans cover existing capabilities and expansion; subsystem/platform plans clearly mark NEW designs. Deliver actual documents, not summaries or placeholders. Each includes source baseline, concrete capability backlog, proposed APIs/types/examples, dataflow/algorithms/ownership/failure behavior, backend rationale, performance/resource limits, ordered implementation tasks, validation and migration. Specific content emphasis: Net: actual server transports, secure peer+hostname defaults, total deadlines, redirects, HTTP/WebSocket conformance, persistent connections, streaming and cancellation; native preference with existing Boost migration adapter. Crypto/OpenSSL and Security/libsodium remain initial cryptographic backends; distinguish cryptographic primitives from authentication/policy workflows. Preserve frozen ShortUrl V1; existing service contract is not a shipped provider. Coordination is pure deterministic protocol with ports; Replication owns RPC/storage adapters to avoid cycles. Discovery static/local initial; consensus-backed discovery an upper adapter. Fixed-membership Raft first, quorum-consistent reads, durable replies, application+applied-index+dedup atomic state. Messaging explicit at-least-once, no blanket exactly-once. DistributedStorage sequences single-group correctness before sharding/rebalance and disclaims unimplemented cross-shard transactions. Complete concrete failure matrices and algorithmic/operational decisions, not aspirational bullet lists.
## 3. Scope and non-goals
Only planning documents are implemented. No C++ changes, CMake/CI changes, new runnable applications, dependency installation, benchmark execution, Git commits/pushes, publishing or configuration edits. No edits to another worker's files. Do not reopen the user interview, narrow the approved breadth, or implement features while documenting them. Existing docs/short-url.md remains intact. Do not change shared contracts unilaterally.
## 4. Files to inspect
First read docs/roadmap/REQUIREMENTS.md, docs/roadmap/ARCHITECTURE.md, docs/agent-workflow/DECISIONS.md and /home/faumaray/.codex/skills/code-intelligence/SKILL.md. Inspect exact relevant headers under include/Void/{Net,Resilience,Crypto,Security,ShortUrl}, sources/module.cmake under src/{Net,Resilience,Crypto,Security,ShortUrl}, and tests/standalone/{Net,Resilience,Crypto,Security,ShortUrl}. These are real directories, not permission to traverse secrets. Adjacent explicitly identified shared source files are readable when necessary. CMakeLists.txt, cmake/Module.cmake and tests/CMakeLists.txt define current targets/tests; inspect only as needed, root owns cross-cutting analysis. New subsystems have no current source directory: label proposed paths NEW. Use scoped file inventory before citing any specific file not listed here.
## 5. Write ownership and coordination
Write scope: docs/roadmap/modules/Net.md; docs/roadmap/modules/Resilience.md; docs/roadmap/modules/Crypto.md; docs/roadmap/modules/Security.md; docs/roadmap/modules/ShortUrl.md; docs/roadmap/subsystems/RPC.md; docs/roadmap/subsystems/Messaging.md; docs/roadmap/subsystems/Discovery.md; docs/roadmap/subsystems/Coordination.md; docs/roadmap/subsystems/Replication.md; docs/roadmap/subsystems/DistributedStorage.md; docs/roadmap/platforms/DistributedApplications.md
You are not alone in the codebase. All other files are non-owned, including shared roadmap root documents, workflow/task records, existing project docs and application/build/test files. Shared checkout is intentional; do not switch branches, reset, stash, clean, stage or commit. Edit only assigned Markdown files directly with apply_patch; create their parent directories if needed. Do not revert others' work. Root owns shared contracts and master integration. Return any conflict with exact evidence and proposed change to root.
## 6. Implementation or investigation approach
1. Read shared contracts C-01..C-14 and preserve them. Root-owned decisions already select overall scope, boundaries and algorithms; fill bounded details for your assigned areas coherently.
2. Confirm repo and codememory project home-faumaray-Projects-VoidLibrary identity/freshness with index_status. Query only scoped include/src/tests paths. Graph may contain protected data, so no whole-repo text/graph browsing. Use search_graph then trace_path/get_code_snippet for structure; inspect source for important claims. Call check_index_coverage for EVERY relied-on source file and directly read flagged missing ranges. If graph unavailable, use scoped source fallback and disclose. Serena manual must be read if used; project is already active VoidLibrary, do not change activation.
3. For each document, ground existing features/tests and gaps before designing NEW additions. Cite portable relative source links from the file location, not absolute workstation paths. Keep source facts separate from design recommendations.
4. Use sections tailored to the area but cover all deliverables. Each task gets a unique ID M-<MODULE>-NN, S-<SUBSYSTEM>-NN, or P-<PLATFORM>-NN, explicit dependencies, intended implementation scope, acceptance and role recommendation. Use phase P0 baseline, P1 foundations, P2 module completion, P3 initial platforms/optimization, P4 distributed. All feature tasks are PLANNED.
5. Draft concrete representative NEW API/type shapes; preserve existing namespace facts and distinguish illustrative NEW code from compiling examples. Shared types are referenced to their owner, not independently redefined. Choose bounded sensible defaults and explain tradeoffs. Avoid unspecified "consider X or Y" where it changes implementation; select a design or explicitly stage alternatives behind a later named capability gate.
6. Native-vs-external choices are per module. Retain current security primitives as initial implementations. Cite primary sources already supplied below; if new consequential library facts require research, use context7 skill resolving library id first, then official docs/web only, never submit private source.
7. Cross-link shared architecture/performance/validation/migration and relevant area documents. Other workers may still be creating them; expected names in master contract below are valid planned links. Do not repeatedly check unfinished peers.
8. Validate your own documents for ownership, meaningful content, source/path accuracy, unique IDs and no unresolved placeholders. Tell root any shared decision that needs reconciliation. Do not pad every file with repeated common text.
## 7. Interfaces and data contracts
Authoritative shared contracts: architecture C-01 foundation layers; C-02 Result/expected errors; C-03 std::stop_token+steady deadline and one completion; C-04 embedded/managed composition; C-05 bounds; C-06 IO/Net; C-07 general vs strict signed data; C-08 native Storage separate from SQLite; C-09 owning Service/Plugin/C ABI; C-10 FSM/Scheduler/Update commit; C-11 Log/Observability; C-12 distributed ownership/consistency; C-13 naming/migration; C-14 platforms.
Existing names must be source-verified. NEW API illustrations do not claim existence. Detailed task IDs use area names uppercased (e.g. M-ASYNC-01, S-IO-01, P-RELOADABLE-01). Relative references to peers: ../modules/<Name>.md, ../subsystems/<Name>.md or ../platforms/<Name>.md; shared files ../ARCHITECTURE.md, ../REQUIREMENTS.md, ../DEPENDENCIES.md, ../DELIVERY.md, ../PERFORMANCE.md, ../VALIDATION.md, ../MIGRATION.md, ../BUILD-AND-DISTRIBUTION.md, ../DOCUMENTATION.md.
## 8. Dependencies and integration
Parent creates shared root documents and workflow records concurrently. Four worker packages have disjoint ownership. Existing modules planned: Core Functional Containers Math Text Data Async Time Log System Configuration Stacktrace Plugin Service Fsm Testing TestingMock Binary Archive Crypto Security Sqlite Resilience Update ShortUrl Net. NEW subsystems: Memory Algorithms Unicode IO Runtime Scheduler Storage IPC RPC Messaging Observability Discovery Coordination Replication DistributedStorage. Platforms: NetworkedApplications ReloadableApplications DistributedApplications. Only your listed paths are writable. Parent checks integration and commissions fresh adversarial review of actual docs. No dependency on other worker completion before drafting against ARCHITECTURE.md.
## 9. Edge cases security and performance
Never read .env, .env.*, WG.conf, keys or descendants; ~/.config/agent-integrations, ~/.ssh, ~/.gnupg, ~/.opencodex, /run/agenix.d, nixos-config/jev_token. No broad indexing/reindexing and no private source in public queries. No credentials or other repository information in documents.
Specify concrete failure paths, resource accounting, cancellation/shutdown and compatibility relevant to each area. No fabricated performance results, compiler support, test passes or production readiness. Performance profiles measure p50/p95/p99, throughput, allocations, peak RSS/CPU and build cost; avoid arbitrary universal speedup claims. Cryptographic/TLS recommendations based on OpenSSL 3.5 guide; new storage durability methodology on SQLite atomiccommit; Raft paper for consensus. Primary URLs: https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/ ; https://sqlite.org/atomiccommit.html#_testing_atomic_commit_behavior ; https://sqlite.org/wal.html ; https://raft.github.io/raft.pdf ; https://man7.org/linux/man-pages/man7/epoll.7.html . Cite near claims.
## 10. Acceptance criteria
1. All owned documents exist and contain distinct, substantial implementation guidance; no empty boilerplate or arbitrary word-count padding.
2. Source links and existing behavior are checked; NEW contracts clearly labeled; source coverage limitations reported.
3. Each plan has concrete APIs/dataflow, native/backend decision, ownership/failure/resource limits, task DAG/dependencies, test scenarios and compatibility/rollback.
4. Shared C-01..C-14 contracts are respected and cross-links use agreed names.
5. Commands distinguish CURRENT available checks from PROPOSED checks with prerequisites; future reference apps are specified only.
6. No unowned modifications, implementation changes, unsupported measured claims or unresolved high-impact alternatives.
## 11. Verification commands and evidence
Cwd /home/faumaray/Projects/VoidLibrary. Observed current baseline commands: cmake -S . -B /tmp/voidlibrary-discovery-f1f9ba3 -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=OFF -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src ; cmake --build /tmp/voidlibrary-discovery-f1f9ba3 --parallel 4 ; ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60. Do not rerun builds/tests for this documentation task. Normal build passed; VoidTests 1245 passed/2 failed/3 skipped out of1250; failures hard-code absent /bin/echo and /bin/cat; installed component consumers passed. Werror failed in cached Boost1.84 headers. No sanitizer/benchmark/cross-platform checks ran. Actual test runner --filter syntax exists but verify names before showing existing filtered commands. Generic future build paths must be labeled templates/proposed.
Run documentation checks via scoped rg, file inventory and git diff --check -- <owned paths> (new files require direct content inspection too). Root will run full coverage/link/ID validation. Do not add a validation script or tests outside ownership.
## 12. Constraints and stop conditions
No child agents or independent user questions. Stop on ownership collision, a required protected read, unavailable configured role, or a contradiction requiring shared contract change; report to parent with a bounded resolution. Missing graph coverage alone permits scoped direct reads. Do not treat an absent NEW file as a blocker. No commits/pushes or application edits. Finish all owned documents before returning unless a genuine blocker exists.
## 13. Authorization and decisions
User approved this exact planning-package scope on 2026-11-24. Prior architectural planner and fresh preflight reviewer complete; current handoff specifies exclusive documentation ownership. Parent reviewed technical content and will lint full specification before dispatch. Default choices within ARCHITECTURE.md are authorized planning decisions. No permission to implement features is inferred.
## 14. Return format
Return task ID; DONE/BLOCKED/PARTIAL; files changed; concise content/decision highlights; source and graph coverage limitations; exact documentation checks and outcomes; unrun checks; cross-file integration issues. Do not paste full documents or spawn children.
+62
View File
@@ -0,0 +1,62 @@
# Storage, operations, quality and networked platform plans
Task ID: T-DOC-104
Role: astra_implementer
Status: APPROVED
## 1. Context and baseline
Repository/cwd /home/faumaray/Projects/VoidLibrary, main at f1f9ba375b22abf1adcc7c550ec21ac20895c0a4. Tracked tree was clean; unrelated protected untracked .env, WG.conf, keys and .serena untouched. Parent now authors docs/roadmap and docs/agent-workflow in the shared checkout. User approved a detailed planning package with "Implement the plan"; the approved plan explicitly says feature implementation follows separately. Prior astra_planner architecture investigation and fresh astra_reviewer preflight READY completed. You implement documentation only. Requirements R-001 through R-016 in docs/roadmap/REQUIREMENTS.md are authoritative. Role configured Astra/XHigh; user explicitly approved this fallback after the Sol model reported capacity exhaustion. No further model substitution.
## 2. Objective and deliverables
Author all 10 exclusive Markdown files listed below as substantial, individually actionable plans grounded in existing source. Module plans cover existing capabilities and expansion; subsystem/platform plans clearly mark NEW designs. Deliver actual documents, not summaries or placeholders. Each includes source baseline, concrete capability backlog, proposed APIs/types/examples, dataflow/algorithms/ownership/failure behavior, backend rationale, performance/resource limits, ordered implementation tasks, validation and migration. Specific content emphasis: Storage is original native WAL + ordered memory index + immutable sorted checkpoint/table files, single serialized writer, atomic batches/preconditions, stable snapshots, ordered scans, bounded compaction, explicit fsync/manifest/unknown-outcome contracts and format evolution. SQLite is a separate first-class C API integration, not reimplemented SQL/file format. Specify WAL records/commit boundaries sufficiently to guide implementation with checksums/versioning/torn-write and corruption recovery, compaction crash ordering and snapshot retention. Log handles process-wide LogState, reentrant callbacks, bounded total in-flight memory, saturation/flush/failure. Observability hook-only lower dependencies, bounded cardinality and traces, context lifetimes. Testing/Mock add deterministic/property/fuzz capabilities with own framework regression checks, do not count intentional skip demos as broken feature work. Archive preserves anti-traversal limits and atomic workflows. Update exact signed bytes, strict profile and existing durable healthy commit point stay protected. Platform specifies future reference service workflows and operations using shared contracts.
## 3. Scope and non-goals
Only planning documents are implemented. No C++ changes, CMake/CI changes, new runnable applications, dependency installation, benchmark execution, Git commits/pushes, publishing or configuration edits. No edits to another worker's files. Do not reopen the user interview, narrow the approved breadth, or implement features while documenting them. Existing docs/short-url.md remains intact. Do not change shared contracts unilaterally.
## 4. Files to inspect
First read docs/roadmap/REQUIREMENTS.md, docs/roadmap/ARCHITECTURE.md, docs/agent-workflow/DECISIONS.md and /home/faumaray/.codex/skills/code-intelligence/SKILL.md. Inspect exact relevant headers under include/Void/{Log,Stacktrace,Testing,TestingMock,Archive,Update,Sqlite}, sources/module.cmake under src/{Log,Stacktrace,Testing,TestingMock,Archive,Update,Sqlite}, and tests/standalone/{Log,Stacktrace,Testing,TestingMock,Archive,Update,Sqlite}. These are real directories, not permission to traverse secrets. Adjacent explicitly identified shared source files are readable when necessary. CMakeLists.txt, cmake/Module.cmake and tests/CMakeLists.txt define current targets/tests; inspect only as needed, root owns cross-cutting analysis. New subsystems have no current source directory: label proposed paths NEW. Use scoped file inventory before citing any specific file not listed here.
## 5. Write ownership and coordination
Write scope: docs/roadmap/modules/Log.md; docs/roadmap/modules/Stacktrace.md; docs/roadmap/modules/Testing.md; docs/roadmap/modules/TestingMock.md; docs/roadmap/modules/Archive.md; docs/roadmap/modules/Update.md; docs/roadmap/modules/Sqlite.md; docs/roadmap/subsystems/Storage.md; docs/roadmap/subsystems/Observability.md; docs/roadmap/platforms/NetworkedApplications.md
You are not alone in the codebase. All other files are non-owned, including shared roadmap root documents, workflow/task records, existing project docs and application/build/test files. Shared checkout is intentional; do not switch branches, reset, stash, clean, stage or commit. Edit only assigned Markdown files directly with apply_patch; create their parent directories if needed. Do not revert others' work. Root owns shared contracts and master integration. Return any conflict with exact evidence and proposed change to root.
## 6. Implementation or investigation approach
1. Read shared contracts C-01..C-14 and preserve them. Root-owned decisions already select overall scope, boundaries and algorithms; fill bounded details for your assigned areas coherently.
2. Confirm repo and codememory project home-faumaray-Projects-VoidLibrary identity/freshness with index_status. Query only scoped include/src/tests paths. Graph may contain protected data, so no whole-repo text/graph browsing. Use search_graph then trace_path/get_code_snippet for structure; inspect source for important claims. Call check_index_coverage for EVERY relied-on source file and directly read flagged missing ranges. If graph unavailable, use scoped source fallback and disclose. Serena manual must be read if used; project is already active VoidLibrary, do not change activation.
3. For each document, ground existing features/tests and gaps before designing NEW additions. Cite portable relative source links from the file location, not absolute workstation paths. Keep source facts separate from design recommendations.
4. Use sections tailored to the area but cover all deliverables. Each task gets a unique ID M-<MODULE>-NN, S-<SUBSYSTEM>-NN, or P-<PLATFORM>-NN, explicit dependencies, intended implementation scope, acceptance and role recommendation. Use phase P0 baseline, P1 foundations, P2 module completion, P3 initial platforms/optimization, P4 distributed. All feature tasks are PLANNED.
5. Draft concrete representative NEW API/type shapes; preserve existing namespace facts and distinguish illustrative NEW code from compiling examples. Shared types are referenced to their owner, not independently redefined. Choose bounded sensible defaults and explain tradeoffs. Avoid unspecified "consider X or Y" where it changes implementation; select a design or explicitly stage alternatives behind a later named capability gate.
6. Native-vs-external choices are per module. Retain current security primitives as initial implementations. Cite primary sources already supplied below; if new consequential library facts require research, use context7 skill resolving library id first, then official docs/web only, never submit private source.
7. Cross-link shared architecture/performance/validation/migration and relevant area documents. Other workers may still be creating them; expected names in master contract below are valid planned links. Do not repeatedly check unfinished peers.
8. Validate your own documents for ownership, meaningful content, source/path accuracy, unique IDs and no unresolved placeholders. Tell root any shared decision that needs reconciliation. Do not pad every file with repeated common text.
## 7. Interfaces and data contracts
Authoritative shared contracts: architecture C-01 foundation layers; C-02 Result/expected errors; C-03 std::stop_token+steady deadline and one completion; C-04 embedded/managed composition; C-05 bounds; C-06 IO/Net; C-07 general vs strict signed data; C-08 native Storage separate from SQLite; C-09 owning Service/Plugin/C ABI; C-10 FSM/Scheduler/Update commit; C-11 Log/Observability; C-12 distributed ownership/consistency; C-13 naming/migration; C-14 platforms.
Existing names must be source-verified. NEW API illustrations do not claim existence. Detailed task IDs use area names uppercased (e.g. M-ASYNC-01, S-IO-01, P-RELOADABLE-01). Relative references to peers: ../modules/<Name>.md, ../subsystems/<Name>.md or ../platforms/<Name>.md; shared files ../ARCHITECTURE.md, ../REQUIREMENTS.md, ../DEPENDENCIES.md, ../DELIVERY.md, ../PERFORMANCE.md, ../VALIDATION.md, ../MIGRATION.md, ../BUILD-AND-DISTRIBUTION.md, ../DOCUMENTATION.md.
## 8. Dependencies and integration
Parent creates shared root documents and workflow records concurrently. Four worker packages have disjoint ownership. Existing modules planned: Core Functional Containers Math Text Data Async Time Log System Configuration Stacktrace Plugin Service Fsm Testing TestingMock Binary Archive Crypto Security Sqlite Resilience Update ShortUrl Net. NEW subsystems: Memory Algorithms Unicode IO Runtime Scheduler Storage IPC RPC Messaging Observability Discovery Coordination Replication DistributedStorage. Platforms: NetworkedApplications ReloadableApplications DistributedApplications. Only your listed paths are writable. Parent checks integration and commissions fresh adversarial review of actual docs. No dependency on other worker completion before drafting against ARCHITECTURE.md.
## 9. Edge cases security and performance
Never read .env, .env.*, WG.conf, keys or descendants; ~/.config/agent-integrations, ~/.ssh, ~/.gnupg, ~/.opencodex, /run/agenix.d, nixos-config/jev_token. No broad indexing/reindexing and no private source in public queries. No credentials or other repository information in documents.
Specify concrete failure paths, resource accounting, cancellation/shutdown and compatibility relevant to each area. No fabricated performance results, compiler support, test passes or production readiness. Performance profiles measure p50/p95/p99, throughput, allocations, peak RSS/CPU and build cost; avoid arbitrary universal speedup claims. Cryptographic/TLS recommendations based on OpenSSL 3.5 guide; new storage durability methodology on SQLite atomiccommit; Raft paper for consensus. Primary URLs: https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/ ; https://sqlite.org/atomiccommit.html#_testing_atomic_commit_behavior ; https://sqlite.org/wal.html ; https://raft.github.io/raft.pdf ; https://man7.org/linux/man-pages/man7/epoll.7.html . Cite near claims.
## 10. Acceptance criteria
1. All owned documents exist and contain distinct, substantial implementation guidance; no empty boilerplate or arbitrary word-count padding.
2. Source links and existing behavior are checked; NEW contracts clearly labeled; source coverage limitations reported.
3. Each plan has concrete APIs/dataflow, native/backend decision, ownership/failure/resource limits, task DAG/dependencies, test scenarios and compatibility/rollback.
4. Shared C-01..C-14 contracts are respected and cross-links use agreed names.
5. Commands distinguish CURRENT available checks from PROPOSED checks with prerequisites; future reference apps are specified only.
6. No unowned modifications, implementation changes, unsupported measured claims or unresolved high-impact alternatives.
## 11. Verification commands and evidence
Cwd /home/faumaray/Projects/VoidLibrary. Observed current baseline commands: cmake -S . -B /tmp/voidlibrary-discovery-f1f9ba3 -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=OFF -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src ; cmake --build /tmp/voidlibrary-discovery-f1f9ba3 --parallel 4 ; ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60. Do not rerun builds/tests for this documentation task. Normal build passed; VoidTests 1245 passed/2 failed/3 skipped out of1250; failures hard-code absent /bin/echo and /bin/cat; installed component consumers passed. Werror failed in cached Boost1.84 headers. No sanitizer/benchmark/cross-platform checks ran. Actual test runner --filter syntax exists but verify names before showing existing filtered commands. Generic future build paths must be labeled templates/proposed.
Run documentation checks via scoped rg, file inventory and git diff --check -- <owned paths> (new files require direct content inspection too). Root will run full coverage/link/ID validation. Do not add a validation script or tests outside ownership.
## 12. Constraints and stop conditions
No child agents or independent user questions. Stop on ownership collision, a required protected read, unavailable configured role, or a contradiction requiring shared contract change; report to parent with a bounded resolution. Missing graph coverage alone permits scoped direct reads. Do not treat an absent NEW file as a blocker. No commits/pushes or application edits. Finish all owned documents before returning unless a genuine blocker exists.
## 13. Authorization and decisions
User approved this exact planning-package scope on 2026-11-24 and explicitly approved the configured astra_implementer/XHigh fallback for this unchanged assignment after Sol capacity failure. Prior architectural planner and fresh preflight reviewer complete; current handoff specifies exclusive documentation ownership. Parent reviewed technical content and will lint full specification before dispatch. Default choices within ARCHITECTURE.md are authorized planning decisions. No permission to implement features is inferred.
## 14. Return format
Return task ID; DONE/BLOCKED/PARTIAL; files changed; concise content/decision highlights; source and graph coverage limitations; exact documentation checks and outcomes; unrun checks; cross-file integration issues. Do not paste full documents or spawn children.
@@ -0,0 +1,64 @@
# Independent review of shared and foundation planning documents
Task ID: T-DOC-REVIEW-A
Role: astra_reviewer
Status: READY
## Additional baseline-wording integration recheck
Root verified src/Update/Feed.cpp lines631–704 and its Json.hpp include: schema3 parses the decoded signed payload for readable-document equality before Crypto::verifyEd25519. verifyFeedEnvelope does parse feed schema after verifyEnvelope, but the earlier shared/Data wording could imply all payload parsing already waits for verification. Root corrected ARCHITECTURE C-07 and modules/Data.md to distinguish current general-Json parsing from separate StrictJson, preserve both compatibility profiles, and label verify-before-payload-parse as planned Update hardening. Include these exact changed paragraphs in your focused recheck; Update.md contains the detailed contract and review B covers it. Root checked Feed.cpp/Feed.hpp graph coverage and directly read all flagged ranges; Feed.cpp's verifyEnvelope is absent from the best-effort graph despite source presence. No new write scope or assignment expansion.
## 1. Context and baseline
Repository/cwd /home/faumaray/Projects/VoidLibrary, main HEAD f1f9ba375b22abf1adcc7c550ec21ac20895c0a4. User approved authoring the expansion planning package, not C++ feature implementation. Prior roadmap preflight READY; this is fresh review of actual authored docs. README has a navigation addition; new docs are untracked, so git diff alone cannot show them. Existing unrelated protected untracked files remain untouched. Root and other workers share checkout; review scope below is authored/stable except root verification/state records being finalized.
## 2. Objective and deliverables
Read and adversarially review the 21 actual roadmap files in section 4 plus relevant workflow evidence. Return READY/CHANGES_REQUIRED/INSUFFICIENT_EVIDENCE with severity-ranked concrete defects, cross-plan contradictions, unsupported source claims and minimum corrections. Validate R-001..R-016 and C-01..C-14 against the written package, not worker summaries. This is documentation correctness, not proof that proposed algorithms are implemented.
## 3. Scope and non-goals
Shared architecture/requirements/delivery/quality/migration and all foundation/data plans. Another fresh reviewer will cover runtime/storage/network/distributed plans after remaining authors finish. You may read those adjacent docs to check a shared boundary if present, but do not duplicate a broad review of that slice. No files may be changed, no code builds/tests, no user questions or children.
## 4. Files to inspect
Primary authored files:
- docs/roadmap/README.md
- docs/roadmap/REQUIREMENTS.md
- docs/roadmap/ARCHITECTURE.md
- docs/roadmap/DEPENDENCIES.md
- docs/roadmap/DELIVERY.md
- docs/roadmap/PERFORMANCE.md
- docs/roadmap/VALIDATION.md
- docs/roadmap/MIGRATION.md
- docs/roadmap/BUILD-AND-DISTRIBUTION.md
- docs/roadmap/DOCUMENTATION.md
- docs/roadmap/modules/Core.md
- docs/roadmap/modules/Functional.md
- docs/roadmap/modules/Containers.md
- docs/roadmap/modules/Math.md
- docs/roadmap/modules/Text.md
- docs/roadmap/modules/Time.md
- docs/roadmap/modules/Binary.md
- docs/roadmap/modules/Data.md
- docs/roadmap/subsystems/Memory.md
- docs/roadmap/subsystems/Algorithms.md
- docs/roadmap/subsystems/Unicode.md
Also README.md navigation diff; docs/agent-workflow/DECISIONS.md, STATE.md, TASKS.md and VERIFICATION.md for authorization/evidence. Optional actual source is limited to explicitly linked include/Void/<Module>, src/<Module>, tests/standalone/<Module>, CMakeLists.txt/cmake files needed to verify a consequential claim. Source baseline read in prior discovery; no exhaustive rediscovery.
## 5. Write ownership and coordination
Write scope: none
All files non-owned. Shared checkout: no edits, branch switches, installs, reindexing, activation changes, or remote mutations. Root alone integrates corrections. Use actual file contents for new docs. Remaining storage/runtime authors have disjoint area files and cannot change your primary files.
## 6. Implementation or investigation approach
Read requirements and architecture, then authored area contracts/tasks. Verify API ownership, dependency direction, standard-library-only foundation, native/backend rationale, precise integer/codec semantics, strict signed-data preservation, allocator/borrow lifetime, bounds, migration, task readiness and useful acceptance checks. Check the plans are substantive and decisions are concrete rather than placeholder choices. Check CURRENT vs PROPOSED commands and evidence, including known baseline failures. Run the temporary read-only checker if useful; it may still report missing peer files while those are authored. Do not flag those known pending files as completed-package defects prematurely. Manually inspect semantic issues independent of checker.
For source/graph navigation read code-intelligence skill, verify project home-faumaray-Projects-VoidLibrary root/freshness, scope queries to actual linked paths, call check_index_coverage for every relied-on file and read flagged ranges. Graph is best effort. No broad repository query, no secret reads. Do not defer ordinary factual investigation to the user.
## 7. Interfaces and data contracts
Shared contracts C-01..C-14 are authoritative. Current modules' namespaces differ from targets; NEW examples must be marked. Functional owns errors; Time clocks; Async std::stop_token+steady deadline; Binary encoding primitives; Data value codec; Storage checksums/recovery; Memory allocators. Preserving StrictJson is required. Native proposals need no runtime benchmark success claim. Review source/ABI/wire/disk evolution separately.
## 8. Dependencies and integration
Author T-DOC-101 complete with 11 plans/70 task definitions; root 10 shared documents authored. T-DOC-102/104 may still finish. Other review covers their integration and T-DOC-103. Root reconciles findings, repairs documents and requests recheck for changed risk areas. No reviewer approval authorizes feature implementation/publication.
## 9. Edge cases security and performance
No .env, .env.*, WG.conf, keys or descendants; ~/.config/agent-integrations, ~/.ssh, ~/.gnupg, ~/.opencodex, /run/agenix.d or nixos-config/jev_token. No private source in public queries. Look for invalid byte/allocator lifetime, integer overflow, format ambiguity, silent loss, unsupported claims and cyclic dependency contracts. Performance targets must distinguish proposed budgets from measured evidence.
## 10. Acceptance criteria
1. All 21 primary files inspected sufficiently for a defensible verdict.
2. Findings include severity, exact file/section, triggering scenario, impact, evidence and minimal correction.
3. Important contracts are coherent and planned work is not described as implemented.
4. Verify source evidence for consequential disputed claims; do not invent findings from incomplete graph.
5. Files changed none; disclose unrun checks and coverage limitations.
## 11. Verification commands and evidence
Cwd repo root. Allowed git status --short, git diff --stat, git diff --check, scoped rg/sed, python3 -B /tmp/void-roadmap-check.py (read-only documentation inventory/links/IDs; partial peer presence may fail). Existing full normal build passed before authorship; VoidTests 1245 passed/2 failed/3 skipped and installed consumers passed; Werror Boost1.84 warnings failed. No tests have passed for NEW features. Do not rerun application tests for Markdown. Root will perform final complete-package link checks.
## 12. Constraints and stop conditions
Do not edit, run app tests, spawn or talk to user. Stop on protected access or wrong project. Return focused evidence gaps instead of broad unsupported claims. Treat in-progress workflow records as provisional; identify what must be updated before final completion. Prioritize actionable P0-P2; record P3 without derailing.
## 13. Authorization and decisions
User approved plan-file authoring. This configured astra_reviewer/XHigh task provides independent technical review. Prior authors had no review authority. Root persists and structurally lints this assignment before dispatch; model runtime identity remains configured, not independently attested.
## 14. Return format
Task ID; verdict; summary; severity-ranked findings with exact locations/corrections; files inspected; checks and outcomes; coverage caveats; files changed (none); tests not run. Keep report focused, not a restatement of all plans.
## Recheck scope after first correction
Review A found P2 at DEPENDENCIES.md: Algorithms→Containers conflicted with the detailed Containers→Algorithms design, with Math's container prerequisite adding a possible cycle. Root has corrected docs/roadmap/DEPENDENCIES.md, ARCHITECTURE.md C-01, modules/Math.md and subsystems/Algorithms.md. Re-read those files and unchanged modules/Containers.md/Text.md where needed. Verify Math scalar arithmetic → Algorithms → Containers/Text adapters, explicit M-MATH-02 prerequisite, standard-library scratch storage, and no reverse imports. No write ownership or broader assignment change. Root git diff --check passed; task specification lint passed. Return whether the original finding is resolved and a final verdict for your original 21-file slice; do not repeat the broad review without a new concern. Root will finalize workflow records after both review slices and complete-package checks.
+101
View File
@@ -0,0 +1,101 @@
# Independent integrated review of runtime, storage and platform plans
Task ID: T-DOC-REVIEW-B
Role: astra_reviewer
Status: READY
## 1. Context and baseline
Repository/cwd /home/faumaray/Projects/VoidLibrary; main HEAD f1f9ba375b22abf1adcc7c550ec21ac20895c0a4. User approved the multi-file expansion planning package, not C++ features. Original request is generic library from small stdlib-only foundations through complete modules and optional platforms. Existing source/test baseline was inspected and ordinary full build passed before document authoring. New roadmap docs are untracked, so inspect their actual contents; git diff alone does not show them. T-DOC-102 and 103 authors finished their 23 files. T-DOC-104 is finishing its last three files (Update, Observability, NetworkedApplications); read 102/103 and completed 104 documents first. Root will confirm the last packet is stable before your final verdict. All agents share this checkout.
## 2. Objective and deliverables
Fresh adversarial review of the actual 33 area plans listed below and their integrated contracts with shared roadmap documents. Return READY/CHANGES_REQUIRED/INSUFFICIENT_EVIDENCE with concrete severity-ranked defects and minimum corrections. Detect cross-file ownership, lifetime, durability, security, dependency and task-order contradictions. This review judges actionable planning quality, not whether proposed APIs have been implemented.
## 3. Scope and non-goals
Primary runtime/system/network/security/storage/operations/quality plans and all three platforms. The other fresh reviewer owns the 11 foundation plans and 10 shared documents but your cross-component findings may touch shared contracts. Read adjacent foundation docs only where a boundary requires it. No application edits, test builds, broad rediscovery, internet publication, questions to user, or additional agents.
## 4. Files to inspect
Primary area files:
- docs/roadmap/modules/Async.md
- docs/roadmap/modules/System.md
- docs/roadmap/modules/Configuration.md
- docs/roadmap/modules/Service.md
- docs/roadmap/modules/Fsm.md
- docs/roadmap/modules/Plugin.md
- docs/roadmap/subsystems/IO.md
- docs/roadmap/subsystems/Runtime.md
- docs/roadmap/subsystems/Scheduler.md
- docs/roadmap/subsystems/IPC.md
- docs/roadmap/platforms/ReloadableApplications.md
- docs/roadmap/modules/Net.md
- docs/roadmap/modules/Resilience.md
- docs/roadmap/modules/Crypto.md
- docs/roadmap/modules/Security.md
- docs/roadmap/modules/ShortUrl.md
- docs/roadmap/subsystems/RPC.md
- docs/roadmap/subsystems/Messaging.md
- docs/roadmap/subsystems/Discovery.md
- docs/roadmap/subsystems/Coordination.md
- docs/roadmap/subsystems/Replication.md
- docs/roadmap/subsystems/DistributedStorage.md
- docs/roadmap/platforms/DistributedApplications.md
- docs/roadmap/modules/Log.md
- docs/roadmap/modules/Stacktrace.md
- docs/roadmap/modules/Testing.md
- docs/roadmap/modules/TestingMock.md
- docs/roadmap/modules/Archive.md
- docs/roadmap/modules/Update.md
- docs/roadmap/modules/Sqlite.md
- docs/roadmap/subsystems/Storage.md
- docs/roadmap/subsystems/Observability.md
- docs/roadmap/platforms/NetworkedApplications.md
Read shared docs/roadmap/{REQUIREMENTS,ARCHITECTURE,DEPENDENCIES,DELIVERY,PERFORMANCE,VALIDATION,MIGRATION,BUILD-AND-DISTRIBUTION,DOCUMENTATION,README}.md as needed to evaluate these interfaces and coverage. Read docs/agent-workflow/{DECISIONS,VERIFICATION,STATE,TASKS}.md and T-DOC-102/103/104 task specs for original scope and evidence. Optional actual source is limited to linked include/Void/<Module>, src/<Module>, tests/standalone/<Module>, existing docs/short-url.md and build/CI declarations needed to verify a consequential claim. Read exact source, not summaries, when disputing a baseline fact.
## 5. Write ownership and coordination
Write scope: none
Every file is non-owned. No edits, branch changes, installations, reindexing, active-project changes, Git mutations or remote side effects. Root integrates fixes. T-DOC-104 exclusively owns the remaining three area files while completing them; avoid those until they exist and root confirms completion. T-DOC-102/103 and seven completed 104 files are stable except targeted corrections coordinated by root. No private worktree is assumed.
## 6. Implementation or investigation approach
Read contract IDs and requirements, then the actual area plans. Review coherent NEW API semantics, concrete resource/algorithm choices, task prerequisites, failure behavior and useful acceptance evidence. Focus on cross-boundary races and crash consistency:
- Async terminal arbitration versus Storage/SQLite durable commit outcomes: cancellation is not proof of rollback; durable outcomes must remain inspectable.
- TaskScope/Runtime join ownership on executor threads, deadlines with still-running work, IO late completions/buffers, cancellation/resume ticket single completion.
- Service handles, Plugin generation pins across async/callback/destructor activity, C ABI ownership, and ReloadableApplications single-generation publication plus read-only health window until Update's durable healthy commit.
- Storage single-writer visibility, bounded versions/snapshots/compaction, WAL/footer/CRC32C framing, CURRENT manifest authority, crash tails versus corruption, unknown commit outcomes; Binary owns encoders, Storage owns framing/checksum helper and tests.
- Raft persist-before-reply, stable identifiers and membership, atomic application/dedup/applied position, quorum read barriers, recovery/snapshot installation, durable discovery and at-least-once messaging.
- TLS verification/deadlines/redirects, RPC authentication/framing, retry/idempotency and bounded admission; platform budget composition.
- Log/Stacktrace/Observability dependency direction and callbacks outside locks; signal handling claims; TestingMock ownership/reentrancy and SQLite transaction lifetime.
Check CURRENT vs NEW/PROPOSED distinctions, unrun verification honesty, native-vs-adapter rationale, migration stages and source compatibility. Do not flag expected last author files as defects before completion. Do not demand implementation tests for documentation.
For source navigation use the code-intelligence skill at /home/faumaray/.codex/skills/code-intelligence/SKILL.md. Serena already active VoidLibrary; read initial instructions if not inherited, do not change the active project. Codememory project home-faumaray-Projects-VoidLibrary root/freshness verified by root; still verify identity before querying and call check_index_coverage for every relied-on path, reading flagged source ranges. Graph remains best effort. Public documentation queries must never include private source.
## 7. Interfaces and data contracts
Shared C-01..C-14 govern. C-03 OperationOptions contains std::stop_token and optional steady-clock deadline; C-04 Time owns injected monotonic clock, Async execution, Memory allocation, Runtime composition. No hidden foundation workers. C-08 original native KV is distinct from SQLite; WAL/manifest atomic recovery and unknown outcomes required. C-09 same-toolchain plugins are separate from versioned opaque C ABI; no STL/exception crossing. C-10 checkpoint application state, never serialized C++ coroutine frames. C-12 pure Coordination state machine with higher Replication adapters and application/dedup/applied position atomicity; no global exactly-once guarantee. Root already corrected Replication recovery to follow Storage's durable CURRENT/generation pointer rather than the largest complete manifest. Root directed Storage's CRC32C ownership correction; verify actual final text. Examples are explicitly NEW and may be illustrative rather than compiling.
## 8. Dependencies and integration
Author packet 102: 11 plans /59 tasks. Packet 103: 12 plans /73 tasks. Packet 104: 10 plans, completion message pending at dispatch. Root shared ten docs authored; review A found and is rechecking one P2 foundation graph contradiction already corrected. Read 102/103 while final 104 files finish, then review the complete 104 packet and integrated cross-file contracts before final verdict. Root will send the stable-file confirmation. Root resolves findings and requests recheck for changed risk areas. Review is technical acceptance of plans, not authorization to implement features, push or deploy.
## 9. Edge cases security and performance
Never read repo .env, .env.*, WG.conf, keys or descendants; ~/.config/agent-integrations, ~/.ssh, ~/.gnupg, ~/.opencodex, /run/agenix.d or nixos-config/jev_token. No broad graph search that may return excluded content. Watch finite counts AND bytes (including inflight/batches), borrow lifetime, reentrant teardown, post-timeout work, format endian/length/CRC ambiguity, partial writes, stale snapshots, retry duplication and resource retention. Distinguish selected design defaults from measured benchmarks; no performance victory claimed without evidence. Native engine/protocol plans need falsifiable safety gates before broad platform claims.
## 10. Acceptance criteria
1. All 33 primary plans read sufficiently for a defensible integrated verdict; do not finalize before remaining packet completion.
2. Relevant shared contracts and all three platform compositions assessed.
3. Every actionable finding has severity, exact file/section, triggering scenario, impact, evidence and minimum correction.
4. Important source claims checked against actual source, with graph coverage caveats, where needed.
5. No unrelated edits or unsupported execution/model claims. Return files changed: none.
6. Distinguish substantive defects from optional future enhancements and unrun implementation tests.
## 11. Verification commands and evidence
Cwd repo root. Read-only commands: git status --short; git diff --check; git diff -- README.md; scoped rg/sed; python3 -B /tmp/void-roadmap-check.py. The temporary checker validates 54-file inventory, relative files/anchors, required content signals, unique feature task IDs/references and a heuristic explicit prerequisite DAG; named-gate semantics still need review. At 51/54 only absent last three files/links failed. Root also checks all new Markdown whitespace/fences because tracked diff misses untracked docs. Baseline: ordinary build exit0; CTest exit8, VoidTests1245 passed/2 failed/3 skipped, absent /bin/echo and /bin/cat implicated, installed consumers passed. Werror failed in pinned Boost1.84 GCC16/C++26 warnings. No new-feature tests run; do not rerun C++ tests for these plans.
## 12. Constraints and stop conditions
Read-only role; no child agents or user questions. Stop on wrong repository/protected access. Prioritize actionable P0-P2, report P3 briefly. If a consequential fact is unverifiable, state the gap rather than assuming a defect. Workflow status/evidence are being finalized; identify final-record updates needed rather than claiming provisional status is a completed-package contradiction. Do not inspect unfinished last three files repeatedly; use the stable files first and root's completion notice.
## 13. Authorization and decisions
User approved authoring these expanded plans, plus explicit configured astra_implementer/XHigh fallback for packet104 after Sol capacity exhaustion. This separate configured astra_reviewer/XHigh did not author these changes. Task spec persisted and structurally linted before dispatch; root owns semantic acceptance. Tool metadata shows configured role/effort, not an independent proof of runtime model identity. No external publishing authorization.
## 14. Return format
Task ID; verdict; brief summary; severity-ranked concrete findings with exact locations, trigger, impact, evidence and minimum fix; primary files inspected and cross-contract coverage; commands/results and source coverage limits; files changed none; tests not run. Do not restate all plans. If only final-author completion is pending, report interim findings while retaining the task, then finalize on the stable package.
## Focused recheck after three P2 corrections
All 54 documents and all author packets are now complete/stable. Your original three findings have been corrected by root; review only the changed boundaries and directly affected contracts, not a new broad audit. Changed roadmap files: ARCHITECTURE.md C-03; modules/Async.md ownership/backlog/validation; subsystems/IO.md backend/completion/backlog/validation; subsystems/Storage.md cancellation, P1 bootstrap, S-STORAGE-03/04 and fault-validation gate; subsystems/Runtime.md shutdown order/backlog/validation; platforms/NetworkedApplications.md shutdown timeout paragraph. Root updated workflow evidence separately.
Correction 1: stop/expiry is intent, not generic domain-result selection; Async delivers one domain result after backend access ends. Side-effect-free abort is distinct from known commitment and Unknown effects. IO had the same first-stop-wins wording, so its sync completion now preserves success/native failure after stop, enabling Storage/Update outcomes. Fake-adapter and IO/Storage scenarios cover stop before append/execution, during sync, successful sync after stop, failed sync after stop; no duplicate completion or premature cleanup. Check consistency with Configuration/Update without modifying them.
Correction 2: Runtime stops/drains business producers/scopes while keeping a separate bounded cleanup/export scope and IO/CPU/file workers alive. Exporters flush/close/join before resource teardown; timeout yields shutdown_incomplete with owners retained and later join allowed. NetworkedApplications explicitly agrees. Check an in-flight exporter whose flush and total deadlines expire, then backend releases, against Observability's existing contract.
Correction 3: S-STORAGE-03 now implements minimal CURRENT/manifest and WAL registration before acknowledgements, with initial-create/rotation crash tests and the fault harness. S-STORAGE-04 extends the same publication protocol for tables/checkpoints. No valid CURRENT means incomplete initialization, not adoption of an orphan; no earlier acknowledged batch is possible. Verify phase/task/format ordering is coherent and no new backward dependency.
No write ownership or model/role change. Root checker after first correction set passed 54/54, 878 links, 300 feature task IDs; IO follow-through will receive the same checker before recheck dispatch. git diff --check passed. Return resolved/unresolved for each original finding, any new actionable defect in changed boundaries, and final verdict for the assigned slice. Original command/security/return constraints still apply.
+38
View File
@@ -0,0 +1,38 @@
# P0 Process Test Environment Isolation
Task ID: X-BASE-01
Phase: P0
Status: APPROVED
## 1. Context and baseline
`tests/standalone/System/Process.cpp` currently invokes `/bin/echo`, `/bin/cat`, and `shell("seq 1 10000")`. On NixOS and minimal container hosts without `/bin/echo`, `/bin/cat`, or `seq` in `PATH`, those tests fail with child exit code 127.
## 2. Deliverables
- Controlled standard-library helper executable `tests/helpers/ProcessHelper.cpp` (`VoidProcessHelper`).
- CMake wiring in `tests/CMakeLists.txt` defining `VOID_PROCESS_HELPER_PATH` when `VoidTests` and `Void::System` are built.
- Updated `tests/standalone/System/Process.cpp` using `VOID_PROCESS_HELPER_PATH` instead of host `/bin/echo`, `/bin/cat`, or `seq`.
## 3. Exact files and interfaces
- `tests/helpers/ProcessHelper.cpp`:
- `echo [args...]`: prints space-separated args + `\n`, exits `0`.
- `cat`: copies raw stdin to stdout in 4096-byte chunks until EOF, exits `0`.
- `seq <start> <end>`: prints signed 64-bit integers inclusive one per line, exits `0`.
- `streams`: writes `"to_stdout\n"` to `stdout` and `"to_stderr\n"` to `stderr`, exits `0`.
- `exit <code>`: exits with parsed integer status code.
- `lines [--no-newline] [--stderr] [items...]`: emits lines to stdout or stderr.
- Invalid usage: prints diagnostic to `stderr` and exits `2`.
- `tests/CMakeLists.txt`: build `VoidProcessHelper` with C++26 (`VOID_TESTING_NO_AUTO_SCAN TRUE`) and pass `VOID_PROCESS_HELPER_PATH="$<TARGET_FILE:VoidProcessHelper>"` to `VoidTests`.
- `tests/standalone/System/Process.cpp`: replace hardcoded host commands; keep shell builtin tests (`/bin/sh` `echo`/`exit`) and `run_missing_executable_returns_code_127`; add direct argv `exit 42` and `streams` tests via `VOID_PROCESS_HELPER_PATH`.
## 4. Edge cases
- Helper binary uses only the C++ standard library (no `Void::` module dependencies) so it cannot mask failures in `Void::System`.
- Numeric parsing in `seq` and `exit` uses `std::from_chars` and rejects malformed/partial inputs with exit `2`.
## 5. Acceptance criteria
- `Process` and `ProcessStream` suites pass with 0 failures on NixOS without `/bin/echo`, `/bin/cat`, or `seq`.
- Full `VoidTests` passes with 0 failures (only existing intentional skip demonstrations in `Testing/Math.cpp`).
## 6. Verification commands
```sh
cmake --build /tmp/void-p0-base --parallel 4
/tmp/void-p0-base/tests/VoidTests --filter "Process*"
```
+33
View File
@@ -0,0 +1,33 @@
# P0 Warnings-as-Errors Isolation for Boost Headers
Task ID: X-BASE-02
Phase: P0
Status: APPROVED
## 1. Context and baseline
Building with `-DVOID_WARNINGS_AS_ERRORS=ON` on GCC 16.2.0 (`-std=c++26`) fails inside fetched Boost 1.84.0 headers (`boost/intrusive/detail/ebo_functor_holder.hpp`, `boost/beast/core/detail/string.hpp`, `boost/beast/http/span_body.hpp`) when compiling `src/Net/Http.cpp`.
## 2. Deliverables
- Mark FetchContent Boost headers as `SYSTEM` in `cmake/Dependencies.cmake`.
- Keep `-Wall -Wextra -Wpedantic -Werror` strict across all Void-owned sources in `cmake/Module.cmake`.
## 3. Exact files and interfaces
- `cmake/Dependencies.cmake`: add `SYSTEM` to `FetchContent_Declare(Boost ...)`; ensure Boost target properties preserve `SYSTEM TRUE` without modifying global warning flags.
- `src/Net/Http.cpp` (only if template instantiation inside Void TU still surfaces a Boost diagnostic): isolate strictly at the offending `#include`/site via scoped `#pragma GCC diagnostic push/pop`.
## 4. Edge cases
- Do NOT disable warnings globally or weaken `VOID_WARNINGS_AS_ERRORS` in `cmake/Module.cmake`.
- Any warning originating in Void's own code must be fixed at its source.
## 5. Acceptance criteria
- Full all-module configure/build with `-DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=ON` exits `0` with zero warnings or errors.
- Full `VoidTests` runs and passes.
## 6. Verification commands
```sh
cmake -S . -B /tmp/void-p0-werror -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=ON \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src
cmake --build /tmp/void-p0-werror --parallel 4
/tmp/void-p0-werror/tests/VoidTests
```
+37
View File
@@ -0,0 +1,37 @@
# P0 Module Closures, Header Ownership, and Consumer Matrix
Task ID: X-BASE-03
Phase: P0
Status: APPROVED
## 1. Context and baseline
Audit of `src/*/module.cmake` vs `#include <Void/...>` reveals:
1. `<Void/Log/Log.hpp>` is used by `LogState`, `Async`, `System`, `Stacktrace`, `Configuration`, `Plugin`, and `Service`, yet is installed only by `Void_Log`.
2. Undeclared acyclic internal dependencies in `Containers`, `Data`, `Configuration`, `Service`, `Plugin`, `Fsm`, `Testing`, `TestingMock`, and `Log`.
3. `Core/Uuid.hpp` still leaks `<Void/Math/Random.hpp>` (resolved in `M-CORE-02`); `Functional/Detail/Repr.hpp` includes `<Void/Core/Meta.hpp>`.
4. `tests/CMakeLists.txt` fails when `VOID_ENABLED_MODULES` builds subsets, and `InstalledComponents.cmake` lacks foundation, embedded, static, and relocated checks.
## 2. Deliverables
- Extend `cmake/Module.cmake` with `EXTRA_HEADERS` / `EXCLUDE_HEADERS`; transfer `<Void/Log/Log.hpp>` ownership to `LogState`.
- Reconcile acyclic `INTERNAL_DEPS` across `src/*/module.cmake` files and introduce `Void::FunctionalCoreFormatting`.
- Filter `VoidTests` sources in `tests/CMakeLists.txt` by required `ACTIVE_MODULES` and forward `ACTIVE_MODULES`, `CMAKE_GENERATOR`, and `CMAKE_MAKE_PROGRAM` to `InstalledComponents.cmake`.
- Add `tests/package/Foundation`, `tests/package/Embedded`, and relocated-prefix validation in `InstalledComponents.cmake`.
## 3. Exact files and interfaces
- `cmake/Module.cmake`, `src/LogState/module.cmake`, `src/Log/module.cmake`
- `src/Containers/module.cmake`, `src/Data/module.cmake`, `src/Configuration/module.cmake`, `src/Service/module.cmake`, `src/Plugin/module.cmake`, `src/Fsm/module.cmake`, `src/Testing/module.cmake`, `src/TestingMock/module.cmake`
- `include/Void/FunctionalCoreFormatting/Repr.hpp`, `src/FunctionalCoreFormatting/module.cmake`
- `tests/CMakeLists.txt`, `tests/package/InstalledComponents.cmake`, `tests/package/Foundation/*`, `tests/package/Embedded/*`
## 4. Edge cases
- Do not add `Math` to `Core/module.cmake` (violates C-01); keep `Core -> Math` documented until `M-CORE-02`.
- Keep `Void/Functional/Detail/Repr.hpp` installed with `Functional` for Wave A+B while providing `Void::FunctionalCoreFormatting`.
- Fail loudly if `VOID_ENABLE_TESTING=ON` without `Testing` enabled or if 0 package consumers run.
## 5. Acceptance criteria
- Full `ctest` (including relocated `VoidInstalledComponentConsumers`) passes with `-Werror`.
- Minimal foundation subset (`Time;Math;Text;Binary;Functional;Testing`) builds and passes with external packages disabled.
- `System;Testing` without `Log` installs `include/Void/Log/Log.hpp` and passes `Process*`.
- Static (`-DBUILD_SHARED_LIBS=OFF`) and embedded `add_subdirectory` (`tests/package/Embedded`) consumers build and pass.
## 6. Verification commands
See `VERIFICATION.md` commands for `/tmp/void-p0-closures`, `/tmp/void-p0-minimal`, `/tmp/void-p0-system`, `/tmp/void-p0-embedded`, and `/tmp/void-p0-static`.
+33
View File
@@ -0,0 +1,33 @@
# P0 Compiler, Reflection, and Sanitizer Capability Probes
Task ID: X-BASE-04
Phase: P0
Status: APPROVED
## 1. Context and baseline
`CMakeLists.txt` defines ASan/UBSan/Coverage options without verifying compiler+linker support or mutual exclusion with TSan, and lacks feature probes for C++26 reflection (`<meta>`, `^^int`) and `std::expected`.
## 2. Deliverables
- `cmake/Capabilities.cmake`: `check_cxx_source_compiles` probes for `VOID_HAS_CXX26_REFLECTION`, `VOID_HAS_STD_EXPECTED`, and requested sanitizer options (`VOID_ENABLE_ASAN`, `VOID_ENABLE_UBSAN`, `VOID_ENABLE_TSAN`), plus `void_report_capabilities()`.
- Mutual-exclusion guard (`ASAN` + `TSAN`) and `VOID_ENABLE_TSAN` wiring in `CMakeLists.txt` and `cmake/Module.cmake`.
## 3. Exact files and interfaces
- `cmake/Capabilities.cmake`
- `CMakeLists.txt`
- `cmake/Module.cmake`
## 4. Edge cases
- Probes must respect existing `-freflection` flags on GNU >= 16.
- Unsupported sanitizer flags fail configure cleanly with a clear diagnostic rather than silently skipping checks.
## 5. Acceptance criteria
- Full Debug ASan+UBSan+`-Werror` build compiles cleanly and passes `VoidTests` with `detect_leaks=1:halt_on_error=1`.
- TSan subset (`Async;Time;Core;Functional;Testing`) configures, compiles, and passes tests.
## 6. Verification commands
```sh
cmake -S . -B /tmp/void-p0-asan -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug \
-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON -DVOID_WARNINGS_AS_ERRORS=ON -DVOID_ENABLE_TESTING=ON \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON -DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src
cmake --build /tmp/void-p0-asan --parallel 4
ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 /tmp/void-p0-asan/tests/VoidTests
```
+39
View File
@@ -0,0 +1,39 @@
# P0 Reproducible Benchmark Harness and Initial Baseline
Task ID: X-BASE-05
Phase: P0
Status: APPROVED
## 1. Context and baseline
`PERFORMANCE.md` requires reproducible workload manifests, separate empty-harness baselines, median/p95/p99/95%-CI statistics over >= 5 warmup and >= 20 measured repetitions, and JSON raw sample artifacts before optimizing foundation code.
## 2. Deliverables
- `VOID_ENABLE_BENCHMARKS` CMake option in `CMakeLists.txt`.
- `benchmarks/CMakeLists.txt` and `benchmarks/FoundationBench.cpp` (`VoidFoundationBench`).
- `tests/corpus/README.md` defining seeded parser/codec corpus layout.
## 3. Exact files and interfaces
- `CMakeLists.txt`: add `option(VOID_ENABLE_BENCHMARKS ... OFF)` and `add_subdirectory(benchmarks)` when enabled.
- `benchmarks/CMakeLists.txt`: build `VoidFoundationBench` linking available foundation targets (`Core`, `Functional`, `Containers`, `Math`, `Time`, `Binary`, `Data`).
- `benchmarks/FoundationBench.cpp`:
- Flags: `--warmup <N>` (5), `--reps <N>` (20), `--ops <N>` (10000), `--json <path>`, `--filter <substr>`.
- Empty harness baseline (`harness_empty_loop`) plus 12 foundation workloads (`core_uuid_*`, `core_hash_*`, `functional_*`, `math_checked_add_loop`, `containers_*`, `binary_reader_u64_be`, `data_json_*`).
- Reports median, min, max, p95, p99 (nearest-rank), 95% CI half-width, ops/sec, raw samples, and environment metadata.
- `tests/corpus/README.md`: corpus conventions for `Binary`, `Data`, `Text`.
## 4. Edge cases
- Do not subtract harness baseline into negative latencies; report harness baseline separately.
- Must compile cleanly under `-DVOID_WARNINGS_AS_ERRORS=ON` and work in selected foundation builds.
## 5. Acceptance criteria
- `VoidFoundationBench --json /tmp/void-p0-bench/baseline.json` exits `0` and produces valid parseable JSON with all 13 records (harness + 12 workloads).
- P0 records (`STATE.md`, `TASKS.md`, `VERIFICATION.md`) updated with exact observed command outputs.
## 6. Verification commands
```sh
cmake -S . -B /tmp/void-p0-bench -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVOID_ENABLED_MODULES="Core;Functional;Containers;Math;Time;Binary;Data" \
-DVOID_ENABLE_TESTING=OFF -DVOID_ENABLE_BENCHMARKS=ON -DVOID_WARNINGS_AS_ERRORS=ON
cmake --build /tmp/void-p0-bench --parallel 4
/tmp/void-p0-bench/benchmarks/VoidFoundationBench --json /tmp/void-p0-bench/baseline.json
python3 -m json.tool /tmp/void-p0-bench/baseline.json >/dev/null
```
+288
View File
@@ -0,0 +1,288 @@
# Architecture and shared contracts
Status: target design for planning; NEW contracts below are not existing library APIs.
Source baseline: `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
## Existing architecture
[CMakeLists.txt](../../CMakeLists.txt) discovers module declarations and supports
`VOID_ENABLED_MODULES` with transitive internal dependencies. Public CMake targets use
`Void::<Module>`. The repository has 26 public feature modules and the supporting
LogState target. Existing namespaces do not always match CMake module names; migration
must preserve or explicitly adapt those differences.
Current integrations already include coroutine tasks, a manual executor, a future-based
thread pool, reflection serialization, scoped service registries, pinned plugin
generations, signed update verification, and durable version activation. Their existence
does not establish a unified execution or lifetime contract. Individual plans record
their inspected source and exact compatibility obligations.
## C-01 — Layering and package independence
The target dependency direction is foundations → execution/I/O and system facilities →
complete functional modules → platform compositions. This is a target, not a claim that
today's declarations already satisfy it.
Foundation: Core, Functional, Memory, Containers, Algorithms, Math, Text, Unicode, Time,
Binary, and Data. These may depend on lower foundation components and the standard
library; none requires Runtime, Net, a database, crypto, a logging backend, or a worker
thread. Unicode data tables are versioned build inputs, not a runtime external engine.
Core cannot import Math merely to implement UUID generation in the target graph. Keep
UUID representation in Core; use standard entropy/injected generation without importing
the broader Math module. Functional formatting bridges must not produce a Core↔Functional
cycle. Unicode integration into Text is optional; Unicode may reuse byte/text primitives
without Text depending back on Unicode.
Math's scalar checked arithmetic uses standard-library storage and imports neither
Containers nor Algorithms. Algorithms may use that narrow numeric interface and standard
scratch containers; Containers/Text provide adapters above Algorithms. Algorithms never
imports Containers or Text. Allocator-aware Containers build on Memory, not vice versa.
Public headers compile independently with their declared dependencies. Build selection,
installed component selection, static linkage, and shared linkage all receive consumer
checks. Optional capabilities live in adapters or higher-level modules. A merged
kitchen-sink test executable is insufficient evidence of independence.
## C-02 — Errors and compatibility
Use the existing `Void::Result::Result<T>`/`std::expected` conventions as the starting
point for fallible operations. `Result<T>` in designs is shorthand, not a claim that a
new top-level alias exists. Functional owns shared error-category and conversion design.
Domain errors retain machine-readable classifications and contextual causes.
Operational failures, cancellation, timeout, overload, unsupported capabilities, and
corruption are distinguishable. Exception-based existing APIs get explicit adapters;
there is no universal silent conversion of programmer errors into success or empty
values. No exception crosses a C ABI boundary. Existing exception/future semantics stay
documented until their specific major-release migration is implemented.
## C-03 — Task ownership and operation completion
Async owns structured task scopes, executor contracts, and operation completion.
Each admitted operation has an owner until exactly one terminal result is delivered
and all backend access to its buffers/state has ceased. Scheduler queues must not
outlive borrowed coroutine frames. Detached work requires an explicit lifetime and
error sink; ordinary scope destruction requests stop and joins owned work.
The initial shared operation options use `std::stop_token` and an optional absolute
`std::chrono::steady_clock::time_point` deadline. Async owns their NEW public type;
IO, Net, RPC, and higher modules reference it instead of declaring competing types.
Time owns the injected clock contract. Deadlines include admission and all operation
phases unless an API explicitly documents a distinct phase budget.
Cancellation is cooperative, never forceful interruption of arbitrary application code.
It cannot undo a write or commit already performed. A cancellation request racing with
completion produces one documented terminal outcome and still performs resource cleanup.
Single-delivery arbitration does not choose the domain outcome: stop/expiry records intent,
while the owning operation classifies its result from backend and persistence evidence.
Known commitment returns its receipt even if stop was requested first; uncertain effects
return the domain's explicit unknown-outcome error. Cancellation/timeout alone is valid
only where the domain can establish that classification, including any partial effects.
The sole result is delivered after required backend access ends; a caller's deadline does
not permit discarding late commit evidence or freeing still-owned resources.
Event subscriptions define whether already-admitted callbacks drain; unsubscribe alone
must not be presented as a guarantee that all captured state is no longer in use.
## C-04 — Execution, clocks, and runtime injection
Async defines execution; Time defines clocks; Memory defines allocator facilities.
Runtime composes those contracts and cannot become their dependency. Applications may
inject an executor, clock, allocator/resource budget, and observation hooks. Dependencies
borrowed by a context must outlive its final shutdown; managed Runtime retains its owned
resources through that boundary.
Embedded mode uses application-supplied resources. Managed mode creates resources only
on explicit startup and stops admission before draining/cancelling and joining. Ordinary
module constructors do not silently start a global runtime. Process-wide LogState is a
documented logging compatibility bridge, not the owner of execution services.
Monotonic clocks govern elapsed time, retries, and deadlines. Civil clocks and time zones
govern calendar schedules. Tests inject clocks and control task progress. Persistent job
identities use scheduled occurrence identifiers, not the current wall clock alone.
## C-05 — Bounds, admission, and memory
Each complete module specifies finite default limits for queues, concurrency, input
size, buffers, recursion, retained history, and pending output where applicable. Defaults
are concrete in its area plan and configurable. New APIs use an explicit unbounded
policy when needed; zero must not acquire undocumented unlimited semantics.
Admission reports overload instead of silently allocating without bound. Async waiting
for capacity is explicit and cancellable; blocking admission is an opt-in that cannot
block the same executor needed to release capacity. Logging defines its own loss policy
and observable counters. In-flight work and batches count toward bounds, not only queue
slots. Memory/allocator hooks target owned allocations and documented lifetime domains.
## C-06 — Native I/O and network interoperability
IO owns the platform operation backend and byte-stream contracts. Initial Linux sockets
use nonblocking descriptors with level-triggered epoll; filesystem operations use bounded
blocking workers. Optional io_uring comes later behind capability detection and conformance
tests. Backend selection/fallback happens before submission; a potentially effective write
is not blindly replayed on another backend.
Network and protocol APIs remain Void-owned. Preserve existing Boost-based paths during
migration; new native runtime/protocol paths need interoperability and fuzz evidence before
replacement. Net owns network protocol state and connection reuse; IO owns descriptor,
buffer, cancellation, partial-transfer, and completion rules. RPC uses Net/IO and serialization
without depending on Coordination or a platform.
TLS clients verify trust chains and expected peer identity by default, with explicit trust
configuration. SNI is not hostname verification. HTTP redirect rules strip origin-sensitive
credentials on cross-origin transitions and define method/body behavior. Total deadlines
include DNS, connect, proxy negotiation, TLS, request, and response. OpenSSL remains the
initial TLS implementation. See the [OpenSSL client guide](https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/).
## C-07 — Data and signed-document boundaries
Data owns general structured values, parsing policies, reflection serialization, and
schema/version evolution; Binary owns byte encoding/decoding. General JSON adds exact
signed/unsigned integer representation and checked numeric conversion without routing
all values through double. Limits and duplicate-key policies are explicit.
Preserve StrictJson's separate restricted representation and acceptance rules. Existing
Update envelope parsing uses general Json, not StrictJson, and must retain its own
versioned compatibility profile. General JSON improvements must not silently broaden
either protected profile. The target Update contract verifies signatures over exact
provided payload bytes before payload schema parsing or readable-document comparison;
reserialization cannot substitute for those bytes. The current schema-3 path parses the
payload for readable-document comparison before signature verification, so this ordering
is an explicit hardening task in [Update](modules/Update.md), not completed behavior.
Existing signed documents remain regression fixtures.
## C-08 — Original storage and SQLite
Storage is an original implementation. Sqlite remains a first-class integration with
SQLite itself. Neither is a compatibility facade over the other. Original Storage makes
no SQL or SQLite file-format promise.
The selected initial layout is an append-only checksummed WAL, an ordered in-memory index,
and immutable sorted checkpoint/table files; the Storage plan specifies the format and
manifest protocol. Begin with one serialized writer, atomic batches, consistent snapshots,
and ordered iteration. Incremental bounded compaction follows the durable core. Readers
pin versions; reclamation waits for pins and observes configured retention budgets.
Atomic batches are not a claim of arbitrary read-modify-write transaction isolation.
Conditional updates evaluate version/value preconditions atomically with the batch in
writer order. A conflict reports failure without partial mutation. Richer transactions
and document/index layers require separate documented isolation contracts.
Durable success follows successful persistence of all recovery dependencies. Weaker
durability is an explicit policy. Errors and lost replies may leave an unknown commit
outcome, so retries require operation identity or inspection. Failed sync, disk full,
short writes, corruption, and recovery interruption are first-class outcomes.
See [SQLite's crash-testing methodology](https://sqlite.org/atomiccommit.html#_testing_atomic_commit_behavior).
## C-09 — Services, plugins, and ABI
Service owns registry access and lifecycle contracts; Plugin owns library generations
and module hosting. Acquired service handles retain provider ownership throughout calls
and replacement. Snapshot lifecycle operations and invoke user callbacks outside registry
locks. Dependency ordering, failed-start rollback, and shutdown are deterministic.
The plugin host composes validation → activation → readiness → publication and, where
state transfer requires it, quiescence → checkpoint → candidate restore. Failed candidates
preserve the active generation. Existing callers keep their generation pin. Safe unloading
requires both generation references and owned asynchronous activity to end.
The NEW stable C interface uses fixed-width fields, structure sizes/versions, opaque
handles, function tables, status codes, byte spans, and explicit release functions.
Allocate and release through the same owner. No STL objects, C++ exceptions, or implicit
RTTI contract crosses that boundary. Existing C++ descriptors remain same-toolchain
interfaces; a C ABI does not make existing C++ objects cross-toolchain compatible.
ShortUrl V1 remains frozen as documented in [its contract](../short-url.md).
## C-10 — Workflow state and updates
Fsm owns state execution and supervision; Scheduler owns calendar/delayed job admission
and persistence. Checkpoints capture application state at documented boundaries, not
coroutine frames. Concurrent child scopes must be cancelled/joined when a parent or race
finishes. Faulted is a terminal state throughout supervision APIs.
Update owns signed release selection and durable version activation. Preserve the existing
distinction between reversible candidate activation and the durable healthy commit marker
in [VersionStore](../../include/Void/Update/VersionStore.hpp). Cleanup failure after that
commit cannot be reported as though rollback were still the correct action. Plugin and
platform plans coordinate with that boundary rather than inventing another commit point.
## C-11 — Logging and observability
Log owns delivery and sinks; Observability owns metrics/traces/context interfaces and
export adapters. Foundation and execution modules depend on lightweight optional hooks,
not on a concrete exporter or managed runtime. Avoid Log↔Observability and Async↔Log
cycles. Preserve process-wide facade state across shared-library boundaries.
User sinks/callbacks execute outside shared configuration locks. Queue, in-flight batch,
flush, loss, and sink-failure semantics are bounded and measurable. Context propagation
snapshots values at admission; pointers to transient thread-local state cannot escape.
Metrics labels and retained trace data also have cardinality and resource limits.
## C-12 — Distributed ownership and consistency
Coordination owns a deterministic Raft protocol core with injected clock, transport,
and stable-storage ports. It emits actions; its core does not import RPC, Discovery,
DistributedStorage, or platform orchestration. Replication owns the adapters connecting
Coordination, transport, and Storage. Discovery starts with static/local providers;
coordination-backed discovery is a higher-layer adapter, avoiding a bootstrap cycle.
Initial replicated groups have fixed membership, one leader, majority commit, and a
crash-failure model. Persist protocol state before replies that depend on it. Apply only
committed commands in deterministic order. Store application mutations, deduplication
records, and the applied-log position in one recoverable Storage batch. Snapshot metadata
identifies the included log position and format version.
Initial consistent reads use quorum-confirmed leadership/read-index behavior; explicitly
stale reads have a separate API policy. An isolated old leader must not acknowledge new
commits or advertise linearizable local reads. No cross-shard transactions or global
exactly-once side-effect guarantee is implied. Later membership changes use a separately
tested protocol; sharding follows single-group correctness. See the
[Raft extended paper](https://raft.github.io/raft.pdf).
Messaging begins with explicit at-least-once delivery and acknowledgement, bounded retries,
and application deduplication. Replication does not turn an external side effect into an
exactly-once transaction. Durable jobs follow the same acknowledgement/unknown-outcome rules.
## C-13 — Public evolution and integration
Each area distinguishes EXISTING names from NEW proposed interfaces, names its owner,
lists downstream users, and supplies migration examples. Shared contracts in this file
are authoritative; area plans reference contract IDs and do not redefine their meaning.
Changes to shared contracts update the [decision ledger](../agent-workflow/DECISIONS.md)
and all affected area plans before parallel implementation.
Implementation task identifiers use `M-<MODULE>-NN`, `S-<SUBSYSTEM>-NN`,
`P-<PLATFORM>-NN`, or `X-<AREA>-NN`. They are planned feature work, distinct from the
`T-DOC-*` tasks that author these documents. New source paths and commands are marked
PROPOSED until they exist. Readiness means passing the gate for that phase, not all
long-term distributed or portability promises.
## C-14 — Reference compositions
NetworkedApplications composes runtime, protocols, storage, configuration, security,
observability, and shutdown. ReloadableApplications composes services, plugin generations,
FSM supervision, update activation, and observability. DistributedApplications composes
transport, replicated state, membership/routing operations, metrics, and recovery tools.
Platforms reuse modules; they do not own alternate implementations of shared primitives.
Their documents specify future reference applications and acceptance scenarios only.
## Contract owners
| Shared responsibility | Authoritative area |
| --- | --- |
| Result/error adaptation | Functional |
| Clocks/calendar | Time |
| Allocation facilities | Memory |
| Executor, operation options, structured task scope | Async |
| Descriptor/stream/backend lifetime | IO |
| Managed composition | Runtime |
| General values/schema and binary representation | Data and Binary, respectively |
| Atomic storage/recovery format | Storage |
| Registry ownership and dynamic loading | Service and Plugin, respectively |
| Workflow state and job scheduling | Fsm and Scheduler, respectively |
| Delivery and telemetry model | Log and Observability, respectively |
| Consensus core and application replication adapters | Coordination and Replication, respectively |
Package edges, phase dependencies, and validation gates are expanded in
[DEPENDENCIES.md](DEPENDENCIES.md), [DELIVERY.md](DELIVERY.md), and
[VALIDATION.md](VALIDATION.md).
+127
View File
@@ -0,0 +1,127 @@
# Build, packaging, and distribution plan
Status: future build improvements and validation. Current behavior is grounded in
[CMakeLists.txt](../../CMakeLists.txt), [Module.cmake](../../cmake/Module.cmake),
[Dependencies.cmake](../../cmake/Dependencies.cmake), and
[VoidConfig.cmake.in](../../cmake/VoidConfig.cmake.in).
## Current build contract
The project requires CMake 4.0+, C++26 and compiler support for the features each selected
module uses. GCC 16.2.0 and CMake 4.4.4 were observed locally. GNU builds at version 16+
receive reflection flags through current build logic. That is not evidence that every
other compiler/version supports all reflection consumers.
Modules are discovered from `src/`; source-bearing modules honor `BUILD_SHARED_LIBS`,
while Testing is static and header-only modules are interface targets. Selection uses
`VOID_ENABLED_MODULES`; an empty value selects all. Installed consumers use `find_package`
and `Void::<Module>` targets. The current package also loads the test scanner helper.
Current dependencies include Boost (with a pinned 1.84 fallback), OpenSSL, libsodium,
SQLite, LibArchive and Threads. Shared compiled modules hide many implementation
dependencies from consumers; static links still need their transitive closure. Fetched
shared runtime dependencies have packaging obligations independent of development headers.
## Target configuration profiles
| Profile | Purpose | Required result |
| --- | --- | --- |
| Foundation-minimal | Select individual foundation targets without optional packages | Configure, compile public headers, link and run a tiny installed/embedded consumer |
| Module-focused | Select a complete module and only required dependencies | No accidental discovery/link of unrelated engines or runtime services |
| Full-shared | All supported modules, shared runtime libraries | Full tests and relocatable installed consumers succeed |
| Full-static | Selected/full static modules with explicit transitive libraries | Static closure is complete; tests do not wrongly disable required dependencies |
| Embedded | Parent project uses add_subdirectory | Parent linkage/cache policy retained; testing/dependency discovery opt-in is predictable |
| Hardened diagnostics | Owned-code warnings-as-errors and supported sanitizers | Dependency warnings isolated appropriately; owned-code diagnostics remain strict |
| Offline reproducible | Populated verified sources and declared toolchain | No opportunistic downloads; missing prerequisites fail clearly |
Profiles are validation concepts, not existing preset names. New CMake presets/manifests
are PROPOSED until their implementation task creates them.
## Dependency and toolchain policy
- Preserve component-aware resolution and pinned/hash-verified fetched sources. Give
users explicit system-package, prepopulated-source, and permitted-fetch paths.
- Keep external include diagnostics classified as external/system headers where
appropriate; retain warnings-as-errors for owned source. This is the initial repair
direction for the Boost/C++26 warning failure, followed by a separately reviewed
dependency-version update if desired. Do not disable warning classes globally.
- Probe required language/library features and provide actionable errors before large
builds. Publish verified versions separately from anticipated support.
- Test minimal dependencies independently from the all-module build. Source-level
includes must match exported target obligations and installed header sets.
- Resolve static consumers' external dependencies explicitly. Shared runtime packaging
must not reference the build tree or assume undeclared system libraries are present.
- Keep reflection/generation deterministic and scoped to declared inputs. Generated
code/tables have reproducible commands, pinned inputs, and one owner per wave.
The current offline configure needs an existing Boost source tree when the system Boost
probe fails. That requirement is documented in [VALIDATION.md](VALIDATION.md), not hidden
behind an assumption that an offline first configure can fetch missing sources.
## CURRENT interfaces and portable command templates
These templates use existing options, but configurations beyond the recorded baseline
have not been executed in this documentation task. Prerequisites are the selected
compiler/features and the selected modules' development dependencies.
```sh
# TEMPLATE: ordinary build using available system dependencies or permitted fetch.
cmake -S . -B build-roadmap-check -G Ninja \
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVOID_ENABLE_TESTING=ON
cmake --build build-roadmap-check --parallel 4
ctest --test-dir build-roadmap-check --output-on-failure
# TEMPLATE: minimal foundation library configuration; consumer test is separate.
cmake -S . -B build-core-check -G Ninja \
-DVOID_ENABLED_MODULES=Core -DVOID_ENABLE_TESTING=OFF
# TEMPLATE: supported sanitizer configuration; confirm toolchain support first.
cmake -S . -B build-sanitize-check -G Ninja \
-DVOID_ENABLE_ASAN=ON -DVOID_ENABLE_UBSAN=ON \
-DVOID_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
```
Do not reuse a user's existing build directory with incompatible options. Selection plus
testing currently needs an audit: internal tests and test-support targets assume broader
module availability. A successful `VOID_ENABLE_TESTING=OFF` configure does not prove that
selected-module tests or installed consumers work.
## Packaging and public distribution
Preserve independent component installs/consumers, shared and static support, correct
runtime search paths, and deterministic export metadata. Add relocatability checks that
move an installation away from its build tree and execute consumers with only declared
runtime dependencies. Verify public headers and adapter targets separately.
The existing [Gitea release workflow](../../.gitea/workflows/release.yml) builds/tests,
installs, packages and publishes on its configured release path, using pinned external
release tooling. This documentation does not execute that workflow. Changes must preserve
immutable inputs, version/tag agreement, reproducible archive metadata and artifact
verification. Do not copy credentials or other repository contents into plans.
Distribution additions include documented source consumption, installed SDK/runtime
consumption, package manifests where justified, artifact checksums, dependency inventory,
and version/support metadata. A public release also needs a project-owner decision on
licensing if no tracked license exists; this roadmap does not choose or grant a license.
## CI matrix and tasks
| ID | Planned work | Acceptance |
| --- | --- | --- |
| X-BUILD-01 | Module/header/dependency closure audit and metadata repair | All minimal consumers use only declared dependencies; bridge targets isolated. |
| X-BUILD-02 | Selected-module test construction and fixtures | Missing unrelated modules do not break configure/build; requested unsupported combinations fail clearly. |
| X-BUILD-03 | Toolchain/dependency feature probes and diagnostic policy | Verified compiler matrix; external warnings do not require weakening owned-code warnings. |
| X-BUILD-04 | Shared/static/embedded/installed/relocated consumer matrix | Every declared profile has compile/link/runtime evidence. |
| X-BUILD-05 | Reproducible preset/dependency and offline workflows | Pinned inputs and explicit prerequisites; no lockfile/source mutation during verification. |
| X-BUILD-06 | Release artifacts, package metadata and documentation | Reproducibility and dependency closure checked before separately authorized publication. |
Current CI is GCC/Linux-focused. Add other compilers/platforms as their required feature
probes and implementations pass; do not claim parity from a matrix entry that skips the
relevant modules. Start with Linux x86_64 baseline and explicit portability checks, then
expand architecture/OS coverage through capability-specific tasks.
Validation includes configuration failures, missing package diagnostics, install/export
consistency, relocation, static closure, scanner integration and parent-project cache
preservation. Existing installed-consumer success is useful evidence but does not cover
all proposed profiles. Release and remote side effects require separate authorization.
+141
View File
@@ -0,0 +1,141 @@
# Delivery phases and implementation gates
Status: future implementation roadmap. Writing these plans does not complete any
feature task. User-approved scope is recorded in [REQUIREMENTS.md](REQUIREMENTS.md).
No calendar estimates are implied; phase exits depend on evidence and capacity.
## Documentation delivery now
The current work authors the 26 module plans, 15 new subsystem plans, three platform
plans, and ten shared roadmap documents. The master index maps every agreed area.
Workflow records preserve the approved decisions, baseline, ownership and review.
Completion requires actual document coverage, valid links and source references,
coherent contracts, actionable tasks, a fresh integrated review, and disposition of
findings. Reference applications and new test infrastructure are specified, not built.
Future commands are labeled PROPOSED; executed baseline commands remain separate evidence.
## P0 — Reliable baseline and visibility
**Outcome:** maintainers can reproduce the current state and distinguish library defects,
test-environment assumptions, missing tooling, and unsupported configurations.
| Task | Work and owner recommendation | Acceptance |
| --- | --- | --- |
| X-BASE-01 | sol_implementer: replace process-test assumptions about `/bin/echo` and `/bin/cat` with controlled fixtures or explicit discovered commands | Process argv/stdin cases test the intended behavior on NixOS and conventional Linux; missing prerequisites produce useful diagnostics. |
| X-BASE-02 | sol_implementer: resolve pinned Boost/compiler warning incompatibility through dependency/version/system-header policy | Full warnings-as-errors build passes without blanket disabling warnings in owned code; supported dependency versions recorded. |
| X-BASE-03 | astra_implementer: reconcile public includes, target closures and selected-module tests | Minimal, full, installed, embedded, static and shared consumer cases isolate dependency requirements. |
| X-BASE-04 | sol_implementer: establish compiler/dependency and sanitizer capabilities | Feature probes and supported matrix drive skips/failures explicitly; unknown support is not success. |
| X-BASE-05 | sol_implementer: reproducible benchmark/fuzz/property harness and initial inventory | Raw baselines and workload manifests exist; no unmeasured optimization target is called achieved. |
Documentation baseline defects are recorded now. These repair tasks remain PLANNED.
P0 can overlap with design-only foundation work, but no release accepts an unexplained
failed check in its declared support matrix.
## P1 — Shared foundations and execution
**Outcome:** subsequent modules can agree on errors, ownership, clocks, allocation,
serialization, cancellation, I/O completion, and resource limits.
Complete G-ERROR, G-EXEC, G-IO, and G-DATA from [DEPENDENCIES.md](DEPENDENCIES.md).
Implement foundation tasks in Core, Functional, Memory, Containers, Algorithms, Math,
Text, Unicode, Time, Binary, and Data. Async/IO and minimal Runtime follow the common
clock and lifetime contracts. Testing grows the deterministic tools needed by those areas.
Critical-path executor and operation-lifetime changes go to astra_implementer; bounded
utilities, adapters, and independent tests default to sol_implementer. Each dispatch has
exclusive owned files, observed source baseline, exact API contract, and verification.
Phase acceptance includes self-contained headers, minimal consumers, cancellation races,
exactly one terminal operation result, no dangling frames/buffers, bounded admission, and
regression fixtures for existing strict signed data. General JSON/codec expansion must
not relax Update validation. Existing TLS/lifetime defects can receive focused repairs
before the full new API lands.
## P2 — Complete functional modules
**Outcome:** modules provide complete documented workflows with defined success,
failure, shutdown, and resource behavior, independently of platform compositions.
| Parallel stream | Main work | Prerequisite gate |
| --- | --- | --- |
| Network | Listener/HTTP/WebSocket transport, secure clients, pooling and streaming, RPC base | G-EXEC, G-IO, G-DATA |
| Storage | Original durable KV, Sqlite completion, snapshots, recovery and typed adapters | G-IO, G-DATA; G-STORE before higher persistence consumers |
| Lifecycle | Owning services, plugin host/C ABI, supervised FSM, reloadable configuration | G-EXEC; G-HOST before live replacement compositions |
| Operations | Log/Stacktrace, Observability, Resilience, System/IPC, Archive/Crypto/Security/Update | Relevant common contracts; no exporter/core dependency cycles |
| Quality | Testing/Mock, deterministic clocks, property/fuzz and fault injection, package consumers | Minimal framework independence maintained throughout |
The streams need not finish together. Ship completed coherent module sets while others
remain experimental. A documented limitation must be visible in capability reporting
and supported configuration tests; it cannot become an implicit success path.
## P3 — Networked and reloadable applications
**Outcome:** compose complete modules into optional runtimes/platforms with reference
workflows and operational procedures.
- NetworkedApplications: storage-backed service, streaming client/server, typed
configuration, trust setup, health, metrics, limits and graceful shutdown.
- ReloadableApplications: dependency-aware host, versioned C/C++ plugin paths, state
transfer, generation pinning, health validation and recovery/rollback.
- CLI/data-processing reference flow: use only the needed modules, demonstrating
small consumers and integration without a mandatory application framework.
Platform ownership does not include alternate copies of module logic. Integrate module
APIs, examples, startup policies and operational tools. Define deterministic startup
failure cleanup, overload behavior and shutdown deadlines. Reference examples are tested
as consumers and documentation examples, not trusted because the monolithic test passes.
Optimize measured workloads in all phases, with concentrated integration measurements
here. Tune connections, allocation/layout, batch size, contention and timers only with
the [performance acceptance rules](PERFORMANCE.md). Record resource tradeoffs explicitly.
## P4 — Distributed infrastructure and platform
**Outcome:** progress from durable local building blocks to replicated services through
bounded correctness claims and reproducible fault evidence.
1. Finish local durable Messaging/Scheduler behavior, RPC framing/versioning, and static
Discovery/bootstrap. Use explicit at-least-once and retry/dedup semantics.
2. Implement Coordination's deterministic fixed-membership Raft core with abstract ports;
test elections, quorum agreement, persistence order and partitions in simulation.
3. Implement Replication adapters and G-REPL: atomic data/applied-index/dedup updates,
quorum-confirmed reads, restart, log retention, snapshot creation and installation.
4. Complete single-group DistributedStorage and administrative backup/recovery tooling.
Only then add reviewed membership changes, shard routing and rebalancing.
5. Compose DistributedApplications with deployment examples, failure visibility and
bounded operational procedures. Production readiness requires evidence beyond unit
tests or deterministic simulation, including sustained and destructive recovery runs.
Single-node releases continue while P4 develops. Initial guarantees cover crash faults,
not malicious consensus participants. Quorum consistency does not imply minority write
availability, global transactions, or exactly-once external side effects.
## Implementation task readiness
Before executing any area task:
1. Reconcile its source baseline and requirements with the current branch and worktree.
2. Resolve its named prerequisite contracts and define exact owned paths and shared
resources. Persist and lint the full WHAT/HOW assignment.
3. For substantial implementation, obtain architecture planning and fresh technical
preflight. User approval of these documents is distinct from later scope selection.
4. Implement with the configured role, inspect actual changes, and obtain fresh
adversarial review. Resolve actionable findings and verify integrated behavior.
5. Record code-complete, verified, blocked or released accurately. Review does not
authorize commits, remote pushes, deployments or destructive operations.
After two unsuccessful repair cycles, stop that approach and obtain a changed diagnosis
with a distinguishing check. Do not hide failure by weakening tests or broadening scope.
## Release and rollback milestones
The first major-release integration groups intentional public API changes and migration
adapters. Later capabilities can ship as optional experimental modules until their gates
pass. Version public C ABI, wire schemas and disk formats independently where necessary;
a package version alone is not a compatibility check.
Release candidates require a support matrix, package/consumer validation, migration
examples, known limitations, performance evidence, and explicit rollback boundaries.
Native storage formats must refuse unsupported versions safely. Update and plugin
rollback must respect committed durable state. See [MIGRATION.md](MIGRATION.md).
+151
View File
@@ -0,0 +1,151 @@
# Dependencies, contracts, and integration order
Status: target dependency design; current build metadata and future architecture are
separated below. Read [ARCHITECTURE.md](ARCHITECTURE.md) for contract definitions.
## Current declared build edges
These edges come from `src/<Module>/module.cmake` at `f1f9ba3`. They are not a complete
header-use graph: undeclared includes and optional bridges must be audited separately.
| Module | Declared internal dependencies | External/platform dependencies |
| --- | --- | --- |
| Core, Functional, Containers, Math, Text, Time, Resilience, LogState | None | None |
| Binary | Functional | None |
| Data | Time | None |
| Async | LogState | None |
| System | Functional, LogState | Threads |
| Configuration | Functional, System, Data, Time | None |
| Log | Functional, Configuration; optional Stacktrace | None |
| Stacktrace | Functional, LogState | Boost.Stacktrace; platform dl/options |
| Plugin | Functional, System, Data | UNIX dl |
| Service | Functional, Log | None |
| Fsm | Async, Data, Functional, Log, Service | None |
| Net | Functional, Text | Boost headers/Asio/Beast/URL, OpenSSL, Threads |
| Crypto | Functional | OpenSSL.Crypto |
| Security | Functional | libsodium |
| Archive | Functional | LibArchive |
| Sqlite | Functional | SQLite C API |
| Update | Crypto, Data, Functional, System, Text | None |
| ShortUrl | Service | None |
| Testing | LogState; optional Stacktrace, Log, Async, Configuration, Text | None |
| TestingMock | Testing, Functional | None |
The [module helper](../../cmake/Module.cmake) controls target construction/export, and
[package config](../../cmake/VoidConfig.cmake.in) resolves requested components.
`INTERNAL_DEPS`, public includes, exported target edges, and installed headers must agree.
## Target package rules
1. A foundation package resolves only its lower foundation dependencies and standard
library requirements. No concrete runtime, network, telemetry exporter, crypto,
storage engine, or logging sink enters that closure accidentally.
2. Async never depends on a concrete Log backend or managed Runtime. IO depends on Async;
Runtime composes them. System may use IO, but IO cannot call back into System for its
platform operations. Backend primitives live inside IO.
3. Service's registry core does not depend on Plugin. The existing plugin-service bridge
becomes an explicit higher-level integration; retaining a compatibility include must
not silently add Plugin to every Service consumer.
4. Log's configuration adapter is an optional integration above Log and Configuration.
Base Log delivery cannot require the entire configuration/system stack just to emit.
5. Observation hooks are lightweight contracts. Exporters and network exporters are
separate adapter targets; Net cannot depend on an exporter that depends on Net.
6. Storage core handles bytes and durable versions. Structured document/index adapters
add Data above it. Sqlite is independent; neither engine is the other's prerequisite.
7. Coordination is a deterministic core with abstract ports. Replication owns transport
and Storage adapters. Discovery can bootstrap from static peers without querying a
consensus group that itself needs discovery to start.
Exact adapter target names are NEW and are specified by the owning area plan. Their
direction and ownership are fixed here. No compatibility wrapper may conceal a reverse
dependency; installed consumer tests exercise each bridge explicitly.
## Area dependency map
The following are implementation prerequisites, not a promise that every listed
prerequisite must be a public link dependency of every API.
| Area | Prerequisites and owned integration boundary |
| --- | --- |
| Core, Functional | Foundation layering/error contracts; resolve representation bridges without a cycle |
| Memory | Core and standard PMR; raw allocation facilities precede allocator-aware containers |
| Math | Core and standard-library storage; scalar checked arithmetic precedes Algorithms; no Containers/Algorithms imports or dependency back from Core UUID representation |
| Algorithms | Core and narrow Math checked arithmetic; optional Functional/Memory adapters; standard-library scratch storage, never Containers or Text |
| Containers | Core; Memory before allocator-aware types; graph convenience adapters may depend on Algorithms, never the reverse |
| Text, Unicode | Text byte utilities first; Unicode tables/algorithms above them; optional Text adapters |
| Time | Core/error conventions; clock interface before timers and scheduler |
| Binary, Data | Binary bounds/encoding first; Data composes codecs, text and time where required |
| Async | Error, clock, memory and resource contracts; lifetime model before IO/FSM upgrades |
| IO, System, IPC | Async/byte streams → IO backends → System workflows/IPC framing |
| Configuration | Data, Text, Time; watching/reload adapters additionally use System/Async |
| Log, Stacktrace, Observability | Independent hook contracts; Async for queued delivery; exporters above protocols |
| Crypto, Security, Archive | Functional/error/byte interfaces; retained backend feature checks |
| Net, RPC | IO/Async, Binary/Text, TLS backend → Net transports → RPC framing/schema |
| Sqlite, Storage | Error/byte contracts; Storage additionally IO and memory; independently tested durability |
| Service, Plugin, Fsm | Owning service handles → module host and FSM supervision; Async joins before safe unload |
| Scheduler, Messaging | Async/Time; optional Storage persistence; network/replication adapters later |
| Update, ShortUrl | Existing trust/ABI contracts; higher integration with Net/Plugin/Storage stays optional |
| Discovery | Static/local provider first; RPC health/registration; replicated provider in a higher adapter |
| Coordination | Deterministic core and stable-storage/clock/transport ports; simulation harness |
| Replication | Coordination + Storage + RPC adapters; atomic applied-state and dedup contract |
| DistributedStorage | Proven single-group Replication; routing/reconfiguration before sharding/rebalance |
| Testing, TestingMock | Minimal framework can validate foundations; fault/property extensions grow alongside modules |
| NetworkedApplications | Runtime, Net, chosen Storage/Sqlite, Configuration, Security, Observability |
| ReloadableApplications | Runtime, Service, Plugin, Fsm, Update, Configuration, Observability |
| DistributedApplications | RPC, Messaging, Discovery, Coordination, Replication, DistributedStorage, operations |
## Critical path and parallel work
```mermaid
flowchart TD
B[Baseline and package audit] --> C[Shared contracts and foundation]
C --> A[Async ownership and clocks]
A --> I[Native IO and bounded streams]
C --> D[Data and binary contracts]
I --> N[Network transport and streaming]
I --> S[Original storage durability]
D --> S
A --> L[Service and plugin lifecycle]
L --> H[Reloadable platform]
N --> P[Networked platform]
S --> P
N --> R[RPC and discovery adapters]
S --> M[Durable local messaging]
R --> X[Replication adapters]
S --> X
Q[Deterministic coordination core] --> X
X --> Z[Distributed storage and platform]
```
The diagram shows integration gates; it does not prevent building a deterministic
coordination simulator while independent module work continues. Single-node deliverables
must not wait for distributed completion. Foundation improvements continue across phases.
## Contract freeze and ownership
| Gate | Required agreement before parallel dependents |
| --- | --- |
| G-ERROR | Functional error classification/conversion and allocator ownership |
| G-EXEC | Async scope/operation/executor API and Time clock/deadline behavior |
| G-IO | Stream buffer lifetime, partial results, cancellation/completion and admission |
| G-DATA | Numeric values, codec bounds, schema versioning, strict signed-data compatibility |
| G-STORE | Commit/unknown outcome, format/recovery, snapshots, preconditions and retention |
| G-HOST | Service pinning, lifecycle callbacks, C ABI and safe generation retirement |
| G-REPL | Stable protocol state, committed/applied position, deduplication and snapshot atomicity |
Area plans may refine interfaces owned by their area; cross-area meaning changes require
an updated decision and reconciliation before dispatch. Shared build declarations,
generated Unicode tables, disk/wire formats, exported ABI headers, and schemas each have
one writer per implementation wave. Source-disjoint tasks may still share ports, storage
directories, global log state, or clocks; tests isolate those resources.
## Integration checks
- Compile public headers and link installed consumers against the smallest supported
component closure, including deliberate absence of unrelated external dependencies.
- Compare exported target dependencies to source includes and implementation use.
- Exercise adapter packages separately from core packages in shared and static builds.
- Check each feature task's prerequisite IDs and cross-plan links before execution;
no implementation task is READY with an unresolved required contract.
- Re-run affected cross-module scenarios after ownership, wire/disk format, error, or
lifetime changes. See [VALIDATION.md](VALIDATION.md) for the evidence matrix.
+108
View File
@@ -0,0 +1,108 @@
# Documentation, examples, and developer experience
Status: planned product documentation work. This roadmap package is the current
documentation deliverable; guides and runnable examples described here are future tasks.
## Current evidence and audience
The [project README](../../README.md) explains the build and an older module inventory.
[ShortUrl's contract](../short-url.md) is the existing dedicated service/ABI document.
The source tree contains additional modules and evolved behavior that are not fully
represented in the README. Public headers/tests are useful evidence but are not a
substitute for a supported-use guide.
Documentation must serve three entry points: a developer selecting a small utility,
a developer adopting a complete module in an existing application, and a developer
choosing a managed application platform. Each should reach a minimal working example
without being required to understand the entire library.
## Information architecture
| Layer | Content | Acceptance |
| --- | --- | --- |
| Start/select | Current capability catalog, module dependencies, supported toolchains, installation choices | Every advertised capability maps to implemented/experimental/planned status and a verified consumer path. |
| Learn/use | Foundation recipes, complete module workflows, embedded/managed examples | Preconditions, ownership, failures and cleanup are shown alongside happy paths. |
| Reference | Public types/functions, thread-safety, invalidation, errors, limits, ABI/wire/disk versions | References come from public contracts and name version-specific behavior. |
| Compose/operate | Platform startup, configuration, health, deployment examples, upgrades and recovery | Operational examples reuse modules and identify the point of durable commitment. |
| Maintain | Architecture decisions, dependency/ownership map, contribution/test guidance, migration notes | A new maintainer can select and verify a bounded task without reconstructing chat history. |
The roadmap stays distinct from implemented-feature documentation. When a task ships,
update the capability catalog and guide with actual commands/evidence; retain the plan's
decision history and mark its task status accurately.
## Example contract
Each future runnable example identifies selected modules, compiler/dependency prerequisites,
resource/trust configuration, input/output, failure paths, cleanup and verification command.
Examples consume exported/installed targets as appropriate and are compiled/tested in CI.
Avoid hidden external accounts, production data, credentials, public endpoints or network
services as prerequisites. Use loopback fixtures and private test certificates.
Start with:
1. A minimal utility/CLI consumer with no managed runtime or optional engine dependency.
2. Reflection/binary/JSON round trips with large integers, bounds and checked errors.
3. An application-owned executor with cancellation, deadlines and explicit lifetime.
4. A managed streaming service using a selected storage backend and observable shutdown.
5. A reloadable host with retained service handles, failed-candidate rollback and a C ABI
plugin example distinct from the same-toolchain C++ example.
6. A later fixed-membership replicated KV demonstration with partition/restart scenarios
and clearly limited consistency/availability claims.
Documentation snippets marked NEW in these plans are design illustrations. They become
copyable supported examples only after interfaces exist and snippets compile in the
declared configuration. Do not invent commands that appear executable without labels.
## Per-module documentation requirements
- State whether the module is header-only, compiled, an adapter, or a composition, and
show its actual CMake target separately from C++ namespaces.
- Give the smallest dependency closure and identify optional capabilities/backends.
- Explain value/borrow/ownership lifetime, threading, callback execution, allocation,
cancellation, deadlines and shutdown wherever relevant.
- Document defaults and limits numerically, including the meaning of zero/unbounded
options and what overload looks like.
- Present errors as actionable caller choices: retry, inspect ambiguous outcome, change
configuration, reject input, or report corruption. Avoid broad silent fallbacks.
- Include version/default changes, migration adapters and capability restrictions.
- Link deeper algorithms and operational implications without duplicating authoritative
shared contracts.
## Developer workflows
Provide reproducible configure/build/test instructions for supported profiles and clear
diagnostics for missing compiler reflection or external packages. Include fast focused
tests, full integration checks, package consumers and the criteria for using each.
Explain that a selected-module build and a kitchen-sink test build answer different
questions. Preserve the user's build directories and local configuration.
Generated API/reference material must use a documented tool/version and reproducible
inputs. Generated output is not hand-edited. Prefer source-adjacent comments for individual
symbols and maintained guides for cross-component workflows. No documentation generator
or hosting service is mandated by this package before its bounded implementation task.
## Plan-file authoring and upkeep
Each area plan records baseline source links, concrete scope and NEW APIs, algorithms
and flow, native/backend choice, lifetime/failure/resource behavior, performance workloads,
task IDs/dependencies/ownership, validation and migration. The task backlog must be
specific to the area; repeated generic paragraphs do not count as expanded design.
Shared requirements, architecture and decisions have one authoritative home. A changed
contract updates dependent plans in the same review. The master coverage matrix identifies
all affected areas. Durable workflow records distinguish authoring completion from future
feature implementation and record observed commands rather than invented success.
## Tasks
| ID | Planned work | Acceptance |
| --- | --- | --- |
| X-DOC-01 | Reconcile capability/module catalog and README | Every current module has correct target, status, dependency and guide links. |
| X-DOC-02 | Author minimal adoption guides and compiled examples | Utility/module/platform entry points each work with declared prerequisites. |
| X-DOC-03 | Generate and validate API reference from supported public contracts | No undocumented public defaults/lifetime behavior; links/snippets checked. |
| X-DOC-04 | Author operations, recovery and migration recipes | Failure/rollback scenarios are rehearsed against implementation and reflect real commit boundaries. |
| X-DOC-05 | Add documentation consistency checks to CI | Broken links, stale snippets, missing capability entries and unresolved contract changes are detected. |
Root/maintainer owns architecture and release-facing statements. Module owners own their
examples and contract accuracy. A documentation or editorial specialist may polish prose,
but source/behavior acceptance remains a technical review responsibility.
+112
View File
@@ -0,0 +1,112 @@
# Compatibility, migration, and rollback
Status: planned migration design. Current project version is 1.2.1 in
[CMakeLists.txt](../../CMakeLists.txt). Intentional source/behavior breaks target a major
release; exact release timing follows evidence gates, not this document's creation.
## Compatibility dimensions
| Dimension | Promise and verification |
| --- | --- |
| Source API | Existing entry points remain documented; changed types, errors, defaults and lifetimes have explicit old/new examples and deprecation or major-release handling. |
| CMake/package | Public `Void::<Module>` names and component closures are tested. C++ namespaces are not inferred from target names: `Void::Log` is a target while `Void::Logging` is an existing C++ namespace. |
| C++ binary ABI | Same-toolchain contract remains explicit; compiler, standard library, build/ABI flags, and interface versions must match where required. |
| Stable C plugin ABI | NEW versioned function tables and opaque handles have independent compatibility tests; existing C++ descriptors do not become C-compatible automatically. |
| Wire schemas | Protocol IDs, field encoding, optional/required fields and version negotiation are explicit. Unknown required semantics fail rather than being guessed. |
| Native storage formats | Every format has a version, integrity checks, recovery rules, and upgrade/rollback boundary. Unknown versions fail without rewriting data. |
| Signed update documents | Verify original bytes and preserve strict parser semantics and existing trust checks. |
| Observable behavior | Security defaults, limits, ordering, deadlines, loss policies and shutdown semantics are migration-relevant even if signatures compile. |
## Migration waves
### Wave A: establish consumer fixtures
Inventory supported public headers, namespaces, exported targets, default options and
error behavior from actual source. Add minimal installed and embedded consumers for
foundation, runtime, network, storage, plugins and test integration. Freeze representative
old-version fixtures before altering APIs. Record existing defects rather than freezing
unsafe behavior as an unconditional compatibility requirement.
### Wave B: add explicit new contracts and adapters
Introduce NEW lifetime/operation APIs beside existing conveniences where this preserves
clear semantics. Forwarding headers and deprecated wrappers may translate compatible
calls. An adapter must not hide asynchronous lifetime differences, insecure trust policy,
an unbounded queue, or a new mandatory dependency. Refuse an unsupported conversion rather
than returning success with weaker guarantees.
### Wave C: major-release transition
Group intentional breaks into a migration guide with before/after examples, diagnostics,
test updates, and capability/default changes. Consumer fixtures exercise both retained
compatibility paths and native new APIs. Removal of old entry points occurs only at the
declared version boundary; area plans name the affected signatures.
### Wave D: persistent and distributed evolution
Freeze the first native storage format before public durable-state use. Subsequent
upgrades validate source format and available disk space, write a new generation, verify
it, and switch the manifest atomically under the writer/recovery protocol. Preserve the
old generation until the declared rollback boundary and retention policy allow removal.
No blind downgrade follows new-format writes. Export/import and backup/restore provide
the explicit path when a backward-compatible downgrade is impossible.
## Area migration obligations
| Area | Old/new boundary | Required consumer evidence |
| --- | --- | --- |
| Core/Functional | Error categories, formatting adapters, foundation dependency cleanup | Existing representations and error chains; minimal consumer with optional packages absent |
| Containers/Memory | Allocator-aware variants and changed invalidation/ownership | Move-only values, allocator lifetime, stable-handle/invalidation examples, old default behavior |
| Data/Binary/Text | Exact integers, checked conversions, Unicode/limit policies | Large identifiers round-trip; overflow errors; old strict signed documents remain accepted/rejected identically |
| Async/IO | Borrowed queued handles and detached work toward structured ownership | Cancellation/parked destruction and explicit join; blocking bridge cannot deadlock its own executor |
| Net | Secure TLS defaults, total deadlines, redirect and streaming/session APIs | Private-CA correct-host tests; wrong-host failure; explicit legacy override if offered; no fallback to insecure mode |
| Service/Plugin | Reference convenience versus owning handles; new C ABI | Acquired old generation survives replacement; C/C++ paths have separate ABI tests and destruction ownership |
| Fsm/Scheduler | Terminal-state consistency and supervised children | Faulted termination, race loser cleanup, state checkpoint restore; no coroutine-frame serialization |
| Log/Observability | Bounded total memory, loss and flush semantics | Saturation counters and flush outcomes documented; context snapshots survive shared-library boundaries |
| Sqlite/Storage | SQLite integration remains independent; original engine is NEW | No implicit conversion of SQLite databases; adapters/export tools have explicit schemas |
| Archive/Update | Expanded workflows with existing safety/commit invariants | Traversal/symlink tests, exact signatures, health commit/reconcile and retention regressions |
| ShortUrl | Frozen V1 enum/member/virtual ordering | Same-toolchain V1 fixture; incompatible additions in V2 with explicit provider capability |
| Distributed | Versioned commands, membership and snapshot semantics | Mixed-version compatibility only for explicitly tested combinations; reject unsupported peers safely |
## Stable C ABI rules
Plugin owns the C boundary design and compatibility fixtures. The initial ABI includes
version and structure size, opaque instance handles, fixed-width fields, status values,
explicit buffer lengths and owner-provided release operations. Host and plugin negotiate
supported capabilities before invoking optional functions. An incompatible major ABI
fails before activation.
No STL object, C++ exception, RTTI identity, implicit ownership transfer, or allocator
pairing crosses the C boundary. Callback lifetime, threading and cancellation obligations
are contractual. Generation retirement waits for all acquired handles and owned work.
Adding a C ABI does not imply process isolation or protection from a malicious in-process
plugin; IPC isolation is a separate architecture choice.
## Rollback boundaries
- Source changes: revert an owned change only after reconciling dependent work and
preserving user modifications. Documentation never authorizes destructive Git actions.
- Plugin activation: before publication/commit, discard a failed candidate and keep the
active generation. After state has been committed externally, use compensating or
forward recovery according to that contract; do not pretend memory swapping undoes it.
- Update activation: preserve VersionStore's durable healthy-history commit marker.
Post-commit cleanup failure is retryable cleanup, not evidence to roll back healthy state.
- Storage: a committed durable batch is not rolled back by cancellation or a lost reply.
Failed migration before the manifest switch preserves the old authoritative generation;
recovery decides ambiguous switch outcomes from durable records.
- Replication: committed log history and applied position are authoritative. A node
restart or software downgrade cannot erase acknowledged committed operations.
## Tasks
| ID | Planned work | Acceptance |
| --- | --- | --- |
| X-MIG-01 | Consumer/API/default inventory and legacy fixtures | Every intentional change maps to an existing behavior and migration check. |
| X-MIG-02 | Shared adapter/deprecation policy and diagnostics | Wrappers preserve stated semantics and dependency bounds; incompatible cases fail explicitly. |
| X-MIG-03 | Major-release migration guide and examples | All source/behavior breaks have before/after instructions and tested consumers. |
| X-MIG-04 | C ABI/wire/disk compatibility matrices | Format versions and supported combinations are explicit; unknown inputs fail safely. |
| X-MIG-05 | Upgrade, recovery and rollback rehearsals | Failures at each commit boundary yield a defined authoritative state and reproducible recovery. |
These tasks depend on the area interfaces and their [contract gates](DEPENDENCIES.md).
Feature owners own compatibility tests; root owns cross-area versioning and release
composition. A documentation review cannot substitute for actual upgrade rehearsals.
+106
View File
@@ -0,0 +1,106 @@
# Performance profiles and measurement plan
Status: planned measurement/optimization work. No speedup or benchmark result is claimed
by this document. The existing [Bench helper](../../include/Void/Time/Bench.hpp) measures
individual calls through `std::function` and a clock; it is useful functionality but is
not yet a comparative library-wide performance suite.
## Goals and profiles
Runtime and memory have priority. Separate profiles make tradeoffs visible rather than
forcing one tuning policy onto every consumer.
| Profile | Primary metrics | Constraints and representative work |
| --- | --- | --- |
| Latency | p50/p95/p99 operation and queue latency; deadline misses | Small RPC/HTTP requests, task wakeups, service lookup, log admission, point reads; bounded queues and no hidden blocking |
| Throughput | Completed operations/second, bytes/second, CPU per useful operation | Streaming transfers, serialization, batches, message consumption, multi-client workloads; report queue depth and fairness |
| Footprint | Allocation count/bytes, peak and retained RSS, working set, binary size | Small consumers, bounded queues, snapshots, caches and idle runtime; peak includes in-flight batches/buffers |
| Developer cost | Clean/incremental compile time, link time, dependency closure, artifact size | Single-header consumers, selected modules, complete shared/static installs; tracked alongside runtime profiles |
Each module plan chooses relevant scenarios and explicit resource limits. A low-latency
configuration may trade throughput or memory; publish that tradeoff. An optimization
cannot be accepted by excluding failed, rejected, timed-out, or dropped work from the
reported totals without reporting those counts separately.
## Reproducible workload specification
Every benchmark record includes source revision, dirty state, compiler/standard-library
versions, flags, dependency versions, OS/kernel, CPU model/core topology, memory, storage
device/filesystem for I/O, affinity policy, power policy, data set and random seed,
thread/client count, warmup, duration/sample count, and requested module/profile options.
Do not record credentials or production payloads. Use generated or public fixture data.
Use release-optimized builds for performance results, with a separate instrumented build
for allocation/fault investigations when instrumentation changes timing. Keep baseline and
candidate workloads identical. Record raw samples in a machine-readable artifact plus a
human summary. Preserve correctness assertions outside the timed critical section where
possible and validate every run's outputs.
For initial comparisons use five warmup runs and at least twenty measured repetitions
of each aggregate workload. Increase duration/repetitions if confidence intervals overlap
too much to distinguish a claimed effect; never select only favorable runs. For extremely
small functions batch many operations per timed interval and subtract/report a separately
measured harness baseline. Do not interpret clock/dispatch overhead as the function's
intrinsic cost. Network latency workloads retain per-request samples and avoid hiding
queueing by driving clients only after each previous request finishes.
## Measurement and acceptance rules
1. Establish the workload's current baseline before changing algorithms or defaults.
2. Select the primary metric and resource budgets in the task contract before measuring
the candidate. Hard resource bounds are correctness criteria, not statistical targets.
3. Report median aggregate results with 95% confidence intervals and p95/p99 for
operation-level latency. Record failed/rejected work and maximum observed resource use.
4. A performance improvement requires a repeatable effect larger than observed noise,
preserved correctness, and satisfaction of the selected profile's resource budgets.
5. Flag a regression exceeding 5% in a non-target metric on the controlled benchmark host
when repeated runs distinguish it from noise. Resolve it or record an explicit
profile tradeoff before acceptance. Shared/noisy CI measurements are advisory.
6. No universal absolute latency or speedup target is asserted before hardware/workload
baselines exist. Once established, commit versioned per-workload budgets and require
a deliberate reviewed change to revise them.
## Benchmark inventory
| Family | Scenarios | Important controls |
| --- | --- | --- |
| Core/containers/memory | Small/large values, sparse/dense keys, cache hit/miss, pool reuse, arena reset | Lifetime correctness, alignment, bytes retained and allocation failures |
| Algorithms/math/text | Input size distributions, adversarial patterns, scalar/vector paths, UTF validity | Identical semantics; compare appropriate standard-library baseline |
| Data/binary | Small objects, deep nesting, large integers, large streams, encode/decode/reflection | Validation policies matched; malformed-input throughput separate |
| Async/IO | Uncontended/contended queues, cancellation storms, timer scale, partial I/O | Admission counts, fairness, deadline misses and in-flight memory |
| Net/RPC | Cold/warm connections, TLS handshakes, keepalive, slow clients, uploads/downloads | Connection reuse, client/server CPU, network topology, total deadlines |
| Storage/Sqlite | Point/range reads, atomic batches, read/write mix, snapshots and compaction | Durability/isolation modes matched; dataset larger than cache included |
| Log/observability | Disabled path, small/structured events, saturation, slow exporter, flush | Loss policy/counters, queue plus batch memory, cardinality limits |
| Service/plugin/FSM | Lookup, pinned calls during replacement, event/timer fan-out, cancellation | No lifetime weakening; reload tail latency and retained generations |
| Distributed | Quorum commit, read-index, leader replacement, snapshot catch-up | Fault model, replica placement, acknowledgement semantics, tail latency |
| Packaging/build | Foundation consumer, selected module set, all modules; clean and edit/rebuild | Same compiler/cache state; report cold and warm caches separately |
## Inspected optimization candidates
These are source properties or investigation targets, not measured bottlenecks:
- HTTP requests currently create connection/TLS state per attempt; compare reusable
sessions and streaming against the exact same trust/deadline policy.
- MPSC delivery allocates nodes; investigate pooling/batched ownership only after
concurrent destruction, reclamation, and memory bounds are defined.
- JSON object lookup, router matching, and FSM timer scans use simple structures;
measure workload sizes before replacing them with indexes or timer hierarchies.
- Log worker batches can grow independently of queued slot accounting; establish a
correct total bound before optimizing batch size or lock contention.
- Header-heavy templates/reflection and broad test linkage affect build cost; measure
include/dependency isolation before selecting precompiled-header or module experiments.
## Tasks
| ID | Work | Dependencies | Acceptance |
| --- | --- | --- | --- |
| X-PERF-01 | Define workload/result schemas and reproducible runner manifests | P0 inventory; Time/Testing measurement contracts | Every result identifies configuration and raw samples; seeded repeat is reproducible. |
| X-PERF-02 | Implement aggregate timing, allocation and resource collectors | X-PERF-01 | Harness overhead measured; counters reconcile; collectors do not change semantic outcomes. |
| X-PERF-03 | Establish foundation/runtime/network/storage baselines | Relevant modules available | Comparable workloads and profile budgets versioned before optimization. |
| X-PERF-04 | Add controlled-host regression comparison and advisory CI summaries | X-PERF-02, X-PERF-03 | Noise-aware alerts and explicit tradeoff records; no flaky shared-runner release gate. |
| X-PERF-05 | Profile and optimize one identified cause per task | Selected baseline and hypothesis | Measured improvement, regression tests, before/after evidence and resource accounting. |
All tasks are PLANNED. Runner/benchmark command names are PROPOSED until the harness
exists; the only CURRENT commands are the existing build/test commands documented in
[VALIDATION.md](VALIDATION.md). Cross-area performance work must use those modules'
approved ownership and shared contracts.
+124
View File
@@ -0,0 +1,124 @@
# VoidLibrary expansion roadmap
This is the approved planning package for a generic C++26/reflection library spanning
small foundations, complete modules, and optional application platforms. It describes
future work; the presence of a plan does not mean its APIs or capabilities are implemented.
The user approved authoring this package on 2026-11-24. The source baseline is `main` at
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`. The design retains Linux-first portability,
versioned modernization, native implementation preference with per-module backend
decisions, embedded and managed runtimes, and separate workload profiles. SQLite support
and an original native storage engine are distinct. Distributed capabilities follow
single-node foundations and correctness gates.
## Start here
1. [Requirements](REQUIREMENTS.md) records confirmed scope and representative journeys.
2. [Architecture](ARCHITECTURE.md) defines shared contracts C-01 through C-14 and owners.
3. [Dependencies](DEPENDENCIES.md) separates existing build edges from the target DAG.
4. [Delivery](DELIVERY.md) orders work from baseline quality to complete distributed platforms.
5. Select an area plan below, then follow its task prerequisites and acceptance scenarios.
## Shared plans
| Plan | Responsibility |
| --- | --- |
| [Requirements](REQUIREMENTS.md) | R-001–R-016, approved scope, consumers and planning acceptance |
| [Architecture](ARCHITECTURE.md) | Common contracts, layering, ownership and consistency boundaries |
| [Dependencies](DEPENDENCIES.md) | Module edges, adapter boundaries, contract gates and parallel integration |
| [Delivery](DELIVERY.md) | P0–P4 milestones and implementation readiness/release gates |
| [Performance](PERFORMANCE.md) | Workload profiles, measurement protocol, budgets and regression evidence |
| [Validation](VALIDATION.md) | Planning checks, current baseline, future behavior/fault/configuration matrix |
| [Migration](MIGRATION.md) | Public API/ABI, defaults, wire/disk evolution and rollback boundaries |
| [Build and distribution](BUILD-AND-DISTRIBUTION.md) | Toolchains, dependency closure, packaging, CI and reproducibility |
| [Documentation](DOCUMENTATION.md) | Capability catalog, guides, future examples, references and upkeep |
## Existing public modules
Each module has a separate expanded plan. LogState is an internal supporting target;
its process/shared-library obligations are covered by Log and architecture.
| Module plan | Expansion focus |
| --- | --- |
| [Core](modules/Core.md) | Small types, concepts, reflection utilities and foundation independence |
| [Functional](modules/Functional.md) | Results/errors, functional composition, adapters and retry contracts |
| [Containers](modules/Containers.md) | Allocation/lifetime-aware specialized containers and cache behavior |
| [Math](modules/Math.md) | General numeric, statistical and checked math utilities |
| [Text](modules/Text.md) | Byte/text processing, parsing/formatting and explicit Unicode integration |
| [Data](modules/Data.md) | Precise values, bounded parsing, reflection and schema evolution |
| [Binary](modules/Binary.md) | Bounded readers/writers, codecs and explicit wire representation |
| [Time](modules/Time.md) | Clocks, calendars, deadlines and measurement foundations |
| [Async](modules/Async.md) | Structured task scopes, executors, cancellation and bounded completion |
| [System](modules/System.md) | Processes, files, watching, metrics and platform capabilities |
| [Configuration](modules/Configuration.md) | Typed sources, validation and transactional reload |
| [Net](modules/Net.md) | Real server transports, secure clients, persistent sessions and streaming |
| [Sqlite](modules/Sqlite.md) | First-class SQLite access, transactions, migrations and concurrency |
| [Service](modules/Service.md) | Owning access, scopes, dependency lifecycle and replacement |
| [Plugin](modules/Plugin.md) | Complete module hosting, generation retirement and versioned C ABI |
| [Fsm](modules/Fsm.md) | Supervised workflows, child lifetime and checkpoint boundaries |
| [Log](modules/Log.md) | Bounded delivery, shared facade state, saturation and flush guarantees |
| [Stacktrace](modules/Stacktrace.md) | Capture, symbolization, diagnostics and optional integrations |
| [Resilience](modules/Resilience.md) | Retry/admission budgets, circuit breaking and overload composition |
| [Archive](modules/Archive.md) | Bounded archive workflows with path and extraction safety |
| [Crypto](modules/Crypto.md) | Coherent cryptographic operations over reviewed primitives |
| [Security](modules/Security.md) | Secret/token/password workflows and explicit policy boundaries |
| [Update](modules/Update.md) | Signed release selection, complete activation and durable recovery |
| [ShortUrl](modules/ShortUrl.md) | Frozen V1 provider contract and optional richer service composition |
| [Testing](modules/Testing.md) | Deterministic, property, fuzz and fault-test infrastructure |
| [TestingMock](modules/TestingMock.md) | Expectations, asynchronous behavior and reliable failure diagnostics |
## New subsystems
All names in this table are NEW proposed areas, not claims of current source targets.
| Subsystem plan | Purpose |
| --- | --- |
| [Memory](subsystems/Memory.md) | Arenas, pools, allocator resources and allocation accounting |
| [Algorithms](subsystems/Algorithms.md) | Reusable generic algorithms with workload-based specialization |
| [Unicode](subsystems/Unicode.md) | Validated Unicode processing and versioned data tables |
| [IO](subsystems/IO.md) | Native backends, byte streams, partial results and operation lifetime |
| [Runtime](subsystems/Runtime.md) | Optional managed execution and application-injected composition |
| [Scheduler](subsystems/Scheduler.md) | Delayed/calendar jobs, persistence and occurrence semantics |
| [Storage](subsystems/Storage.md) | Original transactional key-value engine and durable recovery |
| [IPC](subsystems/IPC.md) | Local communication, framing, shared memory and peer lifetimes |
| [RPC](subsystems/RPC.md) | Versioned calls, streaming, deadlines and interoperable error contracts |
| [Messaging](subsystems/Messaging.md) | Bounded durable queues, acknowledgements, retries and deduplication |
| [Observability](subsystems/Observability.md) | Metrics, tracing, context and bounded export adapters |
| [Discovery](subsystems/Discovery.md) | Bootstrap, registration, health and pluggable discovery providers |
| [Coordination](subsystems/Coordination.md) | Deterministic consensus core and failure simulation |
| [Replication](subsystems/Replication.md) | Durable protocol/application-state integration and snapshots |
| [DistributedStorage](subsystems/DistributedStorage.md) | Replicated groups, routing, later sharding/rebalance and operations |
## Application platforms
| Platform plan | Complete future workflows |
| --- | --- |
| [NetworkedApplications](platforms/NetworkedApplications.md) | Managed/embedded services, storage, streaming, configuration, trust and shutdown |
| [ReloadableApplications](platforms/ReloadableApplications.md) | Module host, dependency lifecycle, state transfer, generation pins and updates |
| [DistributedApplications](platforms/DistributedApplications.md) | Replicated services, discovery, messaging, recovery and operational visibility |
These plans specify future reference applications. This documentation delivery does not
create executables, launch services, publish sites or deploy infrastructure.
## Current evidence and interpretation
The all-module ordinary RelWithDebInfo build passed. VoidTests reported **1,245 passed,
2 failed, 3 skipped** out of 1,250; the failures use `/bin/echo` and `/bin/cat`, absent on
the inspected NixOS host. Installed-component consumers passed. Warnings-as-errors failed
in pinned Boost headers. Sanitizers, cross-platform tests and performance benchmarks were
not run. These facts establish P0 work, not completed repairs.
See [validation](VALIDATION.md) for commands and limitations, and
[verification records](../agent-workflow/VERIFICATION.md) for this package's actual checks.
## How to execute a task later
Read the selected area and its shared contract gates. Reconcile source and working-tree
state, select bounded implementation scope, freeze its interfaces and ownership, and
record a precise task specification. Future feature IDs use M-, S-, P-, or X- prefixes;
T-DOC tasks refer only to authoring this package. A plan's task becomes implemented only
after actual code, review and verification evidence exist.
[Workflow state](../agent-workflow/STATE.md), [tasks](../agent-workflow/TASKS.md), and
[decisions](../agent-workflow/DECISIONS.md) preserve progress across sessions. No important
user choice should need to be reconstructed from the conversation.
+73
View File
@@ -0,0 +1,73 @@
# Requirements and approved scope
Status: approved planning scope; feature implementations are planned, not delivered.
Baseline: `main`, `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Purpose
VoidLibrary will span independently usable foundations, complete functional modules,
and optional application platforms. Completeness means documented, composable workflows
with defined failure and resource behavior, as well as useful individual primitives.
The immediate deliverable is this expanded planning package. The user's instruction
“Implement the plan” approves authoring that package, whose approved scope explicitly
separates future application implementation.
## Confirmed requirements
| ID | Requirement | Acceptance in this package |
| --- | --- | --- |
| R-001 | Generic library from small foundations through complete modules and platforms | Every current public module, agreed new subsystem, and three platforms has a linked area plan. |
| R-002 | Keep C++26 and reflection | API designs retain that baseline; feature detection and compiler validation are specified without promising unsupported compilers. |
| R-003 | Linux first, portable design | Linux is the first implementation/validation target; capability and future platform parity are explicit. |
| R-004 | Versioned modernization | Incompatible changes are grouped into a major-release migration with old/new behavior and consumer checks. |
| R-005 | Standard-library-only foundation | Foundation plans require no optional external packages, hidden workers, or mandatory managed runtime. |
| R-006 | Prefer native implementations; decide dependencies by module | Every area records native, standard-library, external, or adapter choices with rationale. |
| R-007 | SQLite integration plus an original storage engine | SQLite stays a distinct backend; new Storage owns its implementation and makes no SQLite SQL/file-format compatibility claim. |
| R-008 | Original transactional key-value core first | Atomic batches, consistent snapshots, durable acknowledgement, recovery, and subsequent richer data models have separate milestones. |
| R-009 | Embedded and managed execution | Applications may inject execution resources; an optional Runtime supplies managed startup and shutdown. |
| R-010 | Broad module completion and both initial platforms | Module work, networked applications, and reloadable applications all appear in the dependency-ordered delivery plan. |
| R-011 | Full distributed platform roadmap | Messaging, discovery, coordination, replication, and distributed storage include failure-model and evidence gates. |
| R-012 | Runtime and memory first, with workload profiles | Latency, throughput, and footprint profiles have measurements, limits, and acceptance rules; build cost remains tracked. |
| R-013 | C++ plugins plus stable C boundary | Same-toolchain C++ compatibility and separately versioned C ABI are distinguished. |
| R-014 | One expanded plan per module/new area | Each area has concrete APIs, tasks, dependencies, failure cases, verification, and migration detail. |
| R-015 | Preserve sensitive existing contracts | Strict signed-document parsing, exact signed bytes, update commit points, frozen ShortUrl V1, and generation pins remain explicit obligations. |
| R-016 | Evidence-based delivery | Current behavior, proposed behavior, observed checks, and future commands are labeled distinctly. |
## Scope boundaries
The selected domain is general software infrastructure: utilities, systems, protocols,
data/storage, runtimes, service composition, and distributed platforms. GUI, media,
GPU, and embedded product layers are outside this roadmap. General numeric utilities
remain in scope; a scientific-computing platform does not.
No calendar deadline, team size, deployment environment, or spending budget was given.
Delivery therefore uses dependency and evidence gates. Documented designs do not claim
implemented capability, measured speedup, proven distributed reliability, or release
readiness. Publishing, licensing changes, and remote actions are separate work.
## Representative acceptance journeys
1. A small CLI links only the utilities it uses and does not need network, database,
crypto, or managed-runtime packages merely to include foundation headers.
2. An application supplies its executor and clock, then uses streaming I/O and tasks
with bounded cancellation and resource ownership.
3. A managed network service starts storage and listeners in dependency order, reports
health, serves bounded requests, and shuts down without abandoning owned work.
4. A reloadable host replaces a provider while existing acquired handles remain valid;
a failed candidate does not displace the active generation.
5. A durable key-value batch survives restart after successful durable acknowledgement;
an interrupted batch never appears partially applied.
6. A later replicated service rejects minority writes, preserves committed history,
and recovers snapshots and applied positions consistently.
## Planning completion gate
The [master index](README.md) is the coverage authority. All listed area documents must
exist, link to applicable shared contracts, distinguish existing source from NEW
interfaces, and contain implementation tasks and testable acceptance scenarios.
The [validation plan](VALIDATION.md) defines checks on the written package itself.
High-impact unresolved alternatives must be resolved in the plan, not passed silently
to an implementer. Later refinements update the decision ledger and affected contracts.
See [architecture](ARCHITECTURE.md), [delivery](DELIVERY.md), and the
[decision ledger](../agent-workflow/DECISIONS.md).
+119
View File
@@ -0,0 +1,119 @@
# Validation and evidence gates
This document separates checks on the planning package, observed baseline evidence, and
future implementation validation. A written test scenario is not an executed test.
## Planning-package acceptance
The documentation delivery must pass:
1. Coverage: ten shared roadmap documents, 26 public module plans, 15 NEW subsystem
plans, and three platform plans match the master index. LogState obligations are
covered under Log and architecture.
2. Navigation: relative document/source links resolve; Markdown heading links resolve;
no link escapes into protected/private files or another repository.
3. Content: every area contains source-backed baseline or explicit NEW status, concrete
APIs/dataflow, backend choices, limits/failures, tasks/dependencies, tests, and migration.
4. Traceability: requirement IDs, shared-contract references and task IDs are coherent.
Feature tasks remain PLANNED; document-writing tasks use separate T-DOC IDs.
5. Truthfulness: commands are CURRENT, TEMPLATE for an existing interface, or PROPOSED
with prerequisites. Observed outcomes include failures/skips and unrun checks.
6. Review: fresh astra_reviewer inspects actual files and cross-plan contracts, not just
worker summaries. Actionable findings receive recorded dispositions and focused rechecks.
Root uses a read-only documentation checker to inventory files, resolve links, find
duplicate task definitions and unresolved placeholders, and report missing content.
Heuristics assist review; they do not prove the designs correct or justify padding text.
No application test is required merely because a Markdown plan changed.
## Observed baseline on 2026-11-24
Repository: `main`, `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
Toolchain: GCC 16.2.0, CMake 4.4.4, Ninja. Fresh build directory:
`/tmp/voidlibrary-discovery-f1f9ba3`. Existing cached Boost 1.84 sources were reused;
no dependency download or tracked source modification was needed.
| Check | Observed result |
| --- | --- |
| All-module RelWithDebInfo configure | Passed after pointing FetchContent at existing cached Boost sources |
| All-module normal build | Passed, exit 0 |
| VoidTests | 1,250 discovered; 1,245 passed, 2 failed, 3 skipped |
| Failure cause | Process fixtures hard-code absent `/bin/echo` and `/bin/cat`; observed child exit 127 |
| Installed component consumers | Passed, 4.74 seconds in the observed run |
| CTest aggregate | Exit 8, one of two CTest entries failed; not a clean test run |
| Warnings-as-errors build | Failed in pinned Boost headers on GCC 16/C++26 deprecation warnings |
| Sanitizers, fuzzing, benchmarks, other OS/compiler combinations | Not run |
The process-test diagnosis is supported by
[the tests](../../tests/standalone/System/Process.cpp) and
[the exec failure path](../../src/System/Process.cpp). It is not a demonstrated defect
in the requested process operation itself. Intentional test-framework skip examples
must not be relabeled as implemented missing features.
## CURRENT commands and prerequisites
The following are the actual commands observed during discovery, with repository root
as cwd. Paths identify this session's environment, not a portable toolchain promise.
```sh
cmake -S . -B /tmp/voidlibrary-discovery-f1f9ba3 -G Ninja \
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVOID_ENABLE_TESTING=ON -DVOID_WARNINGS_AS_ERRORS=OFF \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_SOURCE_DIR_BOOST=/home/faumaray/Projects/VoidLibrary/build/_deps/boost-src
cmake --build /tmp/voidlibrary-discovery-f1f9ba3 --parallel 4
ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 \
--output-on-failure --timeout 60
```
The separate warnings-as-errors configure used `-DVOID_WARNINGS_AS_ERRORS=ON`.
An initial offline configure without a populated Boost source directory failed as expected
from its prerequisite. `FETCHCONTENT_FULLY_DISCONNECTED` requires populated dependency
sources; it is not a first-install command. Portable build templates and dependency
resolution policy belong in [BUILD-AND-DISTRIBUTION.md](BUILD-AND-DISTRIBUTION.md).
## Future implementation test matrix
| Area | Required scenarios | Evidence gate |
| --- | --- | --- |
| Foundations/containers | Empty/boundary values, overflow, allocation failure, move-only values, alignment, deterministic seeds | Unit/property tests and minimal consumer/header checks |
| Parsing/serialization | Truncation, invalid Unicode, numeric range, duplicate keys, recursion/size bounds, round trips, schema upgrades | Seeded property tests, fuzz corpora, signed-document regression fixtures |
| Async/IO/runtime | Completion vs cancellation/deadline, queued/parked destruction, partial transfer, fd reuse, admission saturation, shutdown | Deterministic schedules plus sanitizer/stress evidence; exactly one terminal result |
| Network/protocol | Wrong-host/CA/expired TLS, redirects, partial frames, slow peers, body/header limits, connection reuse, graceful stop | Local fixture services/private CA, conformance/fuzz tests; no live public endpoint dependency |
| Native Storage | Torn/reordered/short writes, failed sync, disk full, partial commit, crash during recovery/compaction, held snapshots | Injected filesystem failures and restart matrix; acknowledged durable data survives, incomplete batches atomic |
| Sqlite | Prepared statement binding, transactions/rollback, migrations, busy contention, connection shutdown | Actual supported SQLite versions/modes; independent from original Storage tests |
| Service/plugin/FSM | Reentrant lifecycle, failed-start rollback, provider replacement with pins, ABI mismatch, losing child cleanup, fault termination | Cross-module tests with controlled plugins and executor schedules |
| Log/observability | Saturation, slow/failing sinks, flush races, reconfiguration, context lifetime, metric cardinality | Loss counters and total in-flight resource accounting under pressure |
| Archive/update/security | Traversal/symlink races, decompression limits, invalid signature/bytes, replay/expiry, durable activation and cleanup failure | Adversarial fixtures and crash recovery; preserve existing trust contracts |
| Messaging/scheduler | Duplicate delivery, lost acknowledgement, retries, expired work, restart, wall-clock changes | At-least-once/dedup semantics and bounded retention verified |
| Coordination/replication | Partitioned leader/minority, crash/restart, reordered/duplicated RPC, lost reply, snapshot installation | Deterministic reproducible histories, agreement checks, durable state/applied position consistency |
| Distributed storage | Single-group correctness, routing epochs, membership transitions, failed rebalance, backup/restore | Failure injection before multi-shard availability claims |
| Packaging/platforms | Minimal/full selection, add_subdirectory/find_package, shared/static, installed consumers, explicit capability gaps | Supported configuration matrix and runnable future reference-consumer checks |
## Sanitizer and platform policy
Use ASan/UBSan for supported compiler configurations and TSan for applicable concurrency
work; check toolchain compatibility before promising coverage. Sanitizers are separate
build configurations where combinations are unsupported. Fuzzing/property tests supplement
deterministic regressions; they do not replace lifetime reasoning or protocol review.
Linux is the first validated platform. Windows/macOS ports have explicit capability
matrices and platform-specific acceptance, including process APIs, file watching, shared
libraries and filesystem durability. A functional fallback is not automatically equivalent
to POSIX locking/fsync guarantees. Compiler/reflection support is probed per feature.
## Tasks and gate ownership
| ID | Planned work | Acceptance |
| --- | --- | --- |
| X-VALID-01 | Minimal consumer/header and package-closure matrix | Each supported module/profile has isolated compile/link/runtime evidence. |
| X-VALID-02 | Deterministic clock/executor and fault filesystem harness | Seeds reproduce failures; injected effects reach intended boundaries. |
| X-VALID-03 | Property/fuzz corpus pipeline for parsers/codecs/protocols | Corpus regressions retained; time/resource budgets enforced. |
| X-VALID-04 | Sanitizer/stress jobs and supported-toolchain matrix | Unavailable tooling is reported explicitly; failing supported jobs block the relevant gate. |
| X-VALID-05 | Distributed deterministic simulation and history validation | Partition/restart/snapshot scenarios falsify incorrect histories reproducibly. |
| X-VALID-06 | Reference-platform and release-candidate validation | Public examples consume installed packages and exercise upgrade/shutdown/recovery. |
Testing owns harness primitives; feature owners own behavior assertions; root integrates
cross-component scenarios. No universal percentage substitutes for coverage of failure
boundaries. Record command, cwd, revision, configuration, exit status, outcomes and
unrun checks in [verification evidence](../agent-workflow/VERIFICATION.md).
+150
View File
@@ -0,0 +1,150 @@
# Archive — safe streaming and atomic publication
Status: plan; all implementation tasks PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
R-003/R-006/R-014/R-015 and [C-02–C-07](../ARCHITECTURE.md) apply.
## Existing extraction contract
[Archive.hpp](../../../include/Void/Archive/Archive.hpp) exposes
`Void::Archive::extract(path, destination, ExtractionOptions)` returning an ExtractionResult.
Defaults are 10,000 entries, 512 MiB per file, 2 GiB total and no overwrite.
[Archive.cpp](../../../src/Archive/Archive.cpp) enables tar plus none/zstd filters through
libarchive, rejects absolute/non-normal/traversal/backslash paths, duplicates, links and
special entries, and checks declared and actual extracted bytes. POSIX extraction pins the
destination directory, walks parents with descriptor-relative no-follow operations, writes
temporary regular files, syncs them and publishes them. Windows has a different path-based
implementation; identical race resistance is not established by the Unix source.
[module.cmake](../../../src/Archive/module.cmake) links Functional and LibArchive::LibArchive.
[Tests](../../../tests/standalone/Archive/Archive.cpp) include bounded tar.zstd extraction,
explicit directories, traversal/links, symlink parents, destination path swapping and actual
size limits. These are regression obligations. A failed whole extraction can still leave
earlier successfully published entries: the existing per-file workflow is not an atomic
replacement of an entire directory tree.
## Backend and API completion
Retain libarchive as the initial tar/zstd decoder and later encoder. Void owns path policy,
resource admission, stream adapters and publication transactions. Native directory safety
logic is preferable to shelling out; a new tar or zstd implementation would add compatibility
and security risk without a measured requirement. Other formats require an explicit tested
profile; enabling every decoder by default is not part of completion.
NEW illustrative surface in the existing namespace; shared operation options come from
[Async](Async.md), byte streams from [IO](../subsystems/IO.md):
```cpp
struct EntryInfo; // owned normalized path, type, declared size, safe mode
struct ReadLimits; // policy defaults below
class Reader; // caller-driven next_entry/read_chunk/skip_entry
class StagedTree; // owns unpublished directory and cleanup obligation
Result<Reader> open_reader(InputStream&, ReadLimits);
Result<StagedTree> extract_staged(InputStream&, DirectoryHandle, ExtractionOptions);
Result<PublicationReceipt> publish(StagedTree, std::string_view new_child_name);
Result<void> create_archive(OutputStream&, EntrySource&, CreationOptions);
```
All types except existing ExtractionOptions are NEW Archive or IO-owned interfaces as
indicated; this sketch is not a compiling example. Input/output streams are borrowed through
completion, or moved into an owning async operation. EntryInfo never points into libarchive's
next-header scratch buffer. Reader has one active entry; callers drain or explicitly skip it
before advancing. Skipping still accounts for decompressed work and limits, not just stored
bytes. The reader never materializes a complete archive by default.
Listing is a bounded metadata traversal and carries the same path/entry-count validation.
An opt-in forensic listing may report rejected metadata without writing anything, but is
not a way to authorize extraction of unsafe entries. Archive creation accepts regular files
and directories only, sorts normalized paths, rejects duplicates, and uses reproducible
timestamps/owners/modes when requested. It does not follow links while enumerating sources.
## Atomic extraction workflow
`extract_staged` creates an exclusive private child beneath a caller-owned parent directory,
pins its descriptor, then extracts all content there. Default output permissions are 0644
files and 0755 directories, retaining only the explicitly allowed executable bit policy;
ignore ownership, setuid/setgid, device metadata and extended attributes. File paths have a
4 KiB encoded limit, 255-byte component limit and 64 components. Reject conflicts where
a file is required to be a parent directory, including case-collisions on a backend that
cannot distinguish them. Do not repair malicious paths by normalizing them into acceptance.
On success, close/sync every file, sync created directories bottom-up, write a bounded
completion inventory, sync the staging root, and return StagedTree. Publication creates a
previously absent immediate child name by a no-replace directory rename on the same filesystem,
then syncs the parent. An unsupported atomic no-replace primitive returns UnsupportedCapability;
there is no fallback to a racy existence-check plus overwrite. Existing nonempty directories
are never recursively overwritten under an "atomic" label.
Replacing an application version uses immutable version directories and a separate pointer/
activation owner, such as [Update](Update.md)'s VersionStore. Archive does not invent a new
update commit point. If parent sync fails after rename, PublicationReceipt/error records
Unknown outcome and the destination/staging identity so recovery can inspect it. It cannot
claim the published tree was rolled back. Cancellation before publication cleans only the
owned staging tree; after publication it reports the known/unknown publication outcome.
All filesystem accesses stay relative to retained directory handles on the hardened Linux
path. Untrusted siblings cannot redirect extraction by swapping parent paths. Cleanup removes
only names created under that owned staging descriptor and never follows links. Cleanup
failure preserves the primary error and a retryable staging identifier, rather than masking
the original decode/write error. Startup cleanup requires an exclusive operation marker and
age/ownership validation, not a broad deletion of directories matching a prefix.
## Bounds, cancellation and diagnostics
Retain current file/total/entry defaults. NEW streaming defaults add a 64 KiB transfer buffer,
8 MiB aggregate path/inventory metadata, four active jobs and 16 pending jobs per explicit
managed service, and a 1 GiB compressed-input cap. Reject zero limits as invalid except an
explicit zero-entry policy. Actual decompressed bytes count even when the format omits or
lies about size; checked subtraction prevents arithmetic wrap. Nesting archives is never
automatic. High compression ratios are allowed only within absolute limits.
Cooperative checks happen between headers and chunks, but do not make a codec call forcibly
interruptible. The NEW hardened untrusted-input profile uses a System-owned child job with
128 MiB RSS and 60-second total execution defaults, plus bounded result/output channels;
the parent holds publication authority and verifies the staged tree before publishing.
Platforms unable to enforce that profile report the capability gap. Ordinary embedded
trusted-input mode can call the decoder synchronously with documented cooperative limits.
Neither mode promises that a 64 KiB IO buffer bounds the decoder's internal memory.
Domain errors distinguish unsafe entry, unsupported format, corrupt archive, limit exceeded,
permission, no space, cancellation, timeout and unknown publication. Diagnostics cap path
rendering at 4 KiB and avoid writing attacker-controlled newlines unescaped. Progress callbacks
run outside shared locks, own their event data if retained, and are rate-limited to 10 Hz
per job. Failure to deliver progress never changes extraction success.
## Ordered work
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-ARCHIVE-01 | P0; existing tests | Characterize partial-tree failure, exact accepted path/type policy and platform capabilities; preserve all existing anti-traversal tests. | astra_implementer |
| M-ARCHIVE-02 | P1; M-ARCHIVE-01, IO stream ownership, Binary bounds | Reader/listing and chunk adapters, metadata limits and typed errors; truncated/adversarial input cannot exceed accounted limits. | sol_implementer |
| M-ARCHIVE-03 | P2; M-ARCHIVE-02, IO directory durability | StagedTree and atomic no-replace publication; crash at each sync/rename recovers either unpublished staging or a complete published tree. | astra_implementer |
| M-ARCHIVE-04 | P2; M-ARCHIVE-02/03, System process limits | Hardened decoder isolation, cancellation/cleanup and race fixtures; parent never publishes unvalidated/partial child output. | astra_implementer |
| M-ARCHIVE-05 | P3; M-ARCHIVE-03, Update package contract | Reproducible creation and package inventory verification; create/extract roundtrip preserves only allowed metadata and Update retains activation ownership. | sol_implementer |
| M-ARCHIVE-06 | P3; M-ARCHIVE-04/05, shared harness | Fuzz corpus, filesystem fault campaign and decoder performance profiles; publish capability matrix before a new format/backend is accepted. | sol_implementer |
P4 snapshot/package transport reuses bounded archives; a replicated snapshot's correctness
and installation marker belong to [Replication](../subsystems/Replication.md), not tar metadata.
## Verification and compatibility
CURRENT TEMPLATE: `<existing-build>/tests/VoidTests --filter '^archive_'`, backed by the
test names above. [Validation](../VALIDATION.md) contains actual build evidence; no rerun
occurred here. PROPOSED after M-ARCHIVE-02–06: malformed headers/zstd, duplicate/conflicting
paths, long names, symlink swap at each parent, partial write/disk full/sync failure,
cancellation during decode/publication, unsafe staging cleanup, resource-killed child and
Windows capability fixtures. Include create→extract property tests and an independent
tar consumer when validating generated packages; fixtures must not invoke production paths.
[Performance](../PERFORMANCE.md) profiles many tiny files, a few large files, incompressible
data and compression bombs within test limits. Record p50/p95/p99 completion/admission,
bytes/s, allocations, peak RSS/CPU including decoder child, disk amplification and build cost.
The common repetition/confidence and regression rules apply; security checks remain enabled.
[Migration](../MIGRATION.md) keeps `extract` as the documented incremental API. New callers
needing all-or-nothing visibility use extract_staged→publish and handle Unknown explicitly.
Never change overwrite defaults silently. Rollback of an unselected new workflow can retain
legacy extraction; rollback of a published tree is owned by the consuming application.
New formats are version/profile gated. [Build/distribution](../BUILD-AND-DISTRIBUTION.md)
keeps libarchive optional outside Archive consumers. Graph partial ranges in the header and
test helper were read directly; cited source/test files were checked for coverage. No new
atomicity, fuzz, portability or measured-performance result is claimed.
+212
View File
@@ -0,0 +1,212 @@
# Async completion and structured execution plan
Status: PLANNED feature work. Source baseline: `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
This document implements no execution features. Requirements R-005, R-009, R-012,
R-014 and R-016 apply; [architecture](../ARCHITECTURE.md) C-02–C-05 and C-11
define the shared boundaries.
## Existing surface and gaps
- [Task.hpp](../../../include/Void/Async/Task.hpp) provides move-only lazy
`Void::Coro::Task<T>` and `Task<void>`, stored exceptions, continuation transfer,
a borrowed `handle()`, and frame destruction by the owning Task. `run()` resumes
once and reads the result; it is not a general event-loop driver for externally
suspended operations. [Generator.hpp](../../../include/Void/Async/Generator.hpp)
is the separate synchronous pull generator.
- [Executor.hpp](../../../include/Void/Async/Executor.hpp) defines
`Void::Async::Executor::post(coroutine_handle<>)`, a single-consumer
`ManualExecutor`, `schedule_on`, and detached `spawn`. Queues hold borrowed
handles. Detached exceptions terminate; cancellation and joining are absent.
- [ThreadPool.hpp](../../../include/Void/Async/ThreadPool.hpp) is in
`Void::Concurrency`, returns futures, drains and joins workers on destruction,
and offers blocking `submit` and rejecting `try_submit`. Its historical
`max_queue == 0` means unlimited queued work; running work is not part of that
queue bound. [Channel.hpp](../../../include/Void/Async/Channel.hpp) is a bounded
blocking MPMC channel, not a coroutine channel.
- [MpscQueue.hpp](../../../include/Void/Async/MpscQueue.hpp),
[ParallelFor.hpp](../../../include/Void/Async/ParallelFor.hpp),
[Observable.hpp](../../../include/Void/Async/Observable.hpp), and
[EventBus.hpp](../../../include/Void/Async/EventBus.hpp) supply useful primitives.
EventBus async mode starts its own worker and snapshots callbacks at publication;
unsubscribe cannot retract those copies. Observable/Signal iterate listener
collections directly and need a documented reentrancy/threading policy.
- [module.cmake](../../../src/Async/module.cmake) declares LogState. Remove
mandatory concrete logging from the target execution contract through optional
error/observation hooks, preserving compatibility adapters.
[Executor tests](../../../tests/standalone/Async/Executor.cpp),
[coroutine tests](../../../tests/standalone/Async/Coro.cpp),
[backpressure tests](../../../tests/standalone/Async/ThreadPoolBackpressure.cpp),
[channel tests](../../../tests/standalone/Async/Channel.cpp), and
[async event tests](../../../tests/standalone/Async/EventBusAsync.cpp) are existing
fixtures. They do not establish structured lifetime or cancellation correctness.
Graph coverage was checked for scoped source; Observable line 32 was read directly
because it is partially parsed. Important ownership conclusions use source inspection.
## NEW API contracts
The following is a design sketch, not a compiling example. Async owns the sole
public operation-options type used by IO, Net, RPC, Scheduler and other consumers:
```cpp
namespace Void::Async { // NEW additions
struct OperationOptions {
std::stop_token stop{};
std::optional<std::chrono::steady_clock::time_point> deadline{};
};
enum class AdmissionError { overloaded, stopped, deadline_expired };
class TaskScope {
public:
Result<JoinHandle> spawn(Coro::Task<void>&& task, OperationOptions = {});
void request_stop() noexcept;
Coro::Task<Result<void>> join();
};
// Executor evolution: try_post(owned_resume_ticket) -> Result<void>;
// schedule_on(executor, options) -> cancellable scheduling awaitable.
}
```
`Result` is shorthand under C-02; Functional owns error representation. JoinHandle,
resume tickets, scope construction and executor evolution are NEW Async-owned types.
An execution binding borrows the executor, Time's injectable monotonic clock, and
optional Memory resource. Their lifetimes extend through scope join. Clock injection
is specified in [Time](Time.md); no consumer invents another clock or request context.
The options fields above are fixed: consumers add domain options separately. The NEW
Time type is `Void::Time::MonotonicClock`; manual-clock tests advance it and explicitly
drive timer progress. Backends derive OS wait durations from the injected `now()` and
must not compare a manual deadline with the host clock's current time.
No deadline means no time limit, not unlimited admission. A deadline is absolute in
the injected steady-clock domain and covers queue waiting, execution and backend
cleanup initiation. Stop already requested or deadline already expired rejects
admission without invoking the operation. An accepted operation keeps its cleanup
obligations even after its deadline. Parent stop and child stop combine in an owned
stop source; they never rely on a temporary callback registration.
## Frame ownership and terminal arbitration
1. A lazy Task owns its frame before admission. Successful scope admission transfers
the frame into a scope-owned control block; a failed admission leaves ownership
with the caller or returns the task through the specified move-failure adapter.
Choose a two-step reserve-then-transfer implementation so rejection never silently
destroys an operation the caller still considers submitted.
2. Executor queues store a retained resume ticket, never a bare handle whose owner
may disappear. Only the selected consumer resumes a frame; queued/running flags
prohibit concurrent resume and duplicate enqueue. Await suspension registration
uses an atomic handshake so completion during `await_suspend` cannot lose a wake.
3. The control block tracks admitted, active, stop-requested, backend-released,
terminal-recorded and continuation-delivered states. Stop/expiry records intent and
initiates cooperative cancellation; it does not immediately fix the result of an
effectful operation. Its owner first gathers the required completion/persistence
evidence, then one serialized transition or compare/exchange records the domain
result. A terminal result already recorded cannot be overwritten by a later stop.
4. Backend acknowledgement is awaited before buffer release and continuation delivery.
Late completion is evidence for domain-result selection as well as cleanup, even
when stop was requested first. A side-effect-free scheduling wait can finalize as
cancelled/timed-out at its safe abort point; a transfer error preserves observed
bytes/effects. A committing adapter returns a known commit receipt, proven
NotCommitted cancellation, or explicit Unknown outcome according to its domain.
Generic Async code never rewrites those outcomes to cancellation. The domain owns
this classification; Async imports no Storage/Update types. Duplicate notifications
cannot deliver again. Cancellation callbacks post control messages instead of
destroying frames, and user callbacks never run under internal state locks.
5. Join waits for terminal delivery, all children, backend references and callback
registrations to drain. The frame is destroyed once, after final suspension and
all resume tickets retire. Continuation delivery uses reserved capacity so a full
executor cannot strand already admitted operations.
`TaskScope` destruction requests stop and joins on a permitted owner thread. On an
executor thread, callers must `co_await join()` before destruction; blocking a worker
needed for progress is a detected programmer error. An embedded single-thread driver
can pump its executor while synchronously joining. No timeout frees live frames.
Explicit detached launch requires an owner retained through completion plus an error
sink; it is not the default scope behavior. CPU-bound user code must poll stop or
yield; cancellation cannot impose a hard wall-clock shutdown guarantee.
NEW committing adapters keep their domain operation alive through evidence collection,
including when a lower-level IO awaitable reports cancellation with partial effects.
For a durable write, stopping before append yields NotCommitted; stopping during sync
leaves the result pending; successful sync and publication after stop yield the receipt;
failed sync after append yields Unknown unless non-commit is independently proved. The
one continuation is delivered after backend access ends in every case. These are adapter
conformance scenarios, not an Async dependency on the native engine.
## Queues, channels and event delivery
NEW defaults: 4,096 admitted tasks per executor including running work; 1,024 child
tasks per scope; 1,024 values per coroutine channel; 4 MiB aggregate channel payload
budget through a supplied size-accounting policy; 1,024 subscriptions and 1,024
admitted event dispatches. Variable payloads require a byte-accounting policy rather
than pretending element count bounds memory. Zero capacity is invalid; an explicitly
named unlimited policy is available only where separately documented.
Initial scheduling uses a bounded mutex-protected FIFO and condition/event wakeups.
Correct admission and lifetime precede work stealing or lock-free specialization.
Work is charged until completion cleanup, with a reserved internal completion lane
bounded by admitted operations. Default external submission rejects on overload;
`async_wait_for_capacity(options)` is explicit and bounded to 1,024 waiters. Blocking
submission is an off-executor adapter. ThreadPool futures keep their old behavior
until a versioned adapter maps rejection and exceptions explicitly.
Coroutine channels offer cancellable send/receive and close-with-drain; failed send
does not consume the caller's value. Separate closed, empty, full, cancelled and
timed-out results. ParallelFor gains explicit grain/concurrency, stop propagation
and deterministic exception aggregation after joining started chunks.
Subscriptions use immutable dispatch snapshots. Removing a subscription prevents new
admission; NEW `close_and_join` waits for already admitted callbacks. Callback code
and error sinks run outside subscriber locks. Self-unsubscribe is supported;
self-join is rejected. Reentrant sync Observable updates queue bounded notifications
instead of invalidating iteration. Async EventBus accepts an injected executor and
keeps its private-worker constructor only as an explicit compatibility convenience.
## Backend and performance decisions
Use C++ standard threads, atomics, stop tokens and coroutines; no external execution
engine. Async has no IO or Runtime dependency. [IO](../subsystems/IO.md) supplies
operation backends; [Runtime](../subsystems/Runtime.md) composes them. Timer ordering
uses a stable min-heap keyed by deadline and sequence with an injected Time clock.
Cancellation removes or tombstones a timer while retaining its operation reference.
Measure empty-task hops, producer contention, 1/64/1,024-byte channel values,
ParallelFor skew, event fan-out and cancel storms. Record p50/p95/p99, throughput,
allocations/frame, peak RSS/CPU and compile/link cost under each
[performance profile](../PERFORMANCE.md). A fixed admitted-work bound must imply a
flat retained-frame count after repeated cancellation; no speedup is claimed here.
## Ordered implementation backlog
Every row is PLANNED; role recommendations are for later root delegation.
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
| --- | --- | --- | --- |
| M-ASYNC-01 | P0 / current source | Characterize Task moves, external suspension, executor and subscription lifetimes; independent-header/package checks | Reproduce unsafe lifetime preconditions without invoking UB in the harness; record existing future/exception behavior / sol_implementer |
| M-ASYNC-02 | P1 / M-ASYNC-01; Time clock and Functional error gates | OperationOptions, reserve/transfer admission, owned resume tickets, terminal state machine and domain-outcome classification | Stop/completion/expiry permutations deliver once after backend release; fake committing adapter preserves known receipt/unknown outcome after stop; fake clock controls deadlines / astra_implementer |
| M-ASYNC-03 | P1 / M-ASYNC-02 | TaskScope, join, explicit detached owner and shutdown guards | Nested stop joins all children; rejected admission preserves ownership; no self-deadlock / astra_implementer |
| M-ASYNC-04 | P2 / M-ASYNC-03 | Bounded executors, cancellable channels, future pool adapter, ParallelFor | Bounds include running work; producer stop and close-drain deterministic; chunk errors join / sol_implementer |
| M-ASYNC-05 | P2 / M-ASYNC-04 | EventBus/Observable snapshot dispatch, joined subscriptions, injected scheduling | Reentrancy, callback throw and unsubscribe races leave no captured state in use after join / sol_implementer |
| M-ASYNC-06 | P3 / M-ASYNC-05; profile harness | Profile native queues; optimize only measured hot paths; major API migration | Conformance identical across optimized path; bounded allocation and installed consumers verified / astra_implementer |
## Validation and migration
CURRENT tests are generated into `VoidTests` by
[tests/CMakeLists.txt](../../../tests/CMakeLists.txt). Current available aggregate
check: `ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60`.
It was not rerun for this document; inherited baseline failures are recorded in
[VALIDATION](../VALIDATION.md). PROPOSED tests require the tasks above: deterministic
pause points around registration/resume/destruction; cancellation at every await;
cross-thread posting during shutdown; full queue at terminal delivery; faulting error
sink; infinite cooperative child; byte budget exhaustion; sanitizer lifetime/race runs.
Use a fake committing backend to stop before append and during sync, then independently
release successful or failed sync. Assert the sole domain result and retained ownership;
passing a cancellation-only scheduling test does not cover these commit races.
Keep `Void::Coro`, `Void::Concurrency`, `Void::EventBus` and `Void::Observable` names
visible in migration examples. EXISTING `spawn(executor, task)` becomes NEW
`scope.spawn(std::move(task), options)` plus `co_await scope.join()`. EXISTING
`task.run()` remains for proven synchronous completion until deprecated; general
blocking wait uses an explicit driver adapter. Preserve old future exception and
zero/unbounded semantics in a versioned legacy adapter, never silently reinterpret
them. Roll back a new executor backend behind selection before submission; never
replay accepted work. See [MIGRATION](../MIGRATION.md),
[DEPENDENCIES](../DEPENDENCIES.md), and [DELIVERY](../DELIVERY.md).
+148
View File
@@ -0,0 +1,148 @@
# Binary readers, writers and codec boundaries
Status: planning only; all feature tasks are **PLANNED**. Baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Existing baseline
[Binary](../../../src/Binary/module.cmake) currently depends on Functional and has one
public header, [Reader](../../../include/Void/Binary/Reader.hpp). `Void::Binary::Reader`
borrows `span<const byte>`, tracks its position and provides seek/skip, read/peek bytes,
integral endian decoding, copied strings and bounded subreaders. Results use
`Void::Result::Result<T>`. Returned byte spans/subreaders do not extend input lifetime.
Integral reads use copied storage/bit_cast, so no aligned-load or aliasing requirement
is imposed on input. The default byte order is native; it must not silently define a
portable file or protocol format.
[Reader tests](../../../tests/standalone/Binary/Reader.cpp) check big-endian reading,
truncation leaving position unchanged, and bounded children. No writer, varint, structured
codec, stream backend or format registry exists in this source inventory. Scoped graph
coverage reported no recorded gaps and the full reader/test were read directly.
## Ownership and backend decision
Per [C-01/C-02/C-07](../ARCHITECTURE.md), Binary owns representation mechanics; Data owns
values/schema/reflection, Archive owns archive layouts, Storage owns its persisted
records and Net owns protocol frames. IO owns actual transfers. Binary never imports
these higher modules or starts workers. Choose native span cursors plus standard byte/
bit/PMR tools. Do not add a generic serialization dependency or put JSON schema logic
inside a byte reader. Checksums for storage integrity remain distinct from authentication;
no homegrown cryptographic primitive is introduced.
## NEW cursor and buffer APIs
Illustrative NEW shape in NEW `include/Void/Binary/Writer.hpp` and
NEW `include/Void/Binary/Varint.hpp` (signatures are not existing compiling examples):
```cpp
namespace Void::Binary {
class Writer {
public:
explicit Writer(std::span<std::byte> output) noexcept;
std::size_t position() const noexcept;
std::size_t remaining() const noexcept;
Void::Result::Result<void> writeBytes(std::span<const std::byte>);
template<std::integral T> requires (!std::same_as<T,bool>)
Void::Result::Result<void> write(T, std::endian order); // no wire default
Void::Result::Result<void> writeUvarint(std::uint64_t);
};
struct DecodeLimits {
std::size_t max_field_bytes = 16 * 1024 * 1024;
std::size_t max_total_bytes = 64 * 1024 * 1024;
unsigned max_depth = 64;
};
Void::Result::Result<std::uint64_t> readUvarint(Reader&);
}
```
Writer borrows mutable output and owns only its cursor; caller owns the buffer through
all access. Every primitive validates capacity before modifying bytes or position.
`writeBytes` supports overlapping source/output via memmove-equivalent behavior; integral
encoding uses local fixed storage. Composite encoders validate their exact measured size
before publication or stage into bounded scratch. A cursor checkpoint rolls back position
only; it must not claim to restore overwritten caller bytes. An explicit transactional
encoder stages data when strong all-or-nothing bytes are required.
NEW `ByteBuffer` is an owning `pmr::vector<byte>` wrapper with an explicit Memory resource
and a default 16 MiB capacity ceiling; growth checks current size + requested bytes and
resource admission before reserve. It does not expose stable pointers across growth.
`freeze()` transfers owned storage without copying and makes published bytes immutable.
A borrowed span never becomes owning merely because it came from `freeze().view()`;
the frozen owner must remain alive. Empty output is valid; a zero ceiling permits only
empty output, never unlimited allocation.
Reader adds named `readLittle<T>`/`readBig<T>`, cursor transactions for compound parsing,
and structured domain code/offset/requested/remaining diagnostics mapped through
Functional. Preserve current primitive truncation behavior. Unsupported endian/type
checks happen before consuming bytes. Floats use explicitly named IEEE binary32/binary64
codecs and capability checks (`is_iec559` and width); no long-double object serialization.
Booleans accept only 0/1. Signed integers have an explicit two's-complement wire contract;
padding/native object representations are never copied as a schema.
## Varints, strings and incremental decoding
Unsigned varints use seven payload bits per byte, low group first, maximum ten bytes
for uint64. Byte ten may contain only payload bit 0; continuation there is malformed.
Reject nonminimal encodings by default, distinguishing truncated input from overflow and
noncanonical data. Signed varints use explicit ZigZag operations in unsigned arithmetic,
including INT64_MIN, without signed shifts/overflow. A compatibility permissive decoder
must be named; it cannot be selected implicitly by a signed or storage format.
Length-prefixed byte fields decode length, check configured field and remaining-total
limits, check size_t conversion, then borrow/copy as requested. Strings are bytes unless
an explicitly named UTF codec is selected by the caller. Embedded NUL is not terminator.
Nested limits are shared cumulative budget state, so children cannot each claim a fresh
64 MiB allowance. Decompression belongs to Archive; advertised decompressed sizes are
not permission for Binary to allocate arbitrary memory.
NEW incremental decoding returns `complete(value)`, `need_more(minimum_bytes)` or a
terminal error plus consumed-byte count. `need_more` owns any retained partial bytes
(at most ten for a varint); it never retains a temporary input span. Field assemblers
reserve within the same aggregate budget and report cancellation between input chunks
through a caller-driven adapter. Cancellation does not reinterpret already emitted
streaming output as undone. Binary owns no async operation options; IO/Async adapters
use their shared types under C-03.
## Codec boundary with Data and Storage
The selected NEW general value codec is **VoidValueBinary V1**, owned and versioned by
Data with an adapter using Binary. Binary supplies primitives only. Data assigns value
tags, duplicate policy and schema envelope; Storage independently assigns WAL/checkpoint
framing, checksums and recovery rules. Neither codec may serialize raw `Value` object
memory. Do not add CBOR/MessagePack/Protocol Buffers compatibility claims to this native
format. Later standards adapters need named capability tasks and conformance fixtures.
## Ordered tasks
| Task | Phase; dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-BINARY-01 | P0; current reader | Freeze cursor, lifetime, byte-order and failure fixtures; enumerate every current consumer before deprecating native-endian defaults. | sol_implementer |
| M-BINARY-02 | P1; M-BINARY-01; Functional error gate | Implement Writer, explicit endian primitives and structured diagnostics; truncation/unsupported operations change neither cursor nor bytes. | sol_implementer |
| M-BINARY-03 | P1; M-BINARY-02; Memory bounded-resource gate | Add owning ByteBuffer, immutable transfer and cumulative budgets; allocation failure and capacity exhaustion preserve published storage. | sol_implementer |
| M-BINARY-04 | P2; M-BINARY-02 | Add canonical varints/ZigZag, length fields and explicit floating codecs; golden bytes, invalid encodings and all uint64 boundaries pass. | sol_implementer |
| M-BINARY-05 | P2; M-BINARY-03–04 | Add incremental parsing and Data adapter primitives; all chunk boundaries produce identical values and retained bytes remain within limits. | sol_implementer |
| M-BINARY-06 | P3; M-BINARY-05; Data V1 codec gate | Publish portable format examples, fuzz targets and installed minimal consumers; differential round trips and independent golden fixtures pass. | sol_implementer |
## Validation, migration and resource evidence
CURRENT checks are the existing Reader suite and parent baseline; no build was rerun.
PROPOSED tests include unaligned spans, empty/exact/one-byte-short output, overlapping
writeBytes, endian fixtures independent of host, noncanonical varints, all truncated
prefixes, INT64_MIN, NaN payload handling and nested cumulative-budget exhaustion.
Fuzz decode plus writer replay; include malicious length values near SIZE_MAX before
any allocation. Cross-endian emulation/targets are proposed prerequisites, not current
compiler/platform evidence. Shared schema owners review the V1 tag and framing fixtures.
Measure scalar and batched cursor operations, copied versus borrowed fields, incremental
chunk sizes and allocation counts with [PERFORMANCE](../PERFORMANCE.md): p50/p95/p99,
throughput, peak RSS/CPU and build cost. Track scratch capacity, retained partial fields
and owning-buffer capacity separately. No benchmark was executed for this plan.
[Migration](../MIGRATION.md) preserves Reader's current names through adapters and adds
explicit endian overloads before removing ambiguous defaults in a major release. File/
wire bytes are versioned by their owner; changing helper APIs cannot rewrite them.
Rollback keeps old readers until new-format writes are disabled or compatibility readers
are deployed. See [Data](Data.md), [Memory](../subsystems/Memory.md),
[Storage](../subsystems/Storage.md), [IO](../subsystems/IO.md),
[VALIDATION](../VALIDATION.md), [DEPENDENCIES](../DEPENDENCIES.md),
[DELIVERY](../DELIVERY.md) and [requirements](../REQUIREMENTS.md).
+167
View File
@@ -0,0 +1,167 @@
# Configuration schemas and transactional reload plan
Status: PLANNED feature work. Baseline: `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`,
inspected 2026-11-24. Requirements R-002, R-004, R-009 and R-014 apply. Shared
[architecture](../ARCHITECTURE.md) C-02–C-05, C-07 and C-13 governs this plan.
## Existing source and behavioral boundary
[Config.hpp](../../../include/Void/Configuration/Config.hpp) implements
`Void::Configuration::Config`: string-valued dotted keys, environment allowlists and
prefixes, KEY=VALUE/INI/JSON/argument sources, last-writer overlay, sorted keys, subtrees,
typed conversion and duration/byte-size handling. Returned string_views borrow the
Config's storage. [Bind.hpp](../../../include/Void/Configuration/Bind.hpp) binds
reflection aggregates, nested objects, optionals/vectors, defaults, `Key` and `Required`
annotations. [Argparse.hpp](../../../include/Void/Configuration/Argparse.hpp) uses the
separate `Void::Argparse` namespace, with parser and reflection-generated options;
[Argparse.cpp](../../../src/Configuration/Argparse.cpp) implements parsing.
[Env.hpp](../../../include/Void/Configuration/Env.hpp) wraps getenv; this plan does
not inspect any environment values.
[Watch.hpp](../../../include/Void/Configuration/Watch.hpp) provides `ConfigWatch`.
Parse/load failure preserves the last configuration, deletion preserves it, and a
successful load replaces `m_current` before calling `on_reload` outside its mutex.
There is no validation/prepare vote before that publication. Initial load failure
leaves an empty configuration without a fallible factory result. A callback rejecting
the new config cannot roll publication back transactionally today.
[Source tests](../../../tests/standalone/Configuration/Sources.cpp),
[typed tests](../../../tests/standalone/Configuration/Typed.cpp),
[binding tests](../../../tests/standalone/Configuration/BindAnnotations.cpp), and
[watch tests](../../../tests/standalone/Configuration/Watch.cpp) establish existing
fixtures. [module.cmake](../../../src/Configuration/module.cmake) declares Functional,
System, Data and Time. Graph coverage is partial at declarations in Config, Bind,
Argparse, Env and Watch; all reported ranges were read directly. Reflection behavior
must be verified with the actual selected compiler, not inferred from graph parsing.
## NEW schema and immutable snapshot API
Design sketch, with Result shorthand from Functional and the sole shared options from
[Async](Async.md); these names and methods do not yet exist:
```cpp
namespace Void::Configuration {
struct SourceLocation { SourceId source; std::string key; std::uint32_t line; };
template<class T> struct Snapshot {
std::uint64_t generation;
std::shared_ptr<const T> values;
std::shared_ptr<const Provenance> provenance;
};
template<class T> Result<Validated<T>> validate(const Config&, const Schema<T>&);
template<class T> class ReloadController {
public:
Snapshot<T> current() const;
Coro::Task<Result<ReloadReport>> reload(SourceSet, Async::OperationOptions);
};
}
```
Schema<T> is Configuration-owned and reuses Data's schema/value machinery. Reflection
generates field metadata; explicit schema definitions support cross-field constraints,
secret flags, restart-required keys, ranges, deprecations and strict unknown-key policy.
Default unknown keys are errors in typed managed configuration; legacy Config retains
its permissive string map. Validate a separate default-constructed candidate, collect
at most 100 diagnostics, and publish only a complete value. Conversion errors retain
source/key/line and machine category; secret values never appear in diagnostics.
Default precedence is schema defaults < declared files in order < explicitly selected
environment variables < explicit CLI options. Each key retains winning origin and
shadowed-origin identifiers without retaining redundant secret values. Missing, empty,
null, malformed and removed keys are distinct. Dotted-key escaping/collision rules are
specified before adding richer structured values: default reject an ambiguous literal
dot versus nested JSON path collision. No fallback from malformed supplied values to
defaults. Vectors require contiguous indexes; gaps are validation errors in NEW binding.
## Transaction protocol
Reload is serialized per controller and follows read → bounded parse → merge → typed
bind → validate → prepare → publish → notify. The transaction has one immutable aggregate
generation containing validated settings and prepared per-component resource views.
Consumers acquire that aggregate once per operation, so a request cannot mix generations.
A NEW prepare-only port can export the retained candidate view to a platform coordinator.
For that mode, the platform's single Service/host generation publisher owns commit;
the standalone ReloadController must not independently publish the same resource set.
1. Snapshot source bytes and a monotonically increasing source revision. Watch events
coalesce; changed content during reading schedules a fresh candidate. Metadata
debounce is only a hint. Resolve declared sources, never crawl arbitrary paths or
enumerate the entire environment by default.
2. Run pure validators and restart-required checks without registry/publication locks.
Rejected fields preserve the active snapshot. A restart-required delta reports a
pending restart; it does not partly apply the remaining fields by default.
3. Each registered participant prepares candidate-owned resources without externally
visible mutation. `prepare(old, candidate, options)` returns a NEW PreparedChange
whose retained immutable view is inserted into the aggregate. Prepare may fail or
be cancelled; disposal closes/joins its candidate work. Unregister/close joins
participant callbacks before freeing captures.
4. Once every prepare succeeds, check source revision, stop/deadline and the active
generation under the short publication guard. Publish one retained aggregate pointer.
The pointer swap is the commit point. No fallible user code, allocation, resource
creation or callbacks are allowed in commit. An operation that needs independent
mutable side-effect commits is not a transactional participant and must be redesigned
or marked restart-required.
5. Post-commit notifications are bounded observations outside locks. Callback failure
reports a committed generation plus notification error; it does not claim rollback.
Old resources remain pinned by old snapshots until their operations drain. A stop
racing after commit returns committed-with-stop-observed, not a false rejection.
Rollback before commit disposes the candidate in reverse preparation order and leaves
the exact old generation active. Reverting after commit is another validated transaction;
it may fail and receives its own generation. Persistent config file changes are a separate
System durable-replacement operation, not an implied distributed transaction.
## Resource limits and backend choice
Native parsing/binding over current Data and standard containers remains the initial
implementation; no external configuration framework. General JSON follows Data, while
signed release documents remain StrictJson/Update-owned and unchanged (C-07).
Default: 1 MiB/source, 8 sources, 4 MiB merged decoded values, 10,000 keys, 4 KiB key,
64 KiB scalar, nesting depth 32, 1,024 vector items, 64 participants and one prepared
candidate. All source, merged, provenance and diagnostic buffers count toward the limit.
Environment capture uses an allowlist or explicitly requested prefix and the same caps.
Keep at most four retained controller generations by default. If consumers still pin
four, reject a fifth reload with `retention_limit`; never invalidate a live snapshot.
Each participant declares a preparation resource budget; the controller cannot infer
memory held by arbitrary callbacks. Default prepare deadline is 5 seconds using Time's
injected monotonic clock; owned work still must drain before disposal can complete.
Notification queue: 128 generation events with explicit coalesced-generation reporting.
No global Runtime is created; synchronous validation is usable without workers and
the async reload adapter uses injected Async/System resources.
## Ordered implementation backlog
All rows are PLANNED.
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
| --- | --- | --- | --- |
| M-CONFIGURATION-01 | P0 / baseline | Characterize source precedence, borrowing, initial watch failure, vector gaps and key collisions | Regression fixtures separate permissive legacy behavior from strict NEW behavior / sol_implementer |
| M-CONFIGURATION-02 | P1 / M-CONFIGURATION-01; Data schema/error gates | Schema metadata, provenance, bounded parsing and all-or-nothing typed binding | Overflow/unknown/range/cross-field failures contain redacted origins and leave input untouched / sol_implementer |
| M-CONFIGURATION-03 | P2 / M-CONFIGURATION-02; Async scope gate | Immutable snapshots, serialized prepare/publish protocol and fallible controller factory | Any prepare failure preserves generation; one pointer swap publishes coherent resources / astra_implementer |
| M-CONFIGURATION-04 | P2 / M-CONFIGURATION-03; System joined watcher gate | Coalescing watch adapter, source-revision validation, joined participants | Rapid edit/delete/recreate and slow validator never publish stale or partial candidate / sol_implementer |
| M-CONFIGURATION-05 | P3 / M-CONFIGURATION-04 | Runtime/Service integration, retained-resource accounting, migration examples | Old operation sees old settings throughout; new acquisition sees new generation; leaked pins reject reload / astra_implementer |
## Validation, performance and migration
CURRENT tests run through the aggregate command
`ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60`;
not rerun for this documentation change. PROPOSED tests require the NEW controller:
participant 2 fails after participant 1 allocates; cancellation immediately before/after
swap; concurrent reload ordering; reader pin across replacement; notification throw;
unknown key and nested name collision; secret-bearing parse error; byte/key/depth caps;
invalid initial config; rollback cleanup that needs asynchronous join. Validate compiled
reflection examples and installed isolated Configuration consumers at implementation time.
Measure reload p50/p95/p99, reader acquisition cost, parse/validation throughput,
allocations, retained-generation RSS/CPU and compile cost under
[PERFORMANCE](../PERFORMANCE.md). No benchmark results are asserted.
EXISTING `ConfigWatch::json(path, callback)` migrates to a NEW fallible controller
factory with schema, participants and explicit executor; callback-only users get a
notification adapter, not a veto callback after publication. Retain Config's borrowing
and overlay API until a major-release transition; snapshot examples keep the owning
Snapshot alive while reading fields. Failures in legacy initial load become explicit
errors in the NEW factory. Rollback keeps the previous controller active until the
replacement controller validates and starts. See [MIGRATION](../MIGRATION.md),
[VALIDATION](../VALIDATION.md), [Runtime](../subsystems/Runtime.md),
[Service](Service.md) and [DELIVERY](../DELIVERY.md).
+155
View File
@@ -0,0 +1,155 @@
# Containers completion plan
Status: planning only; every feature task is **PLANNED**. Baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Existing structures and gaps
[The module](../../../src/Containers/module.cmake) declares no dependencies. It already
contains [fixed bitsets](../../../include/Void/Containers/Bitset.hpp),
[intervals](../../../include/Void/Containers/Interval.hpp),
[disjoint sets](../../../include/Void/Containers/DisjointSet.hpp),
[a directed graph](../../../include/Void/Containers/Graph.hpp),
[a trie](../../../include/Void/Containers/Trie.hpp),
[an indexed priority queue](../../../include/Void/Containers/PriorityQueue.hpp),
[LRU](../../../include/Void/Containers/LRU.hpp),
[TTL/policy cache](../../../include/Void/Containers/Cache.hpp),
[object pools](../../../include/Void/Containers/Pool.hpp),
[buffer recycling](../../../include/Void/Containers/BufferPool.hpp),
[rings](../../../include/Void/Containers/Ring.hpp), and
[debug rendering](../../../include/Void/Containers/Debug.hpp).
Namespaces follow header families (`Void::Ring`, `Void::Cache`, etc.); a unified
`Void::Containers` naming migration must not pretend they already share one namespace.
`SpscRing<T,N>` exposes N−1 usable entries. `MpscRing` reserves a head position before
construction and spins waiting for readiness. That is not a general wait-free guarantee:
a stalled producer can stall the consumer, and throwing construction needs a defined
reservation-repair contract. Buffer leases store a raw pool pointer; moving/destroying
the pool with outstanding leases needs a stronger lifetime rule. Cache already accepts
an injected steady-clock callable and supports LRU/LFU/FIFO with lazy TTL expiry.
ObjectPool and FixedPool return deleters tied to their pool owner. These are implementation
constraints to repair, not proof of production readiness.
[Existing standalone suites](../../../tests/standalone/Containers) cover each header;
[ring](../../../tests/standalone/Containers/Ring.cpp),
[pool](../../../tests/standalone/Containers/Pool.cpp),
[buffer-pool](../../../tests/standalone/Containers/BufferPool.cpp), and
[cache](../../../tests/standalone/Containers/Cache.cpp) are regression starting points.
Graph coverage marked PriorityQueue line 23 partial; the constructor was read directly.
## Target ownership and backend choice
Under [C-01/C-04/C-05](../ARCHITECTURE.md), [Memory](../subsystems/Memory.md) owns raw
allocation resources; Containers owns typed lifetime, handles and data structures.
[Algorithms](../subsystems/Algorithms.md) owns reusable graph/range algorithms and
imports no Containers. Containers graph convenience members may delegate downward.
Standard vector/map/unordered_map/list/heap algorithms remain implementation building
blocks. Do not build a general hash-table or tree replacement without a named workload
and benchmark gate. Native specializations address bounded admission, stable identities
and inline storage that current module users actually need.
## NEW types and selected algorithms
Illustrative NEW API in NEW `include/Void/Containers/StaticVector.hpp` and
NEW `include/Void/Containers/SlotMap.hpp`:
```cpp
namespace Void::Containers {
enum class InsertError { full, allocation_failed, generation_exhausted };
template<class T, std::size_t N> class StaticVector {
public:
template<class... A> std::expected<std::reference_wrapper<T>, InsertError>
try_emplace_back(A&&...);
std::span<T> values() noexcept;
};
struct SlotHandle { std::uint32_t slot; std::uint32_t generation; };
template<class T> class SlotMap {
public:
template<class... A> std::expected<SlotHandle, InsertError> emplace(A&&...);
T* get(SlotHandle) noexcept;
bool erase(SlotHandle);
};
}
```
StaticVector uses aligned uninitialized inline storage and constructs exactly `size()`
objects. Capacity exhaustion leaves it unchanged. Throwing constructors preserve prior
elements and propagate unless an explicit exception adapter is used. Moving an inline
container invalidates element pointers. This supports small request metadata and
dependency lists without forcing a heap allocation.
SlotMap starts with segmented slots (256 per block), a free-index list and generation
checks. It preserves addresses of other live elements on growth, useful for graph and
registry identities, but is not itself a service handle or ownership pin. Erase increments
generation; retire a slot permanently on generation exhaustion to prevent ABA reuse.
Default maximum: 65,536 live slots; include retired slots and block metadata in the byte
budget. No pointer remains valid after its object's erase or container destruction.
SmallVector is a later NEW inline-then-heap specialization (default inline capacity 8)
only after StaticVector and allocator exception safety pass. Growth defaults to at most
4,096 elements; allow an explicit larger bound. Contiguous relocation invalidates
references. Compare with `std::vector` plus reserve for request-header and configuration
workloads before making it an internal default.
Keep SPSC admission nonblocking and reject full. Require nonthrowing transfer types for
the NEW concurrent ring APIs and explicitly quiesced destruction. Replace the MPSC spin
path with per-slot sequence publication and a `try_pop` that returns empty/pending/closed
without waiting for a reserved but unpublished slot. Ordered consumption may return
pending behind a stalled producer; no unconditional lock-free progress claim is made.
Async owns waits, wakeups, cancellation and queue shutdown adapters. Rings own no threads.
Pool control blocks remain stationary; owning leases retain shared pool state through
their final return, while explicitly borrowed pools require lease-before-owner
destruction. Return paths allocate nothing and never throw; exhausted retention frees to
the upstream resource. Default buffer limits: 1 MiB/request, 16 MiB idle bytes and 64 MiB
total checked-out plus idle bytes. Size-class rounding is checked before allocation.
Object-pool admission defaults to 4,096 live objects with explicit constructor limits.
## Existing capability completion
Cache defaults stay explicit-capacity; the NEW convenience constructor selects 1,024
entries and a 16 MiB weight budget. Caller-supplied weight functions account for payloads;
no pretend exact RSS bound for arbitrary `T`. TTL uses Time's clock contract, with
zero-duration meaning immediate expiry. Eviction/expiry callbacks execute after mutation
and outside any adapter lock. LFU tie-breaking becomes deterministic by age and its
linear-scan cost is documented until workload evidence justifies a different structure.
Trie adds iterative traversal, prefix result limits (256 default), and a 4 KiB key limit.
Graph traversal takes explicit vertex/edge budgets (65,536/262,144 default). Priority
updates preserve heap/index consistency if key copying/allocation fails; comparison must
be stable and nonthrowing for its bounded fast path. Interval endpoints remain half-open;
closed-to-half-open conversion checks maximum-endpoint overflow. Bitset zero-size and
tail masking receive explicit tests. Debug formatting truncates at 256 entries/16 KiB.
## Ordered implementation tasks
| Task | Phase; dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-CONTAINERS-01 | P0; current source | Document capacity, invalidation, thread and exception guarantees for every current structure; preserve deterministic fixtures. | sol_implementer |
| M-CONTAINERS-02 | P1; Memory bounded-resource gate; M-CONTAINERS-01 | Repair object/buffer lease lifetime and byte accounting; owner destruction with retained leases is safe and recycle allocates zero. | astra_implementer |
| M-CONTAINERS-03 | P1; M-CONTAINERS-01 | Implement nonthrowing ring publication and nonspinning MPSC poll semantics; delayed producer, wraparound and quiesced destruction tests pass under sanitizers/TSAN. | astra_implementer |
| M-CONTAINERS-04 | P2; M-CONTAINERS-02 | Add StaticVector and SlotMap; capacity failure, over-alignment, constructor exceptions and stale handles leave invariants intact. | sol_implementer |
| M-CONTAINERS-05 | P2; M-CONTAINERS-01; Algorithms graph gate; Time clock gate | Complete bounded graph/trie/priority/interval/bitset/cache APIs; deterministic fake-clock eviction and failure injection match reference models. | sol_implementer |
| M-CONTAINERS-06 | P3; M-CONTAINERS-04; measured request-metadata profile | Add bounded SmallVector and compare reserved std::vector; publish allocation, relocation and compile-cost evidence before adoption. | sol_implementer |
| M-CONTAINERS-07 | P3; M-CONTAINERS-02–06 | Ship compatibility aliases, independent installed consumers and workload report; no unexplained dependency or progress-guarantee regression. | sol_implementer |
## Validation and transition
CURRENT checks are the inspected suites, not new executions. PROPOSED model/property
tests replay randomized operations against standard containers, force allocation and
construction failure at each insertion step, and verify destructor counts. TSAN plus
scheduled producer pauses exercise concurrency; TSAN alone cannot establish progress.
Bounded polling tests must terminate without a producer resuming. Retained pool leases,
moved containers, generation wrap and zero/maximum interval endpoints get dedicated cases.
Measure mixed cache traces, bursty ring occupancy, pool churn, prefix scans and 0–32-item
metadata under [PERFORMANCE](../PERFORMANCE.md): p50/p95/p99, throughput, live/idle bytes,
allocations, peak RSS/CPU and build cost. A lock-free label is not an acceptance metric.
The [validation](../VALIDATION.md), [dependency](../DEPENDENCIES.md) and
[delivery](../DELIVERY.md) gates precede integration into Runtime or Net.
[Migration](../MIGRATION.md) preserves old namespaces through deprecated aliases while
new bounded constructors and poll results require explicit caller changes. Move raw
allocation implementation to Memory behind old pool wrappers only after lifetime
contracts are tested; do not create Memory→Containers. Rollback uses the old major and
adapters without persistent state conversion. Never interchange in-memory SlotHandle
values with serialized IDs. [Requirements](../REQUIREMENTS.md) define package scope.
+141
View File
@@ -0,0 +1,141 @@
# Core completion plan
Status: planning only. All feature tasks below are **PLANNED**. Baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Existing capability and evidence
[Core's declaration](../../../src/Core/module.cmake) currently declares no internal
dependencies. Its public headers include [Bits](../../../include/Void/Core/Bits.hpp),
[Flags](../../../include/Void/Core/Flags.hpp), [Hash](../../../include/Void/Core/Hash.hpp),
[Scope](../../../include/Void/Core/Scope.hpp), [Lazy](../../../include/Void/Core/Lazy.hpp),
[Counted](../../../include/Void/Core/Counted.hpp),
[TypeList](../../../include/Void/Core/TypeList.hpp),
[TypeMap](../../../include/Void/Core/TypeMap.hpp),
[Variant](../../../include/Void/Core/Variant.hpp), and reflection
[Meta](../../../include/Void/Core/Meta.hpp). These are separate namespaces such as
`Void::Bits`, `Void::Meta`, and `Void::Scope`, not an existing `Void::Core` namespace.
Reflection is conditionally compiled; retaining C++26 reflection remains R-002.
[Uuid](../../../include/Void/Core/Uuid.hpp) stores sixteen bytes, parses compact or
hyphenated hex, generates v4 through `Void::Random`, and exposes `v5_lite` using
noncryptographic hashes. The Math include is a real undeclared dependency to remove.
`v5_lite` is not interoperable SHA-1 UUID v5 and must never be advertised as such.
Its temporary string allocation and several allocating `noexcept` APIs warrant an
exception-specification audit. Hash functions are utility hashes, not authentication.
[Core tests](../../../tests/standalone/Core) exercise all these header families;
[UUID tests](../../../tests/standalone/Core/Uuid.cpp),
[scope tests](../../../tests/standalone/Core/Scope.cpp), and
[reflection tests](../../../tests/standalone/Core/Meta.cpp) provide baseline fixtures.
These are inspected capabilities, not a fresh test-pass claim. Graph coverage reported
partial parsing at Meta line 280 and Variant line 17; those ranges were read directly.
## Ownership and target boundary
[Architecture C-01/C-02/C-13](../ARCHITECTURE.md) governs this layer. Core stays native
and standard-library-only: identity representation, bit operations, traits, lifetime
guards, and small vocabulary helpers. It never imports Math, Functional, Memory,
execution, logging, or crypto. Fallible Core primitives use
`std::expected<T, local_error_enum>`; Functional supplies optional error adapters above
Core. Allocator facilities belong to [Memory](../subsystems/Memory.md), checked general
numeric arithmetic to [Math](Math.md), and error categorization to [Functional](Functional.md).
Keep the default include cost small: bit and type-list users must not instantiate
reflection or diagnostic formatting. Split heavyweight formatting/reflection bridges
into explicitly included headers, preserving forwarding includes for one major migration.
Do not replace standard scope or type utilities merely to add another spelling.
## NEW API shapes and behavior
The following are illustrative NEW declarations, not compiling current examples.
Proposed paths are `include/Void/Core/Uuid.hpp` extensions and NEW
`include/Void/Core/CheckedBits.hpp`.
```cpp
namespace Void::Uuid {
enum class GenerateError { entropy_unavailable, invalid_source };
// Caller-supplied URBG; deterministic tests need no global generator.
template<std::uniform_random_bit_generator G> Uuid v4(G& generator);
std::expected<Uuid, GenerateError> try_v4();
// Fixed-size output excludes string allocation and null termination.
std::array<char, 36> format_chars(const Uuid&) noexcept;
}
namespace Void::Bits {
enum class BitError { invalid_range, invalid_alignment, overflow };
template<std::unsigned_integral T>
std::expected<T, BitError> checked_extract(T value, unsigned offset, unsigned count);
template<std::unsigned_integral T>
std::expected<T, BitError> checked_align_up(T value, T alignment);
}
```
`try_v4()` uses a standard entropy source locally, reports source failure, and makes
no cryptographic-strength guarantee. Security-sensitive identifiers obtain bytes from
Security/Crypto through the injected-generator overload; that adapter lives above Core.
Mask version and variant only after all bytes are acquired. No hidden worker or cached
process service is created. Keep `Uuid::Uuid` layout and string representation stable.
The legacy no-argument `v4()` becomes a documented throwing convenience in the major
release; remove its misleading unconditional `noexcept` rather than returning a nil ID
on failure. An explicit legacy adapter preserves old source names during transition.
Checked bit operations validate offset/count without overflowing their sum. Count zero
returns zero for extraction; a full-width mask never shifts by the width. Alignment must
be nonzero and a power of two; overflow returns failure before arithmetic. Existing fast
preconditioned helpers remain available with their preconditions stated.
Scope callbacks execute once, must not throw during destruction, and hold decayed owned
callables unless references are explicitly wrapped. Conditional move `noexcept` must
match the callable. `Lazy` stays single-threaded; `LazySync` uses `call_once` publication,
including synchronized observation of `evaluated()`. A failed factory remains retryable;
recursive access is documented as invalid and gets a debug diagnostic. Neither lazy
wrapper promises a cancellation or reset protocol across concurrent readers.
TypeMap gains reference lookup without copying `std::any` values; returned references
expire on replacement/erase/destruction. It remains a utility, not a service registry.
Counters document wraparound and prohibit use as durable identities; an opt-in checked
sequence reports exhaustion. Compile-time list operations get diagnostics for missing
types and bad indices, rather than accidental template-depth explosions.
## Backlog and ordered implementation
| Task | Phase; dependencies | Intended scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-CORE-01 | P0; current source | Inventory every public header, namespace, reflection branch, exception specification and direct include; isolated Core consumer exposes the Math leak and records the compatibility surface. | sol_implementer |
| M-CORE-02 | P1; M-CORE-01 | Implement injected UUID generation, allocation-free parse/format and fallible entropy path; preserve byte/string fixtures and remove all Core→Math includes. | sol_implementer |
| M-CORE-03 | P1; M-CORE-01 | Add checked bit/alignment helpers and portable hash byte loading; constexpr boundary tests cover zero/full widths, maximum values and endianness. | sol_implementer |
| M-CORE-04 | P2; M-CORE-01 | Repair guard move contracts and lazy observation; throwing/move-only factories and contended successful initialization execute/destruct exactly as specified. | astra_implementer |
| M-CORE-05 | P2; M-CORE-01 | Add TypeMap reference access, checked sequence exhaustion and useful list diagnostics; no service/runtime dependency and no implicit copy on reference lookup. | sol_implementer |
| M-CORE-06 | P2; M-CORE-02–05 | Publish compatibility headers and independent-header consumers; Core-only static/shared installed consumers and reflection-enabled/disabled configurations satisfy the package gate. | sol_implementer |
## Resource and performance gates
UUID parse/format and checked bits allocate zero bytes. `v5_lite` retains existing output
fixtures but gets an allocation-free incremental implementation only if byte-for-byte
compatibility is proved; no collision-resistance claim follows. TypeMap's NEW bounded
constructor defaults to 256 distinct types and rejects additional admissions; explicit
unbounded construction is separate. Lazy wrappers retain one result and one factory;
no histories, queues, shutdown work, or background timers exist.
Measure fixed-size UUID batches, type-list compiler cost at 16/64/256 types, Meta formatting
at shallow/deep aggregates, and contended first lazy access. Follow
[PERFORMANCE](../PERFORMANCE.md) for p50/p95/p99, throughput, allocations, RSS/CPU and
build cost. Report entropy acquisition separately from UUID masking/formatting.
## Validation, compatibility and rollback
CURRENT checks are the source suites linked above and the parent-recorded baseline;
this planning task ran no C++ checks. PROPOSED checks require M-CORE-06 consumers and
the supported C++26 toolchain: independent headers, ODR across two shared objects,
sanitizers for lifetime paths, TSAN for LazySync, and fixed hash/UUID fixtures. Include
malformed hyphens, uppercase hex, nil UUIDs, throwing entropy, bit width 0/width/width+1,
throwing guard moves and factories that fail once then succeed.
Migration follows [MIGRATION](../MIGRATION.md) and
[BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md). Keep `v5_lite` as a visibly legacy
nonstandard operation; never reinterpret persisted IDs as standards-compliant v5.
Rollback is an old-version package/header selection with the same persisted UUID bytes.
Do not publish the new major until downstream Core-only consumers and optional
Functional formatting bridges pass [VALIDATION](../VALIDATION.md). The
[requirements](../REQUIREMENTS.md), [dependencies](../DEPENDENCIES.md) and
[delivery plan](../DELIVERY.md) own cross-module scope and sequencing.
+126
View File
@@ -0,0 +1,126 @@
# Crypto implementation plan
Status: planning only; all tasks PLANNED. Source baseline
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Applies [requirements](../REQUIREMENTS.md) R-004, R-006, R-012, R-014–R-016 and
[architecture](../ARCHITECTURE.md) C-02, C-03, C-07, C-13.
## Existing primitive surface
[Crypto.hpp](../../../include/Void/Crypto/Crypto.hpp) declares `Void::Crypto::Hasher`,
`Digest`, SHA-1/256/512 helpers, file hashing and `verifyEd25519` with fixed 32-byte public
keys and 64-byte signatures. [Crypto.cpp](../../../src/Crypto/Crypto.cpp) uses OpenSSL EVP
contexts with RAII. Incremental hashers are move-only; use after move/finalize is an
error. File hashing streams a 64 KiB buffer. Ed25519 verification uses exact message
bytes: malformed sizes are errors, well-formed invalid signatures return false.
[module.cmake](../../../src/Crypto/module.cmake) declares Functional and OpenSSL::Crypto.
[Tests](../../../tests/standalone/Crypto/Crypto.cpp) cover known SHA vectors, streamed/file
equivalence, rejected update after finalize and an RFC 8032 Ed25519 vector with modified
message rejection. They do not establish provider-failure handling, signing, key management,
asynchronous file cancellation or broad malformed-key coverage. Graph metadata matched
all four linked source paths with no recorded issue; source was also read directly.
## Responsibility and backend decision
Retain OpenSSL as the initial implementation of hashes and signatures. Native preference
means Void-owned lifetime/error/stream interfaces and no public EVP types; it does not
authorize original cryptographic algorithms. TLS certificate and connection policy belong
to [Net](Net.md), authentication/session/authorization workflows to [Security](Security.md),
signed document selection and exact-byte verification sequencing to [Update](Update.md).
Crypto must not depend on those consumers, Storage, or Runtime.
Keep existing verification formats intact. NEW HMAC-SHA-256 and HKDF-SHA-256 are staged
primitive additions through EVP, with separate known-answer and misuse tests; new signing
is Ed25519 through an owning private-key handle. SHA-1 stays available only for explicit
legacy interoperability; new security protocols select SHA-256 or stronger. No silent
fallback if an algorithm/provider is unavailable. Provider configuration is injected per
context; do not mutate process-wide OpenSSL state from a library constructor.
## NEW API shapes, algorithms and ownership
```cpp
// NEW illustrative Void::Crypto shapes; Result is C-02 shorthand.
class PrivateKey; // move-only opaque backend state, explicit import/generate
struct Ed25519PublicKey { std::array<std::byte, 32> bytes; };
struct Ed25519Signature { std::array<std::byte, 64> bytes; };
Result<Ed25519Signature> sign_ed25519(ByteSpan exact_message, const PrivateKey&);
Result<Digest> hmac_sha256(ByteSpan secret_key, ByteSpan message);
Result<void> hkdf_sha256(ByteSpan secret_input, ByteSpan salt,
ByteSpan context, MutableByteSpan secret_output);
// Optional IO adapter, not a new executor or OperationOptions definition:
Task<Result<Digest>> hash_stream(HashAlgorithm, IOByteReader&, OperationOptions);
```
Byte-span and reader names above denote proposed owner-provided shapes, not existing aliases.
[Memory](../subsystems/Memory.md) owns resource integration. Callers may supply Security's
secure buffer through spans; Crypto does not import the authentication module or allocate
a general-purpose secret result type. HKDF fills the caller-owned destination, wipes it
on failure and rejects overlapping input/output. Primitive APIs borrow inputs until
the synchronous call returns; async adapters retain owned buffers through IO completion.
PrivateKey has no implicit copy/export/string conversion. Import uses an explicitly
named encoding and validates algorithm/size; public export and secret export are separate
capabilities. Secret export requires explicit caller intent and a secure owning result.
Hasher state is Ready → Updating → Finalized or Failed. Backend update/finalize failure
poisons the context until destroyed; retrying a partially effective update is invalid.
Hash-stream reads at most 64 KiB, updates, checks stop/deadline between chunks, finalizes
only at clean EOF and never treats a short failed read as success. Descriptor close or
concurrent path replacement has the IO-defined result; hashing a path does not promise
a snapshot of a concurrently modified file. Update's downloader must pin its own artifact.
Signature operations do not prehash/reencode Ed25519 messages implicitly. Binary/text
decoding is outside verification; [Data](Data.md)'s StrictJson rules and exact signed
payload bytes remain unchanged under C-07. A successful primitive verification is not
authorization, freshness, trust-root selection or replay protection.
NEW defaults: stream chunk 64 KiB, optional file adapter 8 concurrent operations and
32 waiting, 8 MiB adapter buffer budget; oversized input is processed incrementally
where the algorithm supports it. One-shot signing/verification initially limits messages
to 16 MiB and directs larger formats to an explicitly specified signed-manifest design.
The NEW HKDF API caps output at 4 KiB and also enforces the backend primitive's limit;
invalid sizes fail before mutation. Error context contains operation/provider codes, never keys,
passwords or plaintext. Output buffers are wiped on failed secret-producing operations.
## Failure matrix and evidence
| Fault | Required behavior | Acceptance scenario |
| --- | --- | --- |
| Bad key/signature size | Typed invalid input, no backend use | Every length near expected boundary |
| Wrong message/key/signature | Successful false verification | Altered bytes and independent vectors |
| Algorithm unavailable / provider error | Unsupported/backend error; no downgrade | Inject provider failures per operation |
| Hash context fails midway | Failed terminal state, cannot reuse | Update/finalize/move sequences |
| File read error / cancellation | No digest success; one terminal result | Partial read then error, stop at EOF race |
| Allocation/admission failure | Resource error before secret output publication | Budget exhaustion with no retained secret |
| Async shutdown | Stop admission, stop/join readers, destroy contexts last | Caller buffers cannot escape completion |
## Task DAG
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-CRYPTO-01 | P0; baseline | Preserve existing vectors and exact-byte false-vs-error behavior; record consumers before API migration | sol_implementer |
| M-CRYPTO-02 | P1; M-CRYPTO-01, Functional/Memory contracts | Typed size wrappers, poisoned-state/error handling and provider isolation; malformed/state tests pass | astra_implementer |
| M-CRYPTO-03 | P2; M-CRYPTO-02 | Owning Ed25519 private key/signing, HMAC/HKDF with caller-owned output; independent known-answer vectors and no secret diagnostics | astra_implementer |
| M-CRYPTO-04 | P2; M-CRYPTO-02, IO/Async gates | Optional hash-stream/file adapter, bounded cancellation and workload accounting; no mandatory runtime dependency | sol_implementer |
| M-CRYPTO-05 | P3; M-CRYPTO-03, M-CRYPTO-04 | Signed-update integration fixtures, component consumers and resource profiles; exact signed bytes unchanged | astra_implementer |
| M-CRYPTO-06 | P4; M-CRYPTO-05, distributed consumers | Snapshot/transport integrity recipes distinguish checksums, authenticated channels and trusted signatures | sol_implementer |
## Verification and migration
CURRENT checks are the linked Crypto tests in VoidTests; no build/test was rerun for
this documentation task. PROPOSED tests add backend fault injection, independent vector
corpora, secret lifetime tests, file mutation/short-read cases, fuzzed imports and sanitizer
coverage. Backend-version testing follows [BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md);
the OpenSSL 3.5 [client guide](https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/)
informs Net TLS policy, not a claim about the currently linked version or FIPS certification.
Measure small-message setup separately from large streaming throughput, with p50/p95/p99,
allocations, RSS/CPU and build cost under [PERFORMANCE](../PERFORMANCE.md). No native
replacement is justified by speculative speedups. [VALIDATION](../VALIDATION.md) defines
future runner prerequisites; do not invent a presently available signing target.
Major-release evolution adds typed overloads and consistent naming with adapters for
existing camelCase entry points. Preserve SHA digest bytes, file semantics and Ed25519
verification outcome distinction. Never reinterpret old signatures with a new framing
scheme. Rollback retains readable key/algorithm formats and the previous backend adapter;
unsupported new algorithms fail explicitly. See [MIGRATION](../MIGRATION.md).
+183
View File
@@ -0,0 +1,183 @@
# Data values, parsing and schema evolution
Status: planning only; feature tasks are **PLANNED**. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Existing source and protected profile
[Data](../../../src/Data/module.cmake) declares Time; its reflection/CSV headers also
include Core. [Json](../../../include/Void/Data/Json.hpp) implements `Void::Json::Value`
with null/bool/double/string and boxed vectors for arrays/ordered object pairs. Integer
constructors convert to double; `as_int()` casts from it. General parsing returns
`std::expected<Value, ParseError>` with line/column diagnostics, retains duplicate object
pairs, provides JSON pointer access, SAX callbacks and serialization. SAX numeric
callbacks currently receive double. Exact 64-bit integers require a representation
change, not just a new accessor.
[Reflect](../../../include/Void/Data/Reflect.hpp) serializes C++26-reflected values,
annotations, containers, variants and chrono values, and has `MigrationChain` plus
versioned envelopes. [Csv](../../../include/Void/Data/Csv.hpp) exposes allocating Row/
Table parsing and reflection conversion; current parse returns a Table without malformed-
quote diagnostics. [Ini](../../../include/Void/Data/Ini.hpp) handles sections, values,
mutation and serialization. Neither is a full configuration policy engine.
[StrictJson](../../../include/Void/Data/StrictJson.hpp) is a separate namespace/type:
`Void::Json::Strict::Value` uses signed int64, ordered maps and restricted parsing.
[StrictJson tests](../../../tests/standalone/Data/StrictJson.cpp) require exact signed
64-bit endpoints and reject duplicates, floats, excessive nesting and lone surrogates.
**C-07 prohibits broadening this profile through general Data improvements.** Existing
[Update envelope parsing](../../../src/Update/Feed.cpp) uses general Json, not StrictJson;
schema 3 parses payload bytes for readable-document comparison before verifying their
signature. [Update](Update.md) explicitly plans moving that comparison after verification
and preserving a versioned legacy parsing profile. Verification before payload parsing is
the target contract; no general serializer becomes a replacement signing input. Existing
signed documents remain compatibility fixtures.
[General JSON](../../../tests/standalone/Data/Json.cpp),
[query/SAX](../../../tests/standalone/Data/JsonQuery.cpp),
[accessors](../../../tests/standalone/Data/JsonAccessors.cpp),
[reflection](../../../tests/standalone/Data/Reflect.cpp),
[annotations](../../../tests/standalone/Data/ReflectAnnotations.cpp),
[chrono](../../../tests/standalone/Data/ReflectChrono.cpp),
[CSV](../../../tests/standalone/Data/Csv.cpp),
[CSV reflection](../../../tests/standalone/Data/CsvReflect.cpp), and
[INI](../../../tests/standalone/Data/Ini.cpp) are current test sources. Partial graph
ranges Json 243/1090 and Reflect 595 were read directly. The graph's reflection call
edges include heuristic matches; source, not those edges, establishes type behavior.
## Target ownership and backend rationale
Keep the native DOM/scanners/reflection implementation. Data owns structured values,
general parsing policies, schema envelopes and migration; [Binary](Binary.md) owns
encoding primitives. [Math](Math.md) owns checked numeric conversions; Data may depend
downward on its small Numeric header. [Unicode](../subsystems/Unicode.md) is an explicit
validation/normalization adapter, never a hidden signed-data transform. Functional owns
common classifications and adapters for Data's path-aware domain errors. No optional
third-party JSON engine becomes a foundation requirement. Dependencies are declared and
independently tested, including Core and Time, under [C-01/C-07](../ARCHITECTURE.md).
## NEW value representation and checked conversion
Illustrative NEW members on `Void::Json::Value`, not current compiling API:
```cpp
namespace Void::Json {
enum class NumberKind { signed_integer, unsigned_integer, real };
// Value backing alternatives add int64_t and uint64_t alongside double.
// NumberKind Value::number_kind() const;
template<class T> std::expected<T, ConversionError> number_as(const Value&);
enum class DuplicateKeys { reject, first_wins, last_wins, preserve };
struct ParseOptions {
DuplicateKeys duplicate_keys = DuplicateKeys::reject;
std::size_t max_input_bytes = 16 * 1024 * 1024;
std::size_t max_owned_bytes = 64 * 1024 * 1024;
std::size_t max_string_bytes = 1024 * 1024;
std::size_t max_nodes = 1000000;
unsigned max_depth = 64;
};
std::expected<Value, ParseError> parse(std::string_view, ParseOptions);
}
```
Signed integer tokens in range become int64; nonnegative integers above INT64_MAX but
within UINT64_MAX become uint64. Integers outside both ranges fail rather than round
through double. Decimal/exponent tokens become finite double, with conversion range
errors reported. Arbitrary-precision decimals are outside the first value milestone;
a later named decimal capability requires a separate representation/schema decision.
Numeric lexemes are limited to 256 bytes. General parsing validates full grammar,
UTF-8 and escaped scalar pairs, and rejects trailing junk. Integer `-0` becomes integer
zero; floating negative zero retains sign and serializes as `-0.0`. Lexical preservation
is a separate borrowed raw-document facility, not a promise of the DOM.
`number_as<T>` delegates exact/range logic to Numeric and adds the document path.
Default integer-to-double conversion rejects inexactness; named lossy conversion is
explicit. Equality compares integral alternatives exactly with signedness checks;
integer/real equality is true only when the real is finite, integral and exactly matches
the integer. It never first converts UINT64_MAX to double. Typed wrong-kind access
reports an error; legacy throwing accessors remain adapters during the major migration.
Objects retain insertion order in vector pairs. Duplicate detection uses a temporary
key index charged to the owned-byte/node budget. Default reject avoids ambiguous lookup;
preserve exposes a multi-member API and requires an explicit occurrence policy for
lookup/pointer traversal. first/last-wins are deterministic named compatibility profiles.
Keys compare decoded bytes; normalization/case folding is never implicit. Programmatic
construction and serialization enforce the same duplicate/finite-number rules selected
for output. Stable pretty output is not a security canonicalization standard.
## Streaming, tables and ownership
Unify DOM and SAX grammar scanning with typed numeric events (`int64`, `uint64`, `double`).
NEW incremental parser owns incomplete tokens, uses at most the configured 1 MiB token
buffer, and reports consumed/need-more/completed/error states. Callback string views
expire at callback return; an explicit owned-event mode copies within budget. Callbacks
may stop parsing with an error/stop result. Check a supplied stop token between tokens
and every 4 KiB inside long strings; no Async dependency or worker is introduced.
Earlier SAX events remain observed after failure; a DOM result publishes only on full
success. Input plus owned output, key indexes, parser stack and migration scratch all
count toward explicit resource accounting; allocator overhead is reported separately.
CSV gets an incremental quoted-field state machine with exact malformed-quote offsets,
CRLF/LF policy, delimiter selection and defaults of 65,536 rows, 1,024 columns and 1 MiB
per field within 16 MiB input/64 MiB owned bytes. Empty final rows and embedded line breaks
have explicit fixtures. Row conversion reports column/name/type errors, not a blanket
nullopt. INI gets deterministic serialization, duplicate section/key policies (reject
by default in NEW strict mode), escaped-value rules, and the same byte bounds with
65,536 keys. Configuration owns overlays, environment expansion and secret policy.
Reflection decoding selects strict unknown-field rejection or an explicit ignore mode,
honors required/default/rename annotations and uses exact numeric conversions. Depth and
owned-byte budgets cover reflected containers too. MigrationChain validates a contiguous
version path before applying it; run each step on owned candidate data, cap at 32 steps,
and publish only after final validation. Migration failure never partially mutates the
caller's original value. No claim of database transactionality follows from this local
strong exception guarantee.
## NEW native binary value codec
Select **VoidValueBinary V1** in NEW `include/Void/Data/ValueBinary.hpp`, with no claimed
CBOR/MessagePack compatibility. Envelope: four literal bytes `VVB1`, one flags byte
(must be zero), then one value. Tags: 0 null, 1 false, 2 true, 3 ZigZag int64, 4 uvarint
uint64, 5 little-endian IEEE binary64, 6 length-prefixed UTF-8 string, 7 array count plus
values, 8 object pair count plus string keys/values. Varints are minimal. Reject nonfinite
floats, unknown tags/flags, duplicate keys in strict mode and trailing bytes. Preserve
array/object order; canonical signing is not part of V1. Defaults reuse Data budgets;
validate counts before reserve. Schema transport adds a Data-owned type ID and version
inside an explicit envelope value; RPC/Storage independently own their framing/durability.
## Ordered backlog
| Task | Phase; dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-DATA-01 | P0; current source | Freeze general/StrictJson behavior and signed fixture boundaries; map Data includes and every numeric consumer before a representation break. | astra_implementer |
| M-DATA-02 | P1; M-MATH-02; M-DATA-01 | Add exact signed/unsigned representation and checked access/equality; endpoints and 2^53±1 survive parse/serialize/reflection without silent rounding. | astra_implementer |
| M-DATA-03 | P2; M-DATA-02; Functional/Memory bounded-error/resource gates | Implement explicit general JSON limits/duplicate policies and transactional DOM publication; adversarial inputs cannot bypass aggregate budgets. | sol_implementer |
| M-DATA-04 | P2; M-DATA-03 | Share scanner with typed SAX/incremental modes; all chunk splits match DOM grammar and callbacks never retain temporary views. | sol_implementer |
| M-DATA-05 | P2; M-DATA-02–03 | Complete reflection strictness, annotation diagnostics and bounded migration; failed version step preserves input and missing paths fail before execution. | sol_implementer |
| M-DATA-06 | P2; M-DATA-03 | Complete CSV/INI streaming/errors/deterministic output and typed rows; quote, duplicate, field-limit and rollback fixtures pass. | sol_implementer |
| M-DATA-07 | P3; M-BINARY-04; M-DATA-03/05 | Implement VVB1 with golden byte fixtures and versioned value envelope; unknown formats reject and resource limits match JSON. | sol_implementer |
| M-DATA-08 | P3; M-DATA-04–07; protected Update/Security fixture gate | Publish migration and installed consumers; signed documents retain their exact acceptance profile and no signature uses reserialized bytes. | astra_implementer |
## Validation, migration and rollback
CURRENT evidence is the inspected suites and parent baseline; no build/test/fuzz run was
performed for these documents. PROPOSED tests cover INT64_MIN/MAX, UINT64_MAX, oversized
integers, inexact casts, malformed exponents/UTF-8/surrogates, every duplicate mode,
deep/wide trees, escaped pointer keys, callback stop, chunk splits, allocation failure,
CSV quote state and interrupted migration. Keep a separate protected StrictJson fixture
set: general uint64/float/duplicate policies must not alter it. Cross-check VVB1 against
handwritten golden bytes, not only its own round trips.
Workload profiles include small config DOMs, 16 MiB tables, deep rejection, integer-heavy
messages and streaming scans. Measure p50/p95/p99, throughput, allocation count/bytes,
peak RSS/CPU and reflection build cost through [PERFORMANCE](../PERFORMANCE.md).
No throughput improvement or compiler support is claimed without that evidence.
[Migration](../MIGRATION.md) groups Value layout, number kind, default duplicate policy,
typed SAX events and reflection strictness into the major release. Preserve old general
parser behavior only in a named legacy adapter; StrictJson stays separate and unchanged.
Deploy VVB1 readers before enabling writers, retain old-format fixtures/readers and never
rewrite signed payloads in place. Rollback disables new-format writes; applications must
retain a readable prior-format copy before persisted migration. See
[VALIDATION](../VALIDATION.md), [DEPENDENCIES](../DEPENDENCIES.md),
[DELIVERY](../DELIVERY.md), [requirements](../REQUIREMENTS.md),
[Update](Update.md) and [Security](Security.md) for integration gates.
+168
View File
@@ -0,0 +1,168 @@
# Fsm structured workflows and checkpoint plan
Status: PLANNED feature work. Source baseline: `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`,
inspected 2026-11-24. Requirements R-002, R-009, R-010, R-014 and R-015 apply.
Follow [architecture](../ARCHITECTURE.md) C-03–C-05, C-09, C-10 and C-13.
## Existing source baseline
[Machine.hpp](../../../include/Void/Fsm/Machine.hpp) implements
`Void::Fsm::Machine<R>`, signature/reflection-driven states, entry/exit hooks, typed
outcomes, event waits, hierarchy/history, submachines, parallel regions, race-any,
pause/restart/jump and JSON serialization. `serialize()` records a named state plus
application `on_serialize` data; `restore` requires Idle and invokes `on_restore`.
It does not save suspended coroutine stacks. `run_parallel_any` explicitly leaves
losers running; a permanently parked loser can retain a frame until stop.
[StateKey.hpp](../../../include/Void/Fsm/StateKey.hpp) defines `StateKey`, `FsmError`,
`LaunchResult` and statuses Idle/Running/Succeeded/Failed/Faulted. Machine::finished
includes Faulted, but [Orchestrator.hpp](../../../include/Void/Fsm/Orchestrator.hpp)
FsmHandle::finished currently checks only Succeeded/Failed. Despite its non-owning
comment, FsmHandle stores a shared_ptr to its model; migration must clarify ownership
from the source rather than repeat the comment.
[Engine.hpp](../../../include/Void/Fsm/Detail/Engine.hpp) and
[Engine.cpp](../../../src/Fsm/Engine.cpp) contain a shared executor/event mailbox/timer
substrate, optional owning worker and embedder pumping. Nested machines share that
substrate. [module.cmake](../../../src/Fsm/module.cmake) declares Async, Data,
Functional, Log and Service. NEW execution continues to depend on Async and optional
Service access, never on managed Runtime or Scheduler.
Existing fixtures include [basic pumping](../../../tests/standalone/Fsm/Basic.cpp),
[events](../../../tests/standalone/Fsm/Events.cpp),
[parallel regions](../../../tests/standalone/Fsm/Parallel.cpp),
[policies](../../../tests/standalone/Fsm/Policies.cpp),
[hierarchy](../../../tests/standalone/Fsm/Hierarchy.cpp),
[history](../../../tests/standalone/Fsm/History.cpp), and
[serialization](../../../tests/standalone/Fsm/Serialize.cpp). These remain regression
inputs. Graph coverage was checked; Parallel/Direct constructor gaps were directly
read. Source inspection establishes the terminal-status and race-loser gaps.
## NEW execution and supervision contract
Design sketch; additions are not available APIs:
```cpp
namespace Void::Fsm {
struct Checkpoint {
std::uint32_t format_version;
std::string machine_type;
std::uint32_t application_schema;
std::uint64_t transition_sequence;
Json::Value state; // stable state IDs + app data
};
// Machine additions:
// run(execution_binding, Async::OperationOptions) -> Task<Result<Outcome>>;
// request_checkpoint(options) -> Task<Result<Checkpoint>>;
// restore_checkpoint(const Checkpoint&) -> Result<void>; // Idle only
// post(Event, options) -> Result<void>; // bounded admission
// terminal(Status) -> bool; // one shared predicate
}
```
Execution binding borrows Async executor/scope and Time clock contracts. Keep it
Fsm-specific binding data, not another cancellation/deadline context; all public
operations use `Async::OperationOptions`. Machine state runs on one logical strand.
Cross-thread posts enqueue owned event envelopes; only that strand mutates active
state, timers, waiters and transition history. Service lookups return owning handles
retained across await, per [Service](Service.md).
Machine has a root Async scope and each entered state has a child scope. Exit first
closes state-event admission, requests child stop, joins child work, removes waiters
and timers, then runs bounded exit cleanup and enters the next state. No queued
resume targets a destroyed state. A failed exit cleanup faults the machine after
joining all remaining scopes. Stop has a separate completion reason; the first
version retains existing Status values and adds `termination_reason` rather than
silently treating cancellation as application success or introducing unreviewed enum
values. Terminal predicate includes Faulted everywhere.
Parallel-all joins every child before producing the outcome tuple; a system fault
requests sibling stop and joins before returning the fault. Parallel-any selects one
winner on the machine strand, requests stop for all losers and awaits their joins
before returning the winner. Simultaneous-ready ties use child declaration order in
the same dispatch turn. Application Failure remains a typed outcome and can win a
race; system Fault remains a separate supervisory failure. Stop/deadline uses Async's
one-terminal arbitration. A noncooperative loser delays completion and is reported;
its frame is never abandoned to meet a latency target.
Supervision policies are explicit: default stop-on-fault; optional bounded restart
with Time-driven backoff, maximum three restarts per 60-second window, and 1,024
supervised machines. A faulted child is terminal in handles/counts/waits. Release
finished models from active supervision while acquired handles retain immutable
termination evidence and any still-required cleanup ownership. User observer callbacks
run outside orchestration locks; their exceptions report observer errors independently
from the machine's committed transition.
## Checkpoint algorithm and state compatibility
Checkpoints capture state boundaries: after the prior state's child scope and exit
cleanup finish, before the next state's entry causes new effects. A parked state may
offer an explicit application safe point that drains child work and serializes its
resume label. No arbitrary suspension point is implicitly restartable. A request
that cannot reach a boundary before its deadline fails without copying a live frame.
On the strand, freeze event consumption, assign a transition sequence, copy application
data and stable state paths/history into a bounded candidate, validate its schema,
then release the freeze. Optional queued events are persisted only through an explicit
registered serializable event schema and acknowledgement sequence; default checkpoint
excludes the mailbox and requires producer replay/deduplication. Relative monotonic
timers are application intent with restart policy, never raw process clock readings.
Default checkpoint contains format version, machine identity, application schema,
stable state IDs and transition sequence. State IDs are declared durable names, not
compiler type-name spellings. Restore validates all IDs/schema/limits into a private
Idle machine and commits its prepared state once; invalid data or migration exceptions
leave it unchanged. Resume executes state entry from the selected boundary. Application
side effects require idempotent occurrence/operation IDs or an external transaction;
checkpointing does not promise exactly-once effects. [Scheduler](../subsystems/Scheduler.md)
owns durable job occurrences; Fsm owns their workflow state.
## Bounds and backend rationale
Initial implementation remains native C++ coroutines/reflection and reuses Async
structured scopes. No external workflow engine. Default mailbox 1,024 events/4 MiB,
256 deferred events, 1,024 timers, 128 live child regions, hierarchy depth 32, 256
retained transitions and checkpoint 4 MiB. Event types must provide payload accounting
for variable data. Overload is returned before enqueue; reserved control messages
ensure stop/checkpoint can progress under user-event saturation. Control capacity is
bounded by live scopes and requests, not an unbounded priority queue.
One dispatch turn processes at most 64 events or 1 ms measured by injected Time before
yielding; tests use event counts to avoid real-clock flakiness. Expired waiters are
removed before state destruction. Low-level hooks remain optional so Fsm does not
require an observability exporter or Runtime. Profile tick/transition/race/checkpoint
p50/p95/p99, throughput, frame/event allocations, peak RSS/CPU and reflection compile
cost under [PERFORMANCE](../PERFORMANCE.md); no results are asserted.
## Ordered implementation backlog
All rows are PLANNED.
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
| --- | --- | --- | --- |
| M-FSM-01 | P0 / current source | Characterize status, supervision ownership, event waits and race losers | Faulted discrepancy and indefinitely parked race fixture recorded; no claim of safe cancellation / sol_implementer |
| M-FSM-02 | P1 / M-FSM-01; M-ASYNC-03 | Inject executor/clock, root/state scopes, waiter/timer ownership | Stop at each suspension frees only after join; borrowed execution outlives final cleanup / astra_implementer |
| M-FSM-03 | P2 / M-FSM-02; M-SERVICE-02 | Structured parallel/race, terminal predicate, bounded mailbox/history and supervision | Losers stopped/joined; faults terminate all handle/wait APIs; old provider survives await / astra_implementer |
| M-FSM-04 | P2 / M-FSM-03; Data schema gate | Boundary checkpoint, stable state IDs, validate-then-restore and schema migrations | Checkpoint during mutation waits for safe point; invalid restore leaves Idle candidate unchanged / astra_implementer |
| M-FSM-05 | P3 / M-FSM-04; Plugin quiescence specification | Reloadable workflow adapter, restart policies, examples and profile harness | Reload migrates application state without frames; fault/restart cap and cleanup evidence visible / sol_implementer |
## Validation and migration
CURRENT command:
`ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60`;
not rerun for documentation. PROPOSED tests require NEW scope/checkpoint APIs: race
winner with forever-waiting cooperative loser, fault during child exit, timeout versus
event delivery, queued timer after state exit, nested cancellation, event saturation,
observer reentrancy/throw, Faulted supervision, checkpoint/transition simultaneity,
schema migration failure, and restart after effects with operation-ID deduplication.
Use fake clocks and deterministic strand stepping before sanitizer stress runs.
Keep existing state declaration/reflection syntax where possible. EXISTING
`MachineOptions{.own_worker=false}` maps to explicit injected execution; owning worker
construction becomes an opt-in adapter. JSON `{state,data}` gets an explicit legacy
checkpoint reader with declared machine/schema defaults; unknown compiler-derived
state names require a migration map. Old race-any behavior is documented until the
major-release switch to join-losers; no silent semantic change. Rollback preserves
legacy readers and the original persisted checkpoint until the new version validates.
See [MIGRATION](../MIGRATION.md), [VALIDATION](../VALIDATION.md),
[DEPENDENCIES](../DEPENDENCIES.md), and [DELIVERY](../DELIVERY.md).
+150
View File
@@ -0,0 +1,150 @@
# Functional completion and error contracts
Status: planning only; feature tasks are **PLANNED**. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Existing surface
[Result.hpp](../../../include/Void/Functional/Result.hpp) defines
`Void::Result::Result<T, E = Error>` as `std::expected<T,E>`, with `Failure`, `ok`,
`fail` and `with_context`. [Error](../../../include/Void/Functional/Error.hpp) stores
a message and shared immutable cause chain; it has no current machine-readable category.
Keep the standard expected monadic operations rather than wrapping them in a new result
class. Existing namespace facts also include `Void::Either` for
[Either](../../../include/Void/Functional/Either.hpp) and
[Opt](../../../include/Void/Functional/Opt.hpp), and `Void::Pipeline` for
[Pipeline](../../../include/Void/Functional/Pipeline.hpp),
[Curry](../../../include/Void/Functional/Curry.hpp) and
[Memo](../../../include/Void/Functional/Memo.hpp).
[Retry](../../../include/Void/Functional/Retry.hpp) has delay policies, jitter and a
steady elapsed budget, but sleeps synchronously and uses zero for unlimited elapsed
time. Its zero-attempt path can return a default-constructed result without calling the
operation. `Memoized::get_cache()` uses a function-local static map, so instance ownership
and concurrency need deliberate migration. The reflection
[diagnostic bridge](../../../include/Void/Functional/Detail/Repr.hpp) includes Core Meta,
while [the module declaration](../../../src/Functional/module.cmake) lists no dependency.
[Result tests](../../../tests/standalone/Functional/ResultContext.cpp),
[memo tests](../../../tests/standalone/Functional/Memo.cpp),
[retry tests](../../../tests/standalone/Functional/Retry.cpp), and
[jitter tests](../../../tests/standalone/Functional/RetryJitter.cpp) establish useful
fixtures. Scoped graph coverage reported no recorded parser gaps here; source was also
read because graph cleanliness is not completeness evidence.
## Owner and dependency decisions
Functional owns error categories and exception/domain adapters under
[C-02](../ARCHITECTURE.md). It imports no Async, Runtime, Log or Containers. Core stays
below Functional; optional reflection formatting has the NEW interface target
`Void::FunctionalCoreFormatting`, exporting Functional and Core dependencies. Its
headers never create a reverse Core→Functional bridge; base `Void::Functional` retains
no Core requirement. Time owns clocks; Functional's pure retry
decision engine accepts times as values and never owns a timer. Async/Resilience own
asynchronous waiting, task cancellation and policy composition above this layer.
Native templates plus standard expected/optional/variant are the backend. No external
functional framework or general policy runtime is justified.
## NEW error shape and adapters
These illustrative NEW additions extend `include/Void/Functional/Error.hpp` and add
NEW `include/Void/Functional/Adapters.hpp`; existing `Result<T>` remains an alias.
```cpp
namespace Void::Result {
enum class ErrorKind {
invalid_argument, not_found, conflict, cancelled, timeout, overloaded,
unsupported, io, corrupt, exhausted, internal
};
struct ErrorCode { std::uint32_t domain; std::int32_t value; };
// Compact failure descriptor; expected's value branch represents success.
struct Status { ErrorKind kind; ErrorCode code; };
// NEW members on Error:
// explicit Error(Status) noexcept; // no diagnostic allocation
// ErrorKind kind() const noexcept;
// ErrorCode code() const noexcept;
// std::error_code system_code() const noexcept;
// Error with_context(std::string) const&;
template<class T, class E, class Map>
Result<T> adapt(std::expected<T,E>, Map&& map_error);
template<class F, class Map>
auto try_invoke(F&&, Map&& map_exception);
}
```
The library reserves domain 0 for generic classifications; domain numeric registration
is documented by Functional, not generated by hashing type names. Preserve domain code,
system code, root category and causes through context wrapping. Human strings are never
parsed to decide retryability. Old `Error(string)` maps to `internal` with an unspecified
domain code; callers should migrate to typed construction. Domain errors such as
`Numeric::Error` may remain small enums and use explicit adapters at integration edges.
`adapt` invokes its mapper only on failure and supports move-only values and `void`.
`try_invoke` catches only exceptions accepted by its caller-provided mapper; unrecognized
exceptions rethrow. `std::bad_alloc` propagates by default. No automatic catch-all turns
programmer errors into empty values. A C ABI adapter catches at its boundary and emits
fixed status codes with explicitly owned diagnostic storage under C-09.
NEW error context limits default to 16 frames, 1 KiB per message and 16 KiB total rendered
diagnostics. Truncation is visible and preserves the original classification. A compact
`Status` carrying only kind/code provides an allocation-free boundary for Memory and
low-memory paths; enriching it with strings is separate and fallible. Cause copying is
immutable and bounded; destructor traversal must not recurse through unbounded chains.
## Pure retry and callable ownership
NEW `RetryState::next(now, last_error)` returns either `stop`, `attempt`, or an absolute
next-attempt time. Defaults: three total attempts and a 30-second total budget; explicit
`no_deadline` is required for unlimited time. Zero attempts is invalid. Backoff arithmetic
saturates at a configured cap before overflow, rejects negative durations/nonfinite
multipliers, and accepts an injected URBG for reproducible jitter. A stop request or
expired admission deadline prevents the next attempt; the policy cannot interrupt an
already-running callback or reverse its side effects. Retryability is a supplied
predicate and retrying writes still requires the caller's idempotency contract.
Retain the synchronous `retry` adapter temporarily, explicitly named as blocking. A
Time-clock/sleeper adapter belongs in a separate Time-dependent header; Async supplies
its own awaiting adapter. This prevents foundational retry code from importing execution.
Memoization becomes per-instance with an explicit key/result signature, default 1,024
entries and FIFO eviction. Recursive calls mark an entry as computing; a repeated key
returns `conflict` rather than infinite recursion. Exceptions and failed expected results
are not cached by default. Concurrent memoization is a separate externally synchronized
adapter, not a hidden mutex in every callable. Pipeline/curry forwarding preserves
move-only callables, return references only when the underlying callable does, and
documents captured-reference lifetime. Standard ranges remain the default sequence API.
## Ordered backlog
| Task | Phase; dependencies | Implementation scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-FUNCTIONAL-01 | P0; current source | Lock existing expected alias, context rendering, namespace and exception behavior; compile minimal and reflection bridge consumers independently. | sol_implementer |
| M-FUNCTIONAL-02 | P1; M-FUNCTIONAL-01 | Add compact Status, stable categories/domain codes, bounded context and explicit adapters; root classification survives 16 frames and allocation-free status paths allocate zero. | astra_implementer |
| M-FUNCTIONAL-03 | P1; M-FUNCTIONAL-02; Time clock contract | Extract pure retry decisions and retain named blocking adapter; fake-time tests prove exact attempt counts, deadlines, jitter bounds and no zero-attempt success. | sol_implementer |
| M-FUNCTIONAL-04 | P2; M-FUNCTIONAL-01–02 | Replace static memo caches with bounded instance caches and recursive-key detection; same callable type with different captures cannot share values. | sol_implementer |
| M-FUNCTIONAL-05 | P2; M-FUNCTIONAL-01 | Complete Either/Opt/Pipeline/Curry move/ref-qualified behavior and declared Core bridge dependency; move-only, void and constexpr consumers compile. | sol_implementer |
| M-FUNCTIONAL-06 | P2; M-FUNCTIONAL-02–05 | Publish migration adapters, error-domain registry and integration examples for Async/Data/Binary; no dependency cycle and installed minimal consumers pass. | sol_implementer |
## Evidence and migration gates
CURRENT verification is the inspected source/test inventory and parent-recorded baseline;
no tests were rerun for these documents. PROPOSED tests add category-preserving adaptation,
void/move-only expected, known/unknown exceptions, cause-limit truncation, allocator
failure while enriching Status, two memo instances, recursive duplicate keys, failed
compute cleanup, zero attempts, deadline-at-admission and saturated backoff. Async owns
cancellation-race tests for its retry adapter; synchronous policy tests do not prove
preemption or timely shutdown of arbitrary callbacks.
Measure successful expected chains separately from failures with context, memo hit/miss
and eviction distributions, and callable compile cost. Follow
[PERFORMANCE](../PERFORMANCE.md) for p50/p95/p99, allocations, throughput, RSS/CPU and
build cost; do not compare a throwing diagnostic-heavy failure with an allocation-free
status without reporting that work difference.
The [major migration](../MIGRATION.md) changes Error layout, memo ownership and retry
defaults explicitly. Keep legacy blocking/zero-unlimited policy wrappers named and
documented for one transition; never silently reuse old static caches. No serialized
error object becomes a wire contract: RPC owns its versioned mapping. Rollback selects
the old major with no persistent-data conversion, but mixed-major ABI objects cannot
cross plugin boundaries. See [VALIDATION](../VALIDATION.md),
[DEPENDENCIES](../DEPENDENCIES.md), [DELIVERY](../DELIVERY.md) and
[requirements](../REQUIREMENTS.md) for integrated gates.
+173
View File
@@ -0,0 +1,173 @@
# Log — bounded delivery and process-wide facade
Status: plan; all feature tasks are PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
Implements R-005/R-009/R-012/R-014 under [C-03–C-05 and C-11](../ARCHITECTURE.md).
## Existing behavior and gaps
The names are deliberately distinct: `Void::Log` is the emission facade in
[Log.hpp](../../../include/Void/Log/Log.hpp); `Void::Logging` owns `Logger`, `Entry`,
formatters and sinks. [LogState/State.cpp](../../../src/LogState/State.cpp) defines the
single facade state through a separate compiled target. Preserve this across host/plugin
shared-library boundaries; replacing it with inline per-module statics changes behavior.
Disabled facade calls gate formatting, and per-module levels override the global level.
However, `Detail::emit` currently invokes the sink while holding `State::mutex` shared.
Reentrant `set_sink` or level changes therefore need a defined safe design.
[Logger.cpp](../../../src/Log/Logger.cpp) supports Immediate, Buffered and Async modes.
The async policies are Block, DropNewest and DropOldest. DropOldest currently enqueues
without reserving capacity and trims later. The worker drains into an unconstrained batch
and returns queue permits before delivery; queue capacity is not a bound on total retained
entries. Existing derived sinks flush while still alive, whereas the base destructor
stops/joins without invoking virtual delivery. Do not weaken that lifetime obligation.
[Sinks.hpp](../../../include/Void/Log/Sinks.hpp) has callback, null and fan-out sinks;
fan-out configuration is assembled before concurrent use. File/rotation/history sinks and
pattern/JSON-lines/logfmt formatters are existing capabilities. [FieldScope](../../../include/Void/Log/Field.hpp)
and [Field.cpp](../../../src/Log/Field.cpp) maintain thread-local fields;
[Entry](../../../include/Void/Log/Entry.hpp) owns snapshots for delivery.
[module.cmake](../../../src/Log/module.cmake) currently declares Functional/Configuration
and optional Stacktrace. LogState remains the lightweight compatibility bridge; foundation
independence is governed by C-01, not by linking the full sink framework everywhere.
Evidence includes [facade tests](../../../tests/standalone/Log/Log.cpp),
[async tests](../../../tests/standalone/Log/AsyncLogger.cpp), and
[scope snapshots](../../../tests/standalone/Log/LogScopeSnapshot.cpp). Existing passing
queue tests are not proof of a byte budget, reentrant callbacks or throwing-sink safety.
## Delivery architecture and NEW interfaces
Keep native delivery and formatting; external logging systems integrate via adapters,
not a mandatory backend. Use a mutex-protected bounded ring initially: it makes eviction,
permit accounting and flush boundaries auditable. A different concurrent queue is a later
measured optimization with identical semantics. No dependency on Runtime or an exporter.
NEW illustrative additions in `Void::Logging`:
```cpp
struct DeliveryLimits {
std::size_t entries = 4096;
std::size_t owned_bytes = 8 * 1024 * 1024;
std::size_t max_entry_bytes = 64 * 1024;
std::size_t batch_entries = 128;
};
enum class SubmitState { Accepted, Filtered, Dropped, Closed };
using Ticket = std::uint64_t;
struct SubmitReceipt { SubmitState state; std::optional<Ticket> ticket; };
struct FlushReport { std::uint64_t delivered, dropped, failed; };
Result<SubmitReceipt> try_submit(Entry); // NEW Logger method
Result<FlushReport> flush_through(Ticket, FlushOptions);
Result<FlushReport> close(CloseOptions);
```
`Ticket`, `FlushOptions`, `CloseOptions` and admission receipts are NEW Log-owned types;
they refer to Async's stop/deadline options rather than invent another cancellation type.
Existing void-returning methods remain compatibility adapters until the major migration.
NEW configurations default to DropNewest; existing constructors keep their documented
Block default until explicitly migrated. Ticket assignment occurs only for admitted
entries, under admission order, after fallible preparation succeeds.
Non-admitted submissions have no ticket; sequence exhaustion closes admission rather than
wrapping a watermark and reporting premature flush completion.
Reserve bytes and entries before making internal owned copies. Total accounting includes
queued entries, producers preparing admitted entries, dequeued batches, sink formatting
scratch and fan-out copies. A public caller's pre-existing Entry is outside the logger
budget; any retained copy is inside. Format into capped storage; reject oversize by default
instead of allocating an unlimited intermediate string. Truncation is an explicit policy
and marks the record. Allocator overhead is charged conservatively, not just message size.
Add defaults of 32 fields, 16 scope elements, 256-byte keys and 2 KiB field values.
The worker claims at most 128 entries/256 KiB per batch and retains their permits until
delivery or terminal loss. DropNewest rejects immediately. DropOldest evicts only a queued,
not-yet-dispatched entry under the admission lock; if all capacity is in flight, drop the
new arrival. Block is opt-in, cancellable in the new API, and forbidden on the delivery
worker or an executor needed to release capacity. Admission order defines per-logger
ordering; no timestamp-based total order across independent loggers is promised.
Fan-out is bounded to eight children by default, checks cycles on configuration, and owns
child handles. A child has a distinct budget; total memory is the sum of parent and child
budgets, visible in configuration. Share immutable records where possible, charging the
shared payload once to a retained owner and charging each envelope separately. A slow
child must not create an unbounded staging queue in the parent.
## Reentrancy, flush and shutdown
Facade configuration becomes an immutable sink-registration object retained by emitters.
Acquire/snapshot the registration under the configuration lock, then release that lock
before formatting/callback invocation and before destroying the old callback. Replacement
affects subsequent admissions; already-admitted calls may still use the old registration.
NEW `detach_and_drain` waits for those calls to exit and is not callable synchronously
from that registration's callback. `set_sink` alone is not an unsubscribe-and-join promise.
Callbacks that capture plugin code retain its generation through the last callback.
A per-thread/per-logger dispatch guard suppresses recursive dispatch into the same sink,
increments `reentrant_dropped`, and uses a bounded emergency diagnostic path only if
explicitly installed. Logging to a different sink remains allowed within a maximum nesting
depth of eight. No retry/error reporting calls back into a failing sink. User callbacks,
formatter code and virtual sink methods run outside queue/configuration locks. A callback
may request asynchronous close, but self-join or blocking flush returns WouldDeadlock.
Flush takes a ticket watermark, so later producers cannot extend it forever. Every admitted
ticket becomes delivered, evicted or failed; the completion watermark advances only through
a contiguous terminal prefix, even if immediate mode completes out of order. The report
includes all losses through that watermark. A sink's buffer flush is distinct from durable
file sync: a NEW `FlushDurability::SyncFiles` option syncs supported file sinks or returns
UnsupportedCapability. Callback sinks cannot claim disk durability on the callback's behalf.
Catch sink exceptions at delivery boundaries, mark affected tickets failed, record a bounded
error summary, and continue or quarantine that sink according to a selected configuration.
Default is quarantine after the first delivery failure, with explicit operator reset;
never silently retry a possibly written record. Mode/formatter changes use an admission
barrier and drain the old generation before publishing the new one. Configuration validation
cannot invoke arbitrary callbacks while locked.
`close` rejects new work, drains or explicitly drops queued work, then joins delivery and
releases sink ownership. A deadline may stop waiting but cannot destroy a callback still
executing; an owning close handle retains resources until completion (C-03). Legacy derived
destructors still need their flush contract; NEW composition owns sink state independently
of a partially destructed polymorphic logger. No forceful callback interruption is promised.
## Capability backlog and implementation order
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-LOG-01 | P0; current tests | Add regressions for callback reconfiguration, slow sink and total queued+in-flight accounting; preserve existing disabled/field/mode behavior. | astra_implementer |
| M-LOG-02 | P1; M-LOG-01, C-11 | Snapshot facade registrations, drain handles, reentrancy guard and shared-library test; host sink receives plugin events and can replace itself without deadlock. | astra_implementer |
| M-LOG-03 | P2; M-LOG-02, Memory budgeting | Bounded ring, byte admission, batch limits, all saturation policies and contiguous ticket completion; limits hold while sink stalls and producers race. | astra_implementer |
| M-LOG-04 | P2; M-LOG-03, Async operation options | Result-based flush/close, failure quarantine, reconfiguration barriers; no self-join, stuck watermark or callback after owner release. | astra_implementer |
| M-LOG-05 | P2; M-LOG-04 | Finish sink workflows: file failure reporting, retention quota, rotation/reopen, formatter escaping/redaction and configuration validation; disk-full preserves loss accounting. | sol_implementer |
| M-LOG-06 | P3; M-LOG-04, Observability hook/context contract | Optional context bridge, metrics and managed shutdown adapter; no Log↔Observability or Async↔Log cycle. | sol_implementer |
| M-LOG-07 | P3; M-LOG-05/06, shared performance harness | Profile disabled, immediate, async, structured and saturated paths; publish measured latency/memory/build costs and rejected counts. | sol_implementer |
P4 consumers reuse these contracts through [distributed platforms](../platforms/DistributedApplications.md);
logging does not become a durable consensus log. For file rotation default NEW retention is
five 16 MiB files per sink, with a 1 MiB capped formatting scratch budget. Opening/reopening
files is fallible, directory creation is explicit, and partial writes are errors with
possible partial external output. Audit records needing durable transactional semantics
belong in Storage, not a loss-tolerant logger.
## Validation and compatibility
CURRENT interfaces: the existing `VoidTests` supports `--filter`; a TEMPLATE for the verified
names is `<existing-build>/tests/VoidTests --filter '^(no_sink_is_silent|disabled_calls_do_not_format|async_.*)$'`.
Use the configured build in [validation](../VALIDATION.md); this documentation task does not
execute it. PROPOSED tests require M-LOG-01–06: deterministic blocked callbacks, callback
replacement/destruction, thrown formatter/sink, concurrent flush, drop-oldest pressure,
permit rollback on allocation failure, copied context after producer exit, and shutdown
with an admitted callback. Stress and TSan supplement deterministic ownership checks.
Measure p50/p95/p99 admission and flush separately, throughput, allocations, RSS/CPU and
build cost under [performance](../PERFORMANCE.md)'s warmup/repetition/confidence rules.
Report drops and reentrant suppression alongside useful delivery; an apparent improvement
caused by losing work is not an optimization result.
[Migration](../MIGRATION.md): preserve namespaces and LogState symbol linkage; add explicit
registration and close handles before replacing legacy signatures. Example transition:
`logger.info(text); logger.flush();` becomes checked admission plus `flush_through(ticket)`
when delivery evidence matters. Frozen C/plugin contracts must use their own versioned
bridges, not embed C++ Entry layout. Keep old sinks behind adapters during the major release;
roll back a new queue/backend only if ordering, resource and flush tests remain satisfied.
Coverage: cited files were checked in the repository graph and read directly; partial parses
in Logger/Sinks/Field were inspected, so graph absence is not used as evidence. New tests,
resource guarantees and performance claims remain unverified planned work.
+148
View File
@@ -0,0 +1,148 @@
# Math and numeric utility completion
Status: planning only; all tasks are **PLANNED**. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Current capabilities
[Math](../../../src/Math/module.cmake) declares no dependencies.
[Numeric](../../../include/Void/Math/Numeric.hpp) provides `Void::Numeric::Error`, checked,
saturating and unsigned wrapping arithmetic, parsing, range and narrowing helpers.
Checked arithmetic currently uses compiler overflow builtins. `parse_int`/`parse_double`
pass `string_view::data()` to C conversion functions, so a bounded non-NUL-terminated
substring requires correction. The `long long`-based narrowing interface is insufficient
for every unsigned conversion. These are concrete foundations work, not scientific scope.
[Random](../../../include/Void/Math/Random.hpp) implements `Void::Random::Xoshiro256`, a
thread-local generator, distributions, shuffle and sampling. Sampling materializes all
`n` indices; `k > n` is not explicitly rejected. The generator is for simulations,
sampling and jitter, not secrets. [Histogram](../../../include/Void/Math/Histogram.hpp)
contains keyed frequency and fixed-bin structures. Fixed-size arithmetic exists in
[Matrix](../../../include/Void/Math/Matrix.hpp) under `Void::Matrix` and
[Vec](../../../include/Void/Math/Vec.hpp)/[Mat](../../../include/Void/Math/Mat.hpp) under
`Void::Math`. Their distinct Mat4 names must not be silently treated as aliases.
[Numeric](../../../tests/standalone/Math/Numeric.cpp),
[Random](../../../tests/standalone/Math/Random.cpp),
[Histogram](../../../tests/standalone/Math/Histogram.cpp),
[Matrix](../../../tests/standalone/Math/Matrix.cpp), and
[VecMat](../../../tests/standalone/Math/VecMat.cpp) suites are current regression sources.
Graph parsing is partial at Mat line 15 and Vec lines 13/50/91; these template declarations
were read directly. No build or benchmark result is inferred from source inspection.
## Target and backend decisions
Keep standard-library-only, native numeric utilities below Data and application modules,
per [C-01/C-02](../ARCHITECTURE.md). Core UUID removes its Math include; Math must not
depend back on Data to supply numeric conversion. Functional provides optional enum-to-
Error adapters, not a required string allocation in every arithmetic operation.
Math imports neither Containers nor Algorithms; fixed arrays and standard-library scratch
storage keep its scalar arithmetic below both. M-MATH-02 supplies the narrow checked-
arithmetic prerequisite for Algorithms before Containers/Text adapters depend on it.
Standard `from_chars`, distributions and ranges remain the default tools; overflow
builtins are guarded optimizations over a constexpr portable reference path. No BLAS,
Eigen, arbitrary precision or general scientific platform is introduced by this plan.
## NEW conversion and arithmetic APIs
Illustrative NEW additions in `include/Void/Math/Numeric.hpp`:
```cpp
namespace Void::Numeric {
enum class Rounding { exact, toward_zero, nearest_even };
template<class To, class From>
std::expected<To, Error> checked_cast(From value,
Rounding mode = Rounding::exact) noexcept;
template<std::integral T>
std::expected<T, Error> parse_integer(std::string_view, int base = 10) noexcept;
template<std::floating_point T>
std::expected<T, Error> parse_real(std::string_view) noexcept;
template<std::integral T>
std::expected<T, Error> checked_mul_add(T a, T b, T c) noexcept;
}
```
Integer-to-integer conversion compares ranges by signedness without first narrowing.
Float-to-integer first rejects NaN/infinity, then applies the named rounding policy,
then tests against exactly representable exclusive/inclusive bounds before casting.
Default exact rejects fractional values. Integer-to-float exact rejects a value if its
significand cannot be represented; the implementation checks significant bits instead
of performing an unsafe float-to-integer round trip. Float narrowing exact rejects loss
of finite value; explicit nearest-even uses the documented floating environment policy.
`Error` gains `Inexact` and `NonFinite` in the major release. Data converts these domain
errors into path-aware diagnostics without changing Numeric's low-cost enum.
Parsing consumes precisely the supplied span and requires full token consumption.
Integer bases are 2–36; base autodetection is a separate named policy, not default.
No locale whitespace, leading plus, partial suffix, or nonfinite token is accepted by
the default parser. Maximum numeric token is 256 bytes; an explicit larger bounded policy
is separate. Grammar validation precedes conversion; there is no NUL scan beyond input.
`checked_mul_add` is specified as sequential checked multiplication then addition, so
an overflowing intermediate fails even if cancellation could produce a final in-range
mathematical result. Saturating helpers use these classifications deliberately;
wrapping arithmetic remains unsigned-only. Resource-size checked add/multiply stays
available without a dependency on dynamic matrix or random headers.
## Other capability backlogs
Random adds injected-URBG overloads for distributions, shuffle and sampling, leaving
thread-local convenience APIs as adapters. Seeded Xoshiro output has fixed golden vectors;
standard-distribution output is not promised identical across standard-library vendors.
Defaults cap sample output at 1,048,576 elements and scratch at 16 MiB. Reject `k > n`.
Use Floyd sampling for sparse `k` (O(k) memory), and partial Fisher–Yates for dense samples
only within the scratch cap; the selection threshold is `k <= n/8`, frozen with tests.
No unrequested entropy acquisition occurs when a generator is supplied.
Histogram adds bounded merge, count-overflow errors and deterministic tie-breaking.
Keyed defaults cap at 65,536 distinct keys; fixed bins default to 1,024 with maximum
65,536, finite ordered endpoints and explicit underflow/overflow counters. NaN is
rejected. Quantiles from fixed bins are approximate intervals, not invented exact
percentiles; Time's exact benchmark samples do not reuse approximate results unnoticed.
Matrix work retains stack storage for fixed sizes, adds checked normalization/inversion
with singular/nonfinite diagnostics, and documents row-major layout and transformation
conventions. Select `Void::Matrix::Matrix<T,R,C>` as the shared arithmetic kernel while
keeping Vec named-field value types and `Void::Math::Mat4` facades. Conversion is explicit
until a major-version ABI change; no reinterpret-cast view assumes matching layouts.
No heap-sized dynamic matrix is included. Generic integer matrix operations get checked
variants rather than promising undefined signed overflow is acceptable.
## Task DAG
| Task | Phase; dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-MATH-01 | P0; current source | Capture existing numeric, generator and matrix fixtures and namespace/layout contracts; identify builtins and unsupported conversion edges. | sol_implementer |
| M-MATH-02 | P1; M-MATH-01 | Implement span-safe parsers, checked_cast and portable overflow fallback; signed/unsigned and float boundaries pass without undefined behavior. | astra_implementer |
| M-MATH-03 | P2; M-MATH-02 | Add injected RNGs and bounded sampling; k=0/k=n/k>n, huge n with small k and seeded generator vectors pass within scratch limits. | sol_implementer |
| M-MATH-04 | P2; M-MATH-02 | Complete bounded histograms and merge semantics; count overflow leaves prior histogram intact and approximate outputs carry bounds. | sol_implementer |
| M-MATH-05 | P2; M-MATH-02 | Consolidate matrix arithmetic kernel with explicit facade conversion; singular/zero-vector, row-major and integer-overflow tests pass. | sol_implementer |
| M-MATH-06 | P3; M-MATH-03–05 | Benchmark targeted kernels, publish compatibility adapters and isolated installed consumers; optional vectorization is admitted only after scalar differential tests. | sol_implementer |
## Limits, verification and migration
All operations are synchronous and caller-owned; no queue, cancellation thread or shutdown
service exists. Batch sampling/merging receives a stop token only in explicit long-running
overloads, checked at bounded chunks, returning no partially published output. Matrix
template extents are compile-time; recommended instantiated extents are at most 16×16
until compiler/build-cost evidence supports larger values. This is a supported profile,
not a claim that all larger templates cannot compile.
CURRENT tests are the linked suites; no new execution was performed. PROPOSED validation
uses property tests against wide/reference arithmetic, bounded substrings adjacent to
guard pages, all small integer widths, INT64_MIN/UINT64_MAX, 2^53±1, fractional edges,
NaN/infinities, subnormals and negative zero. Differential RNG tests check range and
deterministic engine vectors; statistical smoke tests do not establish cryptographic
quality. Matrix residual tests use stated tolerance and scale, not exact floating equality.
Follow [PERFORMANCE](../PERFORMANCE.md) for scalar/batch parse throughput, conversion
p50/p95/p99, sample allocations/RSS/CPU and header/template build cost. Separate entropy,
engine and distribution costs. [VALIDATION](../VALIDATION.md) and
[BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md) own future commands/toolchains.
[Migration](../MIGRATION.md) deprecates unsafe `long long` narrowing wrappers and preserves
legacy parsing only through named adapters. Exact Data integer conversion is gated on
M-MATH-02 and does not change StrictJson. Old Mat4 storage/ABI remains until a major break;
rollback selects the old package with no persisted numeric conversion. Consumers must
not persist native object representations as wire formats; [Binary](Binary.md) owns those.
See [requirements](../REQUIREMENTS.md), [dependencies](../DEPENDENCIES.md),
[delivery](../DELIVERY.md) and [Data](Data.md).
+179
View File
@@ -0,0 +1,179 @@
# Net implementation plan
Status: planning only. All feature tasks below are PLANNED. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Authority: [requirements](../REQUIREMENTS.md) R-002–R-006, R-009–R-016;
[architecture](../ARCHITECTURE.md) C-02–C-06, C-11, C-13.
## Existing capability and evidence
The public namespace is `Void::Net`. [Http.hpp](../../../include/Void/Net/Http.hpp)
exposes synchronous `HttpClient`, owning request/response strings, HTTP and SOCKS5 proxy
configuration, a 30-second request timeout, opt-in redirects, and a 64 MiB body limit.
Zero currently means unlimited. Non-2xx responses are successful transport results.
[Http.cpp](../../../src/Net/Http.cpp) constructs an Asio context and socket per hop;
there is no connection pool. Its watchdog starts after resolution/connect, and each
redirect restarts the phase budget. Certificate checking defaults off; enabling it
sets peer verification but the inspected handshake only sets SNI, not expected-host
verification. Redirects retain the original method, body, and headers.
[Server.hpp](../../../include/Void/Net/Server.hpp) and
[Server.cpp](../../../src/Net/Server.cpp) provide `Router`, `StaticFileResolver`, and
`WebSocketSessions`. Routing snapshots a handler before invoking it outside the lock;
the session registry also invokes callbacks/close outside its lock. These are useful
transport-neutral components, not an HTTP listener or a WebSocket framing engine.
Static resolution rejects traversal and canonical symlink escapes but returns a path;
opening that path later needs protection against filesystem replacement races.
[Socket.hpp](../../../include/Void/Net/Socket.hpp) and
[Socket.cpp](../../../src/Net/Socket.cpp) implement connected blocking UDP on POSIX;
Windows operations report unsupported. `wait_readable` uses poll.
[Url.hpp](../../../include/Void/Net/Url.hpp) / [Url.cpp](../../../src/Net/Url.cpp)
use Boost.URL and accept URI references as well as absolute URIs.
[module.cmake](../../../src/Net/module.cmake) declares Functional, Text, Boost
headers/Beast/Asio/URL, OpenSSL, and Threads. Existing tests cover loopback GET/POST,
invalid URL/refusal and a stalled response in
[HttpClient.cpp](../../../tests/standalone/Net/HttpClient.cpp); router/static/session
helpers in [Server.cpp](../../../tests/standalone/Net/Server.cpp); parsing in
[Url.cpp](../../../tests/standalone/Net/Url.cpp); and closed/moved UDP state in
[Socket.cpp](../../../tests/standalone/Net/Socket.cpp). They do not establish TLS,
proxy, real server, WebSocket wire, or sustained reuse conformance.
Graph coverage was checked for all these files: Http.hpp lines 112/115 and Server.hpp
207/211/214 have parse gaps and were read directly. Other paths reported matching
metadata with no recorded issue; graph edges are advisory, source is authoritative.
## Target interfaces and backend ownership
NEW illustrative APIs below are not compiling examples. `OperationOptions` and `Task`
refer to [Async](Async.md)'s C-03 types; byte streams and descriptor lifetime belong to
[IO](../subsystems/IO.md). Net owns protocol state, endpoint resolution policy, TLS
contexts, parsers, pools, and listener/session policy. No constructor starts workers.
```cpp
// NEW shapes in Void::Net; Result is C-02 shorthand.
struct ClientPolicy { TlsPolicy tls; RedirectPolicy redirects; PoolLimits pool; };
class Client {
Task<Result<StreamingResponse>> send(StreamingRequest, OperationOptions);
Task<Result<void>> shutdown(OperationOptions);
};
class HttpServer {
static Result<HttpServer> create(IOContext&, ServerPolicy, Handler);
Task<Result<BoundEndpoint>> listen(Endpoint, OperationOptions);
Task<Result<void>> shutdown(OperationOptions);
};
// StreamingResponse owns its connection lease until consumed or cancelled.
// Handler receives headers plus a bounded body reader and returns a body producer.
```
Choose native incremental HTTP/1.1 and WebSocket codecs over native IO; retain a
separately selectable Boost migration adapter until wire conformance gates pass.
Keep OpenSSL as the TLS backend; do not implement cryptographic primitives. Initial
Linux IO is level-triggered epoll, owned by IO, with bounded work per readiness turn
to avoid monopolizing the executor. Readiness is not a whole-message completion.
See [epoll semantics](https://man7.org/linux/man-pages/man7/epoll.7.html).
Native URL parsing must preserve encoded components and implement RFC reference
resolution before replacing Boost.URL. HTTP/2, QUIC, compression, and proxy servers
are later named capabilities, not claims of the first release.
## Protocol and operation rules
1. Admit against byte/operation budgets; validate absolute http/https destinations,
authority, numeric ports, header syntax, and explicit proxy credential lengths.
URI references remain a separate parsing API; they cannot silently become a host.
2. Establish one absolute steady deadline at admission. DNS, capacity waiting,
address attempts, connect, proxy negotiation, TLS, redirects and body transfer
consume it. Resolver workers retain owned inputs after caller cancellation;
late results are discarded and accounted until worker completion.
3. Verify trusted chain and DNS/IP peer identity by default; SNI alone is inadequate.
TLS minimum is 1.2, allow 1.3 through backend negotiation. Trust stores are explicit
immutable configuration snapshots. Insecure test policy must be conspicuously
named and opt-in. Follow the separate verification and identity setup in the
[OpenSSL 3.5 client guide](https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/).
4. Parse HTTP framing incrementally: reject conflicting Content-Length values and
Transfer-Encoding/Content-Length ambiguity, enforce CRLF and header limits, handle
informational responses, HEAD/no-body statuses, chunk extensions/trailers and
close-delimited bodies. Never reuse a connection with uncertain message boundaries.
Protocol conformance fixtures must cover RFC 9110/9112 before native promotion.
5. Default redirects remain disabled; enabling follows only 301/302/303/307/308, up to
five hops. 303 changes non-HEAD to GET and drops body/body headers; 301/302 preserve
method and require explicit replay permission for non-safe methods; 307/308 preserve
method and require a replayable body. Reject HTTPS downgrade by default. Resolve
relative references correctly; compare scheme/host/effective port. On origin change,
strip Authorization, Cookie and caller-declared sensitive headers; always rebuild
Host and keep Proxy-Authorization confined to its proxy hop. No implicit cookie jar.
6. Pool by origin, proxy identity and TLS/trust-policy generation. HTTP/1.1 initially
allows one exchange per connection, no pipelining. Return a lease only after body
and trailers finish; abandon/cancel closes it. No automatic replay after bytes may
have reached a peer. Upper layers supply idempotency policy.
7. Server accept → TLS → bounded headers/body → dispatch → streamed response → reuse.
Handler errors map through a configurable sanitized error mapper; no route is 404,
known path with wrong method is 405 with Allow. Disable further admission on stop,
drain admitted requests, then cancel/join connections. Static serving opens beneath
a retained directory handle through IO/System capability checks, not a stale pathname.
8. WebSocket upgrade validates version/key/Connection/Upgrade, origin policy and selected
subprotocol. Enforce client masking, server non-masking, fragmentation/control-frame
rules, UTF-8 text and close reasons, ping/pong and one close handshake. Disable
extensions initially. Frame callbacks borrow payload only during invocation; retained
payloads require owned copies. RFC 6455 fixtures and an independent peer are gates.
## Bounds and failure matrix
NEW defaults: 256 total client connections, 8/origin, 128 idle, 30-second idle eviction;
1,024 admitted client operations; 4,096 server connections and 256 executing handlers.
Headers: 32 KiB aggregate/100 fields/8 KiB start line. Buffered bodies: 8 MiB; streaming
uses 64 KiB chunks, 256 KiB per-direction windows and a 256 MiB module buffer budget.
WebSocket messages: 1 MiB, output: 64 messages or 4 MiB/session; either bound rejects
admission. Limits include in-flight buffers. Body streaming has an explicit optional
total-byte quota; there is no accidental zero-as-unlimited. Server headers expire at
10 seconds, idle at 30 seconds, admitted request at 30 seconds by default; a public
long-lived stream must opt into its own liveness policy. Shutdown grace: 10 seconds.
| Trigger | Terminal behavior and cleanup | Required evidence |
| --- | --- | --- |
| DNS/connect/proxy/TLS timeout | Timeout with phase; one completion; close/retire state | Stall every phase under one deadline |
| Unknown CA / wrong hostname | Peer verification error before request bytes | Separate fixtures for trust and identity |
| Body/header limit or malformed framing | Protocol/limit error; connection unusable | Split bytes at every boundary; smuggling corpus |
| Capacity exhaustion | Overload before allocation; optional cancellable capacity wait | Queue plus in-flight accounting |
| Cancellation mid-upload | Cancelled/unknown remote effect; close lease, retain buffers until IO ends | Stop/completion races, no replay |
| Slow consumer / WebSocket output full | Await explicit capacity or return overload; bounded memory | Slow-reader soak with max RSS |
| Handler throws or stream fails | Sanitized 500 before headers, otherwise terminate connection | Faulting handlers outside locks |
| Shutdown with peer stalled | Stop admission, grace then cancel/join; no callbacks after join | Destruction and descriptor-reuse races |
## Ordered implementation backlog
Every row is PLANNED; dependencies refer to completed evidence gates, not file existence.
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-NET-01 | P0; baseline | Freeze current client/router/URL fixtures and secure-behavior gaps; installed Net-only consumer records actual dependencies | sol_implementer |
| M-NET-02 | P1; M-NET-01, IO/Async/Time contracts | NEW context, resolver, socket/listener and deadline adapters; every phase cancellable without borrowed-state escape | astra_implementer |
| M-NET-03 | P2; M-NET-02 | OpenSSL peer+identity defaults, proxy validation, redirect algorithm; trust/hostname/cross-origin matrix passes on Boost adapter first | astra_implementer |
| M-NET-04 | P2; M-NET-03 | Native HTTP codec, real HTTP/HTTPS server, streaming, pool and safe static open; RFC corpus, fuzzing, independent peers pass | astra_implementer |
| M-NET-05 | P2; M-NET-04 | Native WebSocket client/server and session lifecycle; fragmented/control/close/UTF-8 conformance and shutdown races pass | sol_implementer |
| M-NET-06 | P3; M-NET-05 | Backend parity and performance gate; keep Boost selectable until migration consumer and workload evidence permit default switch | astra_implementer |
| M-NET-07 | P4; M-NET-06, RPC/Messaging gates | Distributed transport stress, reconnect and bounded streaming workloads; no safety claims inferred from availability alone | sol_implementer |
## Validation, compatibility and rollback
CURRENT checks are existing `VoidTests` and `VoidInstalledComponentConsumers` registered
in [tests/CMakeLists.txt](../../../tests/CMakeLists.txt). They were not rerun for this
documentation task. Current source fixtures are evidence of coverage intent, not new
passing results. PROPOSED checks add deterministic resolver/clock fault injection,
TLS/proxy loopback peers, parser fuzz targets and independent HTTP/WebSocket clients;
targets must be added before commands are advertised. Use [VALIDATION](../VALIDATION.md)
and [BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md) for the actual build gate.
Measure small reused requests, connection churn, large streaming downloads, many idle
WebSockets and slow consumers: p50/p95/p99, throughput, allocations, peak RSS/CPU, file
descriptors, handshake counts and build cost under [PERFORMANCE](../PERFORMANCE.md).
Separate cold DNS/TLS from warm pool results and Boost from native.
Major-release migration replaces unsafe defaults and whole-body APIs with secure
configuration and streaming, with an owning buffered convenience adapter. Existing
`HttpClient` remains documented during transition; a synchronous wrapper cannot block
the executor needed for its completion. Keep non-2xx transport-result semantics. Pools
must be recreated when trust/proxy identity changes. Roll back backend selection only
between operations; never replay an uncertain write on the old backend. See
[MIGRATION](../MIGRATION.md), [RPC](../subsystems/RPC.md),
[Security](Security.md), and [NetworkedApplications](../platforms/NetworkedApplications.md).
+199
View File
@@ -0,0 +1,199 @@
# Plugin generations, stable C ABI and reload protocol plan
Status: PLANNED feature work; no new ABI is delivered. Baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Requirements R-004, R-009, R-010 and R-013–R-016 apply. Preserve
[architecture](../ARCHITECTURE.md) C-03–C-05, C-09, C-10 and C-13.
## Existing source baseline and compatibility classes
[Plugin.hpp](../../../include/Void/Plugin/Plugin.hpp) defines `Void::Plugin::IPlugin`,
`PluginInfo`, `ABI_VERSION == 1`, C-linkage create/destroy/info symbols and optional
configuration/readiness/state-transfer exports. The serialized-state protocol carries
a state schema version and plugin-owned string release. Existing factory output is
still an IPlugin C++ object; its vtable, RTTI and callbacks require compatible toolchains.
The source's v2 state protocol is not a new general stable C ABI version.
[Loader.hpp](../../../include/Void/Plugin/Loader.hpp) owns one instance and is not
thread-safe. [Manager.hpp](../../../include/Void/Plugin/Manager.hpp) exposes pinned
`PluginHandle`, acquire/load/unload/reload/replace, validators, watching, observers and
state snapshots. [Manager.cpp](../../../src/Plugin/Manager.cpp) stages a fresh inode,
configures/restores/activates/checks readiness before atomic current-instance publication.
Acquisition also takes the registry mutex; do not infer a completely lock-free path
from the header's atomic-load description. Reload observers run after unlocking, but
candidate validation and plugin activation currently occur inside reload's map lock.
`dlclose_on_swap` defaults false to keep code mapped when arbitrary frames/callbacks
may survive; a new protocol must prove async quiescence before changing that default.
[Module.hpp](../../../include/Void/Plugin/Module.hpp) already supplies C++
`ModuleDescriptor`, `ModuleDependency`, `ActivationPolicy`, `ModuleHost`, `IModule`,
`ModuleReadiness`, activate/quiesce/checkpoint/restore/readiness/deactivate. The descriptor
contains STL, Json, Semver and unique_ptr factory types: it is explicitly a C++ descriptor.
Its default methods are not proof that a coordinated reload host exists.
[module.cmake](../../../src/Plugin/module.cmake) declares Functional/System/Data and
Unix dl; target declaration versus public descriptor includes needs isolated-consumer
validation under the shared dependency plan.
[Manager tests](../../../tests/standalone/Plugin/Manager.cpp),
[load-under-reload test](../../../tests/standalone/Plugin/HotReloadUnderLoad.cpp),
[configuration tests](../../../tests/standalone/Plugin/Configure.cpp), and
[module descriptor test](../../../tests/standalone/Plugin/Module.cpp) are existing
fixtures, not evidence of a stable C-only boundary or async pin protocol. Scoped graph
coverage was checked; Manager declarations/test helper ranges were directly read.
The initial loader remains native platform dynamic loading (`dlopen` on Linux), with
Void-owned descriptors and lifecycle; no external plugin framework is introduced.
Portability adapters must satisfy the same pin/release conformance before enabling unload.
## NEW stable C boundary
NEW proposed path: `include/Void/Plugin/CAbi.h`; use a separately named export
`void_module_query_v1`. Do not change the layout or reinterpret the meaning of
`void_plugin_info`, existing ModuleDescriptor or the frozen [ShortUrl V1](../../short-url.md).
The following is an illustrative C header shape, not an available ABI:
```c
typedef struct void_module_handle void_module_handle;
typedef struct void_operation_handle void_operation_handle;
typedef struct { const uint8_t *data; uint64_t size; } void_bytes_v1;
typedef struct {
uint32_t struct_size;
uint32_t abi_major;
uint32_t abi_minor;
uint32_t reserved;
uint64_t capabilities;
int32_t (*create)(const void *host_api, void_module_handle **out);
int32_t (*activate)(void_module_handle *, void_bytes_v1 config);
int32_t (*readiness)(void_module_handle *, uint32_t *out_ready);
int32_t (*request_stop)(void_module_handle *);
int32_t (*destroy)(void_module_handle *);
} void_module_api_v1;
/* int32_t void_module_query_v1(uint32_t host_size, void_module_api_v1 *out); */
```
Complete this table with versioned quiesce/resume, checkpoint/restore, interface
query/release and async-operation functions in M-PLUGIN-03 before freezing ABI V1.
Tail capabilities use size-checked extension tables; reject unknown major, truncated
required prefix and required capability mismatch. Copy descriptor metadata into host
ownership while the generation is pinned. Reserved fields are zero; lengths are checked
before conversion to size_t. Interface identifiers are fixed 128-bit byte values with
independent interface major/minor and a function-table size; they are not typeid hashes.
All boundary functions use fixed-width status codes and explicit error detail access
with owner-specific release. No exceptions, STL, reflection objects, standard-library
stop tokens or C++ allocation cross the C boundary. C++ adapters catch exceptions and
map operational failure; unknown exceptions become `internal_error` without unwinding
through C. The host passes a versioned host function table instead of an untyped payload
in the final header; the void pointer above stands for that separately sized table.
Input byte spans borrow only for the call. Checkpoint output is an opaque plugin-owned
buffer with `data/size/release`; the host copies within its cap before releasing through
the plugin. No allocator mismatch. Async submission copies required descriptors and
returns an opaque operation handle plus exactly one terminal callback. Host cancellation
maps its Async OperationOptions into explicit C request-stop/deadline fields relative
to the negotiated host monotonic clock; it never copies std::stop_token into C memory.
Release of an operation handle requires terminal acknowledgement and callback return.
The final ABI conformance specification defines callback thread/reentrancy and null-output
rules for every status; output handles are null on failed admission.
## Generation pins and unload invariants
Each loaded generation owns its mapping, instance, host registrations, service records,
subscriptions and an Async scope. Two independent counts matter: external generation
references (handles/function-table leases) and admitted async activities. Every callback,
coroutine frame, deferred destructor and operation allocated by a plugin retains an
activity pin until it and its terminal callback have returned. Capturing a raw plugin
function pointer in a host queue without a pin is forbidden by the adapter contract.
Retirement stops new generation admission, asks its scope/subscriptions to stop, joins
operations, releases provider references, calls deactivate/destroy once, then unmaps
only after no code/data reference remains. Host-side reclamation executes after a
plugin callback returns; never dlclose from the final callback's stack. Plugin-supplied
threads must register activity pins and join during quiescence. Native code is trusted
in-process code; it cannot be forcefully sandboxed by this ABI. Uncooperative code stays
mapped and is reported as pinned; optional process isolation belongs to [IPC](../subsystems/IPC.md).
Default: 64 modules, 256 interfaces/module, four retained generations/module, 64 MiB
retained mapped-image budget/module based on file accounting, 4 MiB checkpoint,
1 MiB configuration, 1,024 async activities/generation and 256 pending callbacks.
Mapped-image accounting is not an exact RSS measurement. Refuse further reload when
retention budget cannot accommodate old + candidate; never unmap to recover the budget.
Defaults for prepare/quiesce/readiness are 5/5/10 seconds within a 30-second total
reload deadline. Every phase shares Async's absolute total deadline and injected Time
clock; phase budgets can shorten it, never restart it.
## Reload state machine and rollback
Per-module transitions are serialized by a reload coordinator, outside the manager map
lock. The short lock reserves a generation/expected epoch; expensive filesystem work,
all validators, plugin code and release/destructor callbacks run after unlocking.
Publication rechecks the epoch. Dependency reload batches topologically order modules;
cycles or unsupported mixed activation policies fail before activating anything.
1. Verify immutable candidate identity/path, ABI and declared dependencies. Create and
configure a private candidate using a scoped unpublished Service registry. Activation
may prepare resources, but externally visible writes/registration are prohibited
until publication. A module unable to stage safely is RestartRequired.
2. For a stateless compatible replacement, candidate readiness can overlap old calls.
For stateful writers, close old mutation admission and call quiesce: complete all
admitted mutations and owned async writes, then checkpoint at Fsm/application state
boundaries. Old acquired handles remain valid but new mutation attempts receive
`quiescing`; they never run on freed objects. Reads can continue only if declared safe.
3. Restore the bounded versioned checkpoint into the candidate, activate deferred parts,
and await readiness without registry locks. The adapter requires an explicit resume
operation for the old generation; existing IModule's no-op quiesce alone is insufficient.
State migration is pure candidate construction; no destructive migration of the old
persistent state is permitted during a reversible reload.
4. Publish one Service-owned registry snapshot containing candidate interfaces and
generation metadata. Host `acquire` and service lookup use that same publication epoch,
avoiding inconsistent manager-current versus service-current swaps. Standalone legacy
PluginManager keeps its existing local publication until explicitly adapted.
5. Retire the old generation and drain pins. Before publication, any failure disposes
candidate registrations/activities and resumes old mutation admission after validating
its state. Resume failure yields degraded/not-ready status and requests a controlled
restart; it never falsely reports the old service healthy. Failed-candidate cleanup
errors retain its mapping and are reported separately from the original rejection.
Publication is a reversible in-memory switch only while old state remains a valid
continuation. After new writes, reverting requires a compatible reverse migration or
recovery from authoritative persistent state; do not silently discard them. Durable
release activation follows Update's healthy marker, as detailed in
[ReloadableApplications](../platforms/ReloadableApplications.md).
## Ordered implementation backlog
All feature rows are PLANNED.
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
| --- | --- | --- | --- |
| M-PLUGIN-01 | P0 / baseline | Inventory existing exports, descriptor includes, load/reload locks and compatibility fixtures | Existing C++ ABI/state protocol and frozen ShortUrl V1 documented independently / sol_implementer |
| M-PLUGIN-02 | P1 / M-PLUGIN-01; M-ASYNC-03 | Explicit generation/activity leases and host-owned retirement queue | Callback/operation/frame held through replacement prevents unmap; late completion releases once / astra_implementer |
| M-PLUGIN-03 | P2 / M-PLUGIN-02; Functional errors | Full CAbi.h specification, size/version negotiation, byte ownership, host clock/cancellation bridge and C++ adapter | C-only producer/consumer fixture, truncation/unknown-major rejection, throwing C++ shim contained / astra_implementer |
| M-PLUGIN-04 | P2 / M-PLUGIN-03; M-SERVICE-03 | Unlocked staged validation, dependency activation and coherent registry publication | Reentrant validator does not deadlock; failed candidate changes no active lookup / astra_implementer |
| M-PLUGIN-05 | P3 / M-PLUGIN-04; M-FSM-04 | Quiesce/checkpoint/restore/readiness/resume protocol with phase/total budgets | Outstanding writer drained; every prepublication phase failure resumes old state or reports degraded / astra_implementer |
| M-PLUGIN-06 | P3 / M-PLUGIN-05; Update activation gate | Retention accounting, safe unload capability, reloadable-host integration and migration kit | Stuck pins refuse new reload; post-commit cleanup never triggers invalid rollback / astra_implementer |
## Validation and migration
CURRENT aggregate command is
`ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60`;
not rerun here. PROPOSED tests need the NEW ABI and host adapters: C compiler headers,
different supported compiler producer/consumer matrix, layout/size checks, hostile length
fields, missing release, cancelled async callback after generation retirement, queued
std::function/frame pins, failed quiesce/restore/readiness/resume, reentrant observers,
rapid replacement epoch conflict, and immutable-path replacement under sustained calls.
Compile compatibility claims only for observed matrix entries. Native malicious code
is outside the in-process fault model; do not fuzz arbitrary plugins in the host process.
Measure acquire/reload/quiescence p50/p95/p99, call throughput, allocations, retained
generation count, image bytes, peak RSS/CPU and adapter build cost under
[PERFORMANCE](../PERFORMANCE.md). No measured reload downtime is claimed.
Keep current IPlugin/ModuleDescriptor APIs as same-toolchain adapters. A stable C module
opts into the new query symbol and tables; existing symbols do not silently change.
Existing `PluginHandle::raw_symbol` remains valid only while its handle lives; replace
manager-wide borrowed-symbol usage with a pinned lease. Default dlclose stays disabled
until activity-pin conformance passes. Rollback can select the legacy manager for
legacy plugins before loading; it cannot replay external effects or free stuck code.
See [MIGRATION](../MIGRATION.md), [VALIDATION](../VALIDATION.md),
[DEPENDENCIES](../DEPENDENCIES.md), and [BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md).
+129
View File
@@ -0,0 +1,129 @@
# Resilience implementation plan
Status: planning only; all feature tasks PLANNED. Source baseline
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Applies [requirements](../REQUIREMENTS.md) R-005, R-009, R-012, R-014–R-016 and
[architecture](../ARCHITECTURE.md) C-02–C-05, C-11, C-13.
## Current primitives and gaps
`Void::Resilience` is a native header implementation with no declared module
dependencies in [module.cmake](../../../src/Resilience/module.cmake).
[Resilience.hpp](../../../include/Void/Resilience/Resilience.hpp) gathers
[TokenBucket](../../../include/Void/Resilience/RateLimiter.hpp),
[KeyedRateLimiter](../../../include/Void/Resilience/KeyedRateLimiter.hpp),
[CircuitBreaker](../../../include/Void/Resilience/CircuitBreaker.hpp), and
[ResourceMonitor](../../../include/Void/Resilience/ResourceMonitor.hpp).
Injected steady-clock functions already support deterministic tests. Keyed buckets can
be capped but default to historical unbounded `max_keys == 0`; cleanup scans the map.
ResourceMonitor invokes threshold callbacks outside its mutex and clamps over-release.
Important implementation gaps: `CircuitBreaker::allow()` admits all callers after
transitioning to HalfOpen; its comment about one probe is not enforced by a lease.
Late outcomes are not associated with a breaker generation. Token costs/configuration
are not validated for negatives/NaN. ResourceMonitor compares `usage_ + amount`, which
needs overflow-safe subtraction, and callback setters need synchronized publication.
These are proposed repairs, not claims that the current tests expose every issue.
Existing [breaker tests](../../../tests/standalone/Resilience/CircuitBreaker.cpp),
[bucket tests](../../../tests/standalone/Resilience/RateLimiter.cpp),
[keyed tests](../../../tests/standalone/Resilience/KeyedRateLimiter.cpp), and
[monitor tests](../../../tests/standalone/Resilience/ResourceMonitor.cpp) exercise
transitions, refill, cap/cleanup and hysteresis. Scoped graph coverage reported matching
metadata/no recorded gaps for these paths; implementation and test source were inspected.
## Native policy model and NEW APIs
Keep synchronous admission primitives standard-library-only, with no scheduler or logging
dependency. Put cancellable waits/composition in an optional Async adapter; retries reuse
Functional's policy owner rather than creating a second retry engine. Metrics flow through
optional [Observability](../subsystems/Observability.md) hooks outside locks.
```cpp
// NEW illustrative Void::Resilience shapes; Result follows C-02.
struct BucketConfig { double capacity{100}; double refill_per_second{100}; };
struct Admission { bool allowed; std::chrono::nanoseconds retry_after; };
class Permit { // move-only; exactly one outcome; release on destruction
void finish(Outcome); // success, dependency_failure, neutral
};
class Breaker {
Result<Permit> acquire(); // refusal is CircuitOpen, never an empty success
};
class Bulkhead {
Result<Permit> try_acquire(); // limits active plus admitted waiting work
};
// Async adapter uses Async-owned OperationOptions and Time-owned Clock.
```
Select consecutive-failure breaker initially: five failures opens; 5-second cooldown;
one simultaneous HalfOpen permit; two sequential successful probes close. A permit
captures generation and probe identity. Old-generation completions release resources
but cannot close a newer Open state. Abandoning a probe is neutral and releases its
slot; it does not leave the breaker permanently HalfOpen. Timeout counts only when
classified as dependency failure; local overload/caller stop/auth rejection are neutral.
Callbacks run outside locks and do not change the recorded outcome on observer failure.
Token refill uses `max(last, now)` so a clock moving backwards cannot cause later double
credit. Validate finite positive capacity/cost, finite nonnegative refill and cost ≤
capacity. Zero refill is a finite non-refilling bucket, not an unlimited rate. Costs
use checked arithmetic; a failed multi-limit admission rolls back every reservation.
NEW keyed defaults: 10,000 keys, maximum encoded key 256 bytes, 5-minute idle retention;
cleanup processes at most 256 entries/turn using a maintained cursor. At cap reject new
keys; do not evict an active client's bucket and reset its quota. Keys must be normalized
by the caller and must not become raw high-cardinality metrics labels.
Composition order: deadline/stop check → rate admission → bulkhead → breaker permit →
one attempt → classify outcome → release permits → retry policy decides next attempt.
A retry re-enters limits and shares the original total deadline. Default adapter: three
attempts total, full jitter with 100 ms base and 2-second cap, only explicitly retryable
and replay-safe work. No retry of an unknown write without identity/dedup support.
No queue is created by `try_acquire`; asynchronous waiting is explicit FIFO admission.
Default bulkhead is 64 active and 128 waiting; expired waiters are removed before admission.
## Ownership, limits and failures
Permits own their reservation until finish/destruction; the limiter state is retained
until the last permit returns. Closing stops admission, cancels waiters, and joins owned
adapter tasks without destroying in-use state. Observers cannot borrow a dead limiter.
Resource budgets count queue, executing attempts and delayed retries separately; default
aggregate adapter retention is 8 MiB. Monitoring uses `amount > limit - usage` after
invariant checks. New strict permits reject over-release; legacy clamping remains an
adapter behavior. Default hysteresis remains high 90%, low 70%, with validated ordering.
| Fault | Decision | Evidence gate |
| --- | --- | --- |
| Invalid/NaN config or negative cost | Configuration/input error; consume nothing | Boundary/property tests |
| Key/queue cap full | Overload with retry hint when computable | Churn cannot reset live quotas |
| Stop while waiting/retrying | Remove waiter/timer, one cancelled result | Stop vs grant/retry race |
| Failure races with cooldown probe | Generation decides, one active probe | Hundreds of concurrent acquisitions |
| Observer throws/reenters | Isolate observer error; reservation remains correct | Reentrant acquire/release tests |
| Dependency outage | Open breaker, bounded retry traffic | Deterministic outage/recovery history |
| Clock regresses / integer overflow | No refill gain / reject reservation | Min/max integer and reversed time |
## Task DAG
| ID | Phase / dependencies | Implementation and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-RESILIENCE-01 | P0; baseline | Record existing semantics and reproduce probe, invalid-cost and overflow gaps with meaningful regressions | sol_implementer |
| M-RESILIENCE-02 | P1; M-RESILIENCE-01, Functional/Time contracts | Validated configurations and machine-readable admission errors; ordinary use needs no runtime | sol_implementer |
| M-RESILIENCE-03 | P2; M-RESILIENCE-02 | Generation-bound RAII permits, bounded keyed cleanup, monitor synchronization; races and arithmetic tests pass | astra_implementer |
| M-RESILIENCE-04 | P2; M-RESILIENCE-03, Async foundations | Optional bulkhead/wait/retry adapter; finite queues, total deadline, stop/join verified | sol_implementer |
| M-RESILIENCE-05 | P3; M-RESILIENCE-04, Net/RPC foundations | Network policy recipes and observations; retries cannot amplify beyond configured attempt/admission budgets | sol_implementer |
| M-RESILIENCE-06 | P4; M-RESILIENCE-05, Replication gate | Partition/recovery workloads separate local overload from peer failure; limits never substitute for quorum safety | astra_implementer |
## Validation and migration
CURRENT tests are the four linked source suites in existing VoidTests; no execution is
claimed here. PROPOSED verification adds deterministic model histories, concurrency and
sanitizer tests, callback reentrancy, cancelled FIFO waiters and bounded cleanup work.
Targets are added in implementation before advertising runner commands; use
[VALIDATION](../VALIDATION.md). Benchmark hot-key contention, high key churn, empty/full
admission, retry storms and observer overhead; capture p50/p95/p99, throughput, allocations,
peak RSS/CPU and build cost per [PERFORMANCE](../PERFORMANCE.md).
Major-release migration changes zero/unbounded configuration to an explicit policy and
replaces boolean breaker admission with a permit. Existing synchronous methods receive
deprecated wrappers where semantics can be preserved; do not promise a one-probe guarantee
through an API that cannot retain probe ownership. Ship comparison fixtures and a
rollback switch for the optional composition layer; never discard active reservations
on policy replacement. See [MIGRATION](../MIGRATION.md), [Net](Net.md) and
[Messaging](../subsystems/Messaging.md).
+133
View File
@@ -0,0 +1,133 @@
# Security implementation plan
Status: planning only; all feature tasks PLANNED. Baseline
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Authority: [requirements](../REQUIREMENTS.md) R-004, R-006, R-009, R-012, R-014–R-016;
[architecture](../ARCHITECTURE.md) C-02–C-05, C-07, C-09, C-13.
## Existing capabilities and boundary
[Security.hpp](../../../include/Void/Security/Security.hpp) exposes `Void::Security`
random URL-safe bearer tokens, BLAKE2b-256 token digests and verification, Argon2id password
hashing/verification, random secret keys and authenticated local secret envelopes.
[Security.cpp](../../../src/Security/Security.cpp) initializes libsodium once, uses
`sodium_memcmp` for decoded token digests, sodium password presets and `crypto_secretbox_easy`.
The actual secret format is a 24-byte nonce followed by secretbox's combined authenticated
ciphertext, with 16 bytes authentication overhead; preserve these bytes rather than inferring
layout from the header's informal description. Existing `SecretKey` is a copyable 32-byte
array; existing plaintext/results are ordinary vectors/strings, not secure allocations.
[module.cmake](../../../src/Security/module.cmake) declares Functional and Sodium::Sodium.
[Tests](../../../tests/standalone/Security/Security.cpp) cover token shape/digest, malformed
digest rejection, salted Argon2id with Interactive tests, secret round-trip, tampering and
wrong-key rejection. A test name mentioning constant time is not timing side-channel proof.
No account store, login/session manager, policy engine, TLS identity service or revocation
workflow ships here. Graph coverage for all four source files matched metadata with no
recorded issue; source verification grounds these claims.
## Backend and workflow architecture
Retain libsodium for existing primitives; do not write replacement crypto. Keep low-level
primitives usable without Storage, Net or Runtime. [Crypto](Crypto.md) owns interoperable
hash/signature primitives; Net owns TLS peer checks. Security owns NEW authentication,
principal/session and authorization workflows expressed through injected ports. Concrete
Storage/Sqlite adapters are optional higher targets and cannot become primitive dependencies.
External identity protocols such as OIDC are a later explicitly versioned adapter capability;
initial completion is local accounts and opaque bearer sessions, not an implicit JWT system.
```cpp
// NEW illustrative Void::Security shapes; not existing compilable APIs.
class SecureBuffer; // move-only; explicit readable span, wiped on release
struct Principal { SubjectId subject; std::vector<RoleId> roles; };
struct SessionPolicy { std::chrono::seconds ttl{3600}; std::size_t max_per_subject{16}; };
class AccountSessionPort { /* versioned compare/exchange, atomic session create/revoke */ };
class Authenticator {
Task<Result<SessionGrant>> login(LoginInput, OperationOptions);
Task<Result<Principal>> authenticate(BearerToken, OperationOptions);
Task<Result<void>> revoke(SessionId, OperationOptions);
};
Decision authorize(const Principal&, ActionId, const ResourceAttributes&);
```
Result/operation/clock/executor shapes are owned by Functional/Async/Time. Identifiers
above are NEW Security domain types; no bearer secret has implicit formatting/serialization.
Authenticator holds port ownership through shutdown; a principal is an immutable value
snapshot with an authorization-policy generation. Authentication validates identity;
authorization evaluates explicit actions and resources, default deny, deny overrides allow.
Limit roles to 64/principal, policy rules to 4,096 and expression depth to 16. First policy
language is native typed predicates without arbitrary scripts or filesystem/network access.
Login dataflow: bounded parse → identity normalization → rate admission → account lookup →
bounded password job → credential-version check → atomic session write → return raw token
once. Unknown account and wrong password share public denial and comparable work using a
precomputed dummy hash; internal audit reasons differ. Credential changes racing with login
invalidate the write through the port's version precondition. Store only digest, subject,
expiry, roles/policy version and revocation generation. Tokens contain 32 entropy bytes;
logging, URLs and metrics never carry them. Rehash-on-success uses a version-checked update
and must not accidentally resurrect disabled credentials.
Authenticate hashes the token and reads the authoritative session state on every call
initially; positive caching is disabled so revocation has no hidden cache window. TTL uses
civil time injected by Time with an explicit clock-health check; monotonic deadlines govern
operations. Startup clock rollback beyond configured 60-second tolerance fails session
admission until reconciled. This tolerance is not a distributed clock safety guarantee.
Revocation succeeds only after durable port acknowledgement. Lost replies have unknown
outcome; query/retry by session identity. Authorization has no network side effects.
## Resource and failure decisions
NEW defaults: password input ≤1 KiB, encoded hashes ≤1 KiB, tokens ≤512 bytes, local secret
plaintext ≤16 MiB. Select Moderate for new stored passwords; accept supported existing
encoded strengths only within an operator-approved verification budget. Do not reduce hash
strength silently. Password jobs reserve their encoded memory cost before starting: default
aggregate 512 MiB, at most two jobs and 32 waiters. If a preset exceeds the budget, report
configuration/resource error. Password computation is not forcibly interruptible; cancelled
jobs retain buffers/budget until completion, discard output and cannot create a session.
Default sessions: 10,000 total, 16/subject, one-hour TTL; capacity includes unexpired entries.
Explicit expiry cleanup is bounded at 256 records/turn. Shutdown closes admission and joins
credential jobs before clearing secure buffers.
SecureBuffer uses sodium-assisted wiping and optional locked allocation; inability to meet
a required locked-memory policy is an error, never an implicit downgrade. It does not claim
to prevent every copy made by application code, swapping policy or core dumps. Add a NEW
versioned secret envelope with magic/version/algorithm/key-id/length and authenticated metadata;
legacy nonce+combined-ciphertext decoding stays a separate explicitly selected API. New writers
never guess legacy format after authentication failure. Key rotation reads old key IDs, writes
only the active ID, and retires a key only after an inventory proves no required ciphertext remains.
| Trigger | Outcome and ownership | Validation |
| --- | --- | --- |
| Sodium init / randomness failure | Backend error; publish no token/key | Backend fault seam |
| Wrong/malformed credentials | Public denied; bounded work and internal audit reason | No user enumeration in response |
| Encoded password requests excessive cost | Reject before costly allocation | Malicious encoded-hash corpus |
| Store unavailable / policy load invalid | Fail closed; do not issue anonymous success | Port outage and version races |
| Stop during hash | One cancelled result; running job drains, no session write | Cancellation vs completion |
| Session expired/revoked | Denied; never recreate from token alone | Revoke/login/clock histories |
| Secret authentication fails | Error with no plaintext publication | Every field and key mutation |
| Observer/audit failure | Explicit audit policy; local login default fails if mandatory audit cannot admit | Full audit queue, no secrets retained |
## Task DAG and acceptance
| ID | Phase / dependencies | Scope and gate | Recommended role |
| --- | --- | --- | --- |
| M-SECURITY-01 | P0; baseline | Freeze token/password/secret fixtures including actual envelope bytes; distinguish test names from security proof | sol_implementer |
| M-SECURITY-02 | P1; M-SECURITY-01, Memory/Functional contracts | SecureBuffer, input/cost validation, error separation; wipe and allocation-failure tests | astra_implementer |
| M-SECURITY-03 | P2; M-SECURITY-02, Async/Time/Resilience gates | Account/session ports and local workflows; revocation, version races, capacity and hash-stop tests pass | astra_implementer |
| M-SECURITY-04 | P2; M-SECURITY-03 | Typed default-deny authorization and versioned secret/key rotation; unknown policy/version fails closed | astra_implementer |
| M-SECURITY-05 | P3; M-SECURITY-04, Storage or Sqlite adapter, Net | Durable auth adapter and network integration; no Security→Storage/Net cycle, restart/revocation acceptance | sol_implementer |
| M-SECURITY-06 | P4; M-SECURITY-05, Replication | Optional replicated auth port; quorum revocation and partition denial tested; external identity remains a separate capability gate | astra_implementer |
CURRENT verification is existing VoidTests source coverage above; nothing rerun here.
PROPOSED checks require deterministic port/clock fixtures, malformed hashes/envelopes,
secret-lifetime instrumentation, concurrent revocation and backend error injection before
new runner commands are documented. Measure password queue/work latency separately, token
lookup p50/p95/p99, throughput, allocation/RSS/CPU and build cost; run under fixed memory
budgets, not reduced password cost to improve a benchmark. See [PERFORMANCE](../PERFORMANCE.md),
[VALIDATION](../VALIDATION.md), and [BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md).
Migration preserves old verification and secret decoding, while new APIs adopt move-only
secrets and explicit policy. Do not reinterpret old envelope bytes or silently turn existing
digest storage into session authentication. Rollback keeps old keys/readers until all new
records are supported; disable new writers before reverting. Invalid-policy rollback
retains the last validated immutable policy only when the operator explicitly selects that
policy; it cannot manufacture authorization. See [MIGRATION](../MIGRATION.md).
+159
View File
@@ -0,0 +1,159 @@
# Service ownership, lifecycle and replacement plan
Status: PLANNED feature work. Baseline: `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`,
inspected 2026-11-24. Requirements R-004, R-009, R-010 and R-013–R-016 apply.
[Architecture](../ARCHITECTURE.md) C-02–C-05 and C-09 owns shared semantics.
## Existing source baseline
[Service.hpp](../../../include/Void/Service/Service.hpp) defines
`Void::Service::IService`, with `service_name`, `on_start`, and `on_stop`.
[Registry.hpp](../../../include/Void/Service/Registry.hpp) defines
`ServiceRegistry`: type-indexed shared_ptr providers, replacement/removal, local-first
parent lookup, and registration/reverse-registration lifecycle order. `get<I>()`
returns an owning shared_ptr, but `require<I>()` returns `I&` after a temporary owning
lookup; concurrent replacement can invalidate that reference. `start_all`/`stop_all`
invoke callbacks while holding a registry shared lock. Parent lifetime is borrowed.
Lifecycle has no dependency DAG, readiness or failed-start rollback contract.
[PluginService.hpp](../../../include/Void/Service/PluginService.hpp) provides
`PluginServiceBinding<I>` using `void_plugin_service`, RTTI cross-cast validation and
an aliasing shared_ptr that retains a `PluginHandle`. Its existing generation pin is
valuable; C linkage for the factory does not make the returned C++ IService stable
across toolchains. [module.cmake](../../../src/Service/module.cmake) declares Functional
and Log, while the optional plugin bridge's includes reach Plugin. Packaging that
bridge separately is part of the target dependency cleanup, not a reason for Plugin
and Service core to depend cyclically on one another.
Existing [registry tests](../../../tests/standalone/Service/Registry.cpp) cover provider
lookup/replacement/removal and lifecycle order;
[scoped tests](../../../tests/standalone/Service/ScopedRegistry.cpp) cover parent
fallback/shadowing; [orchestrator tests](../../../tests/standalone/Service/Orchestrator.cpp)
exercise consumers in Fsm. Graph paths were coverage-checked; PluginService line 52
was directly read. Important callback and ownership conclusions were source-verified.
## NEW owning API and registry model
Design sketch; these additions are not existing declarations:
```cpp
namespace Void::Service {
template<class I> class ServiceHandle { // owns provider and code pin
public:
I* operator->() const noexcept;
std::uint64_t generation() const noexcept;
};
// NEW registry methods:
// acquire<I>() -> Result<ServiceHandle<I>>;
// prepare_batch(ProviderSet, ExpectedEpoch) -> Result<PreparedPublication>;
// publish(PreparedPublication&&) -> Result<PublicationEpoch>;
// start(options) / close_and_join(options) use Async::OperationOptions.
}
```
ServiceHandle owns an immutable provider record: interface pointer, shared provider
owner, generation pin and publication epoch. Copies extend lifetime. Acquisition of
an absent provider returns `missing_service`; a stopped admission gate returns
`service_stopping`. The handle is held across an entire call/await. Removing a registry
entry prevents new lookup but never invalidates acquired handles or releases plugin
code while a continuation is active. Provider retirement is distinct from destruction.
Use immutable registry snapshots and one atomic retained-snapshot pointer. A batch
publication atomically replaces all interfaces belonging to a generation; a request
needing a coherent group acquires one snapshot. Type-index keys remain same-toolchain
only; stable C interface IDs and version negotiation belong to [Plugin](Plugin.md).
ProviderSet rejects duplicate interface IDs, null providers, missing required
dependencies and cycles. Aliases of one lifecycle object have a single lifecycle node.
The base registry is native standard containers/shared ownership, without Runtime,
Plugin or a concrete telemetry dependency. Async lifecycle support and the plugin
binding are higher adapters. A child snapshot retains its parent snapshot, so it can
outlive the parent registry object; new parent publications are observed only through
explicit child refresh/new acquisition policy. Choose snapshot parent semantics for
NEW scoped handles and document the difference from today's live borrowed fallback.
## Startup, rollback and safe replacement
Provider descriptions declare stable local service IDs and required/optional edges.
Topologically sort required edges with registration sequence as a deterministic tie
break. Prepare a retained lifecycle snapshot under a short guard, then release the
guard before invoking any application callback. Lifecycle operations are serialized
by a coordinator state machine; ordinary lookups do not wait for callback execution.
Reentrant lookup is supported. Reentrant lifecycle mutation queues a bounded request
for the next epoch rather than recursively starting/stopping services.
Start transitions constructed → starting → ready. A provider's start/ready call may
fail; then stop every provider whose start succeeded in reverse dependency order.
Also call the failed provider's specified abort-start cleanup to release partial work.
Aggregate cleanup errors while retaining the original startup error. Providers are
unpublished until the required set is ready. Legacy void callbacks adapt by catching
exceptions at the C++ boundary and mapping them into structured failures.
Replacement prepares candidate providers in a private snapshot and validates readiness
before publication. ExpectedEpoch prevents stale concurrent replacements. The publish
guard performs only a preallocated pointer swap; the old snapshot is retired outside
the guard so final shared_ptr destruction cannot run user destructors under a lock.
Notification callbacks run outside locks. A failed candidate keeps the old snapshot.
Publication success is not a durable Update commit; that belongs to VersionStore.
Retired providers stop admitting new mutations when their owner requests quiescence,
while existing handles remain valid for their documented operations. Their owned Async
scope drains before `on_stop`/destruction. Do not call stop merely because a newer
provider was published if that would invalidate an acquired handle. A retired-generation
coordinator retains cleanup responsibility until all calls and async pins end. Stateless
readers may overlap generations; stateful writers require Plugin's quiescence protocol.
Shutdown stops publication and lookup admission, stops dependents before dependencies,
joins their work, then releases owners. Noncooperative work yields a shutdown report
and keeps owners retained; a deadline never licenses freeing live providers.
## Bounds, failures and observability
Default 256 providers/registry, 16 parent levels, 1,024 dependency edges, 64 staged
changes, 128 lifecycle requests and four retained publication generations. Admission
over these limits returns overload before invoking callbacks. At most one lifecycle
transaction prepares per registry; concurrent requests have expected-epoch conflicts
or bounded waiting using [Async](Async.md) options. Retention exhaustion refuses new
replacement until pins drain. No forced eviction of old code or provider objects.
Errors distinguish missing, conflict, cycle, start failure, not-ready, stop failure,
cancelled, timed-out and retained-generation limit. Emit optional bounded observations
for epochs, retained handles, callback duration and rollback outcomes, with
[Observability](../subsystems/Observability.md) adapters above the registry. Do not log
configuration payloads or capture transient thread-local context. Stable interface IDs
are not authorization; application policy controls which providers may be registered.
## Ordered implementation backlog
Every row is PLANNED.
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
| --- | --- | --- | --- |
| M-SERVICE-01 | P0 / baseline | Characterize borrowed require, lock-held callbacks, parent and alias lifetime; package bridge map | Regression cases distinguish owning get from borrowed require; declared dependencies recorded / sol_implementer |
| M-SERVICE-02 | P1 / M-SERVICE-01; Functional error gate | Owning handles, immutable snapshots, retained parents, atomic provider batches | Old handles survive remove/replace/parent destruction; batch readers see one epoch / astra_implementer |
| M-SERVICE-03 | P2 / M-SERVICE-02; Async scopes | Dependency lifecycle coordinator, readiness, failed-start cleanup and reverse rollback | Callback can acquire services without deadlock; middle-node failure leaves nothing newly published / astra_implementer |
| M-SERVICE-04 | P2 / M-SERVICE-03; Plugin pin gate | Separate plugin bridge adapter, staged publication, retired-provider drain | In-flight async call pins exact generation through completion; no callback/destructor under registry guard / astra_implementer |
| M-SERVICE-05 | P3 / M-SERVICE-04; Configuration snapshot gate | Bounded retention, Runtime/Fsm composition and migration | Retention saturation rejects reload; shutdown joins dependency graph and reports incomplete owners / sol_implementer |
## Validation, performance and migration
CURRENT aggregate command:
`ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60`;
not rerun here. PROPOSED tests require NEW APIs: concurrent remove/acquire, provider
destructor reentering registry, start callback registering another service, duplicate
lifecycle aliases, parent destruction, dependency cycles, readiness timeout, second
provider start failure, stop throws, reader held across four reloads, and async callback
completion after publication. Lifetime/race sanitizers supplement deterministic barriers.
Measure acquisition and publication p50/p95/p99, lookup throughput under read/write
contention, allocations, retained provider RSS/CPU, shutdown latency and template build
cost per [PERFORMANCE](../PERFORMANCE.md). Compare immutable snapshots with the existing
shared-mutex path using identical service sets; do not assert universal improvement.
EXISTING `auto& svc = registry.require<I>();` migrates to NEW
`auto svc = registry.acquire<I>();` and retaining `*svc` through the call. Existing
`get<I>()` remains a safe ownership bridge for simple same-toolchain providers.
Deprecate borrowed require before removal at the major boundary. Legacy registration
order is retained in the no-dependency adapter; dependency-aware startup is explicit.
Never roll back a published generation by destroying live handles: publish another
validated snapshot. See [MIGRATION](../MIGRATION.md), [VALIDATION](../VALIDATION.md),
[Runtime](../subsystems/Runtime.md), [Fsm](Fsm.md), and [DELIVERY](../DELIVERY.md).
+123
View File
@@ -0,0 +1,123 @@
# ShortUrl implementation plan
Status: planning only; all feature tasks PLANNED. Baseline
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Authority: [requirements](../REQUIREMENTS.md) R-004, R-010, R-014–R-016;
[architecture](../ARCHITECTURE.md) C-02–C-05, C-09, C-13.
## Frozen source contract, not a shipped provider
[ShortUrl.hpp](../../../include/Void/ShortUrl/ShortUrl.hpp) declares the EXISTING
`Void::ShortUrl::V1` service, current aliases in `Void::ShortUrl`, service ID
`void.short-url`, version 1, request/result/error types, health and `IShortener`.
`IShortener` derives from Service::IService; resolution defaults to `ErrorCode::unsupported`.
There is no built-in storage or HTTP provider in this module's inventory.
[module.cmake](../../../src/ShortUrl/module.cmake) declares only Service.
[Tests](../../../tests/standalone/ShortUrl/ShortUrl.cpp) exercise a test subclass, identity,
shorten result and optional resolution. This is not a production provider acceptance test.
All three source paths reported matching graph metadata/no recorded issue and were read.
The existing [contract document](../../short-url.md) is preserved. V1 enum ordinals,
member order and virtual order are frozen; same-toolchain C++ ABI restrictions remain.
Nonempty custom keys and nonzero expiry must be honored or rejected as unsupported/conflict.
Zero expiry means permanent; a returned owning provider handle must pin its implementation
for the whole call. The existing header's `unsupported` is the exact error enumerator.
## Completion scope and NEW interfaces
Build native provider logic around injected repository/clock/randomness ports. Keep V1
headers dependent only on Service; optional local and remote provider targets own Storage
and Net dependencies respectively. No external short-link service/account is assumed.
Select the original [Storage](../subsystems/Storage.md) as the first durable local adapter;
an in-memory test adapter establishes semantics but is explicitly nondurable.
```cpp
// NEW illustrative types, outside the frozen V1 interface.
namespace Void::ShortUrl::V2 {
struct ShortenOptions { OperationOptions operation; OperationId id; };
struct Link { std::string key; std::string target_url; Expiry expiry; };
class Provider {
Task<Result<Link>> shorten(CreateLink, ShortenOptions);
Task<Result<Link>> resolve(Key, OperationOptions);
Task<Result<void>> revoke(Key, OperationOptions);
};
}
// NEW LocalProvider composes LinkRepositoryPort, Time clock and Security randomness.
// NEW V1Adapter implements V1::IShortener without adding virtuals or changing layout.
```
Async owns operation options and task lifecycle; Functional owns Result. V2 uses a new
service version/lookup entry, never replaces a V1 provider under an incompatible cast.
The proposed Service C ABI is a separate adapter, not a reinterpretation of V1 objects.
V1Adapter blocks only on an allowed calling thread and maps domain errors to existing
ErrorCode values. It cannot pretend V1 has cooperative cancellation or request identity.
Local create dataflow: validate URL/key/expiry → authorization/rate admission at the host →
generate or validate key → conditional insert plus operation-result record atomically →
durable acknowledgement → construct short URL from configured canonical public base.
Targets accept absolute http/https, no userinfo/control characters; no fetch/preview happens
by default, so create does not contact the target. Host policy can forbid destinations;
if previews are later added, SSRF controls are a separate mandatory capability gate.
Default generated key is 16 base62 characters from rejection-sampled secure randomness;
eight collision retries then conflict/resource error. A custom key is 1–64 ASCII
alphanumerics, '-' or '_', case-sensitive, with reserved route names rejected. Target URL
limit is 8 KiB. Key and target are owned immutable values after admission.
Records contain key, exact target, expiry, revocation flag, creation identity and schema
version. Resolve reads one consistent record: absent → not_found, revoked → revoked,
expired → expired, otherwise return exact stored URL. Expiry is an injected civil instant;
clock-health failures do not extend a link silently. Cleanup is separate from logical expiry.
Revoke creates a tombstone; key reuse is disabled initially so cached old links cannot point
at a new target. V2 idempotency records make retries safe within a configured 24-hour
retention window; expired identities return identity_expired, with no silent retry claim.
RemoteProvider is a NEW generic adapter SPI: explicit origin, secure Net policy, request/
response schema and capability flags. Every provider supplies a conformance fixture;
unsupported custom key/expiry/resolve is reported before network mutation where possible.
Remote errors preserve retry-after and unknown-outcome classification internally; the V1
mapping uses provider_error/unavailable/timeout without fabricating a local rollback.
## Limits and failure matrix
NEW defaults: 128 concurrent operations, 256 waiters, 16 MiB transient budget; remote
responses ≤1 MiB and 10-second total deadline. Local live/tombstone entries have a configured
disk quota, initially 1 GiB, and 10,000 retained V2 operation outcomes; full retention blocks
new creates until cleanup, never drops active identities arbitrarily. Tombstones count toward
quota; reclamation/key reuse requires a later explicit compatibility design. No module-global
worker; managed hosts own cleanup scheduling. Shutdown stops admission and joins storage/network
operations; V1 plugin pins remain held until synchronous calls finish.
| Fault | Required outcome | Gate |
| --- | --- | --- |
| Invalid URL/key/expiry | invalid_request/invalid_url; no mutation | Encoded/control/scheme boundary corpus |
| Custom key collision | conflict, no overwrite | Concurrent conditional inserts |
| Unsupported capability | unsupported, no ignored request fields | Provider conformance matrix |
| Disk/sync failure | storage or unknown commit outcome; inspect/retry by V2 ID | Crash after commit before reply |
| Remote timeout after send | timeout with unknown outcome internally; no blind create replay | Lost response test |
| Expiry/revoke races | Resolve sees a consistent record; no target resurrection | Controlled clock and transaction histories |
| Provider unload during call | Owning Service pin retains generation | Reload during blocked shorten |
| Quota/queue exhausted | rate_limited or resource/unavailable mapping, bounded retention | Full quota plus churn |
## Task DAG
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-SHORTURL-01 | P0; baseline | Freeze V1 headers/ABI fixtures and exact semantics; test aliases and default unsupported | sol_implementer |
| M-SHORTURL-02 | P1; M-SHORTURL-01, Service/Functional contracts | NEW V2/domain ports and V1 adapter specification; no V1 layout or method edits | astra_implementer |
| M-SHORTURL-03 | P2; M-SHORTURL-02, Time/Security, Storage conditional batches | Native local provider with durable identity and quota; crash/conflict/expiry tests | sol_implementer |
| M-SHORTURL-04 | P2; M-SHORTURL-02, Net secure/streaming gate | Remote provider SPI and fixture provider; capability and unknown-outcome tests, no shipped external account assumption | sol_implementer |
| M-SHORTURL-05 | P3; M-SHORTURL-03, M-SHORTURL-04, Plugin/Service | Host wiring, metrics and reloadable pins; compatible V1 consumers pass | astra_implementer |
| M-SHORTURL-06 | P4; M-SHORTURL-05, DistributedStorage single-group gate | Optional replicated repository adapter; minority create rejection, committed resolve/revoke history | astra_implementer |
CURRENT checks are linked source tests registered in VoidTests, not rerun here. PROPOSED
provider contract fixtures, process crash points, schema/ABI consumers and reload races
must be added before runner commands are documented. Measure create/resolve p50/p95/p99,
throughput, allocations, RSS/CPU, collision retries, retained records and build cost under
[PERFORMANCE](../PERFORMANCE.md); do not infer provider readiness from interface tests.
Migration leaves V1 and [docs/short-url.md](../../short-url.md) intact. Introduce V2 and
versioned records additively, with V1 mapping tests and explicit data export. Rollback
disables new writes, retains readable old records and provider generations, and never
reuses revoked keys. See [MIGRATION](../MIGRATION.md), [VALIDATION](../VALIDATION.md),
[BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md), and
[NetworkedApplications](../platforms/NetworkedApplications.md).
+165
View File
@@ -0,0 +1,165 @@
# Sqlite — first-class SQLite C API integration
Status: plan; all implementation tasks PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
R-007 and [C-02–C-05/C-08](../ARCHITECTURE.md) require this module to remain distinct from
the original [Storage](../subsystems/Storage.md) engine.
## Source-backed baseline
[Sqlite.hpp](../../../include/Void/Sqlite/Sqlite.hpp) exposes `Void::Sqlite::Database`,
`Statement`, `Transaction`, `Migration`, `OpenMode` and a local Result alias. Database and
Statement are move-only RAII wrappers. Bind indexes are one-based; column indexes are
zero-based. `step()` returns Result<bool>, text reads copy, transactions roll back on
destruction unless marked done, and migrations use `PRAGMA user_version`.
[module.cmake](../../../src/Sqlite/module.cmake) links Functional and SQLite3::SQLite3.
[Sqlite.cpp](../../../src/Sqlite/Sqlite.cpp) opens writable databases with a 5,000 ms busy
timeout and attempts WAL/foreign_keys pragmas without checking their results. Bind/reset
and clear-bindings ignore SQLite return codes. Transaction stores a raw Database pointer,
and `commit()` marks it done before calling SQLite. Database close ignores the close result.
These are concrete lifecycle/error-completion targets, not evidence that all uses fail.
[Tests](../../../tests/standalone/Sqlite/Sqlite.cpp) cover memory open, SQL execution,
binding/nulls, successful commit, destructor rollback, migrations and bad SQL; they do
not establish busy-commit recovery, database moves with live transactions or WAL durability.
## Backend decision and NEW API
Keep SQLite itself as the SQL engine, pager, locking and file-format owner. Void supplies
checked RAII, lifetimes, configuration, async admission and migrations. Do not reimplement
SQL, parse database pages, or translate Storage batches into a pretend identical SQL API.
Pin/test supported SQLite versions through [build/distribution](../BUILD-AND-DISTRIBUTION.md);
capture runtime version/compile options in diagnostics without claiming untested versions.
NEW illustrative additions in `Void::Sqlite`:
```cpp
enum class JournalMode { Wal, Rollback };
enum class SyncMode { Full, Normal };
enum class BeginMode { Deferred, Immediate, Exclusive };
struct OpenOptions; // mode, journal/sync, limits, busy budget, capabilities
struct SqliteError; // primary and extended code, bounded message, operation
Result<Database> open_database(path, OpenOptions);
Result<void> Statement::bind_checked(int, ValueView);
Result<void> Statement::reset_checked();
Result<Transaction> Database::begin(BeginMode);
Result<void> Database::close();
Result<CheckpointReport> Database::checkpoint(CheckpointMode);
```
These are proposals, not existing declarations. ValueView is a NEW typed view over null,
int64, double, text and blob. Checked text/blob bindings copy by default; borrowed/static
bindings require an explicit lifetime owner retained until reset/rebind/finalize. Row views
expire at the next step/reset/finalize and cannot cross an await; owning row copies are
available. Typed reads reject unexpected type/range instead of silently coercing a text
column to zero. Named binds and blobs complete the basic API; parameter metadata validates
indexes, and strict single-statement prepare rejects non-whitespace trailing SQL.
Use a shared ConnectionState independent of the Database object's address. Statements and
transactions retain it, so moving/destroying a Database handle does not leave dangling
transaction pointers. NEW `close()` stops admission and returns Busy while handles remain;
destructor release defers final native close to the last owner and reports errors to an
optional bounded diagnostic hook. Explicit finalization is available when error reporting
matters. Native `handle()` access is an expert borrow under the connection's execution lease;
it does not grant concurrent unsynchronized use or ownership transfer.
## Transactions, concurrency and operational behavior
A connection has one execution owner at a time. Embedded synchronous callers serialize
operations explicitly. Managed async use moves work to a bounded blocking executor and
leases one connection for the complete transaction; no await releases that lease midway
through a transaction. SQLite's internal mutex modes do not replace wrapper object-lifetime
rules. Read pools default to four connections, with one writer lane; users opt into other
topologies knowingly. No global connection/thread pool is created by opening a Database.
Transaction state is Active, Committed, RolledBack or RecoveryRequired. Set Committed only
after successful COMMIT. A busy COMMIT can leave the transaction active; retain rollback/
retry capability and query SQLite's autocommit state after errors before deciding whether
it was automatically rolled back. This follows SQLite's [transaction semantics](https://www.sqlite.org/lang_transaction.html)
and [autocommit query](https://www.sqlite.org/c3ref/get_autocommit.html). Do not blindly replay
statements or automatically rerun a whole transaction after an error: triggers and external
callbacks may already have effects. Savepoints are NEW separately owned nested scopes;
ordinary `begin` inside an active transaction fails rather than pretending to nest.
NEW defaults for file databases are checked WAL + synchronous FULL + foreign_keys ON.
Query effective pragma results and fail configuration if a required mode is unavailable.
In-memory/read-only databases have explicitly different effective capabilities. NORMAL is
an explicit weaker durability choice. WAL permits readers alongside one writer, but long
read transactions can hold back checkpoints; it also requires same-host shared-memory
coordination and is not the selected network-filesystem deployment mode.
[SQLite WAL documentation](https://sqlite.org/wal.html) defines these constraints; no claim
is made that Void's native WAL shares SQLite's layout or exact durability modes.
Busy waiting uses a bounded configured budget (default five seconds), capped by the shared
absolute operation deadline. Install cancellation/progress handling per leased operation,
and clear it before connection reuse. A connection-wide interrupt must never accidentally
cancel the next borrower's query; serialize lease handoff through completion and native
interrupt cleanup. Stop can prevent execution or interrupt supported SQLite work, but a
commit racing with stop may have taken effect. Return domain outcome evidence rather than
claiming cancellation rolled it back. Avoid busy sleeps on an IO event-loop thread.
Checkpoint reports completed/remaining pages and Busy, with no automatic promise to shrink
a WAL held by readers. Default managed policy requests passive checkpoints at 16 MiB WAL,
warns at 64 MiB, and stops new write admission at a configured 256 MiB application threshold
until reader/checkpoint progress permits it. This is a wrapper admission policy, not a hard
SQLite file-size guarantee against other processes. Monitor external writers separately.
Never delete a live `-wal`/`-shm` file to reclaim space.
## Completion capabilities and budgets
Defaults for NEW wrappers: 128 live statements/connection, 1 MiB SQL text, 16 MiB bound
value/row-copy limit, 1,024 queued jobs and 64 MiB aggregate pending input, 64 cached
statements with an 8 MiB wrapper-memory ceiling. Evict only idle cache entries; an active
statement belongs to its borrower. Apply SQLite limit APIs where supported, and separately
bound wrapper allocations. SQLite pager/cache memory is configured and measured, not
assumed equal to wrapper memory. Bulk operations stream rows within one explicitly sized
transaction; a `query_all` convenience has a row and byte cap.
Migration completion validates a strictly increasing unique version list before any SQL.
The application supplies immutable migration identities/checksums; record them in an
application migration table in the same transaction as schema changes and user_version.
Reject unexpected newer schemas and checksum drift. A migration may be non-reversible;
require a verified backup and explicit application rollback plan before applying it. Do
not infer a down-migration from reversing SQL strings. Backup/restore use SQLite's supported
backup interface with bounded steps and consistent source lifetime, not a raw copy of an
open database file. Extension loading remains disabled by default; optional functions,
collations and authorizers have explicit lifetime and no-exception-across-C-callback wrappers.
## Ordered tasks
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-SQLITE-01 | P0; existing tests, official SQLite contracts | Regress bind errors, busy/failed commit, outstanding statement close and move-with-live-transaction; record supported runtime/build options. | astra_implementer |
| M-SQLITE-02 | P1; M-SQLITE-01, Functional typed errors | ConnectionState ownership, checked bind/reset/finalize/close and transaction states; failed COMMIT cannot disable necessary rollback. | astra_implementer |
| M-SQLITE-03 | P2; M-SQLITE-02 | Checked options/pragmas, typed rows/blobs/named params, savepoints and migrations; malformed options/schema plans fail before mutation. | sol_implementer |
| M-SQLITE-04 | P2; M-SQLITE-03, Async/Time ownership | Leased async connections, bounded jobs, cancellation/busy handling; no cross-query interrupt or transaction interleaving. | astra_implementer |
| M-SQLITE-05 | P3; M-SQLITE-03/04, IO/Runtime operations | Checkpoint/backup/restore, health metrics and guarded callback adapters; active-reader pressure is visible and backup restores consistently. | astra_implementer |
| M-SQLITE-06 | P3; M-SQLITE-05, shared performance/consumer harness | Supported-version/mode matrix and Storage comparison with matched guarantees; publish all latency/memory/build tradeoffs. | sol_implementer |
P4 platforms may use SQLite locally, but Sqlite does not become a consensus/replication
engine by sharing a file across hosts. [NetworkedApplications](../platforms/NetworkedApplications.md)
selects its SQLite profile explicitly.
## Verification and migration
CURRENT TEMPLATE for source-verified test names:
`<existing-build>/tests/VoidTests --filter '^(open_in_memory|prepared_bind_and_read|transaction_.*|migrations_apply_in_order_and_are_idempotent|prepare_bad_sql_errors)$'`.
See [validation](../VALIDATION.md) for actual baseline commands and failures. PROPOSED after
M-SQLITE-01–05: two-connection busy fixtures, faulted COMMIT/destructor rollback, explicit
null vs empty text/blob, embedded NUL, int64 bounds, wrong column/index, expired row views,
long reader checkpoint pressure, cancellation at lease transfer, disk full and migration
checksum drift. Use real supported SQLite libraries in addition to deterministic wrapper
ports. Restart tests must use file databases; `:memory:` tests cannot prove durability.
[Performance](../PERFORMANCE.md) covers prepared/unprepared, batch/individual commits,
WAL/rollback, FULL/NORMAL, read pool contention and database-larger-than-cache workloads.
Report p50/p95/p99 including busy/admission, throughput, allocations, RSS/CPU and build cost,
with common repetitions/confidence intervals and all failed/rejected jobs counted.
[Migration](../MIGRATION.md): add checked methods first; deprecate chainable unchecked binds
and address-dependent transaction lifetimes only with a major-release adapter path. Example:
`stmt.bind(1, value); stmt.step();` becomes checked bind followed by checked step. File formats
remain SQLite's; wrapper upgrades do not convert them to Storage. Roll back code only when
the schema remains backward compatible, otherwise restore a verified backup with explicit
reconciliation of subsequent writes. Graph coverage reported no recorded gaps for cited
Sqlite files, and source was read directly. No SQL tests or performance measurements ran
for this documentation assignment.
+123
View File
@@ -0,0 +1,123 @@
# Stacktrace — bounded diagnostics with explicit capabilities
Status: plan; feature tasks PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
Supports R-003/R-006/R-012/R-014 under [C-01–C-05 and C-11](../ARCHITECTURE.md).
## Existing surface and limits
[Stacktrace.hpp](../../../include/Void/Stacktrace/Stacktrace.hpp) exposes
`Void::Stacktrace::StackFrame`, `capture_stacktrace(skip_frames, max_frames)`,
`read_source_snippet`, `format_stacktrace` and `print_stacktrace`. Capture defaults to
32 frames; each frame owns function/source/snippet strings. Source reads return Result,
whereas capture returns a vector and suppresses exceptions. [Stacktrace.cpp](../../../src/Stacktrace/Stacktrace.cpp)
uses Boost.Stacktrace/demangle, resolves source locations and reads snippets during capture,
then logs diagnostics. [module.cmake](../../../src/Stacktrace/module.cmake) selects
Boost's addr2line backend on the Unix branch and windbg on Windows, depends on Functional
and LogState, and applies Unix debug/frame-pointer flags.
There is no `tests/standalone/Stacktrace` directory in the inspected baseline. Integration
through [Testing's signal handler](../../../src/Testing/SignalHandler.cpp) invokes capture
and formatting on a fatal signal. Existing allocation, file IO, demangling and logging are
not an async-signal-safe crash facility. The plan must not market that path as safe recovery
of a corrupted C++ process. [Testing](Testing.md) owns the replacement crash-isolation policy.
## Selected backend and NEW API
Retain the existing Boost backend initially behind a Void-owned capability interface;
do not add a new unwinding dependency or promise equivalent symbols on every build.
Split raw address capture from optional symbol/source enrichment. A standard-library
backend is a later M-STACKTRACE-05 gate after toolchain feature probes and conformance,
not an assumed C++26 implementation capability. None of this becomes a foundation dependency.
NEW illustrative surface in the existing namespace:
```cpp
struct CaptureOptions { unsigned skip = 0; unsigned max_frames = 32; };
struct ResolveOptions { bool source_snippets = false; std::size_t max_bytes = 64 * 1024; };
struct RawTrace; // owning addresses plus module identity snapshot
struct ResolvedTrace; // bounded frames, incomplete flag, per-frame status
struct Capabilities; // raw capture, symbols, line info; no signal-safety inference
Result<RawTrace> capture(CaptureOptions);
Result<ResolvedTrace> resolve(const RawTrace&, ResolveOptions);
Capabilities capabilities() noexcept;
```
The legacy capture adapter composes capture/resolve using its historical presentation
until the major release. NEW capture does not read source or emit through Log; an optional
diagnostic hook belongs above the low-level path to avoid recursive logging/stacktrace
failures. Unsupported line information is an explicit per-frame result, distinct from
an empty stack, permission-denied source read, or a failed unwinder.
Capture snapshots addresses and module identifiers before a plugin generation can unload.
A trace needed for later resolution either retains that generation or owns sufficient
module/build-id metadata for an explicitly configured offline symbol resolver. Raw addresses
alone are not stable identities across unload, ASLR or process restart. Do not retain a
pointer to a transient loader structure. A synchronous embedded resolver is the default;
managed deferred symbolization uses caller-supplied execution and bounded admission, not a
global worker implicitly started by `capture`.
## Dataflow, bounds and failures
1. Validate skip/count and capacity before unwinding; cap NEW calls at 256 frames and
return InvalidArgument above that limit. Capture may return a valid truncated trace
with an explicit flag when the stack is deeper.
2. Copy module identity/address records to owned storage. Resolve symbols outside any
application registry or logging lock. Resolve failures preserve raw frames for diagnosis.
3. Source snippets are opt-in and constrained to caller-provided allowed roots. Defaults:
three context lines, 4 KiB per snippet, 64 KiB total rendered output, 1 MiB source-file
scan budget. Enforce overflow-safe line arithmetic, maximum line length and file-read
limits; reject unsafe paths and symlink escapes through the configured file-access port.
4. A NEW resolver cache holds at most 1,024 entries/4 MiB and keys by module identity and
address offset. Invalidated module identities cannot reuse stale symbol entries. Default
managed resolution admits 32 jobs/2 MiB total pending trace input with one worker.
5. Cancellation/deadline is checked between frames/source reads. The terminal result owns
completed frames and indicates Partial/Cancelled; it never frees buffers still used by
a backend. Blocking symbol-tool calls require a bounded child-process boundary if that
backend cannot otherwise be interrupted.
Source paths, snippets and module names may reveal private build information. Default
rendering removes configured source-root prefixes and omits snippets. Explicit diagnostic
configuration enables them; telemetry must not attach arbitrary source text automatically.
No debug source file is opened merely because untrusted input names it.
The initial crash path is subprocess test isolation: the parent records exit/signal and
optional externally captured diagnostics. A NEW minimal fatal-signal marker may write a
fixed-size record to a preopened descriptor using a reviewed platform-safe implementation,
but it does not call the rich Stacktrace API or resume the failed process. A fully signal-safe
unwinder is outside this phase and requires a separate safety/capability gate.
## Ordered backlog
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-STACKTRACE-01 | P0; existing source and Testing contract | Add direct tests for empty formatting, source failures, frame caps and optional symbols; fixture assertions tolerate stripped builds without hiding failed capture. | sol_implementer |
| M-STACKTRACE-02 | P1; M-STACKTRACE-01, Functional errors | Separate capture/resolve, capability report, remove logging recursion from NEW path; source access is absent by default. | astra_implementer |
| M-STACKTRACE-03 | P2; M-STACKTRACE-02, IO safe file access | Bounded source resolver/cache, redaction, backend timeouts; hostile path/line/size inputs remain within limits. | sol_implementer |
| M-STACKTRACE-04 | P2; M-STACKTRACE-02, Testing subprocess isolation, Plugin generation ownership | Crash integration and deferred lifetime tests; fatal child does not corrupt the test runner and resolution cannot use unloaded code. | astra_implementer |
| M-STACKTRACE-05 | P3; M-STACKTRACE-03/04, supported-toolchain probes | Evaluate standard backend and platform parity using identical tests/profiles; retain Boost unless evidence supports replacement. | astra_implementer |
P4 users consume the same diagnostics through [Observability](../subsystems/Observability.md),
without transmitting full stacks by default. No independent distributed stacktrace service
is required.
## Verification and migration
CURRENT: baseline build and aggregate CTest commands are in [validation](../VALIDATION.md).
There is no current Stacktrace-specific suite to invoke. PROPOSED after M-STACKTRACE-01:
`<configured-build>/tests/VoidTests --filter '^stacktrace_'`; prerequisites include the
new tests, selected Boost backend and a build with known debug information. Test both
stripped and debug fixtures, shared-library unload, invalid UTF/path text, missing source,
huge line number, cancellation and a nonresponsive symbol helper. Never use the current
rich handler itself as proof of signal safety.
[Performance](../PERFORMANCE.md) separates raw capture, symbol resolution, cold/warm cache,
source IO and formatting; report p50/p95/p99, allocations, RSS/CPU and build/debug-symbol
size using the common repetition and regression rules. Measure disabled hooks separately.
[Migration](../MIGRATION.md) retains current names through adapters and documents the new
default of no source reads. Consumer examples transition from `capture_stacktrace()` to
checked `capture()` and optional `resolve()`. Rollback restores the legacy normal-context
presentation adapter, never the unsafe promise of surviving fatal signals. Package tests
in [build/distribution](../BUILD-AND-DISTRIBUTION.md) verify optional backend linkage and
minimal consumers. Cited files have checked graph coverage and direct source verification;
no Stacktrace test or performance result was executed for this plan.
+168
View File
@@ -0,0 +1,168 @@
# System facilities and process lifecycle plan
Status: PLANNED feature work; no system implementation changes. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Requirements R-003, R-006, R-009 and R-014 apply. Follow
[architecture](../ARCHITECTURE.md) C-02–C-06 and C-13.
## Existing source baseline
[Process.hpp](../../../include/Void/System/Process.hpp) exposes `Void::Process::run`,
`run_streaming`, `shell`, `reexec`, `Output`, and line callbacks. Nonzero child exits
are successful Results with an exit code. [Process.cpp](../../../src/System/Process.cpp)
uses POSIX pipes/fork/execvp, writes stdin before draining outputs, polls stdout/stderr,
sends SIGTERM on timeout, and then waits synchronously. The source derives a 30-second
poll deadline when the supplied timeout is zero, despite the header's no-limit wording.
It does not establish a bounded termination guarantee for a child ignoring SIGTERM.
These are characterization and correction targets, not intentional NEW semantics.
[FileWatcher.hpp](../../../include/Void/System/FileWatcher.hpp) and
[FileWatcher.cpp](../../../src/System/FileWatcher.cpp) provide
`Void::FileSystem::FileWatcher`, a polling worker with default 500 ms polls and two
stable polls before notification. It compares existence/mtime/size, and invokes copied
callbacks outside the watch map lock. Stability of metadata is not proof of complete
content or authenticity. Unwatch cannot revoke a copied callback already admitted.
[SignalWatcher.hpp](../../../include/Void/System/SignalWatcher.hpp) documents
`Void::Process::SignalWatcher::create`, blocked signal-mask inheritance before worker
startup, synchronous wait/poll, and destruction on its creating thread.
[SignalWatcher.cpp](../../../src/System/SignalWatcher.cpp) is the platform implementation.
[Path.hpp](../../../include/Void/System/Path.hpp),
[Query.hpp](../../../include/Void/System/Query.hpp),
[TempFile.hpp](../../../include/Void/System/TempFile.hpp), and
[TempDir.hpp](../../../include/Void/System/TempDir.hpp) supply filesystem helpers and
RAII temporary resources. `atomic_write` stages to a fixed sibling `.tmp` then renames;
it does not fsync and must not be used as a durable-commit primitive based on its name.
[Metrics.hpp](../../../include/Void/System/Metrics.hpp) supplies `Void::SystemInfo`
Linux memory/process CPU samples, with unavailable/zero fallback on other platforms.
[module.cmake](../../../src/System/module.cmake) declares Functional, LogState and Threads.
Existing fixtures cover [processes](../../../tests/standalone/System/Process.cpp),
[streaming](../../../tests/standalone/System/ProcessStream.cpp),
[watching](../../../tests/standalone/System/FileWatcher.cpp),
[signals](../../../tests/standalone/System/SignalWatcher.cpp), and
[paths](../../../tests/standalone/System/Path.cpp). Graph checks covered these source
paths; partial Process/SignalWatcher/FileWatcher declarations were directly read.
## NEW process and filesystem contracts
Design sketch; Result follows Functional and OperationOptions belongs to Async:
```cpp
namespace Void::Process { // NEW additions
struct SpawnOptions {
std::filesystem::path executable;
std::vector<std::string> arguments;
std::filesystem::path working_directory;
EnvironmentPolicy environment; // explicit inherit or allowlist
CaptureLimits capture; // bytes, line bytes, overflow policy
};
Result<Child> spawn(SpawnOptions);
Coro::Task<Result<ExitStatus>> wait(Child&, Async::OperationOptions);
Coro::Task<Result<Output>> communicate(Child&, InputSource&, Async::OperationOptions);
}
namespace Void::FileSystem { // NEW additions
Result<void> replace_file(path, bytes, ReplaceOptions); // atomic visibility vs durable
// watch registration -> owning WatchSubscription with close_and_join(options).
}
```
Child owns PID/process identity, descriptors and reaping responsibility. Move transfers
all ownership. `communicate` concurrently writes stdin and reads both outputs through
IO; EOF closes each direction independently, preventing pipe-buffer deadlock. Output
retention and line streaming are separate policies: streaming need not retain all bytes.
Default cap is 1 MiB each for stdout/stderr, 64 KiB per line, 4 MiB buffered input;
overflow terminates the child and reports `output_limit` with truncated diagnostics.
An explicit discard-after-limit mode continues draining and marks truncation.
Default active children per manager: 64; pending spawn requests: 128; admission rejects
on overload. Argument/environment input totals are capped at 256 KiB and checked again
against platform limits. Use argv execution by default. Shell interpretation is an
explicit adapter; never concatenate untrusted arguments. Exec failures use an error
pipe and retain errno, distinct from a program intentionally exiting 127. Environment
snapshots are immutable per spawn and diagnostics redact marked secrets.
Timeout/stop first closes admission/input, requests SIGTERM for the owned process group,
waits a configurable 2-second grace, then sends SIGKILL and reaps. Report cancelled or
timed_out plus exit evidence; termination cannot undo external effects. Platform/kernel
stalls can prevent prompt reaping, so a timeout does not release Child ownership. A
manager retains outstanding reapers through shutdown. Descendants outside the process
group are outside this guarantee; report that boundary. `reexec` remains an explicit
application lifecycle action with open-descriptor policy and an error on exec failure.
System's synchronous primitives remain independently usable. NEW async process/watch
adapters depend on [Async](Async.md) and [IO](../subsystems/IO.md) in an optional adapter
target; the base System package does not depend on managed Runtime or force Async into
small filesystem consumers. Final adapter target names are packaging work under
[BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md).
## Watching, persistence and capability behavior
Retain polling as the portable initial backend. NEW injected scheduling uses Time's
clock and one shared watcher service instead of a thread per file. Default 1,024 paths,
256 queued notifications, one coalesced pending notification per path. Overflow emits a
rescan-required marker; consumers reread/validate rather than infer a missing history.
Path disappearance, atomic rename, symlink change and permission denial are distinct
events. Default follows the configured path with no recursive traversal; symlink and
directory-root restrictions are explicit options. Later Linux inotify is a capability
adapter with the same rescan/overflow contract, gated after polling conformance.
Subscription state owns copied callback captures until close-and-join completes. User
callbacks run outside locks and on the configured executor. Callback exceptions reach
an error sink; they do not kill the watcher thread. Self-close requests stop but self-join
is rejected. A callback never performs configuration publication itself; it submits a
candidate to [Configuration](Configuration.md).
`replace_file` uses an exclusively created unpredictable sibling temporary file,
bounded write loops, checked close/errors and rename on the same filesystem. Atomic
visibility is distinct from durable replacement; durable mode syncs staged content,
renames, then syncs the containing directory before acknowledgement. Failure after
rename can mean visible-but-durability-unknown; return a phase-aware error and do not
blindly overwrite on retry. Storage and Update retain their own commit protocols.
Directory listing/read helpers gain explicit entry/byte limits and cancellation in
the optional adapter. RAII temp factories enforce restrictive permissions and never
recursively remove a directory they did not create and retain ownership of.
Capability queries return supported/unsupported/unavailable with diagnostic context.
Metrics distinguish a real zero from unavailable sampling in NEW APIs. Native POSIX
and standard filesystem facilities are initial choices; no external process or watcher
library is required. Cross-platform backends are separate later conformance work.
## Ordered implementation backlog
All feature rows are PLANNED.
| ID | Phase / depends on | Intended scope | Acceptance / recommended role |
| --- | --- | --- | --- |
| M-SYSTEM-01 | P0 / current source | Characterize zero timeout, SIGTERM resistance, full-duplex pipe and rename/fsync behavior; portable child fixtures | Existing semantics recorded; tests use built fixture paths rather than `/bin` assumptions / sol_implementer |
| M-SYSTEM-02 | P1 / M-SYSTEM-01; Functional errors | Owned descriptors/Child, explicit spawn options, error pipe, bounded capture | Exec failure distinct from exit 127; all early failures close/reap; caps enforced / astra_implementer |
| M-SYSTEM-03 | P2 / M-SYSTEM-02; Async and IO foundation gates | Full-duplex async communicate, stop escalation, joined process manager | Multi-pipe pressure completes; timeout/child-exit race delivers once and reaps / astra_implementer |
| M-SYSTEM-04 | P2 / M-SYSTEM-01; Async/Time injection gates | Shared polling watcher, owned subscriptions, coalescing/rescan and callback errors | Unwatch+join drains callbacks; replacement/deletion/overflow deterministic / sol_implementer |
| M-SYSTEM-05 | P2 / M-SYSTEM-02 | Explicit atomic/durable file replacement, safe temp factories, query bounds | Fault-injected write/sync/rename errors report the actual phase and clean only owned temporaries / astra_implementer |
| M-SYSTEM-06 | P3 / M-SYSTEM-03, M-SYSTEM-04, M-SYSTEM-05 | Capability matrix, optional inotify, metrics validity, installed adapter checks | Polling/backend conformance identical; unsupported platforms fail explicitly / sol_implementer |
## Validation, performance and migration
CURRENT aggregate command is
`ctest --test-dir /tmp/voidlibrary-discovery-f1f9ba3 --output-on-failure --timeout 60`;
not rerun here. The inherited two failures depend on absent `/bin/echo` and `/bin/cat`,
not evidence that the proposed process contract passes. PROPOSED fixture executables
must exercise ignored SIGTERM, delayed stdin consumption, simultaneous stdout/stderr,
huge unbroken lines, inherited descriptors, child exit during stop and callback throw.
Signal tests run in isolated processes to protect the test runner's mask. File tests
inject short writes, failed fsync, rename collision, symlink replacement and full queues.
Measure spawn/wait p50/p95/p99, watcher detection latency versus polling interval,
throughput, allocations, descriptor/thread counts, peak RSS/CPU and build cost under
[PERFORMANCE](../PERFORMANCE.md). A large output producer must keep retained bytes
within its cap; an idle watcher must not busy-spin. No benchmarks ran for this plan.
Keep current namespaces (`Void::Process`, `Void::FileSystem`, `Void::SystemInfo`).
Legacy `run`/`run_streaming` adapt into a managed Child only after their timeout/output
changes are versioned; no silently reclassified child exits. Replace misleading durable
claims on `atomic_write` through documentation/deprecation and a major-release policy,
with new explicit visibility/durability choices. Preserve polling as a rollback backend
selected before watching starts. Rollback of an effective file replacement requires
application version recovery, not repeating a failed syscall. See
[MIGRATION](../MIGRATION.md), [VALIDATION](../VALIDATION.md),
[DEPENDENCIES](../DEPENDENCIES.md) and [DELIVERY](../DELIVERY.md).
+170
View File
@@ -0,0 +1,170 @@
# Testing — trustworthy framework and deterministic verification
Status: plan; all feature tasks PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
R-002/R-003/R-012/R-016 and [C-01–C-05](../ARCHITECTURE.md) apply. Testing owns reusable
harness primitives; each feature owns its behavioral oracle and fixtures.
## Existing framework and evidence
The namespace is `Void::Testing`. [Config.hpp](../../../include/Void/Testing/Config.hpp)
defines test/assertion results, skip/crash states, filters, reporters, shuffle/seed/repeat
and parallel options. [Runner](../../../src/Testing/Runner.cpp) implements regex filters,
exact suite/tag filters, sequential and optional Async-thread-pool execution, console/JUnit
output and exit handling. [Suite.hpp](../../../include/Void/Testing/Suite.hpp) registers
annotated methods using reflection where supported. [tests/CMakeLists.txt](../../../tests/CMakeLists.txt)
collects generated standalone shims into `VoidTests`. [module.cmake](../../../src/Testing/module.cmake)
declares LogState and optional diagnostics/execution/configuration/text integrations.
[Math.cpp](../../../tests/standalone/Testing/Math.cpp) intentionally includes DisabledTest
examples named `broken_feature` and `unquoted_skip`; these exercise skip behavior and are
not missing product implementations. [ContainerFixture](../../../tests/standalone/Testing/ContainerFixture.cpp)
and [StructRepr](../../../tests/standalone/Testing/StructRepr.cpp) provide further framework
examples. The baseline result is 1,245 passed, two environmental process-fixture failures
and three skips out of 1,250; see [validation](../VALIDATION.md). This task ran no tests.
Source-backed improvement targets: malformed regex currently yields an empty selection;
JUnit reporter creation holds a static output stream; sequential signal handling invokes
rich diagnostics and jumps out of a signal handler; parallel execution omits that crash
recovery. [SignalHandler.cpp](../../../src/Testing/SignalHandler.cpp) has process-global
callback/jump state. These are reasons to specify framework regression tests and process
isolation, not to infer reliable crash containment from ordinary unit-test passes.
## Native harness design and NEW API
Keep the existing native framework and C++26 reflection/scanner paths. No wholesale
replacement by a third-party testing framework. Optional compiler fuzz/sanitizer adapters
are development tooling, absent from consumer dependencies. Runtime is never required
merely to register or execute a synchronous test. [Time](Time.md) owns fake-clock semantics
and [Async](Async.md) owns executor semantics; Testing supplies controlled adapters and
schedule exploration around those contracts, not competing production types.
NEW illustrative shapes in `Void::Testing`:
```cpp
struct ReplayToken { std::uint64_t seed; std::uint32_t generator_version; };
struct PropertyOptions {
unsigned cases = 256;
unsigned max_size = 64;
unsigned max_shrinks = 1000;
};
template<class Generator, class Predicate>
PropertyResult check_property(Generator, Predicate, PropertyOptions, ReplayToken);
class DeterministicRun; // ready-queue control, injected clock, event trace
class FailureCapture; // bounded child assertion sink, explicit result inspection
struct ProcessTestOptions; // timeout/output/resource budget, expected exit policy
```
These types and `PropertyResult` are NEW. Failures retain the original case, minimized
case, seed, generator/codec version, shrink path and schedule decisions. Select
`std::mt19937_64` with a recorded 64-bit seed and case ordinal. M-TESTING-03 freezes
bounded-uniform rejection mapping over its integer outputs, with cross-toolchain golden
sequences; standard distribution implementation details must not silently change replay.
User-supplied generators own their values and deterministic
shrinkers produce a strictly decreasing complexity measure or exhaust the shrink budget.
Example workflow: generate a vector, apply a container operation, compare to a simple
reference, then replay the stored minimal case in a normal regression test.
The deterministic executor runs one ready action at a time in recorded admission order,
advances the injected clock only under test control, and records alternative runnable
choices. A bounded exploration mode enumerates selected interleavings. It must not claim
to simulate OS threads, cache coherence, or arbitrary data races. Dedicated stress/TSan
work remains necessary. Stop/completion races are assertions on exactly one terminal
result and released ownership, not on wall-clock sleep timing.
## Framework correctness and failure handling
Registration becomes a frozen catalog before running tests. Duplicate stable test IDs,
invalid regex/options, missing requested suites and unreadable report paths are explicit
configuration failures. A NEW default fails an explicitly requested empty selection;
`--allow-empty` is an explicit override. Listing is side-effect-free with respect to test
bodies. Shuffle/repeat reports seed and iteration; discovery order is stable by test ID.
Every run owns its reporter streams and context. An assertion emitted outside an active
test is a framework error, not silently assigned to the next test. Async test adapters
retain a context handle until their task scope joins; thread-local convenience access does
not permit borrowed `TestResult*` pointers to escape. Freeze a result only after callbacks
and mock verifiers finish. Reporter callbacks see immutable result snapshots outside registry
locks; reporter failure makes the overall run fail and preserves an emergency summary.
One fixture lifecycle controller handles construction, setup, body, teardown and destruction.
After setup is entered, teardown is attempted exactly once even if setup/body fails; destroy
always runs for a constructed fixture. Report primary and cleanup errors separately. A
require/fatal assertion aborts only that test's controlled scope, while ordinary expect
records and continues. Intentional skip reasons survive console and JUnit output.
Crash/timeout tests run in fresh child processes through [System](System.md), with one
selected test ID and a bounded result channel. Parent waits/reaps and distinguishes ordinary
failure, signal, timeout, infrastructure failure and missing result. It can terminate the
child after its deadline; it cannot safely kill an in-process C++ test thread and continue
using its corrupted objects. Remove promises of rich signal-handler recovery in coordination
with [Stacktrace](Stacktrace.md). Ordinary exception tests remain in-process.
## Resource policies and fuzz/property capabilities
NEW defaults: sequential execution; explicit parallel mode caps workers at four unless
configured otherwise; 100,000 registered tests; 1,000 retained assertions/1 MiB diagnostics
per test; 64 MiB aggregate report buffer. Above the assertion cap, retain first failures
and counters, mark truncation, and continue or abort according to test policy without
unbounded growth. Reporters stream results to avoid retaining all output text.
Property defaults above additionally cap generated input at 1 MiB, corpus at 64 MiB and
one property at five seconds/10,000 scheduled steps. Time checks occur between generator,
case and shrink calls; uncooperative custom callbacks require subprocess isolation for a
hard timeout. A budget exhaustion is Inconclusive,
not Pass. Rejection sampling is limited to ten times the requested successful case count;
an impossible precondition is reported. Shrinking preserves the original failure category
and never consumes production network/filesystem state. Use generated fixtures, not private data.
Process-test defaults: 60-second timeout, 1 MiB captured output per stream, four concurrent
children, 256 pending jobs. Optional Linux resource limits are capability-reported rather
than assumed portable. Output overage truncates with counts; it cannot deadlock a full pipe.
Stop requests close admission, terminate opted-in child jobs, drain pipes, reap children
and join owned harness work. Embedded in-process deadlines remain cooperative.
Fuzz entry points accept byte spans and use feature-owned parsers/models. NEW compiler
adapters expose those same functions to supported fuzz engines; a deterministic corpus
replay runner works without them. Corpus metadata records format, fixture license/source,
seed and maximum memory/time. Minimized failures become normal regression fixtures.
Mutation/crash-injection campaigns verify the oracle: intentionally broken length checks,
lost writes or duplicate completions must be detected by the harness.
## Ordered tasks
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-TESTING-01 | P0; existing runner/registration | Framework self-tests for filter/seed/skip/fixture/reporter/exit behavior, with subprocess expected-failure fixtures; skip demonstrations remain intentional. | astra_implementer |
| M-TESTING-02 | P1; M-TESTING-01, Async context ownership, System child process | Per-run contexts/reporters and crash isolation; cleanup runs once, child crash is contained, invalid selection cannot produce false success. | astra_implementer |
| M-TESTING-03 | P1; M-TESTING-02, Time fake clock, Async test executor | Deterministic schedule driver, versioned generator/shrinker and replay token; cross-build seed replay and schedule minimization are reproducible. | astra_implementer |
| M-TESTING-04 | P2; M-TESTING-03, Binary/Data bounded fixtures | Property combinators, model traces and failure capture; known faulty algorithms are caught and shrink to replayable cases. | sol_implementer |
| M-TESTING-05 | P2; M-TESTING-02/04, supported compiler probes | Corpus runner, optional fuzz adapters, subprocess resource controls and sanitizer matrix; unsupported tooling is reported and corpus replay still works. | sol_implementer |
| M-TESTING-06 | P3; M-TESTING-03/05, shared validation/performance schemas | Fault-file/transport ports and benchmark evidence adapters used by Storage/IO/Net; injected faults occur at named boundaries and totals reconcile. | astra_implementer |
| M-TESTING-07 | P4; M-TESTING-06, Coordination/Replication models | Distributed schedule/history harness; partition/restart/duplicate scenarios reproduce and reject deliberately invalid histories. | astra_implementer |
## Validation and migration
CURRENT test-runner syntax is source-verified. TEMPLATE:
`<existing-build>/tests/VoidTests --filter '^(addition|db_query|broken_feature|unquoted_skip)$'`.
`--filter` matches test names and suite-qualified names using regex search. No run is claimed
here. PROPOSED after M-TESTING-01: a separate framework-verification child fixture set with
known exit codes, exact counts and parsed JUnit output, driven by a parent checker independent
of the framework assertions being checked. A green self-hosted suite alone is insufficient.
Required regressions include malformed regex, empty explicit selection, report-open failure,
two runs to different output files, duplicate registration, require during setup/teardown,
late async assertion, deterministic repeat/shuffle, intentional skips, signal/timeout,
pipe saturation and a deliberately failing property. Verify expected failures without
editing a live result to Passed. Run isolated module consumers and supported reflection
configurations under [build/distribution](../BUILD-AND-DISTRIBUTION.md).
Apply [performance](../PERFORMANCE.md) to assertion overhead, reflection/registration build
cost, worker scheduling and bounded report memory; preserve p50/p95/p99, throughput,
allocations and RSS/CPU evidence without turning benchmark variance into test failure.
[Validation](../VALIDATION.md) owns sanitizer/toolchain gates and baseline failure reporting.
[Migration](../MIGRATION.md) keeps Test/Suite/expect/require adapters while introducing
explicit contexts, replay and isolation. NEW strict option validation is a documented
major behavior change. Rollback may keep old output formats via adapters, but must not
restore silent passing of invalid selections. [TestingMock](TestingMock.md) integrates
through FailureCapture and joined contexts, with no reverse dependency from Testing to mocks.
Graph coverage was checked for all cited source; partial Registrar syntax was read directly.
No new framework, fuzz, crash or benchmark checks ran during documentation authoring.
+149
View File
@@ -0,0 +1,149 @@
# TestingMock — deterministic expectations and owned actions
Status: plan; implementation tasks PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
R-002/R-014/R-016 and [C-02–C-05](../ARCHITECTURE.md) govern future work.
## Existing capabilities and concrete gaps
`Void::TestingMock` provides [MockFunction](../../../include/Void/TestingMock/MockFunction.hpp),
[Expectation](../../../include/Void/TestingMock/Expectation.hpp),
[matchers](../../../include/Void/TestingMock/Matcher.hpp), and
[Mock/MockBase](../../../include/Void/TestingMock/Mock.hpp). Expectations match arguments,
record calls and run actions; `times`, `once`, `returns` and `invokes` are existing names.
Actions use `std::move_only_function`; the [move-only action test](../../../tests/standalone/TestingMock/MoveOnlyAction.cpp)
specifically demonstrates a unique_ptr-capturing lambda, not arbitrary move-only arguments
or move-only returned values. Matching/execution currently passes arguments through several
by-value layers, and `returns` returns its stored value as an lvalue.
`MockFunction::operator()` holds its mutex while matching and executing user actions.
Expectation registration and verify/clear do not use that same synchronization. MockBase
stores non-owning function pointers; registration has no lifetime token. `verify()` clears
expectations, while destructors call it automatically. Preserve existing convenient usage
but do not infer concurrent reconfiguration or reentrant action safety from the mutex.
[Reflect.hpp](../../../include/Void/TestingMock/Reflect.hpp) lists virtual methods and checks
handwritten mocks; its source explicitly distinguishes introspection from unsupported
override-code injection. Reflection availability is toolchain-probed, not a promise that
complete automatic mock generation already exists. [module.cmake](../../../src/TestingMock/module.cmake)
depends on Testing and Functional. Evidence includes
[VerifyAll](../../../tests/standalone/TestingMock/VerifyAll.cpp),
[FailureMessages](../../../tests/standalone/TestingMock/FailureMessages.cpp), and
[Reflect tests](../../../tests/standalone/TestingMock/Reflect.cpp).
## Selected native design and NEW contract
Retain a native header-oriented mock library integrated with [Testing](Testing.md); no new
external mocking engine. Separate configuration from invocation. A NEW session freezes
expectations before concurrent calls, retains action/registration state, and closes after
the test's task scope has joined. Existing `expect(...).invokes(...).times(...)` remains a
builder adapter. Mutating a frozen session returns InvalidState rather than racing.
Illustrative NEW shapes in the existing namespace:
```cpp
enum class Concurrency { SingleThread, ConcurrentActions };
struct MockLimits { std::size_t expectations = 1024; std::size_t events = 4096; };
class MockSession; // owns registrations, diagnostics and verification state
class Sequence; // explicit order group, never global registration order
struct Verification; // structured missing/excess/unmatched/action failures
Result<void> freeze(MockSession&, Concurrency);
Verification verify_and_close(MockSession&);
// NEW builder operations: at_least(n), at_most(n), in_sequence(seq),
// returns_once(move_only_value), invokes_once(move_only_action).
```
`SingleThread` is the NEW default and permits same-thread reentrant calls after releasing
internal locks; concurrent entry from another thread returns a deterministic framework
failure. `ConcurrentActions` explicitly requires custom matchers/actions to support concurrent
invocation. The library does not secretly serialize arbitrary user code under a mutex and
cannot make a captured mutable object thread-safe by retaining it.
Invocation dataflow: snapshot immutable candidate matchers under a short session lock,
evaluate pure matchers outside it, then reacquire to reserve a matching unsaturated
expectation and sequence position. If another call consumed it, retry the remaining immutable
candidates against the same borrowed arguments. Reservation is the call's linearization
point. Release the lock, run the reserved action, then record terminal outcome. Keep the
expectation/action storage alive through that outcome; verification waits for owned calls.
Registration order breaks ties among otherwise eligible expectations. A custom matcher
must be side-effect-free because it may be reevaluated; exceptions become MatcherFailure.
Once-actions transfer their move-only callable/value to the reserved invocation. Repeated
actions stay in a retained immutable registration holder and use the explicitly selected
concurrency policy; do not copy a move-only callable. Matchers inspect arguments through
const references; forward each argument to the action exactly once after selection. Provide
compile-time diagnostics for impossible reference lifetimes and missing return actions.
For reference-return mocks the user must supply a lifetime-safe referent. A mismatched
non-default-constructible return cannot fall back to `R{}`: record failure then throw a
Testing-owned invocation-abort exception, caught at the test boundary. No exception crosses
a plugin C boundary; C-facing mocks use status/result actions.
Explicit order groups model call dependencies. `never()` is an explicit prohibition checked
before ordinary candidate selection; it is not a saturated zero-count expectation silently
skipped by the matcher loop. Negative counts are invalid; min≤max is checked at freeze.
Verification is idempotent and reports each unmet condition once, retaining a bounded
summary for subsequent calls rather than destroying evidence prematurely.
## Ownership, diagnostics and resource limits
A registration token replaces MockBase's untracked raw-pointer lifetime for dynamic mocks.
Removing a registration stops admission and joins its admitted calls before releasing action
state. Destructors never throw; they perform best-effort verification through a retained
Testing context. Explicit `verify_and_close` is preferred so failures cannot arrive after
the result has frozen. Closing from inside an action returns WouldDeadlock or schedules
deferred close; it cannot synchronously wait for itself.
NEW defaults: 1,024 expectations per session, 64 matchers per expectation, 4,096 retained
invocation events, 4 MiB diagnostic memory and 4 KiB rendering per argument. Event overflow
keeps total counters and first/last bounded samples, marks truncation, and does not drop
the fact that an unexpected call happened. Bound matcher-description depth at 32. Test
configuration may lower these; zero means zero capacity, never unlimited. User action
allocations remain outside the framework's memory bound and are subject to process-test
limits. Use Time's injected clock for timestamps and Testing's event sequence for ordering.
FailureCapture from Testing records expected mock failures in an isolated child assertion
sink. Replace framework tests that temporarily alter the live test result with this API.
Diagnostics report actual arguments, candidate matcher descriptions, declaration location,
reserved call index and order-group position. Redaction is available for fixtures containing
sensitive-looking fields; captured arbitrary object bytes are never a default diagnostic.
Async actions compose with Async tasks owned by the test scope. A NEW scripted action can
yield a response, error, partial transfer, cancellation or delayed completion through the
deterministic executor. It cannot retain borrowed arguments after return unless it copies
them into an admitted owned buffer. The mock does not invent a second scheduler or wall-clock
sleep mechanism. Scripted transport/file mocks are reusable test ports, not production APIs.
## Ordered backlog
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-TESTINGMOCK-01 | P0; current tests, Testing failure capture | Characterize once/count/unmatched/destructor semantics with isolated expected failures and compile fixtures; preserve current examples. | sol_implementer |
| M-TESTINGMOCK-02 | P1; M-TESTINGMOCK-01, Testing context ownership | Session freeze/close, registration tokens and action-outside-lock reservation; reentrant actions complete, destroyed dynamic registrations cannot dangle. | astra_implementer |
| M-TESTINGMOCK-03 | P2; M-TESTINGMOCK-02 | Perfect forwarding, once/repeated actions, explicit prohibition/ranges/sequence groups; move-only args/returns and count races have defined results. | astra_implementer |
| M-TESTINGMOCK-04 | P2; M-TESTINGMOCK-03 | Bounded structured diagnostics, matcher combinators, property models and regression tests of the mock framework itself; injected wrong behavior is detected. | sol_implementer |
| M-TESTINGMOCK-05 | P3; M-TESTINGMOCK-04, Testing deterministic run, Async/Time contracts | Scripted async/file/transport faults and cancellation; no post-close callback and every script is replayable by seed. | astra_implementer |
| M-TESTINGMOCK-06 | P3; M-TESTINGMOCK-03, compiler probes | Reflection signature checks for overload/cv/ref/noexcept/inheritance cases; unsupported code generation remains explicitly unavailable. | sol_implementer |
P4 distributed tests reuse scripted ports; consensus assertions stay with Coordination and
Replication. Cross-module ownership is tracked in [dependencies](../DEPENDENCIES.md).
## Acceptance and migration
CURRENT TEMPLATE for verified names:
`<existing-build>/tests/VoidTests --filter '^(invokes_accepts_unique_ptr_capturing_lambda|verify_all_.*|failure_message_.*)$'`.
See [validation](../VALIDATION.md) for build prerequisites and actual baseline outcomes.
PROPOSED after M-TESTINGMOCK-02–05: deterministic two-call reservation races, action reentry,
action throwing, verification while calls are admitted, unmatched move-only return,
dynamic unregister, expired test context, never/range violations, scripted cancellation,
seed replay and diagnostics saturation. Compile-negative fixtures verify lifetime/signature
diagnostics separately from runtime tests. Use sanitizers where supported.
[Performance](../PERFORMANCE.md) measures matching cost versus expectation count, contention,
diagnostic allocation and reflection build cost, with p50/p95/p99 and peak RSS/CPU. Avoid
optimizations that skip mismatch evidence. [Migration](../MIGRATION.md) adds explicit sessions
first; legacy destructor verification stays documented until the major transition. Repeated
stateful actions must opt into concurrency; existing serial tests should need only optional
explicit close. Keep handwritten mocks usable when reflection lacks a capability.
Coverage: graph checks and direct reads covered cited files, including MockFunction's flagged
template parse range. New thread-safety, property/fuzz and async behavior is planned, not
verified by the existing move-only action test or this documentation change.
+141
View File
@@ -0,0 +1,141 @@
# Text, byte encodings and parsing utilities
Status: planning only; tasks below are **PLANNED**. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Existing source and tests
[Text's declaration](../../../src/Text/module.cmake) has no dependencies.
[Str](../../../include/Void/Text/Str.hpp) supplies trim, case conversion, split/join,
replacement, padding and numeric conversion in `Void::Str`.
[Format](../../../include/Void/Text/Format.hpp) adds placeholder rendering, wrapping and
tables; [Tokenizer](../../../include/Void/Text/Tokenizer.hpp) owns ordered matching
rules and allocating tokens; [Semver](../../../include/Void/Text/Semver.hpp) supplies
versions and ranges. [Diff](../../../include/Void/Text/Diff.hpp) implements Myers-style
edit reconstruction with stored trace vectors and line adapters. This exposes a meaningful
memory/work bound to add, including checked conversion from size_t to internal indices.
Byte encoders live in `Void::Encoding::Base64`, `Hex` and `Url`:
[Base64](../../../include/Void/Text/Base64.hpp),
[Hex](../../../include/Void/Text/Hex.hpp), [Url](../../../include/Void/Text/Url.hpp).
URL decoding explicitly distinguishes plus-as-space; URL-safe Base64 decoding rejects
padding and invalid trailing bits. [Html](../../../include/Void/Text/Html.hpp) has
entity unescaping, not a complete HTML parser or sanitizer. Neither existing case helpers
nor byte length are a Unicode normalization or grapheme contract.
Current suites include [Str](../../../tests/standalone/Text/Str.cpp),
[Encoding](../../../tests/standalone/Text/Encoding.cpp),
[Tokenizer](../../../tests/standalone/Text/Tokenizer.cpp),
[Format](../../../tests/standalone/Text/Format.cpp),
[Semver](../../../tests/standalone/Text/Semver.cpp), and
[Diff](../../../tests/standalone/Text/Diff.cpp). Graph parsing is partial at Diff lines
30/96; both signatures and surrounding algorithm were read directly.
## Boundary and native implementation
Text remains byte/ASCII infrastructure under [C-01/C-05/C-13](../ARCHITECTURE.md).
NEW Unicode owns UTF decoding, normalization, casing and segmentation. Select one-way
dependency **Unicode→Text**: Text never imports Unicode. An opt-in NEW
`include/Void/Unicode/TextAdapters.hpp` lives with Unicode. Existing Text byte operations
remain useful without versioned Unicode tables. General numeric policy stays in Math;
legacy Text numeric wrappers may use a small explicitly declared Math adapter header,
not force Math on every Str include. Native byte scanners and standard string/span/
from_chars are sufficient; no regex engine, ICU or formatting dependency is required.
Generic diff mechanics move to Algorithms; Text keeps line/patch formatting above it.
## NEW bounded APIs and dataflow
Illustrative NEW additions in NEW `include/Void/Text/Bounded.hpp`:
```cpp
namespace Void::Text {
struct TextLimits {
std::size_t max_input = 16 * 1024 * 1024;
std::size_t max_output = 16 * 1024 * 1024;
std::size_t max_parts = 65536;
};
struct TextError { enum Code { invalid_encoding, invalid_rule, limit } code;
std::size_t offset; };
std::expected<std::vector<std::string_view>, TextError>
split_views(std::string_view input, std::string_view delimiter, TextLimits);
std::expected<std::string, TextError>
replace_bounded(std::string_view input, std::string_view needle,
std::string_view replacement, TextLimits);
}
```
The code is a proposed shape, not an existing compiling example. `split_views` borrows
input; delimiter is literal bytes; empty delimiter is invalid, empty fields are retained
unless an explicit policy drops them. Returned views expire with input. `replace_bounded`
counts matches then checks multiply/add before reserving; it never grows beyond the
configured cap. Empty needle is invalid. Trim/case helpers gain explicit `_ascii` names
and deterministic classification of bytes 0–127; bytes ≥128 are preserved, avoiding
locale-dependent behavior. Unicode casing is requested from Unicode explicitly.
Encoders gain `encode_into(span<char>)`/`decode_into(span<byte>)`, reporting required
capacity and error offset. Validate the whole token and required output size before
publishing output for all-or-nothing overloads. Separate streaming codecs expose consumed/
produced counts and partial-output semantics. Base64 defaults are strict alphabet,
padding and unused-bit validation; URL-safe unpadded is a named profile. Permissive MIME
whitespace decoding is explicit. Hex rejects odd length by default. URL percent decoding
does not apply UTF normalization, path traversal resolution or repeated decoding.
Protocol owners decide when decoding is permitted; Text does not reinterpret signed bytes.
Tokenizer's NEW view mode returns kind, byte range, line and byte-column offsets without
copying lexemes. Defaults: 128 rules, 65,536 tokens, 1 MiB/token and the common 16 MiB input
cap. First matching rule wins, preserving current ordered-rule intent. A callback result
of zero means no match; a result beyond remaining bytes is `invalid_rule`. Every successful
token advances, preventing non-progress loops. Rule callables may allocate or throw;
exceptions propagate unless the caller selects an explicit Functional adapter. An
incremental tokenizer owns its incomplete token buffer and limits it; views passed to
callbacks are valid only for that callback. Long scans check optional stop tokens every
4 KiB and return an explicit stopped result with consumed offset.
Format gains sink/output-span variants and bounded table cell/column counts (256 columns,
65,536 rows, 16 MiB output). Missing placeholders remain literal by compatibility policy;
strict rendering reports missing keys. Width is bytes in Text, never terminal display
width. Semver separates strict SemVer parsing from the existing convenient `v` prefix
profile, and caps versions at 4 KiB, identifiers at 256 and range clauses at 128. Range
evaluation documents prerelease admission and build metadata comparison.
Diff defaults cap combined input at 65,536 elements, edit distance at 4,096 and scratch at
16 MiB. Exceeding a work limit returns `limit`, not a silently approximate patch. Use
Algorithms' checked Myers engine and leave later linear-space reconstruction behind the
measured large-diff capability gate. A patch includes source identity/expected deletes;
applying it validates input instead of merely emitting inserts/equalities as proof of a
matching source. Human patch rendering escapes control bytes and caps output.
## Implementation tasks
| Task | Phase; dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-TEXT-01 | P0; current source | Freeze legacy byte behavior, encoding profiles, Semver ordering and diff fixtures; document allocating/borrowed return lifetimes. | sol_implementer |
| M-TEXT-02 | P1; M-TEXT-01 | Add ASCII-explicit helpers, view splitting and checked bounded growth; high bytes and overflow sizes are deterministic without Unicode linkage. | sol_implementer |
| M-TEXT-03 | P2; M-TEXT-02 | Add strict into-span and streaming encoding APIs; every split boundary, malformed tail and insufficient-output case preserves its stated publication contract. | sol_implementer |
| M-TEXT-04 | P2; M-TEXT-02 | Add tokenizer view/incremental modes and rule budgets; invalid rule lengths and chunk-split tokens cannot overread or loop forever. | sol_implementer |
| M-TEXT-05 | P2; M-TEXT-02 | Complete bounded formatting and strict/compatibility Semver profiles; prerelease/range and output-limit tests pass. | sol_implementer |
| M-TEXT-06 | P2; Algorithms bounded-diff gate; M-TEXT-01 | Delegate generic diff, add checked patch apply and rendering; replay reconstructs target and mismatched source is rejected. | sol_implementer |
| M-TEXT-07 | P3; M-TEXT-03–06; Unicode conformance gate | Publish optional Unicode adapter examples and installed consumers; Text-only binary links without Unicode tables and legacy adapters retain fixtures. | sol_implementer |
## Validation, resources and migration
CURRENT checks are the linked suites and parent baseline, with no new test execution.
PROPOSED tests include arbitrary byte fuzzing, every codec chunk split, invalid padding,
overlong percent escape tails, embedded NUL, CRLF location tracking, adversarial tokenizer
callbacks, integer length overflow, large repeated diff inputs and strict Semver vectors.
Round-trip tests alone are insufficient: independently specified invalid inputs must fail.
No security claim treats HTML unescaping as sanitization or URL decoding as authorization.
Measure ASCII and mixed UTF-8 byte workloads, allocations per split/token, streaming
throughput, diff worst-case scratch and build cost under [PERFORMANCE](../PERFORMANCE.md).
Report p50/p95/p99, peak RSS/CPU and limits hit; do not compare owning and borrowed output
without labeling their lifetime/work difference. No module starts threads; streaming
state is owned by its caller and finalization reports incomplete input.
[Migration](../MIGRATION.md) retains old namespaces and byte semantics through named
compatibility functions. Unicode adapters never silently normalize keys or signed
documents. Existing URL-safe Base64 strictness stays protected. Rollback selects the old
package; applications that persisted normalized data need their own format/version
transition, not a Text-wide rewrite. See [requirements](../REQUIREMENTS.md),
[DEPENDENCIES](../DEPENDENCIES.md), [VALIDATION](../VALIDATION.md),
[DELIVERY](../DELIVERY.md) and [Unicode](../subsystems/Unicode.md).
+146
View File
@@ -0,0 +1,146 @@
# Time, injected clocks and measurement
Status: planning only; all feature work is **PLANNED**. Source baseline:
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
## Current source
[Time](../../../src/Time/module.cmake) has no declared dependencies.
[Stopwatch](../../../include/Void/Time/Stopwatch.hpp) uses `steady_clock`, mutable
single-writer state and an unbounded vector of laps. [Format](../../../include/Void/Time/Format.hpp)
supplies duration formatting/parsing, UTC strings and an ISO-8601 duration subset;
fractional interval seconds are truncated and calendar years/months are unsupported.
Some allocating format functions are `noexcept`, which requires migration review.
[Bench](../../../include/Void/Time/Bench.hpp) lives in `Void::Bench`, distinct from
`Void::Time`, and calls a `std::function<void()>` between two clock reads per iteration.
It records total/min/max/mean/operations-per-second and a vector-backed Suite. There
are no existing per-sample percentile, injected-clock or managed-timer contracts here.
`run_for` measures each body but checks the wall budget outside it; a body can exceed
the budget and cannot be forcibly stopped. `run` with zero iterations leaves min/max
sentinels, unlike `run_for`'s normalized empty result.
[Stopwatch](../../../tests/standalone/Time/Stopwatch.cpp),
[Time](../../../tests/standalone/Time/Time.cpp) and
[Bench](../../../tests/standalone/Time/Bench.cpp) tests cover existing behavior. Some
tests sleep/use real time; future deterministic tests must supplement those, not claim
that elapsed-time nonnegativity proves clock injection. Scoped graph coverage reported
no recorded gaps; relevant implementation and tests were read directly.
## Clock ownership and NEW shape
Time owns clocks under [C-03/C-04](../ARCHITECTURE.md); Async owns waiting, operation
options and completion. Scheduler owns calendar jobs. Runtime may retain clock objects
but Time never imports these modules. Native `std::chrono` is the initial backend.
No external timer thread or timezone service starts on inclusion or construction.
Illustrative NEW API, proposed NEW `include/Void/Time/Clock.hpp`:
```cpp
namespace Void::Time {
enum class ClockError { negative_step, overflow };
class MonotonicClock {
public:
using time_point = std::chrono::steady_clock::time_point;
virtual time_point now() const noexcept = 0;
virtual ~MonotonicClock() = default;
};
class CivilClock {
public:
virtual std::chrono::system_clock::time_point now() const noexcept = 0;
virtual ~CivilClock() = default;
};
class ManualClock final : public MonotonicClock {
public:
time_point now() const noexcept override;
std::expected<void, ClockError> advance(std::chrono::nanoseconds);
};
}
```
Native adapters return standard steady/system clock points. ManualClock starts at the
steady epoch, rejects backward steps and overflow, and publishes atomic ticks for tests.
The injected clock must have a stable lifetime through final operation shutdown. It
does not itself wake executors: a manual-time test advances the clock then explicitly
drives Async's timer backend. Backends must not compare manual clock deadlines with
the host's steady `now()`. Conversion to OS waits uses `deadline - injected.now()`;
native absolute OS deadlines are used only for a verified matching clock domain.
An expired deadline at admission fails without submitting work. This preserves Async's
standard steady time-point operation options while making clock-domain ownership explicit.
Stopwatch gains a borrowed MonotonicClock constructor and a maximum 4,096 retained laps;
`try_lap()` reports full without growing storage. Existing convenience stopwatch uses
the native adapter. Stop/start/reset semantics are specified independently: start clears
elapsed and laps, resume accumulates, and split restarts at the same sampled instant.
No operation pretends a civil-clock adjustment changes monotonic elapsed time.
## Duration, civil time and calendar work
NEW parsing accepts bounded spans (256 bytes default), uses checked accumulation in
integer nanoseconds, and returns precise error offset, invalid-unit, overflow and
unsupported-calendar-unit classifications. Preserve the old truncating ISO interval
parser as a compatibility profile; NEW exact parsing never silently truncates fractions.
Separate elapsed durations from calendar periods. UTC timestamp parse/format has fixed
precision policies (seconds/milliseconds/nanoseconds), explicit offset handling and
overflow checks. Do not persist `steady_clock::time_point`; persist civil instants,
durations or Scheduler occurrence identities with a versioned schema.
Calendar conversion uses the standard chrono timezone facility through an optional
adapter, with explicit `unsupported` if the selected toolchain/environment has no
usable database. No network download is performed. Record the timezone database version
in reproducible scheduling fixtures. Ambiguous local times require earliest/latest/reject
policy; nonexistent local times reject by default. Leap-second handling is explicit UTC
conversion policy, not hidden normalization. Scheduler owns next-occurrence recurrence
algorithms and durable admission; Time owns the conversions and their diagnostics.
## Measurement design
NEW benchmark options default to 10 warmup batches, 100 measured batches, 1,000 operations
per batch and at most 65,536 retained raw samples. Templates accept the callable directly,
avoiding mandatory `std::function` dispatch. Record both batch elapsed time and operation
count. Two modes are separate: throughput batching reports amortized time/op; latency
sampling clocks individual operations and reports p50/p95/p99 of those samples. Batch
means are never labeled individual latency percentiles.
Measure the empty harness/clock-read pair and type-erased versus templated call overhead
alongside raw results. Do not automatically subtract a noisy overhead estimate or publish
negative corrected latencies. Retain the raw baseline and explain resolution limits.
Warmup is excluded from measured samples but still charged to total wall/CPU resource
use. Exceptions stop a run with a failure and partial-run metadata. Zero iterations and
nonpositive budgets are invalid in the NEW API; the old API gets normalized zero results
for compatibility. A maximum total admission budget defaults to 30 seconds per case,
checked between batches; one arbitrary callback may overrun and this is reported.
Allocation/RSS/CPU probes are optional injected observers outside timed regions, not
global interception. Result sets cap at 1,024 cases and 16 MiB retained metadata.
## Ordered tasks
| Task | Phase; dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-TIME-01 | P0; current source | Record parser precision, exception and bench semantics; capture empty/zero and stopwatch transition fixtures. | sol_implementer |
| M-TIME-02 | P1; M-TIME-01 | Add native/manual MonotonicClock and CivilClock adapters plus bounded stopwatch; deterministic start/resume/split and overflow tests pass. | sol_implementer |
| M-TIME-03 | P1; M-TIME-02; Functional pure retry contract | Validate injected-deadline domains with Async and blocking retry adapters; advancing manual time plus explicit polling expires an operation once. | astra_implementer |
| M-TIME-04 | P2; M-TIME-01 | Add exact duration/UTC parsing and optional timezone conversions; fractions, offsets, DST folds/gaps and unsupported database paths are explicit. | sol_implementer |
| M-TIME-05 | P2; M-TIME-02 | Add templated bounded benchmark runs, separate latency/throughput results and overhead baselines; synthetic sample quantiles and empty runs have deterministic tests. | sol_implementer |
| M-TIME-06 | P3; M-TIME-03–05 | Publish measurement methodology, compatibility adapters and isolated consumers; observed results include environment, harness cost and resource probes. | sol_implementer |
## Validation and compatibility
CURRENT verification is the linked source/tests and the parent baseline; no benchmark
or C++ test was rerun. PROPOSED tests use manual clocks, fixed sample arrays for quantile
rank definitions (nearest-rank, documented), clock-domain adapters, integer overflow,
maximum lap/sample caps and throwing bodies. Keep a small real-clock smoke test with
tolerances; do not use sleeps for logical deadline assertions. Timezone tests pin their
database fixtures and skip only with an explicit capability reason.
[PERFORMANCE](../PERFORMANCE.md) requires p50/p95/p99, throughput, allocations, peak RSS/CPU
and build cost. Benchmark infrastructure must report its own clock resolution and
overhead before supporting other modules' performance claims. Instrumentation overhead
is measured separately; passing a benchmark test establishes semantics, not speed.
[Migration](../MIGRATION.md) retains `Void::Bench` convenience names through adapters,
documents changed empty-run and allocating-noexcept behavior, and versions benchmark
output schemas. Rollback selects the prior package; persisted civil timestamps must keep
their precision/schema marker and cannot be replaced by monotonic ticks. See
[VALIDATION](../VALIDATION.md), [DELIVERY](../DELIVERY.md),
[DEPENDENCIES](../DEPENDENCIES.md), [requirements](../REQUIREMENTS.md),
[Async](Async.md) and [Scheduler](../subsystems/Scheduler.md).
+192
View File
@@ -0,0 +1,192 @@
# Update — verified releases and recoverable activation
Status: plan; all feature tasks PLANNED. Baseline `f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`.
R-010/R-015 and [C-02–C-07/C-09/C-10](../ARCHITECTURE.md) govern this module.
## Existing source and protected behavior
[Feed.hpp](../../../include/Void/Update/Feed.hpp) defines `Void::Update::Feed`, `Release`,
`VerificationPolicy`, `VerifiedFeed`, `VerifiedEnvelope`, component catalog/release types,
verification/parsing functions and selection. Defaults cap envelopes at 5 MiB, payloads at
4 MiB and releases at 10,000; replay floor and injected current time are already policy
inputs. [Feed.cpp](../../../src/Update/Feed.cpp) verifies Ed25519 signatures over decoded
payload bytes and retains those bytes as `signedPayload`. Component-set validation and
greatest-compatible-version selection are existing capabilities.
Important baseline distinction: Feed.cpp includes general `Void::Json` from
[Json.hpp](../../../include/Void/Data/Json.hpp), not
[StrictJson.hpp](../../../include/Void/Data/StrictJson.hpp). The latter has a separate
restricted representation/profile. Schema-3 readable-document equality currently parses
the signed payload before the signature call; `verifyFeedEnvelope` parses the feed schema
after `verifyEnvelope`. The target verify-before-schema rule is therefore an explicit
hardening task, not a claim that every current envelope path already follows that order.
Do not broaden StrictJson or silently change legacy accepted documents when modernizing Data.
[VersionStore.hpp](../../../include/Void/Update/VersionStore.hpp) and
[VersionStore.cpp](../../../src/Update/VersionStore.cpp) implement prepare/publish/activate,
commit/rollback/reconcile, external lifecycle health recording and retention. Candidate
activation is reversible until a durable healthy-history marker newer than the activation
journal baseline commits it. `commit` rechecks marker evidence after an apparent write/sync
failure. After that point journal cleanup is idempotent maintenance; `rollback` finalizes a
committed candidate instead of undoing it. Preserve these exact semantics.
[Update tests](../../../tests/standalone/Update/Update.cpp) cover signatures/replay/selection,
readable envelopes, component sets, idempotent commit, durable marker reconciliation,
external lifecycle recording, health-order/prune behavior and unsafe filesystem layouts.
[module.cmake](../../../src/Update/module.cmake) depends on Crypto, Data, Functional, System
and Text. The module is not currently a complete transport/download/orchestrator service.
## Chosen composition and NEW interfaces
Keep native release-selection/workflow logic and existing cryptographic implementations
from [Crypto](Crypto.md)/[Security](Security.md). OpenSSL/libsodium remain the initial
primitives; Update does not write its own signature algorithm. Net handles transport,
Archive handles bounded package extraction, Plugin/Service handle live candidate lifetimes,
and VersionStore owns durable activation. Runtime/Fsm adapters are optional composition
layers, so parsing and store operations remain usable in an embedded application.
NEW illustrative Update-owned orchestration API:
```cpp
enum class InstallState {
Verified, Downloading, Staged, Published, Activated, HealthyCommitted,
CleanupPending, RolledBack, RecoveryRequired
};
struct InstallReceipt { InstallId id; InstallState state; ReleaseIdentity release; };
struct InstallOptions; // admission limits plus Async operation options
class InstallSession; // owns candidate, staging, callbacks and progress
Result<InstallSession> plan_install(VerifiedSelection, InstallOptions);
// async run/stop/status adapters use Async-owned task/operation contracts
```
All names in this sketch beyond existing types are NEW, including VerifiedSelection and
ReleaseIdentity. VerifiedSelection retains the original verified envelope bytes, signer
identity, selected component dependency set, artifact digest/size and policy decision.
It cannot be constructed from an arbitrary caller string pretending to be verified. The
public unsigned parsers remain clearly named structural tools and never confer trust.
## Verification, selection and installation dataflow
1. Snapshot explicit trust keys, channel/platform/ABI constraints, clock and policy at
admission. Fetch within Net's total deadline and bounded response size. Outer envelope
parsing is bounded and only extracts schema/key/encoded payload/signature; decode exactly
once, retain the decoded bytes, and verify their signature before payload schema parsing
or readable-document comparison. No reserialization or whitespace normalization is
substituted for those signed bytes.
2. Select the Data-owned versioned parsing policy for that envelope schema. Pin the accepted
legacy behavior with golden signed fixtures; general JSON improvements cannot silently
enlarge it. StrictJson's numeric/duplicate/depth rules remain unchanged. New strict-profile
schemas must explicitly declare their representation and compatibility in M-UPDATE-02;
migration of legacy documents requires a separate schema version if the existing corpus
cannot be preserved. This gate cannot be bypassed by switching parser aliases globally.
3. Validate expiry, monotonic feed sequence, platform/toolchain/ABI and component dependency
closure before downloading artifacts. Persist a high-water sequence per configured feed
identity/channel using atomic file replacement and directory sync before accepting a
lower sequence on any later restart. Key rotation does not reset that floor. Valid but
unusable releases may advance the verified-feed floor; retain their signed metadata so
the same verified selection can resume. Explicit rollback to an already known healthy
local version is a separate operator action, not acceptance of a replayed feed.
4. Stream artifacts to an exclusive staging area while checking actual size and incremental
digest. Require exact final size/digest. A resumable download is accepted only after a
server identity/validator match and final whole-artifact digest verification; default is
restart into a new temporary file. Redirects follow Net's credential/origin policy.
5. Extract using [Archive](Archive.md)'s safe staging workflow and validate the release
manifest/ABI/component inventory. Publishing immutable version directories is distinct
from activation. Do not substitute a tar filename for authenticated artifact identity.
6. An explicit lifecycle owner activates the candidate, waits for bounded readiness/health,
then calls the existing VersionStore commit path (internal activation) or `recordHealthy`
(external activation). These modes remain separate; external health recording cannot
implicitly commit an internal activation journal. [ReloadableApplications](../platforms/ReloadableApplications.md)
owns generation publication and quiescence; acquired old handles keep their pins.
7. Report HealthyCommitted only after the durable marker. Cleanup/prune failures become
CleanupPending with diagnostics and retry state, never an invitation to rollback.
TLS trust-chain and peer-host checks remain enabled in transport. SNI alone does not verify
the expected peer, as the [OpenSSL 3.5 client guide](https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/)
explains. Network trust does not replace signed release verification. Diagnostics/progress
must omit keys, authorization headers and artifact contents.
## Failure, cancellation and recovery semantics
Before activation, failure leaves the active version unchanged and cleans only owned staging.
During reversible activation, readiness failure requests stop, joins candidate work, then
rolls back through VersionStore. Cancellation after the durable healthy marker reports the
committed state and stops only optional cleanup. A lost acknowledgement or failed sync can
be Unknown; run `reconcile` and inspect durable health/journal evidence before choosing the
next action. A caller must not convert every error into a rollback command.
One coordinator per store serializes workflow transitions; filesystem mutation still uses
VersionStore's locking. Network work and user health/lifecycle callbacks execute outside
store/configuration locks. Progress subscriptions snapshot owning events; unsubscribe stops
future admissions and has a separate drain boundary. Shutdown rejects new sessions, cancels
downloads, joins extraction/candidate work and reconciles any transition already entered.
No forced plugin unload or asynchronous use of destroyed staging paths is allowed.
Restart reads the operation journal, immutable publication identity, activation journal and
healthy history. A journal is versioned/checksummed and written before its dependent side
effect where compensation requires it; it references existing VersionStore evidence instead
of declaring another activation commit point. Unknown or mismatched records stop automation
with RecoveryRequired. Corrupt metadata is not discarded to make an update appear successful.
Retain active, pending candidate, previous candidate and pinned plugin generations; retention
must respect both durable store protection and external live-generation pins.
Trust changes are explicit configuration operations: bootstrap keys come from the application,
rotation requires an authenticated old-trust transition or an operator-approved replacement,
and removal/revocation invalidates future selections without rewriting historical signed bytes.
Expiry is a civil-time policy with an injected clock; time rollback cannot lower the stored
sequence floor. Update does not invent a network time authority.
## Defaults and operation budgets
Keep existing envelope/payload/release limits. NEW defaults: one active install per store,
eight queued selections, two concurrent artifact downloads, 512 MiB per compressed artifact,
2 GiB staging quota, 32 components and 256 dependency edges per transaction. Package
extraction retains Archive's absolute limits and additionally obeys the session quota.
Reserve disk headroom for candidate plus previous healthy content before admission; do not
delete the rollback version to make an unverified candidate fit.
The default install deadline is ten minutes including admission, download and activation,
with a 30-second readiness phase bounded by the remaining total time. Use a one-second
health probe interval and require three consecutive ready responses in the reference
workflow; applications can replace that health policy explicitly. Health callbacks are
cooperative owned work, not forcefully killed code. Retain two previous healthy versions
by default, subject to pins and space diagnostics; bounded cleanup batches process at most
16 publications per pass. A pin preventing cleanup reports pressure rather than being broken.
## Ordered implementation tasks
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| M-UPDATE-01 | P0; current signed/store tests | Freeze exact-byte and durable-marker fixtures, including schema-3 verification order and cleanup failure; record baseline general-vs-strict parser boundary. | astra_implementer |
| M-UPDATE-02 | P1; M-UPDATE-01, Data profile owner, Crypto contract | Verify-before-payload-parse, pinned schema policy and durable replay floor; invalid signatures never trigger payload schema processing and legacy fixtures retain defined behavior. | astra_implementer |
| M-UPDATE-03 | P2; M-UPDATE-02, Net streaming/deadlines, Archive staging | Bounded download/verify/extract/publication session and resumability; wrong size/digest/path never reaches activation. | astra_implementer |
| M-UPDATE-04 | P2; M-UPDATE-03, Plugin/Service/Fsm lifecycle | Readiness, internal/external lifecycle adapters and operation journal; exactly one activation owner and no second commit marker. | astra_implementer |
| M-UPDATE-05 | P3; M-UPDATE-04, Runtime/Observability | Managed shutdown, retained-generation-aware pruning, trust operations and recovery status; committed cleanup failure is visible but not rollback-safe. | sol_implementer |
| M-UPDATE-06 | P3; M-UPDATE-05, Testing fault harness | Crash/race matrix and installed reference workflow; repeated reconcile is idempotent at every transition. | astra_implementer |
P4 rollout coordination uses [DistributedApplications](../platforms/DistributedApplications.md)
policy above Update; a fleet controller cannot override a host's exact-byte verification,
generation ownership or healthy commit semantics.
## Validation and migration
CURRENT TEMPLATE, with source-verified filters:
`<existing-build>/tests/VoidTests --filter '^(update_feed_.*|component_feed_.*|readable_component_.*|version_store_.*)$'`.
The actual baseline and unrun checks are in [validation](../VALIDATION.md). PROPOSED after
M-UPDATE-02–06: mutate signed bytes while preserving equivalent JSON, invalid signature with
malformed payload, duplicate/oversized/deep fields under each declared profile, schema-3
mirror mismatch, replay after restart/key rotation, download redirect/partial/hash failure,
disk full, callback reentry, activation-time cancellation and crash at every health/journal
sync. Inject cleanup failure after commit and assert that rollback preserves the candidate.
Use [performance](../PERFORMANCE.md) for verify/select latency, streaming throughput, activation
p50/p95/p99, peak RSS/CPU/staging space and build cost; use common sample/confidence rules.
Report retained generations and failed installs, not only successful fast paths.
[Migration](../MIGRATION.md) preserves existing verification and VersionStore interfaces via
adapters. Store-journal upgrades are versioned and recover old records before admitting new
work; backup old metadata without erasing commit evidence. Unknown newer schemas are rejected.
Roll back candidate code only before its healthy commit, or perform a new explicit activation
of a known healthy version afterward. No automatic schema/data downgrade is implied.
Graph coverage was checked; partial Feed declarations/definitions and adjacent Json ranges
were read directly. These planned changes have not been built, fuzzed or crash-tested.
@@ -0,0 +1,152 @@
# DistributedApplications platform plan — NEW reference compositions
Status: planning only; reference applications below are future artifacts, not runnable
applications in this checkout. All tasks PLANNED. Baseline
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`, inspected 2026-11-24.
Authority: [requirements](../REQUIREMENTS.md) R-009–R-016;
[architecture](../ARCHITECTURE.md) C-01–C-14, especially C-12/C-14.
## Baseline and product boundary
Current [Net](../../../include/Void/Net/Http.hpp),
[Security](../../../include/Void/Security/Security.hpp) and
[ShortUrl V1](../../../include/Void/ShortUrl/ShortUrl.hpp) are individual building blocks.
They do not constitute a distributed platform. Source/graph metadata was checked; Net
Http.hpp gaps 112/115 were read directly. There is no distributed launcher, membership
operator, broker, replicated database or acceptance suite claimed at this baseline.
Proposed reference source under `examples/distributed/` and tests under
`tests/integration/distributed/` are NEW; names/targets are assigned only during implementation.
This platform composes [NetworkedApplications](NetworkedApplications.md)'s managed service
and [ReloadableApplications](ReloadableApplications.md)'s optional upgrade discipline with
RPC, Messaging, Discovery, Coordination, Replication and DistributedStorage. It owns startup,
readiness, operator workflows, fault scenarios and reference applications. It does not own
alternative consensus, storage, TLS, task or observability implementations. Linux is the
initial validation host; process/container orchestration is a test/deployment adapter,
not a hidden dependency of embedded libraries.
## Future reference applications and NEW composition API
Choose two bounded first applications: a three-node fixed-membership replicated KV service,
and an at-least-once durable worker queue backed by one replicated group. The KV example
exercises conditional batches, read policies, session dedup, snapshot/restart and backup;
the queue example exercises durable publish/ack, duplicate delivery, poison messages/DLQ
and consumer recovery. A distributed ShortUrl repository is a later optional integration
recipe and must preserve its frozen V1 interface. No arbitrary external service/account or
paid infrastructure is required to run the future loopback tests.
```cpp
// NEW illustrative platform composition; component types remain owner-defined.
struct NodeConfig {
ClusterId cluster; NodeId self; FixedVoterSet voters; BootstrapEndpoints peers;
StorageConfig data; NetServerPolicy transport; ResourceBudget resources;
};
class DistributedHost {
static Result<DistributedHost> compose(NodeConfig, InjectedResources);
Task<Result<Readiness>> start(OperationOptions);
Task<Result<void>> stop(OperationOptions);
};
```
The host retains owned services and borrows injected executor/clock/allocator only through
final join. Async owns operation options and scopes, Runtime owns managed resources, Service
owns lifecycle handles. Embedded applications can construct the same graph with supplied
resources and explicit startup. Configuration is an immutable validated snapshot; changing
voter lists is not hot-reload configuration. Local node identity, data directory, peer trust
mapping and static bootstrap endpoints are explicit. No global singleton starts a cluster.
## Startup, readiness and shutdown algorithm
1. Validate config/schema, fixed group identity, peer identities, directory ownership,
quotas and available backend capabilities. Missing trust material is a startup failure;
credentials are runtime inputs and never checked into examples or printed in diagnostics.
2. Create owned resources, open native Storage and recover protocol/application/snapshot
state. Verify application+dedup+applied index consistency before listeners accept work.
Expose an isolated administrative health interface only under explicit bind/auth policy.
3. Start authenticated peer RPC listener and static Discovery provider. Connect fixed peers;
run the Replication adapter and election. Discovery availability is not a quorum vote.
User listener may bind but rejects calls until the selected service's readiness gate.
4. KV readiness requires an available leader path, current-term committed barrier and local
recoverable application state; leader-only write readiness is distinct from follower
process liveness. Queue readiness additionally requires storage quota and consumer/queue
admission health. A follower can report healthy-but-not-write-ready. Consistent reads
still perform per-operation quorum confirmation; readiness is not a lease.
5. Publish services/endpoint hints after readiness. Start periodic snapshot/observation tasks
through owned scopes; optional coordination-backed Discovery starts only after the
replicated directory is ready and never replaces static Raft membership.
6. Stop external admission and readiness publication, finish or cancel client scopes, drain
mandatory durable actions, stop consumers and peer admission as appropriate, join all
replication/transport/snapshot tasks, then close storage and finally execution resources.
Default grace is 30 seconds; expiry reports incomplete stop while preserving owned state
until join. Do not destroy resources merely to make shutdown appear bounded.
## Operational decisions and failure matrix
Initial profile: three voters, one group/service, one data directory/node, no shared database
file, no automatic member replacement. Use explicit static cluster identity and per-node
authenticated TLS identity. Security authorization separates peer, client and administration
actions; a client cannot issue peer consensus messages. Certificates/trust policy are rotated
with overlapping validated trust generations and connection draining, never disabling checks.
Default platform budgets are the minimum of component limits, plus a host aggregate: 256 MiB
queued/stream payloads, two simultaneous snapshots, 16 active groups and 1,024 external calls.
Account storage caches/indexes separately in RSS; this is not a 256 MiB total-process promise.
| Scenario | Expected service/operational result | Acceptance evidence |
| --- | --- | --- |
| One of three nodes stops | Majority continues after election; no acknowledged state lost | Client history plus durable recovered state |
| Two of three unavailable | No new committed writes or consistent reads; stale reads only by explicit policy | Minority old-leader test |
| Apply committed, response lost | Same identity returns original result | Kill leader at apply/reply boundary |
| Slow/full/failed disk | Admission pressure or group fault; no pre-sync success | Fault port plus real filesystem pressure |
| Corrupt log/snapshot | Quarantine node/group; restore or rebuild under explicit procedure | Mutation/restart test and diagnostics |
| Poison work / worker crash after effect | Retry/DLQ; duplicate side effect possible without application dedup | Worker inbox/outbox demonstration |
| Discovery or metrics unavailable | Static peer transport remains usable; observation failures bounded; no quorum weakening | Disable optional adapters |
| Snapshot load / slow follower | Rate-limited catch-up; bounded queues and readable leader | Long-lag soak and RSS/disk metrics |
| Rolling binary/schema mismatch | Refuse unsupported peer/command; operator halt before unsafe rollout | Mixed-version fixture matrix |
| Loss of quorum disks | Operator recovery into separately identified cluster; no automatic force-new-cluster | Recovery rehearsal and explicit data-loss report |
Metrics: term/role/quorum state, commit/applied lag, sync duration/errors, queue/DLQ depth,
admission rejection, cancellation, snapshot progress and disk headroom. Cap labels at
configured node/group/queue identities; no payloads, raw keys or bearer tokens. A diagnostic
bundle contains version/config fingerprints and sanitized histories, not credentials/data.
SLO profiles are chosen from measured workloads, with separate normal, failover and recovery
latency. Benchmark absence cannot be reported as a production reliability claim.
## Ordered platform backlog
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| P-DISTRIBUTED-01 | P0; baseline | Define future examples, deterministic failure histories and readiness states; no runnable artifact claim | astra_implementer |
| P-DISTRIBUTED-02 | P1; P-DISTRIBUTED-01, Runtime/Service/Async contracts | NEW host graph specification and fake component lifecycle tests; injected resources outlive join | astra_implementer |
| P-DISTRIBUTED-03 | P3; P-DISTRIBUTED-02, NetworkedApplications gate, RPC/Discovery | Single-node reference composition and authenticated peer fixture; bounded startup/rollback/shutdown | sol_implementer |
| P-DISTRIBUTED-04 | P4; P-DISTRIBUTED-03, Coordination/Replication/DistributedStorage single-group gates | Three-node KV reference and linearizability/crash histories; quorum reads and durable replies | astra_implementer |
| P-DISTRIBUTED-05 | P4; P-DISTRIBUTED-04, Messaging replicated queue gate | Worker queue reference, inbox/outbox and DLQ operations; at-least-once failure matrix passes | sol_implementer |
| P-DISTRIBUTED-06 | P4; P-DISTRIBUTED-04, snapshot/recovery gates | Backup/restore, trust rotation, mixed-version rollout and chaos tooling; restore rehearsals retain identities correctly | astra_implementer |
| P-DISTRIBUTED-07 | P4 later; P-DISTRIBUTED-06, DistributedStorage routing/movement gates | Range movement operations and optional replicated directory; ownership/freeze/crash evidence before scale claims | astra_implementer |
## Evidence, migration and release gate
CURRENT evidence is the root-recorded baseline build/tests in [VALIDATION](../VALIDATION.md),
not distributed feature evidence. No builds, benchmarks, fault tests or deployments ran
for this document. PROPOSED tests first run deterministic adapters, then three independent
processes with isolated ports/directories, controlled packet faults and kill/restart points.
Test harnesses collect complete operation histories including unknown outcomes, seeds and
fault timelines; acceptance checks linearizability, dedup, applied positions, durable replies,
resource bounds and shutdown. No future launcher command is advertised as presently usable.
Build/consumer gates follow [BUILD-AND-DISTRIBUTION](../BUILD-AND-DISTRIBUTION.md).
Use [PERFORMANCE](../PERFORMANCE.md) to record p50/p95/p99, throughput, allocations, peak
RSS/CPU, disk amplification/recovery, network traffic and build cost. Compare one/three/five
node profiles only after corresponding membership configurations are supported and verified.
Durability tests follow [SQLite's crash fault methodology](https://sqlite.org/atomiccommit.html#_testing_atomic_commit_behavior);
consensus safety follows the selected [Raft protocol](https://raft.github.io/raft.pdf), with
application-specific integration evidence still mandatory.
Rollout first verifies every node can read existing log/snapshot/application formats, then
deploys readers, then enables new commands only after all voters advertise support. Rollback
stops new command admission and requires old readers for everything already durable. Plugin
reload does not unload an in-use state-machine implementation: pin through active apply and
snapshot work, and migrate state only at a recoverable checkpoint. Majority-loss restoration,
voter changes and data-destructive repair are operator-authorized procedures, never automated
startup fallbacks. See [MIGRATION](../MIGRATION.md), [DELIVERY](../DELIVERY.md) and
[DEPENDENCIES](../DEPENDENCIES.md). A fresh independent integrated review and full affected
behavior checks precede any merge/release recommendation; documentation completion is not release.
@@ -0,0 +1,244 @@
# NetworkedApplications — bounded reference services and operations
Status: NEW platform composition plan; all tasks PLANNED. Baseline
`f1f9ba375b22abf1adcc7c550ec21ac20895c0a4`. This document specifies future reference
applications only; it creates no server, deployment, open port or runnable command.
R-003/R-007/R-009/R-010/R-012 and [C-01–C-08/C-11/C-14](../ARCHITECTURE.md) apply.
## Existing pieces and composition boundary
The inspected repository already contains [Sqlite](../../../include/Void/Sqlite/Sqlite.hpp)
RAII operations, [Log](../../../include/Void/Log/Log.hpp) facade/sinks,
[Archive](../../../include/Void/Archive/Archive.hpp) extraction and
[Update VersionStore](../../../include/Void/Update/VersionStore.hpp) activation primitives.
They do not by themselves establish the startup, request ownership, durability or shutdown
contract of a complete service. Their existing tests remain module evidence, not an
end-to-end platform acceptance result. Native Storage and Observability are NEW designs.
The platform composes [Runtime](../subsystems/Runtime.md), [Async](../modules/Async.md),
[IO](../subsystems/IO.md), [Net](../modules/Net.md), [Configuration](../modules/Configuration.md),
[Service](../modules/Service.md), [Security](../modules/Security.md),
[Storage](../subsystems/Storage.md), [Sqlite](../modules/Sqlite.md),
[Log](../modules/Log.md) and [Observability](../subsystems/Observability.md).
It owns wiring, reference domain workflows, lifecycle policy and operational acceptance.
It does not own a second executor, HTTP parser, TLS engine, database, logger or error type.
Optional RPC/jobs use their existing plan owners, and no foundation imports this platform.
Choose Void-owned native protocol/IO paths when their conformance gates pass. Preserve
the existing Boost-based paths behind documented adapters during migration; do not replace
them merely to declare the platform native. IO owns level-triggered epoll/nonblocking sockets
and bounded file workers under C-06, Net owns protocol/session reuse, and OpenSSL supplies
TLS. Verify both trust and peer identity for outbound clients; SNI is a distinct setting.
[OpenSSL's client guide](https://docs.openssl.org/3.5/man7/ossl-guide-tls-client-block/)
is the primary TLS implementation reference.
## Reference applications and NEW composition surface
PROPOSED source locations are `examples/platforms/networked-kv/`,
`examples/platforms/networked-client/` and later `examples/platforms/networked-jobs/`.
These are NEW paths, not existing examples to run. Build them as installed-package consumers
so accidental whole-repository linkage cannot hide missing dependencies. The reference
service first uses a native Storage backend; a separate SQLite profile exercises first-class
SQL integration with its own schema/migrations. Both implement only the explicitly common
reference-domain contract; they are not interchangeable engine/file-format facades.
NEW illustrative platform-owned API, subject to module-owned type definitions:
```cpp
struct NetworkedConfig; // validated listener/domain/limit configuration
struct ApplicationResources; // owning/borrowed handles to module-owned resources
class NetworkedApplication {
public:
static Result<NetworkedApplication> create(ApplicationResources, NetworkedConfig);
Result<void> start();
Result<HealthSnapshot> health() const;
// stop/join use Async's operation options and completion contract
};
```
`Result` is C-02 shorthand; HealthSnapshot and the composition wrapper are NEW platform
types. Resources do not define competing executor/clock/memory/telemetry interfaces. Embedded
mode borrows application-supplied module resources through final join. Managed mode explicitly
starts Runtime, which owns them through shutdown. Construction alone opens no listeners or
workers. The reference client uses Net sessions, total deadlines and checked responses;
it never blindly retries a mutating request on a new connection.
## Initial HTTP key-value workflow
HTTP/1.1 is the first protocol profile. The service has the following NEW application
endpoints; Net remains responsible for parsing and framing.
| Endpoint | Contract and storage effect |
| --- | --- |
| `GET /v1/kv/{key}` | Canonical base64url key, bounded owning value response and opaque version ETag; 404 only for an absent key in the captured snapshot. |
| `PUT /v1/kv/{key}` | Raw value body, required idempotency ID and explicit absent/version precondition; atomically store value/new version and request outcome. |
| `DELETE /v1/kv/{key}` | Required version precondition/idempotency ID; atomically tombstone/remove plus record outcome. |
| `GET /v1/scan` | Bounded page within a retained snapshot; opaque expiring cursor, no leaking raw database sequence/file offsets. |
| `GET /v1/operations/{id}` | Auth-scoped known outcome or explicit Unknown; absence/expired retention is never proof that a write did not commit. |
| `/live`, `/ready`, `/metrics` | Separate administrative listener; lifecycle status and bounded telemetry, no data mutation or credential dump. |
Request flow is accept → protocol bounds → deadline/admission → authentication/authorization
→ decode/validate → domain operation → durable backend result → response encoding/write.
Each request owns a task scope, context snapshot, body buffers and storage handles until
exactly one completion and final backend access. Buffer ownership extends past socket close
if a write is still completing; disconnect does not roll back an already committed mutation.
Native Storage uses one conditional batch for the business key/version plus a reserved
application namespace containing idempotency record/result. SQLite uses one explicit
transaction and unique request-id constraint plus version-checked update; affected-row
count and stored outcome are checked before commit. No operation spans both backends in
one atomic promise. Domain adapters expose Conflict, NotFound, Overloaded, Unavailable and
UnknownCommit separately, preserving backend causes in bounded internal diagnostics.
Idempotency IDs are scoped to authenticated principal and operation type. Persist a digest
of canonical operation/key/precondition/body with the outcome; the same ID with different
inputs is Conflict. Retain records for at least 24 hours, with a default 100,000-record/
256 MiB budget; when full of unexpired records, reject new mutations instead of evicting
live deduplication promises. After the advertised retention window, clients must inspect
business state or obtain a new explicit decision, not retry an old ID as though dedup were
permanent. GC runs in bounded backend transactions/batches. Persist enough time/high-water
metadata that backward clock changes cannot shorten the advertised retention horizon.
Durable success is returned only after the chosen backend's durable commit succeeds. If
commit succeeded but the socket write fails, a retry with the same ID retrieves the stored
outcome. A backend Unknown makes readiness reflect recovery state and returns a structured
503 with operation ID/outcome=unknown when a reply is possible. A canceled pre-admission
request has no effect; cancellation after submission must retain outcome uncertainty.
Do not classify a transport timeout as a safe reason to create a new ID and replay the write.
## Startup, configuration and shutdown
Startup is a dependency-ordered transaction:
1. Validate configuration and capabilities, select embedded/managed resource ownership,
install bounded early diagnostics, load trust/auth policy and reserve budgets.
2. Open the selected database, recover/reconcile it, and validate schema/format compatibility.
Required migrations run only under their explicit migration gate; never expose readiness
while silently upgrading a store of unknown provenance.
3. Register service/domain handlers and telemetry, then start protocol listeners. Default
reference data listener is `127.0.0.1:8080`, admin is `127.0.0.1:9090`; tests use assigned
ephemeral loopback ports. Binding external interfaces requires explicit application
configuration with TLS and authentication policy.
4. Publish readiness only after storage, handler dependencies and mandatory resources are
healthy. On failure, close listeners/registrations and unwind started resources in reverse
dependency order, preserving the original failure and cleanup diagnostics.
Configuration reload parses a complete candidate, validates limits/paths/certificates,
then atomically publishes an immutable configuration generation. In-flight requests keep
their old generation. Level/telemetry policy and new-connection TLS material can change
live; backend selection, database path and persistent schema require a restart/migration
workflow. Do not partly install a configuration whose second listener fails to bind.
Hot code replacement follows [ReloadableApplications](ReloadableApplications.md), not an
uncoordinated callback swap in this platform.
Shutdown first marks unready and closes new admission/keepalive reuse, then drains requests
for 20 seconds, requests cooperative stop, and joins them within a default 30-second total
shutdown budget where supported. Storage operations that already crossed a commit boundary
finish/report their outcome. If arbitrary application code does not cooperate, an external
process supervisor may terminate the service; the library does not forcibly destroy its
objects and claim clean shutdown. After tasks join: flush/checkpoint as configured, close
database handles, flush telemetry/logging, stop IO/executors and release resources. Never
destroy the logger/exporter first while tasks still hold callbacks into it.
A timed-out telemetry flush retains its backend ownership and execution dependencies;
Runtime reports shutdown_incomplete until those calls quiesce and can be joined. The
platform must not treat the flush timeout as permission to stop their IO/workers.
## Admission, security and operation budgets
These are NEW reference-profile defaults, not universal module defaults. Apply the smaller
of platform and module limits; reject contradictory configurations at startup.
| Resource | Default |
| --- | --- |
| Connections | 1,024 total; 128 per authenticated principal/source admission bucket, with bounded bucket registry. |
| Requests | 256 active, 512 waiting; four pipelined requests/connection; overload returns 503 or closes before body admission. |
| Input/output | 16 KiB headers, 64 header fields, 64 KiB mutation body, 1 MiB output page; 64 MiB total admitted request/response buffers including sends in flight. |
| Time | Five-second total request deadline, two-second header deadline, 30-second keepalive idle timeout; retries consume the original total budget. |
| Scans | 64 retained cursor snapshots, 30-second idle lease, 1,024 rows/page; expiry explicitly ends the cursor instead of switching snapshots silently. |
| Control plane | Four admin requests concurrently, 64 KiB admin response, separate admission reserve so data overload cannot starve health. |
Rate-limit registry cardinality is bounded at 4,096 buckets with conservative shared overflow
limits, preventing attacker-created IP/identity labels from exhausting memory. Use a caller-
approved authentication adapter; the reference profile uses explicit static test identities
on loopback and a configured verified credential mechanism for external deployment. Production
secrets stay in runtime secret/config facilities and never appear in examples, metrics or logs.
Map authorization to key namespaces before storage access, including scans and operation-status
lookups. Admin endpoints expose aggregate health only and bind separately by default.
Malformed framing, conflicting lengths, oversized bodies, slow readers and connection churn
are Net conformance cases plus platform resource tests. Optional compression cannot expand
past the same body cap. TLS configuration is replaced only for new handshakes; active sessions
retain their state through completion. Outbound redirects cannot forward origin-sensitive
credentials cross-origin. Untrusted trace headers supply context, never user identity.
## Operational workflows and later capabilities
Health reports separate process liveness, readiness and degraded optional exporters. Database
RecoveryRequired, mandatory auth failure or exhausted durable-write capacity makes the service
unready for mutations; a telemetry outage alone does not. Metrics use bounded route/status/
backend labels and include admission rejection, active requests, total owned bytes, commit
latency, Unknown outcomes, oldest snapshot and exporter loss. Request IDs belong in bounded
logs/traces, not metric labels.
Backup is an authenticated operator workflow using the selected backend's consistent backup
API. Verify a restore into a separate directory and run read-only domain checks before any
traffic switch. Do not copy an open SQLite main file alone or a moving native table set.
Upgrades validate module/package versions and persistence compatibility; [Update](../modules/Update.md)
can stage signed application artifacts, while application schema changes remain separately
gated. A committed data migration is not undone by choosing the previous executable.
The later job reference composes [Scheduler](../subsystems/Scheduler.md) and
[Messaging](../subsystems/Messaging.md) for durable admission, retries and acknowledgements.
It demonstrates an outbox/deduplication workflow with at-least-once external delivery, not
exactly-once effects. The RPC profile reuses [RPC](../subsystems/RPC.md) serialization and
transport contracts. P4 service discovery/replication integrate through
[DistributedApplications](DistributedApplications.md); this initial single-node platform
makes no minority-write, leader-election or cross-shard consistency promise.
## Ordered platform tasks
| ID | Phase / dependencies | Scope and acceptance | Recommended role |
| --- | --- | --- | --- |
| P-NETWORKED-01 | P0; shared contracts and module plans | Freeze reference-domain operations, limits, error mapping and startup/shutdown DAG; backend-specific guarantees are explicit. | astra_implementer |
| P-NETWORKED-02 | P2; P-NETWORKED-01, Runtime/Async/IO/Net lifecycle gates | Embedded/managed composition skeleton and installed-package consumer; no hidden workers before start, failed startup unwinds ownership. | astra_implementer |
| P-NETWORKED-03 | P3; P-NETWORKED-02, Storage durable batches/snapshots, Security, Configuration | Native durable KV service and client, idempotency/version/scan workflows; lost replies never cause partial or duplicate mutations inside retention. | astra_implementer |
| P-NETWORKED-04 | P3; P-NETWORKED-02, Sqlite checked transaction/migration gates | Independent SQLite service profile with schema/backup workflow; shared domain tests pass without claiming identical engine semantics. | sol_implementer |
| P-NETWORKED-05 | P3; P-NETWORKED-03/04, Log/Observability, Update recovery | Operational health, graceful shutdown, config generations, backup/restore and signed-code-upgrade scenario; cleanup failure and schema rollback limits stay visible. | astra_implementer |
| P-NETWORKED-06 | P3; P-NETWORKED-05, Testing fault/performance harness | Protocol interoperability, overload/crash matrix and workload baselines; bounded memory and durable-ack invariants hold with slow clients/storage/exporters. | astra_implementer |
| P-NETWORKED-07 | P3; P-NETWORKED-05, Scheduler/Messaging/RPC capability gates | Job and RPC reference compositions; retries, cancellation and duplicate delivery match their module contracts. | sol_implementer |
| P-NETWORKED-08 | P4; P-NETWORKED-06/07, distributed platform gates | Add discovery/replicated domain adapters through owners; partition behavior is tested before an availability/consistency claim. | astra_implementer |
## Acceptance scenarios, commands and migration
CURRENT: aggregate module build/tests exist, as recorded in [validation](../VALIDATION.md).
No reference-server executable or platform-specific CTest entry is claimed. PROPOSED command
templates after P-NETWORKED-02 registers the consumers and P-NETWORKED-06 adds the test label:
`cmake --build <configured-build> --target <registered-reference-target>` and
`ctest --test-dir <configured-build> -L networked-platform --output-on-failure`.
Target/label registration is implementation work; these commands were not run.
Acceptance exercises both embedded and managed modes: start/fail-start/restart, parallel
conditional writes, duplicate ID with same/different body, disk full and failed sync,
response loss after commit, cursor expiry under compaction, slow header/body/response,
wrong-host/untrusted TLS, authenticated namespace isolation, config reload races, telemetry
failure, signal-triggered shutdown and restore of a consistent backup. Use private local
fixtures, assigned ports and disposable directories; no public endpoint or production data
is required. Check durable receipts against recovered backend contents after forced process
termination. SQLite and native Storage get separate evidence records.
[Performance](../PERFORMANCE.md) governs warmup, repetitions, confidence intervals and
regression thresholds. Measure cold/warm TLS, keepalive, tiny/large values, mixed reads/writes,
scans and overload, retaining per-request p50/p95/p99 plus throughput, rejection/timeouts,
allocations, total peak RSS/CPU (all workers), storage amplification and installed build cost.
Drive independent client arrival schedules so queueing latency is not hidden. Hard budgets
are correctness gates; only measured workload baselines can set later numerical latency SLOs.
[Migration](../MIGRATION.md) versions HTTP/domain schemas separately from package/storage
formats. Additive response fields remain ignorable; required semantic changes use a new
endpoint version. Backend migration exports a consistent logical snapshot into a new store,
checks key/value/version/dedup invariants, then changes routing under a controlled write pause.
Rollback to an old store after new writes requires reconciliation; switching a config string
is not sufficient. [Documentation](../DOCUMENTATION.md) owns operator/client walkthroughs and
[delivery](../DELIVERY.md) owns evidence gates. Cited existing component headers have graph
coverage checks and source verification; all platform APIs, applications and end-to-end
validation here are future work.
Loaded 100 of 568 files, more files were not shown because too many files have changed in this diff. Show more