feat: add cmux terminal backend slice#153
Open
mielyemitchell wants to merge 3 commits into
Open
Conversation
Reviewed cmux backend scope and captured first-slice constraints before implementation.\n\nVerification: docs-only change; inspected spec contents and scoped staged diff.
Remove the apostrophe from the no-mistakes guidance line so bash parses the generated here-doc reliably.\n\nVerification:\n- bash -n bin/fm-brief.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-secondmate-safety.test.sh
Add a backend-neutral terminal layer and wire cmux-aware spawn, send, peek, state, and teardown paths for first-slice ship/scout workers while keeping tmux as fallback.\n\nAlso adds cmux routing tests and updates the GOTMP teardown fixture to include the sourced terminal library.\n\nVerification:\n- bash -n bin/fm-terminal-lib.sh bin/fm-send.sh bin/fm-peek.sh bin/fm-crew-state.sh bin/fm-teardown.sh bin/fm-spawn.sh tests/fm-terminal-cmux.test.sh\n- tests/fm-terminal-cmux.test.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-send-secondmate-marker.test.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-send-settle.test.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-spawn-batch.test.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-crew-state.test.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-teardown.test.sh\n- env -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID full tests/*.test.sh suite in two passes\n- live cmux sandbox smoke: spawn/read/send/interrupt/teardown
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.
What changed
docs/cmux-terminal-backend/spec.mdto capture the terminal-backend design.bin/fm-terminal-lib.shfor backend-neutral terminal targeting.fm-brief.shparse failure caused by an apostrophe in generated no-mistakes guidance.Why
This introduces the first vertical slice of a cmux-native worker backend while preserving the existing tmux path as the default/fallback. It lets a firstmate task run in a visible cmux pane, receive instructions, be read by firstmate, and be cleaned up safely through existing treehouse safety checks.
How to verify
Already run locally:
bash -n bin/fm-terminal-lib.sh bin/fm-send.sh bin/fm-peek.sh bin/fm-crew-state.sh bin/fm-teardown.sh bin/fm-spawn.sh tests/fm-terminal-cmux.test.shtests/fm-terminal-cmux.test.shenv -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-send-secondmate-marker.test.shenv -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-send-settle.test.shenv -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-spawn-batch.test.shenv -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-crew-state.test.shenv -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-teardown.test.shenv -u CMUX_WORKSPACE_ID -u CMUX_SURFACE_ID tests/fm-secondmate-safety.test.shtests/*.test.shsuite in two passes withCMUX_WORKSPACE_ID/CMUX_SURFACE_IDunset.Files touched
docs/cmux-terminal-backend/spec.mdbin/fm-terminal-lib.shbin/fm-spawn.shbin/fm-send.shbin/fm-peek.shbin/fm-crew-state.shbin/fm-teardown.shbin/fm-brief.shtests/fm-terminal-cmux.test.shtests/fm-gotmp.test.sh