Repository navigation
Conversation
added 6 commits
September 23, 2026 01:19
When a composer holds exactly the doorbell line this home generates, it is our own unsent earlier ring, not user text. fm_task_inbox_ring now submits it with one Enter instead of returning 1 forever, and do_exit submits it and re-verifies empty instead of refusing; relaunch flows through do_exit. Any other pending text keeps the skip and the refusal. Matching is exact or whitespace-collapsed so a terminal-wrapped doorbell still identifies. New composer-content reads (fm_backend_composer_content dispatch plus thin per-adapter readers mirroring zellij's) feed the shared extractor, and the own-doorbell predicate lives once in fm-task-inbox-lib.sh for both callers. Live root cause on muse 1.3.0 (docs/verification/muse.md): a leading-slash popup swallows Enter by accepting the selection, but the colon-leading doorbell opens no popup and first-Enter submits, so no muse settle change. Tests: ring submits exact and wrapped doorbells, skips foreign and near-miss text; exit proceeds on own doorbell and refuses foreign text.
…ambiguous captures
…before doorbell submission
…cation remains blocked
Author
|
Hello maintainers - this contribution's CI runs are waiting on fork-workflow approval (action_required, no jobs yet). Could someone please approve them when convenient? Note: F1 acceptance is UNMET on Herdr - Herdr lossless capture not established; tracked separately. Thank you! |
|
Closed as superseded — this work already landed on main via #5374. — Kun's Firstmate |
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
Operator: fix the core issues. Plan item F1 from ~/projects/havenhaus-gtm/docs/plans/2026-09-23-core-orchestration-fixes.md, verbatim:
F1. Firstmate: submit or clear the doorbell when the composer holds Firstmate's own text
Row:
fm-composer-deadlock-and-doorbell-submit(P1, firstmate, ship, no-mistakes, yolo off).fm_task_inbox_ring, when the composer verdict ispending, read the composer (the stockpeek path) and compare it to the doorbell line this home generates. If it matches exactly,
send
fm-send.sh <target> --key Enter(the documented retry at fm-send.sh:1162) instead ofreturning 1. If it holds anything else, keep the skip. Firstmate may submit its own text; it
still never submits unknown text.
fm-control.sh exit|relaunch: a composer holding exactly the doorbell iscleared (submit, then proceed) rather than refused.
(fm-send.sh:80). If a longer settle for
harness=musemakes the first submit stick, add it.skips; exit with doorbell -> proceeds; exit with other text -> refuses.
Review: non-author exact-head (Opus 5.5 low is the current first rung while Sol/Astra are out).
Delivery: local guarded merge after review + live acceptance; upstream PR as contribution.
What Changed
Risk Assessment
🚨 High: The intended fleet backend still cannot recover its own pending doorbell, leaving the required durable fix incomplete.
Testing
Ran focused inbox, lifecycle, unsupported-backend, and popup-settle regressions successfully, including real tmux captures with stubbed agent/input behavior. No live Herdr/Muse scenario or screenshot was possible because this process is not Herdr-managed. No source changes or transient worktree artifacts remain.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-task-inbox-lib.sh:287- Intent requires “If it matches exactly” and “anything else, keep the skip,” but the added tr -d '[:space:]' fallback accepts different text. For example, editing the pending doorbell's quoted inbox path from '~ home/...' to '~/...' still passes and submits instructions referencing another directory. This extra matching path exceeds the authorized predicate. Remove whitespace-insensitive acceptance; any wrap reconstruction must preserve actual input whitespace. The shared extractor also normalizes whitespace, so its output alone cannot establish exact equality.bin/fm-control.sh:558- Exit captures the composer immediately after sending Enter and refuses on the first nonempty result. On tmux, send-keys acknowledges key delivery, not the application's processing or repaint: a delayed Muse frame can still show the doorbell although submission succeeds moments later, causing exit/relaunch to fail unnecessarily. Use a bounded wait for proven-empty state before proceeding, retaining refusal on timeout. The new fixture clears the pane synchronously inside send-keys and therefore masks this sequence.🔧 Fix applied.
1 error still open:
bin/fm-composer-lib.sh:1525- The new exact-content branch still accepts nonidentical input, contrary to “the composer text must equal the doorbell line ... byte for byte.” On tmux, a pending doorbell with an appended space is captured through fm_tmux_composer_capture without -N, which discards trailing spaces; this branch therefore returns the unchanged doorbell and ring/exit sends Enter. The new whitespace fixture bypasses that lossy capture behavior. Additionally, _fm_composer_select_cursorless stops at a blank row, so a multiline draft containing the doorbell, a blank line, and other text can satisfy the single-selected-row check. Require lossless capture and complete composer-boundary proof at the shared exact-content boundary; refuse when either cannot be established.🔧 Fix applied.
1 warning still open:
bin/fm-backend.sh:898- The new Herdr, Orca, and cmux content readers capture and parse screens but can never satisfy this dispatcher: it sets FM_COMPOSER_EXACT_CONTENT=1, while none of those readers supplies lossless=1, so the shared extractor always refuses. The authorized unsupported-backend behavior is refusal; these three new readers and their dispatch branches are unnecessary. Remove them and return failure directly for unsupported backends, retaining existing readers used elsewhere.🔧 Fix applied.
2 issues (1 error, 1 warning) still open:
bin/backends/herdr.sh:3136- Herdr's reader never supplies lossless=1, so the shared exact-content extractor always refuses. A Muse lane holding the exact doorbell therefore still skips every ring and refuses exit/relaunch. This contradicts the required own-doorbell recovery and the clarified requirement that “Herdr must be able to satisfy the exact-content check.” The new documentation acknowledges missing investigation, not proven API inability. Complete the Herdr lossless-capture investigation and behavioural regression, or obtain explicit approval to leave F1 unmet; do not weaken exact equality.bin/fm-backend.sh:900- The new Zellij dispatch branch invokes a reader that never supplies lossless=1, so it captures a pane only to unconditionally refuse. No intent requirement needs this ineffective path. Remove this dispatch branch and use the default refusal, retaining the existing Zellij reader for its other callers.🔧 Fix applied.
1 error still open:
bin/backends/herdr.sh:3136- Herdr still never supplies lossless=1, so the shared exact-content check always refuses: an exact pending doorbell continues to block ring and exit/relaunch. This contradicts the clarified requirement that “Herdr must be able to satisfy the exact-content check.” The new investigation explicitly leaves API capability unresolved; it does not establish the impossibility required for the authorized fallback. Complete capture verification and the behavioral regression in a Herdr-managed environment, or obtain explicit approval to leave F1 unmet. Preserve exact equality.test "${HERDR_ENV:-}" = 1— failed prerequisite checkbash tests/fm-task-inbox.test.shbash tests/fm-control.test.shbash tests/fm-composer-content-dispatch.test.shbash tests/fm-send-popup-settle.test.shgit status --short— clean after testing✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.