fix(issue-feed): correct IssueTriage bot uid case and add mention.uids#23
Conversation
- Fix uid from lowercase 27pmzxx8nad78c9d01e_bot to mixed-case 27pmzxX8NAD78c9d01e_bot (matches robot_id from registerBot API) - Add mention.uids field to send() so WuKongIM delivers proper @mention notification to IssueTriage; previously the field was absent and the bot relied on content-text fallback parsing - Both issues traced to GitHub Actions Python script bypassing the OpenClaw adapter (actions.js), using the framework-canonicalized (lowercased) accountId instead of the actual robot_id Co-authored-by: Octo助理-小明 <27oa0iEYms60b3f1076_bot> Co-authored-by: IssueTriage <27pmzxX8NAD78c9d01e_bot>
yujiawei
left a comment
There was a problem hiding this comment.
Code Review — PR #23 (.github)
Summary
Surgical, well-scoped fix for two bugs in the shared octo-issue-feed.yml reusable workflow:
send()now accepts an optionalmention_uidsand emitspayload.mention.uidswhen supplied.- The hardcoded IssueTriage bot uid is corrected from the lowercase
27pmzxx8nad78c9d01e_botto the canonical mixed-case27pmzxX8NAD78c9d01e_bot. - The TRIAGE call passes the uid through
mention_uidsso the receiver sees a structured mention instead of relying on content-text fallback parsing.
The PR description includes a thorough root-cause analysis tracing the lowercase value back to an canonicalizeAccountId normalization leak — that context is valuable and matches the fix.
Verification
- ✅ The two non-TRIAGE
send()call sites (feed_msg,proj_msg) keep their original 2-arg shape; withmention_uidsdefaulting toNone, the emitted payload for them is byte-identical to today's, so existing channels are not impacted. - ✅ Mixed-case uid is preserved verbatim because it lives inside a Python single-quoted string, not a YAML key — no YAML case-folding concern.
- ✅ The
@[uid:name]text intriage_msgand themention_uidslist use the same uid value; sender's view and receiver'smention.uidsare consistent. - ✅ Search of the org (
27pmzxx8nad78c9d01e/27pmzxX8NAD78c9d01e) confirms this uid only appears in this one workflow — no sibling workflow needs the same correction. - ✅ Existing safety controls remain intact:
require_repo_name,require_group_id, API base allowlist, retry/backoff includingRetry-Afterfor 429, and 15s timeout. No new external input is introduced (the uid list is hardcoded), so no new injection surface.
Findings
P2 — Nit (non-blocking): duplicated magic uid
The string 27pmzxX8NAD78c9d01e_bot now appears twice in the file (once inside the @[...] mention text, once in the mention_uids=[...] list). Future renames would need to touch both. Optional follow-up: lift to a module-level constant, e.g.
TRIAGE_BOT_UID = '27pmzxX8NAD78c9d01e_bot'
...
triage_msg = (
f'@[{TRIAGE_BOT_UID}:Octo 助理-IssueTriage] [TRIAGE] '
f'https://github.com/Mininglamp-OSS/{repo}/issues/{num}'
)
send('151a45970e1546afa9e947ac36a5c4e5', triage_msg, mention_uids=[TRIAGE_BOT_UID])Not blocking — current form is correct and the values are kept literally in sync within four lines of each other.
Observations (no action required)
- The adapter-side case-insensitive uid comparison plus
@[uid:name]content-text fallback remains in place as a safety net per the PR description. That defense-in-depth is appropriate; this PR removes the need to rely on it, which is the right direction. - The mention is sent only on
action == 'opened', matching the previous behavior — no risk of re-pinging IssueTriage onclosed/reopened/labeled.
Verdict
Approving. The fix is minimal, backward compatible for the two non-mention call sites, addresses a real interop bug at its source, and is consistent with the documented root cause.
Problem
Two bugs in the shared
octo-issue-feed.ymlreusable workflow, both traced to the Python script calling/v1/bot/sendMessagedirectly (bypassing the OpenClaw adapter layer).Bug 1:
mention.uidsabsentThe
send()function did not include amentionfield in the payload. WuKongIM received no structured mention, so IssueTriage relied on content-text fallback parsing in the adapter's inbound code to detect the@[uid:name]pattern.Bug 2: Bot uid lowercase
triage_msghardcoded27pmzxx8nad78c9d01e_bot(all-lowercase). The correct value fromPOST /v1/bot/register(robot_id) is27pmzxX8NAD78c9d01e_bot(mixed-case). The wrong value was introduced because it was copied from OpenClaw's internalcanonicalizeAccountIdoutput (which normalizes config keys to lowercase), not from the actualrobot_idreturned by the API.Fix
send()accepts optionalmention_uidsand includespayload.mention.uidswhen providedtriage_msguses the correct mixed-case uid27pmzxX8NAD78c9d01e_botsend()call for TRIAGE passesmention_uids=['27pmzxX8NAD78c9d01e_bot']Root cause analysis
Investigated by Octo助理-小明 and IssueTriage in group chat on 2026-05-18. Full trace:
The adapter-side workaround (case-insensitive uid comparison + content-text
@[uid:name]fallback) remains as a safety net but this PR fixes the actual source.