STABLE_BASELINE_S1 - West Coast Pest Attendance + Lunch

Date: 2026-04-30

Confirmed working:
- Staff login
- Clock in
- Clock out
- Multiple sessions per day
- Outside-radius clock-in allowed and stored as OUTSIDE_RADIUS
- Outside-radius clock-out allowed and stored as OUTSIDE_RADIUS
- Working lunch start
- Working lunch end
- Actual lunch minutes stored in work_session_breaks
- company_id corrected and stable as company_id = 1 for current test records
- Sessions page reads staff ID and staff name
- Sessions page shows in/out status

Known important database truth:
- work_sessions is the main attendance table
- open session = session_status = 'OPEN' AND clock_out_time IS NULL
- lunch source of truth = work_session_breaks.deducted_minutes
- staff reports must always include staff_id and staff_name

Important fixed bugs:
- company_id = 0 caused open-session lookup failure
- SHOW TABLES LIKE ? failed on this MariaDB/PDO setup
- clock-in.php SQL insert quoting issue caused 500
- debug frontend temporarily removed click handlers; restored in U1

Do not restart from theory after this baseline.
Next work should start from this stable attendance/lunch baseline.
