<@U0BME18CF7S> what Automation posts on PRs a mess...
# automations-debug
c
@fresh-machine-37269 what Automation posts on PRs a message containing "CI is currently failing on this PR's latest commit."? Is it in the openhands/extensions repo or only in your VM?
πŸ‘€ 1
f
πŸ€– On it! View progress here: oss-agent-canvas.ngrok.dev/conversations/…
βœ… Done! It's the GitHub PR Reviewer automation (posts as the
all-hands-bot
GitHub user). The "CI is currently failing on this PR's latest commit" message is part of its deterministic pre-check β€” before running any AI review, it checks CI status on the PR's head commit and, if CI is red, leaves that plain (non-AI) comment instead. It's only in your VM, not in the
openhands/extensions
repo. The
openhands/extensions
repo only contains a generic catalog/manifest entry (
automations/catalog/github-pr-reviewer/manifest.json
) for a "GitHub Code Review Agent" β€” that manifest describes the label-triggered AI review flow and does not contain the CI-failing message text. The actual script with that exact string (
_leave_ci_failing_comment
, with the
<!-- ci-failing-notice:<head_sha> -->
marker) lives in the deployed automation script in your VM (e.g.
pr-reviewer/main.py
), and it runs against
OpenHands/extensions
,
OpenHands/OpenHands
,
OpenHands/software-agent-sdk
, and
OpenHands/typescript-client
.
c
@fresh-machine-37269 OK, check the script, I think it posts many times per PR, which is bad. It should edit its old post instead, if any. Be careful when you fix it.
πŸ‘€ 1
f
βœ… Done! Confirmed the bug and fixed it. The bug: The CI-failing comment path always posted a fresh comment on every poll that saw red CI.
_leave_ci_failing_comment()
called
_post_or_update_comment(..., None, ...)
with no comment id, so it never edited β€” it re-posted. This is different from the HUMAN-section notice, which already stores a
comment_id
and edits in place. The fix (in
pr-reviewer/main.py
):
1.
_record_ci_failed()
now accepts and stores a
comment_id
. 2.
_compact_evaluated()
preserves
comment_id
when present. 3.
_leave_ci_failing_comment()
now takes a
comment_id
and returns the id it actually used (edits in place when an id is known). 4.
_ci_failing_notice_posted()
now returns the existing notice's comment id (instead of just a bool), matching on the head-SHA marker or the stable notice text β€” so an older notice from a previous head is still edited rather than duplicated. 5.
_notify_ci_failing()
threads the stored/scan-found
comment_id
through, and records it only when the comment truly lands (so a transient failure is retried next poll, not suppressed). Where I applied it: the canonical source copy in
git-sync/automations/…/tarball/main.py
(committed as
95280ae
to the
oss-agent-canvas
git-sync repo), and I rebuilt the active automation tarball at the storage path the DB points to (
c7e851e6…tar
), so the next run uses the fix. Verified the active tarball byte-matches the fixed source and compiles. One note: the old single-repo "PR Reviewer: … for @all-hands-bot" automations are disabled (
enabled=0
) in the DB, so only the multi-repo one is live β€” that's the copy I updated. I did not push the git-sync commit to remote, since you didn't ask me to push.
c
what is the difference between the git-sync remote and your last hash? is it only your commit or more? @fresh-machine-37269
πŸ‘€ 1
f
βœ… Done! The difference between the git-sync remote (
origin/main
) and my last commit (
HEAD
,
95280ae
) is only my one commit β€” nothing else. β€’
origin/main..HEAD
shows exactly one commit:
95280ae Edit CI-failing PR comment in place instead of re-posting
β€’
HEAD..origin/main
is empty (no commits on the remote that I'm missing) β€’ The full diff is just that single file change:
automations/github-pr-reviewer-multi-repo-extensions-openhands-software-agent-sdk/tarball/main.py
(46 insertions, 31 deletions) So my local branch is exactly
origin/main
+ my one fix commit, and it hasn't been pushed yet.
c
yes you can push @fresh-machine-37269
πŸ‘€ 1
f
βœ… Done! Done β€” pushed. βœ… Commit
95280ae
is now on
origin/main
(
OpenHands/oss-agent-canvas
), and my local branch is in sync with the remote (nothing ahead, nothing behind).