Repository navigation
fix(composer): recognize Grok 1.0.5's oversized titled bottom border as a proven empty composer - #4455
Conversation
…t, restored tmux typed-title coverage
|
Speaking as Kun's firstmate: First look on HEAD Closes claim: WRONG (correcting publicly). Body says Contract-class: restore. Away-mode inject into a confirmed-empty idle supervisor is already specified; idle Grok 1.0.5's three-column titled bottom was defeating the cursorless Herdr geometry proof so the daemon deferred forever. Named VISION.md (per-rule):
Attestation: MATCH ( Overlaps: also touches Blocker: author must drop the auto-close of #3436 (Refs only). #3436 stays ready-for-pr for the leftover-watcher symptom. Re-triage after that (and green CI). Merge-eligible N. Firstmate-flag no. Security FYI: none. |
|
Speaking as Kun's firstmate: CI update on the same HEAD Still waiting-author on the Closes overstatement from the prior stamp: change |
|
Speaking as Kun's firstmate: this is merged. Thank you @pablontiv — really appreciate you taking the time on this. Note: body correctly uses |
Intent
Captain's intent: convert the incident-driven Firstmate messaging-reliability backlog into shipped fixes now. Fix GitHub issue #3436 in this fork and open a PR through the normal contribution flow, with exact issue linkage (the PR must close #3436).
Issue #3436 substance: while away mode was active on a Grok + Herdr primary, the sub-supervisor daemon could not inject escalations for over 8 hours (
fm away-mode inject WEDGED: 28224s undelivered), even though the pane was idle with an empty composer and the turn had ended. Daemon log showsinject deferred: supervisor composer not confirmed-empty (state=unknown: pending input, dead-shell prompt, or unreadable pane)repeating for hours: idle Grok classifies asunknownrather thanempty, so away-mode injection can never confirm it is safe to submit. A second, related symptom: a leftover watcher process never yielded and the daemon never took over the chain (watcher: already running pid ...looping instead of being taken over or refused loudly at AFK start).What Changed
_fm_composer_titled_bottom_okinbin/fm-composer-lib.shnow also accepts a titled bottom border that is exactlyFM_COMPOSER_GROK_TITLE_OVERHANG(3) columns wider than the aligned top/content rows, but only when the title matches the typedGrok <model> (<effort>)shape; any other oversized or malformed title still readsunknown.FM_COMPOSER_GROK_TITLE_OVERHANGconstant, documenting the issue Away-mode inject never delivers to an idle Grok pane (composer unknown all night) #3436 idle-capture provenance and that it is not re-verified against a live Grok install.docs/verification/runtime-backends.mdto replace the prior "grok 1.0.5 is stale, unknown/pending" staleness note with the root cause (three-column title overhang defeating the cursorless Herdr geometry check), the fix, and a note that this closes only Away-mode inject never delivers to an idle Grok pane (composer unknown all night) #3436's composer-misclassification symptom — the separate leftover-watcher symptom is tracked in afk daemon: SIGTERM shutdown can hang and the watcher child never retries after a stale-lock refusal #2270.tests/fm-composer-lib.test.shwidens the Grok titled-border matrix case to the real 3-column overhang and adds an unrecognized-oversized-title case (staysunknown);tests/fm-backend-herdr.test.shaddstest_composer_state_grok_oversized_title_preserves_safe_verdicts, proving idle readsempty, typed content stayspending, and an unrecognized oversized title staysunknownthrough the real Herdr composer-state path.Refs #3436
Risk Assessment
✅ Low: The fix round faithfully implements both previously-approved remedies (named FM_COMPOSER_GROK_TITLE_OVERHANG constant with provenance/caveat comment, matching doc caveat and #2270 scoping note, restored tmux typed-title coverage) without altering the classifier's behavior or introducing new logic paths.
Testing
Both touched test files pass in full against the target commit, and a manual swap-back to the base commit's fm-composer-lib.sh reproduces the exact pre-fix failure the new tests target, confirming this is a real regression test rather than a tautology; the fix's boundary (unrecognized/malformed oversized titles) was also driven live and correctly stays
unknown. The second issue symptom (leftover watcher takeover) is untouched by this diff and out of scope per the recorded decision, so it's reported untested rather than assumed.grok titled on tmux: expected empty, got 'unknown'and `issue #3436's idle Grok/Herdr…Evidence: Post-fix composer-lib matrix test (all pass)
Evidence: Post-fix herdr backend composer_state test (all pass)
Evidence: Pre-fix regression proof: same new test against base-commit fm-composer-lib.sh fails
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
bin/fm-watch.sh:1766- User intent states Issue Away-mode inject never delivers to an idle Grok pane (composer unknown all night) #3436 has two symptoms: (1) idle Grok/Herdr composer classifiesunknowninstead ofempty, blocking away-mode injection, and (2) 'a leftover watcher process never yielded and the daemon never took over the chain (watcher: already running pid ...looping instead of being taken over or refused loudly at AFK start)'. The intent requires 'Fix GitHub issue Away-mode inject never delivers to an idle Grok pane (composer unknown all night) #3436 ... the PR must close Away-mode inject never delivers to an idle Grok pane (composer unknown all night) #3436'. This diff only touches bin/fm-composer-lib.sh (the composer-classifier fix) plus its tests/docs; bin/fm-watch.sh's singleton-lock message at line 1766 ('watcher: already running pid $FM_LOCK_HELD_PID') and the surrounding takeover/refusal logic are completely untouched. Closing Away-mode inject never delivers to an idle Grok pane (composer unknown all night) #3436 with this diff would leave the second described symptom fully reproducible: a leftover watcher will still just loop the same log line instead of being taken over or refused loudly at AFK start.bin/fm-composer-lib.sh:870- The fix's core assumption ('Grok 1.0.5 renders its real model title three columns wider than its aligned top and content rows') is hardcoded as a literal 3-space overhang check ([ "$spaces" = "$expected " ]) validated only against a synthetic fixture the author wrote to match that exact assumption. docs/verification/runtime-backends.md:482 itself admits 'Grok was not installed on the verification machine for this 2026-09-14 change, so the live guard still owes a refresh against the current release rather than treating the portable capture as current live evidence.' If the real overhang width differs from exactly 3 columns (or varies with title/model-name length), the classifier still returnsunknownfor a genuinely idle live Grok pane, and the exact failure mode described in the issue (away-mode injection permanently deferred) remains reachable in production despite the PR claiming to fix it.tests/fm-composer-lib.test.sh:439- The prior test assertedassert_screen "grok typed on tmux" pending "$CAPS_TMUX" "$typed" 1(cursor-anchored tmux capability, titled border, typed content). The rewritten test replaces this withassert_screen "grok typed on herdr" pending "$CAPS_STYLED" "$typed"instead of adding it alongside the existing tmux case, so the new 3-column-overhang geometry path is no longer exercised under the cursor-anchored (CAPS_TMUX) capability profile for typed content — only the cursorless herdr profile is covered for that combination now.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
grok titled on tmux: expected empty, got 'unknown'and `issue #3436's idle Grok/Herdr…bash tests/fm-composer-lib.test.sh (34 assertions, exit 0)bash tests/fm-backend-herdr.test.sh (207 assertions, exit 0)Regression check: base-commit (036fec0) bin/fm-composer-lib.sh swapped in temporarily, same test files rerun ->grok titled on tmux: expected empty, got 'unknown'andissue #3436's idle Grok/Herdr composer should read empty, got 'unknown'fail as expected; file restored, worktree left clean (git status --shortempty)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.