Skip to content

fix: resolve trigger actors during enqueue#38

Merged
ecarreras merged 4 commits into
mainfrom
fix-enqueue-trigger-actor-fallback
May 25, 2026
Merged

fix: resolve trigger actors during enqueue#38
ecarreras merged 4 commits into
mainfrom
fix-enqueue-trigger-actor-fallback

Conversation

@pilipilisbot
Copy link
Copy Markdown
Owner

@pilipilisbot pilipilisbot commented May 25, 2026

Fixes #37.

Summary

  • resolve trigger actors during enqueue from the parsed GitHub resource author first, via the existing GitHub API actor resolver
  • keep the notification sender login as a fail-open fallback when the resource lookup is unavailable
  • replace the operator-maintained expected-version check with an optional latest GitHub release check that warns when the installed package lags and includes release URL/notes
  • document the enqueue fallback, backfill behavior, and release-drift monitor check

Screenshot

Release update monitor alert

Tests

  • .venv/bin/python -m pytest tests/test_queue.py tests/test_actors.py -q (19 passed)
  • .venv/bin/python -m pytest tests/test_monitor.py -q (14 passed)
  • .venv/bin/python -m pytest -q (152 passed)
  • git diff --check
  • local dashboard screenshot captured against a seeded release-update alert

@ecarreras
Copy link
Copy Markdown
Owner

@pilipilisbot no entenc la manera d'obtenir l'usuari... no s'hauria de fer a través del mail, oi que reacciones a un element del github? issue, pull-request, comentari, etc. i aquest element té un autor. Doncs aquest autor és el que t'ha fet triggejar el job.

@ecarreras
Copy link
Copy Markdown
Owner

@pilipilisbot tampoc m'agrada gaire el "expected" versión crec que s'hauria de fer algun check amb la release publicada a github i posar algun avís tipus: There are a new version i la info del changelog o el que sigui.

Més endavant ja buscarem una manera per fer acció per actualitzar des del propi dashboard.

@pilipilisbot
Copy link
Copy Markdown
Owner Author

He ajustat el PR perquè el trigger_actor surti primer de l'element GitHub que ha disparat la feina, no del remitent del correu.

Nou commit: 3552f21 (fix: prefer GitHub context actor on enqueue). Ara trigger_actor_details_for_enqueue consulta primer el context parsejat (issue, pull request, comment, review, commit comment o workflow run) via GitHub API, i només si això no es pot resoldre fa servir el login del sender del mail com a fallback.

També he actualitzat la documentació i he afegit cobertura perquè aquest ordre no torni a canviar accidentalment. Validació:

  • .venv/bin/python -m pytest tests/test_queue.py tests/test_actors.py -q → 19 passed
  • .venv/bin/python -m pytest -q → 150 passed
  • git diff --check
  • GitHub Actions pytest (3.11) i pytest (3.12) passen al commit 3552f21.

@pilipilisbot
Copy link
Copy Markdown
Owner Author

He tret el GITHUB_AGENT_BRIDGE_EXPECTED_VERSION manual i ho he canviat per un check contra l'última release publicada a GitHub.

Nou commit: 3da0665 (fix: check latest release in monitor). Ara gab monitor pot usar GITHUB_AGENT_BRIDGE_RELEASE_REPO=pilipilisbot/github-agent-bridge, compara la versió instal·lada del paquet amb /releases/latest, i si hi ha una release nova afegeix un avís amb l'URL de la release i la primera línia útil del changelog. Si GitHub/API/xarxa falla, només deixa latest_release_error al JSON i no marca el health check com a caigut només per això.

També he actualitzat systemd/env.example i docs/operations.md per descriure aquest flux. Validació:

  • .venv/bin/python -m pytest tests/test_monitor.py -q → 14 passed
  • .venv/bin/python -m pytest -q → 152 passed
  • git diff --check
  • GitHub Actions pytest (3.11) i pytest (3.12) passen al commit 3da0665.

@ecarreras
Copy link
Copy Markdown
Owner

@pilipilisbot em pots ensenyar com quedarà la notificació que hi ha una nova versió disponible amb una captura de pantalla

@pilipilisbot
Copy link
Copy Markdown
Owner Author

He afegit la captura de la notificació de nova versió al cos del PR, tal com quedarà al panell Monitor alerts del dashboard.

Commit nou: d1986e3 (docs: add release alert screenshot). La imatge està al PR body amb URL raw.githubusercontent.com i cache key del commit perquè GitHub renderitzi la versió actualitzada.

Validació:

  • captura local feta contra un dashboard amb una alerta sembrada de release nova
  • GitHub Actions pytest (3.11) i pytest (3.12) passen al commit d1986e3

@ecarreras ecarreras merged commit 2bd3093 into main May 25, 2026
2 checks passed
@ecarreras ecarreras deleted the fix-enqueue-trigger-actor-fallback branch May 25, 2026 10:35
@pilipilisbot
Copy link
Copy Markdown
Owner Author

Post-merge sync for PR #38 is complete.

Verified state:

  • PR fix: resolve trigger actors during enqueue #38 is merged at 2bd3093 and main is now at release tag v0.18.3 (5bff57e).
  • Post-merge GitHub Actions succeeded: tests run 26396118834 and release run 26396118833.
  • Local canonical checkout /home/openclaw/.openclaw/workspace/github/github-agent-bridge is clean on main and matches origin/main.
  • No dedicated PR fix: resolve trigger actors during enqueue #38 worktree remains, and both local/remote fix-enqueue-trigger-actor-fallback refs are gone, so there was nothing further to remove for this sync event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh jobs can be enqueued without trigger actor

2 participants