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
P0 — route identity and dependency propagation correctness.
Problem
Endpoint materialization discards the provenance that assembled a public route, and dependency analysis does not consistently preserve FastAPI dependency identity.
Editing include_router(..., prefix='/old') can change every public route without a changed handler seed.
Multiline route decorators, import retargets, re-exports, class bases, module globals, and __all__ changes were often missed.
An app-level Depends(app_dep) was visible as a short runtime dependency name, but changing its transitive helper produced no endpoint candidate and was orphaned.
Router/include-level dependencies, callable instances, dependency factories, partials, and duplicate short names cannot be represented safely by list[str].
Required design
Add immutable, side-qualified registration provenance to native endpoints:
route decorator or imperative registration occurrence;
include/mount edge chain and prefix expressions;
selected app/factory/bootstrap root;
app/router/include/route dependency expressions;
baseline/target side and endpoint lifecycle.
Add an AST change-to-owner pass for complete decorator/signature spans, assignment RHS spans, import bindings, exports, class bases/decorators, and route assembly edges. Store qualified callable dependency evidence; runtime mode should traverse FastAPI's recursive dependant graph.
Acceptance criteria
Prefix, mount, include, registration-order, factory-return, and bootstrap changes affect exactly their descendant endpoints.
App, router, include, route, Security, Annotated, nested, duplicate-name, override, factory, partial, and callable-instance dependencies have tests.
Priority
P0 — route identity and dependency propagation correctness.
Problem
Endpoint materialization discards the provenance that assembled a public route, and dependency analysis does not consistently preserve FastAPI dependency identity.
Evidence:
src/fastapi_endpoint_detector/parser/secure_ast_extractor.py:394-453,2391-2579src/fastapi_endpoint_detector/models/endpoint.py:135-226src/fastapi_endpoint_detector/parser/fastapi_extractor.py:169-208src/fastapi_endpoint_detector/analyzer/mypy_analyzer.py:719-797,799-963,1092-1108Reproduced failures:
include_router(..., prefix='/old')can change every public route without a changed handler seed.__all__changes were often missed.Depends(app_dep)was visible as a short runtime dependency name, but changing its transitive helper produced no endpoint candidate and was orphaned.list[str].Required design
Add immutable, side-qualified registration provenance to native endpoints:
Add an AST change-to-owner pass for complete decorator/signature spans, assignment RHS spans, import bindings, exports, class bases/decorators, and route assembly edges. Store qualified callable dependency evidence; runtime mode should traverse FastAPI's recursive
dependantgraph.Acceptance criteria
Security,Annotated, nested, duplicate-name, override, factory, partial, and callable-instance dependencies have tests.Related: #104, #107.