feat(backend): add Superset as an experimental runtime backend - #2698
Open
AviPeltz wants to merge 2 commits into
Open
feat(backend): add Superset as an experimental runtime backend#2698AviPeltz wants to merge 2 commits into
AviPeltz wants to merge 2 commits into
Conversation
Superset owns both the task worktree and terminal endpoint, like Orca, but addresses its terminal by a composite workspace:terminal target like cmux. Every empirical claim in bin/backends/superset.sh (CLI response shapes, the Enter-key single-space workaround, Ctrl-C-only interrupt support, and the missing dirty-check in `ws delete`) was live-verified against the real superset CLI v1.23.0 during authoring; see docs/verification/runtime-backends.md "Superset" for the dated evidence. Wires the new backend through fm-backend.sh's dispatch tables and endpoint validation, fm-spawn.sh's worktree/terminal lifecycle and abort cleanup, fm-teardown.sh's path-match safety gate (the CLI itself performs no dirty-worktree check, so this gate is the only protection), and every other backend-aware script and doc that already enumerates tmux/herdr/zellij/orca/cmux.
…y space injection
Owner
|
Speaking as Kun's firstmate: Reviewed the full diff. Superset is wired as an experimental, never-auto-detected backend (opt-in at the registry), with a new adapter, tests, and docs. It also amends VISION.md to name Superset as a session manager. That charter line is a product decision, not something I will auto-merge. I approved fork CI. Waiting on green checks including no-mistakes. |
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
bin/backends/superset.sh, a new adapter implementing capture, send-key, send-text-submit, kill, composer-state, and worktree create/remove/path against thesupersetCLI, addressing terminals via a composite<workspace_id>:<terminal_id>target.supersetinto the backend registry as experimental, spawn-capable, and worktree-owning (never auto-detected) acrossbin/fm-backend.sh,bin/fm-spawn.sh,bin/fm-teardown.sh,bin/fm-bootstrap.sh,bin/fm-composer-lib.sh,bin/fm-control.sh,bin/fm-control-lib.sh,bin/fm-supervise-daemon.sh,bin/fm-afk-launch.sh, andbin/fm-tmux-lib.sh, including new meta fields, endpoint validation, and abort/teardown cleanup paths.docs/superset-backend.mdand the.agents/skills/firstmate-superset/SKILL.mdskill documenting the adapter's verified behavior and limits (no secondmate spawns, no Escape/Ctrl-U, no true Enter-only submit — a bare Enter always injects a leading space), update related docs/README/AGENTS/CONTRIBUTING/VISION references, and addtests/fm-backend-superset.test.shplus updates to existing backend/bootstrap/teardown tests; a follow-up review pass removed a deadproject-idJSON-parsing branch from the adapter.Risk Assessment
✅ Low: This is a well-bounded, explicit-opt-in-only experimental backend that closely mirrors the already-established Orca adapter pattern throughout every touched file (spawn, teardown safety gates, endpoint validation, abort cleanup, control-key capability tables); the fix round correctly and precisely resolved both prior findings (removed the dead project-id branch, and strengthened documentation of the Enter-key space-injection limitation exactly per the user's explicitly authorized containment decision, without altering behavior), and a fresh full pass over the entire diff found no new correctness, security, or test-quality issues — all new tests exercise real functions against a fake CLI and assert observable behavior rather than grepping source text.
Testing
All targeted tests for the Superset backend feature and its review-commit cleanup pass (27/27 in the dedicated suite, 7/7 in teardown-endpoint-safety, the 3 relevant cases in fm-backend.test.sh, and the isolated bootstrap gating case); the one test failure encountered (fm-backend.test.sh's unrelated teardown-conformance case) was verified to pre-exist on the base commit in an isolated scratch worktree, so it's an environment/tooling gap (missing/incompatible axi) rather than a regression from this change.
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
bin/backends/superset.sh:280- fm_backend_superset_send_key's Enter case has no true 'press Enter only' primitive: it sends a literal space via --text on every invocation (the CLI rejects empty --text and has no dedicated enter-only flag). This differs materially from Orca's fm_backend_orca_send_key, which sends --text "" --enter (a genuine empty-text-plus-enter primitive that types nothing) and from cmux/zellij, which use a dedicated send-key primitive, not text typing. Because bin/fm-composer-lib.sh's fm_composer_submit_retry_core (reused unmodified here) calls the adapter's send-key function on every retry without retyping the original text, each retry after a swallowed/ineffective first Enter injects ANOTHER space character into whatever is still staged in the composer, rather than being a no-op. The header comment and docs/verification/runtime-backends.md only verify that a single trailing space is inert once; they do not show this was tested across the exact multi-Enter flow the code explicitly targets ('a slash-command popup placeholder fill gets the required second Enter'). If an intermediate Enter is consumed by a popup/autocomplete rather than submitting, the accumulated stray space(s) could alter a live-filtered popup selection or land mid-argument, silently submitting a different or malformed command instead of erroring.bin/backends/superset.sh:129- fm_backend_superset_json_get's 'project-id' field branch (v = data.id || "") is never invoked by any caller in this change; project id resolution for fm_backend_superset_project_id_for_path uses its own separate inline node script instead. This branch is unreachable dead code and can be removed.🔧 Fix: Remove dead project-id branch, document Enter-key space injection
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-backend-superset.test.sh— 27/27 pass (capture, runtime-check, send-key incl. the reviewed Enter/space-injection path, send-text-submit, composer-state, kill, remove-worktree, worktree-path, parse-target, project-id lookup/ensure, and fm-spawn.sh --backend superset integration)bash tests/fm-backend.test.sh— confirmed the 3 superset-specific cases (test_backend_validate_refuses_unknown,test_backend_validate_spawn_accepts_orca,test_backend_of_selector_matches_explicit_target_meta) pass; run halted afterward on an unrelated pre-existing failure (test_teardown_conformance_old_vs_new, an axi-tooling/environment gap) reproduced identically on the pre-change base commit 1cb900c in a scratch worktree, confirming it's not a regression from this branchbash tests/fm-teardown-endpoint-safety.test.sh— 7/7 pass, including the new Superset endpoint-record validation and generic-kill-refuses-empty-target caseisolated run oftest_superset_backend_gates_superset_tool_only_when_selectedfrom fm-bootstrap.test.sh (extracted to avoid the full suite's slow, unrelated cases) — pass: bootstrap gates the Superset CLI only when backend=superset is selectedgrepped tests/fm-backend-superset.test.sh and bin/backends/superset.sh for 'project-id' to confirm the dead branch removed in the review commit had no test coverage depending on it✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix: {"summary": "No lint fixes needed; ShellCheck/actionlint now on PATH pass clean"}
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.