48-Hour Field Notes: Phantom Env Keys in Agent Infra Patches
Описание и применение
Скрипт inventory выявляет неиспользуемые переменные окружения, добавленные в патчи, предотвращая сбои при запуске.
Задача
Environment variables introduced in patches may never be used by the application, causing boot-time crashes that CI pipelines miss.
Результат
The inventory script revealed that several env keys added in patches were never used, preventing potential runtime failures and keeping CI pipelines reliable.
Рабочий процесс
- 1. Freeze baseline of env keys the repo currently reads by running the inventory script on the main branch.
- 2. For each new patch, run the inventory script again.
- 3. Compare the two sets to identify keys introduced by the patch that are not referenced in source code.
- 4. Flag or remove phantom keys before merging.
- 5. Integrate the script into CI to enforce the check automatically.
Доказательства
A thicker .env.example, a rewritten docker-compose.yml, and a GitHub Action that "only needed" PROD_DATABASE_URL plus CACHE_PASSWORD.
The script below is a proposal you can run locally; it is not a claim that any production fleet already ships it.
- Дата записи: 2026-09-09T21:15:14.751Z