You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GitHub event-triggered automation configured for OpenHands/software-agent-sdk did not create any automation runs when a test PR was labeled with oh-cloud-review.
The GitHub label events were successfully emitted by GitHub, and local inspection of the automation service code indicates the automation trigger/filter should match a representative pull_request.labeled payload. However, the automation service shows zero runs, which suggests the event is not reaching the automation service or is being routed to a different OpenHands org before trigger matching.
If the first test happened before github/openhands was claimed, subsequent tests may continue to skip forwarding until the cache expires or is cleared.
4. GitHub App delivery/subscription issue
The GitHub App should be checked for a pull_request webhook delivery for PR #3205, action labeled, and whether /integration/github/events returned 200.
The GitHub App manifest in OpenHands-Cloud appears to subscribe to:
If github_manager.receive_message() raises, the route returns 400 and the background task may not execute. This seems less likely for a plain pull_request.labeled event, but logs should confirm.
Small implementation observation
last_triggered_at may not be updated for event-triggered automations.
Manual/cron dispatch uses create_pending_run(), which updates Automation.last_triggered_at.
Event dispatch uses create_automation_run() in:
openhands/automation/utils/webhook.py
That creates an AutomationRun, but does not update Automation.last_triggered_at.
So last_triggered_at: null alone is not proof of no event match. In this case, however, runs: [] confirms no run was created.
Suggested debugging steps
Could someone with production access check the following around the label timestamps for PR #3205?
[AutomationEventService] Forwarded github event to org ...
[AutomationEventService] github org OpenHands not claimed ...
[AutomationEventService] Automation service returned ...
Error processing GitHub event
Automation service logs for:
Received github event: key=pull_request.labeled
Event matched 1/... automations
Expected behavior
Adding oh-cloud-review to a PR in OpenHands/software-agent-sdk should create a pending automation run for the configured automation.
Actual behavior
No run was created:
{
"runs": [],
"total": 0
}
Impact
GitHub-event-triggered automations may silently fail for org-owned repositories if forwarding is not enabled/configured, org claims are missing/misrouted, or negative claim results are cached.
This issue was created by an AI agent (OpenHands) on behalf of the user.
Summary
A GitHub event-triggered automation configured for
OpenHands/software-agent-sdkdid not create any automation runs when a test PR was labeled withoh-cloud-review.The GitHub label events were successfully emitted by GitHub, and local inspection of the automation service code indicates the automation trigger/filter should match a representative
pull_request.labeledpayload. However, the automation service shows zero runs, which suggests the event is not reaching the automation service or is being routed to a different OpenHands org before trigger matching.Test setup
Automation created via the plugin preset:
PR Review: software-agent-sdk oh-cloud-review5938f464-b585-429f-a95a-8f0e12a3a02c8e0a0d06-afbe-41b0-ac49-ebfbc774580egithubgithub:OpenHands/extensions,repo_path: plugins/pr-review,ref: mainOpenHands/software-agent-sdkoh-cloud-reviewOriginal trigger:
{ "type": "event", "source": "github", "on": "pull_request.labeled", "filter": "repository.full_name == 'OpenHands/software-agent-sdk' && label.name == 'oh-cloud-review'" }After debugging, the trigger was broadened to include
issues.labeledas well, in case PR label events were normalized that way:{ "type": "event", "source": "github", "on": ["pull_request.labeled", "issues.labeled"], "filter": "repository.full_name == 'OpenHands/software-agent-sdk' && label.name == 'oh-cloud-review' && (pull_request.number != null || issue.pull_request.url != null)" }What happened
OpenHands/software-agent-sdk:oh-cloud-review.Response remained:
{ "runs": [], "total": 0 }The automation detail also still showed no visible run activity.
Evidence that GitHub emitted the label event
GitHub issue events for PR
#3205showed label activity, including:GitHub repo events also showed
PullRequestEvententries for PR#3205withaction=labeledand payload keys similar to:So this does not look like a GitHub-side label operation failure.
Evidence that trigger matching should work
I cloned
OpenHands/automationand inspected:openhands/automation/event_router.pyopenhands/automation/event_schemas/github.pyopenhands/automation/trigger_matcher.pyopenhands/automation/filter_eval.pyopenhands/automation/utils/webhook.pyA representative payload for the observed event parses as:
and matches both the original trigger and the broadened trigger locally:
Therefore the most likely failure is upstream of
matches_trigger().Relevant implementation path
From
OpenHands/OpenHands, GitHub webhooks are received at:The route only forwards to the automation service when:
The forwarding service is:
The forwarding path:
payload.repository.owner.login.OrgGitClaim.with an internal HMAC signature using
AUTOMATION_WEBHOOK_SECRET.In
OpenHands/automation, the event is then received at:Implemented in:
Suspected causes
1. Event forwarding may be disabled or misconfigured in the OpenHands server
The server-side route only forwards if:
The chart defaults appear to have forwarding disabled:
If production has not overridden these, GitHub webhooks can still be processed by the normal GitHub integration, but automations will never see them.
2.
github/openhandsmay not be claimed by the OpenHands org that owns the automationThe automation belongs to OpenHands org:
For org-owned repos, forwarding requires an
OrgGitClaimmapping roughly equivalent to:If the claim is missing, the forwarding code skips the event.
If the claim exists but points to another OpenHands org, the event will be forwarded to that org and the automation above will not see it.
I tried to query:
but my token received:
so I could not verify the claim.
3. Stale negative Redis cache could cause forwarding to continue skipping events
The forwarding code caches negative org-claim resolution results for one hour:
If the first test happened before
github/openhandswas claimed, subsequent tests may continue to skip forwarding until the cache expires or is cleared.4. GitHub App delivery/subscription issue
The GitHub App should be checked for a
pull_requestwebhook delivery for PR#3205, actionlabeled, and whether/integration/github/eventsreturned200.The GitHub App manifest in
OpenHands-Cloudappears to subscribe to:so
pull_request.labeledshould be included, but the actual installed app delivery logs are the source of truth.5. Background task may not run if normal GitHub handling raises before response
The GitHub route adds forwarding as a FastAPI background task, then awaits normal resolver handling:
If
github_manager.receive_message()raises, the route returns400and the background task may not execute. This seems less likely for a plainpull_request.labeledevent, but logs should confirm.Small implementation observation
last_triggered_atmay not be updated for event-triggered automations.Manual/cron dispatch uses
create_pending_run(), which updatesAutomation.last_triggered_at.Event dispatch uses
create_automation_run()in:That creates an
AutomationRun, but does not updateAutomation.last_triggered_at.So
last_triggered_at: nullalone is not proof of no event match. In this case, however,runs: []confirms no run was created.Suggested debugging steps
Could someone with production access check the following around the label timestamps for PR
#3205?Expected behavior
Adding
oh-cloud-reviewto a PR inOpenHands/software-agent-sdkshould create a pending automation run for the configured automation.Actual behavior
No run was created:
{ "runs": [], "total": 0 }Impact
GitHub-event-triggered automations may silently fail for org-owned repositories if forwarding is not enabled/configured, org claims are missing/misrouted, or negative claim results are cached.
This issue was created by an AI agent (OpenHands) on behalf of the user.