Appearance
Handoff: SVC-004-profile-backfill-cutover-hardening profile-service backfill and cutover hardening
Scope
- Service/area:
profile-service - Task pack:
docs/agents/service-tasks/profile-service.md - Goal: accept the bounded profile ownership and cutover-hardening evidence while keeping default profile route promotion gated.
- Non-goals: default
/api/auth/me*or admin KYC route promotion, populated production target backfill approval, IAM session/role ownership, credential/token handling, broaduser-servicework, or changes to legacy source under/Users/velikho/Desktop/WORKING/HOCTAPAZ/.
Docs Read
go-platform/docs/architecture/service-responsibility-matrix.mdgo-platform/docs/agents/service-agent-execution-queue.jsongo-platform/docs/agents/service-agent-closeout-ledger.jsongo-platform/docs/agents/service-tasks/profile-service.mdgo-platform/docs/agents/agent-handoff-format.mdgo-platform/docs/api/profile-service.mdgo-platform/docs/qa/profile-route-live-smoke.mdgo-platform/docs/qa/profile-route-browser-smoke.mdgo-platform/services/profile-service/README.md
Legacy Evidence Read
/Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/src/modules/auth/auth.controller.ts/Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/src/modules/auth/auth.service.ts/Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/api/prisma/schema.prisma/Users/velikho/Desktop/WORKING/HOCTAPAZ/node-platform/apps/web/components/account/profile-settings-client.tsx- Legacy source was read-only evidence only; no legacy files were changed.
Files Changed
go-platform/docs/agents/handoffs/SVC-004-profile-backfill-cutover-hardening.mdgo-platform/docs/agents/service-agent-closeout-ledger.jsongo-platform/docs/agents/service-agent-closeout-ledger.md
Behavior Implemented
- none in this handoff.
- Existing audited profile-service implementation owns base profile, public profile, contacts, student/teacher/parent/staff profile rows, teacher KYC self-service/admin review, parent-child read models, parent recipient resolution, profile owner summary, profile mutation events, audit projection, and UUID shadow/backfill migration foundations.
- Existing tests cover safe public redaction, projection/access-control field rejection, KYC CCCD hashing/redaction, admin KYC review behavior, parent-recipient internal token guards, profile owner summary, audit event context/redaction/projection, OpenAPI mirror checks, and repository migrations.
- Existing docs and route guards keep credentials, sessions, JWT, roles, permissions, and authorization decisions in
iam-service; profile role/status/staff scope fields are projection/display metadata only.
Tests And Verification
- Command:
GOTOOLCHAIN=go1.25.11 go test ./services/profile-service/... -count=1 - Result: passed.
- Evidence: profile-service command, audit sink, HTTP, repository, and usecase packages passed.
- Command:
make test-profile-routes test-profile-kyc-routes test-profile-admin-kyc-routes - Result: passed.
- Evidence: default profile routes stayed legacy; non-default profile, teacher KYC, and admin KYC route examples passed route coverage; profile live/browser smoke scripts passed self-test mode.
- Command:
ruby -e 'require "yaml"; ARGV.each { |path| YAML.load_file(path); puts "ok #{path}" }' services/profile-service/api/openapi.yaml contracts/openapi/services/profile-service.yaml && diff -u services/profile-service/api/openapi.yaml contracts/openapi/services/profile-service.yaml - Result: passed.
- Evidence: Profile service OpenAPI and mirrored contract parsed and matched exactly.
Route State
- Legacy route:
deploy/gateway/routes.jsonremains the default rollback table and keeps broad/api/authand/api/adminprofile/KYC compatibility routes on legacy paths. - Native route:
deploy/gateway/routes.profile-native-example.json,routes.profile-kyc-native-example.json, androutes.profile-admin-kyc-native-example.jsonremain non-default rehearsals only. - Gateway state: this handoff accepts profile service-side and non-default route guard evidence only; it does not promote default public profile or KYC routes.
- Rollback: keep
deploy/gateway/routes.jsonactive. If a non-default profile route table is used for rehearsal, switchGATEWAY_ROUTE_TABLEback todeploy/gateway/routes.jsonto roll back to legacy.
Data Notes
- Tables touched: none in this handoff run.
- Migration run: none against a live database in this handoff.
- Validation report: not applicable because no live data was migrated or backfilled.
- Existing service migrations include Profile UUID shadow, FK validation, and primary-key promotion scaffolding; populated-target validation remains gated by the IAM/Profile cutover task packs.
Risks / Blockers
- This is
closeout-accepted-cutover-gated-not-complete, not completion of the full IAM/Profile cutover. - Optional Postgres integration commands requiring
PROFILE_SERVICE_POSTGRES_TEST_DATABASE_URLwere not run in this handoff because no DSN was configured for this turn. - Fresh real gateway/browser runs were not rerun in this handoff; current docs retain latest local artifacts from 2026-07-09.
- Default route promotion still requires populated target proof, candidate diff/review, browser proof, rollback proof, and coordination with
iam-service.
Next Step
- Audit
RET-USERso the deprecateduser-servicescaffold stays quarantined and no new identity/profile work is routed there.