Skip to main content

SERVICE_READINESS — staff-service

Sibling: SERVICE_OVERVIEW · TESTING_STRATEGY · OBSERVABILITY · SECURITY_MODEL

Standard: docs/standards/DEFINITION_OF_DONE

A go/no-go checklist for promoting staff-service to production. Each row has a status (✅ ready / 🟡 in-progress / ❌ blocked / N/A), an owner, and a verification artifact. The service is not considered production-ready until every required (R) row is ✅.


1. Functional Readiness (R)

ItemStatusVerification
All 18 documents present and reviewedThis bundle
All Staff, Shift, ClockEntry, LeaveRequest use cases shippedservices/staff-service/src/application/use-cases/*
All published events emitted via outboxEVENT_SCHEMAS.md; integration test outbox.spec.ts
All consumed events handled with inbox dedupe + DLQinbox.spec.ts, dlq.spec.ts
OpenAPI complete and matches handlersopenapi-schema-vs-router.spec.ts
BFF contract tests greenPact broker staff-service ↔ bff-backoffice
Multi-language (ps, fa, en, ar) labels validatedlocalized-label.spec.ts

2. Data & Storage (R)

ItemStatusVerification
Schema staff deployed with all tablesFlyway V001..V032
Row-Level Security enforced on every multi-tenant tablerls-isolation.spec.ts (cross-tenant sweep)
Append-only triggers on clock_entries, handoff_notes, audit_eventsappend-only-trigger.spec.ts
Indexes for hot paths created and analyzedpg_stat_user_indexes review
Cloud SQL HA + PITR enabled (prod)Terraform module.staff_db.ha_enabled = true
CMEK on all storage layersKMS keyring staff-prod-me
BigQuery cold copy + retention 7 y for auditDatastream config
Backup restore drill executed🟡Quarterly drill — last run pending

3. Security (R)

ItemStatusVerification
RBAC matrix implementedrbac.spec.ts
ABAC overlays (property + department) enforcedabac-property.spec.ts
PIN HMAC + KMS pepper rotation testedpin-pepper-rotation.spec.ts
Field-level encryption (emergency_contact) verifiedfield-level-crypto.spec.ts
PIN brute-force lockout activeManual + pin-brute-force.spec.ts
DSAR export job operational; benchmarked < 24 h SLAdsar-export-benchmark.spec.ts
Threat model reviewedSECURITY_MODEL §10; security review sign-off
Penetration test passed (no Critical / High open)Q3-26 pentest report pen-2026-q3-staff.pdf
Secrets only in Secret Manager (no env-baked secrets)CI no-baked-secrets.spec.ts

4. Observability (R)

ItemStatusVerification
All SLIs reported to Cloud MonitoringOBSERVABILITY §3
Dashboards published (staff/overview, clock-in, outbox, inbox, leave, ai)Cloud Monitoring console
Pager-grade alerts wired with PagerDutyOBSERVABILITY §6.1
Runbooks for every pager-grade alertrunbooks/staff/*.md listed in FAILURE_MODES.md
Tracing with OpenTelemetry; traces visible in Cloud TraceSampled trace from staging
JSON-structured PII-clean logslog-pii-leak.spec.ts
Audit log includes all PII reads + AI views + manager overridesaudit-coverage.spec.ts

5. Reliability & Performance (R)

ItemStatusVerification
SLOs defined and approvedOBSERVABILITY §1
Load test at 2× peak (1000 punches/min, 50 concurrent shift gens)loadtest/staff-baseline.k6.js results
Cold-start p95 < 2 s after min_instances=2 setCloud Run metrics
Graceful shutdown verified (10 s drain)graceful-shutdown.spec.ts
Circuit breakers on outbound calls (IAM, property, AI)circuit-breaker.spec.ts
Idempotency-Key store implemented + 24 h TTLidempotency.spec.ts

6. Sync & Offline (R for Electron release)

ItemStatusVerification
Sync pull/push contracts implementedSYNC_CONTRACT §4
Conflict policies validated for every replicated aggregatesync-conflict.spec.ts
Offline punch with PIN works at front deskE2E electron-offline-punch.spec.ts
Multi-device punch collision auto-outmulti-device-punch.spec.ts
Late-replay punch flagginglate-replay.spec.ts
Compliance gates (terminated staff blocked from sync) verifiedsync-compliance.spec.ts

ItemStatusVerification
All AI surfaces are advisory (no auto-apply)AI_INTEGRATION §2
Audit row written on every AI suggestion view + actionaudit-ai-coverage.spec.ts
Tenant opt-out toggle respectedai-opt-out.spec.ts
Edge anomaly model FPR baselined < 8 %🟡First model trained on 90 d data; baseline pending pilot
Bias audit completed quarterly🟡Scheduled Q1-27

8. Compliance (R for tenants under data-residency mandates)

ItemStatusVerification
GDPR DSAR (export + erase) under 30 daysdsar-export-benchmark.spec.ts
Data residency: me tenants stay in me-central1Per-tenant Cloud SQL + KMS keyring
Right-to-erasure with audit retention exception documentedSECURITY_MODEL §11
Audit retention 7 y in BigQueryDatastream + table TTL
Manager-override punch policy reviewed by LegalApproval ticket LEG-441
Multilingual UI for staff (4 languages)i18n.spec.ts

9. Operational

ItemStatusVerification
On-call rotation defined (PagerDuty schedule staff-svc-oncall)PagerDuty
Runbook drills (3 of 16 failure modes drilled in staging)🟡Schedule completion of remaining drills
Postmortem template and storage path agreedrunbooks/staff/postmortems/
Deploy pipeline 10 % → 50 % → 100 % traffic shift validatedCloud Deploy delivery pipeline
Rollback drill executedStaging drill 2026-04-08
Migration forward-only documentedDEPLOYMENT_TOPOLOGY §8

10. Documentation

ItemStatusVerification
Catalog entry docs/03-microservices/staff-service.mdIndexed in SERVICE_INDEX.md
All 17 service-level docs cross-linkedThis bundle
Onboarding doc covers < 5 min "hello world"LOCAL_DEV_SETUP.md
Risk register reviewed quarterlySERVICE_RISK_REGISTER.md
Migration plan from MVP → M2 documentedMIGRATION_PLAN.md

11. Sign-off

RoleName placeholderDateDecision
Service tech leadTBDTBD
Platform architectTBDTBD
Security architectTBDTBD
SRE on-call leadTBDTBD
Product ownerTBDTBD

The service is GA when all required rows above are ✅ and all five sign-offs are recorded with a date stamp. Open 🟡 / ❌ items must move to ✅, be re-scoped, or be explicitly waived in the risk register.


12. Quarterly Re-Certification

SERVICE_READINESS.md is re-walked every quarter. Any item flipping from ✅ → 🟡 / ❌ triggers an incident-style review and a remediation milestone.