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
TASK-045: housekeeping — mark Done + persist validation review notes
Action items in TASK-045.md ticked off and Status flipped to Done
(matched by the TASK-045 row in tasks/_index.md). Multi-agent validation
loop on 4dd7217 returned 8/8 approve after one fix iteration (housekeeper
request-changes → fixed); the 4 major + 30 minor unworked findings are
persisted to specs/unworked_review_issues/2026-05-21_173303_task-045.md
for follow-up sweeps.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: specs/tasks/M5-routing-lifecycle/TASK-045.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@
8
8
Land the public types and per-phase storage for the lifecycle hook bus without firing any hooks yet. After this task the API surface compiles and a hook can be registered + removed, but no phase actually fires; subsequent tasks (TASK-046 .. TASK-051) wire individual phases.
9
9
10
10
**Action Items:**
11
-
-[] New public header `src/httpserver/hook_phase.hpp`: define `enum class hook_phase` with the eleven phases plus `count_` sentinel (per §4.10).
12
-
-[] New public header `src/httpserver/hook_action.hpp`: `class hook_action` with `pass()`, `respond_with(http_response)`, `is_pass() const noexcept`, `http_response&& take_response() &&`. Implementation over `std::optional<http_response>`.
13
-
-[] New public header `src/httpserver/hook_handle.hpp`: move-only RAII type holding a non-owning reference into the per-phase storage. Destructor calls `remove()` unless previously `detach()`-ed.
14
-
-[] New public header `src/httpserver/hook_context.hpp`: phase-specific context structs (`accept_ctx`, `request_received_ctx`, `body_chunk_ctx`, `route_resolved_ctx`, `before_handler_ctx`, `handler_exception_ctx`, `after_handler_ctx`, `response_sent_ctx`, `request_completed_ctx`, `connection_open_ctx`, `connection_close_ctx`, `peer_address`). All libhttpserver-defined; never expose MHD types (PRD-HDR-REQ-001).
15
-
-[]`webserver_impl` private state in `src/httpserver/detail/webserver_impl.hpp`: one `std::vector<std::function<...>>` per phase + `std::array<std::atomic<bool>, hook_phase::count_> any_hooks_` + a single `std::shared_mutex hook_table_mutex_` covering all phase vectors.
16
-
-[]`webserver::add_hook(hook_phase, ...)` — eleven overloads, one per phase. Each acquires `hook_table_mutex_` (unique_lock), pushes the callable, sets `any_hooks_[phase] = true` (memory_order_release), returns a `hook_handle` carrying back-references for removal.
17
-
-[]`hook_handle::remove()` re-takes the `hook_table_mutex_` (unique_lock), erases the entry, clears `any_hooks_[phase]` if the vector is now empty (memory_order_release). Idempotent.
18
-
-[] Add `hook_phase.hpp`, `hook_action.hpp`, `hook_handle.hpp`, `hook_context.hpp` to the umbrella include in `src/httpserver.hpp` and to install rules in `src/httpserver/Makefile.am`.
19
-
-[] Extend the public-header hygiene CI test (TASK-007) to cover the four new headers — they must carry the `_HTTPSERVER_HPP_INSIDE_` / `HTTPSERVER_COMPILATION` guard pair.
11
+
-[x] New public header `src/httpserver/hook_phase.hpp`: define `enum class hook_phase` with the eleven phases plus `count_` sentinel (per §4.10).
12
+
-[x] New public header `src/httpserver/hook_action.hpp`: `class hook_action` with `pass()`, `respond_with(http_response)`, `is_pass() const noexcept`, `http_response&& take_response() &&`. Implementation over `std::optional<http_response>`.
13
+
-[x] New public header `src/httpserver/hook_handle.hpp`: move-only RAII type holding a non-owning reference into the per-phase storage. Destructor calls `remove()` unless previously `detach()`-ed.
14
+
-[x] New public header `src/httpserver/hook_context.hpp`: phase-specific context structs (`accept_ctx`, `request_received_ctx`, `body_chunk_ctx`, `route_resolved_ctx`, `before_handler_ctx`, `handler_exception_ctx`, `after_handler_ctx`, `response_sent_ctx`, `request_completed_ctx`, `connection_open_ctx`, `connection_close_ctx`, `peer_address`). All libhttpserver-defined; never expose MHD types (PRD-HDR-REQ-001).
15
+
-[x]`webserver_impl` private state in `src/httpserver/detail/webserver_impl.hpp`: one `std::vector<std::function<...>>` per phase + `std::array<std::atomic<bool>, hook_phase::count_> any_hooks_` + a single `std::shared_mutex hook_table_mutex_` covering all phase vectors.
16
+
-[x]`webserver::add_hook(hook_phase, ...)` — eleven overloads, one per phase. Each acquires `hook_table_mutex_` (unique_lock), pushes the callable, sets `any_hooks_[phase] = true` (memory_order_release), returns a `hook_handle` carrying back-references for removal.
17
+
-[x]`hook_handle::remove()` re-takes the `hook_table_mutex_` (unique_lock), erases the entry, clears `any_hooks_[phase]` if the vector is now empty (memory_order_release). Idempotent.
18
+
-[x] Add `hook_phase.hpp`, `hook_action.hpp`, `hook_handle.hpp`, `hook_context.hpp` to the umbrella include in `src/httpserver.hpp` and to install rules in `src/httpserver/Makefile.am`.
19
+
-[x] Extend the public-header hygiene CI test (TASK-007) to cover the four new headers — they must carry the `_HTTPSERVER_HPP_INSIDE_` / `HTTPSERVER_COMPILATION` guard pair.
20
20
21
21
**Dependencies:**
22
22
- Blocked by: TASK-014 (webserver_impl), TASK-009 (http_response by value).
@@ -36,4 +36,4 @@ Land the public types and per-phase storage for the lifecycle hook bus without f
0 commit comments