Skip to content

2026-93: fix(discord): queue out-of-band mention wakes durably - #93

Merged
Ivory2024 merged 1 commit into
mainfrom
fm/firstmate-discord-mention-no-reply-20261005
Oct 5, 2026
Merged

Ivory2024 merged 1 commit into
mainfrom
fm/firstmate-discord-mention-no-reply-20261005

Conversation

@Ivory2024

Copy link
Copy Markdown
Owner

Intent

퍼스트크루 채팅방에서 퍼스트크루한테 멘션해서 말 걸었는데 하나도 답장이 안 왔어 이것도 확인하고 고쳐

What Changed

  • Add regression coverage showing an out-of-band Discord poll writes a captured mention to the durable wake queue, while still printing its wake line.
  • Verify re-polling does not offer the same mention again and leaves exactly one queued wake.

Risk Assessment

✅ Low: 추가된 테스트가 실제 Discord poll 명령을 실행해 stdout, durable wake queue, 재폴링 중복 억제를 검증한다.

Testing

Ran the focused Discord connector tests against disposable state and a simulated Discord response. Durable wake enqueue and duplicate suppression passed; no live Discord account or Firstcrew reply was available to validate the full interaction.

  • Live validation: ⚠️ inconclusive - 1 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Captain mentions Firstcrew; the poll stores the mention as a durable wake, and a second poll does not enqueue it again. ✅ pass live Discord poll regression run
Captain mentions Firstcrew in Discord; Firstcrew processes the wake and replies in the chat. ⏸️ untested no Tried the real poll script against a disposable Discord API response. This proved durable wake delivery and duplicate suppression, but not a live Discord-to-Firstcrew reply. The worktree provides no D…
Evidence: Discord poll regression run

Source: Discord poll regression run

