14 KiB
14 KiB
VoidLibrary Upstream Feature Requests
Pinned baseline inspected: 9931c5ffc4844a5e09e1b1db35b3d29c5097c3a5.
This ledger tracks reusable, non-build-system-specific capabilities needed by VoidBuildSystem that are absent, incomplete, or tightly bound to external system libraries in the pinned VoidLibrary revision. Until a dedicated VoidLibrary worker implements these items and the pin is updated, VBS keeps swappable local adapters behind clean internal interfaces.
VL-001: Robust Process Descendant Lifecycle Supervision (Void::Process)
- Target module:
System(include/Void/System/Process.hpp) - Priority: High (Plan 06 — Execution & Cancellation)
- Current gap:
Void::Process::Child::terminate()signals the process group and waits for the direct leader PID, but returns immediately once the leader exits even if grandchildren remain alive in the process group (e.g. ignoringSIGTERM). - Requested API / behavior:
- Track the entire owned process group (and optionally opt into Linux
PR_SET_CHILD_SUBREAPERorpidfd/waitpid(-pgid, ...)draining). Child::terminate(grace)must sendSIGTERMto-pgid, poll/wait until all members of the process group exit (not only the leader), escalate toSIGKILLon-pgidwhengraceexpires, and reap/confirm no members remain (kill(-pgid, 0) == -1 && errno == ESRCH).
- Track the entire owned process group (and optionally opt into Linux
- Acceptance test: Leader spawns grandchild that ignores
SIGTERM, leader exits immediately;terminate(100ms)escalates toSIGKILLand verifies the grandchild cannot write afterterminate()returns. - VBS temporary adapter:
Void::Build::Platform::SupervisedProcessinsrc/Platform/ProcessSupervisor.cpp.
VL-002: TOML 1.0 Parser and Serializer (Void::Data::Toml)
- Target module:
Data(include/Void/Data/Toml.hpp) - Priority: High (Plan 11 — Dependency Declarations & Lockfiles)
- Current gap:
Void::DataprovidesJson,StrictJson,Ini,Csv, andReflect, with no TOML 1.0 parser/serializer. - Requested API / behavior:
- Full TOML 1.0 parser returning
Void::Result::Result<Document, ParseError>with line/column source locations (Origin{line, column}) on every node and error. - Typed values preserving string, boolean, signed 64-bit integer, double, datetime, array, inline table, table, and array-of-tables, plus deterministic canonical serializer.
- Full TOML 1.0 parser returning
- Acceptance test: Round-trip TOML 1.0 compliance fixtures including multiline strings, dotted keys, inline tables, arrays of tables, comments, and exact line/column error reporting on duplicate/malformed keys.
- VBS temporary adapter:
Void::Build::Package::Tomlinsrc/Package/Toml.cpp.
VL-003: Kernel-Event Recursive Directory Watcher (Void::System / Void::SystemAsync)
- Target module:
System/SystemAsync(include/Void/System/DirectoryWatcher.hppor extension toAsyncWatcher.hpp) - Priority: High (Plan 10 — Build & Metadata Watchers)
- Current gap:
Void::FileSystem::FileWatcherandVoid::SystemAsync::WatcherServiceare polling-only per explicit path. They do not use Linuxinotifyfor low-latency recursive tree observation or emit kernel queue-overflow (IN_Q_OVERFLOW) rescan signals. - Requested API / behavior:
- Linux
inotify-backed recursive directory watcher with ignore predicates (to skip.git,build/, etc.), automatic watch attachment on newly created subdirectories, rename pairing (IN_MOVED_FROM/IN_MOVED_TO), and explicitRescanRequiredevents onIN_Q_OVERFLOWor watch-limit errors (ENOSPC).
- Linux
- Acceptance test: Recursive create/modify/rename/delete storms, directory
replacement, and simulated overflow reliably trigger
RescanRequired. - VBS temporary adapter:
Void::Build::Watch::InotifyWatcherinsrc/Watch/Watcher.cpp.
VL-004: Concrete HTTP/1.1 Server Transport (Void::Net::HttpServer)
- Target module:
Net(include/Void/Net/HttpServer.hpp) - Priority: High (Plan 16 & 17 — Hosted Registry Service & Web UI)
- Current gap:
Void::Net::Server.hppprovides transport-neutralRouter,StaticFileResolver, andWebSocketSessions, whileVoid::Net::Socket.hpponly providesUdpSocket. There is no concrete TCP/HTTP server listener. - Requested API / behavior:
- Concrete loopback/configurable TCP HTTP/1.1 server dispatching through
Void::Net::Router, supporting ephemeral port binding (port == 0withbound_port()query), configurable header/body size limits, graceful shutdown, and streaming request/response bodies to/from files.
- Concrete loopback/configurable TCP HTTP/1.1 server dispatching through
- Acceptance test: Ephemeral-port loopback server handling concurrent GET/PUT/POST/DELETE requests, oversized body rejection (413), and clean shutdown without dangling sockets.
- VBS temporary adapter:
Void::Build::Registry::HttpServerinregistry/service/HttpServer.cpp.
VL-005: Streaming HTTP Client & Secure TLS Default (Void::Net::HttpClient)
- Target module:
Net(include/Void/Net/Http.hpp) - Priority: Medium (Plan 12 — Package Fetching)
- Current gap:
HttpClient::send()buffers the entire response body instd::stringand defaultsm_verify_tls = false. - Requested API / behavior:
- Add streaming download-to-file (
download_to_file) and streaming upload-from-file (upload_file) with byte quotas, cancellation (std::stop_token), and incremental digest/progress callbacks. - Provide a secure constructor/preset with TLS certificate verification
enabled by default and explicit redaction of
Authorizationheaders in diagnostics.
- Add streaming download-to-file (
- Acceptance test: Streaming multi-megabyte transfer with quota overflow abort and TLS verification check.
- VBS temporary adapter:
Void::Build::Package::HttpTransferinsrc/Package/Fetch.cpp.
VL-006: Archive Creation and Multi-Format Support (Void::Archive)
- Target module:
Archive(include/Void/Archive/Archive.hpp) - Priority: Medium (Plan 12 & 15 — Source/Binary Packaging)
- Current gap:
Void::Archivecurrently exposes onlyextract()fortar/tar.zstand requires externalLibArchive::LibArchive. There is no archive creation API (create()), nor pure-C++ USTAR/PAX tar fallback. - Requested API / behavior:
- Add deterministic
Void::Archive::create()accepting sorted entries, canonical mtime/uid/gid/mode metadata (for reproducible archives), and safe extraction for.tar,.tar.gz,.tar.zst.
- Add deterministic
- Acceptance test: Deterministic archive creation (byte-identical across runs with fixed epoch), round-trip extraction, and traversal/symlink-escape rejection.
- VBS temporary adapter:
Void::Build::Package::TarArchive(pure-C++ deterministic PAX/USTAR tar reader/writer + optional gzip/zstd piping) insrc/Package/Archive.cpp.
VL-007: Zero-Dependency Built-In SHA-256 / BLAKE2b Fallback (Void::Crypto)
- Target module:
Crypto(include/Void/Crypto/Crypto.hpp) - Priority: Medium (Plan 05, 07, 11, 12, 16)
- Current gap:
Void::Cryptorequires externalOpenSSL::Crypto, which is not installed in minimal C++ toolchain environments such asdev cpp-gcc. - Requested API / behavior:
- Support a built-in pure-C++ FIPS 180-4 SHA-256 (and SHA-512) implementation
in
Void::Cryptowhen OpenSSL is absent (or as a lightweightVoid::CryptoHashmodule without external dependencies), keeping the exactVoid::Crypto::HasherAPI.
- Support a built-in pure-C++ FIPS 180-4 SHA-256 (and SHA-512) implementation
in
- Acceptance test: NIST CAVP SHA-256 vectors + streaming file hashing compile and pass with zero external crypto packages.
- VBS temporary adapter:
Void::Build::Util::Sha256Hasherinsrc/Util/Sha256.cpp(with compile-time switch toVoid::Crypto::HasherwhenVBS_HAS_VOID_CRYPTOis enabled).
VL-008: Strict UTF-8 Validation in Void::Json::Strict (Void::Data)
- Target module:
Data(include/Void/Data/StrictJson.hpp) - Priority: Medium (Observed in V-002 review)
- Current gap:
Void::Json::Strict::parse()accepts raw invalid UTF-8 bytes (e.g.0xff, overlong sequences, UTF-8 encoded surrogates) inside JSON strings instead of rejecting them per RFC 8259. - Requested API / behavior:
- Validate every UTF-8 byte sequence in JSON strings and object keys during
both
parse()and serialization (reusingVoid::Unicode::is_scalar_value/ UTF-8 validation).
- Validate every UTF-8 byte sequence in JSON strings and object keys during
both
- Acceptance test: Reject stray continuation bytes, overlong encodings,
surrogates (
U+D800..U+DFFF), and code points> U+10FFFFwhile preserving all valid 1..4-byte Unicode scalars. - VBS temporary adapter:
src/Util/Json.cppnow delegates toVoid::Unicode::validate_utf8wheneverVBS_HAS_VOID_UNICODEis enabled (preserving a pure-C++ fallback for standalone SDK compilation), andsrc/Build.cppenforcesrequire_utf8().
VL-009: Native Non-CMake Test Registration API (Void::Testing)
- Target module:
Testing(include/Void/Testing/Test.hpp,cmake/VoidTestScanner.cmake) - Priority: High (Plan 18 — Strict Native Self-Hosting)
- Current gap: Test discovery currently relies on CMake running
VoidTestScanner.cmakeat configure time to scan.cppfiles and emit a generated registration translation unit. Strict native self-hosting stages cannot depend on CMake. - Requested API / behavior:
- Provide either a first-class self-registering C++ macro/helper API in
Void::Testing(e.g.VOID_TEST(suite, name)with path-disambiguated unique symbols avoiding basename collisions) or an officially supported standalone C++ registration generator library/header contract.
- Provide either a first-class self-registering C++ macro/helper API in
- Acceptance test: Build and run a multi-file
Void::Testingbinary purely withg++(zero CMake), verifying--list,--filter, and exact nonzero test count even when two files share the same stem in different subdirectories. - VBS temporary adapter: Native C++ test registration generator in
src/SelfHost/TestRegistryGen.cpp(Plan 18).
VL-010: Advisory File Locks, Atomic Symlink Swap, Reflink Copy & Canonical Timestamps (Void::FileSystem)
- Target module:
System(include/Void/System/Path.hpp) - Priority: Medium (Plan 05, 07, 09, 11)
- Current gap:
Void::FileSystem::replace_file()covers atomic durable regular-file replacement, but lacks:- RAII advisory file locks (
flock/fcntlshared & exclusive, blocking and try-lock). - Atomic symlink swap (
symlinkto temp name +rename+ parent dirfsync). - Copy-on-write reflink copy (
ioctl(FICLONE)with private-copy fallback, explicitly never hardlinking). - Canonical timestamp setter (
utimensat(..., AT_SYMLINK_NOFOLLOW)).
- RAII advisory file locks (
- Requested API / behavior: Add these primitives to
Void::FileSystemwithVoid::Result::Resulterror reporting matchingreplace_file(). - VBS temporary adapter:
Void::Build::Platform::FileOpsinsrc/Platform/FileOps.cpp.
VL-011: Embedded/Optional SQLite & Argparse Subcommands (Void::Sqlite, Void::Argparse)
- Target modules:
Sqlite,Configuration - Priority: Low–Medium (Plan 07, 10, 16)
- Current gaps:
Void::Argparse::Parserdoes not natively support subcommands (vbs build,vbs compdb use,vbs deps resolve) or repeatable options (--target a --target b,--profile debug --profile release), and reports--helpthrough the error channel.Void::Sqliterequires systemSQLite3::SQLite3(find_package) with no optional FetchContent/amalgamation fallback when building in minimal tool environments (dev cpp-gcc).
- Requested API / behavior:
- Add subcommand dispatch, repeatable
option_many(), and distinctParseOutcome::HelpvsParseOutcome::ErrorinVoid::Argparse::Parser. - Allow optional FetchContent/amalgamation SQLite3 in
cmake/Dependencies.cmake(parallel to Boost) soVoid::Sqliteworks in minimal shells.
- Add subcommand dispatch, repeatable
- VBS temporary adapter:
src/Main.cpp,registry/service/Main.cpp,src/Describe.cpp, andbenchmarks/EngineBenchmarks.cppall delegate option parsing and--helpgeneration toVoid::Argparse::Parser(with only thin subcommand-dispatch and repeatable-flag extraction wrappers insrc/Main.cpp).src/State/StateStore.cppprovides a crash-safe journaled atomic-replace backend usingVoid::FileSystem::replace_filewhile preserving a compile-timeVoid::Sqliteswitch whenSQLite3is present.
VL-012: VoidLibrary Naming Consistency Note
- Observation: Most VoidLibrary modules use
PascalCaseenums (Void::Crypto::HashAlgorithm::Sha256,Void::Sqlite::OpenMode::ReadOnly,Void::Net::Method::Get,Void::Security::PasswordHashStrength::Moderate) andsnake_casefunctions/methods. A few headers mix styles (Void::Crypto::sha256FilecamelCase vsVoid::Security::hash_passwordsnake_case;Void::Process::EnvMode::inheritsnake_case vsVoid::Sqlite::OpenMode::ReadOnlyPascalCase). VoidBuildSystem standardizes strictly onVoid::Build(PascalCasetypes/enums/filenames,snake_casefunctions/methods) to align with the primary VoidLibrary style.
VL-013: Shorthand SemVer Range Comparators (Void::Semver::VersionRange)
- Target module:
Text(include/Void/Text/Semver.hpp) - Priority: Medium (Plan 11 — Native Dependency Solver)
- Current gap:
Void::Semver::VersionRange::parse()callsparse_strict()on comparator/caret/tilde operands and rejects omitted minor or patch components such as^1,^1.0,^11.0,~1.2,>=1.2 <2, or<2. While wildcard tokens (1.*,1.2.x) are accepted, standard Cargo/npm-style shorthand comparators fail to parse. - Requested API / behavior:
- Support partial version bounds in
Void::Semver::VersionRange::parse():^M->>=M.0.0 <(M+1).0.0(including^0-><1.0.0)^M.m->^M.m.0~M->>=M.0.0 <(M+1).0.0,~M.m->~M.m.0>=M,>=M.m,<M,<M.m, etc. padded to.0/.0.0.
- Support partial version bounds in
- Acceptance test:
parse_range("^1.0"),parse_range("^11.0"),parse_range("~1.2"),parse_range(">=1.2 <2"), andparse_range("<1.2.0")all parse cleanly and match the expected versions. - VBS temporary adapter:
parse_semver_range_compat()insrc/Package/Solver.cpp.