T4-W05 Attendance Identity Contract¶
Same attendance occurrence¶
Canonical identity:
op.attendance.sheet := unique(register_id, session_id, attendance_date) # SQL
operational lookup := (session_id, attendance_date) # soft find
op.attendance.line := unique(student_id, attendance_id, attendance_date) # SQL
For Core W05 per-lesson Product API:
- One sheet per
op.sessionper school-local attendance date. - One line per student per sheet.
- Multiple subject/session sheets on the same calendar day are allowed (different
session_id).
Duplicate / retry semantics¶
Faculty session-sheet/save and admin sheet/create are upserts:
- Existing sheet for session+date is reused.
- Existing line for student+sheet is
writen; otherwisecreate. - Rapid retry / double-click must not create a second canonical line (SQL unique + upsert).
Class change¶
Lines remain bound to the sheet’s session/batch at write time. Moving a student to another batch later does not auto-rewrite historical lines; new sessions use the new roster membership check.
Daily / smart / RFID¶
Out of this contract. Daily arrival-departure uses the same op.attendance.line model with attendance_scope=arrival_departure but is not W05 cert SSOT.