27 KiB
type, status, project, tags
| type | status | project | tags | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| plan | active | homelab |
|
Homelab Core — Architecture Consolidation & Hardening Implementation Guide v3
Companion Architecture Roadmap:
architecture-consolidation-roadmap-v3.mdTarget System:
roadtotech.me(NixOS applianceCore/, application workloadsSites/)Execution Philosophy: Local-first investigation, zero unverified state mutations, reversible staged migrations, atomic commit proposals.
1. Implementation Status & Execution Progress
| Phase / Workstream | Status | Target Scope / Key Deliverables | Verification Gates |
|---|---|---|---|
| P0: Architecture Re-Baseline | 📐 DRAFTED | Taxonomy definitions, controller authority matrix, resource ownership matrix, dependency graphs, AGENTS alignment. | Documentation reviews, structural linting. |
| P1: Mail Topology Realignment | 🎯 UP NEXT | Move Stalwart to smtp.roadtotech.me; move SnappyMail to ~/Sites/snappymail (mail.roadtotech.me) with zero data loss. |
Verified rollback archive, state parity proof, IMAP/SMTP auth, address book survival, Diun delivery test. |
| P2: GitOps Privilege & Authority | ⏳ PENDING | Authoritative Core repository registry, inverted trust boundary, alias collision rejection, Brain pull-only policy, workload Compose security policy, systemd sandboxing. | Flake check, unit tests for admission and containment, path traversal tests, Compose policy validation tests. |
| P3: Manifest Convergence | ⏳ PENDING | Schema v1.0, single typed parser library (core_manifest.py), declarative strategy: compose, migrate ~/Sites/*. |
Manifest validation in CI, schema lint tests. |
| P4: Platform Lifecycle & Health | ⏳ PENDING | Service readiness probes in Core Compose, condition: service_healthy startup gating, image update policy. |
Docker health inspects, dependency startup ordering tests. |
| P5: Deployment Truth & Ledger | ⏳ PENDING | Track requested_revision, deployed_revision, previous_revision, atomic status record, appctl history. |
Dispatcher status test fixtures, superseding accuracy tests. |
2. Mandatory Working Rules
Rule 1 — One Production Transition at a Time (Parallel Refactoring Permitted)
Never combine mail infrastructure relocation, GitOps privilege modifications, and manifest schema refactors into single sweeping production changes. Keep each architectural phase isolated on dedicated git branches.
However, independent internal implementation refactors (specifically appctl-v2 on branch refactor/appctl-rework) may proceed concurrently in an isolated worktree, provided they do not trigger production cutovers and strictly preserve the established architectural integration seams.
Parallel development: YES (isolated feature / refactor branches)
Parallel production moves: NO (serialized host/service cutovers)
Parallel changes to same integration seam: ONLY when explicitly coordinated
Rule 2 — Absolute Preservation of Application State
State-bearing workloads must never be modified using destructive commands (rm -rf, docker compose down -v, or unverified moves). State directory migrations require an explicit pre-flight freeze, recursive archive with preserved timestamps/permissions, and parallel staging before live cutover.
Rule 3 — Single Source of Truth
Never duplicate service definitions or trust boundaries across disparate files. Core owns the platform catalog; the authoritative registry owns admission paths; core_manifest.py owns workload manifest parsing.
Rule 4 — The User Controls Production Transitions
Per Homelab Agent Guidelines: The agent investigates, crafts local code changes, and verifies tests locally. The user reviews atomic commit proposals, merges to main, and runs production deployments (nixos-rebuild switch, container recreation).
Rule 5 — Immutable Integration Seams Across Tracks
When multiple branches are active, the interfaces connecting them must not undergo uncoordinated drift. Specifically, the appctl-v2 track must preserve the CLI invocation syntax, the resolve JSON contract, canonical service identifiers, and Homepage generation semantics until the deliberate convergence point at Milestone P3.
2.1 Concurrent Track Coordination: Homelab Architecture vs. appctl-v2
Two major engineering tracks are active concurrently:
- Track A (Production Architecture): Based on
mainin/home/kiskaadee/Homelab/Core. Owns host configuration, service topology (P1 mail migration), GitOps privilege separation (P2), and platform readiness (P4). - Track B (Implementation Modernization): Based on
refactor/appctl-rework(commit5fc5ad8) in/home/kiskaadee/Projects/active/appctl-refactor. Replaces legacy procedural code with a typed dataclass hierarchy (SitesApp,CoreService), PyYAML ingestion, and TDD unit tests.
Operating Protocol Between Tracks
- Seam Isolation (Do Not Cross-Merge Branches Early):
Do not continuously merge
mainintorefactor/appctl-reworkor vice versa. The refactoring branch changes file structures drastically (scripts/appctl_engine_v2.py); frequent cross-merging will cause severe merge conflicts. - Phase 1 Coordination (Mail Topology):
- On
main: Apply the minimal required compatibility patch to legacyscripts/appctl_engine.py: changestalwartdomain tosmtp.roadtotech.me, removesnappymailfromget_core_services(), and removesnappymailfrom Homepage metadata mapping. - On
refactor/appctl-rework: Update the typedCoreServicelist inscripts/appctl_engine_v2.pysymmetrically (stalwartdomain\rightarrowsmtp.${HOMELAB_DOMAIN}, removesnappymailand deprecatedportainer). This requires zero branch merging.
- On
- Phase 2 Coordination (GitOps Authority):
Phase 2 operates on
Core/nixossystemd units andCore/scripts/gitops_dispatcher.py. It has zero dependencies onappctland can execute without touching Track B. - Phase 3 Convergence (The Controlled Integration Seam):
Phase 3 is the deliberate join point. To avoid branch confusion,
core_manifest.pyoriginates authoritatively onmain(where it is validated againstgitops_dispatcher.pyand test suites). That atomic commit is then brought intorefactor/appctl-reworkvia cherry-pick,appctl-v2adapts its manifest ingestion to the shared module and verifies its unit tests, and finally the fully integratedrefactor/appctl-reworkbranch is merged intomain.
The 5 Architectural Invariants Protected by appctl-v2
- CLI Syntax:
scripts/appctlinvocation arguments, flags, and exits remain identical. resolveJSON Contract:cmd_resolveemits the exact JSON schema consumed byscripts/appctl: required keysname(str),dir_path(str),type(str:"app"or"core_service"),domain(str), plus contextual keyscontainer(str) andenv(dict). Backed by an automated test fixture intest_appctl_engine_v2.py.- Canonical Identity: Service identifiers remain stable within the systems that own them; Core services and Sites workloads use their canonical names consistently.
- Core vs. Sites Taxonomy: Strict classification between platform capabilities in Core and independent workloads in Sites.
- Homepage Sync Semantics: Compiles
Core/config/homepage/services.yamlfrom Core inventory + discovered Sites manifests without schema drift.
3. Phase 0: Architecture Re-Baseline & Structural Catalog
Deliverable 0.1: Service Taxonomy & Platform Topology
Update Core/docs/architecture.md and repository guidelines to formalize the 5-tier taxonomy:
- Host Foundation (NixOS, systemd, Docker, nftables, SOPS)
- Edge & Security Primitives (Traefik, socket-proxy, Authelia, LLDAP)
- Core Platform Capabilities (Stalwart)
- Platform Operations (Homepage, Dozzle, Diun, Watchtower)
- Workload Plane (
~/Sites/*)
Deliverable 0.2: Controller Authority Matrix
Document authoritative control loops across systemd, Docker Compose, GitOps, appctl, and CI runners in Core/docs/architecture.md.
Deliverable 0.3: Resource & State Ownership Matrix
Document persistent state ownership for every stateful resource. For each resource, define: owner, filesystem location, desired state source (Git, generated, runtime-only), and runtime state form. This matrix makes migration and recovery semantics explicit and prevents ambiguity about who owns what data.
4. Phase 1: Mail Topology Realignment & Zero-Data-Loss Migration Runbook
Architectural Context & Invariants
- Stalwart: Remains in Homelab Core. Public endpoint moves from
mail.roadtotech.metosmtp.roadtotech.me. Persistent mail store (Core/config/stalwart/data) is never moved. - SnappyMail: Moves from
Core/docker-compose.ymlto~/Sites/snappymail/docker-compose.yml. Public endpoint moves fromwebmail.roadtotech.metomail.roadtotech.me. Persistent state (Core/config/snappymail/data) is safely copied to~/Sites/snappymail/data.
Step-by-Step Migration Execution
Step 1.1: Pre-Migration Health Audit
Verify existing Stalwart and SnappyMail containers and note running IDs:
ssh server-local "docker ps --filter 'name=stalwart' --filter 'name=snappymail'"
ssh server-local "ls -la ~/Core/config/stalwart/ ~/Core/config/snappymail/data"
Step 1.2: Freeze SnappyMail in Core
Prevent active user sessions or settings modifications while preserving Stalwart:
ssh server-local "docker stop snappymail"
Step 1.3: Create Verified Rollback Archive
Create a compressed archive of SnappyMail state with permissions and timestamps preserved:
ssh server-local "tar -czpf ~/snappymail-backup-\$(date +%Y%m%d%H%M%S).tar.gz -C ~/Core/config/snappymail data"
Generate a checksum for the archive:
ssh server-local "sha256sum ~/snappymail-backup-*.tar.gz"
Verify archive integrity by performing a test extraction into a temporary directory:
ssh server-local "mkdir -p /tmp/snappymail-verify && tar -xzf ~/snappymail-backup-*.tar.gz -C /tmp/snappymail-verify && diff -r ~/Core/config/snappymail/data /tmp/snappymail-verify/data && echo 'Archive verified OK' && rm -rf /tmp/snappymail-verify"
Gate: Do not proceed until archive extraction matches the live source directory.
Step 1.4: Scaffold Sites Workload (~/Sites/snappymail)
Create local directory structure:
mkdir -p ~/Sites/snappymail/data
Create ~/Sites/snappymail/app.yaml:
schemaVersion: "1.0"
name: "snappymail"
displayName: "SnappyMail"
description: "Modern Lightweight Webmail Client"
category: "Communication"
network:
ingress: true
domain: "mail.roadtotech.me"
publishedPort: 8888
internalOnly: false
deployment:
strategy: compose
branch: main
preflight:
filesRequired:
- docker-compose.yml
- data
Create ~/Sites/snappymail/docker-compose.yml:
services:
snappymail:
image: ghcr.io/the-djmaze/snappymail:latest
container_name: snappymail
restart: always
volumes:
- ./data:/var/lib/snappymail/_data_
networks:
- proxy-net
labels:
- "traefik.enable=true"
# Public (HTTPS)
- "traefik.http.routers.snappymail.rule=Host(`mail.${DOMAIN}`)"
- "traefik.http.routers.snappymail.entrypoints=websecure"
- "traefik.http.routers.snappymail.tls=true"
- "traefik.http.routers.snappymail.tls.certresolver=myresolver"
- "traefik.http.routers.snappymail.service=snappymail-svc"
# Public (Redirect HTTP -> HTTPS)
- "traefik.http.routers.snappymail-red.rule=Host(`mail.${DOMAIN}`)"
- "traefik.http.routers.snappymail-red.entrypoints=web"
- "traefik.http.routers.snappymail-red.middlewares=https-redirect@docker"
# Backend Port
- "traefik.http.services.snappymail-svc.loadbalancer.server.port=8888"
networks:
proxy-net:
external: true
Step 1.5: Non-Destructive State Copy & Verification
Replicate existing configuration data to ~/Sites/snappymail/data/ preserving ownership, timestamps, and hidden files:
ssh server-local "cp -a ~/Core/config/snappymail/data/. ~/Sites/snappymail/data/"
(Notice: The original ~/Core/config/snappymail/data is left untouched as an emergency rollback anchor).
Verify source/destination parity before proceeding:
# File count comparison
ssh server-local "echo 'Source:' && find ~/Core/config/snappymail/data -type f | wc -l && echo 'Destination:' && find ~/Sites/snappymail/data -type f | wc -l"
# Byte count comparison
ssh server-local "echo 'Source:' && du -sb ~/Core/config/snappymail/data && echo 'Destination:' && du -sb ~/Sites/snappymail/data"
# Recursive diff (should produce no output)
ssh server-local "diff -r ~/Core/config/snappymail/data ~/Sites/snappymail/data"
# Ownership/permissions spot-check
ssh server-local "ls -laR ~/Sites/snappymail/data | head -n 30"
Gate: Do not proceed to Step 1.6 until file count, byte count, and recursive diff confirm exact parity.
Step 1.6: Update Stalwart in Core/docker-compose.yml
- Reconfigure Stalwart's public identity and Traefik labels from
mail.${DOMAIN}tosmtp.${DOMAIN}:
environment:
- DOMAIN=${DOMAIN}
- STALWART_PUBLIC_URL=https://smtp.${DOMAIN}
- STALWART_RECOVERY_ADMIN=admin:${LLDAP_LDAP_USER_PASS}
labels:
- "traefik.enable=true"
# HTTPS WebAdmin & JMAP Router
- "traefik.http.routers.stalwart.rule=Host(`smtp.${DOMAIN}`)"
- "traefik.http.routers.stalwart.entrypoints=websecure"
- "traefik.http.routers.stalwart.tls=true"
- "traefik.http.routers.stalwart.tls.certresolver=myresolver"
- "traefik.http.routers.stalwart.service=stalwart-svc"
# HTTP -> HTTPS Redirect
- "traefik.http.routers.stalwart-red.rule=Host(`smtp.${DOMAIN}`)"
- "traefik.http.routers.stalwart-red.entrypoints=web"
- "traefik.http.routers.stalwart-red.middlewares=https-redirect@docker"
- "traefik.http.services.stalwart-svc.loadbalancer.server.port=8080"
- Remove the
snappymail:service definition fromCore/docker-compose.yml.
Step 1.7: Update Core Platform Tooling (appctl_engine.py)
To prevent cross-branch merge conflicts, apply the service inventory update symmetrically across both branches without merging:
Action on main (Legacy Engine):
- In
Core/scripts/appctl_engine.py, remove"snappymail"fromget_core_services(). - Update the
"stalwart"entry inget_core_services():
{"name": "stalwart", "domain": "smtp.roadtotech.me", "container": "stalwart", "desc": "All-in-one Mail Server & JMAP/IMAP/SMTP"}
- Update Homepage metadata mapping so
stalwartmaps tosmtp.roadtotech.me.
Action on refactor/appctl-rework (V2 Engine in ~/Projects/active/appctl-refactor):
- In
scripts/appctl_engine_v2.py, updateget_core_services():- Change
stalwartdomain fromf"mail.{HOMELAB_DOMAIN}"tof"smtp.{HOMELAB_DOMAIN}". - Remove the
snappymailCoreServiceentry (SnappyMail will now be discovered dynamically as aSitesAppin~/Sites/snappymail). - Remove the deprecated
portainerCoreServiceentry.
- Change
- Run
pytest tests/unit/test_appctl_engine_v2.pyto confirm test suite remains green. - Commit to
refactor/appctl-reworklocally. Do not merge intomain.
Step 1.8: Production Cutover & Verification
Deploy the Core update:
ssh server-local "cd ~/Core && docker compose up -d stalwart && docker rm -f snappymail"
Start the new SnappyMail workload:
ssh server-local "cd ~/Sites/snappymail && docker compose up -d"
Step 1.9: Verification Checklist
https://smtp.roadtotech.me: Stalwart WebAdmin loads, TLS certificate valid.https://mail.roadtotech.me: SnappyMail webmail interface loads, TLS certificate valid.- SnappyMail authenticates via LLDAP credentials against Stalwart (
stalwart:993/ IMAPS). - User address books, signatures, and custom folder configurations are intact.
- Inbound/outbound email test succeeds.
- Diun notification delivery test succeeds (
stalwart:465with TLS). appctl listshowsstalwartunder Core andsnappymailunder Workloads.
Step 1.10: Rollback Procedure (If issues occur)
If webmail fails or state corruption is suspected:
# 1. Stop Sites workload
ssh server-local "cd ~/Sites/snappymail && docker compose down"
# 2. Revert Core/docker-compose.yml changes via Git
ssh server-local "cd ~/Core && git checkout HEAD -- docker-compose.yml"
# 3. Bring Core stack back up (restoring original mail.roadtotech.me & webmail.roadtotech.me)
ssh server-local "cd ~/Core && docker compose up -d"
5. Phase 2: GitOps Privilege & Authority Hardening
Deliverable 2.1: Core Authoritative Repository Registry
Create Core/config/deployments.yaml as the sole authority for repository identity and filesystem location. The registry answers WHO and WHERE; the workload's app.yaml answers WHAT deployment intent to execute.
# Core/config/deployments.yaml — Authoritative Repository Identity Registry
# Owns: repository identity, canonical filesystem path, coarse admission mode.
# Does NOT own: deployment strategy, branch, healthchecks (those belong to app.yaml).
schemaVersion: "1.0"
repositories:
snappymail:
path: "/home/kiskaadee/Sites/snappymail"
mode: workload
gitea:
path: "/home/kiskaadee/Sites/gitea"
mode: workload
jellyfin:
path: "/home/kiskaadee/Sites/jellyfin"
mode: workload
second-brain:
path: "/home/kiskaadee/Brain"
mode: data-vault
Ownership Split:
Core registry (deployments.yaml)
= WHO is admitted / WHERE it lives / WHAT mode (workload vs data-vault)
Workload manifest (app.yaml)
= WHAT deployment intent (strategy, branch, healthcheck, metadata)
GitOps dispatcher
= HOW that intent is executed safely
Important
Registry paths must be absolute. Python's
Path()does not perform shell-style tilde expansion;~/Sites/snappymailresolves incorrectly. The implementation must usePath(raw_path).expanduser().resolve()or store fully expanded paths.
Deliverable 2.2: Refactor gitops_dispatcher.py Admission Pipeline
- Invert trust boundary: Replace dynamic scanning of
app.yamlaliases with strict lookup inCore/config/deployments.yaml. - Explicitly reject duplicate aliases and path traversal.
- Enforce directory containment strictly within
~/Sitesor designated data vaults. - Execute Brain sync with
strategy: pull-only(isolated from Docker socket).
Deliverable 2.3: Systemd Confinement for homelab-gitops
Update Core/nixos/modules/homeserver.nix:
systemd.services.homelab-gitops = {
description = "Homelab GitOps Webhook Dispatcher";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "docker.service" ];
serviceConfig = {
Type = "simple";
User = "kiskaadee"; # Transitioning to sandboxed profile
WorkingDirectory = "/home/kiskaadee/Core";
ExecStart = "${pkgs.python3}/bin/python3 /home/kiskaadee/Core/scripts/gitops_dispatcher.py --listen 127.0.0.1 --port 9000";
Restart = "always";
RestartSec = "5s";
# Sandboxing & Confinement
ProtectSystem = "strict";
ProtectHome = "read-only";
ReadWritePaths = [
"/home/kiskaadee/Sites"
"/home/kiskaadee/Brain"
"/home/kiskaadee/.local/state/homelab/gitops"
"/run/homelab-gitops"
];
NoNewPrivileges = true;
PrivateTmp = true;
CapabilityBoundingSet = "";
AmbientCapabilities = "";
};
};
Deliverable 2.4: Workload Compose Security Policy
The GitOps executor processes workload-authored docker-compose.yml files. A workload Compose file is itself a capability declaration and must be validated against Core security invariants before deployment.
Pre-deployment validation must reject workload Compose files containing:
privileged: truedevices:host device mappingsnetwork_mode: hostorpid: hostoripc: host- Direct Docker socket bind mounts (
/var/run/docker.sock) cap_add:beyond a defined allowlistsecurity_opt:overrides- Arbitrary host path bind mounts outside the workload's own directory
Implementation:
- Extend the existing
tests/security/test suite to validate workload Compose files, not justCore/docker-compose.yml. - Add a pre-deployment Compose policy check in
gitops_dispatcher.pythat runs the same validations before executingdocker compose up. - Define an explicit denied-capability list in
Core/config/compose-policy.yamlor equivalent.
6. Phase 3: Manifest Contract Convergence & appctl-v2 Integration
Phase 3 is the deliberate convergence point between Track A (Homelab Architecture) and Track B (appctl-v2 Refactoring). At this milestone, the separate manifest models and YAML parsers converge into a single authoritative module (core_manifest.py), and appctl-v2 is merged into main.
Deliverable 3.1: Unified Manifest Parser (core_manifest.py)
Create a shared, strictly typed Python module (Core/scripts/core_manifest.py) implementing:
- Dataclass models (
WorkloadManifest,NetworkConfig,DeploymentConfig,HealthcheckConfig). - Strict schema enforcement: Rejection of unknown top-level fields.
- Schema version gating (
schemaVersion: "1.0"). - Replaces duplicate
parse_yaml_simple()acrossgitops_dispatcher.pyand oldappctl_engine.py.
Deliverable 3.2: Declarative Intent Transition
Deprecate procedural action vectors:
OLD: actions: ["git_pull", "compose_up", "compose_build"]
NEW: deployment:
strategy: compose
Deliverable 3.3: Sites Manifest Migration
Update all manifests in ~/Sites/*/app.yaml to schema v1.0.
Deliverable 3.4: appctl-v2 Integration & Controlled Convergence
To ensure reproducibility and zero merge churn between divergent branches, the convergence of Track B into Track A follows a strict direction of integration with a defined origin for core_manifest.py.
The Origin & Direction Rule
- Origin:
core_manifest.pyoriginates authoritatively onmain(under Deliverables 3.1–3.3) where it is immediately tested againstgitops_dispatcher.pyand the 35 architecture invariants. - Direction:
main\rightarrowrefactor/appctl-rework(cherry-pick contract commit)\rightarrowadapt in worktree\rightarrowmain(merge refactored engine).
The 6-Step Controlled Convergence Runbook
- Lock Prerequisites on
main: Ensure P1 (mail topology), P2 (GitOps authority & Compose security policy), and Deliverables 3.1–3.3 (core_manifest.pyschema & Sites manifests) are committed and green onmain. - Isolate Contract Commit:
Identify the atomic commit on
mainthat introducesCore/scripts/core_manifest.py(e.g.feat(core): introduce unified core_manifest parser). - Bring Contract into Worktree (
refactor/appctl-rework): In/home/kiskaadee/Projects/active/appctl-refactor, bring in the contract commit via cherry-pick:(Track B now has the identical, immutable manifest parser without absorbing unrelated P1/P2 host churn).cd ~/Projects/active/appctl-refactor git cherry-pick <commit-sha-of-core_manifest> - Adapt
appctl-v2to Shared Parser: Refactorscripts/appctl_engine_v2.pyto ingest manifests viacore_manifest.pyinstead of its standaloneload_manifest()seam. Updatetests/unit/test_appctl_engine_v2.pyfixtures to match. - Hermetic Test Gate in Worktree:
Verify 100% compliance within
~/Projects/active/appctl-refactor:Ensurepytest tests/unit/test_appctl_engine_v2.py ruff check . pyright python3 scripts/appctl_engine_v2.py resolve snappymailcmd_resolveemits the exact JSON schema consumed byscripts/appctl: required keysname,dir_path,type,domain, plus contextual keyscontainerandenv. Verify that this is guarded by an automated test fixture. - Controlled Integration Merge to
main:- On
refactor/appctl-rework, promotescripts/appctl_engine_v2.pytoscripts/appctl_engine.pyso the branch carries the full engine replacement natively. - Merge
refactor/appctl-reworkintomain(resolving only expected integration conflicts). - Run full regression suite on the resulting
main:cd ~/Homelab/Core ./scripts/test nix flake check - Verify live CLI behavior:
appctl list,appctl info snappymail,appctl sync. - Decommission the worktree and declare Milestone P3 complete.
- On
7. Phase 4: Platform Lifecycle & Readiness Contracts
Deliverable 4.1: Readiness Probes for Core Services
Every Core service that is a dependency of another service must expose a deterministic readiness signal via a Compose healthcheck block. The specific probe mechanism is chosen during implementation based on each image's available tools and version:
Investigation targets (verify against actual image capabilities before committing):
- Traefik: Built-in ping endpoint or CLI healthcheck
- socket-proxy: HTTP version endpoint on internal port
- LLDAP: Built-in healthcheck subcommand or TCP port probe
- Authelia: Built-in healthcheck subcommand
- Stalwart: TCP port probes on critical protocol ports (465, 993) or HTTP readiness endpoint
Note
These are starting points for implementation research, not architectural commitments. The correct probe for each service depends on the container image version, available utilities, and startup characteristics discovered during P4 implementation.
Deliverable 4.2: Dependency Readiness Gating
Update service depends_on declarations to enforce health conditioning:
depends_on:
lldap:
condition: service_healthy
socket-proxy:
condition: service_healthy
8. Phase 5: Deployment Truth & Historical Ledger
Deliverable 5.1: Structured Deployment State Model
Update ~/.local/state/homelab/gitops/<repo>.status to record complete revision facts:
{
"target": "snappymail",
"requested_revision": "9a8b7c6d5e4f3a2b1c0d",
"deployed_revision": "9a8b7c6d5e4f3a2b1c0d",
"previous_revision": "1f2e3d4c5b6a7b8c9d0e",
"status": "success",
"failure_stage": null,
"start_time": "2026-09-26T14:30:00Z",
"end_time": "2026-09-26T14:30:22Z",
"duration_seconds": 22.4,
"superseded": false
}
Deliverable 5.2: appctl Status & History Subcommand
Note: Requires completion of the appctl refactor.
Expose deployment state directly through CLI:
appctl history snappymail
appctl status --all
9. Epistemic Verification & Second Brain Documentation
Following Homelab Agent Guidelines:
- Any operational anomalies encountered during the migration must be captured in the Second Brain inbox (
inbox/YYYY-MM-DD-<slug>-debug.md). - Upon successful validation of Phase 1 (Mail topology realignment), record an operational snapshot documenting verified certificates, DNS routing, and state migration proof.