Skip to content

Attendance department-scoped digests and list (1.6.0) — Production Readiness Audit ​

FieldValue
Date2026-10-03
StatusGo for production (migrate catalog bump + smoke department manager scope)
ScopeDepartment-scoped attendance digests, list, KPIs, create/update; catalog attendance 1.5.0 → 1.6.0
CompanionAttendance deployment · CHANGELOG

Executive summary ​

Attendance visibility and daily digests no longer treat every Spatie manager as org-wide. Owners / Admins remain company-wide. Users assigned as departments.manager_id see and receive digests only for employees in their managed departments (department_employee ∪ employees linked via department_user, plus their own linked employee). Spatie manager without a department assignment is self-scoped and does not receive digests.

Go / No-Go: Go after migrate 2026_10_03_003500 and staging smoke with two department managers.

GateResult
Platform freezePass
Migrate-only catalog 1.6.0Pass
Policy/list/stats/CRUD/delete scopedPass
Digests per-recipient scoped (claim after payload)Pass
Analytics People attendance uses visibleEmployeeIdsPass
Pest attendance + analytics department scopePass (local PHP 8.5)
Settings copy + Docs/CHANGELOGPass
Breaking: Spatie manager alone loses org-wide attendanceAccepted (documented)

Audit findings (resolved) ​

SeverityFindingResolution
HighSpatie manager org-wide breakIntentional; ops: assign dept manager or Admin
MediumOwn linked employee omitted from listmanagedTeamEmployeeIds unions own employee
Mediumdelete/restore/forceDelete unscopedPolicy now requires canAccessEmployee
MediumDigest recipient N+1 isDepartmentManagerPrefetch active manager_ids
MediumUpdate request no employee gateUpdateAttendanceRecordRequest uses canAccessEmployee
MediumAnalytics rule still said canManageOthers.ai/rules/tenant.md updated
High (coverage)Missing dept-user / analytics / cross-dept testsAdded and green
LowYesterday user-guide wordingAligned with late-report recipient rules

Deploy checklist ​

  1. Deploy Backend + Frontend + Docs from feature/attendance-department-scoped-reports.
  2. Migrate: php artisan migrate --force through 2026_10_03_003500 (attendance → 1.6.0).
  3. Confirm attendance:send-daily-reports schedule + emails queue workers.
  4. Smoke:
    • Two departments, each with a manager and late employees → manager A only sees/receives A; Owner sees all
    • Spatie manager without manager_id → self list only; no digest
    • Department manager with department_user membership (linked employee) included in scope
  5. Pest: AttendanceDailyReportDigestTest, AttendanceTest department cases, people analytics department scope, AttendanceModuleVersion160BumpTest.

Residual risk ​

RiskNotes
Orgs relying on role-only managers for company attendanceMust assign Admin or department manager_id
Empty-team department managersDigests skip when scoped payload empty; list may show only self

Sign-off ​

RoleStatus
EngineeringGo
Staging smoke (two dept managers)Recommended before wide rollout

Official documentation for the EloSync SaaS Platform.