Issues / #98

land.yaml renderer drops keys when consecutive containers both have env:

open bug Project: landconfigregistry Reporter: 1 May 2026 18:35

Description

Rendered /etc/land.yaml on land-nimsforest-one (46.225.164.179) is malformed around lines 162-178: the `nimsforestviewmodeltreehouse` container block lost its `name:`/`lifecycle:`/`network:` keys during render and the orphan tail (`env:` + `roles:`) collides with the preceding `songbirdregistry`'s `env:` block.

Result: `land plant` and `land uproot` both fail at config load with:

Error: loading config: parsing containers: parsing container "songbirdregistry": yaml: unmarshal errors:
line 168: mapping key "env" already defined at line 165

With land disabled, every container on this host requires a fallback to manual `docker run` (per the per-service runbook hotfix path). Hit during agentclaudecode v0.10.1 deploy — see issue #95 for the trail.

The seed at `landconfigregistry/internal/store/seed_nimsforestorganisation.go:162-183` looks correct, so the bug is either in the renderer (Go text/template merge) or in stale role data in the landconfigregistry DB.

Repro: `ssh root@46.225.164.179 "sed -n '155,185p' /etc/land.yaml"`.

Fix: regenerate /etc/land.yaml from a clean re-seed of the role and verify each container block renders all 4-5 expected keys; if the bug reproduces from clean seed data, look at the renderer for collision in consecutive `env:`-only blocks.