Repository navigation
Description
Written-by: Dev Lead
Symptom
A group line that contains a # glued to a word, a version or a URL fragment is read as an issue reference. The dispatch then writes a card for a phantom issue, and because the card was written the round's speakers is emptied — nobody answers the line.
'@Dev-2 set the accent colour to #3366ff' → a card for issue #3366 is written, and the message goes unanswered.
Reproduction
At base 7b37b88b (main, #1386), importing core/src/shared/issue-ref.js directly and calling issueRefs(line):
| line | now returns | should return |
|---|---|---|
@Dev-2 set the accent colour to #3366ff |
["#3366"] |
[] |
@Dev-2 fix C#7 codegen |
["#7"] |
[] |
version in 1.2#3 |
["#3"] |
[] |
see abc#12 for details |
["#12"] |
[] |
#1360abc |
["#1360"] |
[] |
https://example.com/help/#123 |
["#123"] |
[] |
These four must keep resolving, unchanged:
| line | must still return |
|---|---|
@Dev-2 rebase #1360 |
["#1360"] |
owner/repo#1360 |
["#1360"] |
https://github.com/o/r/issues/1360 |
["#1360"] |
(#1360), #1361. |
["#1360", "#1361"] |
Cause: ISSUE_REF in core/src/shared/issue-ref.js is #(\d{1,7})(?![0-9]) — it guards only the character after the digits, so # may follow any word character, ., - or /. MENTION (used by cardMentions, and by withoutMentions in work-dispatch.js) carries the same hole on its bare-number branch.
Chain to the user-visible effect
core/src/host/work-dispatch.js:29issueRefPattern(),:32issue = '#' + (match[1] ?? match[2])— the phantom id becomes the dispatch's issue.core/src/host/groups.js:826speakers = dispatch && wrote !== undefined ? [] : lastFirst(...)— once the card is written, the round has no speakers, so the line gets no answer.core/src/host/tasks.jsassignFromDispatch— writes the card for the phantom issue and can overwrite a member's card note.
Why it went unnoticed
core/test has zero hits for issueRefs / namesIssue / issueRefPattern: the only test of this matcher was deleted with delivery-view.test.js in #1370. Nothing pins the boundary between "a number named on purpose" and "a # that happens to be in a word".
Expected behaviour
- A bare
#Ncounts only when the#is not glued to a word character,.,-or/on the left, and the digits are not followed by a word character on the right. owner/repo#Nkeeps its own branch and is tried first — a lookbehind on the bare branch must not kill it (#there followso).github.com/<o>/<r>/(issues|pull)/<N>keeps its own branch with the same right-hand rule.cardMentions/MENTIONfollows the same three shapes, so a card title carrying#3366ffnames no issue either.- A URL fragment (
help/#123) stops parsing. The PR body must state this explicitly — it is a deliberate behaviour change, not an oversight.
Scope
core/src/shared/issue-ref.js + a new core/test/issue-ref.test.js; patches/ds-bot/files/** mirrors come from node scripts/ds-bot-patches.mjs generate, never by hand. .github/** untouched. No change to enqueue-guard's reference rules (#1160) and no change to the dispatch protocol itself.
Activity
Birfy commentedon Oct 27, 2026
Written-by: Triage
分诊(读物
api.github.com,maind4bd1b9b):类型与区域已打bug+area:automation。没有打
agent-ready:#1392已经在开 PR(dev2/fix/1391-issue-ref-false-positives,Fixes #1391)。按不变式agent-ready⇒ 无 PR,等 PR 关了再补。fix(issue-ref): read a bare ThinkFlowLab#1234 only when the number st…