Skip to content

Pre req safeguards - #10

Merged
MarcSchlichting merged 3 commits into
mainfrom
pre-req-safeguards
Jun 23, 2026
Merged

MarcSchlichting merged 3 commits into
mainfrom
pre-req-safeguards

Conversation

@MarcSchlichting

Copy link
Copy Markdown
Collaborator

Preflight prerequisite checks

  • Added upfront preflight checks that run before any work begins on aquila host up and aquila client up, validating all
    prerequisites and printing a color-coded report with remediation hints.

Host checks (host up)

  • Python >= 3.10 — verifies interpreter version
  • Node.js >= 23 — verifies Node.js major version
  • npm — verifies npm is on PATH
  • Docker daemon — verifies Docker is installed, running, and the user has permission (detects missing docker group
    membership)
  • Docker Compose — verifies docker compose plugin or standalone docker-compose
  • Port availability — checks frontend, backend API, discovery, and Postgres ports, with flag-specific hints (e.g.
    --host-frontend-port)

Client checks (client up)

  • Python >= 3.10 — verifies interpreter version
  • Docker — checks Docker availability (shown independently)
  • Podman — checks Podman availability (shown independently); only fails if neither runtime is available
  • GPU driver (nvidia-smi) — warns if not found (does not block startup)
  • NVIDIA Container Toolkit — warns if nvidia-ctk binary and CDI specs are missing (does not block startup)
  • Port availability — checks client API port

Output and UX

  • Color-coded output: green ✓ for pass, red ✗ for fail, yellow ! for warnings
  • Each failed/warned check shows a → remediation hint
  • On failure, prompts interactively with Continue anyway? [y/N]: so the user can bypass
  • Non-interactive sessions (piped input, systemd) exit immediately on failure
  • Warnings never block startup

Data model

  • CheckStatus enum (PASS, FAIL, WARN) and PreflightResult dataclass added to aquila/cli.py

Tests

  • 23 new test cases in tests/test_cli.py covering:
    • Each individual check function (Python, Node, npm, Docker, Compose, Docker client, Podman client, nvidia-smi,
      nvidia-ctk, port)
    • Both orchestrators (preflight_host, preflight_client)
    • Container runtime escalation logic (both missing → FAIL, one available → WARN)
    • run_preflight behavior: all-pass, warn-only, fail-exits, hint display, interactive bypass confirmation

@MarcSchlichting
MarcSchlichting merged commit 80a7352 into main Jun 23, 2026
5 checks passed
@MarcSchlichting
MarcSchlichting deleted the pre-req-safeguards branch June 23, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant