fix(compose): forward the Playwright reports dir into the container

scripts/tests/e2e/rerun-spec.sh opens with

    reports_base="${INFINITO_PLAYWRIGHT_REPORTS_BASE_DIR:?source scripts/meta/env/load.sh or run via make}"

and `make compose-playwright` runs it inside the development container, where
nothing carried that variable across the boundary. The documented target failed
on its first line. The image injects no BASH_ENV or profile entry, so compose's
environment block is the only channel in.

That target re-stages a role's specs from the repo and reruns them against the
live stack without redeploying -- seconds instead of hours -- so a broken entry
point costs far more than its size suggests. It is what proved the zammad AI
spec green today, reached only by supplying the variable by hand.

Only the reports dir is forwarded. INFINITO_PLAYWRIGHT_STAGE_BASE_DIR is
deliberately NOT, although fork/feature/svc-net-tor carries cca47b471a which adds
both. The two are not symmetric. REPORTS is a Jinja path_join over DIR_VAR_LIB,
which awk cannot parse, so the :? hard-fail is real and forwarding it is
necessary. STAGE is the bare literal /tmp/test-e2e-playwright, and the script's
fallback parses it from the same vars/main.yml the Ansible stager reads, deriving
repo_root from its own path -- so the fallback cannot fail anywhere the script
can run, and Ansible never reads the env var at all.

Forwarding STAGE would therefore add no capability while inserting a
higher-precedence source for a value whose only authority is that literal.
EnvBuilder.setdefault resolves `existing or value` against os.environ, and
Makefile exports BASH_ENV=load.sh which sources .env into every recipe, so a
stale value pins itself against the SPOT; `make dotenv-force` exists precisely to
break that pin. The divergence would surface as rerun-spec.sh's "missing staging
dir (run deploy first)", an error whose instruction cannot fix it.

MERGE NOTE: reconciling with cca47b471a needs a deliberate one-line resolution --
drop their STAGE line -- and no lint guards this in either direction, so it will
silently return otherwise.

Verified: the failure was reproduced, and the same command succeeded once the
variable was supplied, isolating the missing passthrough. At runtime the
container now shows REPORTS set and STAGE absent, with the fallback carrying
STAGE correctly.
Not verified: the repaired target has not been run, because picking up a new
environment entry needs the container recreated and that would destroy the stack
state this session built. Unfixed in either variant: the REPORTS :? still aborts
on DiD nodes reached through node.sh, which forwards no environment at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-08-24 15:12:09 +02:00
1 parent e7ab8f891a
commit 45804e9ad4
1 file changed
+1
+1
View File
@@ -81,6 +81,7 @@ services:
INFINITO_IP4: ${INFINITO_IP4}
INFINITO_IP6: ${INFINITO_IP6}
INFINITO_PLAYWRIGHT_KEEP: ${INFINITO_PLAYWRIGHT_KEEP}
INFINITO_PLAYWRIGHT_REPORTS_BASE_DIR: ${INFINITO_PLAYWRIGHT_REPORTS_BASE_DIR}
INFINITO_SRC_DIR: ${INFINITO_SRC_DIR}
INFINITO_SWARM_MGR_IP: ${INFINITO_SWARM_MGR_IP}
PYTHONHTTPSVERIFY: "1"