ADR-platform-004
agentcanvas as general-purpose env, vlnce retained for Habitat-Sim binary constraint
Context
All development ran in the ac-vlnce conda env (Python 3.8, PyTorch 1.9+cu111, Habitat-Sim 0.1.7). Python 3.8 is EOL and blocks modern AI/ML libraries (transformers>=4.40, SAM2/3, LLM SDKs, openai>=1.0) that require Python 3.10+. The only thing that actually forces Python 3.8 is the habitat-sim 0.1.7 binary — everything else (web backend, nodesets, torch, HuggingFace) works on modern Python. The plugin server system (ADR-server-001) already supports cross-environment execution via server_python and ?mode=server.
Decision
(1) Create agentcanvas (Python 3.10+) as the general-purpose environment for all development, research, and runtime — the web backend, all nodesets in local mode, modern PyTorch 2.x, transformers, and any AI/ML tooling. This is THE environment; not a lightweight subset. (2) Retain vlnce (Python 3.8) only because habitat-sim 0.1.7's binary requires it. The two nodesets that depend on it (habitat.py, policy_cma.py) declare server_python pointing to the vlnce interpreter and run via ?mode=server (ADR-server-001). The Hydra eval harness (vlnworkspace/) also stays on vlnce since it imports habitat directly. (3) Establish a framework import boundary: the core backend (agentcanvas/backend/app/) must never directly import habitat, habitat_sim, vlnce_baselines, or habitat_baselines. General ML libraries (torch, numpy, PIL) are fine in nodesets. (4) Add an import guard test (test_import_boundary.py) that enforces this boundary. (5) from __future__ import annotations remains in all backend files for cross-version compatibility during the transition. (6) Backend framework deps documented in agentcanvas/backend/requirements.txt; ML deps installed via conda/pip in the agentcanvas env.
Alternatives
(a) Keep vlnce as the single env — rejected: Python 3.8 is EOL, blocks modern AI/ML library adoption, fragile upgrade path. (b) Lightweight backend-only env (no torch) — rejected: forces all ML nodesets into server mode unnecessarily; most nodesets need modern torch + transformers and should run in local mode. (c) Docker-based isolation — rejected: overkill for a research project. (d) Per-nodeset envs — rejected: over-engineering, only habitat is actually locked to 3.8.
Rationale
The constraint is singular: habitat-sim 0.1.7 requires Python 3.8. Everything else — the web backend, SAM, LLM tools, future HF-based nodesets — works on modern Python. agentcanvas is the general-purpose env where all development and research happens; vlnce is a legacy dependency, not a co-equal environment. The framework import guard ensures habitat-specific code never leaks into the core backend.
Affected docs
CLAUDE.md (environment section), roadmap.md (TODO #20)