Document mode:single -> parallel fix on the HA automation
All checks were successful
Deploy / deploy (push) Successful in 23s
All checks were successful
Deploy / deploy (push) Successful in 23s
The fix itself lives entirely in HA config (automation.lunch_menu_family_calendar), not in this repo, so there's nothing to redeploy here -- this just records what broke and why, for the next time someone (human or Claude) is debugging why calendar events aren't showing up. Root cause: mode: single (HA's default) let only one webhook-triggered run execute at a time; a week push fires 5 POSTs back-to-back, so 4 of 5 got rejected as failed_single and only one day's event was ever created. Switched to mode: parallel and verified all 5 days land correctly now. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KsJqAZ82Veyf5oihBr71S5
This commit is contained in:
parent
1c31ec780b
commit
7d2d38c848
1 changed files with 13 additions and 1 deletions
14
CLAUDE.md
14
CLAUDE.md
|
|
@ -55,7 +55,19 @@ commits), they describe the pre-2026-09-03 app, not the current one.
|
||||||
`delete_event` — a bad push can't be cleaned up via the HA API, only
|
`delete_event` — a bad push can't be cleaned up via the HA API, only
|
||||||
manually in Google Calendar. No duplicate-prevention: re-pushing the
|
manually in Google Calendar. No duplicate-prevention: re-pushing the
|
||||||
same date's menu creates a second event — this is why the default
|
same date's menu creates a second event — this is why the default
|
||||||
schedule is a single day/week, not daily (see below). The webhook id is
|
schedule is a single day/week, not daily (see below).
|
||||||
|
**`mode: parallel`, not the default `single` (fixed 2026-09-03 after a
|
||||||
|
real bug):** a week push fires one webhook POST per school day
|
||||||
|
back-to-back with no delay. Under `mode: single`, HA rejects any
|
||||||
|
webhook trigger that arrives while a previous run is still executing
|
||||||
|
(`calendar.create_event` itself takes ~600-700ms) — 4 of every 5 days
|
||||||
|
were silently dropped as `failed_single`, so only one day's event ever
|
||||||
|
actually got created per week push. Found via `ha_get_automation_traces`
|
||||||
|
after the user reported a manual test push not showing up on the
|
||||||
|
calendar. Each invocation is independent (one `calendar.create_event`
|
||||||
|
call, no shared state), so `parallel` is the correct mode per HA's own
|
||||||
|
guidance ("independent per-entity actions → parallel"), not just a
|
||||||
|
workaround. The webhook id is
|
||||||
a random token that lives only in the server's `.env` (`HA_WEBHOOK_URL`)
|
a random token that lives only in the server's `.env` (`HA_WEBHOOK_URL`)
|
||||||
and in the automation's trigger config — never committed here. If the
|
and in the automation's trigger config — never committed here. If the
|
||||||
calendar push stops working, check both ends: `GET /api/integrations`
|
calendar push stops working, check both ends: `GET /api/integrations`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue