Skip to content

feat(compute): multi-host compute profiles (HARN-5) - #62

Merged
obvious-autobuild[bot] merged 2 commits into
mainfrom
feat/multi-host-compute
Oct 11, 2026
Merged

obvious-autobuild[bot] merged 2 commits into
mainfrom
feat/multi-host-compute

Conversation

@obvious-autobuild

Copy link
Copy Markdown
Contributor

Why

Exactly one GPU box is nameable: the config speaks through a single [compute.ssh] table, so two lab machines cannot coexist in one fusionlab.toml, and the shared 8420/8420 defaults invite tunnel-port collisions between two FusionLab instances on the same laptop. (#43, HARN-5)

What

  • [compute.hosts.<name>] profiles — one table per GPU box, each carrying the same keys as [compute.ssh] (host, remote_dir, autostart, port, remote_port; port still renames to local_port for SshProvider).
  • Selection — FUSIONLAB_COMPUTE_HOST (env) wins over a [compute] host = "<name>" key in the toml; either names a profile. With no selector: a populated [compute.ssh] table still wins unchanged (the degenerate case — existing configs keep working byte-identically), a lone profile is auto-selected (unambiguous), and several profiles without a selection are a startup error, never a quiet pick.
  • Loud failures, per get_provider's contract — a selector naming an unknown host raises ValueError listing the known hosts, at ssh_options() and end-to-end through get_provider() (asyncssh is imported at connect time, so the error surfaces even without the remote extra).
  • Env still wins — FUSIONLAB_SSH_* overrides apply on top of whichever profile is selected (documented: leave them unset when switching hosts).
  • Zero-config default unchanged — no config at all still resolves to {}; the five pre-existing config tests are untouched and passing.
  • Docs/example — fusionlab.toml.example gains one populated profile plus a commented second box; docs/COMPUTE.md walks through the two-box setup; README and .env.example point at the selector.

Out of scope by design: the HARN-4 dispatch plumbing (async route shells, pool) is untouched — this is config resolution and provider selection only.

How to Review

  • fusionlab/compute/__init__.py — the entire code change: a new pure _ssh_table() (selection + loud errors) feeding the existing ssh_options() env merge. No provider construction, no dispatch, no worker changes.
  • tests/test_compute_config.py — 9 new tests; the posture test now inspects every [compute.hosts.*] profile in the shipped example. The five pre-HARN-5 tests are unchanged on purpose — they are the zero-config byte-compatibility pin.

Test Evidence

make test: 444 passed, 1 skipped (435 baseline + 9 new); uv run ruff check and uv run mypy fusionlab clean; the .githooks/pre-push gate re-ran the full suite green on push.

QA: backend-only config work — nothing rendered changes, so visual evidence does not apply; test evidence recorded via autobuild upload against the tested head SHA.

Human author: Tapan Ganatma Nakkina ([email protected])

Closes #43

🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact

ObviousApp and others added 2 commits October 11, 2026 20:06
[compute.hosts.<name>] tables — one per GPU box, each with the same keys as
[compute.ssh] (host, remote_dir, autostart, port, remote_port) — selected by
FUSIONLAB_COMPUTE_HOST (env) or [compute] host in fusionlab.toml. The single
[compute.ssh] table remains the degenerate case and still wins when no host is
selected; a lone profile is unambiguous; several profiles without a selector
or a selector naming an unknown host fail loudly (get_provider's contract),
never by silently picking a box. FUSIONLAB_SSH_* env overrides still beat the
selected profile. Zero-config default behavior is unchanged.

Closes #43.

Co-authored-by: Tapan Ganatma Nakkina <[email protected]>
Two profiles resolve to distinct option sets; env beats the selected profile;
[compute] host selects and FUSIONLAB_COMPUTE_HOST beats it; a lone profile
needs no selector; unknown hosts and ambiguous selections fail loudly (also
through get_provider); the legacy table still resolves alone and wins without
a selector. The example-config posture test now covers every
[compute.hosts.*] profile too; the five pre-HARN-5 tests are unchanged and
pass, pinning the zero-config default.

Co-authored-by: Tapan Ganatma Nakkina <[email protected]>
@obvious-autobuild
obvious-autobuild Bot marked this pull request as ready for review October 11, 2026 20:08

@ganatma ganatma left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Obvious

@obvious-autobuild
obvious-autobuild Bot merged commit 27d831b into main Oct 11, 2026
3 checks passed
@obvious-autobuild
obvious-autobuild Bot deleted the feat/multi-host-compute branch October 11, 2026 20:23
obvious-autobuild Bot added a commit that referenced this pull request Oct 12, 2026
Task-mode IA: Replay / Compare / Explore workspaces behind one hash grammar; shared shot-load state machine; anchored what-if as a Replay drawer; command palette; catalog absorbed into Compare with MJ units and catalog naming; a11y tokens; integrated main (#61 #62 #64) + post-audit fixes (CSV-export error surfacing 02c16c3, mobile compare-bar wrap 73b4048). V1-V10 sweep PASS at 73b4048; V8 capability parity PASS (72 controls, art_A29dHIEm).

Co-authored-by: Tapan Ganatma Nakkina <[email protected]>
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.

HARN-5: Multi-host compute config: [compute.hosts.<name>] profiles

2 participants