Repository navigation
Conversation
… or '.' (#4322) hasMention/stripMention used (?i)@<name>\b, but RE2's \b is an ASCII word boundary that can never fire after a trailing '-' or '.' - both legal in Mattermost's ^[a-z0-9.\-_]+$ username charset. Bots named like "dev-" or "ops1." were therefore silently dropped by the requireMention gate in non-DM channels (no log, no observability) and never stripped from LLM context. Replace \b with the post-match continuation-char boundary check adopted for matrix in #2749: a match counts only when the next byte is not in [a-z0-9._-]. stripMention consumes via matrixASCIIFoldPrefix so matching and consumption share one coordinate system (#3572 lesson). The #963 short-name guard ("al" vs "@alex") is preserved by construction. Closes #4322 Co-Authored-By: ggcode <noreply@ggcode.dev>
|
[ggcxf 走读] GO:RE2 \b 在尾随 -/. 后永不触发(ASCII word boundary 盲区)→ 换显式 continuation-charset 检查(mattermostMentionEndsAt,字符集=官方 validUsernameChars [a-z0-9._-]);hasMention Index 循环+stripMention ASCII fold 重建,#963(al/@alex)语义保留,沿用 matrix #2749 模式与 #3572 单坐标系教训。与 #4322 诉求一致。已比对:head 对 main ahead=1/behind=0,非重复件。门面:CI Test=pending;approvals=0(ggaidev=read 通道断损)。CI 绿+审批在案后进合并判定。 |
|
[ggcxf 更新] CI Test=fail(run 39238063973):唯一失败 |
|
[ggcxf 更新] head 已更新(0469e3502d)但 mergeable=CONFLICTING(与 main 冲突);Test=fail 为旧 run(39238063973,10:31),新 head 尚无绿 CI。当前双阻塞(冲突+红灯),需作者解决冲突并让 CI 转绿后本席再复核(走读 GO 面向逻辑,逻辑未变仍有效)。 |
|
[ggcxf 更新] 新 head CI 已全绿(9/9,Test=pass)。剩余唯一阻塞:mergeable=CONFLICTING(与 main 冲突未解,head 0469e35 未变)。需作者解决冲突(rebase/merge main)后本席复核进合并判定(走读 GO 在案)。 |
|
CI 绿(重跑 success):首跑唯一失败 TestStdioConcurrentReadsSerialized(internal/mcp,与本 PR 载荷 internal/im 零交集)经 main 本地 count=3 三连跑 PASS 确证为并发时序 flake,failed-jobs 重跑全绿。本 PR 可合并(Closes #4322,issue 已由 owner 受理关闭)。 |
Problem (#4322)
hasMention/stripMentionused(?i)@<name>\b, but RE2's\bis an ASCII word boundary that can never fire after a trailing-or." - both legal in Mattermost's^[a-z0-9.-_]+$username charset (validUsernameChars). Bots named likedev-orops1.were silently dropped by therequireMention` gate in non-DM channels (zero logs) and never stripped from LLM context.Fix
Boundary is now a post-match continuation-char check (next byte not in
[a-z0-9._-]), the same pattern adopted for matrix in #2749;stripMentionconsumes viamatrixASCIIFoldPrefixso matching and consumption share one coordinate system (#3572 lesson). The #963 short-name guard (alvs@alex) is preserved by construction.Verification
zz_mention_boundary_test.go: trailing-/." mentions now match and strip; mixed case; user-ID mentions; continuation blocking (@Dev-is not a mention ofdev`); multibyte suffix boundary; [code-review] mattermost file_ids 在 POST 后才写入 payload(图片永不随消息+孤儿文件) + 读超时只认 Pong 帧但心跳是应用层 ping(60s 必断连循环) #963 controls - all PASSgo test -tags goolm ./internal/im/→ ok 80.371s (includes pre-existing mattermost/matrix regression suite)go vet+gofmtcleanCloses #4322
🤖 Generated with ggcode
Co-Authored-By: ggcode noreply@ggcode.dev