Repository navigation
Commit de4a88f
fix(routes): register FastAPI and Starlette WebSocket decorators
Distilled from #1245 by Andrew Hundt (a slice of 1ac3c13).
The route-registration suffix table knew .add_api_websocket_route but
not the decorator forms FastAPI and Starlette actually use:
@router.websocket("/ws")
@app.websocket_route("/events")
so a WebSocket endpoint produced no Route node on either resolver path
and was invisible to the graph. Two entries join the table, both
recorded as ANY like the existing WebSocket entry -- a socket upgrade is
not an HTTP verb. Both are needed: matching is a pure suffix compare and
.route does not match ...websocket_route, whose tail is _route.
Upstream also changed pass_calls.c, pass_parallel.c and
pipeline_internal.h. None of that is taken: main already carries the #952
sequential unresolved-callee route fallback its July base lacked, so the
table entries are the only missing piece.
RED before the fix, each form recorded on its own (the harness stops at
the first failing assert, so the two were swapped and re-run):
pipeline_python_websocket_decorators_register_routes
FAIL tests/test_pipeline.c:6163:
count_nodes_named(s, project, "/ws") (0) not >= 1 (1)
FAIL tests/test_pipeline.c:6163:
count_nodes_named(s, project, "/events") (0) not >= 1 (1)
The @app.get("/health") control above those lines passed before and
after.
GREEN after: pipeline 282 passed; pipeline parallel extraction
edge_types_probe route_canon infrascan 779 passed, 0 failed.
The test drives the sequential resolver (one file). The parallel
resolver reads the same table through cbm_service_pattern_route_method
and its suite is green; a CBM_WORKERS=4 twin of this test is a small
follow-up.
Co-authored-by: Andrew Hundt <ATHundt@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 92abefa commit de4a88f
2 files changed
Lines changed: 56 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
517 | 522 | | |
518 | 523 | | |
519 | 524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6119 | 6119 | | |
6120 | 6120 | | |
6121 | 6121 | | |
| 6122 | + | |
| 6123 | + | |
| 6124 | + | |
| 6125 | + | |
| 6126 | + | |
| 6127 | + | |
| 6128 | + | |
| 6129 | + | |
| 6130 | + | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
| 6135 | + | |
| 6136 | + | |
| 6137 | + | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
| 6141 | + | |
| 6142 | + | |
| 6143 | + | |
| 6144 | + | |
| 6145 | + | |
| 6146 | + | |
| 6147 | + | |
| 6148 | + | |
| 6149 | + | |
| 6150 | + | |
| 6151 | + | |
| 6152 | + | |
| 6153 | + | |
| 6154 | + | |
| 6155 | + | |
| 6156 | + | |
| 6157 | + | |
| 6158 | + | |
| 6159 | + | |
| 6160 | + | |
| 6161 | + | |
| 6162 | + | |
| 6163 | + | |
| 6164 | + | |
| 6165 | + | |
| 6166 | + | |
| 6167 | + | |
| 6168 | + | |
| 6169 | + | |
| 6170 | + | |
| 6171 | + | |
6122 | 6172 | | |
6123 | 6173 | | |
6124 | 6174 | | |
| |||
14846 | 14896 | | |
14847 | 14897 | | |
14848 | 14898 | | |
| 14899 | + | |
14849 | 14900 | | |
14850 | 14901 | | |
14851 | 14902 | | |
| |||
0 commit comments