Daemon double-dispatches event workers (YAML events block + seeded registry trigger both fire) #24
Labels
No labels
blocked:needs-decision
bug
chore
cron
design
in-progress
infra
milestone
module-o
needs-decompose
needs-research
ops-task
pm
quickfix
security/medium
triage-approved
vikunja
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/org_mode#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Every Vikunja webhook event fires the dispatched worker twice. Ledger on unstable shows paired runs at identical timestamps (verified 2026-08-19, e.g. runs 9d526db3/e0833fa5 at 2026-08-19T15:28:05 both executing vikunja-webhook-to-kanban.sh for the same event).
Root cause
The vikunja endpoint in daemon.unstable.yaml has an "events:" block (task.created/updated/deleted/completed → vikunja-webhook-to-kanban.sh). Two dispatch paths fire for each event:
Idempotency-key on card creation prevents duplicate kanban cards, but every event burns two worker processes and writes two ledger rows. Same pattern likely affects the forgejo endpoint's events mappings too.
Fix direction
Pick one path explicitly (documented in org-subscriber-daemon skill, double-dispatch pitfall): either the YAML events block dispatches and the seed skips scripts already covered by a YAML action-chain mapping, or the events block is removed and only the registry trigger fires. Seed-skip is preferred — keeps YAML as the static default while the registry stays free for runtime-managed triggers.
Evidence