Repository navigation
fix: catch more Discord choices that require buttons - #252
Merged
Merged
Conversation
Require buttons for numeric choice cues and labeled option lists.
Do not treat one-number status prose as a choice cue.
Document both standalone Option and Options headings in the emit contract, matching the approved choice-header forms.
…e duplicate rules
dnth
force-pushed
the
fm/fm-ext-choice-guard-digits
branch
from
October 16, 2026 01:27
58403b9 to
8f50825
Compare
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
Prevent Discord choice posts from going out as plain text without buttons by widening the choice guard used by bin/fm-ext-emit.sh. Add reply, pick, choose, select, or say cues followed within a short span by an enumeration of at least two digits, including 1, 2 or 3; 2 or 3; 1/2; and 1 or 2. Treat standalone Option, Options, Your call, or Choose headings, optionally bold and with or without a colon, followed by two or more option lines as choice-shaped; the approved header must explicitly name singular Option. Keep ordinary numbered status lists without a choice cue or heading posting normally, and preserve --no-buttons as the explicit plain-list escape. Avoid false positives on “PR 562 merged; 3 of 5 cases pass”, “steps 1, 2 and 3 are done”, and unheaded, uncued numbered findings. Refuse these choice examples: (a) “Options: 1. Restart only the eval service on today's production build (Recommended); 2. Report only the search-only retrieval scores already available; 3. Wait until tomorrow. Reply 1, 2 or 3.” (b) “Options: 1. Keep them here (recommended, already running); 2. Keep them here, but run their heavier live tests; 3. Fix the Boat second mate first. Reply 2 or 3 if you want either. 1 needs nothing.” (c) a bold “Your call:” heading followed by numbered options without a cue. Update the emit header/help and docs/configuration.md where it documents the guard, with behavioral tests for the refusal, escape, and false-positive cases. Preserve existing PR commit SHAs during any base update; use the No-Mistakes pipeline and do not force-push outside it or rewrite commits already on the PR. CI approval requires every check green with no cancellations; if the known fm-watch-triage remote-reply failure appears in CI, stop at a needs-decision with exact evidence.
What Changed
--no-buttonsescape, and ordinary status prose and numbered findings.Risk Assessment
✅ Low: The changes are bounded to choice detection, satisfy the accepted matching requirements, and preserve existing escape and delivery paths.
Testing
The focused behavioral test file and all 185 independent live CLI cases passed. Captured refusal messages, accepted payloads, and public help. No screenshot applies because this change affects a CLI publication guard. Disposable data was removed.
Evidence: Live CLI inputs, refusal messages, and persisted payloads
Evidence: Public emit help
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-ext-lib.sh:525- Intent requires headings “optionally bold and with or without a colon,” but the new alternatives...:?\*\*and...:?__only accept a colon inside bold markup. For**Your call**:\n1. North\n2. South, neither cue matches, the heading is rejected, and emit publishes plain text without buttons. The same omission affects Option, Options, Your call, and Choose in both bold representations at bin/fm-ext-lib.sh:525. Accept the colon outside closing bold markup as well.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
TMPDIR="$PWD/.test-choice-tmp" bash tests/fm-ext-ask.test.shpython3 ~/.no-mistakes/evidence/01M512RJNBDT4XKAZPC8XMS6GY/drive-choice.py— 185 cases through real intake and emit commands in a disposable FM_HOMEbash bin/fm-ext-emit.sh --helpRemoved disposable test homes and verified the working tree was clean.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.