Repository navigation
Conversation
This was referenced Sep 15, 2026
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
Captain's intent: dispatch now. Fix GitHub issue #4477 in this fork and open a PR through the normal contribution flow, with exact issue linkage (the PR must close #4477). This is a reproduced dangerous-direction false-empty defect in a distinct composer path from the recently-shipped bordered-box hardening (#2483/PR #4452).
Issue #4477 substance:
_fm_composer_classify_leftbar(bin/fm-composer-lib.sh:1104) skips a row as furniture using an unanchored/prefix match againstFM_COMPOSER_IDLE_RE/FM_COMPOSER_IDLE_RE_DEFAULT, gated only byplaceholder_position(the first non-blank content row after a leading blank left-bar row), with NO independent-empty corroboration -pending_seen=0unconditionally yieldsempty. A real, genuinely-unsent draft that begins with a placeholder phrase (e.g. the defaultAsk anything...) is misclassifiedemptyinstead ofpending. Confirmed live using the OpenCode 1.18.30 capture shape already intests/fm-composer-lib.test.sh:411:Ask anything... please replyatplaceholder_position=1-> wronglyempty;Reply with OK.at the same shape -> correctlypending. This path (OpenCode/Grok/Kimi's left-bar composer) is MORE exposed than the bordered-box path because it has noempty_seen-style corroboration gate at all - a single swallowed row is sufficient to misclassify. The sibling bordered-box hardening requires an exact full-row furniture match rather than a prefix or substring and requires at least one independent row to prove empty before returningempty.What Changed
_fm_composer_classify_leftbar(bin/fm-composer-lib.sh) no longer treats a placeholder-position idle-hint match alone as proof of an empty composer: it now tracksempty_seen, set only by an independently blank/ghost-stripped row, and returnsunknowninstead ofemptywhen no such corroboration exists.FM_COMPOSER_IDLE_RE_DEFAULTis tightened so theAsk anything...idle pattern only matches an optional single trailing quoted suggestion (([[:space:]]+"[^"]*")?$) instead of an unanchored prefix, so a real draft that starts with the placeholder phrase (e.g.Ask anything... please reply) is no longer swallowed as furniture; both_fm_composer_classify_leftbarandfm_composer_extract_selected_contentbuild and use this anchoredfurniture_reinstead of matching the raw idle regex.pending), a furniture-only left-bar row with no corroborating blank (classifiedunknown), and selected-content extraction preserving placeholder-prefixed input.Risk Assessment
✅ Low: The fix directly addresses the issue's root cause (unanchored idle-placeholder regex + missing independent-empty corroboration in the leftbar path), mirrors the sibling bordered-box hardening as required, is covered by new tests that reproduce the exact reported failure and pass/fail appropriately, and I traced the row-loop logic against both new and pre-existing test screens without finding a silent misclassification.
Testing
Ran the actual bash composer-classifier library through its existing test suite at the target commit (all pass, including two new regression assertions for the exact issue-#4477 shape), then live-reproduced the reported defect by temporarily substituting the pre-fix library file and observing the same test fail exactly as described, confirming this is a genuine fix; worktree was restored clean afterward.
bash tests/fm-composer-lib.test.shat target commit dd91570:ok - matrix: opencode's left-bar composer reads empty everywhere and scans the full active run(includes the 'opencode 1.18.30 placeho…ok - matrix: opencode's left-bar composer...line in the target-commit run.ok - fm_composer_extract_selected_content: scopes user content and excludes furniturein target-commit run includes the new assertion that 'Ask anything... please reply' extracts verbatim rather tha…Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-composer-lib.sh:1077- furniture_re="^(✅ **Test** - passed
✅ No issues found.
bash tests/fm-composer-lib.test.shat target commit dd91570:ok - matrix: opencode's left-bar composer reads empty everywhere and scans the full active run(includes the 'opencode 1.18.30 placeho…ok - matrix: opencode's left-bar composer...line in the target-commit run.ok - fm_composer_extract_selected_content: scopes user content and excludes furniturein target-commit run includes the new assertion that 'Ask anything... please reply' extracts verbatim rather tha…bash tests/fm-composer-lib.test.sh (target commit dd915706, bin/fm-composer-lib.sh as shipped) — 34/34 ok, exit 0bash tests/fm-composer-lib.test.sh (base commit a6618ddc bin/fm-composer-lib.sh swapped in, fixed test file retained) — reproduces the reported defect: 'expected pending, got empty' for the placeholder-prefixed draft, exit 1bash tests/fm-composer-lib.test.sh (restored target file) — re-verified clean pass, worktree confirmed clean via git status --short✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.