You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Mark TASK-052 status Done and check off all 13 action items in
specs/tasks/M5-routing-lifecycle/TASK-052.md
- Update TASK-052 row in specs/tasks/_index.md from Not Started to Done
- Persist 21 unworked minor findings to
specs/unworked_review_issues/2026-05-27_000000_task-052.md
- Apply iter1 fixer fixes to bench_hook_overhead.cpp (OUTER=11→51,
clarify gate comment, capture min/max before sort) and
threadsafety_stress.cpp (safe recycle via move-then-remove)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: specs/tasks/M5-routing-lifecycle/TASK-052.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,30 +10,30 @@ Close the hook bus by extending the docs that already shipped in M6 (TASK-040 ex
10
10
**Action Items:**
11
11
12
12
*Examples (extends TASK-040)*
13
-
-[]`examples/banned_ip_log.cpp` — single `accept_decision` hook writing to a configurable sink. Resolves #332 in user-visible form.
14
-
-[]`examples/early_413.cpp` — single `request_received` hook returning `hook_action::respond_with(http_response::empty().with_status(413))` when `Content-Length > N`. Resolves #273 in user-visible form.
15
-
-[]`examples/clf_access_log.cpp` — single `response_sent` hook formatting Common Log Format with `time-taken`. Resolves #281 and #69 in user-visible form.
16
-
-[]`examples/per_route_auth.cpp` — `http_resource::add_hook(hook_phase::before_handler, ...)` demonstrating a per-route auth scheme that does NOT touch other routes.
17
-
-[] All four examples added to `examples/Makefile.am` and listed in `examples/README.md` next to the canonical "hello world" / class-form examples.
13
+
-[x]`examples/banned_ip_log.cpp` — single `accept_decision` hook writing to a configurable sink. Resolves #332 in user-visible form.
14
+
-[x]`examples/early_413.cpp` — single `request_received` hook returning `hook_action::respond_with(http_response::empty().with_status(413))` when `Content-Length > N`. Resolves #273 in user-visible form.
15
+
-[x]`examples/clf_access_log.cpp` — single `response_sent` hook formatting Common Log Format with `time-taken`. Resolves #281 and #69 in user-visible form.
16
+
-[x]`examples/per_route_auth.cpp` — `http_resource::add_hook(hook_phase::before_handler, ...)` demonstrating a per-route auth scheme that does NOT touch other routes.
17
+
-[x] All four examples added to `examples/Makefile.am` and listed in `examples/README.md` next to the canonical "hello world" / class-form examples.
18
18
19
19
*README (extends TASK-041)*
20
-
-[] New top-level section "Lifecycle hooks" between "Handlers" and "Threading". Phase table identical to §4.10. One-paragraph short-circuit explainer. Pointer to the four new examples. Explicit callout: "The v1 setters `log_access`, `not_found_handler`, `method_not_allowed_handler`, `internal_error_handler`, and `auth_handler` are aliases for `add_hook`. They remain for ergonomic call sites; new code can use either form." with a side-by-side equivalence table.
20
+
-[x] New top-level section "Lifecycle hooks" between "Handlers" and "Threading". Phase table identical to §4.10. One-paragraph short-circuit explainer. Pointer to the four new examples. Explicit callout: "The v1 setters `log_access`, `not_found_handler`, `method_not_allowed_handler`, `internal_error_handler`, and `auth_handler` are aliases for `add_hook`. They remain for ergonomic call sites; new code can use either form." with a side-by-side equivalence table.
21
21
22
22
*RELEASE_NOTES.md (extends TASK-042)*
23
-
-[] New bullet under "What's new in v2.0": "Lifecycle hook bus (`webserver::add_hook` / `http_resource::add_hook`) — 11 phases spanning connection, request, routing, handler, response. Multi-subscriber, server-wide and per-route. The v1 single-slot setters survive as documented aliases. See specs/architecture/04-components/hooks.md."
-[x] New bullet under "What's new in v2.0": "Lifecycle hook bus (`webserver::add_hook` / `http_resource::add_hook`) — 11 phases spanning connection, request, routing, handler, response. Multi-subscriber, server-wide and per-route. The v1 single-slot setters survive as documented aliases. See specs/architecture/04-components/hooks.md."
-[] Doxygen blocks on the four new public headers (`hook_phase.hpp`, `hook_action.hpp`, `hook_handle.hpp`, `hook_context.hpp`).
28
-
-[] Doxygen on `webserver::add_hook` and `http_resource::add_hook` (one overload-group block per file, listing the eleven phases and the per-route restriction set).
29
-
-[] Update existing Doxygen for `log_access`, `not_found_handler`, `method_not_allowed_handler`, `internal_error_handler`, `auth_handler`: each gets one paragraph identifying it as an alias and naming the hook phase + equivalent `add_hook` call. (Per the user's "let's make sure we highlight in the documentation that they are aliases of hooks.")
30
-
-[] Update existing Doxygen block on `webserver` class-level threading contract (§5.1) to add a sentence on hook concurrency: "Registered hooks may run concurrently from multiple MHD worker threads; implementations must be thread-safe."
27
+
-[x] Doxygen blocks on the four new public headers (`hook_phase.hpp`, `hook_action.hpp`, `hook_handle.hpp`, `hook_context.hpp`).
28
+
-[x] Doxygen on `webserver::add_hook` and `http_resource::add_hook` (one overload-group block per file, listing the eleven phases and the per-route restriction set).
29
+
-[x] Update existing Doxygen for `log_access`, `not_found_handler`, `method_not_allowed_handler`, `internal_error_handler`, `auth_handler`: each gets one paragraph identifying it as an alias and naming the hook phase + equivalent `add_hook` call. (Per the user's "let's make sure we highlight in the documentation that they are aliases of hooks.")
30
+
-[x] Update existing Doxygen block on `webserver` class-level threading contract (§5.1) to add a sentence on hook concurrency: "Registered hooks may run concurrently from multiple MHD worker threads; implementations must be thread-safe."
31
31
32
32
*Benchmark*
33
-
-[]`test/bench_hook_overhead.cpp`: serves a fixed warm path 1M times with (a) zero hooks registered, (b) one observation hook at `response_sent`. Records median + p99 per-request cost for each. CI gate: (a) within 2× microbench noise of the pre-hook-system baseline; (b) is informational. Mirrors the pattern of `test/bench_get_headers.cpp`.
33
+
-[x]`test/bench_hook_overhead.cpp`: serves a fixed warm path 1M times with (a) zero hooks registered, (b) one observation hook at `response_sent`. Records median + p99 per-request cost for each. CI gate: (a) within 2× microbench noise of the pre-hook-system baseline; (b) is informational. Mirrors the pattern of `test/bench_get_headers.cpp`.
34
34
35
35
*Stress test (extends TASK-032)*
36
-
-[] Extend `test/integ/threadsafety_stress.cpp` with a new fixture mode: in addition to randomly invoking `register_path`/`unregister_path`/`block_ip`/`unblock_ip` from inside handlers, also randomly `add_hook` / `hook_handle::remove` at random phases. TSan-clean under the existing tsan CI matrix entry. Document the rationale in the test file header.
36
+
-[x] Extend `test/integ/threadsafety_stress.cpp` with a new fixture mode: in addition to randomly invoking `register_path`/`unregister_path`/`block_ip`/`unblock_ip` from inside handlers, also randomly `add_hook` / `hook_handle::remove` at random phases. TSan-clean under the existing tsan CI matrix entry. Document the rationale in the test file header.
0 commit comments