From 6efd821002353d86446c1f2561c0702944686578 Mon Sep 17 00:00:00 2001 From: R Date: Thu, 26 Nov 2026 06:13:18 -0300 Subject: [PATCH 01/18] libs/codecs: webcpp::codecs as a submodule --- .gitmodules | 3 +++ libs/codecs | 1 + 2 files changed, 4 insertions(+) create mode 160000 libs/codecs diff --git a/.gitmodules b/.gitmodules index ee3794b..e88abe7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -99,3 +99,6 @@ [submodule "libs/secure"] path = libs/secure url = ../secure.git +[submodule "libs/codecs"] + path = libs/codecs + url = ../codecs.git diff --git a/libs/codecs b/libs/codecs new file mode 160000 index 0000000..9da1249 --- /dev/null +++ b/libs/codecs @@ -0,0 +1 @@ +Subproject commit 9da12495825d51cc42f14d82e0de878a4dd9ff5c From 0bf806ffab2abd1bfb236cf2c916bc5f76c69dfd Mon Sep 17 00:00:00 2001 From: R Date: Thu, 26 Nov 2026 22:52:10 -0300 Subject: [PATCH 02/18] ci: codecs' constant-time lane, its packages and dudect's judge --- .github/workflows/library.yml | 14 ++++++------- tools/ci/matrix.py | 7 ++++--- tools/ci/matrix_test.py | 28 ++++++++++++++------------ tools/test/codecs_dudect_judge_test.py | 23 +++++++++++++++++++++ 4 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 tools/test/codecs_dudect_judge_test.py diff --git a/.github/workflows/library.yml b/.github/workflows/library.yml index 303e6e0..822ba73 100644 --- a/.github/workflows/library.yml +++ b/.github/workflows/library.yml @@ -423,14 +423,14 @@ jobs: WEBCPP_WASIP2_TEST_TIMEOUT: ${{ (matrix.library == 'crypto' && matrix.lane == 'constant-time') && '1800' || '600' }} run: python3 tools/ci/matrix.py own-lane "$LANE" - # crypto's and secure's constant-time lanes, each by its own library's judge: every dudect - # output printed, a warning for every |t| of 10 or more, and on a runner GitHub hosts a case - # over 10 measured again in two fresh processes, failing when two of the three exceed 10 - # (libs/crypto's change api-gaps, D7; secure's judge is a copy of crypto's). The launcher's - # bound is the lane's, so a run of the judge's own lasts at most that, and the judge's - # subprocess timeout (2400 s) lies beyond it. + # crypto's, secure's and codecs' constant-time lanes, each by its own library's judge: every + # dudect output printed, a warning for every |t| of 10 or more, and on a runner GitHub hosts + # a case over 10 measured again in two fresh processes, failing when two of the three exceed + # 10 (libs/crypto's change api-gaps, D7; secure's judge is a copy of crypto's, and codecs' + # of secure's). The launcher's bound is the lane's, so a run of the judge's own lasts at + # most that, and the judge's subprocess timeout (2400 s) lies beyond it. - name: Judge dudect - if: ${{ !cancelled() && matrix.lane == 'constant-time' && (matrix.library == 'crypto' || matrix.library == 'secure') }} + if: ${{ !cancelled() && matrix.lane == 'constant-time' && (matrix.library == 'crypto' || matrix.library == 'secure' || matrix.library == 'codecs') }} env: WEBCPP_WASIP2_TEST_TIMEOUT: '1800' LIBRARY: ${{ matrix.library }} diff --git a/tools/ci/matrix.py b/tools/ci/matrix.py index aba55d5..c294632 100755 --- a/tools/ci/matrix.py +++ b/tools/ci/matrix.py @@ -194,15 +194,16 @@ # The packages an own lane needs from the runner's apt, by (library, lane, target): an own lane # runs on its runner, never in the container, so they come with its entry ("apt"), which the -# own-lanes job installs on Linux. crypto's and secure's constant-time lanes run their native -# programs under Valgrind's memcheck (valgrind, with valgrind/memcheck.h) and under +# own-lanes job installs on Linux. crypto's, secure's and codecs' constant-time lanes run their +# native programs under Valgrind's memcheck (valgrind, with valgrind/memcheck.h) and under # MemorySanitizer, whose runtime and sanitizer/ headers are libclang-rt-18-dev's, and their # drivers read MemorySanitizer's frames with llvm-symbolizer-18, which llvm-18 installs; on # wasip2 crypto's runs dudect alone, which needs none. The lint, which analyses those programs # natively, installs every package of the table (lint-packages). OWN_LANE_PACKAGES: dict[tuple[str, str, str], tuple[str, ...]] = { ('crypto', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev'), - ('secure', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev')} + ('secure', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev'), + ('codecs', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev')} # MSVC's lanes build 64-bit programs, embed their manifest with the linker and abbreviate b2's # paths against Windows's MAX_PATH, as xstate-cpp's green Windows jobs did. b2 abbreviates each diff --git a/tools/ci/matrix_test.py b/tools/ci/matrix_test.py index 800ac73..4824cdf 100755 --- a/tools/ci/matrix_test.py +++ b/tools/ci/matrix_test.py @@ -1335,15 +1335,16 @@ def test_a_browser_lane_has_the_pinned_chrome(root): def test_an_own_lane_installs_its_packages(root): # An own lane runs on its runner, never in the container, so the packages it needs come with - # its entry, by library, lane and target: crypto's and secure's constant-time lanes natively - # have Valgrind, llvm-18 (llvm-symbolizer-18, which reads MemorySanitizer's frames) and + # its entry, by library, lane and target: crypto's, secure's and codecs' constant-time lanes + # natively have Valgrind, llvm-18 (llvm-symbolizer-18, which reads MemorySanitizer's frames) and # libclang-rt-18-dev (clang-18's MemorySanitizer runtime and its sanitizer/ headers); # crypto's on wasip2, where it runs dudect alone, none; every other own lane none. The # own-lanes job installs them with apt on Linux, only where the list is not empty, before the # lane runs. packages = ('valgrind', 'llvm-18', 'libclang-rt-18-dev') assert matrix.OWN_LANE_PACKAGES == {('crypto', 'constant-time', 'native'): packages, - ('secure', 'constant-time', 'native'): packages} + ('secure', 'constant-time', 'native'): packages, + ('codecs', 'constant-time', 'native'): packages} boost_only(root) oracle_library(root, 'beta') harness.add_library(root, 'crypto', @@ -1352,16 +1353,17 @@ def test_an_own_lane_installs_its_packages(root): 'webcpp.run plain : plain.cpp ;\n' 'webcpp.lane constant-time : plain : native wasip2 ;\n', {'plain.cpp': 'int main() {}\n'}) - harness.add_library(root, 'secure', - 'import webcpp ;\n' - 'webcpp.targets native ;\n' - 'webcpp.run plain : plain.cpp ;\n' - 'webcpp.lane constant-time : plain : native ;\n', - {'plain.cpp': 'int main() {}\n'}) + for library in ('secure', 'codecs'): + harness.add_library(root, library, + 'import webcpp ;\n' + 'webcpp.targets native ;\n' + 'webcpp.run plain : plain.cpp ;\n' + 'webcpp.lane constant-time : plain : native ;\n', + {'plain.cpp': 'int main() {}\n'}) assert {entry.get('id', entry['lane']): entry['apt'] for entry in own_lanes(root)} == { 'oracle': [], 'native.crypto.constant-time': list(packages), - 'wasip2.crypto.constant-time': [], 'native.secure.constant-time': list(packages)}, \ - own_lanes(root) + 'wasip2.crypto.constant-time': [], 'native.secure.constant-time': list(packages), + 'native.codecs.constant-time': list(packages)}, own_lanes(root) steps = job_steps(workflow_jobs()['own-lanes']) installs = [step for step in steps if 'matrix.apt' in step] assert len(installs) == 1, installs @@ -1375,8 +1377,8 @@ def test_an_own_lane_installs_its_packages(root): def test_the_lint_installs_the_own_lanes_packages(root): # The lint analyses every own lane's programs, natively with clang-18 on Linux, so it needs # their headers: lint-packages prints every package of OWN_LANE_PACKAGES once, sorted, the - # one source (crypto's and secure's constant-time lanes list the same three), and the lint - # job installs them before the lint runs. + # one source (crypto's, secure's and codecs' constant-time lanes list the same three), and the + # lint job installs them before the lint runs. result = run(root, 'lint-packages') assert result.returncode == 0, (result.returncode, result.stderr) assert result.stdout == 'libclang-rt-18-dev llvm-18 valgrind\n', result.stdout diff --git a/tools/test/codecs_dudect_judge_test.py b/tools/test/codecs_dudect_judge_test.py new file mode 100644 index 0000000..3b3464f --- /dev/null +++ b/tools/test/codecs_dudect_judge_test.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +"""Checks libs/codecs/test/constant_time/dudect_judge.py, codecs' copy of secure's judge of +dudect's outputs (itself crypto's), with crypto_dudect_judge_test.py's cases: the same scratch +outputs and fake programs, run against codecs' judge. Run with the names of some cases to run only +those.""" + +from __future__ import annotations + +import sys + +import crypto_dudect_judge_test + +crypto_dudect_judge_test.JUDGE = (crypto_dudect_judge_test.ROOT / + 'libs/codecs/test/constant_time/dudect_judge.py') + +if __name__ == '__main__': + sys.exit(crypto_dudect_judge_test.main(sys.argv[1:])) From c3208e51f43e950e3b22b372c24f31d6338f2768 Mon Sep 17 00:00:00 2001 From: R Date: Thu, 26 Nov 2026 23:40:48 -0300 Subject: [PATCH 03/18] ci: codecs' fuzz lane and its packages --- tools/ci/matrix.py | 8 ++++++-- tools/ci/matrix_test.py | 39 +++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/tools/ci/matrix.py b/tools/ci/matrix.py index c294632..0970187 100755 --- a/tools/ci/matrix.py +++ b/tools/ci/matrix.py @@ -198,12 +198,16 @@ # native programs under Valgrind's memcheck (valgrind, with valgrind/memcheck.h) and under # MemorySanitizer, whose runtime and sanitizer/ headers are libclang-rt-18-dev's, and their # drivers read MemorySanitizer's frames with llvm-symbolizer-18, which llvm-18 installs; on -# wasip2 crypto's runs dudect alone, which needs none. The lint, which analyses those programs +# wasip2 crypto's runs dudect alone, which needs none. codecs' fuzz lane links libFuzzer, +# AddressSanitizer and UndefinedBehaviorSanitizer, whose runtimes and sanitizer/ headers (the +# malloc hooks its targets count the heap with) are libclang-rt-18-dev's, and its sanitizers +# symbolise their reports with llvm-symbolizer-18. The lint, which analyses those programs # natively, installs every package of the table (lint-packages). OWN_LANE_PACKAGES: dict[tuple[str, str, str], tuple[str, ...]] = { ('crypto', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev'), ('secure', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev'), - ('codecs', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev')} + ('codecs', 'constant-time', 'native'): ('valgrind', 'llvm-18', 'libclang-rt-18-dev'), + ('codecs', 'fuzz', 'native'): ('llvm-18', 'libclang-rt-18-dev')} # MSVC's lanes build 64-bit programs, embed their manifest with the linker and abbreviate b2's # paths against Windows's MAX_PATH, as xstate-cpp's green Windows jobs did. b2 abbreviates each diff --git a/tools/ci/matrix_test.py b/tools/ci/matrix_test.py index 4824cdf..bad0ab6 100755 --- a/tools/ci/matrix_test.py +++ b/tools/ci/matrix_test.py @@ -1338,13 +1338,16 @@ def test_an_own_lane_installs_its_packages(root): # its entry, by library, lane and target: crypto's, secure's and codecs' constant-time lanes # natively have Valgrind, llvm-18 (llvm-symbolizer-18, which reads MemorySanitizer's frames) and # libclang-rt-18-dev (clang-18's MemorySanitizer runtime and its sanitizer/ headers); - # crypto's on wasip2, where it runs dudect alone, none; every other own lane none. The - # own-lanes job installs them with apt on Linux, only where the list is not empty, before the - # lane runs. + # crypto's on wasip2, where it runs dudect alone, none; codecs' fuzz lane natively llvm-18 and + # libclang-rt-18-dev (libFuzzer's and the sanitizers' runtimes, and the sanitizer/ header of + # the malloc hooks), and no Valgrind; every other own lane none. The own-lanes job installs + # them with apt on Linux, only where the list is not empty, before the lane runs. packages = ('valgrind', 'llvm-18', 'libclang-rt-18-dev') + fuzz_packages = ('llvm-18', 'libclang-rt-18-dev') assert matrix.OWN_LANE_PACKAGES == {('crypto', 'constant-time', 'native'): packages, ('secure', 'constant-time', 'native'): packages, - ('codecs', 'constant-time', 'native'): packages} + ('codecs', 'constant-time', 'native'): packages, + ('codecs', 'fuzz', 'native'): fuzz_packages} boost_only(root) oracle_library(root, 'beta') harness.add_library(root, 'crypto', @@ -1353,17 +1356,25 @@ def test_an_own_lane_installs_its_packages(root): 'webcpp.run plain : plain.cpp ;\n' 'webcpp.lane constant-time : plain : native wasip2 ;\n', {'plain.cpp': 'int main() {}\n'}) - for library in ('secure', 'codecs'): - harness.add_library(root, library, - 'import webcpp ;\n' - 'webcpp.targets native ;\n' - 'webcpp.run plain : plain.cpp ;\n' - 'webcpp.lane constant-time : plain : native ;\n', - {'plain.cpp': 'int main() {}\n'}) + harness.add_library(root, 'secure', + 'import webcpp ;\n' + 'webcpp.targets native ;\n' + 'webcpp.run plain : plain.cpp ;\n' + 'webcpp.lane constant-time : plain : native ;\n', + {'plain.cpp': 'int main() {}\n'}) + harness.add_library(root, 'codecs', + 'import webcpp ;\n' + 'webcpp.targets native ;\n' + 'webcpp.run plain : plain.cpp ;\n' + 'webcpp.run fuzzed : fuzzed.cpp ;\n' + 'webcpp.lane constant-time : plain : native ;\n' + 'webcpp.lane fuzz : fuzzed : native ;\n', + {'plain.cpp': 'int main() {}\n', 'fuzzed.cpp': 'int main() {}\n'}) assert {entry.get('id', entry['lane']): entry['apt'] for entry in own_lanes(root)} == { 'oracle': [], 'native.crypto.constant-time': list(packages), 'wasip2.crypto.constant-time': [], 'native.secure.constant-time': list(packages), - 'native.codecs.constant-time': list(packages)}, own_lanes(root) + 'native.codecs.constant-time': list(packages), + 'native.codecs.fuzz': list(fuzz_packages)}, own_lanes(root) steps = job_steps(workflow_jobs()['own-lanes']) installs = [step for step in steps if 'matrix.apt' in step] assert len(installs) == 1, installs @@ -1377,8 +1388,8 @@ def test_an_own_lane_installs_its_packages(root): def test_the_lint_installs_the_own_lanes_packages(root): # The lint analyses every own lane's programs, natively with clang-18 on Linux, so it needs # their headers: lint-packages prints every package of OWN_LANE_PACKAGES once, sorted, the - # one source (crypto's, secure's and codecs' constant-time lanes list the same three), and the - # lint job installs them before the lint runs. + # one source (crypto's, secure's and codecs' constant-time lanes list the same three, and + # codecs' fuzz lane two of them), and the lint job installs them before the lint runs. result = run(root, 'lint-packages') assert result.returncode == 0, (result.returncode, result.stderr) assert result.stdout == 'libclang-rt-18-dev llvm-18 valgrind\n', result.stdout From e31f8793ace474edfe0ffcbe3058d8c98ecc6475 Mon Sep 17 00:00:00 2001 From: R Date: Fri, 27 Nov 2026 07:08:41 -0300 Subject: [PATCH 04/18] third_party: Bitcoin Core's base58 vectors, test data of codecs --- CODING-GUIDELINES.md | 1 + third_party/Jamfile | 12 +++++++++ tools/test/third_party_test.py | 47 ++++++++++++++++++++++++++++++---- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/CODING-GUIDELINES.md b/CODING-GUIDELINES.md index 70e63b0..65ef09c 100644 --- a/CODING-GUIDELINES.md +++ b/CODING-GUIDELINES.md @@ -984,6 +984,7 @@ update --init third_party/libs/`; a build that needs none never looks. | --- | --- | --- | | `bearssl` | BearSSL from webcpp's mirror `webcpporg/bearssl` at `32381d6`, its branch `webcpp`: upstream's `7bea48e` and one fix, ECDSA's nonce decoded at its full length (chapter 5 rule 1); a static library built file by file by `third_party/Jamfile` with webcpp::crypto's and webcpp::hash's canaries (hash's when `libs/hash` is checked out), on every target; `WEBCPP_CRYPTO_HAS_BEARSSL=1`, and `WEBCPP_HASH_HAS_BEARSSL=1` with hash's canary | MIT | | `bips` | `bitcoin/bips` at `927b6de9`, shallow, test data: crypto's tests read BIP340's `bip-0340/test-vectors.csv` and BIP341's `bip-0341/wallet-test-vectors.json` at run time under the directory its define `WEBCPP_TEST_BIPS` gives, on every target (wasmtime is given it, `webcpp.data`), and run again when it changes | BSD-2-Clause, as BIP340's header states | +| `bitcoin_base58_vectors` | Bitcoin Core's base58 vectors, `src/test/data/base58_encode_decode.json` of the submodule `third_party/libs/bitcoin` (Bitcoin Core v31.1 at `9be056a`, shallow), test data that nothing compiles: codecs' tests read it at run time under the directory its define `WEBCPP_TEST_BITCOIN_BASE58_VECTORS` gives, on every target (wasmtime is given it, `webcpp.data`), and run again when it changes | MIT | | `blake2_vectors` | BLAKE2's reference code package `BLAKE2/BLAKE2` at `ed1974e` (2023-02-12), the submodule `third_party/libs/blake2`, shallow, test data that nothing compiles: hash's tests read `testvectors/blake2b-kat.txt` and `testvectors/blake2-kat.json` at run time under the directory its define `WEBCPP_TEST_BLAKE2_VECTORS` gives, on every target (wasmtime is given it, `webcpp.data`), and run again when one of them changes | CC0-1.0 | | `blake3` | BLAKE3 1.8.7 at `f3149ec`; `third_party/Jamfile` compiles `c/blake3.c`, `blake3_dispatch.c` and `blake3_portable.c` on every target, the intrinsics files on their instruction sets alone (an exception to chapter 5 rule 2), with webcpp::hash's canary; `WEBCPP_HASH_HAS_BLAKE3=1` | CC0-1.0, Apache-2.0, or Apache-2.0 with LLVM exception | | `blake3_vectors` | BLAKE3's official vectors, `test_vectors/test_vectors.json` of the submodule `third_party/libs/blake3` at `f3149ec`, test data: hash's tests read it at run time under the directory its define `WEBCPP_TEST_BLAKE3_VECTORS` gives, on every target (wasmtime is given it, `webcpp.data`), and run again when it changes | CC0-1.0, Apache-2.0, or Apache-2.0 with LLVM exception | diff --git a/third_party/Jamfile b/third_party/Jamfile index 591ae7a..1d52dbf 100644 --- a/third_party/Jamfile +++ b/third_party/Jamfile @@ -360,6 +360,18 @@ lib ctaes : libs/bitcoin/src/crypto/ctaes/ctaes.c $(CRYPTO)/src/canary_ctaes.c : : libs/bitcoin/src/crypto/ctaes WEBCPP_CRYPTO_HAS_CTAES=1 $(.gc) ; explicit ctaes ; +# Bitcoin Core's base58 vectors (MIT), src/test/data/base58_encode_decode.json +# of the same submodule at the tag, read at run time by codecs' tests from the +# directory WEBCPP_TEST_BITCOIN_BASE58_VECTORS gives, on every target, as test +# data that nothing compiles. Quoted as blake3_vectors' define is, with +# forward slashes, so that a path with a space or a backslash survives. +.bitcoin-base58-vectors = [ regex.replace $(BITCOIN)/src/test/data "\\\\" "/" ] ; +alias bitcoin_base58_vectors : : @bitcoin-checked-out : : + "\"WEBCPP_TEST_BITCOIN_BASE58_VECTORS=\\\"$(.bitcoin-base58-vectors)\\\"\"" + [ webcpp.data $(BITCOIN)/src/test/data ] + libs/bitcoin/src/test/data/base58_encode_decode.json ; +explicit bitcoin_base58_vectors ; + # The precomputed tables of libsecp256k1 (spec section 3.5): auto (the # default) is small on Emscripten, the web's target, and large natively and on # WASI, the servers' (a ruling, spec section 10); small is window 2 and comb diff --git a/tools/test/third_party_test.py b/tools/test/third_party_test.py index 70067ae..094327b 100755 --- a/tools/test/third_party_test.py +++ b/tools/test/third_party_test.py @@ -14,11 +14,13 @@ built from its real sources with the canary of libs/crypto, compiles file by file with the flags a C library needs and holds the canary's symbol; that a BearSSL or a libs/crypto that is not checked out stops the build that needs it, naming the command; and that loading third_party/Jamfile prints -nothing b2 warns of. libsecp256k1, pinned, is built file by file with every module and -webcpp::crypto's canary, with the large tables natively and the small ones on request and on -emscripten. XKCP, pinned, is built from its file of Keccak-p[1600] and its high-level files with -webcpp::hash's adapter and canary, and an XKCP or a libs/hash that is not checked out stops it, -naming the command. +nothing b2 warns of. Bitcoin Core's base58 vectors reach a test that names +/webcpp/third_party//bitcoin_base58_vectors at the directory its define gives, natively and on +wasip2, and a Bitcoin Core that is not checked out stops a build that needs them. +libsecp256k1, pinned, is built file by file with every module and webcpp::crypto's canary, with +the large tables natively and the small ones on request and on emscripten. XKCP, pinned, is built +from its file of Keccak-p[1600] and its high-level files with webcpp::hash's adapter and canary, +and an XKCP or a libs/hash that is not checked out stops it, naming the command. libsodium, pinned, is built file by file with the defines its own configure finds on each target and webcpp::hash's canary, and webcpp::crypto's when libs/crypto is checked out, its version.h copied into the build directory and its checkout left as it was. BLAKE3's C implementation, pinned, is @@ -515,6 +517,39 @@ def test_ctaes_not_checked_out_is_refused(root: Path) -> None: 'git submodule update --init --depth 1 third_party/libs/bitcoin') +def test_bitcoin_base58_vectors_reach_a_test(root: Path) -> None: + # /third_party//bitcoin_base58_vectors gives a program Bitcoin Core's src/test/data at the pin, + # by its define, and the file webcpp::codecs reads is there, natively and on wasip2, where + # wasmtime is given the directory. + harness.add_library(root, 'base58_data', ( + 'import webcpp ;\n\n' + 'webcpp.targets native wasip2 ;\n\n' + 'webcpp.run reads : reads.cpp : /third_party//bitcoin_base58_vectors ;\n'), + {'reads.cpp': '#include \n\nint main() {\n' + ' std::ifstream in(WEBCPP_TEST_BITCOIN_BASE58_VECTORS\n' + ' "/base58_encode_decode.json");\n' + ' return in ? 0 : 1;\n}\n'}) + result = harness.run_b2(root, '-a', 'libs/base58_data/test') + harness.expect(result, True) + assert '**passed**' in result.stdout, result.stdout[-4000:] + result = harness.run_b2(root, '-a', *WASIP2, 'libs/base58_data/test') + harness.expect(result, True) + assert '**passed**' in result.stdout, result.stdout[-4000:] + + +def test_bitcoin_base58_vectors_not_checked_out_are_refused(root: Path) -> None: + harness.third_party_of_its_own(root, 'bitcoin', checked_out=False) + harness.add_library(root, 'base58_reader', ( + 'import webcpp ;\n\nwebcpp.run reads : reads.cpp\n' + ' : /webcpp/third_party//bitcoin_base58_vectors ;\n'), + {'reads.cpp': 'int main() { return 0; }\n'}) + result = harness.run_b2(root, 'libs/base58_reader/test') + harness.expect(result, False, 'third_party/libs/bitcoin is not checked out', + 'git submodule update --init --depth 1 third_party/libs/bitcoin') + # A build that needs no vectors never looks for them. + harness.expect(harness.run_b2(root, 'libs/demo/test//pass'), True) + + def build_secp256k1(root: Path, *request: str) -> tuple[list[str], bytes]: """Builds /third_party//secp256k1 with every action shown, from libs/crypto's real canary, and returns its C compile lines and the bytes of its archive.""" @@ -1161,6 +1196,8 @@ def test_botan_test_program_runs(root: Path) -> None: test_ctaes_is_pinned, test_ctaes_is_built_from_one_file_and_the_canary, test_ctaes_not_checked_out_is_refused, + test_bitcoin_base58_vectors_reach_a_test, + test_bitcoin_base58_vectors_not_checked_out_are_refused, test_secp256k1_is_pinned, test_secp256k1_natively_has_the_large_tables, test_secp256k1_small_tables_on_request, From 21cfd62f58bf9b116bef6864fbc8004c79399ef8 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:02:58 -0300 Subject: [PATCH 05/18] libs/codecs: the gitlink at codecs built (93a955c) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index 9da1249..93a955c 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit 9da12495825d51cc42f14d82e0de878a4dd9ff5c +Subproject commit 93a955cfac343777d1d2a37bb3941add2627de59 From a3565a8753ae4cad9ec134e9dd48255bb8e67f14 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:02:58 -0300 Subject: [PATCH 06/18] build: register codecs, a library of the superproject --- AGENTS.md | 5 +++-- doc/releases/0.1.0.adoc | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9669879..9f27c23 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -76,6 +76,7 @@ for web developers and for AI developers (`CODING-GUIDELINES.md` chapter 16). | asio | Boost.Asio with browser event-loop suspension, WASIp2/P3 networking and optional source-built TLS | native, emscripten, wasip2, wasip3 | a submodule at `libs/asio`; see its feature matrix for variants | | beast | HTTP and WebSocket applications using native/WASIp3 sockets, browser WebSocket/fetch, WASI host HTTP or supplied streams | native, emscripten, wasip2, wasip3, by backend | a submodule at `libs/beast`; all 53 upstream applications remain in its compatibility matrix | | cobalt | Boost.Cobalt coroutine applications with shipped Wasm adaptations and optional corrected SSL | native, emscripten, wasip2, wasip3, by capability | a submodule at `libs/cobalt`; see its feature and application matrices for variants | +| codecs | one contract for converting bytes and values to text and back, and any data through streams; seven formats (hex, base32, base58, base64, bech32, percent, RFC 7468's armor); header-only, percent over Boost.URL; webcpp's own | native, wasip2, wasip3, emscripten; its own lanes `constant-time` and `fuzz` | a submodule at `libs/codecs`; depends on config and secure, percent also on Boost.URL | | config | webcpp's configuration, which every library includes first: the target, exceptions and webcpp's version, as Boost.Config is Boost's; webcpp's own | native, wasip2, wasip3, emscripten | a submodule at `libs/config` | | crypto | AES-GCM, the AES block cipher, random_device and secp256k1 over C libraries built from source (BearSSL, OpenSSL, libsecp256k1, ctaes), webcpp's own | native, wasip2, wasip3, emscripten (OpenSSL not on emscripten); its own lane `c-suites` | a submodule at `libs/crypto`; depends on hash and secure | | hash | hashing and key derivation: Boost.Hash2's algorithms by alias, Keccak-256, BLAKE3, HKDF, PBKDF2, Argon2 and scrypt over C backends (XKCP, BLAKE3, libsodium, BearSSL, OpenSSL, Botan) and a browser backend; a wrapper | native, wasip2, wasip3, emscripten (by backend); its own lane `c-suites` | a submodule at `libs/hash`; depends on config and secure | @@ -107,8 +108,8 @@ webcpp/ .clang-tidy clang-tidy's checks, every repository's pyrightconfig.json Pyright's settings for every Python file libs// a library: a repository of its own, a submodule here (asio, beast, cobalt, - config, crypto, hash, secure, xactor, xstate, pratt, wasi, trystero, - document, idna, lexical, webrtc) + codecs, config, crypto, hash, secure, xactor, xstate, pratt, wasi, + trystero, document, idna, lexical, webrtc) third_party/ third-party code the libraries and their tests use, not webcpp's: each a submodule under third_party/libs/, pinned at a commit and keeping its own licence (openssl, libdatachannel, bearssl, secp256k1, bitcoin for diff --git a/doc/releases/0.1.0.adoc b/doc/releases/0.1.0.adoc index 2ef3aef..67cc60a 100644 --- a/doc/releases/0.1.0.adoc +++ b/doc/releases/0.1.0.adoc @@ -19,6 +19,10 @@ browser WebSocket and fetch, WASI host HTTP and supplied byte streams, from R. * link:{library-pages}cobalt/{library-page}[cobalt]: Boost.Cobalt coroutine applications for native, browser and WASI targets, with explicit source distribution and optional corrected SSL integration, from R. +* link:{library-pages}codecs/{library-page}[codecs]: one contract for converting +bytes and typed values to text and back, and any data through streams, for +{cpp}20, with hex, base32, base58, base64, bech32, percent-encoding and RFC 7468's +armor over it, from R. * link:{library-pages}config/{library-page}[config]: webcpp's configuration, which every library includes first: the target, exceptions and the version, from R. @@ -85,6 +89,11 @@ None. * Added secure_collect_test.py, which tests the script that measures the timing guard's cost from release builds. * Added secure_dudect_judge_test.py, which runs crypto's judge's tests against secure's copy. * Added secure's constant-time lane to matrix.py and library.yml: memcheck, MemorySanitizer and dudect over its blocks, each with a planted leak that must fail. +* Added the user's Jamfiles of webcpp::codecs, tested as fixtures of a test of the tools: a program that encodes hex builds no compiled library, with exceptions on and off, and percent names its own target. +* Added not-contains: to the user Jamfiles tests after a build that succeeds, which shows a library is not built. +* Added codecs_dudect_judge_test.py, which runs crypto's judge's tests against codecs' copy. +* Added codecs' constant-time lane and its fuzz lane to matrix.py and library.yml: memcheck, MemorySanitizer and dudect over its formats, each with a planted leak that must fail, and libFuzzer over every decoder. +* Added `bitcoin_base58_vectors`, Bitcoin Core's base58 vectors as test data of codecs. * Added a judge to crypto's constant-time lane: dudect results warn at 10, and hosted runners fail on two of three. * Added same-as: to crypto's user Jamfiles test, which keeps copied programs identical. * Added not-contains: to crypto's user Jamfiles test, which shows the canary is a library's only link error. From 9a74acb77b67ddeed8cde6518745e7c434de82ed Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:02:58 -0300 Subject: [PATCH 07/18] tools: codecs_jamfiles_test, a user's Jamfile of webcpp::codecs on every target --- tools/test/codecs_jamfiles_test.py | 43 +++++++++++++++++++ tools/test/crypto_jamfiles_format_test.py | 22 +++++++++- .../fixtures/codecs_jamfiles/percent/Jamfile | 9 ++++ .../fixtures/codecs_jamfiles/percent/app.cpp | 34 +++++++++++++++ .../codecs_jamfiles/percent/percent.outcome | 13 ++++++ .../fixtures/codecs_jamfiles/program/Jamfile | 9 ++++ .../fixtures/codecs_jamfiles/program/app.cpp | 34 +++++++++++++++ .../codecs_jamfiles/program/program.outcome | 15 +++++++ .../program_no_exceptions/Jamfile | 10 +++++ .../program_no_exceptions/app.cpp | 34 +++++++++++++++ .../program_no_exceptions.outcome | 15 +++++++ tools/test/user_jamfiles.py | 20 +++++---- 12 files changed, 248 insertions(+), 10 deletions(-) create mode 100755 tools/test/codecs_jamfiles_test.py create mode 100644 tools/test/fixtures/codecs_jamfiles/percent/Jamfile create mode 100644 tools/test/fixtures/codecs_jamfiles/percent/app.cpp create mode 100644 tools/test/fixtures/codecs_jamfiles/percent/percent.outcome create mode 100644 tools/test/fixtures/codecs_jamfiles/program/Jamfile create mode 100644 tools/test/fixtures/codecs_jamfiles/program/app.cpp create mode 100644 tools/test/fixtures/codecs_jamfiles/program/program.outcome create mode 100644 tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile create mode 100644 tools/test/fixtures/codecs_jamfiles/program_no_exceptions/app.cpp create mode 100644 tools/test/fixtures/codecs_jamfiles/program_no_exceptions/program_no_exceptions.outcome diff --git a/tools/test/codecs_jamfiles_test.py b/tools/test/codecs_jamfiles_test.py new file mode 100755 index 0000000..13aa066 --- /dev/null +++ b/tools/test/codecs_jamfiles_test.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +"""Builds every fixture of tools/test/fixtures/codecs_jamfiles, a Jamfile as a user of +webcpp::codecs writes it (b2's raw exe), with b2 as a user runs it, and checks its outcome file: +the build's status, the lines a failure prints, and a program's output (CODING-GUIDELINES.md +chapter 8), through user_jamfiles.py. The cases are the spec's scenario "A program that encodes hex +builds no compiled library" (program, and program_no_exceptions with `off`; the +build prints no line that names boost_url) and its scenario "percent needs its own target" +(percent), each on native, wasip2, wasip3 and Emscripten. + +Unlike secure's, this test has no fixture per message of libs/codecs/test/messages: a message of +codecs includes test support headers (the format under refusal, the toy types), which a user's +Jamfile does not have, so the refusals run in codecs' own tests on every lane that has the compiler +(plan finding F19). + +The scratch superproject holds libs/config, libs/secure and libs/codecs. Run with the names of some +cases to run only those, and with --target to run one target.""" + +from __future__ import annotations + +import sys + +import harness +import user_jamfiles + +CASES = harness.FIXTURES / 'codecs_jamfiles' + +# Cases whose outcome needs code that is not merged yet, as crypto_jamfiles_test.py's NOT_YET. +NOT_YET: dict[str, str] = {} + + +def main(argv: list[str]) -> int: + return user_jamfiles.main('codecs_jamfiles', CASES, ('config', 'secure', 'codecs'), NOT_YET, + argv) + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff --git a/tools/test/crypto_jamfiles_format_test.py b/tools/test/crypto_jamfiles_format_test.py index 162e2c9..ec47a5c 100644 --- a/tools/test/crypto_jamfiles_format_test.py +++ b/tools/test/crypto_jamfiles_format_test.py @@ -96,7 +96,9 @@ def test_contains_matches_part_of_a_line(): def test_not_contains_forbids_a_text_in_every_line(): assert parse('[all]\nbuild: fails\ncontains: a\nnot-contains: b\n' 'not-contains: c unless d\n').forbidden == [('b', None), ('c', 'd')] - refused('[all]\nbuild: succeeds\nrun: app\nnot-contains: x\n', 'not-contains:') + assert parse('[all]\nbuild: succeeds\nrun: app\nnot-contains: x\n').forbidden == \ + [('x', None)] + refused('[all]\nbuild: succeeds\nrun: app\ncontains: x\n', 'contains:') refused('[all]\nbuild: fails\ncontains: a\nnot-contains:\n', 'names nothing') refused('[all]\nbuild: fails\ncontains: a\nnot-contains: x unless \n', 'unless') refused('[all]\nbuild: fails\nnot-contains: x\n', 'no line to find') @@ -122,6 +124,24 @@ def test_not_contains_forbids_a_text_in_every_line(): harness.run_b2 = original +def test_not_contains_forbids_a_text_of_a_successful_build(): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + case = root / 'c' + case.mkdir() + original = harness.run_b2 + harness.run_b2 = lambda *_a, **_k: subprocess.CompletedProcess( + [], 0, 'compile-c++ bin/app.o\ncompile-c++ bin/boost_url/error.o\n') + try: + for directive, faults in (('not-contains: unrelated', 0), ('not-contains: boost_url', 1), + ('not-contains: boost_url unless boost_url/error', 0)): + (case / 'c.outcome').write_text(f'[all]\nbuild: succeeds\n{directive}\n') + found = jamfiles.run_target(root, 'native', [case]) + assert len(found) == faults, (directive, found) + finally: + harness.run_b2 = original + + def test_same_as_keeps_copies_identical(): with tempfile.TemporaryDirectory() as directory: cases = Path(directory) diff --git a/tools/test/fixtures/codecs_jamfiles/percent/Jamfile b/tools/test/fixtures/codecs_jamfiles/percent/Jamfile new file mode 100644 index 0000000..d12e310 --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/percent/Jamfile @@ -0,0 +1,9 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# tag::jamfile[] +exe app : app.cpp /webcpp/codecs//percent ; +# end::jamfile[] diff --git a/tools/test/fixtures/codecs_jamfiles/percent/app.cpp b/tools/test/fixtures/codecs_jamfiles/percent/app.cpp new file mode 100644 index 0000000..efc4ccd --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/percent/app.cpp @@ -0,0 +1,34 @@ +// Copyright (c) 2026 WebCpp.org +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// A program that names /webcpp/codecs//percent: it percent-encodes a path segment with the +// characters of a URL's pchar and decodes it back, over Boost.URL. + +#include +#include + +#include + +#include +#include +#include + +int main() { + namespace codecs = webcpp::codecs; + namespace formats = webcpp::codecs::formats; + auto const segment = formats::percent(boost::urls::pchars); + std::string_view const name = "a b/c"; + auto const text = codecs::encode(segment, name); + if (!text) { + return 1; + } + std::printf("%s\n", std::string{text->begin(), text->end()}.c_str()); + auto const back = codecs::decode(segment, std::string_view{text->data(), text->size()}); + if (back && std::string{back->begin(), back->end()} == name) { + std::printf("round trip\n"); + } + return 0; +} diff --git a/tools/test/fixtures/codecs_jamfiles/percent/percent.outcome b/tools/test/fixtures/codecs_jamfiles/percent/percent.outcome new file mode 100644 index 0000000..bf05699 --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/percent/percent.outcome @@ -0,0 +1,13 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# Spec scenario "percent needs its own target": builds, links Boost.URL and runs on every target. +[all] +targets: native wasip2 wasip3 emscripten +build: succeeds +run: app +a%20b%2Fc +round trip diff --git a/tools/test/fixtures/codecs_jamfiles/program/Jamfile b/tools/test/fixtures/codecs_jamfiles/program/Jamfile new file mode 100644 index 0000000..bbcdade --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/program/Jamfile @@ -0,0 +1,9 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# tag::jamfile[] +exe app : app.cpp /webcpp/codecs//codecs ; +# end::jamfile[] diff --git a/tools/test/fixtures/codecs_jamfiles/program/app.cpp b/tools/test/fixtures/codecs_jamfiles/program/app.cpp new file mode 100644 index 0000000..9702831 --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/program/app.cpp @@ -0,0 +1,34 @@ +// Copyright (c) 2026 WebCpp.org +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// A program that names /webcpp/codecs//codecs alone: it encodes a digest as hex, in place and with +// no heap, and decodes the text back. + +#include +#include + +#include +#include +#include +#include + +int main() { + namespace codecs = webcpp::codecs; + namespace formats = webcpp::codecs::formats; + // The first four bytes of SHA-256 of "abc". + std::array const digest{0xba, 0x78, 0x16, 0xbf}; + auto const text = codecs::encode(formats::hex, digest); + if (!text) { + return 1; + } + std::string_view const view = text->view(); + std::printf("%.*s\n", static_cast(view.size()), view.data()); + auto const back = codecs::decode>(formats::hex, view); + if (back && *back == digest) { + std::printf("round trip\n"); + } + return 0; +} diff --git a/tools/test/fixtures/codecs_jamfiles/program/program.outcome b/tools/test/fixtures/codecs_jamfiles/program/program.outcome new file mode 100644 index 0000000..6a6211b --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/program/program.outcome @@ -0,0 +1,15 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# Spec scenario "A program that encodes hex builds no compiled library": builds and runs on every +# target, and Boost.URL is not built. +[all] +targets: native wasip2 wasip3 emscripten +build: succeeds +not-contains: boost_url +run: app +ba7816bf +round trip diff --git a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile new file mode 100644 index 0000000..dead1da --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile @@ -0,0 +1,10 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# The same program with exceptions off: codecs throws nothing of its own. A result's value() calls +# boost::throw_exception, which a build without exceptions leaves to the program; webcpp's +# handler, /webcpp//throw_exception, is the one every webcpp.run program links. +exe app : app.cpp /webcpp/codecs//codecs /webcpp//throw_exception : off ; diff --git a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/app.cpp b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/app.cpp new file mode 100644 index 0000000..9702831 --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/app.cpp @@ -0,0 +1,34 @@ +// Copyright (c) 2026 WebCpp.org +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// A program that names /webcpp/codecs//codecs alone: it encodes a digest as hex, in place and with +// no heap, and decodes the text back. + +#include +#include + +#include +#include +#include +#include + +int main() { + namespace codecs = webcpp::codecs; + namespace formats = webcpp::codecs::formats; + // The first four bytes of SHA-256 of "abc". + std::array const digest{0xba, 0x78, 0x16, 0xbf}; + auto const text = codecs::encode(formats::hex, digest); + if (!text) { + return 1; + } + std::string_view const view = text->view(); + std::printf("%.*s\n", static_cast(view.size()), view.data()); + auto const back = codecs::decode>(formats::hex, view); + if (back && *back == digest) { + std::printf("round trip\n"); + } + return 0; +} diff --git a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/program_no_exceptions.outcome b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/program_no_exceptions.outcome new file mode 100644 index 0000000..5d514d4 --- /dev/null +++ b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/program_no_exceptions.outcome @@ -0,0 +1,15 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# The program of the case program, with exceptions off. +[all] +targets: native wasip2 wasip3 emscripten +build: succeeds +not-contains: boost_url +same-as: program/app.cpp app.cpp +run: app +ba7816bf +round trip diff --git a/tools/test/user_jamfiles.py b/tools/test/user_jamfiles.py index 3d48f1a..37cf607 100644 --- a/tools/test/user_jamfiles.py +++ b/tools/test/user_jamfiles.py @@ -125,14 +125,14 @@ def outcome(path: Path, target: str) -> Outcome: def checked(path: Path, target: str, result: Outcome) -> None: """Raises an OutcomeError naming path and target unless result is coherent: a build is said to succeed or fail; a failure has lines to find and no program to run; a success that - prints lines has a program.""" + prints lines has a program and finds no line to look for in b2's output (a success may forbid + one: a library that must not be built).""" if result.succeeds is None: raise OutcomeError(f'{path.name} on {target}: no build: line') if not result.succeeds and result.run is not None: raise OutcomeError(f'{path.name} on {target}: run: after build: fails') - if result.succeeds and (result.contains or result.forbidden): - raise OutcomeError(f'{path.name} on {target}: contains: or not-contains: after build: ' - 'succeeds') + if result.succeeds and result.contains: + raise OutcomeError(f'{path.name} on {target}: contains: after build: succeeds') if not result.succeeds and not result.lines and not result.contains: raise OutcomeError(f'{path.name} on {target}: build: fails with no line to find') if result.succeeds and result.run is None and result.lines: @@ -223,18 +223,20 @@ def run_target(root: Path, target: str, cases: list[Path]) -> list[str]: faults.append(f'{case.name} on {target}: the build ' f'{"succeeded" if built.returncode == 0 else "failed"}\n{output[-3000:]}') continue + printed = {line.rstrip() for line in output.splitlines()} + forbidden = [f'{case.name} on {target}: b2 printed {line!r}, which contains {text!r}' + f'{"" if allowed is None else f" and not {allowed!r}"}' + for text, allowed in expected.forbidden for line in sorted(printed) + if text in line and (allowed is None or allowed not in line)] if not expected.succeeds: - printed = {line.rstrip() for line in output.splitlines()} faults += [f'{case.name} on {target}: b2 printed no line {line!r}' for line in expected.lines if line.rstrip() not in printed] faults += [f'{case.name} on {target}: no line of b2 contains {text!r}' for text in expected.contains if not any(text in line for line in printed)] - faults += [f'{case.name} on {target}: b2 printed {line!r}, which contains {text!r}' - f'{"" if allowed is None else f" and not {allowed!r}"}' - for text, allowed in expected.forbidden for line in sorted(printed) - if text in line and (allowed is None or allowed not in line)] + faults += forbidden continue + faults += forbidden if expected.run is not None: try: command = program_command(build_dir, case.name, expected.run, target) From 7576e90ba37d8f51126795b60738df647d7459c9 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:02:58 -0300 Subject: [PATCH 08/18] guidelines: codecs is accepted and built, in chapter 17 --- CODING-GUIDELINES.md | 484 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 481 insertions(+), 3 deletions(-) diff --git a/CODING-GUIDELINES.md b/CODING-GUIDELINES.md index 65ef09c..605eae8 100644 --- a/CODING-GUIDELINES.md +++ b/CODING-GUIDELINES.md @@ -105,6 +105,7 @@ Not in the design yet: `tools/test/hash_jamfiles_test.py`, `tools/test/hash_jamfiles_format_test.py`, `tools/test/secure_jamfiles_test.py`, `tools/test/secure_collect_test.py`, `tools/test/secure_dudect_judge_test.py`, + `tools/test/codecs_jamfiles_test.py`, `tools/test/codecs_dudect_judge_test.py`, `tools/test/external_test.py`, `tools/test/doc_test.py`, `tools/test/harness_test.py`, `tools/test/third_party_test.py`, @@ -633,7 +634,8 @@ aliases, concepts, variables, data members and macros. a line that starts with `#`, `[` or such a word, and `contains: ` (after `build: fails`) a text that one line of b2's output contains, for a line that starts with a path of the machine; - `not-contains: ` (after `build: fails`) states that no line of b2's + `not-contains: ` (after `build: fails`, or `build: succeeds`, where it + shows a library is not built) states that no line of b2's output contains the text, and `not-contains: unless ` that every line containing it also contains the allowed text; `run: `, after `build: succeeds`, runs the program as its lane runs @@ -8839,8 +8841,8 @@ What webcpp does not have yet, and the chapters that mention it: The proposals the owner accepted whose decisions are not yet in chapter 14 or 15, each with its decisions as decided and its heading saying how much of it the superproject's `main` holds: wasi's redesign and the site's increments 4 -and 5 are not built, crypto's foundation is merged in part, and hash and secure -are merged whole. While a proposal is open, its own `design.md` and +and 5 are not built, codecs is built and not merged, crypto's foundation is +merged in part, and hash and secure are merged whole. While a proposal is open, its own `design.md` and specification hold it in full and rule over this summary; the change that builds it moves its decisions into chapter 14 or 15. Their conflicts with chapters 1 to 13 are in chapter 19. @@ -9971,6 +9973,482 @@ delivery. `tools/test/crypto_jamfiles_test.py`, `tools/test/hash_jamfiles_test.py` (webcpp). +### codecs (bytes and values to text and back, and the conversion contract; own; accepted 2026-11-26, built, not merged) + +webcpp::codecs is webcpp's one contract for converting bytes and typed values to +text and back, and any data through one-shot and stream transformers, with seven +formats over it, webcpp's own (`"port-of": null`, categories String and +Cryptography). It is implemented in `webcpporg/codecs`, the submodule +`libs/codecs`, built on the branch `codecs/genesis` of its repository and of the +superproject and not merged: the owner's CI runs once, at the end, and the +merge follows it. Its headers are ``, the core, which +registers no format and includes none, and ``, +each format reachable only through its own header, with `detail/core/` and +`detail/formats/` behind them; its targets are `/webcpp/codecs//codecs`, +header-only, depending on Boost's headers, config and secure, and +`/webcpp/codecs//percent`, `codecs` and `/webcpp//boost_url`; every name is in +`webcpp::codecs` (`formats`, `tokens`, `pmr`, `detail`, and `test` for test +support) and the error category is `webcpp.codecs`. The proposal, with the +specification, the design and the plan, is in +`libraries/codecs/openspec/changes/genesis/` (proposals); the page is +`libs/codecs/doc/`. The owner's decisions 1 to 27 (2026-11-24 to 2026-11-26) are +binding, the design's D1 to D22 and builder's calls B1 to B47 follow them, and +the plan's rulings and the pre-flight's findings, adopted, are below with the +owner's rulings of 2026-11-26. While the change is open, its `design.md` and +specification hold it in full and rule over this summary. + +The owner's decisions: + +- **Owner decisions 1 and 15: one vocabulary for every conversion of webcpp, + widened to any data.** The core is webcpp's conversion contract, generic enough + that a later, separate library (webcpp::media, a non-goal here) implements it + unchanged: an input or output type may be any type, the concepts assume + neither constant time nor secrecy, one input may give zero or many outputs and + a transformer may hold state. trystero's `text.hpp` and document's byte + policies migrate later, each a change of its own library. + Source: `libraries/codecs/openspec/changes/genesis/design.md` owner decisions 1 + and 15 (proposals); `test/toy_media_test.cpp` (libs/codecs). +- **Owner decision 2: the core header has no dependencies and registers no + format.** `codec`, `value_codec`, the concepts + `format`, `encodable` and `decodable`, `encoded_size`, `max_decoded_size`, the + buffer, token and typed forms of `encode` and `decode`, the tokens, the + `codecs::error` enumeration and `over`; decisions 15 to 18 add + the transformer concepts, `flow`, `pipe`, `drain`, `buffered`, `encoder` and + `decoder`. A program that names a format without its header meets an + undeclared name: the recorded departure from chapter 3's convenience header. + Source: design.md owner decision 2 and D1 (proposals); `include/webcpp/codecs.hpp`, + `test/messages/forgotten_header` (libs/codecs). +- **Owner decision 3: the default result.** A fixed-capacity, no-heap + `codecs::text` or `codecs::bytes` when the input's size is known at + compile time (`std::array`, `std::span`, `secure::secret`, fixed-size + typed values), otherwise `std::string` or `std::vector`. + Source: design.md owner decision 3 and D9 (proposals); + `test/default_result_test.cpp` (libs/codecs). +- **Owner decision 4: secrecy by type.** An output is secret when + `codecs::is_secret_v` is true or `value_codec::secret` is; the + secret outputs are `secret_text` and `secret_bytes` (in place, wiped) and + the heap `secret_string`, and decoding follows the requested type. + Source: design.md owner decision 4 and D10 (proposals); + `test/secret_fixed_test.cpp`, `test/secret_heap_test.cpp` (libs/codecs). +- **Owner decision 5: the formats, one header each, in `codecs::formats`.** + hex (lower or upper), base32 and base32hex, base58, base64 and base64url, + bech32 and bech32m, percent (an adapter over Boost.URL's `encoded_size`, + `encode` and `decode` taking any `CharSet`; only this header depends on + Boost.URL), and, by decision 13, RFC 7468's armor. base58 becomes a template by + decisions 25 and 26 and bech32 by decision 27; `formats::base58`, + `formats::bech32` and `formats::bech32m` stay. + Source: design.md owner decision 5 and D13 (proposals); `include/webcpp/codecs/*.hpp` + (libs/codecs). +- **Owner decisions 6 and 11: constant time.** hex, base32, base64 and bech32 (and + the armor) are constant time on every call, with no table indexed by a secret; + base58 is constant time when the operation is secret (a secret input or + destination). Tested on the own lane `constant-time` (ctgrind and dudect, and + MemorySanitizer where crypto runs it). + Source: design.md owner decisions 6 and 11 and D12 (proposals); + `test/constant_time/` (libs/codecs). +- **Owner decisions 7 and 26: what is not in codecs.** base58check is + webcpp::hash's, `hash::formats::base58_with_checksum`, which is + `basic_base58<100, bitcoin_alphabet, hash::checksums::double_sha256>` (decision + 26 renames decision 7's `base58check`); crypto registers its key formats through + `value_codec` in a change of its own, and `crypto::encode` and `crypto::decode` + no longer exist. Both are follow-ups, and hash will depend on codecs, never the + reverse. + Source: design.md owner decisions 7 and 26 (proposals); + `test/messages/base58_with_checksum_unseen` (libs/codecs). +- **Owner decision 8: the tests.** RFC 4648 section 10, BIP-173's and BIP-350's + vectors, Bitcoin Core's base58 vectors (read from `third_party/libs/bitcoin` + through `bitcoin_base58_vectors`, chapter 10), Boost.URL's own behaviour for + percent, a counting `operator new` that proves the no-heap forms, the constant-time + lane and a fuzz target per decoder. + Source: design.md owner decision 8 and D15 (proposals); `test/`, `test/fuzz/` + (libs/codecs); `third_party/Jamfile` (webcpp). +- **Owner decision 9: the repository's conventions** (the Boost Software + License, b2, the lanes, the documentation page, this document, public names + spelled out except an algorithm's proper name). + Source: design.md owner decision 9 (proposals). +- **Owner decision 10: order.** codecs comes before crypto's `formats` change, + which is revised onto codecs when its work starts. + Source: design.md owner decision 10 (proposals). +- **Owner decisions 12 and 14: one guard, in webcpp::secure.** The DIT guard, + `erase_secret`, `secret`, `declassify` and the constant-time blocks are + secure's; codecs depends on config and secure alone, uses + `secure::timing_guard` (engaged for secret operations only), `secure::erase_secret` + for every wipe, `secure::secret` as the fixed secret value (`is_secret` and + `fixed_byte_storage` are specialized for it), `secure::declassify` before a + verdict it branches on, and the blocks of `secure::constant_time`, and keeps no + guard, wipe, secret type or primitive of its own. Decision 12's placement in + config is superseded. + Source: design.md owner decisions 12 and 14 (proposals); `include/webcpp/codecs/detail/core/secrecy.hpp` + (libs/codecs). +- **Owner decision 13: the armor is a format.** `formats::armor(label)`, RFC + 7468's textual encoding, in `armor.hpp`, composable: crypto's `pem(spki)` becomes + `over{formats::armor("PUBLIC KEY"), crypto::formats::spki}`. + Source: design.md owner decision 13 (proposals); `include/webcpp/codecs/armor.hpp` + (libs/codecs). +- **Owner decisions 16 and 17: two concepts, no category tags.** + `one_shot_transformer` (`input_type`, `output_type`, `transform(input, output)`) + and `stream_transformer` (`send`, `receive`, `flush`, `reset`), FFmpeg's + `send_packet` and `receive_frame` model, with the flow state reported apart from + `codecs::error`; no encoder or decoder tag, composition made safe by types: + `pipe(a, b)` compiles only when `a`'s output is compatible with `b`'s input. + Source: design.md owner decisions 16 and 17, D17 to D19 (proposals); + `include/webcpp/codecs/detail/core/transformer.hpp`, `test/transformer_test.cpp`, + `test/pipe_test.cpp` (libs/codecs). +- **Owner decisions 18 and 19: streams of the text formats.** + `codecs::encoder(format)` and `codecs::decoder(format)` build stream + transformers; hex, base32 and base32hex, base64 and base64url, percent and the + armor stream natively, bech32 encodes as a stream and its decoder holds its + output until `flush`, and base58 streams through `buffered`. + Source: design.md owner decisions 18 and 19 and D20 (proposals); + `test/*_stream_test.cpp` (libs/codecs). +- **Owner decisions 20, 21 and 22: no heap in the processing loop, no async in the + core, conventions.** A stream transformer keeps its minimal pending state, wipes + it in a secret operation on `reset`, on destruction and on move, and writes into + the caller's buffers; asynchrony comes from sources and sinks and + `async_transcode` is a possible later change; names spelled out, errors through + `result`, no virtual call and no `std::function` in the hot path. + Source: design.md owner decisions 20 to 22 and D21 (proposals); + `test/allocation_test.cpp`, `test/secret_stream_test.cpp` (libs/codecs). +- **Owner decision 23: allocator-aware, in the standard library's style, with + `pmr` aliases.** Only what allocates takes an allocator: the heap results, the + heap secret types (`basic_secret_string`, + `basic_secret_byte_vector`, with `codecs::pmr::` aliases), `buffered`, + `each` and `over`'s heap intermediate; `append_to` and `assign_to` accept any + `std::basic_string` and `std::vector`; the returning tokens take + an optional allocator; every byte is wiped before the allocator gets the memory + back, with any allocator; no allocator given, `std::allocator`. + Source: design.md owner decision 23 and D22 (proposals); `test/allocator_test.cpp` + (libs/codecs). +- **Owner decision 24: exceptions follow chapter 6 as written.** Data and + configuration errors are values in both builds and codecs throws nothing of its + own; with exceptions an allocator's exception propagates unchanged out of the + functions that allocate, which are not `noexcept`, while every other function is; + a token is untouched by a failed operation and a secret buffer is wiped on the + way out; without exceptions the build's handler decides, and no throwing + convenience API is added. + Source: design.md owner decision 24 and D22 (proposals); + `test/allocator_throw_test.cpp`, `test/noexcept_test.cpp` (libs/codecs). +- **Owner decision 25: base58 is a template over its bound and its alphabet.** + `basic_base58`; an alphabet is a + type with `static constexpr std::string_view characters` of 58 distinct + characters (`bitcoin_alphabet`, `ripple_alphabet`, `flickr_alphabet`, or a + program's own); `maximum_characters` is derived, never a second parameter; + `base58_bitcoin`, `base58_ripple` and `base58_flickr` are the instances of 100 + bytes, `formats::base58` is `base58_bitcoin`, and a caller who needs more names an + instance; every instance keeps its scratch in place and past either bound every + operation is `input_too_long`, checked before any read. + Source: design.md owner decision 25 and D13 (proposals); + `include/webcpp/codecs/base58.hpp`, `test/base58_test.cpp` (libs/codecs). +- **Owner decision 26: base58's checksum is its third template parameter.** The + concept `base58_checksum` is satisfied by `no_checksum` or by a type with + `static constexpr std::size_t size` and a `noexcept`, constant-time + `static void compute(std::span, std::span)`; + encode appends the checksum, decode splits it off, recomputes it and compares with + `secure::constant_time_equal` (`checksum_mismatch`, or `invalid_length` for too + few bytes). codecs knows no checksum algorithm and its tests use their own. + Source: design.md owner decision 26 and D13 (proposals); `test/base58_test.cpp`, + `test/fuzz/base58_with_checksum_fuzz.cpp` (libs/codecs). +- **Owner decision 27: bech32 is a template over its variant, its maximum length + and its data.** `basic_bech32` + with `bech32_variant { bech32 = 1, bech32m = 2 }` and the data tags + `bech32_bytes` (8 to 5 bits with strict padding, `invalid_padding`) and + `bech32_words` (5-bit values, above 31 `invalid_character`); the human-readable + part stays a run-time value held in place (`text<83>`); `bech32_parts` for the + typed decode; `append_words_from_bytes` and `bytes_from_words`; the segwit rules + and Lightning's fields are a future webcpp::bitcoin's. + Source: design.md owner decision 27 and D13 (proposals); + `include/webcpp/codecs/bech32.hpp`, `test/bech32_test.cpp` (libs/codecs). +- **The owner's rulings of 2026-11-26: no two-word naming rule, and `assign_to` + leaves its target untouched on failure.** Locals and parameters need not be + named with two words (the rule of hash's `user_globals` is not applied; codecs has + no `user_globals` test and the renames already made stay); a parameter that hides + a member still fails the library's own MSVC `/W4 /WX` build (C4458), so a call + operator's parameters are `chosen_*`. `tokens::assign_to` encodes into a scratch + first (in place when the static bound is at most 4096 bytes, from the token's + allocator above), assigns only on success and wipes the scratch in a secret + operation, so a value codec that fails after `prepare` leaves the string or + vector as it was; a foreign token keeps the documented limit. + Source: `reference/plan.md` rulings and `.superpowers/sdd/plan/progress.md` + (proposals, webcpp); `test/tokens_test.cpp` (libs/codecs). + +The design's decisions: + +- **D1: the library, its targets and its headers.** `config.hpp`, included first + by every public header, includes `` first and defines + `WEBCPP_CODECS_NO_EXCEPTIONS` by chapter 6's rule; include guards are + `WEBCPP_CODECS__HPP`; no header includes another webcpp library's header + but config's and secure's, no header of `detail/core/` includes a format's, and + only `percent.hpp` includes a Boost.URL header; there is no `formats.hpp` (B1). + Every test runs with exceptions on and off (`codecs-run`, `codecs-compile`). + Source: design.md D1 (proposals); `build.jam`, `meta/include-boundaries.json` + (libs/codecs). +- **D2: formats are values.** A copyable type with a `static constexpr + std::string_view name`, passed first, an `inline constexpr` object each, a format + with options configured by a call (`formats::hex(formats::letter_case::upper)`). + Source: design.md D2 (proposals); `include/webcpp/codecs/detail/formats/options.hpp` + (libs/codecs). +- **D3: `codec`.** Declared by the core, never defined, specialized by a + format's header: `constant_time`, `max_encoded_size`, `max_decoded_size`, + `encoded_size`, `decoded_size`, `encode` and `decode`, each `noexcept` and exact; + a format writes these six and every public function of the core is written once + over them. A second point, `stream_codec`, is the format's stream (D20). + Source: design.md D3 (proposals); `include/webcpp/codecs/detail/core/contract.hpp` + (libs/codecs). +- **D4: `value_codec`.** A library specializes it for a format and + a type it owns, with `output` (`output_kind::bytes` or `text`), an optional + `secret` and `max_encoded_size`, and an encode and a decode, either of which may + be absent; its errors are any `error_code`. + Source: design.md D4 (proposals); `test/value_codec_test.cpp` (libs/codecs). +- **D5: the concepts and the refusal.** `format`, `encodable` and + `decodable`; a pair that is neither stops the build in a `static_assert` + in the core whose message says that the format does not convert this type. + Source: design.md D5 (proposals); `test/messages/refused_*` (libs/codecs). +- **D6 and D7: sizes and inputs.** `encoded_size` is exact, `max_decoded_size` a + bound that needs no pass over the text; a byte input is anything + `std::span` is made from, a text input anything + `std::string_view` is made from, a static extent read by + `codecs::static_input_size_v`. + Source: design.md D6 and D7 (proposals); `test/sizes_test.cpp` (libs/codecs). +- **D8: tokens.** Boost.URL's contract (`result_type`, `prepare(n)` called at + most once with the exact size, `result()`), so that `boost::urls::string_token` + works as given; every check of the input is done before `prepare`, so a failure + leaves the token untouched; codecs' own tokens, `automatic`, `return_string`, + `append_to`, `assign_to`, `fixed` and `secret`, are tags the core turns into + the direction's concrete token (B6, B7). + Source: design.md D8 (proposals); `test/tokens_test.cpp`, + `test/tokens_boost_url_test.cpp` (libs/codecs). +- **D9: the default result and the fixed results.** `text` and `bytes` + hold their elements in place, convert implicitly to a view on an lvalue and + delete the rvalue conversion, as `secure::secret`'s is (B8); a typed decode into + `std::array` needs exactly its size, into `bytes` up to it, and a library's + fixed type joins by `fixed_byte_storage` (B9). + Source: design.md D9 (proposals); `test/default_result_test.cpp`, + `test/typed_decode_test.cpp` (libs/codecs). +- **D10: secrecy.** A secret operation returns a secret type, wipes every buffer + of the library's that held its bytes with `secure::erase_secret` and holds the + timing guard; the heap secret types never go through `std::basic_string`, whose + small buffer an allocator cannot wipe (B10). + Source: design.md D10 (proposals); `test/secret_operation_test.cpp` (libs/codecs). +- **D11: composition, `over`.** Encoding encodes with + `Inner` and then `Outer`, decoding the reverse; the name is `Outer::name`, + `" over "`, `Inner::name`; constant time when every link is, secret when any + is; the intermediate is in place when its bound is static and from `over`'s + allocator otherwise (B41). `over` stays one-shot and its stream counterpart is + `pipe`. + Source: design.md D11 (proposals); `include/webcpp/codecs/detail/core/over.hpp`, + `test/over_test.cpp` (libs/codecs). +- **D12: constant time.** The formats compute their alphabet by arithmetic on + masks, never index a table with a data byte and never branch on one; decoding + accumulates an error mask over the whole input and passes it to + `secure::declassify` before the one branch that reports it; public are the + input's length, the options, bech32's human-readable part, the armor's structure + and the success. base58 secret runs the whole conversion with no early exit and + states `constant_time_when_secret` beside `constant_time` (B24); percent is not + constant time. The stream forms keep every property, chunk sizes being public. + Source: design.md D12 (proposals); `test/constant_time/`, `test/timing_test.cpp` + (libs/codecs). +- **D13: the formats.** hex decodes either case (B12) and refuses an odd length; + base32 writes upper case, decodes either (B13), pads by default and is + canonical (RFC 4648 section 3.5); base58 as decisions 25 and 26 say, its public + path Bitcoin Core's algorithm (its notice is `LICENSE-BITCOIN.txt`) and its + secret path the constant-time one, leading zero bytes being leading + first-alphabet characters; base64 pads and base64url does not (B16), both + canonical; bech32 as decision 27 says, lower case out, `mixed_case` refused, + `invalid_prefix` for another human-readable part; percent is Boost.URL's byte + for byte (B20); the armor writes the strict form of RFC 7468 section 3 in lines of + 64 and reads line feeds or carriage return and line feed (B26), with a label of + up to 64 characters held in place (B25) and `armor_parts` for the typed decode. + Source: design.md D13 (proposals); `test/hex_test.cpp`, `test/base32_test.cpp`, + `test/base58_test.cpp`, `test/base64_test.cpp`, `test/bech32_test.cpp`, + `test/percent_test.cpp`, `test/armor_test.cpp` (libs/codecs). +- **D14: errors.** `codecs::error` has fixed values, never reused: + `invalid_character = 1`, `invalid_length`, `invalid_padding`, + `checksum_mismatch`, `invalid_prefix`, `mixed_case`, `output_too_small` and + `input_too_long = 8` (B21); an input with several faults of its data reports the + lowest value and a fault of the format's configuration wins over them all (B23); + the buffer forms write nothing on any error; a stream's flow state is never an + error code. + Source: design.md D14 (proposals); `include/webcpp/codecs/detail/core/error.hpp`, + `test/error_test.cpp` (libs/codecs). +- **D15: the tests.** Vectors, the contract (every token and default result, the + concepts' answers and the refusals' messages as compile-fail tests), allocators + (an arena that records each allocation, the global `operator new` counting none), + streams (every chunking of every vector, the protocol's states, `pipe`, `drain`, + `each`, `buffered`), the guard in a secret pipe, a toy non-byte transformer + that proves media can implement the contract unchanged, allocation, wiping, + constant time and fuzzing. + Source: design.md D15 (proposals); `test/` (libs/codecs). +- **D16: lanes, documentation, measurements.** native (clang and gcc 15), wasip2, + wasip3 and Emscripten, MSVC 14.3 and 14.5, the own lanes `constant-time` and + `fuzz` and the lint; the page teaches each format with an example, the tokens, + secrecy, composition, streams, allocators, and how to write a format and a + transformer of other data. No measurement in the genesis (B22), and a later table + is built from release builds only. + Source: design.md D16 (proposals); `doc/`, `example/` (libs/codecs); + `tools/ci/matrix.py`, `tools/test/codecs_dudect_judge_test.py` (webcpp). +- **D17: the two transformer concepts.** Every transfer is a contiguous span of + elements with a count (B27); `transform` converts the whole input or writes + nothing; `max_output_size`, `output_size`, `constant_time` and the secrecy trait + are optional and read when present. + Source: design.md D17 (proposals); `test/transformer_test.cpp` (libs/codecs). +- **D18: the flow state and the stream protocol.** `flow` (`needs_input`, + `output_pending`, `finished`) and `step` (`count`, `flow`) (B30); FFmpeg's + protocol without naming it, so that a media wrapper maps `send_packet` and + `receive_frame` onto it; `send` borrows its input until the transformer reports + `needs_input` (B28); a fault of the data is reported once, after `flush`, and + is the one-shot form's error (B29), the call that reports it writing nothing + (B44); `reset` returns to `needs_input`, and a moved-from transformer is in that + state. + Source: design.md D18 (proposals); `test/transformer_test.cpp`, + `test/pipe_test.cpp` (libs/codecs). +- **D19: `pipe`, `drain`, `each`, `buffered`.** Two element types are compatible + when they are the same or both are one-byte character or byte types; `pipe` + takes stream transformers only (B31), `drain` calls its sink as a template + parameter, `buffered` accumulates (in place with `capacity`, or from an + allocator) and `each` transforms per item (B42, B46); the in-place capacity + defaults to 512 bytes of elements (B32) and one tag, `capacity`, sets every + in-place size (B33). + Source: design.md D19 (proposals); `test/pipe_test.cpp`, `test/drain_test.cpp`, + `test/buffered_test.cpp`, `test/each_test.cpp` (libs/codecs). +- **D20: the formats as transformers.** `format_encoder` and `format_decoder` + are a one-shot transformer always and a stream transformer when the format + specializes `stream_codec` (B35, B37); a secret stream is made by + `codecs::secret_operation` (B36); bech32's decoder holds raw characters and its + `capacity` counts characters (B47), and its decoder and the armor's give + the human-readable part and the label by a member after `flush` (B39); + `encoder(over{...})` streams through an inner `pipe` when both links stream + natively (B43). + Source: design.md D20 (proposals); `include/webcpp/codecs/detail/core/format_transformer.hpp`, + `test/format_transformer_test.cpp` (libs/codecs). +- **D21: streams: memory, secrecy and constant time.** No heap in any call after + construction, no virtual call and no `std::function`; a secret transformer is + move-only, holds an engaged guard in each call, nesting with its parts', and + wipes its pending state; a stream form is constant time exactly when its + format's one-shot form is. + Source: design.md D21 (proposals); `test/secret_stream_test.cpp` (libs/codecs). +- **D22: allocators.** The standard library's rules through + `std::allocator_traits`; the allocating functions are not `noexcept`; a heap + secret type's growth keeps the old buffer whole until the new one exists and + wipes it before it goes; a failed `send` to `buffered` or `each` accepts + nothing; every secret buffer a failed operation held is wiped by a scope guard. + Source: design.md D22 (proposals); `test/allocator_test.cpp`, + `test/allocator_throw_test.cpp` (libs/codecs). +- **B1 to B26: the builder's calls of the genesis,** among them: no `formats.hpp` + (B1); formats configured by a call (B2); `output_kind` (B3); `decoded_size` the + format author's (B4); a string literal is a `std::string_view` (B5); the tokens + are tags (B6, B7); `text` and `bytes`'s members (B8); `fixed_byte_storage` + (B9); `secret_byte_vector` (B10); the guard engaged for secret operations only + (B11); hex and base32 decode either case (B12, B13); base58's alphabets are + Bitcoin's, Ripple's and Flickr's (B14); base58's bound is its template's (B15, + changed by decision 25); base64 pads and base64url does not (B16); bech32's + human-readable part held in place and spelled out (B17, B19); bech32's maximum + length a template parameter (B18, changed by decision 27); percent's errors map + to `invalid_character` and `invalid_length` (B20); the eighth error value + (B21); no measurement (B22); the lowest value among data errors, a fault of the + configuration first (B23); base58's `constant_time_when_secret` (B24); the + armor's label and line endings (B25, B26). + Source: design.md Builder's calls (proposals). +- **B27 to B47: the builder's calls of the streaming decisions,** among them: + spans of elements for both concepts (B27); the borrowed input (B28); a fault of + the data reported once after `flush` (B29); `flow` and `step` (B30); `pipe` takes + stream transformers only (B31); the default capacity and the tag (B32, B33); + `buffered`'s heap form (B34); one type for a format's encoder (B35); + `secret_operation` (B36); `stream_codec` (B37, B38); the member that gives + bech32's part and the armor's label (B39); `return_string` and `secret` callable + with an allocator (B40); `over`'s allocator (B41); two adapters rather than one + with a policy (B42); `encoder(over{...})` (B43); a call that reports a data + error writes nothing (B44); the armor's structure and label are public and only + its base64 payload is constant time (B45); `each` in place needs a constant + `max_output_size` and a short span is never an error (B46); bech32's hold counts + characters, 90 by default and the format's `MaximumLength` since decision 27 + (B47). + Source: design.md Builder's calls (proposals). + +The plan's rulings (the planner's, adopted) and the pre-flight's findings: + +- **R1 to R5: the core is one public header over internal parts, a refusal names + its types through its requirement, the exact sizes of `over`, the guards' exit + by `dit_is_set()`, and the fuzz lane.** `` is split under + `detail/core/` and a program never includes a part (R1); a refusal's + `static_assert` names the types through `detail::converts` and + `detail::compatible_elements`, which clang prints in full, and `codecs::formats` + is declared empty so that a forgotten header is "no member named" (R2); `over`'s + exact sizes run the inner link, so with a heap intermediate they allocate and + are not `noexcept` (R3, F17); "the count of engaged guards returns to zero" is + checked as `secure::dit_is_set()` reading clear after each call (R4); the fuzz + lane is libFuzzer (clang 18, ASan and UBSan with `-fno-sanitize-recover=all`, a + release build, 60 seconds a target, a fixed seed) driven by `fuzz.mjs`, every + target also a replay program on every lane over its corpus (R5, F5 to F9). + Source: `reference/plan.md` Rulings (proposals); `test/fuzz/`, `meta/include-boundaries.json` + (libs/codecs). +- **R6 and Q1: superseded by owner decisions 25 and 26.** A fixed ceiling of + 1024 bytes was the planner's; the owner put the bound in base58's type. Its + reason stands: without a bound `encoded_size` and `decoded_size` cannot be + exact, `noexcept` and allocation-free, since base58's exact size exists only + after a quadratic conversion that needs a working number as long as the input. + A decode whose payload would exceed `maximum_bytes` is `input_too_long` too, a + size fault reported before data faults (F12). + Source: `reference/plan.md` R6 and Q1 (proposals); `test/base58_test.cpp` + (libs/codecs). +- **R7: a codec whose arithmetic differs when the operation is secret offers + overloads taking `detail::secret_tag` first,** which the core calls in a secret + operation when they exist (base58, every instance); the core's dispatch is + written and tested in the core, carried through `over`, `format_encoder` and + `format_decoder`, and a secret operation into an explicit non-secret token runs + guarded with the secret path and returns the token's own type, every buffer the + core makes for it wiped (F11). + Source: `reference/plan.md` R7 (proposals); `include/webcpp/codecs/detail/core/operations.hpp` + (libs/codecs). +- **R8: test data follows chapter 10.** Bitcoin Core's vectors are read from + `third_party/libs/bitcoin` through `bitcoin_base58_vectors`, never copied into + the library; the BIPs' and RFCs' vectors are written in the tests with their + source cited; OpenSSL's `PEM_write_bio` is the armor's oracle natively on clang + and gcc, its output kept in `test/data/armor/` so that every lane compares + against it. + Source: `reference/plan.md` R8 (proposals); `third_party/Jamfile`, + `test/armor_openssl_test.cpp` (libs/codecs). +- **R9 to R13: `percent_t` holds Boost.URL's `lut_chars`, the default token is + the type `tokens::automatic`, a format with no configured part decodes any, the + order of the formats.** (R9, R10, R12, R13.) A default-constructed bech32 or + armor decodes any human-readable part or label, one-shot as in the stream; the + order of the build was hex first, then the constant-time and fuzz lanes, base64 + before bech32 and the armor. R11 moves this entry from the proposal's first task + to the superproject's registration. + Source: `reference/plan.md` Rulings (proposals); `include/webcpp/codecs/percent.hpp` + (libs/codecs). +- **F1 to F28: the pre-flight's findings, adopted.** Among them: entry points that + refuse are constrained at most on `format` and refuse in their bodies, and + refusals are tested only by message cases (F2); the include boundaries are + written over files that exist (F4); the dudect program is `dudect_formats`, so + that the judge reads its output (F10); the value codec's buffer forms (F16); the + allocating buffer form over a heap `over` (F17); no hook for a token's allocator + (F18); the refusal messages also run as compile-fail twins on gcc, MSVC and + Emscripten, and `tools/test/codecs_jamfiles_test.py` drops secure's per-message + fixture check, since a message of codecs includes test support headers that a + user's Jamfile does not have (F19); the arm64 run covers the DIT and timing + tests at debug and nothing else (F20); paired formats are one implementation + each (F23); the files copied from secure are sanctioned and name their source + (F27); the percent corner `"%g"` reports `invalid_character` by the lowest value + (F26). The earlier F14 renames stand, F15's `user_globals` test is withdrawn by + the owner. + Source: `.superpowers/sdd/plan/preflight.md` (webcpp); `test/messages/`, + `test/constant_time/` (libs/codecs); `tools/test/codecs_jamfiles_test.py` + (webcpp). +- **The superproject's registration.** `.gitmodules` and `libs/codecs`; the + libraries table and layout of `AGENTS.md`; this chapter; `doc/releases/0.1.0.adoc`; + `tools/ci/matrix.py`, `tools/ci/matrix_test.py` and `.github/workflows/library.yml` + (codecs' constant-time lane, by its own judge, and its fuzz lane, with their + packages); `third_party/Jamfile` and chapter 10's table + (`bitcoin_base58_vectors`); `tools/test/codecs_jamfiles_test.py`, whose cases are + a program that encodes hex (builds no compiled library: `not-contains: boost_url`, + a directive the user Jamfiles tests now accept after a build that succeeds; with + exceptions on and off, the second also linking `/webcpp//throw_exception`, the + handler a build without exceptions leaves to its program) and percent, which names + its own target; and `tools/test/codecs_dudect_judge_test.py`. + Source: `libraries/codecs/openspec/changes/genesis/reference/plan.md` Task 23 + (proposals); `tools/test/codecs_jamfiles_test.py`, `tools/test/user_jamfiles.py` + (webcpp). + ## 18. Proposed, not decided The proposals not yet decided, each briefly, with the questions they leave From 9eb82207ed2c6ad878b637db8bce58eb97e398ea Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:13:28 -0300 Subject: [PATCH 09/18] build: codecs' release notes within the line limit --- doc/releases/0.1.0.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/releases/0.1.0.adoc b/doc/releases/0.1.0.adoc index 67cc60a..762670a 100644 --- a/doc/releases/0.1.0.adoc +++ b/doc/releases/0.1.0.adoc @@ -89,10 +89,10 @@ None. * Added secure_collect_test.py, which tests the script that measures the timing guard's cost from release builds. * Added secure_dudect_judge_test.py, which runs crypto's judge's tests against secure's copy. * Added secure's constant-time lane to matrix.py and library.yml: memcheck, MemorySanitizer and dudect over its blocks, each with a planted leak that must fail. -* Added the user's Jamfiles of webcpp::codecs, tested as fixtures of a test of the tools: a program that encodes hex builds no compiled library, with exceptions on and off, and percent names its own target. +* Added the user's Jamfiles of webcpp::codecs, tested as fixtures of a test of the tools: a hex program builds no compiled library, and percent names its own target. * Added not-contains: to the user Jamfiles tests after a build that succeeds, which shows a library is not built. * Added codecs_dudect_judge_test.py, which runs crypto's judge's tests against codecs' copy. -* Added codecs' constant-time lane and its fuzz lane to matrix.py and library.yml: memcheck, MemorySanitizer and dudect over its formats, each with a planted leak that must fail, and libFuzzer over every decoder. +* Added codecs' constant-time lane and fuzz lane to matrix.py and library.yml: memcheck, MemorySanitizer and dudect with planted leaks, and libFuzzer over every decoder. * Added `bitcoin_base58_vectors`, Bitcoin Core's base58 vectors as test data of codecs. * Added a judge to crypto's constant-time lane: dudect results warn at 10, and hosted runners fail on two of three. * Added same-as: to crypto's user Jamfiles test, which keeps copied programs identical. From 69a9262e43bdaefde23425a1ccfce55dc1414576 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:13:48 -0300 Subject: [PATCH 10/18] tools: codecs_jamfiles_test lint fix --- tools/test/crypto_jamfiles_format_test.py | 3 ++- .../fixtures/codecs_jamfiles/program_no_exceptions/Jamfile | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/test/crypto_jamfiles_format_test.py b/tools/test/crypto_jamfiles_format_test.py index ec47a5c..1e016e8 100644 --- a/tools/test/crypto_jamfiles_format_test.py +++ b/tools/test/crypto_jamfiles_format_test.py @@ -133,7 +133,8 @@ def test_not_contains_forbids_a_text_of_a_successful_build(): harness.run_b2 = lambda *_a, **_k: subprocess.CompletedProcess( [], 0, 'compile-c++ bin/app.o\ncompile-c++ bin/boost_url/error.o\n') try: - for directive, faults in (('not-contains: unrelated', 0), ('not-contains: boost_url', 1), + for directive, faults in (('not-contains: unrelated', 0), + ('not-contains: boost_url', 1), ('not-contains: boost_url unless boost_url/error', 0)): (case / 'c.outcome').write_text(f'[all]\nbuild: succeeds\n{directive}\n') found = jamfiles.run_target(root, 'native', [case]) diff --git a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile index dead1da..e5b8cb3 100644 --- a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile +++ b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile @@ -4,7 +4,8 @@ # accompanying file LICENSE_1_0.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) -# The same program with exceptions off: codecs throws nothing of its own. A result's value() calls -# boost::throw_exception, which a build without exceptions leaves to the program; webcpp's -# handler, /webcpp//throw_exception, is the one every webcpp.run program links. +# The same program with exceptions off: codecs throws nothing of its own. +# A result's value() calls boost::throw_exception, which a build without +# exceptions leaves to the program; /webcpp//throw_exception is webcpp's +# handler, the one every webcpp.run program links. exe app : app.cpp /webcpp/codecs//codecs /webcpp//throw_exception : off ; From af323b1b0663c26b23330e131009c71fc958542c Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:48:58 -0300 Subject: [PATCH 11/18] guidelines: chapter 17's sources point at STATUS.md, the throw_exception rule is written --- CODING-GUIDELINES.md | 34 +++++++++++-------- .../program_no_exceptions/Jamfile | 11 +++--- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/CODING-GUIDELINES.md b/CODING-GUIDELINES.md index 605eae8..f2fae4d 100644 --- a/CODING-GUIDELINES.md +++ b/CODING-GUIDELINES.md @@ -9982,7 +9982,8 @@ Cryptography). It is implemented in `webcpporg/codecs`, the submodule `libs/codecs`, built on the branch `codecs/genesis` of its repository and of the superproject and not merged: the owner's CI runs once, at the end, and the merge follows it. Its headers are ``, the core, which -registers no format and includes none, and ``, +registers no format and includes none, and +``, each format reachable only through its own header, with `detail/core/` and `detail/formats/` behind them; its targets are `/webcpp/codecs//codecs`, header-only, depending on Boost's headers, config and secure, and @@ -10168,8 +10169,9 @@ The owner's decisions: allocator above), assigns only on success and wipes the scratch in a secret operation, so a value codec that fails after `prepare` leaves the string or vector as it was; a foreign token keeps the documented limit. - Source: `reference/plan.md` rulings and `.superpowers/sdd/plan/progress.md` - (proposals, webcpp); `test/tokens_test.cpp` (libs/codecs). + Source: `libraries/codecs/openspec/changes/genesis/reference/STATUS.md` + (proposals), its section "Rulings during implementation"; + `test/tokens_test.cpp` (libs/codecs). The design's decisions: @@ -10407,15 +10409,16 @@ The plan's rulings (the planner's, adopted) and the pre-flight's findings: against it. Source: `reference/plan.md` R8 (proposals); `third_party/Jamfile`, `test/armor_openssl_test.cpp` (libs/codecs). -- **R9 to R13: `percent_t` holds Boost.URL's `lut_chars`, the default token is - the type `tokens::automatic`, a format with no configured part decodes any, the - order of the formats.** (R9, R10, R12, R13.) A default-constructed bech32 or - armor decodes any human-readable part or label, one-shot as in the stream; the - order of the build was hex first, then the constant-time and fuzz lanes, base64 - before bech32 and the armor. R11 moves this entry from the proposal's first task - to the superproject's registration. - Source: `reference/plan.md` Rulings (proposals); `include/webcpp/codecs/percent.hpp` - (libs/codecs). +- **R9 to R13: percent's character set, the default token, the default + configuration of bech32 and armor, and the order of the build.** `percent_t` + holds Boost.URL's `lut_chars` (R9); the default token is the type + `tokens::automatic` (R10); a default-constructed bech32 or armor decodes any + human-readable part or label, one-shot as in the stream (R12); the build's + order is hex first, then the constant-time and fuzz lanes, then base64 before + bech32 and the armor (R13). R11 moves this entry from the proposal's first + task to the superproject's registration. + Source: `libraries/codecs/openspec/changes/genesis/reference/plan.md` R9 to + R13 (proposals); `include/webcpp/codecs/percent.hpp` (libs/codecs). - **F1 to F28: the pre-flight's findings, adopted.** Among them: entry points that refuse are constrained at most on `format` and refuse in their bodies, and refusals are tested only by message cases (F2); the include boundaries are @@ -10431,7 +10434,8 @@ The plan's rulings (the planner's, adopted) and the pre-flight's findings: (F27); the percent corner `"%g"` reports `invalid_character` by the lowest value (F26). The earlier F14 renames stand, F15's `user_globals` test is withdrawn by the owner. - Source: `.superpowers/sdd/plan/preflight.md` (webcpp); `test/messages/`, + Source: `libraries/codecs/openspec/changes/genesis/reference/STATUS.md` + (proposals), its section "Rulings during implementation"; `test/messages/`, `test/constant_time/` (libs/codecs); `tools/test/codecs_jamfiles_test.py` (webcpp). - **The superproject's registration.** `.gitmodules` and `libs/codecs`; the @@ -10443,7 +10447,9 @@ The plan's rulings (the planner's, adopted) and the pre-flight's findings: a program that encodes hex (builds no compiled library: `not-contains: boost_url`, a directive the user Jamfiles tests now accept after a build that succeeds; with exceptions on and off, the second also linking `/webcpp//throw_exception`, the - handler a build without exceptions leaves to its program) and percent, which names + handler a build without exceptions leaves to a program that reads a result with + `value()`, `*` or `->`, as the fixture does; codecs' own headers never call + `value()`) and percent, which names its own target; and `tools/test/codecs_dudect_judge_test.py`. Source: `libraries/codecs/openspec/changes/genesis/reference/plan.md` Task 23 (proposals); `tools/test/codecs_jamfiles_test.py`, `tools/test/user_jamfiles.py` diff --git a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile index e5b8cb3..3975f34 100644 --- a/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile +++ b/tools/test/fixtures/codecs_jamfiles/program_no_exceptions/Jamfile @@ -4,8 +4,11 @@ # accompanying file LICENSE_1_0.txt or copy at # https://www.boost.org/LICENSE_1_0.txt) -# The same program with exceptions off: codecs throws nothing of its own. -# A result's value() calls boost::throw_exception, which a build without -# exceptions leaves to the program; /webcpp//throw_exception is webcpp's -# handler, the one every webcpp.run program links. +# The same program with exceptions off: codecs throws nothing of its own and +# its headers never call a result's value(). The program does: `text->view()` +# and `*back` are checked accesses of boost::system::result (operator-> and +# operator* return value()), which call boost::throw_exception, left to the +# program when exceptions are off. /webcpp//throw_exception is webcpp's +# handler, the one every webcpp.run program links; without it the link fails +# on that symbol. exe app : app.cpp /webcpp/codecs//codecs /webcpp//throw_exception : off ; From 4a34c4e80776794058e1c33ea09b557d1599eb31 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 03:48:58 -0300 Subject: [PATCH 12/18] libs/codecs: the gitlink at overview's throw_exception rule (ba2a08c) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index 93a955c..ba2a08c 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit 93a955cfac343777d1d2a37bb3941add2627de59 +Subproject commit ba2a08c6fcc04ae77b3497c00519ddd2d92643d1 From c5ead8d472dce8f35e4392d529d252f5692e3f45 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 04:20:52 -0300 Subject: [PATCH 13/18] guidelines: chapter 17 says codecs keeps no secret value type or wipe primitive of its own codecs defines secret_text, secret_bytes and the heap secret types on top of secure's; what it keeps none of is a guard, a secret value type (secure::secret), a wipe primitive (secure::erase_secret) or a constant-time primitive. --- CODING-GUIDELINES.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CODING-GUIDELINES.md b/CODING-GUIDELINES.md index f2fae4d..842fbc4 100644 --- a/CODING-GUIDELINES.md +++ b/CODING-GUIDELINES.md @@ -10077,8 +10077,11 @@ The owner's decisions: for every wipe, `secure::secret` as the fixed secret value (`is_secret` and `fixed_byte_storage` are specialized for it), `secure::declassify` before a verdict it branches on, and the blocks of `secure::constant_time`, and keeps no - guard, wipe, secret type or primitive of its own. Decision 12's placement in - config is superseded. + guard, no secret value type and no wipe primitive of its own + (`secure::secret`, `secure::erase_secret`), and no constant-time + primitive: its secret results (`secret_text`, `secret_bytes` and the heap + secret types) are built on secure's. Decision 12's placement in config is + superseded. Source: design.md owner decisions 12 and 14 (proposals); `include/webcpp/codecs/detail/core/secrecy.hpp` (libs/codecs). - **Owner decision 13: the armor is a format.** `formats::armor(label)`, RFC From 7d034dd4c55076b816b76e12e20727bc281f4213 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 06:28:12 -0300 Subject: [PATCH 14/18] libs/codecs: the gitlink at the final review's fixes (9748826) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index ba2a08c..9748826 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit ba2a08c6fcc04ae77b3497c00519ddd2d92643d1 +Subproject commit 9748826787ded2ce592de86c593da2fb3aaa51bf From 9eb993e53876ef791241ff7559da6860958477ca Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 06:45:41 -0300 Subject: [PATCH 15/18] libs/codecs: the gitlink at the residual size-sentinel fix (bb8d0f6) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index 9748826..bb8d0f6 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit 9748826787ded2ce592de86c593da2fb3aaa51bf +Subproject commit bb8d0f60ddb703c3b65b661619608e7145a54312 From f9ed61b108c8a6e029c8d1978297b473a4f5c269 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 07:20:32 -0300 Subject: [PATCH 16/18] libs/codecs: the gitlink at the encode_fault brief fix (4848c23) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index bb8d0f6..4848c23 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit bb8d0f60ddb703c3b65b661619608e7145a54312 +Subproject commit 4848c232fe1eff91cdd568d5dbe35645f0bb1ae2 From c703e6eb313fc97e2c81045bd99351bfdc5e965d Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 08:01:48 -0300 Subject: [PATCH 17/18] libs/codecs: the gitlink at the own_format C4458 fix (9e1baee) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index 4848c23..9e1baee 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit 4848c232fe1eff91cdd568d5dbe35645f0bb1ae2 +Subproject commit 9e1baee42277f2818542b58ad6c6cfbae13d0a94 From 6b6ff874f8ccf01a69b8a6523cf9213a99aa2769 Mon Sep 17 00:00:00 2001 From: R Date: Mon, 30 Nov 2026 10:38:40 -0300 Subject: [PATCH 18/18] libs/codecs: the gitlink at the merge of codecs' genesis (80d90d0) --- libs/codecs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/codecs b/libs/codecs index 9e1baee..80d90d0 160000 --- a/libs/codecs +++ b/libs/codecs @@ -1 +1 @@ -Subproject commit 9e1baee42277f2818542b58ad6c6cfbae13d0a94 +Subproject commit 80d90d0626a03acde5ecab984533b9ab68f2b68f