Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
644 commits
Select commit Hold shift + click to select a range
40790f1
TASK-059: housekeeping -- check off action items, mark Done
etr Jun 2, 2026
48a70a5
TASK-059 validation iter1: address reviewer findings
etr Jun 2, 2026
e97361f
Merge TASK-059: sha256-pin PMD analyzer download in CI
etr Jun 2, 2026
4e202dd
unworked validation sweep: fix all major findings for tasks 053-059
etr Jun 2, 2026
97bd08e
unworked validation sweep: fix major findings for tasks 036, 047, 049
etr Jun 2, 2026
8778317
unworked validation sweep: fix all remaining major findings (tasks 02…
etr Jun 2, 2026
8e1d00f
unworked validation sweep: close task-059 minor findings
etr Jun 2, 2026
d4ad72d
unworked validation sweep: close task-057 minor findings
etr Jun 2, 2026
f252f55
unworked validation sweep: close task-055 + task-056 minor findings
etr Jun 3, 2026
ecf7a0e
unworked validation sweep: close task-053 + task-054 minor findings
etr Jun 3, 2026
a0b6f7c
unworked validation sweep: tick task-047/048/049/052 minor backlog
etr Jun 3, 2026
2ecb0f7
unworked validation sweep: tick remaining 337 minor items across 33 f…
etr Jun 3, 2026
2e803ed
ci: fix CodeQL fd_set forward-decl and Windows socklen_t static_assert
etr Jun 3, 2026
d32dfe3
ci: initialize const max_args_count / max_args_bytes in ctor
etr Jun 3, 2026
9e57364
ci: revert accidental max_args_count/_bytes member additions
etr Jun 3, 2026
096424d
ci: fix multiple verify-build lane failures across the matrix
etr Jun 3, 2026
fdee3d7
ci: drain cpplint backlog (lint lane)
etr Jun 3, 2026
34d5de7
ci: fix curl_helpers.hpp include path in three hook tests
etr Jun 3, 2026
ed3a78b
ci: complete TASK-058 max_args / cache field-rename feature pieces
etr Jun 3, 2026
e870063
ci: round-2 lint drain + relax threadsafety_stress p99 gate
etr Jun 3, 2026
dd9df4d
ci: drop all CCN-gate offenders below the project ceiling
etr Jun 3, 2026
35b5ef0
lint: fix blank-line whitespace around access specifiers
etr Jun 3, 2026
203780f
ci: close out remaining matrix lanes
etr Jun 3, 2026
fa63d33
ci: drop <config.h> include + collapse radix descent duplicate
etr Jun 3, 2026
87185ea
ci: temp-bump file-size ceiling to 750 + wildcard valgrind suppressions
etr Jun 3, 2026
c26c373
ci: fix valgrind UAF root cause, CodeQL overflow, Windows symlink check
etr Jun 3, 2026
9c2d2f1
specs: M7 v2-cleanup milestone + audit (TASK-060..093)
etr Jun 4, 2026
9ef16bb
TASK-060: scope or remove file-scoped -Warray-bounds suppressions
etr Jun 4, 2026
4fd12c6
TASK-060: broaden suppression gate + single-pass awk + unit test
etr Jun 4, 2026
d272e78
Merge TASK-060: scope or remove file-scoped -Warray-bounds suppressions
etr Jun 4, 2026
06ad399
TASK-061: mechanical cleanup sweep — unfinished prose, orphan comment…
etr Jun 4, 2026
72a2ed3
TASK-061: housekeeping — mark task and action items Done
etr Jun 4, 2026
948052a
TASK-061: persist 7 unworked minor review findings
etr Jun 4, 2026
65fda97
TASK-061: record TASK-024 comment relocation in spec
etr Jun 4, 2026
e448c35
Merge TASK-061: mechanical cleanup sweep — unfinished prose, orphan c…
etr Jun 4, 2026
86195d6
TASK-062: RFC-7616-compliant Digest auth response factory
etr Jun 5, 2026
e257ee9
TASK-062: address review feedback — HA1 resources + wire-format coverage
etr Jun 5, 2026
73c6e13
TASK-062: persist 45 unworked review findings
etr Jun 5, 2026
d97a421
Merge TASK-062: RFC-7616-compliant Digest auth response factory
etr Jun 5, 2026
7b790e9
TASK-063: drop accepted-but-ignored size_hint from http_response::pipe
etr Jun 5, 2026
5e0abd5
Merge TASK-063: drop accepted-but-ignored size_hint from http_respons…
etr Jun 5, 2026
2172190
TASK-064: structured cookie value type for v2 http_response/http_request
etr Jun 5, 2026
647feee
TASK-064: fix partial-mutation in do_set_cookie and add semicolon gua…
etr Jun 5, 2026
65e08f6
TASK-064: cosmetic cleanup — remove dead code, drop explicit append c…
etr Jun 5, 2026
8a3cb3c
TASK-064: security hardening — render-time name guard + comma rejection
etr Jun 5, 2026
15d5d70
TASK-064: add render-time value_ guard and fix test quality gaps
etr Jun 5, 2026
cab974f
TASK-064: document live-MHD and deprecated negative-compile coverage …
etr Jun 5, 2026
cd2e2de
TASK-064: persist 69 unworked review findings from final review cycle
etr Jun 5, 2026
e530ae3
Merge TASK-064: structured cookie API on v2 http_response/http_request
etr Jun 5, 2026
a46ca06
TASK-065: RFC 5952 IPv6 canonicalization in peer_address::to_string
etr Jun 5, 2026
3f980bc
TASK-065: inline append_group_hex + housekeeping — mark task Done
etr Jun 6, 2026
ce191c9
TASK-065: persist 25 unworked review findings from final review cycle
etr Jun 6, 2026
ea7f6a7
Merge TASK-065: RFC 5952 IPv6 canonicalization in peer_address::to_st…
etr Jun 6, 2026
c20cde1
TASK-066: strike forward-debt comments; pin alias slots as constructi…
etr Jun 6, 2026
99c1398
TASK-066: persist 14 unworked review findings from final review cycle
etr Jun 6, 2026
64a361f
Merge TASK-066: strike forward-debt comments; pin alias slots as cons…
etr Jun 6, 2026
8258d4e
TASK-067: remove v1 registered_resources* maps and namespace compat shim
etr Jun 6, 2026
0caed6d
TASK-067: persist 24 unworked review findings from final review cycle
etr Jun 7, 2026
06447ee
Merge TASK-067: remove v1 registered_resources* maps and namespace co…
etr Jun 7, 2026
3d70a4d
TASK-068: secure_zero arena clear (CWE-14 / CWE-226 mitigation)
etr Jun 7, 2026
1ae1ace
TASK-068: tighten test gates and persist 35 unworked review findings
etr Jun 7, 2026
2a397a8
Merge TASK-068: connection_state hardening — secure_zero arena clear …
etr Jun 7, 2026
2a37e9e
TASK-069: remove transitional two-arg http_request_impl ctor
etr Jun 7, 2026
97768d6
TASK-069: persist 12 unworked review findings and mark Done
etr Jun 7, 2026
9b86e8f
Merge TASK-069: remove transitional two-arg http_request_impl ctor
etr Jun 7, 2026
ed85a1c
TASK-094: extend threadsafety_stress with per-resource add_hook CAS race
etr Jun 7, 2026
9789710
TASK-094: address review findings — document hook_table_raw_() contra…
etr Jun 7, 2026
bdb6823
TASK-094: persist 41 unworked review findings
etr Jun 7, 2026
12bcbb8
Merge TASK-094: extend threadsafety_stress with per-resource add_hook…
etr Jun 7, 2026
ce13c96
TASK-071 (A): wire install_not_found_alias_ and pin v1-404 behaviour
etr Jun 8, 2026
e64e416
TASK-071 (B): collapse route_entry::handler variant; remove dead lamb…
etr Jun 8, 2026
332c5ee
TASK-071: fix port collision and replace fixed sleep in hooks_not_fou…
etr Jun 8, 2026
427ac92
TASK-071: mark Done, check off action items, update architecture doc
etr Jun 8, 2026
28bd5b6
TASK-071: persist 32 unworked review findings
etr Jun 8, 2026
dc24b7c
Merge TASK-071: wire install_not_found_alias_ and remove dead lambda_…
etr Jun 8, 2026
9fbd5b1
TASK-072: arena-allocated unescape on the warm path
etr Jun 8, 2026
a653667
TASK-072: fix bench (5)/(6) arena-overflow flaw — fresh impl per call
etr Jun 8, 2026
9cb548e
TASK-072: extract hex_digit_value+unescape loop into shared header
etr Jun 8, 2026
846b40c
TASK-072: refactor unescape arena tests — helpers + tighter suite
etr Jun 8, 2026
761b0ec
TASK-072: add unescape_helpers.hpp to noinst_HEADERS in src/Makefile.am
etr Jun 8, 2026
142a74f
TASK-072: persist 35 unworked review findings
etr Jun 8, 2026
29a8eb2
Merge TASK-072: arena-allocated unescape on the warm path
etr Jun 8, 2026
57bfb14
TASK-073: retire v0.99 framing of unescaper_func, document architectu…
etr Jun 8, 2026
44dd3f9
TASK-073: mark Done in M7 milestone index
etr Jun 8, 2026
f4e6c5e
TASK-073: persist 12 unworked review findings
etr Jun 8, 2026
1605f1a
Merge TASK-073: retire v0.99 unescape workaround framing
etr Jun 8, 2026
9046983
TASK-074: gate DEBUG raw-body printing behind explicit env-var opt-in
etr Jun 9, 2026
d537c8f
TASK-074: mark Done in M7 milestone index and persist unworked review…
etr Jun 9, 2026
e8a5b92
Merge TASK-074: gate DEBUG raw-body printing behind explicit opt-in
etr Jun 9, 2026
edb09c5
TASK-075: propagate wait_for_server_ready to sibling hooks integ tests
etr Jun 9, 2026
feaa97a
TASK-075: persist 19 unworked review findings
etr Jun 9, 2026
b51cbf2
Merge TASK-075: propagate wait_for_server_ready to sibling hooks inte…
etr Jun 9, 2026
1e9a569
TASK-076: replace tautological-pass blocks in TLS test lanes
etr Jun 9, 2026
7a2c658
TASK-076: address test-quality-reviewer findings
etr Jun 10, 2026
b9968b3
TASK-076: persist 28 unworked review findings
etr Jun 10, 2026
858dfde
Merge TASK-076: replace tautological-pass blocks in TLS test lanes
etr Jun 10, 2026
317e71d
TASK-077: lock in `// reason:` comments for test/integ/ platform skips
etr Jun 10, 2026
563f86d
TASK-077: mark Done in M7 milestone index and persist 27 unworked rev…
etr Jun 10, 2026
4a9a2b5
Merge TASK-077: lock in `// reason:` comments for test/integ/ platfor…
etr Jun 10, 2026
a0475f4
TASK-078: resolve commented-out CONNECT bodies and dead validator int…
etr Jun 11, 2026
041a37f
TASK-078: persist 9 unworked review findings
etr Jun 11, 2026
dee984c
Merge TASK-078: resolve commented-out CONNECT bodies and dead validat…
etr Jun 11, 2026
edcaafb
TASK-079: drive nonce/opaque state machine in v2 digest-auth integ tests
etr Jun 11, 2026
d4fe603
TASK-079: mark In Progress in M7 milestone index
etr Jun 11, 2026
d9f26c3
Merge TASK-079: drive nonce/opaque state machine in v2 digest-auth in…
etr Jun 11, 2026
52a06e0
TASK-079: mark Done in M7 milestone index, apply review fixes, persis…
etr Jun 11, 2026
e07b20b
TASK-080: tighten threadsafety_stress latency gate from 100x p99 to 2…
etr Jun 11, 2026
625fb58
TASK-080: mark Done in M7 milestone index and task file, gitignore bu…
etr Jun 15, 2026
970077b
TASK-080: fix percentile index math, document warmup approximation, a…
etr Jun 15, 2026
012ef21
Merge TASK-080: tighten threadsafety_stress latency gate back from 10…
etr Jun 15, 2026
cc60be4
TASK-080: persist 39 unworked review findings
etr Jun 15, 2026
86f2889
TASK-081: Fill empty-on-correct-build unit suites; delete pthread det…
etr Jun 15, 2026
56f23cf
TASK-081: check off action items and persist 29 unworked review findings
etr Jun 15, 2026
3b43433
Merge TASK-081: fill empty-on-correct-build unit suites; delete pthre…
etr Jun 15, 2026
98bf1ae
TASK-082: tighten static-size bounds in http_resource_test and webser…
etr Jun 18, 2026
e3a7199
TASK-082: mark task Done in spec and milestone index
etr Jun 22, 2026
04da8fd
TASK-082: persist 18 unworked minor review findings
etr Jun 22, 2026
4ff7a93
Merge TASK-082: tighten static-size bounds in http_resource_test and …
etr Jun 22, 2026
318b214
TASK-083: wire real CI gates into benchmarks
etr Jun 22, 2026
df74e83
TASK-083: apply iteration-1 review fixes to warm-path and route-looku…
etr Jun 23, 2026
bd43a59
TASK-083: persist 39 unworked review findings
etr Jun 23, 2026
2d6f252
TASK-083: mark task Done in spec and milestone index
etr Jun 23, 2026
70a4ba0
Merge TASK-083: wire real CI gates into benchmarks
etr Jun 23, 2026
938d9fb
TASK-084: re-measure libstdc++ v1 get_headers ns/call baseline
etr Jun 23, 2026
169d3fb
TASK-084: persist 18 unworked review findings
etr Jun 23, 2026
9311d96
TASK-084: mark task Done in spec and milestone index
etr Jun 23, 2026
60a1bbb
Merge TASK-084: re-measure libstdc++/Linux v1 baseline for get_header…
etr Jun 23, 2026
4a033c0
TASK-085: residual test-smell sweep (auth fail-closed + smartptr frag…
etr Jun 23, 2026
4292ecd
TASK-085: persist 18 unworked review findings
etr Jun 23, 2026
b14a463
Merge TASK-085: residual test-smell sweep
etr Jun 23, 2026
0ec0d9a
Fix null key dereference in post_iterator (#375) (#376)
etr Jun 29, 2026
03c15df
TASK-086: Execute file-size split roadmap (FILE_LOC_MAX 750 -> 500)
etr Jun 30, 2026
6da8101
Merge task/TASK-086: Execute file-size split roadmap (FILE_LOC_MAX 75…
etr Jun 30, 2026
806d03f
TASK-086: prune includes + remove orphan comment in webserver_respons…
etr Jun 30, 2026
7f3cd3e
Merge task/TASK-086: validation fixes (prune webserver_response_queue…
etr Jun 30, 2026
2086fd2
TASK-086: mark Done; persist 12 residual minor review findings
etr Jun 30, 2026
3f75fed
TASK-087: Restore msan CI lane
etr Jul 2, 2026
8082af7
TASK-087: validation fixes (msan empty-guard, lint-lane gate, test in…
etr Jul 2, 2026
86efecb
Merge task/TASK-087: Restore msan CI lane
etr Jul 2, 2026
170811f
TASK-087: mark Done in M7 index and task file
etr Jul 2, 2026
ecd6ffd
TASK-088: re-enable helgrind/drd in valgrind CI lane + structural gate
etr Jul 2, 2026
51a8398
TASK-088: validation fixes — parallelize valgrind tools, timeout guar…
etr Jul 2, 2026
c1572dc
Merge task/TASK-088: Re-enable helgrind / drd in valgrind CI lane
etr Jul 2, 2026
1ad4cb8
TASK-088: mark Done in M7 index and task file
etr Jul 2, 2026
bb73db4
TASK-089: wire check-parallel-install into per-PR CI + make SKIP path…
etr Jul 2, 2026
ee83b24
TASK-089: persist unworked validation findings (1 major, 13 minor; al…
etr Jul 3, 2026
92f62bf
Merge task/TASK-089: Wire check-parallel-install into per-PR CI + rem…
etr Jul 3, 2026
87ddf44
TASK-089: mark Done in M7 index and task file
etr Jul 3, 2026
4c3f49c
docs(M7): mark TASK-064 and TASK-066 Done in index to match merged state
etr Jul 3, 2026
bf9daff
TASK-090: Harden CodeQL workflow and Codecov upload
etr Jul 3, 2026
ea1b7fa
TASK-090: add permissions block and sha256 checksum to codeql-analysi…
etr Jul 3, 2026
0f2a9c8
TASK-090: persist unworked validation findings (2 major, 24 minor; al…
etr Jul 3, 2026
615b045
Merge task/TASK-090: Harden CodeQL workflow and Codecov upload
etr Jul 3, 2026
039c330
TASK-090: mark Done in M7 index and task file
etr Jul 3, 2026
b707043
TASK-091: Tighten CI script soft-degradations
etr Jul 4, 2026
9f84439
TASK-091: persist 21 unworked validation findings (all minor, non-blo…
etr Jul 4, 2026
1a54a55
Merge task/TASK-091: Tighten CI script soft-degradations
etr Jul 4, 2026
6b2ae79
TASK-091: mark Done in M7 index
etr Jul 4, 2026
c72c9dc
TASK-092: Wire DR-008 stress gates into per-PR CI
etr Jul 4, 2026
ec30721
TASK-092: persist 12 unworked validation findings (all minor, non-blo…
etr Jul 4, 2026
0ee5cf9
Merge task/TASK-092: Wire route_table_concurrency TSan + stop()-from-…
etr Jul 4, 2026
31cf3d2
TASK-092: mark Done in M7 index and task file
etr Jul 4, 2026
b20a17f
TASK-093: Tighten example caveats (auth, pipe, access-log)
etr Jul 4, 2026
db7980a
TASK-093: validation fixes (constant-time compare in centralized_auth…
etr Jul 4, 2026
cd34510
Merge task/TASK-093: Tighten example caveats (auth, pipe, access-log)
etr Jul 5, 2026
a479d61
TASK-093: mark Done in M7 index and task file
etr Jul 5, 2026
6f20d31
test: bind integration tests to ephemeral ports (fix -j port-collisio…
etr Jul 5, 2026
52901b9
Merge chore/ephemeral-test-ports: ephemeral ports for integ tests (fi…
etr Jul 5, 2026
c04bdb5
review-sweep: work all unworked critical/major findings (tasks 060-094)
etr Jul 10, 2026
d6ccb44
Merge chore/unworked-major-issues: sweep all unworked critical/major …
etr Jul 10, 2026
3540386
review-sweep: work all unworked minor findings (tasks 060-094)
etr Jul 12, 2026
5c84039
Merge chore/unworked-minor-issues: sweep all unworked minor review fi…
etr Jul 12, 2026
5443f69
Rename IP access-control API to symmetric allow/deny vocabulary
etr Jul 13, 2026
bb42a74
Merge feature/ip-access-control-naming: symmetric allow/deny IP API
etr Jul 13, 2026
67dc663
README: use deny-list/allow-list vocabulary in accept_decision hook row
etr Jul 13, 2026
ad7c0e8
Merge remote-tracking branch 'origin/master' into feature/v2.0
etr Jul 13, 2026
07125b5
Remove deprecated register_resource alias (clean break)
etr Jul 13, 2026
d8bea8f
Fix cross-platform CI failures surfaced by fresh matrix run
etr Jul 13, 2026
93556fc
Correct stale TASK-048 alias comment (auth/405 hooks are functional)
etr Jul 13, 2026
c14dc2e
README: describe unregister_resource accurately (not a deprecated alias)
etr Jul 13, 2026
36a25b0
Fix lint scripts that break when $CXX carries flags
etr Jul 13, 2026
bc08387
CI: fix sanitizer link, Windows env, lint, and CodeQL snprintf finding
etr Jul 13, 2026
d7fc123
CI: median-gate stress test on non-Linux; helgrind --history-level=full
etr Jul 13, 2026
d963b9f
CI: fix configure breakage — set helgrind history via make CLI var, n…
etr Jul 13, 2026
19608ee
CI: fix msan libc++ build — LIBCXXABI_USE_LLVM_UNWINDER=OFF
etr Jul 13, 2026
9b50b12
CI: fix parallel-install gate ref check (--end-of-options, not --)
etr Jul 13, 2026
c435774
CI: reduce parse_nested_ipv4 and parse_cookie_header below CCN 10
etr Jul 13, 2026
639615c
CI: revert helgrind --history-level=full (ineffective)
etr Jul 13, 2026
390e057
tsan: make daemon pointer atomic; valgrind: first suppression batch
etr Jul 13, 2026
e70c80b
CI: median latency gate on all platforms; skip 2 tests on Windows
etr Jul 13, 2026
61086ac
CI: exclude webserver sizeof cap from the msan lane
etr Jul 13, 2026
e33d77d
CI: trim webserver_setup.cpp under 500 LOC; skip debug_dump set on Wi…
etr Jul 13, 2026
98d65b6
CI: relax route_table_concurrency reader-liveness under valgrind
etr Jul 13, 2026
3142868
CI: fix msan sizeof guard on gcc; helgrind/drd iteration-2 suppressions
etr Jul 13, 2026
3b2b81b
CI: fix debug_dump_set Windows skip — keep AUTORUN_TESTS compiled
etr Jul 13, 2026
9fc7294
helgrind/drd iteration-3: libc/MHD frames + test-fixture resource dtors
etr Jul 14, 2026
836b214
CI: skip content doc gates on Windows (check-release-notes, hooks-doc…
etr Jul 14, 2026
1a43aeb
CI: broaden Windows test skips to the MSYS/Cygwin subsystem
etr Jul 14, 2026
81742ac
helgrind/drd iteration-4: suppress libp11-kit dl_fini mutex teardown
etr Jul 14, 2026
27d2833
CI: run windows_smoke verification only on the native MINGW64 lane
etr Jul 14, 2026
55fd4cd
CI: relax BOTH liveness checks in route_table_concurrency under valgrind
etr Jul 14, 2026
a130334
helgrind: fix libp11-kit suppression kind (PthAPIerror, not Misc)
etr Jul 14, 2026
3d6cf0b
valgrind: fix helgrind libp11-kit kind + add MHD queue/poll ITC frames
etr Jul 14, 2026
47c3747
valgrind/helgrind: suppress libstdc++ _Sp_locker atomic<shared_ptr> FP
etr Jul 14, 2026
0082d13
ci: bump codecov-action v5.5.4 -> v5.5.5 (keybase key-migration fix)
etr Jul 14, 2026
4fb73d5
ci: add .codacy.yml to silence verified false-positive analysis noise
etr Jul 14, 2026
ec73266
valgrind: broaden shared_ptr control-block suppression to whole _Sp_c…
etr Jul 15, 2026
7ee0463
ci: correct .codacy.yml to supported schema (exclude_paths, per-engine)
etr Jul 15, 2026
a3e53f3
security: fix auth bypass via path-normalization mismatch (dot-segments)
etr Jul 16, 2026
9af15a1
perf: drop per-request weak_ptr lock() in gated hook-fire helpers
etr Jul 16, 2026
de0c334
chore: readability comment sweep + WIP routing/cookie refactor checkp…
etr Jul 17, 2026
0136578
refactor: rename route_tier_kind::pattern to ::regex
etr Jul 17, 2026
dcee7a2
refactor: rename radix_tree->segment_trie and modded_request::dhr->re…
etr Jul 17, 2026
2e73dcb
refactor: rename three mis-scoped translation units
etr Jul 17, 2026
0d698e1
refactor: consolidate the ~65-field webserver config into one struct
etr Jul 17, 2026
29d5148
refactor: clarify ip_representation internals
etr Jul 17, 2026
e203e7c
ci: measure SLOC (exclude comments/blank lines) in file-size gate
etr Jul 18, 2026
685ea52
refactor: collapse mid-class #include fragment headers into parents
etr Jul 18, 2026
c70b4d9
refactor: extract ip_access_control collaborator from webserver_impl
etr Jul 18, 2026
b596fc8
refactor: extract ws_registry collaborator from webserver_impl
etr Jul 18, 2026
1f9a82e
refactor: extract hook_bus collaborator from webserver_impl
etr Jul 18, 2026
21296ac
refactor: extract route_table collaborator from webserver_impl
etr Jul 18, 2026
e6af49f
refactor: extract daemon_lifecycle collaborator from webserver_impl
etr Jul 18, 2026
a5bf116
test: add collaborator unit/concurrency coverage; fix bench build
etr Jul 18, 2026
5140308
refactor: close collaborator duplication seams post-decomposition
etr Jul 18, 2026
1bb47bd
ci: fix lint IWYU + latent CCN gate and cap concurrency stress under …
etr Jul 18, 2026
c7b969f
docs(architecture): DR-014 — behavior decomposition of webserver_impl
etr Jul 18, 2026
ef48ed2
refactor(dr-014): extract error_pages behavior service (leaf)
etr Jul 18, 2026
6c2eec3
refactor(dr-014): extract hook_dispatcher behavior service
etr Jul 18, 2026
741faf4
refactor(dr-014): extract response_materializer behavior service
etr Jul 18, 2026
dc3f141
refactor(dr-014): extract upload_pipeline behavior service
etr Jul 18, 2026
4da8201
refactor(dr-014): extract websocket_upgrader behavior service
etr Jul 18, 2026
58e3399
docs(dr-014): drop connection_callbacks — 7 services, not 8
etr Jul 18, 2026
ee04989
refactor(dr-014): extract request_dispatcher behavior service
etr Jul 18, 2026
00eaf55
refactor(dr-014): extract request_pipeline behavior service
etr Jul 18, 2026
0d59a6e
refactor(dr-014): slim webserver_impl to a composition root
etr Jul 18, 2026
4ae4fd9
docs(architecture): document http_request_impl structure (§4.2)
etr Jul 18, 2026
6c8f1e7
test(helgrind): re-anchor benign test-fixture race suppressions
etr Jul 18, 2026
aa5d738
test(helgrind): fix deferred counter suppression to match mangled name
etr Jul 18, 2026
5603d4e
build(gate): exclude single-character lines from the SLOC metric
etr Jul 19, 2026
e6bc48e
refactor: fold webserver_callbacks_lifecycle.cpp back into webserver_…
etr Jul 19, 2026
03b80bc
refactor: drop redundant webserver_impl::log_dispatch_error forwarder
etr Jul 19, 2026
43ece69
refactor: give webserver_impl a single composition-root TU
etr Jul 19, 2026
84c5978
build(gate): add a bounded façade/adapter carve-out to the SLOC gate
etr Jul 19, 2026
eea7163
refactor: collapse webserver + webserver_impl to one class per file
etr Jul 19, 2026
ea3e67c
refactor: clarify response-body and connection-context naming
etr Jul 19, 2026
973064c
docs(architecture): add class-map and request-flow diagrams
etr Jul 19, 2026
fb875dc
docs(architecture): add threading, errors, hooks, and feature deep-dives
etr Jul 19, 2026
8a3fd54
docs(architecture): give the two diagrams their own Markdown pages
etr Jul 19, 2026
ff7ba77
refactor: rename body.{hpp,cpp} to response_body to match the class r…
etr Jul 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(dr-014): drop connection_callbacks — 7 services, not 8
Per implementation finding: connection_notify / policy_callback /
request_completed are static MHD trampolines (addresses registered with
libmicrohttpd) whose real behavior is already decomposed —
classify_decision and make_peer_address are free functions, IP work
delegates to ip_access_control, hook firing to hook_dispatcher. What
remains is MHD-adapter glue (per-connection arena via socket_context, the
con_cls request lifecycle, a null-cls guard). Wrapping it in a class adds
indirection without removing god-object state and would force a behavior
change. So they stay in the MHD-adapter layer that DR-014 already keeps
static.

Updates DR-014 (7-service table, rationale, adapter-layer note, migration
order) and dispatch-pipeline.md §4.11 (table, DAG, adapter paragraph). A
revisit flag remains to reconfirm at the end of the migration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
  • Loading branch information
etr and claude committed Jul 18, 2026
commit 58e339949507cc6fd11bfb345adeae99f8575455
12 changes: 5 additions & 7 deletions specs/architecture/04-components/dispatch-pipeline.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
### 4.11 Dispatch pipeline (request-processing services)

**Responsibility:** The request-processing behavior of the server — everything between a libmicrohttpd callback firing and a response being queued — factored out of the `webserver_impl` god-object (DR-014) into eight per-server **behavior services**. Each is an internal `httpserver::detail` type gated on `HTTPSERVER_COMPILATION`; none appears on the public surface or ABI.
**Responsibility:** The request-processing behavior of the server — everything between a libmicrohttpd callback firing and a response being queued — factored out of the `webserver_impl` god-object (DR-014) into seven per-server **behavior services**. Each is an internal `httpserver::detail` type gated on `HTTPSERVER_COMPILATION`; none appears on the public surface or ABI. (The connection-lifecycle callbacks — `connection_notify` / `policy_callback` / `request_completed` — were *not* extracted into an eighth service; they stay in the MHD-adapter layer, see below and DR-014.)

**What a behavior service is.** Distinct from a *state collaborator* (route_table/hook_bus/… — owns a mutex + data): a behavior service owns *logic*, not state. It is constructed once per `webserver_impl`, holds only `const&` references to its dependencies, owns no mutable state, takes no locks, and operates on the per-request `detail::modded_request` passed in by reference. Because it is stateless and lock-free it is inherently shareable across MHD worker threads; the decomposition adds no synchronization.

**The eight services.**
**The seven services.**

| Service (`src/httpserver/detail/…hpp`, `src/detail/…cpp`) | Owns | Constructed with |
|---|---|---|
| `error_pages` | not_found / method_not_allowed / internal_error synthesis, `run_internal_error_handler_safely` | `const webserver_config&` |
| `response_materializer` | `http_response` → `MHD_Response`, decorate + queue, digest-challenge queueing, null-response fallback | `error_pages&`, digest opaque string |
| `hook_dispatcher` | the four gated `fire_*_gated` helpers + the eleven per-phase forwarders over `hook_bus` | `hook_bus&` |
| `response_materializer` | `http_response` → `MHD_Response`, decorate + queue, digest-challenge queueing, null-response fallback | `error_pages&`, `hook_dispatcher&`, digest opaque, `const webserver_config&` |
| `hook_dispatcher` | the four gated `fire_*_gated` helpers + the eleven per-phase forwarders over `hook_bus` | `hook_bus&`, `const webserver_config&` |
| `upload_pipeline` | `process_file_upload`, upload-stream lifecycle, post-iterator target | `const webserver_config&` |
| `websocket_upgrader` | RFC-6455 handshake validate/complete + the upgrade callback (`HAVE_WEBSOCKET`) | `ws_registry&` |
| `connection_callbacks` | connection-notify arena new/delete, accept-policy decision, request-completed teardown | `const webserver_config&`, `ip_access_control&`, `hook_dispatcher&` |
| `request_dispatcher` | `finalize_answer` orchestration, route resolution, auth-skip, handler invocation, 405 path | `route_table&`, `hook_dispatcher&`, `error_pages&`, `response_materializer&`, `const webserver_config&` |
| `request_pipeline` | `answer_to_connection` body, first/second body steps, `complete_request` | `const webserver_config&`, `hook_dispatcher&`, `request_dispatcher&` |

Expand All @@ -29,13 +28,12 @@ request_pipeline
└─▶ response_materializer
├─▶ error_pages
└─▶ hook_dispatcher
connection_callbacks ─▶ { ip_access_control, hook_dispatcher }
websocket_upgrader ─▶ ws_registry
```

Acyclic, so the composition root wires it with plain member references — no mediator. Services store references at construction but never invoke a dependency during their own constructor, so binding a reference to a sibling member is well-defined irrespective of member-declaration order (`-Wreorder -Werror` guards accidental reorders).

**The MHD adapter layer.** libmicrohttpd calls in through fixed-signature C trampolines carrying a `void* cls` closure: `answer_to_connection`, `request_completed`, `connection_notify`, `policy_callback`, `post_iterator`, `uri_log`, `error_log`, `unescaper_func`, `upgrade_handler`, plus the GnuTLS `psk_cred_handler_func` / `sni_cert_callback_func`. These stay `static`/free functions — they unpack `cls` (a `webserver_impl*`, `webserver*`, `modded_request*`, or `ws_upgrade_data*`) and forward into a service. They are the C-ABI boundary, not behavior.
**The MHD adapter layer.** libmicrohttpd calls in through fixed-signature C trampolines carrying a `void* cls` closure: `answer_to_connection`, `request_completed`, `connection_notify`, `policy_callback`, `post_iterator`, `uri_log`, `error_log`, `unescaper_func`, `upgrade_handler`, plus the GnuTLS `psk_cred_handler_func` / `sni_cert_callback_func`. These stay `static`/free functions — they unpack `cls` (a `webserver_impl*`, `webserver*`, `modded_request*`, or `ws_upgrade_data*`) and forward into a service. They are the C-ABI boundary, not behavior. `connection_notify`, `policy_callback`, and `request_completed` are the fullest members of this layer: they keep their per-connection arena (`connection_state` new/delete via `socket_context`), accept-policy, and request-teardown glue inline, delegating only the extracted free functions (`classify_decision`, `make_peer_address`) and the `ip_access_control` / `hook_dispatcher` collaborators — which is why they were not carved into a separate service (DR-014).

**Free functions (not services).** Pure, instance-stateless helpers live as free functions in `httpserver::detail`, not one-method classes: `log_dispatch_error(const webserver_config&, std::string_view)` (called by every error path — a free function keeps it dependency-edge-free), `serialize_allow_methods` / `format_allow_header`, `resolve_method_callback`, `materialize_response`, `decorate_mhd_response`, `handle_post_form_arg`, `manage_upload_stream`.

Expand Down
31 changes: 24 additions & 7 deletions specs/architecture/11-decisions/DR-014.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,42 @@ When both kinds are extracted, `webserver_impl` becomes a **composition root**:
3. **A single `request_processor` mediator** owning all the logic, sub-methods still on one class.
4. **Leave it as files; add a `request_context` bundle** passed to each method for testability.

**Decision:** Option 1. Eight services:
**Decision:** Option 1, refined during implementation to **seven** behavior
services (see the `connection_callbacks` note below):

| Service | Responsibility | Ctor dependencies |
|---|---|---|
| `error_pages` | synthesise 404/405/500 responses | `const webserver_config&` |
| `response_materializer` | `http_response` → `MHD_Response` + queue | `error_pages&`, digest opaque |
| `hook_dispatcher` | dispatch-time hook gating + firing | `hook_bus&` |
| `response_materializer` | `http_response` → `MHD_Response` + queue | `error_pages&`, `hook_dispatcher&`, digest opaque, `const webserver_config&` |
| `hook_dispatcher` | dispatch-time hook gating + firing | `hook_bus&`, `const webserver_config&` |
| `upload_pipeline` | multipart / file-upload handling | `const webserver_config&` |
| `websocket_upgrader` | RFC-6455 handshake (`HAVE_WEBSOCKET`) | `ws_registry&` |
| `connection_callbacks` | MHD connection/daemon lifecycle mapping | `const webserver_config&`, `ip_access_control&`, `hook_dispatcher&` |
| `request_dispatcher` | route + auth + handler invocation | `route_table&`, `hook_dispatcher&`, `error_pages&`, `response_materializer&`, `const webserver_config&` |
| `request_pipeline` | MHD re-entrant body accumulation | `const webserver_config&`, `hook_dispatcher&`, `request_dispatcher&` |

**`connection_callbacks` was not extracted (7, not 8).** The eighth candidate
in the original analysis was a `connection_callbacks` service wrapping
`connection_notify` / `policy_callback` / `request_completed`. Implementation
showed these three are **static MHD trampolines** (their addresses are
registered with libmicrohttpd) — i.e. the C-ABI adapter layer that this DR
already keeps static — and their behavior is *already* decomposed: the accept
policy (`classify_decision`) and the sockaddr→`peer_address` adapter
(`make_peer_address`) are free functions, the IP work delegates to
`ip_access_control`, and hook firing delegates to `hook_dispatcher`. What
remains in them is MHD-adapter glue (per-connection arena `new`/`delete` via
`socket_context`, the `con_cls` request lifecycle, a null-`cls` defensive
guard). Wrapping that in an instance-method class adds indirection without
removing any god-object state and would force a behavior change (dropping the
untested null-`cls` arena path). So the three stay as delegating trampolines in
the MHD-adapter layer. (Revisit flag: reconfirm at the end of the migration
that no request-processing behavior beyond adapter glue accreted here.)

**Rationale:**
- **Eight, by reason-to-change (Option 1 over 2).** Each service has a distinct change axis — MHD body protocol vs routing/auth vs wire translation vs hook gating vs upload vs ws handshake vs connection lifecycle vs synthetic pages. The 500-SLOC and CCN-10 gates already reward this granularity; coarser services would re-hit the gates and re-fragment. The one defensible merge (`request_pipeline`+`request_dispatcher`, the most-coupled pair) was considered and rejected: they have genuinely different reasons to change.
- **Seven, by reason-to-change (Option 1 over 2).** Each service has a distinct change axis — MHD body protocol vs routing/auth vs wire translation vs hook gating vs upload vs ws handshake vs synthetic pages. The 500-SLOC and CCN-10 gates already reward this granularity; coarser services would re-hit the gates and re-fragment. The one defensible merge (`request_pipeline`+`request_dispatcher`, the most-coupled pair) was considered and rejected: they have genuinely different reasons to change. The connection-lifecycle callbacks are the exception in the other direction — they stay in the adapter layer rather than become an eighth service (see the note above).
- **DAG, no mediator (over Option 3).** The dependency graph is acyclic — `request_pipeline → request_dispatcher → {response_materializer, error_pages, hook_dispatcher, route_table}`, `response_materializer → {error_pages, hook_dispatcher}`, `error_pages` is a leaf. Plain member references in the composition root suffice; no mediator/service-locator is needed. Because services only *store* references at construction (never invoke a dependency during their own ctor), binding a reference to a sibling member is well-defined regardless of member-declaration order; `-Wreorder -Werror` still guards accidental reorders.
- **`const webserver_config&`, not the `parent` back-pointer (rejecting Option 4's bundle).** The `webserver*` back-pointer is exactly the "reach into anything, including sibling impl state" anti-pattern that made the class a god-object; a `request_context` bundle is a service-locator that re-grants it. A `const webserver_config&` states at the type level "I read configuration, I mutate nothing." The `parent` pointer stays on the composition root for the few members that genuinely need the owning `webserver*` (e.g. `modded_request::ws`), not on the services.

**MHD adapter layer.** libmicrohttpd calls in through fixed-signature C trampolines with a `void* cls` closure (`answer_to_connection`, `request_completed`, `connection_notify`, `policy_callback`, `post_iterator`, `uri_log`, `error_log`, `unescaper_func`, `upgrade_handler`, and the GnuTLS `psk_cred_handler_func` / `sni_cert_callback_func`). These remain `static`/free functions — they unpack `cls` and forward into the appropriate service. They are the C-ABI boundary, not behavior.
**MHD adapter layer.** libmicrohttpd calls in through fixed-signature C trampolines with a `void* cls` closure (`answer_to_connection`, `request_completed`, `connection_notify`, `policy_callback`, `post_iterator`, `uri_log`, `error_log`, `unescaper_func`, `upgrade_handler`, and the GnuTLS `psk_cred_handler_func` / `sni_cert_callback_func`). These remain `static`/free functions — they unpack `cls` and forward into the appropriate service. They are the C-ABI boundary, not behavior. `connection_notify` / `policy_callback` / `request_completed` are the fullest expression of this layer: they retain their per-connection arena and accept-policy glue directly (delegating only the extracted free functions and the `ip_access_control` / `hook_dispatcher` collaborators), which is why no `connection_callbacks` service was carved out.

**Free functions, not classes.** Pure statics with no instance state become free functions in `httpserver::detail` rather than spurious one-method classes: `log_dispatch_error(const webserver_config&, std::string_view)` (shared by every error path, so a free function avoids a dependency edge to `error_pages`), `serialize_allow_methods`/`format_allow_header`, `resolve_method_callback`, `materialize_response`, `decorate_mhd_response`, `handle_post_form_arg`, `manage_upload_stream`.

Expand All @@ -52,7 +69,7 @@ When both kinds are extracted, `webserver_impl` becomes a **composition root**:
- White-box tests reaching in via `webserver_test_access` update their access points per extraction step.
- The `helgrind`/`drd` race-detector lanes regressed during the state-decomposition window (green through 2026-07-15); the fix is sequenced *after* this behavior decomposition lands, still within v2.0 (the decomposition is race-detector-neutral, so it neither fixes nor worsens the lanes).

**Migration.** Leaf-first, one service per commit into `feature/v2.0`, each keeping CI green — mirroring how the five state collaborators landed: free-function extractions → `error_pages` → `response_materializer` → `hook_dispatcher` → `upload_pipeline` → `websocket_upgrader` → `connection_callbacks` → `request_dispatcher` → `request_pipeline` → fold route registration into `route_table`.
**Migration.** Leaf-first, one service per commit into `feature/v2.0`, each keeping CI green — mirroring how the five state collaborators landed: `error_pages` → `hook_dispatcher` → `response_materializer` → `upload_pipeline` → `websocket_upgrader` → `request_dispatcher` → `request_pipeline` → fold route registration into `route_table`.

**Verification:** existing `make check` (113 tests) stays green at every step; the per-file 500-SLOC and per-function CCN-10 gates are the structural acceptance criteria; `basic`/`file_upload`/`ws_start_stop`/`deferred` under helgrind/drd return to green in the follow-on lane fix.

Expand Down