ok - fm-discord-poll is a hard no-op without a token
ok - self-hosted Discord ingestion writes x-inbox payload shape and fires x-mention wake
ok - self-hosted Discord default polling discovers permitted DMs
ok - fm-x-reply routes self-hosted Discord requests to self-hosted reply adapter
ok - collision handling excludes gajae-way channel 1551134713727426570
ok - explicit allowlist takes precedence over the default Discord collision exclusion with a warning
ok - a reply to the bot's own message without a mention is captured
ok - a reply to the bot's own message that also mentions the bot is captured
ok - a reply to a non-bot message without a mention is still ignored
ok - a DM command is polled and captured even when a channel allowlist is configured
ok - an out-of-band Discord poll queues its mention durably, not only on stdout
ok - fm-bootstrap handles FM_DISCORD_BOT_TOKEN activation and artifact generation
- Outcome: ⚠️ 1 warning across 1 run (1m44s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (1 of 2 scenarios were driven live against the product); untested: Captain mentions Firstcrew in Discord; Firstcrew processes the wake and replies in the chat.
  • Live validation: ⚠️ inconclusive - 1 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Captain mentions Firstcrew; the poll stores the mention as a durable wake, and a second poll does not enqueue it again. ✅ pass live Discord poll regression run
Captain mentions Firstcrew in Discord; Firstcrew processes the wake and replies in the chat. ⏸️ untested no Tried the real poll script against a disposable Discord API response. This proved durable wake delivery and duplicate suppression, but not a live Discord-to-Firstcrew reply. The worktree provides no D…
  • bash tests/fm-discord-selfhosted.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

The self-hosted Discord ingress is polled outside the watcher as well as
inside it: a LaunchAgent or cron runner executes bin/fm-discord-poll.sh
directly, so its stdout is a log file. The poll already enqueues every
captured x-mention into the durable wake queue, which is what keeps such a
mention from being consumed by its one-shot offered marker without ever
reaching a session.

Nothing locked that invariant in place, so a regression back to
stdout-only wakes would silently return every out-of-band mention to the
log. This adds the coverage that fails if it does.
@Ivory2024 Ivory2024 changed the title fix(discord): queue out-of-band mention wakes durably 2026-93: fix(discord): queue out-of-band mention wakes durably Oct 5, 2026
@Ivory2024
Ivory2024 merged commit 5b32597 into main Oct 5, 2026
20 checks passed
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* feat(discord): captain command channel for mention-free requests

Adds an explicit opt-in channel list where an authorized captain's plain message
is an inbound Firstmate request, without typing @FIRST Crew (which forces a
Korean/English IME round-trip on every call).

- bin/fm-discord-lib.sh: resolve FM_DISCORD_COMMAND_CHANNELS (one place); a
  command channel that is also excluded is dropped with an explicit diagnostic
  (exclusion wins).
- bin/fm-discord-poll.js: allow the mention-free path only when the polled
  channel is a command channel AND the author is authorized; bot messages and
  unauthorized authors are still ignored.
- bin/fm-discord-poll.sh: export the resolved command channels to the poll.
- docs/configuration.md: document the setting and how it differs from the
  polling allowlist.
- tests: authorized+command-channel plain -> captured; unauthorized -> ignored;
  ordinary channel plain -> ignored; duplicate poll -> one inbox record;
  command/exclusion conflict -> fail-safe diagnostic.

Preserves #89 (reply to bot), #93 (durable wake on capture), DM polling, and the
existing @mention fallback; all inputs still normalize to the same
discord-selfhosted x-inbox + durable-wake path.

* no-mistakes(document): Document Discord command channel configuration

* no-mistakes(lint): Replace ls/grep inbox count with glob loop
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
The self-hosted Discord ingress is polled outside the watcher as well as
inside it: a LaunchAgent or cron runner executes bin/fm-discord-poll.sh
directly, so its stdout is a log file. The poll already enqueues every
captured x-mention into the durable wake queue, which is what keeps such a
mention from being consumed by its one-shot offered marker without ever
reaching a session.

Nothing locked that invariant in place, so a regression back to
stdout-only wakes would silently return every out-of-band mention to the
log. This adds the coverage that fails if it does.
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* feat(discord): captain command channel for mention-free requests

Adds an explicit opt-in channel list where an authorized captain's plain message
is an inbound Firstmate request, without typing @FIRST Crew (which forces a
Korean/English IME round-trip on every call).

- bin/fm-discord-lib.sh: resolve FM_DISCORD_COMMAND_CHANNELS (one place); a
  command channel that is also excluded is dropped with an explicit diagnostic
  (exclusion wins).
- bin/fm-discord-poll.js: allow the mention-free path only when the polled
  channel is a command channel AND the author is authorized; bot messages and
  unauthorized authors are still ignored.
- bin/fm-discord-poll.sh: export the resolved command channels to the poll.
- docs/configuration.md: document the setting and how it differs from the
  polling allowlist.
- tests: authorized+command-channel plain -> captured; unauthorized -> ignored;
  ordinary channel plain -> ignored; duplicate poll -> one inbox record;
  command/exclusion conflict -> fail-safe diagnostic.

Preserves #89 (reply to bot), #93 (durable wake on capture), DM polling, and the
existing @mention fallback; all inputs still normalize to the same
discord-selfhosted x-inbox + durable-wake path.

* no-mistakes(document): Document Discord command channel configuration

* no-mistakes(lint): Replace ls/grep inbox count with glob loop
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
The self-hosted Discord ingress is polled outside the watcher as well as
inside it: a LaunchAgent or cron runner executes bin/fm-discord-poll.sh
directly, so its stdout is a log file. The poll already enqueues every
captured x-mention into the durable wake queue, which is what keeps such a
mention from being consumed by its one-shot offered marker without ever
reaching a session.

Nothing locked that invariant in place, so a regression back to
stdout-only wakes would silently return every out-of-band mention to the
log. This adds the coverage that fails if it does.
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* feat(discord): captain command channel for mention-free requests

Adds an explicit opt-in channel list where an authorized captain's plain message
is an inbound Firstmate request, without typing @FIRST Crew (which forces a
Korean/English IME round-trip on every call).

- bin/fm-discord-lib.sh: resolve FM_DISCORD_COMMAND_CHANNELS (one place); a
  command channel that is also excluded is dropped with an explicit diagnostic
  (exclusion wins).
- bin/fm-discord-poll.js: allow the mention-free path only when the polled
  channel is a command channel AND the author is authorized; bot messages and
  unauthorized authors are still ignored.
- bin/fm-discord-poll.sh: export the resolved command channels to the poll.
- docs/configuration.md: document the setting and how it differs from the
  polling allowlist.
- tests: authorized+command-channel plain -> captured; unauthorized -> ignored;
  ordinary channel plain -> ignored; duplicate poll -> one inbox record;
  command/exclusion conflict -> fail-safe diagnostic.

Preserves #89 (reply to bot), #93 (durable wake on capture), DM polling, and the
existing @mention fallback; all inputs still normalize to the same
discord-selfhosted x-inbox + durable-wake path.

* no-mistakes(document): Document Discord command channel configuration

* no-mistakes(lint): Replace ls/grep inbox count with glob loop
@Ivory2024
Ivory2024 deleted the fm/firstmate-discord-mention-no-reply-20261005 branch October 10, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant