Cleanup pass: stale references, duplicated helpers, legacy code, root docs #204
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Request (2026-10-15): clean up and update the infra config itself (scripts, Terraform, workflows,
setup/infra/manage) and the docs/README; remove duplicated and dead code; add shared libs or wizards where scripts repeat themselves. Not the roles. Findings from a read-only audit; each box is a small PR.A. Stale references (verified missing paths)
playbooks/test_config.yml,playbooks/deploy.yml,roles/forgejo/update-ai-scrapers.shdo not existdocs/runbooks/resize-node.mdpoints atdocs/DEPLOYMENT.md(the file isdocs/runbooks/deployment.md)docs/secrets-inventory.mdrows namesecrets/infra.sops.yml/vault.example.yml(neither exists; the vault issecrets/vault.sops.yml)roles/ci_ephemeral_provisioner/defaults/main.ymlcomment mentionsterraform/environments/ovh/ci-staging.tfvars(instance_type d2-4, does not exist; the decided runner size is d2-2): create it at the runner cutover or fix the commentB. Duplicated code -> shared libs
scripts/tests/lib.sh:check/bad/expectdefined separately in 9 test scriptsscripts/lib/log.sh:log_info/ok/warn/errordefined inrotate-secret.shandrotate-ovh-s3-credentials.shsay/ask/ask_secret/banner/confirm/finishare copied betweenovh-setup-wizard.shandcloudflare-migration-setup-wizard.sh(MIGRATION-ONLY: delete both after the cutovers instead of refactoring; ascripts/lib/wizard.shonly if a new wizard is written)confirmalso exists inscripts/lib/manage/core.shC. Dead / legacy code
scripts/lib/common-vault.sh(9 refs),rotate-secret.sh(6),rotate-ovh-s3-credentials.sh(6),verify-vaultwarden-token.sh(5),with-vault.sh,setup,managecore: removed together with #120 (needs P7 gate test 2, P8 and R closed first)secrets/backup/(R decision in #119)ansible-profile.cfg: only a doc line mentions it; decide keep or deleteD. Root docs
ROLLBACK.md(305 lines, still--workspace linode) overlapsdocs/runbooks/node-failure.mdand the failover runbooks: fold intodocs/runbooks/and make it provider-aware at the OVH cutover (#187)FUTURE_IMPROVEMENTS.mdhas strikethrough "done" entries: pruneCHANGELOG.mdstops at 2026-10-08: keep it current or retire it in favour of the PR historyRelated: #153 (operator tooling), #187 (OVH migration), #120 (Ansible Vault retirement).
Progress 2026-10-16: A stale references (#206), B shared test/log libs (#207), D ROLLBACK.md folded into runbooks/service-recovery.md and FUTURE_IMPROVEMENTS.md pruned (#209), C safe part (ansible-profile.cfg removed, #208), ./infra moved into scripts/lib/infra (#205), formatter pass (#211). Still open: the rest of C (Ansible Vault retirement: code branches, .vault_pass placeholders, secrets/backup/ pre-cutover files) waits on #120 and the owner's decision on the old backups.