From 563da02c0f28bc4f13b9ed4c45a3c9bc19206034 Mon Sep 17 00:00:00 2001 From: faumaray Date: Tue, 24 Nov 2026 02:05:08 +0300 Subject: [PATCH] docs(workflow): add P0 baseline implementation task specs (X-BASE-01..05) --- docs/agent-workflow/tasks/X-BASE-01.md | 38 +++++++++++++++++++++++++ docs/agent-workflow/tasks/X-BASE-02.md | 33 ++++++++++++++++++++++ docs/agent-workflow/tasks/X-BASE-03.md | 37 ++++++++++++++++++++++++ docs/agent-workflow/tasks/X-BASE-04.md | 33 ++++++++++++++++++++++ docs/agent-workflow/tasks/X-BASE-05.md | 39 ++++++++++++++++++++++++++ 5 files changed, 180 insertions(+) create mode 100644 docs/agent-workflow/tasks/X-BASE-01.md create mode 100644 docs/agent-workflow/tasks/X-BASE-02.md create mode 100644 docs/agent-workflow/tasks/X-BASE-03.md create mode 100644 docs/agent-workflow/tasks/X-BASE-04.md create mode 100644 docs/agent-workflow/tasks/X-BASE-05.md diff --git a/docs/agent-workflow/tasks/X-BASE-01.md b/docs/agent-workflow/tasks/X-BASE-01.md new file mode 100644 index 0000000..e44715a --- /dev/null +++ b/docs/agent-workflow/tasks/X-BASE-01.md @@ -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 `: 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 `: 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="$"` 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*" +``` diff --git a/docs/agent-workflow/tasks/X-BASE-02.md b/docs/agent-workflow/tasks/X-BASE-02.md new file mode 100644 index 0000000..ad1d0bf --- /dev/null +++ b/docs/agent-workflow/tasks/X-BASE-02.md @@ -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 +``` diff --git a/docs/agent-workflow/tasks/X-BASE-03.md b/docs/agent-workflow/tasks/X-BASE-03.md new file mode 100644 index 0000000..1a74a96 --- /dev/null +++ b/docs/agent-workflow/tasks/X-BASE-03.md @@ -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 ` reveals: +1. `` 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 `` (resolved in `M-CORE-02`); `Functional/Detail/Repr.hpp` includes ``. +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 `` 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`. diff --git a/docs/agent-workflow/tasks/X-BASE-04.md b/docs/agent-workflow/tasks/X-BASE-04.md new file mode 100644 index 0000000..ba0c7c0 --- /dev/null +++ b/docs/agent-workflow/tasks/X-BASE-04.md @@ -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 (``, `^^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 +``` diff --git a/docs/agent-workflow/tasks/X-BASE-05.md b/docs/agent-workflow/tasks/X-BASE-05.md new file mode 100644 index 0000000..de81c00 --- /dev/null +++ b/docs/agent-workflow/tasks/X-BASE-05.md @@ -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 ` (5), `--reps ` (20), `--ops ` (10000), `--json `, `--filter `. + - 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 +```