Skip to content

fix: add flotherm to server driver paths#7

Merged
jiweiqi merged 4 commits intomainfrom
fix/flotherm-connect
Apr 10, 2026
Merged

fix: add flotherm to server driver paths#7
jiweiqi merged 4 commits intomainfrom
fix/flotherm-connect

Conversation

@jiweiqi
Copy link
Copy Markdown
Contributor

@jiweiqi jiweiqi commented Apr 10, 2026

Summary

  • Add "flotherm" to the solver whitelist in /connect, /exec, and /disconnect endpoints
  • Flotherm uses the same driver.launch()/run()/disconnect() interface as MATLAB and COMSOL but was missing from the server, causing "no launch path for solver: flotherm" on connect

Follow-up

  • Refactor server to eliminate solver-name whitelist entirely — route all drivers through DriverProtocol uniformly (tracked in playbook)
  • Flotherm driver should reject ui_mode="no_gui" since it requires a GUI process

Test plan

  • sim --host <win1> connect --solver flotherm succeeds with GUI mode
  • sim --host <win1> exec routes through driver.run()
  • sim --host <win1> disconnect tears down cleanly

🤖 Generated with Claude Code

Flotherm uses the same driver.launch()/run()/disconnect() interface as
MATLAB and COMSOL, but was missing from the server's solver whitelist,
causing "no launch path for solver: flotherm" on connect.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jiweiqi
Copy link
Copy Markdown
Contributor Author

jiweiqi commented Apr 10, 2026

Fixes #8

@jiweiqi
Copy link
Copy Markdown
Contributor Author

jiweiqi commented Apr 10, 2026

Test results (manual, win1 + Flotherm 2504)

  • sim --host <win1> connect --solver flotherm --ui-mode gui — session created successfully
  • sim --host <win1> exec "..." — routes through driver.run() (returns driver-level parse error, not a server 400, confirming correct routing)
  • sim --host <win1> disconnect — tears down cleanly

All three test plan items pass.

jiweiqi and others added 3 commits April 10, 2026 17:28
Every other driver kills its solver process on disconnect. Flotherm
defaulted to False, leaving orphaned floserv.exe processes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
floserv.exe is a child process spawned by flotherm.exe internally.
Killing only the parent left floserv orphaned. Now disconnect kills
floserv by stored PID first, then the parent flotherm.exe process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Flotherm spawns three processes: flotherm.exe, floserv.exe, and
floview.exe. Previous fix only killed floserv and flotherm, leaving the
floview GUI window orphaned. Now uses taskkill to clean up all three.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jiweiqi jiweiqi merged commit 6b829d9 into main Apr 10, 2026
xupeiwust pushed a commit to xupeiwust/sim-cli that referenced this pull request Apr 24, 2026
Parallel to fluent but with COMSOL-specific probe composition:
- _default_comsol_probes(enable_gui=) with _COMSOL_STDERR_RULES
  (JVM [ERROR]/[WARN], com.comsol.util.exceptions.FlException etc.)
- _default_comsol_readers(): Java-API-style SDK attr readers
  (model.physics.count, model.study.count, model.material.count,
  model.hist) — uses SdkAttributeProbe's new readers= mode since
  COMSOL's Model API is not a getattr-chain
- _COMSOL_EXC_MAP_RULES for DomainExceptionMapProbe:
  python.AttributeError "has no attr 'feature'" on ModelClient →
    comsol.sdk.method_not_found
  python.Exception "Java Exception" → comsol.java.fl_exception
  python.Exception "Failed to find a solution" → comsol.solve.failed
- ComsolDriver.run(code, label, timeout_s=) mirrors Fluent's wiring:
  snapshot workdir_before, call_with_timeout, build InspectCtx,
  collect_diagnostics → record["diagnostics"], record["artifacts"]
- svd-ai-lab#6 TUI + svd-ai-lab#7 log-file intentionally NOT wired — COMSOL session has
  no TUI concept, no per-session transcript (global %USERPROFILE%
  \.comsol\log is too noisy). Phase 3 may revisit.

L2 tests (test_comsol_run_wires_probes.py): 5 tests, mock MPh Model,
verify run() contract + channel 1/4 light-up + Python error surfacing
+ timeout path + preserved keys.

L3 integration (integration_comsol_agent_dialogue.py): 7-turn trace
against real heating_circuit.mph, per-channel hit report. Verified:
8/9 channels light up (svd-ai-lab#2 stderr + svd-ai-lab#6 TUI + svd-ai-lab#7 log structurally
dark per PLAN §九-channel matrix).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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