Skip to content

Commit c93ee31

Browse files
etrclaude
andcommitted
TASK-006: housekeeping (status + checkboxes)
Mark all five action items complete and set task status to Complete. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 71bf2a2 commit c93ee31

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### TASK-006: Replace `#define` constants with `httpserver::constants`
2+
3+
**Milestone:** M1 - Foundation
4+
**Component:** Public constants
5+
**Estimate:** M
6+
7+
**Goal:**
8+
Eliminate macro pollution from public headers by moving every `#define` constant into `constexpr` declarations under the `httpserver::constants` namespace.
9+
10+
**Action Items:**
11+
- [x] Inventory every `#define` in `src/httpserver/*.hpp` (`DEFAULT_WS_PORT`, `DEFAULT_WS_TIMEOUT`, `NOT_FOUND_ERROR`, `METHOD_NOT_ALLOWED_ERROR`, etc.).
12+
- [x] Create `src/httpserver/constants.hpp` defining each as `inline constexpr` of the appropriate type (`std::uint16_t` for ports, `std::string_view` for messages, etc.).
13+
- [x] Update internal callers (in `src/*.cpp`) to use `httpserver::constants::name` instead of the macro.
14+
- [x] Remove the `#define`s from public headers.
15+
- [x] Re-export `constants.hpp` from `<httpserver.hpp>`.
16+
17+
**Dependencies:**
18+
- Blocked by: TASK-002
19+
- Blocks: TASK-033 (builder validation may reference port constants)
20+
21+
**Acceptance Criteria:**
22+
- `grep -E '^\s*#define\s' src/httpserver/*.hpp` returns 0 lines (PRD §3.3 acceptance).
23+
- Existing tests that referenced the macros via `<httpserver.hpp>` still resolve through `httpserver::constants::*`.
24+
- Typecheck passes.
25+
- Tests pass.
26+
27+
**Related Requirements:** PRD-CFG-REQ-002
28+
**Related Decisions:** §4.9
29+
30+
**Status:** Complete

0 commit comments

Comments
 (0)