geist_supervisor 0.1.28

Generic OTA supervisor for field devices
Documentation
# Geist Supervisor


The **Geist Supervisor** is the central orchestrator for the Geist ecosystem. A Rust-based tool that manages the update process, debugging, and runtime control of the Geist and associated applications.

## Quick Start


```bash
# Install geist_supervisor

cargo install --path .

# Check version and status

geist_supervisor --version
geist_supervisor status

# Check for updates

geist_supervisor check-update

# Perform OTA update

geist_supervisor update
```

## Testing


This project uses [cargo nextest](https://nexte.st/) as the preferred test runner for better test isolation and parallel execution.

### Prerequisites


Install nextest if not already available:
```bash
cargo install cargo-nextest
```

### Running Tests


```bash
# Run all tests (recommended)

cargo nextest run

# Run tests for a specific module

cargo nextest run ota
cargo nextest run dependencies

# Quick test run (fail-fast, minimal output)

cargo nextest run --profile quick

# CI-style run (with retries)

cargo nextest run --profile ci

# Legacy test runner (may have race conditions)

cargo test
```

### Why Nextest?


We use nextest because it provides:
- **Better test isolation**: Each test runs in its own process
- **Proper parallel execution**: No race conditions with environment variables
- **Better reporting**: Clear, structured output
- **Faster feedback**: Optimized execution and reporting

## How to install

- `cargo install geist_supervisor`: Installs the Geist Supervisor to the system.

## Key Features


1. **Unified Updates**:
   - Ensures all components (Geist binaries, Roc Camera App) are updated simultaneously to a single unified version.

2. **Update Process**:
   - Automatically verifies and applies updates for:
     - Geist binaries.
     - Roc Camera App binaries.
     - Plymouth boot splash screen (from assets/splash/splash.png).
   - Ensures integrity with checksum and signature validation.
   - Restarts all services in the correct order after updating.

3. **Bootloader like functionality**:
   - Acts as the bootloader for the Geist application, the Roc Camera App, and any future firmware components.

## CLI Commands


The command line interface is built using [clap](https://github.com/clap-rs/clap). It should just be `geist <command>`.

### Update Commands

- `geist_supervisor update <version>`: Updates all components (Geist, Roc Camera App, microcontroller firmware) to the specified version.
- `geist_supervisor verify <version>`: Verifies that all artifacts for a given version are available and valid.
- `geist_supervisor rollback <version>`: Rolls back to a previous known-good version.