Skip to content

[P3] enhancements roundup: deploy health-poll, blue-green local builds, topology-aware status-all, parallel fleet fan-out, safer secret output #407

Description

@gfargo

Enhancement candidates from the audit

A batch of worthwhile improvements (not bugs) surfaced across subsystems.

  1. Deploy: replace the fixed 60s post-up sleep with a health poll. deploy.sh:230-231 (for i in $(seq 1 12); do sleep 5; …) always burns a minute even when ready in 3s and doesn't extend when slower. Reuse _bg_wait_healthy's poll loop; a real poll would also let standard deploy fail on crash-looping containers instead of printing success.
  2. Blue-green: honor BUILD_MODE=local. _bg_start_color (deploy_blue_green.sh:127-143) always pulls and never builds; local-build stacks only work by accident via up's implicit build, ignoring BUILD_ARGS/BUILD_PULL/--no-cache. bg_deploy_stack also runs registry_login unconditionally where standard deploy skips it for local/none.
  3. status-all: consult topology. cmd_status_all.sh:88-101 clears VPS_* and loads only the project-root env, so a [stacks]-mapped stack (host from topology, no env-file VPS_HOST) is probed against the local daemon and shows down while healthy remotely. Call topology_apply_to_env "$name" after the env load. Also emit epoch/ISO timestamps alongside the humanized "4h ago" strings (:281) for CI.
  4. Parallel fleet fan-out. fleet status/fleet history/sync --all loop hosts serially; each dead host costs the full ConnectTimeout=10. A bounded-parallel fan-out (temp-file-per-host + wait, as _group_logs already does) makes these usable at fleet scale. Also give group <cmd> a skipped count so passed+failed==total.
  5. Safer secret output. secrets export env-json/k8s-secret and keys api:generate/db:rotate print plaintext to stdout (CI logs). Offer --out <file> (chmod 600) / refuse-or-warn on non-TTY stdout. Consider gating the exec:// provider behind STRUT_ALLOW_EXEC_PROVIDER=1 so hydrating an untrusted pulled template can't execute silently.

Filed from the 2026-07-12 full-codebase audit (docs/AUDIT-2026-07-12.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Value-add / new featureaudit-2026-07From the 2026-07 full-codebase auditenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions