Skip to content

feat(mise): fold infra-linked env into per-service task env

Akram GASSEM requested to merge feat/mise-task-infra-env into main

A service launched via mise run <service>:<mode> got only the stack's contributes.env, so e.g. Spring Boot booted without the DB connection and failed with "Failed to configure a DataSource". The DB creds existed only in labdev env's contract, which the detached mise run never applied.

Since mise owns task execution and applies each task's [env], the env belongs there. CompileWorkspace now projects, per service, the env-contribution of every infra adapter the service links to (plan[].links → infra: → env-contribution phase), mirroring envrender.walkLinks, and layers it under the stack/addon contributes.env and workspace env.vars (later wins). mise run backend:run now carries DATABASE_URL / SPRING_DATASOURCE_* / PG* and the app boots with no eval "$(labdev env)".

CompileWorkspace gains a workspaceDir arg (cwd for the read-only env-contribution phase). Best-effort: a missing/failing infra adapter yields no projection rather than an error.

Merge request reports

Loading