Skip to content

Commit f033546

Browse files
etrclaude
andcommitted
TASK-053 step 6: mark task complete in deferred-backlog plan
Flip TASK-053 to Status: Done and check off the six action items with one-line pointers to the corresponding commit (steps 1-5 and the rename done as part of step 3). The action-item descriptions are updated to match what actually landed: the v1 fallback was retired in step 3 alongside the LRU rename, the v1 registration maps (registered_resources*) survive as non-dispatch bookkeeping for the lambda-shim and WebSocket paths (their removal is its own follow-up), and the bench-targets line carries bench_route_lookup as added in step 5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c60ae60 commit f033546

1 file changed

Lines changed: 41 additions & 18 deletions

File tree

specs/tasks/v2-deferred-backlog-plan.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ on `canonicalize_lookup_path`) can ride along with TASK-053.
4242
**Milestone:** M5 - Routing, Lifecycle, Builder & Features
4343
**Component:** `webserver_impl` dispatch
4444
**Estimate:** L
45+
**Status:** Done
4546

4647
**Goal:**
4748
Make TASK-027's 3-tier route table (`exact_routes_`, radix tree, regex
@@ -52,24 +53,46 @@ the v1 vector. The architectural goal of TASK-027 (O(1) exact lookup +
5253
LRU cache + radix scan) is not realised end-to-end.
5354

5455
**Action Items:**
55-
- [ ] Locate the v1 lookup site (`webserver_impl::find_route_for_request`
56-
or equivalent in `src/detail/webserver_dispatch.cpp`) and add a feature
57-
flag (`use_lookup_v2_`, default `true`) that selects `lookup_v2` over
58-
the legacy walk.
59-
- [ ] Wire the `lookup_result` shape (tier_hit, captured_params) into the
60-
existing dispatch contract so the call site doesn't need a parallel
61-
`route_entry*` path.
62-
- [ ] Remove the v1 fallback walk once `make check` and
63-
`routing_regression_test` pass under the v2 path.
64-
- [ ] Delete the legacy linear `route_table_v1_` field when no caller
65-
remains. (May require a follow-up grep sweep of `webserver_register.cpp`
66-
/ `webserver_routes.cpp`.)
67-
- [ ] Run `test/bench_hook_overhead.cpp` and a new
68-
`test/bench_route_lookup.cpp` to confirm the cache-hit path is in the
69-
expected 100ns ballpark and the radix tier is in the µs range.
70-
- [ ] Drop the "TODO(Cycle K): rename route_cache_v2 → route_lru_cache"
71-
comment in `webserver_impl.hpp:202` and do the rename now that v1 is
72-
gone.
56+
- [x] Locate the v1 lookup site (`webserver_impl::resolve_resource_for_request`)
57+
and add the safety net first: a unit-level contract test
58+
(`test/unit/v2_dispatch_contract_test.cpp`) pinning the
59+
end-to-end (method, path) → entry shape against `lookup_v2`
60+
parity so step-2 cutover cannot regress silently. Committed
61+
as TASK-053 step 1.
62+
- [x] Wire the `lookup_result` shape (tier_hit, captured_params) into
63+
the dispatch contract: `resolve_resource_for_request` now
64+
consults `lookup_v2()` directly behind the same `bool found,
65+
route_entry entry` shape the v1 path expected, gated by the
66+
`use_lookup_v2_` flag (default `true`). Committed as TASK-053
67+
step 2.
68+
- [x] Remove the v1 fallback walk and rename `route_cache_v2`
69+
`route_lru_cache` in one commit so the dispatch path has a
70+
single, named cache field. The four v1 lookup helpers
71+
(`lookup_route_cache`, `scan_regex_routes`, `store_route_cache`,
72+
`apply_extracted_params`) are deleted; the v1 registration
73+
maps (`registered_resources*`) survive only as registration-
74+
time bookkeeping for `prepare_or_create_lambda_shim` and the
75+
WebSocket path, flagged in comments and the architecture doc
76+
as non-dispatch state with their removal as its own follow-
77+
up. Committed as TASK-053 step 3.
78+
- [x] Flip basic-suite integration tests whose v1 expectations no
79+
longer match v2 semantics (`overlapping_endpoints`,
80+
`regex_matching_arg_custom`, `regex_url_exact_match`) and
81+
point them at `test/REGRESSION.md` §3/§4 plus the pinned
82+
unit-level routing_regression tests. Committed as TASK-053
83+
step 4.
84+
- [x] Add `test/bench_route_lookup.cpp`: pins cache-hit median ≤ 200
85+
ns and 8-segment radix tier median ≤ 5 µs via
86+
`webserver_test_access::impl(...)->lookup_v2(...)` (no MHD
87+
daemon). Wired into `make bench` via `bench_targets`, NOT
88+
`make check`. Sanitizer builds skip with exit 0. Committed
89+
as TASK-053 step 5.
90+
- [x] The "TODO(Cycle K): rename route_cache_v2 → route_lru_cache"
91+
comment was removed when the rename landed in step 3; the
92+
field is now `route_lru_cache` and the only surviving
93+
`route_cache_v2` token in the headers is the historical
94+
pointer comment ("Renamed from route_cache_v2 in TASK-053
95+
step 3...") on the field declaration.
7396

7497
**Dependencies:**
7598
- Blocked by: TASK-027 (Done), TASK-028 (Done)

0 commit comments

Comments
 (0)