Double dispatch on forgejo issues.labeled — yaml forgejo-issues.labeled and sqlite triage-approved-to-kanban both fire the ingress wrapper #39
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#39
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?
Summary
Two automation-registry triggers match the same event (forgejo / issues.labeled) and both dispatch
forgejo-kanban-ingress-wrapper.shper label event. The idempotency key prevents duplicate kanban cards, but every triage-approved labeled event still burns 2 worker runs (recorded as separate daemon runs, e.g. 45beaf6b + 87fe1fa3 at 22:53:50 on 2026-08-21).Pre-existing — documented pitfall, not a regression from the #29 fix.
Reproduction
ssh unstable "python3 -c \"import sqlite3; db = sqlite3.connect('/home/b/.hermes/org-subscriber-automation.db'); [print(r) for r in db.execute(\"\\\"SELECT name, event_type, script, active, origin, match_conditions FROM automation_triggers WHERE event_type='issues.labeled'\"\\\")]\""→forgejo-issues.labeled| issues.labeled | forgejo-kanban-ingress-wrapper.sh | active=1 | origin=yaml | match_conditions=NULLtriage-approved-to-kanban| issues.labeled | forgejo-kanban-ingress-wrapper.sh | active=1 | origin=sqlite | match_conditions={"payload.label.name": "triage-approved"}triage-approvedlabel to any issue → both triggers match → both dispatch the wrapper.Actual behavior
Expected behavior
forgejo-issues.labeledtrigger (sqlite one already carries the triage-approved match_condition and the wrapper itself is idempotent), or (b) add the same match_condition to the yaml trigger and drop the sqlite duplicate. Keep exactly one.Kanban origin: card t_99b7d377 (post-deploy probe of Mark/org_mode#29).
Pre-dispatch gate BLOCKED the kilo-gsd.py launcher for this issue — the Mark/org_mode worktree at /home/b/Projects/org_mode has uncommitted changes outside .gsd/.venv/ (M AGENTS.md, M docs/kanban-design.md).
Diagnosis:
git stash listshowsstash@{0}: preserve unrelated documentation changes for pre-dispatch gate— operator-intentional state held aside to dodge pre-dispatch.docs/kanban-design.mdoverlaps with stash@{0} content (kanban-design.md is in both).AGENTS.mdcarries the substrate-authority block from the #37 kilo-gsd commit with follow-on edits.in-progresslabel on this issue — only the worktree dirt is blocking.Resolution options for the operator:
git stash pop stash@{0}and resolve the conflicts (commit the doc changes if they belong, or discard if they do not).git stashthe worktree dirt to rejoin it with stash@{0}, then drop both.git checkout -- AGENTS.md docs/kanban-design.mdto discard the worktree changes (keeps stash@{0} intact).Once the worktree is clean, re-dispatch the kilo-gsd card and the gate will pass. The launcher profile will not run
git reset/git clean/git stashitself; substrate authority over git state belongs to the operator.Verification — fix is in effect on
unstable.tail018ac4.ts.net.The bug (double-dispatch of
forgejo-kanban-ingress-wrapper.shonissues.labeled) was an operator-action / config-state fix, not a code commit — the fix lives in the org-subscriber-daemon's automation registry on theunstablehost (/home/b/.hermes/org-subscriber-automation.db), not in this repo's git history.git log origin/main --grep='#39'returns no commit referencing #39 (as expected).Verified state on
unstable(queried via ssh, 2026-09-18):Exactly one active trigger (
triage-approved-to-kanban) dispatches the wrapper, with the correctmatch_conditionsnarrowing.Pre-fix vs post-fix double-dispatch signature in
org-subscriber-ledger.db:Test event from the original fix (2026-09-15T16:12:55 UTC) confirmed: run
ef862d37-63d5-4e75-8654-380156f5b518exists in the ledger, created kanban cardt_6c8000a0exactly once via idempotency key.Verdict: this fix is operator-action and verifier is leaving the issue open per the verify task's operator-action branch (
Close the Forgejo issue only after operator confirms deployment (or leave open + comment)). Operator: confirm whether to close this issue — the deactivation has held since 2026-09-15 16:13 UTC with no regression.— verifier card t_72d1bccd
kilo-gsd-launcher pre-dispatch blocked on dirty worktree (unrelated to #39).
bash /home/b/Projects/org_mode/.gsd/gates/pre-dispatch.sh 39exits 1 with three untracked operator drafts that predate this issue by 10+ days:None of these are related to the double-dispatch bug — they are operator-authored drafts that landed in the working tree but never got committed. Substrate-fix fork: sibling fixit card t_7758d138 (kilo-gsd-runner) carries the recipe (commit OR move to
.gsd/scratch/ORrm). Once it lands, the #39 dispatch will auto-promote via parent linkage.Re-launching the runner today would just hit the same gate failure. Tracking: t_cea132d5 (parent), t_7758d138 (cleanup child).