Files
archie/internal
sam 63719cc3ec fix: restore [forge] token_env backward compat, fixing prod crash-loop
Both archied production containers (archie-core-archied-1 and -winter-1)
were crash-looping on carina with "forge token (engine \"env\", key
\"ARCHIE_GITHUB_TOKEN\") is required" despite being configured for gitea.

Root cause: the secrets-engine migration replaced [forge]'s flat
token_env string field with a {engine, key} struct (Forge.Token), but
dropped the old field entirely instead of keeping it as a deprecated
fallback like NATSConfig and TelegramConfig already do. TOML silently
ignores unknown keys, so deployed configs still using token_env had
their token config dropped without any warning, and finalize()
defaulted to demanding ARCHIE_GITHUB_TOKEN.

Fix: re-added Forge.TokenEnv and honor it in finalize() when the new
Token struct is unset, matching the existing NATS/Telegram pattern.
New-style [forge.token] still wins if both are present. Added
regression tests for both cases.

Operationally also fixed the two live configs on carina
(~/.config/archie/config.toml, winter.toml) to the new schema, and
added missing work_dir/db_path to winter.toml (its container had no
config-overlay, so it was defaulting to /root/.local/share/archie
instead of the mounted volume). Both containers verified healthy and
processing real issues after restart.
2026-07-27 04:13:04 +10:00
..