fix: Forgejo Actions event semantics so label-driven dispatch fires #14
No reviewers
Labels
No labels
agent
coordinate
agent
dev
agent
plan
agent
reflect
agent
test
agent
triage
ai/off
blocked
night
blocked
usage
loop
1
loop
2
loop
3
needs/approval
needs/human
needs/input
needs/review
plan/approved
run/night
state
blocked
state
building
state
passed
state
planning
state
testing
tier
fable
tier
haiku
tier
local
tier
opus
tier
sonnet
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
valssi-public/agent-workflows!14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/forgejo-event-semantics"
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?
Why
First end-to-end test of the agent pipeline (throwaway Forgejo 15.0.5 + runner,
claudestubbed) showed the dispatch never fires — it was written with GitHub event semantics Forgejo does not share. Four issues, all reproduced on Forgejo 15.0.5 (same version as prod) and fixed + re-validated on the test instance (full loop ran:agent/plan → plan → plan/approved → dev + PR → test FAIL → loop/1 + agent/dev bounce → dev → test PASS → needs/review).Full write-up:
valssi/docs→plans/agent-orchestration-test-findings.md.Fixes (all in
dispatch.yaml)label_updated, notlabeled(remove islabel_cleared). Every route guard testedaction == 'labeled'⇒ nothing fired. Swapped 6 guards. (Bonus: removal fires the distinctlabel_cleared, so the ack-removal of a one-shotagent/*label does not re-trigger the route — safe.)github.event_name— insidedispatch.yamlit isworkflow_call, notissues/pull_request, so those guards were always false even after #1. Now key issue-vs-PR off payload shape:github.event.issue.number/github.event.pull_request.number. (.action,.label.name,.sender,.issue.*do propagate.)agent/testhand-off to the tester never fired (loop stalled atstate/testing). PR content events do fire (opened,pull_request_sync/ actionsynchronized— not GitHub'ssynchronize). Thetestroute now triggers on PR open/sync foragent/issue-*branches, andresolvecomputes the model for these label-less PR events (recovers the issue from the head ref).schedule/tickwas dead (same root as #2:event_nameisworkflow_call) ⇒ queue-drain + daily digest never ran. Added aworkflow_callinputevent_namethat the caller forwards, andtickkeys off it.Companion PR (caller)
The caller change lives in the template repo (single source of truth), not here:
valssi-public/templatePR — "fix: forward event_name from the canonical caller". It addswith: { event_name: ${{ github.event_name }} }. Merge this PR (#14) first so theevent_nameinput exists, then the template PR. Existing repos need the same one-line addition to their.forgejo/workflows/agent.yaml.Scope / safety
F_URLchanges.F_URLstaysgit.valssi.eu.event_name, the input defaults to""andticksimply stays off (current behaviour) — no other route depends on it.Not covered / untested
loop/3escalate-or-park, no-progress guard,blocked/*defer→tick resume (needs the caller edit),coordinate, andreflect(itsagent/reflectPR-label path is dead per #3; the merged-PR path is untested). All model runs used the stub.🤖 Generated with Claude Code