fix(pr-followup): include itsmiso-ai in default bot identity allowlist#360
Closed
itsmiso-ai wants to merge 1 commit into
Closed
fix(pr-followup): include itsmiso-ai in default bot identity allowlist#360itsmiso-ai wants to merge 1 commit into
itsmiso-ai wants to merge 1 commit into
Conversation
The PR-followup sync (incl. merge-conflict surfacing from #356) silently filters out any PR whose author is not in DEFAULT_BOT_IDENTITIES. The default was only [github-actions[bot]], but the active Miso author identity for misospace/* agent PRs is itsmiso-ai. Without an explicit PR_FOLLOWUP_BOT_IDENTITIES env var, every merge_state event is dropped and the queue stays empty even when there are real DIRTY/CONFLICTING PRs. Fixes #355 (the merge-conflict-surfacing half) - Add itsmiso-ai to DEFAULT_BOT_IDENTITIES - Update docs to match the new default - Add a regression test for the unset-env-var case
There was a problem hiding this comment.
AI Automated Review
Full PR review.
Analysis engine: review@https://litellm.jory.dev/v1 (openai) — fast route
Recommendation
Approved. This PR fixes a bug where PR-followup events (like merge conflicts) from the itsmiso-ai bot were being silently dropped because the bot identity was not in the default allowlist. The fix includes a regression test and documentation updates.
Change-by-change findings
src/lib/pr-followup-ingestion.ts
- Added
itsmiso-aito theDEFAULT_BOT_IDENTITIESarray to ensure the Miso agent fleet's PRs are processed by default when no environment variable is provided. - Added documentation comments explaining why this identity is included and noting that
PR_FOLLOWUP_BOT_IDENTITIESstill takes precedence.
src/lib/pr-followup-ingestion.test.ts
- Added a regression test
defaults to itsmiso-ai + github-actions[bot] when env var is unsetto verify that both the new default and the original default are respected when the environment variable is absent.
docs/pr-review-fix-queue.md
- Updated the documentation table for
PR_FOLLOWUP_BOT_IDENTITIESto reflect the new default value:github-actions[bot], itsmiso-ai.
Standards Compliance
- Code Standards: The implementation follows the repository's pattern of using a narrow default allowlist and provides a clear mechanism (
PR_FOLLOWUP_BOT_IDENTITIES) for operators to override it. - Error Handling: The fix addresses a silent failure mode where events were being dropped without notification.
- Testing: A regression test has been added to cover the specific scenario that caused the bug.
Contributor
Author
|
Closing — the code default should stay vendor-neutral. The bot identity is already in the helm release ExternalSecret (home-ops/kubernetes/apps/base/llm/openclaw/dispatch/externalsecret.yaml). The real fix is to bump the helm release image tag from 0.4.4 to 0.4.5 so PR #356's merge-state ingestion actually runs. Tracking that in a separate PR against home-ops. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the silent drop in PR-followup sync ingestion from #356.
The bug
`POST /api/pr-followup/sync` and `POST /api/pr-followup/webhook` both filter
PRs through `isAllowedBotAuthor()`, which checks the author against
`DEFAULT_BOT_IDENTITIES` when the `PR_FOLLOWUP_BOT_IDENTITIES` env var is unset.
The default was `["github-actions[bot]"]`. The actual author identity for the
Miso agent fleet on `misospace/*` is `itsmiso-ai`, so every merge_state /
check_run / review / comment event for the agent's PRs was silently dropped
(`ingestXxxEvent` returned `null` because `isAllowedBotAuthor` returned false).
The sync still reported `enqueued=N` because comments/reviews from other
events got through, masking the failure on the merge-conflict-surfacing path.
Net effect: DIRTY / CONFLICTING PRs never reach the pr-fix queue, so the
cron worker keeps saying `Pipeline is clear.` even with 7 conflicted agent
PRs sitting open.
Repro
```bash
unset PR_FOLLOWUP_BOT_IDENTITIES
curl -s -X POST $DISPATCH_URL/api/pr-followup/sync -H "Authorization: Bearer $TOKEN" -d '{}'
-> { "reposScanned": 7, "prsScanned": 7, "enqueued": 2, "skipped": 20 }
But the 2 are not from any merge_state event — they're from check_run/comment events.
Conflicted PRs (DIRTY) silently filtered out.
```
Fix
Add `itsmiso-ai` to `DEFAULT_BOT_IDENTITIES`. The env var still wins when set,
so operators with different bot identities are unaffected.
Changes
Followups (not in this PR)
avoid relying on the in-code default, and to handle `app/smurf-bot` if
more PRs are authored by that identity.
is not a redeploy-required setting.