Skip to content

[codex] Add COMSOL live inspect targets#26

Merged
jiweiqi merged 1 commit into
mainfrom
codex/comsol-live-inspect-targets
May 11, 2026
Merged

[codex] Add COMSOL live inspect targets#26
jiweiqi merged 1 commit into
mainfrom
codex/comsol-live-inspect-targets

Conversation

@jiweiqi
Copy link
Copy Markdown
Contributor

@jiweiqi jiweiqi commented May 11, 2026

Summary

  • Wire comsol.model.describe, comsol.model.describe_text, and comsol.node.properties:<target> through ComsolDriver.query().
  • Reuse the existing live-model describe() / format_text() helpers and mark the describe output partial=true because the helper currently covers physics interfaces and features.
  • Add focused node-property lookup for both explicit dot paths, such as component.comp1.physics.ht.feature.temp1, and tag-only lookups, such as temp1.
  • Extend driver unit tests with a fake component/physics/feature tree for the three inspect targets.

Refs svd-ai-lab/sim-proj#141.

Why

The bundled COMSOL skill already told agents to use these inspect targets, but the driver only exposed session.health, comsol.model.identity, and ui.modes. Agents following the skill would hit unknown inspect target and fall back to manual read-only snippets. This PR closes that driver/skill contract gap.

Validation

  • uv run pytest tests/test_comsol_driver.py -q --basetemp .pytest_basetemp/comsol_query_targets -> 42 passed
  • uv run pytest tests -q --basetemp .pytest_basetemp/all -> 110 passed, 1 skipped
  • uv run sim --json check comsol -> detected COMSOL 6.4.0.293 at C:\Program Files\COMSOL\COMSOL64\Multiphysics, profile comsol_64_mph_1
  • Live CLI e2e:
    • uv run sim --json connect --solver comsol --ui-mode no_gui
    • uv run sim --json exec --file src\sim_plugin_comsol\_skills\comsol\base\workflows\block_with_hole\00_create_geometry.py --label live-query-geometry
    • uv run sim --json exec --file src\sim_plugin_comsol\_skills\comsol\base\workflows\block_with_hole\02_setup_physics.py --label live-query-physics
    • uv run sim --json inspect comsol.model.describe -> returned ok=true, what=physics, ht features including temp1
    • uv run sim --json inspect comsol.model.describe_text -> returned text including TemperatureBoundary and T0=373[K]
    • uv run sim --json inspect 'comsol.node.properties:component.comp1.physics.ht.feature.temp1' -> returned T0=373[K]
    • uv run sim --json inspect 'comsol.node.properties:temp1' -> returned T0=373[K]
  • Direct shared-desktop smoke: ComsolDriver().launch(ui_mode="gui", visual_mode="shared-desktop", desktop_timeout=90) -> effective_ui_mode=shared-desktop, model_builder_live=true, live_model_binding.ok=true, comsol.model.identity.ok=true, comsol.model.describe.ok=true
  • git diff --check -> clean apart from Windows CRLF conversion warnings

@jiweiqi jiweiqi marked this pull request as ready for review May 11, 2026 05:43
@jiweiqi jiweiqi merged commit fdd7468 into main May 11, 2026
1 check passed
@jiweiqi jiweiqi deleted the codex/comsol-live-inspect-targets branch May 11, 2026 05:43
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