From 46bb264578186a000d1bf0250bab225fbbc6838c Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Mon, 26 Oct 2026 22:36:18 +0100 Subject: [PATCH 1/4] Remove obsolete reports and consolidate current documentation [#376] --- AGENTS.md | 4 +- README.md | 5 +- docs/CHANGELOG.md | 11 +- docs/GZIP_CACHE_MEASUREMENTS.md | 83 -- docs/GZIP_DECODER_MEASUREMENTS.md | 151 ---- docs/HTTP_ASSETS.md | 58 +- docs/PROJECT_STATUS.md | 782 ++----------------- docs/TEST_PERFORMANCE.md | 45 +- docs/images/hello-world.png | Bin 18263 -> 0 bytes docs/images/signal-studio-webview2.png | Bin 77088 -> 0 bytes docs/test-performance/hosted-before.json | 453 ----------- docs/test-performance/linux-after-1.txt | 35 - docs/test-performance/linux-after-2.txt | 35 - docs/test-performance/linux-after-3.dot | 578 -------------- docs/test-performance/linux-after-3.txt | 35 - docs/test-performance/linux-after-phases.txt | 609 --------------- docs/test-performance/linux-after.txt | 3 - docs/test-performance/linux-before-1.dot | 532 ------------- docs/test-performance/linux-before-1.txt | 35 - docs/test-performance/linux-before.txt | 3 - test/fuzz/README.md | 2 +- 21 files changed, 164 insertions(+), 3295 deletions(-) delete mode 100644 docs/GZIP_CACHE_MEASUREMENTS.md delete mode 100644 docs/GZIP_DECODER_MEASUREMENTS.md delete mode 100644 docs/images/hello-world.png delete mode 100644 docs/images/signal-studio-webview2.png delete mode 100644 docs/test-performance/hosted-before.json delete mode 100644 docs/test-performance/linux-after-1.txt delete mode 100644 docs/test-performance/linux-after-2.txt delete mode 100644 docs/test-performance/linux-after-3.dot delete mode 100644 docs/test-performance/linux-after-3.txt delete mode 100644 docs/test-performance/linux-after-phases.txt delete mode 100644 docs/test-performance/linux-after.txt delete mode 100644 docs/test-performance/linux-before-1.dot delete mode 100644 docs/test-performance/linux-before-1.txt delete mode 100644 docs/test-performance/linux-before.txt diff --git a/AGENTS.md b/AGENTS.md index 59251a9b..c9ff1a18 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,12 +20,12 @@ The README introduces WebFront through the Game of Life walkthrough, demonstrati - `include/webfront/system/`: layered virtual filesystems and the embedded web resources, a closed list guarded by the `MinimalCoreAssets` CTest case (normative list and 150 KiB decoded budget in ADR-016; changing it means amending the ADR and `test/cmake/CheckMinimalCoreAssets.cmake` together). - `include/webfront/frontend/`: system-browser, CEF, optional Windows WebView2 and macOS WKWebView frontend adapters. - `examples/`: only Hello World (`hello-world/`) and Game of Life (`life/`, with console, developer and embedded stages). -- `js/core/`: readable browser bridge, fallback and bootstrap loader compiled into `include/webfront/`, plus the embedding CMake modules; `js/developer/`: developer environment (its terminal and `wf`), the wf scripts that build it (`scripts/`), build and vendoring tools. The repository is itself a `wf` project (`js/developer/webfront.project.json` and its lock, selected with `--manifest-dir js/developer`): the environment builds itself, and its pure JavaScript specs (`test/developer/`) run with `wf test`. Production C++ remains header-only in `include/webfront/`. +- `js/core/`: readable browser bridge, fallback and bootstrap loader compiled into `include/webfront/`, plus the embedding CMake modules; `js/developer/`: developer environment (its terminal and `wf`), the wf scripts that build it (`scripts/`), build and publication tools. The repository is itself a `wf` project (`js/developer/webfront.project.json` and its lock, selected with `--manifest-dir js/developer`): the environment builds itself, and its pure JavaScript specs (`test/developer/`) run with `wf test`. Production C++ remains header-only in `include/webfront/`. - `test/fixtures/`, `test/web/fixtures/`: retained regression fixtures, not public example applications. - `test/unit/`: Catch2 unit tests; `test/web/`: real-browser integration (`suite/` is the WebFront project of the Jasmine specs, run by `webtest` through `wf test`); `test/driver/`: `webfront-wf`, the non-interactive `wf` driver for tests; `test/fuzz/`, `test/fixtures/`; `test/cmake/`: CMake test scripts and sub-projects. The `RepositoryLayout` CTest case pins the tracked root. - `cmake/`: build modules (frontends, CEF, CPM, compiler options); `.github/`: workflows, `.github/CONTRIBUTING.md`. - `docs/`: current reference guides, architecture decisions and `docs/CHANGELOG.md`. -- `docs/PROJECT_STATUS.md`: evidence-based status snapshot and known limitations. +- `docs/PROJECT_STATUS.md`: current supported paths, validation scope and known limitations; completed work belongs in the changelog and Git history. - `docs/adr/README.md`: architecture decision index, Git history, tradeoffs and implementation rules; read the relevant ADRs before changing their contracts. - `docs/DEVELOPER_ENVIRONMENT.md`: the reference of the developer environment (`wf` commands, manifest and lock, TypeScript and `wf check`, tests, limits, distribution); `docs/EMBEDDED_ASSETS.md`: the core's embedded resources and their regeneration. diff --git a/README.md b/README.md index c449c757..77512496 100644 --- a/README.md +++ b/README.md @@ -266,11 +266,12 @@ ctest --test-dir build --output-on-failure --parallel 4 Configuring with tests enabled downloads, and verifies against their SHA-512, the pinned bootstrap environment and the packages of the test registry; the embedded assets are generated and checked by CMake alone (the `webfront-embedded-assets` target regenerates them). Normal C++ builds use versioned headers. Browser tests require an enabled engine; Linux CEF tests use Xvfb. See [AGENTS.md](AGENTS.md) for contributor commands and [developer environment testing](docs/DEVELOPER_ENVIRONMENT.md#environment-distribution-and-offline-tests-maintainers). -CTest runs up to four tasks at a time; browser ports remain locked and embedded builds run serially. +CTest runs up to four tasks at a time; independent driver sessions use OS-assigned ports, while +shared projects and nested builds retain resource locks. See [test timings and parallelism](docs/TEST_PERFORMANCE.md) for measurements and constraints. `ctest -L fast` runs the unit tests in about a second; [test tiers](docs/TEST_TIERS.md) describes what CI runs on each pull request, weekly and before a merge into `master`. -CI runs one combined C++ / native-browser job per desktop platform on each code change. The Linux job also collects and prints GCC line coverage (no external upload). Linux Clang, sanitizers, fuzzing and CEF compatibility run weekly, on demand and on pull requests into `master`. Manual dispatch with `repeat_desktop_tests=true` also repeats each desktop CTest case three times for stability checks. Workflow concurrency cancels superseded runs; dependency and compiler caches avoid repeated work. Platform badges above identify the configured matrix; the CI badge reports its aggregate status. Execution times depend on cache state and runner availability. +CI runs one combined C++ / native-browser job per desktop platform on each code change. The Linux job also collects and prints GCC line coverage (no external upload). Linux Clang, sanitizers, fuzzing and CEF compatibility run weekly, on demand and on pull requests into `master`. Manual dispatch with `repeat_desktop_tests=true` also runs the complete desktop CTest suite three times, recreating its fixtures on each pass. Workflow concurrency cancels superseded runs; dependency and compiler caches avoid repeated work. Platform badges above identify the configured matrix; the CI badge reports its aggregate status. Execution times depend on cache state and runner availability. ## Contracts and limitations diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 22d7861b..a857b6ef 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,15 @@ ## Unreleased +- Repository cleanup (#376): consolidate the gzip benchmark and differential-validation commands + into [HTTP assets](HTTP_ASSETS.md#manual-benchmarks-and-differential-validation); remove + `GZIP_CACHE_MEASUREMENTS.md`, `GZIP_DECODER_MEASUREMENTS.md` and the one-off profiles under + `docs/test-performance/`. Their dated results remain in Git and new CI reports are workflow artifacts. + `PROJECT_STATUS.md` now describes supported paths, contracts and outstanding limitations; + completed migration/qualification records remain in Git and this changelog. Remove the unreferenced + Hello World and retired Signal Studio screenshots. Active build, test, publication and animation + generation tools, plus the measurement evidence cited by proposed ADRs, are retained. + - Tests are organized in tiers by CTest label: `fast` (unit tests, about one second), the standard tier and `portability` (the consumer project). CI runs the fast tier first, excludes `portability` from pull requests into `develop`, and runs the advanced tier (three suite repetitions, a portability matrix, sanitizers, fuzzers, CEF) weekly @@ -56,7 +65,7 @@ - Gzip identity fallback reuses a bounded validated-representation cache for GET and HEAD (#281). Cold decoding uses buffered bit reads and a small Huffman lookup (#282), with unchanged allocation behavior, strict stream validation and output budgets. Release benchmarks and - test-only zlib differential/sanitizer validation are recorded in `docs/GZIP_DECODER_MEASUREMENTS.md`. + test-only zlib differential/sanitizer validation are recorded in [HTTP asset validation](HTTP_ASSETS.md#manual-benchmarks-and-differential-validation). - `WebFrontLifeDeveloper` starts without argument on `./life-project` (created when missing, reused untouched otherwise) and the pinned environment; the explicit ` [ ]` form remains. At configuration, the diff --git a/docs/GZIP_CACHE_MEASUREMENTS.md b/docs/GZIP_CACHE_MEASUREMENTS.md deleted file mode 100644 index 9badb7ac..00000000 --- a/docs/GZIP_CACHE_MEASUREMENTS.md +++ /dev/null @@ -1,83 +0,0 @@ -# Gzip fallback cache measurements (#281) - -Measured on Linux x86-64, GCC 15.2.0, Release (`-O3 -DNDEBUG`), 2026-10-25. -Both executables enable `_GLIBCXX_ASSERTIONS` and `-ftrivial-auto-var-init=pattern`. -These are local timing observations, not performance assertions or cross-platform guarantees. -The benchmark calls the real `RequestHandler` with an in-memory compressed provider: URI -parsing, provider reads, negotiation, decoding/cache lookup and response construction are -included; network I/O, browser decompression and filesystem latency are excluded. - -The before executable uses `HTTPServer.hpp` from commit `642a435`, with a counter added at -its `decodeGzip` call. The after executable uses the new cache and its decode-attempt and -retained-byte counters. Each row performs **200 requests**. Repeated rows use one handler -and include its first cold request; cold rows create a fresh handler for every request. -The optional target also runs the new handler with retention disabled as an uncached control. -No decoder algorithm or gzip validation change is included in #281. - -The neutral fixed/dynamic/optional fixtures are from `test/unit/GzipFixtures.hpp`. The -application input is the generated developer compiler bundle `build-distribution/compiler.mjs`, -compressed with Python's `gzip.compress(bytes, mtime=0)`. It is an application bundle, -not a restored core provider. Its SHA-256 is listed below so regenerated bundle changes -cannot silently be mistaken for the same workload. - -## Sizes and retained memory - -| Asset | Compressed bytes | Decoded bytes | Before retained bytes | After retained bytes | -| --- | ---: | ---: | ---: | ---: | -| fixed | 499 | 23768 | 0 | 24357 | -| dynamic | 453 | 23768 | 0 | 24311 | -| optional | 476 | 23768 | 0 | 24334 | -| application | 22902 | 78508 | 0 | 101500 | - -Retained bytes include both string capacities and terminators, entry metadata and list links -(90 bytes of accounted overhead per entry on this libstdc++ build). GET and HEAD retain the -same entry. This measures cache retention, **not peak process memory**: provider/input bytes, -response buffers, decoder temporaries and allocator bookkeeping are outside these figures. -Every cold request still allocates a bounded decoded representation; admission temporarily -constructs a retained copy. An evicted/disabled/oversized entry retains zero bytes. - -## Timing and decode counts - -Before: **200 decodes** in every row. After: **1 decode** for repeated requests and -**200 decodes** for cold requests. With cache retention disabled: **200 decodes**, zero -retained bytes. Tests separately verify mixed GET/HEAD reuse and a smaller active output -budget, content replacement, invalid streams, admission limits, eviction and shutdown. - -| Asset | Method | Repeated before (µs/request) | Repeated after | Cold before | Cold after | -| --- | --- | ---: | ---: | ---: | ---: | -| fixed | GET | 74.60 | 2.30 | 76.30 | 76.14 | -| fixed | HEAD | 75.14 | 1.83 | 77.19 | 76.45 | -| dynamic | GET | 75.11 | 2.27 | 76.58 | 75.71 | -| dynamic | HEAD | 75.22 | 1.81 | 76.17 | 75.75 | -| optional | GET | 75.80 | 2.28 | 76.52 | 76.40 | -| optional | HEAD | 75.21 | 1.82 | 75.57 | 76.17 | -| application | GET | 921.80 | 32.54 | 934.22 | 916.78 | -| application | HEAD | 907.11 | 31.15 | 894.37 | 913.72 | - -The improvement comes from eliminating repeat validation, including CRC32 and DEFLATE. -These cache-only measurements predate #283 and use the explicit synchronous RequestHandler -API. Cold application decoding took about 0.9 ms here. The current HTTP server runs that cold -work on its owned CPU executor; this harness remains a manual codec/cache baseline. The warm application cost still includes reading and comparing 22.9 KiB of -compressed bytes; #282 can use the cold rows as a decoder baseline. Small timing differences -between cold before/after runs include allocation and host scheduling noise. - -## Reproduction - -With the normal CEF-off test build configured: - -```bash -cmake --build build --target gzip_cache_benchmark --parallel 2 -# Without an argument, runs all three neutral fixtures. -build/test/unit/gzip_cache_benchmark -# Optionally use a generated application bundle, or any complete gzip asset under 4 MiB decoded. -python3 -c 'import gzip,pathlib; pathlib.Path("/tmp/wf-compiler.mjs.gz").write_bytes(gzip.compress(pathlib.Path("build-distribution/compiler.mjs").read_bytes(), mtime=0))' -build/test/unit/gzip_cache_benchmark /tmp/wf-compiler.mjs.gz -``` - -The CSV reports sizes, iterations, actual decode attempts, retained bytes and mean time per -request for both enabled and disabled retention. It is excluded from the normal build and -CTest; no timing threshold is imposed. Re-run on the target compiler/platform before using -the timings to justify decoder changes. For a historical before comparison, compile the same -harness against the pre-cache `RequestHandler` and count its `decodeGzip` calls. - -Application bundle SHA-256: `5f36728943433f1b88eadcdc0db910133257b4502c8faec3357168b6739f70bc`. diff --git a/docs/GZIP_DECODER_MEASUREMENTS.md b/docs/GZIP_DECODER_MEASUREMENTS.md deleted file mode 100644 index 584e0d12..00000000 --- a/docs/GZIP_DECODER_MEASUREMENTS.md +++ /dev/null @@ -1,151 +0,0 @@ -# Gzip decoder measurements (#282) - -Measured on macOS 27.0.1, Apple M2 arm64, Homebrew Clang 21.1.8/libc++, Release -(`-std=c++23 -O3 -DNDEBUG`), 2026-10-25. Both versions use libc++ extensive hardening -and `-ftrivial-auto-var-init=pattern`. Timings are informational; no CI timing threshold. - -The baseline is `Gzip.hpp` at `d27e4fc`, after the cache (#281) and bounded worker (#283). -The same `GzipDecoderBenchmark.cpp` runs against both headers. It measures decoding, -CRC/header/trailer validation and byte-for-byte output verification, excluding provider reads, -HTTP, cache lookup, scheduling and network I/O. Every iteration decodes a cold representation. -`fresh` destroys the output string each iteration; `reserved` reserves the exact decoded size -before timing, representing the worker's preallocated output. The actual worker reserves its -configured limit. The benchmark does not simulate worker admission or response copying. - -The [cache measurements](GZIP_CACHE_MEASUREMENTS.md) show that cache hits remove repeat decoding; -this change reduces the remaining cold CPU work. Warm cache hits and gzip pass-through do not -invoke the decoder and receive no algorithmic benefit. The worker still runs one active decode, -with the same output, admission and shutdown contracts. - -## Corpus and results - -`GenerateGzipCorpus.py` uses Python 3.14.7/zlib 1.2.12, seed 282, gzip level 6 unless -specified. Compressed hashes depend on the Python zlib version; CI regenerates its own -corpus and does not require byte-identical compression across versions. The core bridge/bootstrap -sources are compressed **test inputs**; their production representations remain identity. The application is the generated developer compiler bundle -(78,508 decoded bytes, SHA-256 `5f36728943433f1b88eadcdc0db910133257b4502c8faec3357168b6739f70bc`). -No removed core provider is restored. Near-budget cases decode to 4,194,303 bytes, one byte -below the default limit: stored uses level 0 and deterministic random bytes; fixed/dynamic -use repeating JavaScript text; Huffman-only uses a deterministic sixteen-symbol alphabet; -incompressible uses random bytes and zlib's default strategy (predominantly stored blocks). -Some near-budget inputs exceed the server's separate 4 MiB compressed-input cap; these are -codec benchmarks, not claims that the default server admits those representations. - -Median of three runs, alternating order. Throughput uses preallocated output; fresh-output -times and allocation totals are shown separately. Allocation totals match the baseline. - -| Asset | gzip / decoded bytes | Reserved µs before / after | MiB/s before / after | Fresh µs before / after | Fresh allocations / bytes | -| --- | ---: | ---: | ---: | ---: | ---: | -| fixed | 499 / 23768 | 86.48 / 87.28 | 262.1 / 259.7 | 93.65 / 94.78 | 9 / 73,488 | -| dynamic | 453 / 23768 | 93.14 / 87.52 | 243.4 / 259.0 | 100.26 / 90.93 | 9 / 73,488 | -| optional | 476 / 23768 | 92.25 / 89.59 | 245.7 / 253.0 | 89.34 / 91.54 | 9 / 73,488 | -| bridge | 5739 / 25527 | 207.21 / 170.62 | 117.5 / 142.7 | 226.52 / 159.51 | 11 / 98,256 | -| bootstrap | 2824 / 6534 | 78.32 / 48.77 | 79.6 / 127.8 | 73.57 / 58.28 | 9 / 24,528 | -| application | 22974 / 78508 | 827.14 / 568.52 | 90.5 / 131.7 | 809.29 / 587.63 | 12 / 196,560 | -| near-stored | 4194651 / 4194303 | 12525.22 / 11135.83 | 319.4 / 359.2 | 12826.86 / 11119.19 | 7 / 8,323,072 | -| near-fixed | 36667 / 4194303 | 16501.30 / 14886.27 | 242.4 / 268.7 | 17698.25 / 14966.84 | 17 / 11,009,856 | -| near-dynamic | 14330 / 4194303 | 14807.34 / 15056.99 | 270.1 / 265.7 | 17463.25 / 14797.25 | 17 / 11,009,856 | -| near-incompressible | 4195601 / 4194303 | 11036.32 / 11085.55 | 362.4 / 360.8 | 11213.95 / 11048.08 | 9 / 8,378,352 | -| near-huffman | 2132022 / 4194303 | 48956.38 / 30807.26 | 81.7 / 129.8 | 47336.47 / 31237.99 | 18 / 12,582,864 | - -The application improves by about 31% and the Huffman-only case by 37% in these runs. -Small fixed decoding is within 1%; near-budget dynamic decoding is about 2% slower. -Stored-block copying and CRC are unchanged, so their variable timing is not evidence of a -new bulk-copy optimization. These observations support the small lookup for application -code and literal-heavy inputs, without claiming universal improvement. - -Allocation counts and bytes are **identical before and after**. They count scalar `operator new` -requests during the loop, including string growth, rather than allocator bookkeeping or peak RSS. -Input, reference output and pre-reservation allocations are excluded. The decoder has no aligned -or array allocation path. Every `reserved` case makes **zero allocations** during decoding. -The fresh case reports cumulative allocated bytes, not simultaneously live or retained memory. - -## Algorithm choice - -A byte-bounded 64-bit reservoir replaces per-bit input indexing. It holds at most 39 bits for -reads of up to 32 bits, checks each byte before fetching it and tracks logical offsets separately -from prefetched bytes. Alignment discards only the fractional byte; bulk reads return complete -prefetched bytes to the input view. This preserves header CRC ranges, stored blocks, member -trailers, concatenation and strict trailing-byte rejection without reading past the supplied span. - -A buffered-reader-only prototype gave a modest gain on the compiler bundle. The 128-entry -Huffman prototype reduced its fresh decode from approximately 743 to 613 µs; 256 entries reduced -it to approximately 534 µs in the exploratory run. The 256-entry table is retained: each tree -adds 512 stack bytes and no heap allocations. Codes longer than eight bits and short final input -use the validated canonical decoder. No large secondary tables or new tree acceptance rules are -introduced. Repeating-match and stored workloads remain dominated by copying and CRC validation. - -## Reproduction - -Configure the ordinary CEF-off Release build, then build the optional benchmark (not in CTest): - -```bash -cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON -cmake --build build --target gzip_decoder_benchmark --parallel 2 -python3 test/fuzz/GenerateGzipCorpus.py build/gzip-corpus path/to/build-distribution/compiler.mjs -build/test/unit/gzip_decoder_benchmark build/gzip-corpus/*.gz -``` - -The corpus directory must not already exist. Omit the optional bundle argument to use only -repository sources and generated neutral fixtures. The generator prints compressed/decoded -sizes and SHA-256 checksums. The benchmark also always runs the three small checked-in fixtures. -CSV reports time, decoded MiB/s, allocations and requested bytes per decode, for both output modes; -2,000 iterations per small input and 40 per input above 1 MiB. No timing assertion runs in CI. - -For an exact historical comparison, copy only the two standalone headers into a build directory -and compile the same harness with that directory first in the include path: - -```bash -mkdir -p build/gzip-baseline/webfront/http -git show d27e4fc:include/webfront/http/Gzip.hpp > build/gzip-baseline/webfront/http/Gzip.hpp -git show d27e4fc:include/webfront/http/BuffersPolicy.hpp > build/gzip-baseline/webfront/http/BuffersPolicy.hpp -clang++ -std=c++23 -O3 -DNDEBUG -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE \ - -ftrivial-auto-var-init=pattern -Ibuild/gzip-baseline -Itest/unit \ - test/unit/GzipDecoderBenchmark.cpp -o build/gzip-before -clang++ -std=c++23 -O3 -DNDEBUG -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE \ - -ftrivial-auto-var-init=pattern -Iinclude test/unit/GzipDecoderBenchmark.cpp -o build/gzip-after -build/gzip-before build/gzip-corpus/*.gz -build/gzip-after build/gzip-corpus/*.gz -``` - -Use the same compiler for both; adapt the standard-library hardening macro on other platforms. -Repeat three times, alternating before/after order. Desktop background activity makes these -local observations noisy; compare the corpus as a whole rather than treating a small timing -difference as a guaranteed gain. - -## Differential and sanitizer validation - -`WEBFRONT_GZIP_DIFFERENTIAL=ON` opts into test-only zlib linkage. Production remains header-only -and does not depend on zlib. `GzipZlibDifferential` checks the neutral fixtures in ordinary CTest; -`gzip_differential ` also compares generated stored/fixed/dynamic/Huffman-only, -flush boundaries and size-boundary cases, exact budgets, sampled truncations/mutations, optional -headers, concatenation, CRC and trailing bytes. Comparisons require matching acceptance and -byte-for-byte content. The oracle explicitly loops over members and requires full consumption. - -Intentional differences from permissive gzip consumers: WebFront rejects all trailing padding, -including zeros, and dynamic declarations of 31/32 distance symbols. The zlib oracle normalizes -strict consumption; arbitrary-input differential fuzzing compares every WebFront-accepted stream -with zlib, while the generated supported corpus checks acceptance in both directions. Reserved -or otherwise unsupported declarations are covered by WebFront's malformed-input unit fixtures. - -```bash -cmake -S . -B build -DWEBFRONT_GZIP_DIFFERENTIAL=ON -cmake --build build --target gzip_differential --parallel 2 -build/test/unit/gzip_differential build/gzip-corpus -ctest --test-dir build --output-on-failure --parallel 4 -``` - -For Clang/compiler-rt sanitizer fuzzing, configure with `ENABLE_FUZZING=ON` and -`WEBFRONT_GZIP_DIFFERENTIAL=ON`. See [fuzzing](../test/fuzz/README.md) for commands. -The extended CI ASan/UBSan job runs the generated corpus and both gzip fuzzers; CodeScene -quality gates remain unchanged. The generated-corpus comparison step has a five-minute timeout. - -On this macOS host, Homebrew's ASan runtime stalled in its allocator initialization before main. -Validation instead used Apple Clang 21.0.0's ASan/UBSan runtime; libFuzzer came from Homebrew LLVM -21.1.8 because Apple does not ship its archive. Both fuzzers ran for 30 seconds with a 1 MiB output -cap, 65,536-byte maximum mutation size and a five-second per-input timeout. Standalone differential -validation used the 4 MiB output limit with the complete generated corpus. - -Local validation: 293 CEF-off CTest cases passed; 12,571 generated/fixture comparisons passed -under ASan/UBSan; bounded fuzzing completed 53,370 runs and differential fuzzing 44,065 runs -without a finding. The 264 bit-width/alignment combinations are covered by the unit tests. diff --git a/docs/HTTP_ASSETS.md b/docs/HTTP_ASSETS.md index 4c0e5f8f..62d4719d 100644 --- a/docs/HTTP_ASSETS.md +++ b/docs/HTTP_ASSETS.md @@ -69,12 +69,8 @@ For the synchronous API, `RequestHandler::fallbackCacheStatistics()` exposes dec on the server context. The LRU lookup compares compressed bytes linearly across retained entries; gzip pass-through remains independent of this cost. Cold decoding uses bounded buffered bit reads and a 256-entry short-code Huffman lookup, with the canonical decoder for longer codes. -See [decoder measurements and differential validation](GZIP_DECODER_MEASUREMENTS.md) for the -Release comparison, allocation accounting and test-only zlib tools. Validation, budgets and -strict member/trailer boundaries are unchanged. - -See [gzip cache measurements](GZIP_CACHE_MEASUREMENTS.md) for cold/repeated GET and HEAD data -and the optional benchmark target. +Validation, budgets and strict member/trailer boundaries are unchanged. Optional +[manual benchmarks](#manual-benchmarks-and-differential-validation) measure codec/cache costs. ## Cold decoding, admission and shutdown (#283) @@ -151,7 +147,7 @@ queued jobs are stopped without decoding. `fallbackDecodeStatistics()` exposes a for jobs, response leases, charged bytes, decode attempts and whether a worker has been created. `Server::fallbackCacheStatistics()` combines I/O-context cache counters with worker decode attempts; read cache statistics on the I/O context. Buffered decoding reduces cold CPU work; see -[decoder measurements](GZIP_DECODER_MEASUREMENTS.md). +[manual benchmarks](#manual-benchmarks-and-differential-validation). ## Fallback budget @@ -176,3 +172,51 @@ using App = webfront::BasicWF