fix: support forwarded GitHub notifications#52
Conversation
pilipilisbot
left a comment
There was a problem hiding this comment.
Thanks for the PR. I checked the diff, the policy/parser docs, the existing queue/executor/dashboard behavior, and ran both the PR-focused test set and the full suite.
I’m requesting changes because this currently regresses the default bridge behavior. Policy.bot_logins defaults to an empty set, while the hardcoded @pilipilisbot patterns were removed from parser.py. As a result, existing deployments and unchanged tests that construct Policy(trusted_orgs={...}) no longer treat direct @pilipilisbot PR comments as actionable: they classify as archive_notification, become done, and never enter the pending/dispatch path.
Evidence:
- Focused PR tests passed:
../github-agent-bridge/.venv/bin/python -m pytest tests/test_parser.py tests/test_policy.py tests/test_manual_enqueue_cli.py tests/test_queue.py tests/test_reader_run.py -q->50 passed. - Full suite failed:
../github-agent-bridge/.venv/bin/python -m pytest -q->26 failed, 133 passed. - Representative failure:
tests/test_executor.py::test_assigned_pr_comment_upgrades_to_work_allowedexpectedreply_commentbut gotarchive_notificationfor a direct@pilipilisbotPR comment using the default policy shape. - The dashboard/monitor failures cascade from the same issue because those tests enqueue default
@pilipilisbotnotifications and expect pending/running jobs.
Please preserve the existing default bot identity, or otherwise migrate the default/example policy and all call sites/tests so the default installed bridge keeps recognizing @pilipilisbot. Since this PR also adds source.from lists and botLogins, the policy reference/example should be updated in the same PR so operators know how to configure forwarded senders and bot identities.
|
Addressed the requested changes in What changed:
Verification:
Note: I initially tried the full suite under Homebrew Python 3.14, but it segfaulted inside Starlette/AnyIO test-client teardown. I reran under Python 3.12, which is within the project's declared |
pilipilisbot
left a comment
There was a problem hiding this comment.
Approved. The follow-up commit 80dfee9 resolves the requested-change blocker by preserving the default pilipilisbot bot login when botLogins is omitted, while still allowing an explicit empty list.
I rechecked the PR diff and verified locally:
- ../github-agent-bridge/.venv/bin/python -m pytest tests/test_parser.py tests/test_policy.py tests/test_manual_enqueue_cli.py tests/test_queue.py tests/test_reader_run.py tests/test_executor.py tests/test_monitor.py -q -> 78 passed
- ../github-agent-bridge/.venv/bin/python -m pytest -q -> 161 passed
- git diff --check -> passed
No GitHub checks are reported on the PR branch, so the local full-suite result is the current verification evidence.
pilipilisbot
left a comment
There was a problem hiding this comment.
Approved again on the latest head e26c41b. The new commit treats APPROVED pull request reviews as non-actionable, which fits the bridge behavior we want: approval notifications should be acknowledged without dispatching another agent run.
I verified the review-followup/executor path and the full suite locally:
../github-agent-bridge/.venv/bin/python -m pytest tests/test_github_followup_detection.py tests/test_executor.py -q-> 16 passed../github-agent-bridge/.venv/bin/python -m pytest -q-> 162 passedgit diff --check 80dfee9481dc8cdc011bc144ee50552ea3e21e43..HEAD-> passed
GitHub Actions are also green on the branch: dashboard, pytest (3.11), and pytest (3.12) passed on run 26476157892.
pilipilisbot
left a comment
There was a problem hiding this comment.
Approved. I reloaded the full PR timeline for the latest review request, checked the current head e26c41b, and re-reviewed the dispatch change that treats APPROVED pull request review notifications as non-actionable.
Current verification:
- GitHub Actions are green on
e26c41b: dashboard, pytest (3.11), and pytest (3.12) all passed in run 26476157892. - Local focused verification still passes:
../github-agent-bridge/.venv/bin/python -m pytest tests/test_github_followup_detection.py tests/test_executor.py -q-> 16 passed. - The PR is mergeable with
mergeStateStatus: CLEANandreviewDecision: APPROVED.
I don’t see any new blocker after the latest follow-up commit.
|
Post-merge cleanup completed for PR #52.
|
|
Post-merge cleanup completed in the active OpenClaw workspace.
|
|
Post-merge cleanup rechecked after the previous cleanup note.
No PR #52 workspace artifacts remain to clean. |
Summary
pilipilisbotidentitysource.fromlists andbotLoginsin the policy reference/exampleTests
.venv312/bin/python -m pytest tests/test_parser.py tests/test_policy.py tests/test_manual_enqueue_cli.py tests/test_queue.py tests/test_reader_run.py tests/test_executor.py tests/test_monitor.py -q.venv312/bin/python -m pytest -q