Skip to content

fix(bin): submit the Herdr doorbell into a vim-mode Claude composer - #14

Merged
max-metaplanet merged 3 commits into
mainfrom
fm/herdr-doorbell-submit
Sep 25, 2026
Merged

max-metaplanet merged 3 commits into
mainfrom
fm/herdr-doorbell-submit

Conversation

@max-metaplanet

Copy link
Copy Markdown
Owner

Intent

On the herdr backend, the fm-send doorbell line reaches an idle Claude Code worker's input box but is never submitted, so the worker never learns an instruction is waiting. Observed twice in 20 minutes on live workers, and a third time since: fm-send printed "doorbell did not reach ", and the pane showed the input box holding ": Firstmate instruction waiting: list ..." unsent, in vim INSERT mode. Pressing Enter by hand made the worker handle the waiting message. Every affected pane had Claude Code editorMode set to vim. The line in the input box starts with ": ", so check whether a leading character is being eaten, or whether the line is typed while the input box is in vim command mode. This appeared after today's merge of the restart-control change (PR #10, which restores normal typing after an interrupt on vim-mode workers), so check whether that change is involved. Compare with upstream issue kunchenguid#5558 ("composer reader fails on an idle Claude Code pane, so text delivery, relaunch, and exit are all refused"), which describes the input-box reader failing to recognise an idle Claude Code screen. Fix it so a doorbell is submitted and verified, and a failed delivery is re-rung rather than left sitting in the input box.

What Changed

  • On Herdr, when a Claude composer refuses a send, bin/backends/herdr.sh now clears it and tries to recover exactly once. The usual cause is vim command mode eating the start of the payload: : Firstma gets read as editor commands. The new fm_backend_herdr_modal_entry_ensure checks for -- INSERT -- in the composer footer. If it is missing, it types i, and counts the fix only if the indicator then shows and the composer is still empty. After that it retypes the payload and checks it again. If the composer can't be verified empty after a refusal, the send now reports a new unaccounted verdict, not unknown.
  • bin/fm-task-inbox-lib.sh now counts both send-failed and unaccounted as a failed doorbell ring, so the watcher rings again instead of leaving a half-typed line in the input box. unknown, which covers "Enter was pressed but not confirmed", still counts as rung. The fm-send.sh and remote secondmate notices now say "did not reach, or could not be confirmed there".
  • The modal-composer indicator, key and footer matcher moved from bin/fm-control-lib.sh into bin/fm-composer-lib.sh as fm_composer_modal_entry_signal, fm_composer_modal_entry_key and fm_composer_modal_entry_shown. Lifecycle control and Herdr text delivery now share them. The matcher reads -- INSERT -- only in the rows below the composer, so a transcript that quotes it doesn't count. Docs cover the new behaviour, and docs/verification/runtime-backends.md records the live Herdr 0.9.1 / Claude Code 2.1.282 check. Unit and live e2e tests were extended.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: Both fixes from the previous round are narrow and correct. unaccounted is emitted only on the herdr paths where Enter was never pressed. Every caller that switches on the verdict sends it to the same branch unknown used to reach: fm-send's refusal default, fm-control's non-send-failed path, kimi/rovo spawn, and the daemon's non-empty check. The only change is that the ring returns 2 for it. The INSERT matcher now reads only the rows below the bottom-most composer envelope that a prompt glyph proves (the pi-pair scan keeps the last pair). A false negative there fails safe: the typed probe key is cleared and the result is send-failed. The one stale doc sentence is the only issue found.

Testing

The repo's live Herdr e2e guard (all 5 cases) and an ad-hoc live driver were run against real Claude Code in throwaway fm-lab-* sessions created with bin/fm-herdr-lab.sh; each lab was torn down afterwards and the default session was never touched. The driver showed the bug on the base commit: in command mode the ring returned 2 and nothing was submitted. On HEAD the full ': Firstmate instruction waiting…' line was submitted in plain command mode. It was also submitted when the transcript contained a decoy '-- INSERT --' line, and Claude started a turn both times. Pane captures are saved as evidence. The targeted unit suites for the rung/failed-ring contract, secondmate drain, footer matcher, herdr backend, and control all passed. The only exception was one fm-wake-queue concurrent-lock test, which failed once and then passed on two re-runs; it is an unrelated timing flake. This is a terminal UI with no visual rendering, so text pane captures stand in for screenshots.

  • Live validation: ✅ go - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Doorbell rung into an idle vim-mode Claude whose composer is taking text (INSERT) is submitted and the composer is left empty ✅ pass live live-herdr-doorbell-e2e.txt: 'submits the doorbell to a vim-mode composer taking text'
Doorbell rung into a vim-mode Claude that an Escape left in command mode is recovered: the full ': Firstmate instruction waiting' line is submitted and Claude starts a turn (base commit fails the same… ✅ pass live live-herdr-doorbell-e2e.txt (recovers ... command mode); head-command-mode.txt rc=0 with submitted line; base-command-mode-repro.txt rc=2 on base
Adversarial: '-- INSERT --' shown in the transcript above a command-mode composer is not taken as text-entry mode, and the doorbell is still recovered and submitted ✅ pass live head-transcript-insert-adversarial.txt: transcript shows '-- INSERT --', footer does not, ring rc=0, full doorbell submitted
Doorbell to a non-modal (editorMode normal) Claude composer still submits (no regression) ✅ pass live live-herdr-doorbell-e2e.txt: 'submits the doorbell to a Claude composer with no modal editor'
Existing submit-confirm behaviour unchanged: a plain steer and a U+2063 away-supervisor payload both confirm empty and render a reply ✅ pass live live-herdr-doorbell-e2e.txt first two ok lines
A doorbell whose typed fragment cannot be accounted for returns a failed ring (rc 2), so the watcher re-rings it; an Enter pressed without confirmation (unknown) still counts as rung, including on the… ⏸️ untested no The prior payload did not establish a live result: the unaccounted-fragment and unknown-after-Enter verdicts depend on a race or an unreadable composer that a real Claude does not produce on demand, s…
Evidence: Live e2e guard transcript (real Claude 2.1.282 / herdr 0.9.1)

Source: Live e2e guard transcript (real Claude 2.1.282 / herdr 0.9.1)

ok - live Herdr submit confirm: Claude Code (2.1.282 (Claude Code)) on herdr 0.9.1 reports empty and renders the requested reply in isolated session fm-lab-herdr-submit-con-26355-32528
ok - live Herdr submit confirm: Claude Code (2.1.282 (Claude Code)) on herdr 0.9.1 submits a U+2063 away-supervisor payload whose read-back drops the mark
ok - live Herdr doorbell: Claude Code (2.1.282 (Claude Code)) on herdr 0.9.1 submits the doorbell to a vim-mode composer taking text
ok - live Herdr doorbell: Claude Code (2.1.282 (Claude Code)) on herdr 0.9.1 recovers and submits the doorbell to a vim-mode composer an interrupt key left in command mode
ok - live Herdr doorbell: Claude Code (2.1.282 (Claude Code)) on herdr 0.9.1 submits the doorbell to a Claude composer with no modal editor
Evidence: Base commit reproduction: vim command mode, ring rc=2, doorbell never submitted

Source: Base commit reproduction: vim command mode, ring rc=2, doorbell never submitted

===== BIN_ROOT=/tmp/fm-base MODE=command
----- pane before ring (after Escape):
gs '{"feedbackDrafts":"off","editorMode":"vim"}'
 ▐▛███▛█   Claude Code v2.1.282
▝▜██████▀  Opus 5.5 · Claude Team
 ▝▝   ▝▝   /private/tmp/fm-base


───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⚠ Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker · restart with CLAUDE_CODE_FORCE_SESSION_P…
  Opus 5.5 | p/t/fm-base | ⚙️22 | ⚡100% | P15=E18=U22=J07:40:15                                   ◐ medium · /effort
  ⏵⏵ bypass permissions on (shift+tab to cycle)
----- fm_task_inbox_ring rc=2 (0 rang, 2 failed)
----- pane after ring:
/private/tmp/fm-base
> CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false CLAUDE_CODE_SEND_FEEDBACK=0 claude --dangerously-skip-permissions --settin
gs '{"feedbackDrafts":"off","editorMode":"vim"}'
 ▐▛███▛█   Claude Code v2.1.282
▝▜██████▀  Opus 5.5 · Claude Team
 ▝▝   ▝▝   /private/tmp/fm-base


───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⚠ Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker · restart with CLAUDE_CODE_FORCE_SESSION_P…
  Opus 5.5 | p/t/fm-base | ⚙️24 | ⚡100% | P15=E18=U22=J07:40:19                         Ctrl+Y to paste deleted text
  -- INSERT -- ⏵⏵ bypass permissions on (shift+tab to cycle)
Evidence: HEAD: vim command mode, ring rc=0, doorbell submitted and Claude working

Source: HEAD: vim command mode, ring rc=0, doorbell submitted and Claude working

===== BIN_ROOT=~/.no-mistakes/worktrees/61c6dd39b831/01M3AQJYASTNY35A3R4TH5WR30 MODE=command
----- pane before ring (after Escape):
gs '{"feedbackDrafts":"off","editorMode":"vim"}'
 ▐▛███▛█   Claude Code v2.1.282
▝▜██████▀  Opus 5.5 · Claude Team
 ▝▝   ▝▝   ~/.no-mistakes/worktrees/61c6dd39b831/01M3AQJYASTNY35A3R4TH5WR30


───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⚠ Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker · restart with CLAUDE_CODE_FORCE_SESSION_P…
  Opus 5.5 | ~/./w/6/01M3AQJYASTNY35A3R4TH5WR30 [HEAD ✓] | ⚙️19 | ⚡100% | P15=E18=U22=J07:40:37   ◐ medium · /effort
  ⏵⏵ bypass permissions on (shift+tab to cycle)
----- fm_task_inbox_ring rc=0 (0 rang, 2 failed)
----- pane after ring:


❯ : Firstmate instruction waiting: list '/tmp/fm-vimbell.hjwNbs/guard-task.inbox'/*.msg and, in numeric order, read
  and act on each, then mv each handled file to '/tmp/fm-vimbell.hjwNbs/guard-task.inbox'/handled/.

✶ Sketching…

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⚠ Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker · restart with CLAUDE_CODE_FORCE_SESSION_P…
  Opus 5.5 | ~/./w/6/01M3AQJYASTNY35A3R4TH5WR30 [HEAD ✓] | ⚙️46 | ⚡100% | P15=E18=U22=J07:40:42
  -- INSERT -- ⏵⏵ bypass permissions on (shift+tab to cycle)
                                                                                         Ctrl+Y to paste deleted text
Evidence: HEAD adversarial: '-- INSERT --' in transcript above command-mode composer, doorbell still recovered and submitted

Source: HEAD adversarial: '-- INSERT --' in transcript above command-mode composer, doorbell still recovered and submitted

===== BIN_ROOT=~/.no-mistakes/worktrees/61c6dd39b831/01M3AQJYASTNY35A3R4TH5WR30 MODE=transcript
----- pane before ring (after Escape):

⏺ marker
  -- INSERT --

✻ Brewed for 5s · done 6:41 PM

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⚠ Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker · restart with CLAUDE_CODE_FORCE_SESSION_P…
  Opus 5.5 | ~/./w/6/01M3AQJYASTNY35A3R4TH5WR30 [HEAD ✓] | 🔴43.5¢ 17.1s | ⚙️21 | ⚡100% | P15=E18=U22=J07:41:06
  ⏵⏵ bypass permissions on (shift+tab to cycle)
----- fm_task_inbox_ring rc=0 (0 rang, 2 failed)
----- pane after ring:

❯ : Firstmate instruction waiting: list '/tmp/fm-vimbell.KmjkWL/guard-task.inbox'/*.msg and, in numeric order, read
  and act on each, then mv each handled file to '/tmp/fm-vimbell.KmjkWL/guard-task.inbox'/handled/.

· Swirling… (2s · ↓ 24 tokens)
  ⎿  Tip: Name your conversations with /rename to find them easily in /resume later

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⚠ Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker · restart with CLAUDE_CODE_FORCE_SESSION_P…
  Opus 5.5 | ~/./w/6/01M3AQJYASTNY35A3R4TH5WR30 [HEAD ✓] | 🔴43.5¢ 20.3s | ⚙️24 | ⚡100% | P15=E18=U22=J07:41:10
  -- INSERT -- ⏵⏵ bypass permissions on (shift+tab to cycle)
                                                                                         Ctrl+Y to paste deleted text
Evidence: Live driver script used for the base/HEAD/adversarial runs

Source: Live driver script used for the base/HEAD/adversarial runs

#!/usr/bin/env bash
# Ad-hoc live driver: ring the real steering doorbell into a vim-mode Claude
# pane left in command mode by Escape, using the bin/ tree at $1.
# mode=command: plain command mode. mode=transcript: first make Claude print
# "-- INSERT --" in its transcript, then Escape, then ring.
set -u
BIN_ROOT=$1; MODE=$2
LAB=~/.no-mistakes/worktrees/61c6dd39b831/01M3AQJYASTNY35A3R4TH5WR30/bin/fm-herdr-lab.sh
ORIGINAL_PATH=$PATH
SESSION=$("$LAB" name vimbell-$MODE)
TMP=$(mktemp -d /tmp/fm-vimbell.XXXXXX); mkdir -p $TMP/fakebin
cleanup() { PATH="$ORIGINAL_PATH" "$LAB" teardown "$SESSION"; rm -rf "$TMP"; }
trap cleanup EXIT
cat > $TMP/fakebin/herdr <<W
#!/usr/bin/env bash
args=("\$@"); n=\${#args[@]}
[ "\${args[\$((n-2))]}" = --session ] && [ "\${args[\$((n-1))]}" = "$SESSION" ] || { echo refused >&2; exit 97; }
exec env PATH="$ORIGINAL_PATH" "$LAB" run "$SESSION" "\${args[@]:0:\$((n-2))}"
W
chmod +x $TMP/fakebin/herdr
"$LAB" provision "$SESSION" || exit 1
export PATH="$TMP/fakebin:$ORIGINAL_PATH"
lab() { env PATH="$ORIGINAL_PATH" "$LAB" run "$SESSION" "$@"; }
. "$BIN_ROOT/bin/backends/herdr.sh"
. "$BIN_ROOT/bin/fm-task-inbox-lib.sh"
wait_idle() { local i=0; while [ $i -lt 90 ]; do
  case "$(lab agent get "$1" 2>/dev/null | jq -r '.result.agent.agent_status // empty')" in
    idle|done) return 0;;
    blocked) case "$(lab pane read "$1" --source visible 2>/dev/null)" in *'Yes, I trust this folder'*) lab pane send-keys "$1" down enter >/dev/null;; esac;;
  esac; i=$((i+1)); sleep 1; done; return 1; }
PANE=$(lab workspace create --cwd "$BIN_ROOT" --label vimbell --no-focus | jq -er '.result.root_pane.pane_id')
lab pane run "$PANE" "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false CLAUDE_CODE_SEND_FEEDBACK=0 claude --dangerously-skip-permissions --settings '{\"feedbackDrafts\":\"off\",\"editorMode\":\"vim\"}'" >/dev/null
wait_idle "$PANE" || { echo "never idle"; exit 1; }; sleep 2
if [ "$MODE" = transcript ]; then
  fm_backend_herdr_send_text_submit "$SESSION:$PANE" "Reply with exactly these two lines and nothing else: first line 'marker', second line '-- INSERT --'" 3 0.4 0.4 >/dev/null
  sleep 3; wait_idle "$PANE"; sleep 2
fi
lab pane send-keys "$PANE" escape >/dev/null; sleep 1
echo "===== BIN_ROOT=$BIN_ROOT MODE=$MODE"
echo "----- pane before ring (after Escape):"; lab pane read "$PANE" --source visible | tail -12
REC=$(fm_task_inbox_write "$TMP" guard-task "reply is not required; this is a delivery guard")
rc=0; fm_task_inbox_ring herdr "$SESSION:$PANE" "$REC" || rc=$?
echo "----- fm_task_inbox_ring rc=$rc (0 rang, 2 failed)"
sleep 2
echo "----- pane after ring:"; lab pane read "$PANE" --source visible | tail -14
- Outcome: ⚠️ 1 info across 1 run (25m9s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ bin/fm-task-inbox-lib.sh:332 - The ring now returns 2 for unknown on every backend, not only for the Herdr fragment case this change fixes. unknown is also the verdict when Enter was already pressed but the backend could not confirm the submit. Two examples: tmux fm_tmux_submit_enter_core returns unknown when a harness like pi has an unclassifiable composer and its busy flip is not seen within the 2×0.4s budget, and Herdr returns unknown when wait_for_working answers unknown. The main watcher ladder records the ring whatever the return code, so for it only the wording changes. But secondmate_ring_to_drain (bin/fm-watch.sh:822/924) treats any non-zero return as a failed ring. It skips writing the ring marker and falls straight through to the 'check: secondmate wake-loop stalled' captain alert. Before this change, the likely-delivered drain steer was counted and the watcher waited another interval. Scenario: a secondmate whose submit reads unknown after a successful Enter now raises a stall alert right away instead of being given time to drain. The intent only requires Herdr doorbells to be submitted, verified and re-rung; the watcher re-rings on its own timer either way. Decide whether unknown should stay a success for the ring, or whether secondmate_ring_to_drain should keep treating it as rung (for example, by mapping only rc 2 caused by send-failed to failure).
  • ⚠️ bin/fm-composer-lib.sh:1796 - fm_composer_modal_entry_shown greps the whole visible viewport for -- INSERT --, not just the composer footer. The doorbell recovery in fm_backend_herdr_modal_entry_ensure returns 'already taking text' as soon as that string appears anywhere on screen. A worker's transcript can easily show it: for example, a firstmate worker that just read or edited fm-composer-lib.sh or these docs, or any turn that talks about vim. If the composer is really in command mode at that moment, the recovery types no i, the retyped doorbell is eaten again, and the ring ends as send-failed. That is the original failure this change was meant to fix. Limit the match to the footer rows below the composer, using the shared composer geometry, so that transcript text cannot count as proof of text-entry mode. The fm-control lifecycle restore uses the same shared matcher and would benefit too.

🔧 Fix applied.
1 info still open:

  • ℹ️ docs/herdr-backend.md:239 - The fix round renamed the herdr pre-Enter verdict to unaccounted. It covers a refused payload, or the text-entry probe character, that could not be verified as cleared. This line still says 'If the composer cannot be verified empty again, the submit reports unknown instead'. Readers and operators who see verdict=unaccounted in fm-send's 'text not submitted' error will not find it documented, and the doc now contradicts herdr.sh:3408/3414. Fix: update the sentence to unaccounted, and say that Enter was never pressed and that the ring reports it as failed.
⚠️ **Test** - 1 info
  • ℹ️ tests/fm-wake-queue.test.sh - The 'concurrent append/drain subprocess' case in tests/fm-wake-queue.test.sh failed once ('queue lock could not be acquired safely') and then passed on two re-runs. This change leaves bin/fm-wake* and bin/fm-watch.sh untouched, so it is a timing flake unrelated to this change.
  • Live validation: ✅ go - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Doorbell rung into an idle vim-mode Claude whose composer is taking text (INSERT) is submitted and the composer is left empty ✅ pass live live-herdr-doorbell-e2e.txt: 'submits the doorbell to a vim-mode composer taking text'
Doorbell rung into a vim-mode Claude that an Escape left in command mode is recovered: the full ': Firstmate instruction waiting' line is submitted and Claude starts a turn (base commit fails the same… ✅ pass live live-herdr-doorbell-e2e.txt (recovers ... command mode); head-command-mode.txt rc=0 with submitted line; base-command-mode-repro.txt rc=2 on base
Adversarial: '-- INSERT --' shown in the transcript above a command-mode composer is not taken as text-entry mode, and the doorbell is still recovered and submitted ✅ pass live head-transcript-insert-adversarial.txt: transcript shows '-- INSERT --', footer does not, ring rc=0, full doorbell submitted
Doorbell to a non-modal (editorMode normal) Claude composer still submits (no regression) ✅ pass live live-herdr-doorbell-e2e.txt: 'submits the doorbell to a Claude composer with no modal editor'
Existing submit-confirm behaviour unchanged: a plain steer and a U+2063 away-supervisor payload both confirm empty and render a reply ✅ pass live live-herdr-doorbell-e2e.txt first two ok lines
A doorbell whose typed fragment cannot be accounted for returns a failed ring (rc 2), so the watcher re-rings it; an Enter pressed without confirmation (unknown) still counts as rung, including on the… ⏸️ untested no The prior payload did not establish a live result: the unaccounted-fragment and unknown-after-Enter verdicts depend on a race or an unreadable composer that a real Claude does not produce on demand, s…
  • FM_HERDR_SUBMIT_CONFIRM_LIVE=1 bash tests/fm-herdr-submit-confirm-live-e2e.test.sh (real Claude in an fm-lab-* session: 2 existing submit-confirm cases + 3 new doorbell cases)
  • drive-vim-doorbell.sh &lt;base-8c1679a-tree&gt; command: reproduced the bug on the base commit in a real vim-mode Claude after Escape
  • drive-vim-doorbell.sh &lt;HEAD worktree&gt; command: same setup on HEAD, real fm_task_inbox_ring
  • drive-vim-doorbell.sh &lt;HEAD worktree&gt; transcript: adversarial run where Claude's reply prints -- INSERT -- in the transcript, then Escape, then ring
  • bash tests/fm-task-inbox.test.sh (failed-ring vs unconfirmed-Enter-counts-as-rung, re-ring ladder)
  • bash tests/fm-wake-queue.test.sh (secondmate drain counts an unknown submit as rung; run 3x)
  • bash tests/fm-composer-lib.test.sh (footer-only INSERT matcher)
  • bash tests/fm-backend-herdr.test.sh
  • bash tests/fm-control.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Claude's optional vim editor mode gives its composer a command mode whose
keystrokes are editor commands, and Escape - Claude's own interrupt key -
is what leaves text entry. A doorbell typed into a composer left there is
eaten from the front: `: Firstma` becomes the space, find-backwards,
replace, till and append commands, so only `te instruction waiting: ...`
is inserted. The Herdr payload proof correctly refuses that fragment, and
the steer was reported as a doorbell that did not reach the pane while no
instruction was ever delivered.

The adapter now recovers a refusal the mode caused, exactly once. After
the refused fragment is cleared back to the proven-empty state the send
started from, it checks the harness's text-entry indicator: an eaten
payload usually ends on an insert command and has already restored text
entry itself, so nothing is typed, and only an absent indicator makes the
adapter type the text-entry key - which counts only when the indicator
appears while the composer still reads empty. The payload is then typed
and proven a second time before Enter, so the whole doorbell is submitted
rather than its remainder. A payload still refused after that is reported
send-failed with the composer empty.

The steering ring no longer counts an unaccountable delivery as rung. A
backend verdict of `unknown` means it could confirm neither the
submission nor that its own half-typed text is gone, and a composer still
holding that fragment answers every later ring with the pending skip, so
both `unknown` and `send-failed` now report a failed ring and the
watcher's re-ring is expected rather than a surprise. `pending` keeps its
meaning: the composer provably holds the complete doorbell, which the
next ring submits.

The indicator, the text-entry key, and how the indicator is recognized
move to bin/fm-composer-lib.sh, the composer owner, because delivery and
lifecycle control now both read them; bin/fm-control.sh keeps its own
restore and sources that owner directly.

Two things this is NOT. It is not the composer-reader defect in
kunchenguid#5558: the reader identified the idle pane and the
fragment correctly, and refusing that fragment was the right call. And it
is not a consequence of the restart-control change in #10 - the tail
capture width that change replaced refuses the identical fragment,
measured live against the same pane.

Verified live in an isolated Herdr lab on herdr 0.9.1 with Claude Code
2.1.282, editorMode pinned per pane: the doorbell is submitted to a
composer taking text, to one an Escape left in command mode, and to one
with no modal editor.
@max-metaplanet
max-metaplanet merged commit de888f6 into main Sep 25, 2026
19 checks passed
max-metaplanet added a commit that referenced this pull request Oct 6, 2026
Carried from fork commit de888f6 (#14).

bin/backends/herdr.sh keeps this commit's type-prove-recover loop, which the
conflict's shared tail already belongs to, but reads the composer through
upstream's full visible viewport rather than this commit's 200-row tail.
Upstream's read is the stronger one and its own regression covers the case this
commit's width was chosen for, so the recovery loop now sits on top of it.

bin/fm-send.sh keeps upstream's `$ring_retry`, which reports whether the retry
ring was actually recorded instead of asserting that the watcher will re-ring, and
keeps this commit's wording for the unconfirmed case, because an unconfirmed
submission now counts as a failed ring too.

docs/herdr-backend.md takes this commit's description, which is what the merged
code does: a clear that cannot be verified reports `unaccounted`, and a cleared
refusal gets exactly one modal recovery.

docs/verification/runtime-backends.md keeps both records, which measure different
findings.
This commit's record claimed the 200-row proof read was not involved; since the
read is now the full viewport, that clause states the proof width is not involved
and points at the viewport section rather than naming a width this branch no
longer uses.
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