Skip to content

user-service Retirement Task

Agent workflow: follow README.md for Audit -> Investigate -> Code -> Test -> Fix; keep this pack's writable scope and verification commands authoritative.

Dispatch type: orchestrator

Dispatch ID: RET-USER

Owner: orchestrator with profile-service and iam-service owners.

Current implementation: services/user-service is a deprecated compatibility scaffold. It must not receive new canonical identity or profile work.

Goal:

Retire or quarantine the old user-service profile foundation after native iam-service and profile-service coverage proves replacement parity.

Legacy source evidence:

  • /Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/src/modules/auth/**
  • /Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/prisma/schema.prisma
  • Existing compatibility scaffold under services/user-service/**.

Writable files:

  • services/user-service/** only for deprecation guards, tests, or removal after orchestrator approval.
  • docs/agents/service-tasks/user-service-retirement.md

Orchestrator-owned files:

  • Gateway route tables, Compose/Helm/K8s service lists, migrator service lists, OpenAPI indexes, and any final delete/move operation.

Tasks:

  • Keep new identity work in iam-service and new profile work in profile-service.
  • Completed runtime quarantine guard: all services/user-service responses now emit Deprecation: true, X-Hoctapaz-Service-Status: deprecated-compatibility, X-Hoctapaz-Canonical-Identity-Service: iam-service, and X-Hoctapaz-Canonical-Profile-Service: profile-service. GET /v1 returns the same deprecated status marker, and HTTP coverage keeps the headers on both successful and not-found compatibility responses.
  • Add deprecation guards or docs when a workflow still references services/user-service.
  • Remove user-service from runtime manifests only after route/backfill parity and rollback notes exist.
  • Do not create a broad replacement user-service.

Retirement readiness checklist:

  • Attach the accepted IAM/Profile default proof artifact path.
  • Attach the offline review pass for make test-iam-profile-default-cutover-review-artifact.
  • Inventory every live user-service route and record its replacement or compatibility reason.
  • Record the runtime manifest removal plan for Compose, K8s, Helm, and service readiness guards.
  • Record the rollback plan for gateway routes, runtime manifests, migrations, and compatibility headers.
  • Treat RET-USER-retirement-readiness-proof as readiness audit only unless all prerequisites above are attached.

Acceptance:

  • Every live user-service route has either a replacement in profile-service or an explicit compatibility reason.
  • No task pack routes new work into services/user-service.
  • Runtime removal has gateway, migration, and rollback evidence.

Verification:

  • GOTOOLCHAIN=go1.25.11 go test ./services/user-service/...
  • GOTOOLCHAIN=go1.25.11 go test ./services/profile-service/... ./services/iam-service/...
  • make test-profile-routes test-auth-routes

Go-platform documentation is generated from repository Markdown.