Repository navigation
2026-93: fix(discord): queue out-of-band mention wakes durably - #93
Merged
Merged
Conversation
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
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
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.
Intent
퍼스트크루 채팅방에서 퍼스트크루한테 멘션해서 말 걸었는데 하나도 답장이 안 왔어 이것도 확인하고 고쳐
What Changed
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.
Evidence: Discord poll regression run
Source: Discord poll regression run
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
bash tests/fm-discord-selfhosted.test.sh✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.