feat(sf-b2): GET /users/me/recent-parcels — stub endpoint (auth TODO) #329
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#329
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/sf-b2-recent-stub"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
SF Wave 1 / Group B / sub-task B2 из SiteFinder Backend Migration Plan May17. Stub endpoint для recent parcels — real impl после NextAuth (Wave 3).
Files
backend/app/api/v1/users.py— NEW router сGET /users/me/recent-parcelsstubbackend/app/main.py—app.include_router(users.router, prefix="/api/v1", tags=["users"])Response shape
Validation:
?limit∈ [1, 50], иначе HTTP 422.Part of plan
Vault
code/patterns/SiteFinder_Backend_Migration_Plan_May17.md§B2. Real implementation будет читатьparcel_analysis_historytable после NextAuth wired.Deep Code Review — verdict APPROVE
Summary
backend/app/api/v1/users.pyNEW,backend/app/main.pyMODIFIED)Checks
backend/app/api/v1/*.pystyle (module-levelrouter = APIRouter(),logger = logging.getLogger(__name__))Annotated[int, Query(ge=1, le=50)] = 10— корректная Pydantic v2 validation, HTTP 422 для out-of-range/users/me/recent-parcelsподprefix="/api/v1"=/api/v1/users/me/recent-parcels. Grep поbackend/— collisions нет (никаких других/usersилиme/recent-parcelsмаршрутов не существует). Префиксы остальных routers (/api/v1/parcels,/api/v1/concepts, etc.) не пересекаются.import psycopg2, noprint(), norequests— backend conventions OKfrom __future__ import annotations+ type hints presentstub: true, real_impl_after: "NextAuth"— явный маркер для frontend, не спутают с пустым реальным результатомCross-file impact
frontend/openapi.jsonпосле next codegen — non-blocking follow-upparcel_analysis_history— response shapeitems[]уже совпадает с предполагаемой контрактной формойNits (не блокирующее, не требует fix)
-> dictможно сделать строгим Pydantic-моделью когда придёт real impl (сейчас OK для stub)tags=["users"]вinclude_router— единственный с этим тегом, нормально для нового доменаVerdict rationale
Минимальный, корректный stub. Pattern consistent с
trade_in.py(тоже mock с TODO для real impl). Низкий blast radius — новый изолированный endpoint, ничего не ломает.Merging.