Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f99dbed41 |
No files matched your search
@@ -1,173 +1,79 @@
|
|||||||
# Homelab Core — Agent Guidelines
|
# Homelab Core — Agent Guidelines
|
||||||
|
|
||||||
This repository defines the host foundation and Core platform for the
|
This repository defines the declarative NixOS host foundation, shared infrastructure services, security boundaries, and the `appctl` operational control plane. Independent application workloads live in `~/Sites` and integrate through declarative `app.yaml` manifests and Docker Compose definitions.
|
||||||
`roadtotech.me` homelab.
|
|
||||||
|
|
||||||
It contains NixOS configuration, shared infrastructure services, orchestration
|
|
||||||
tools, security policy, and operational configuration.
|
|
||||||
|
|
||||||
Independent application workloads live in `~/Sites` and are integrated with
|
|
||||||
Core through their application manifests and Docker Compose configuration.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Architectural Invariants
|
## 1. Context Discovery & Hierarchy of Truth
|
||||||
|
|
||||||
### 1. Core / Sites Boundary
|
Before proposing or implementing changes, establish context in this order:
|
||||||
|
1. **Architectural Decisions (`docs/decisions/`)**: Check [`docs/decisions/README.md`](docs/decisions/README.md) and local ADRs for binding design commitments.
|
||||||
|
2. **Architecture & Contracts (`docs/`)**: Consult [`docs/architecture.md`](docs/architecture.md), [`docs/appctl.md`](docs/appctl.md), [`docs/gitops.md`](docs/gitops.md), and [`docs/secrets-and-state.md`](docs/secrets-and-state.md) for current runtime behavior.
|
||||||
|
3. **Trajectory & Active Work (`ROADMAP.md`, `todo.txt`, `git log`)**: Verify milestone scope, active tasks, and recent commit history before modifying adjacent subsystems.
|
||||||
|
|
||||||
**Core owns:**
|
When a requested change conflicts with an architectural invariant or accepted ADR, **stop and surface the conflict** before implementing a workaround.
|
||||||
- NixOS host configuration and system services
|
|
||||||
- Shared platform and infrastructure services
|
|
||||||
- Ingress, identity, security boundaries, and host-level policy
|
|
||||||
- Orchestration and deployment mechanics
|
|
||||||
|
|
||||||
**`~/Sites` owns:**
|
|
||||||
- Independently deployed application workloads
|
|
||||||
- Application-specific Docker Compose configuration
|
|
||||||
- Application-specific `app.yaml` metadata and workload intent
|
|
||||||
|
|
||||||
Do not move workload-specific configuration into Core merely because Core
|
|
||||||
consumes or manages the workload.
|
|
||||||
|
|
||||||
Do not move Core-owned platform services into `~/Sites`.
|
|
||||||
|
|
||||||
When ownership is unclear, consult current architecture documentation before
|
|
||||||
changing the boundary.
|
|
||||||
|
|
||||||
### 2. Workload Manifests
|
|
||||||
|
|
||||||
Every `~/Sites` workload is self-describing through its `app.yaml`.
|
|
||||||
|
|
||||||
Do not hardcode workload-specific domains, ports, environment variables,
|
|
||||||
containers, or deployment configuration inside `scripts/appctl`,
|
|
||||||
`scripts/appctl_engine.py`, or GitOps logic.
|
|
||||||
|
|
||||||
`app.yaml` describes workload identity, integration metadata, and deployment
|
|
||||||
intent. Core owns deployment mechanics.
|
|
||||||
|
|
||||||
Never introduce arbitrary command execution, host filesystem paths,
|
|
||||||
privileged operations, or Docker control capabilities into workload manifests.
|
|
||||||
|
|
||||||
### 3. GitOps Trust Boundary
|
|
||||||
|
|
||||||
GitOps must remain a constrained deployment mechanism.
|
|
||||||
|
|
||||||
- Webhook authentication is mandatory.
|
|
||||||
- Repository identity is resolved through trusted Core logic.
|
|
||||||
- Filesystem paths must never be selected directly by webhook payloads.
|
|
||||||
- Deployment execution must remain closed and explicitly allowlisted.
|
|
||||||
- Repository-controlled configuration must never become arbitrary shell input.
|
|
||||||
- Deployment serialization and superseding behavior must be preserved.
|
|
||||||
|
|
||||||
Do not weaken these constraints for convenience.
|
|
||||||
|
|
||||||
### 4. Docker Isolation
|
|
||||||
|
|
||||||
- `socket-proxy` is the only Core Compose service that may mount
|
|
||||||
`/var/run/docker.sock`.
|
|
||||||
- The socket proxy must expose only explicitly approved read-only Docker API capabilities; state-changing and command-execution endpoints must remain disabled.
|
|
||||||
- Do not add `privileged: true` without an explicit architectural decision.
|
|
||||||
- Workload containers must not gain direct access to the Docker socket.
|
|
||||||
|
|
||||||
### 5. Secrets & Persistent State
|
|
||||||
|
|
||||||
Never commit plaintext secrets, credentials, password hashes, private keys,
|
|
||||||
certificates, runtime databases, or other generated/persistent state.
|
|
||||||
|
|
||||||
Secrets are managed through SOPS and projected to runtime paths under
|
|
||||||
`/run/secrets/`.
|
|
||||||
|
|
||||||
Do not move secrets into application manifests or source code.
|
|
||||||
|
|
||||||
### 6. Declarative Configuration vs Runtime State
|
|
||||||
|
|
||||||
Git contains declarative configuration and reproducible definitions.
|
|
||||||
|
|
||||||
Persistent runtime state belongs in the appropriate state directories or
|
|
||||||
Docker volumes and must remain excluded from version control.
|
|
||||||
|
|
||||||
Do not convert runtime state into committed configuration merely to simplify
|
|
||||||
development or recovery.
|
|
||||||
|
|
||||||
### 7. Core Service Ownership
|
|
||||||
|
|
||||||
Core Compose is the execution boundary for Core-owned platform services.
|
|
||||||
Workload-specific services belong in `~/Sites` unless an explicit architectural
|
|
||||||
decision establishes them as Core-owned.
|
|
||||||
|
|
||||||
Do not introduce application-specific deployment policy into the Core stack.
|
|
||||||
|
|
||||||
Do not make Core orchestration depend on implementation details of a workload
|
|
||||||
when the workload's declared contract can be used instead.
|
|
||||||
|
|
||||||
### 8. Platform Genericism & Domain Decoupling
|
|
||||||
|
|
||||||
Core platform code, templates, and documentation must remain strictly instance-agnostic.
|
|
||||||
|
|
||||||
- Instance-specific domains (e.g. personal domain names), operator usernames, and deployment topologies must never be hardcoded into Core platform definitions.
|
|
||||||
- All routing and service identities must be injected declaratively at runtime via environment variables (`HOMELAB_DOMAIN`, `DOMAIN_SUFFIX`) and local configuration overlays.
|
|
||||||
- Example manifests, tests, and documentation must use RFC-compliant generic placeholders (e.g. `example.com`, `example.org`, `example.test`).
|
|
||||||
|
|
||||||
### 9. License
|
|
||||||
|
|
||||||
Preserve The Unlicense across Core and related Sites repositories.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Verification & Architectural Integrity
|
## 2. Architectural Invariants
|
||||||
|
|
||||||
When a requested change conflicts with an invariant, stop and resolve the
|
1. **Core / Sites Boundary**:
|
||||||
architectural conflict before implementing a workaround.
|
- **Core owns**: NixOS host configuration, shared platform services (ingress, SSO/LDAP, mail, monitoring), security policy, and deployment mechanics.
|
||||||
|
- **`~/Sites` owns**: Application workloads, workload-specific `docker-compose.yml`, and workload intent (`app.yaml`).
|
||||||
|
- Never hardcode workload-specific domains, ports, containers, or policies in Core (`scripts/appctl*`, GitOps), and never move Core platform services into `~/Sites`.
|
||||||
|
2. **Declarative Workload Manifests (`app.yaml`)**:
|
||||||
|
- Workloads are self-describing via strict, fail-closed Pydantic v2 schemas (`scripts/core_manifest.py`).
|
||||||
|
- Never introduce arbitrary command execution, host filesystem paths, privileged flags, or Docker control capabilities into `app.yaml`.
|
||||||
|
3. **GitOps Trust Boundary**:
|
||||||
|
- Webhook admission requires cryptographic authentication (HMAC-SHA256).
|
||||||
|
- Repository identity and filesystem paths are resolved strictly through trusted Core logic (`config/deployments.yaml`)—never directly from webhook payloads.
|
||||||
|
- Execution must remain allowlisted, serialized (`flock`), and free of shell interpolation (`shell=False`).
|
||||||
|
4. **Docker & Privilege Isolation**:
|
||||||
|
- `socket-proxy` is the **only** container permitted to mount `/var/run/docker.sock` (strictly `:ro`, read-only API capabilities only).
|
||||||
|
- Never add `privileged: true`, host namespace sharing, or direct Docker socket mounts to workload or control-plane containers.
|
||||||
|
5. **Secrets & Runtime State**:
|
||||||
|
- Never commit plaintext secrets, keys, hashes, certificates, or runtime databases.
|
||||||
|
- Host secrets are managed via SOPS (`sops-nix`) and projected to `/run/secrets/`. Persistent mutable state lives outside Git in dedicated state directories or Docker volumes.
|
||||||
|
6. **Platform Genericism & License**:
|
||||||
|
- Keep all code, templates, tests, and documentation strictly instance-agnostic. Inject domains and identities at runtime (`HOMELAB_DOMAIN`, `DOMAIN_SUFFIX`).
|
||||||
|
- Use RFC 2606 placeholders (`example.com`, `example.org`, `example.test`) in tests and documentation—never personal domains or operator usernames.
|
||||||
|
- Preserve [The Unlicense](UNLICENSE) across the repository.
|
||||||
|
|
||||||
Before committing architectural or security-sensitive changes:
|
---
|
||||||
|
|
||||||
|
## 3. Engineering Practices & TDD
|
||||||
|
|
||||||
|
- **TDD-First**: Write or update failing unit, structural, or security tests in `tests/` before or alongside implementation changes.
|
||||||
|
- **No Tautological Tests**: Every test must import and execute real production code or scripts and assert on observable outcomes. Never write tests that only inspect local mock strings, hardcode expected results into the fixture under test, or pass when the production invariant is broken.
|
||||||
|
- **Fail-Closed Contracts**: Validate external inputs (YAML manifests, webhook payloads, CLI arguments, subprocess outputs) through strict schemas and explicit error paths. Never swallow diagnostic `stderr` silently.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Step Closure & Verification Gate
|
||||||
|
|
||||||
|
Every implementation step must close with automated verification before proposing a commit:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./scripts/test
|
./scripts/test # Ruff linter + Pytest suite + nix flake check + NixOS drv eval
|
||||||
nix flake check
|
nix develop --command pyright # Static type analysis across Python scripts and tests
|
||||||
```
|
```
|
||||||
|
|
||||||
Run additional validation appropriate to the change, such as:
|
Run context-specific validation when modifying container or service definitions:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose config -q
|
docker compose config -q
|
||||||
```
|
```
|
||||||
|
|
||||||
Architectural invariants should be encoded as tests whenever practical.
|
Do not bypass failing tests by weakening or removing an invariant test unless the architecture itself has intentionally changed via an approved decision.
|
||||||
|
|
||||||
Do not bypass failing invariant tests by weakening or removing the invariant
|
|
||||||
unless the architecture itself has intentionally changed.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Documentation
|
## 5. Internal Documentation & Git Hygiene
|
||||||
|
|
||||||
Use the repository's current architecture and operational documentation as the
|
|
||||||
source of truth for ownership, protocols, and system behavior.
|
|
||||||
|
|
||||||
Record significant architectural decisions in the appropriate ADR or Brain
|
|
||||||
documentation rather than expanding this file into an architecture manual.
|
|
||||||
|
|
||||||
All documentation must remain GitHub-flavored Markdown compatible with Obsidian
|
|
||||||
and the live documentation viewer.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Architectural & Engineering Knowledge Preservation
|
|
||||||
|
|
||||||
When engineering changes in Core yield durable architectural insights, security posture shifts, non-obvious root causes, or transferable operational heuristics, knowledge preservation is governed by the global skill **`documentation-router`**:
|
|
||||||
- Architectural commitments are recorded in ADRs (`03-records/decisions/`).
|
|
||||||
- Exploratory design inquiries and trade-offs are recorded in Discussions (`02-discussions/`).
|
|
||||||
- Empirical incident RCAs are recorded in Debug Records (`03-records/debug/`).
|
|
||||||
- Implementation roadmaps are recorded in Plans (`01-plans/`).
|
|
||||||
- Routine maintenance, configuration adjustments, and self-explanatory fixes require no external documentation.
|
|
||||||
- Preserve repository-local documentation (`docs/`, inline comments, commit rationale) as the primary source of truth for runtime behavior.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Live Task Tracking (`todo.txt`)
|
|
||||||
|
|
||||||
For multi-step engineering milestones and complex refactors:
|
|
||||||
- Maintain a standard, comment-free `todo.txt` in the repository root formatted for `tuxedo` / `todo.sh`.
|
|
||||||
- Prioritize deliverables using standard priorities (`(A)`, `(B)`, `(C)`), projects (`+<component>`), and contexts (`@<area>`).
|
|
||||||
- Keep `todo.txt` synchronized with code reality: when a deliverable is implemented and verified, mark it completed (`x YYYY-MM-DD ...`) immediately. Never leave verified work marked as pending or untracked.
|
|
||||||
|
|
||||||
|
- **Repository Documentation (`docs/`)**: Keep documentation concise, accurate to current code reality, and formatted in GitHub-Flavored Markdown compatible with Obsidian.
|
||||||
|
- **Architecture Decision Records (`docs/decisions/`)**: Record binding repository-level architectural decisions in MADR 4.0 format (`NNNN-slug.md`) and register them in [`docs/decisions/README.md`](docs/decisions/README.md).
|
||||||
|
- **Task Tracking (`todo.txt`)**: Maintain a comment-free root `todo.txt` formatted for `tuxedo` / `todo.sh` (`(A)`–`(C)` priorities, `+<project>`, `@<context>`). Mark verified deliverables completed (`x YYYY-MM-DD ...`) immediately.
|
||||||
|
- **Git & Commits**:
|
||||||
|
- Never commit directly to `main`/`master`.
|
||||||
|
- Never run destructive Git commands (`reset --hard`, `restore`, `clean -fd`, `push --force`) without explicit user confirmation.
|
||||||
|
- Stage atomic changes and use Conventional Commits (`feat`, `fix`, `refactor`, `test`, `docs`, `chore`), waiting for user approval before committing.
|
||||||
@@ -1,96 +1,16 @@
|
|||||||
# 🏛️ Homelab Core & Appctl Operational Control Plane
|
# Homelab Core
|
||||||
|
|
||||||
**Homelab Core** defines the host foundation, platform infrastructure services, security boundaries, and operational control plane for the `roadtotech.me` homelab appliance.
|
**Homelab Core** is the declarative NixOS host foundation, shared platform infrastructure stack, and `appctl` operational control plane for a self-hosted homelab appliance.
|
||||||
|
|
||||||
This repository serves two primary roles:
|
It is designed around a strict two-tier boundary:
|
||||||
1. **The Host Platform & Infrastructure Appliance**: Declarative NixOS operating system definitions, edge ingress routing, wildcard TLS certificates, identity/SSO directory services, mail routing, and Docker socket isolation.
|
1. **Homelab Core (this repository)**: Owns NixOS operating system configuration, edge TLS ingress, SSO/LDAP directory identity, mail routing, read-only Docker socket isolation, and orchestration/deployment mechanics.
|
||||||
2. **The Appctl Operational Control Plane**: The centralized engine governing workload lifecycle management, continuous GitOps deployment, source provenance tracking, and dashboard synchronization across independent application workloads in `~/Sites`.
|
2. **Workload Repositories (`~/Sites/<app>`)**: Independently deployed application stacks that integrate with Core through self-describing `app.yaml` manifests and workload-scoped `docker-compose.yml` definitions.
|
||||||
|
|
||||||
|
All platform definitions are strictly instance-agnostic; domain names (`HOMELAB_DOMAIN`) and secrets (`/run/secrets/`) are injected declaratively at runtime.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🧭 Architectural Direction & Mental Model
|
## System Architecture at a Glance
|
||||||
|
|
||||||
Under the approved architectural baseline ([`ADR: Homelab Operational Control Plane`](docs/decisions/README.md#homelab-operational-control-plane--deployment-model-architecture) and [`ADR: 3-Tier Architecture & Provenance`](docs/decisions/README.md#homelab-3-tier-architecture--deployment-provenance-model)), `appctl` is evolving from a local procedural CLI wrapper into the **authoritative operational control plane service for Homelab Core**.
|
|
||||||
|
|
||||||
### The Core Architectural Spine
|
|
||||||
|
|
||||||
```text
|
|
||||||
Human Operator / Automation
|
|
||||||
│
|
|
||||||
┌───────────────────┴───────────────────┐
|
|
||||||
│ │
|
|
||||||
Operations UI CLI (Local & Remote)
|
|
||||||
│ │
|
|
||||||
└───────────────────┬───────────────────┘
|
|
||||||
│
|
|
||||||
appctl Control Plane API
|
|
||||||
(One Logical API across Transports)
|
|
||||||
│
|
|
||||||
┌────────────┴────────────┐
|
|
||||||
│ │
|
|
||||||
Unix Socket HTTP Listener
|
|
||||||
(Host Clients) (Remote/LAN Clients)
|
|
||||||
│ │
|
|
||||||
└────────────┬────────────┘
|
|
||||||
│
|
|
||||||
┌───────────────────────────┼───────────────────────────┐
|
|
||||||
│ │ │
|
|
||||||
Authentication Deployment Model Operations
|
|
||||||
& Authorization Plane Execution
|
|
||||||
│ │ │
|
|
||||||
Token Validation & ┌──────┴──────┐ Docker Compose
|
|
||||||
LLDAP Directory RBAC │ │ Traefik Routing
|
|
||||||
AI Investigation Human Host Secrets
|
|
||||||
│ Approval Reconciliation
|
|
||||||
▼ │
|
|
||||||
DeploymentProposal │
|
|
||||||
│ ▼
|
|
||||||
└─────▶ DeploymentModel
|
|
||||||
│
|
|
||||||
▼ (Committed to Git)
|
|
||||||
Deployment Repository
|
|
||||||
(Git Truth)
|
|
||||||
│
|
|
||||||
▼ (appctl validates & materializes)
|
|
||||||
Deployment Definition
|
|
||||||
(Sites app.yaml + compose)
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
Runtime Reconciliation
|
|
||||||
```
|
|
||||||
|
|
||||||
### Core Architectural Invariants
|
|
||||||
|
|
||||||
* **Single Operational Truth**: Exactly one implementation of every operational action (`deploy`, `restart`, `inspect`, `sync`, `validate`) exists in the platform. Clients (local CLI, remote CLI, web UI, GitOps) invoke the exact same logical API contract.
|
|
||||||
* **Host Access Does Not Confer Authority**: Entering the server via SSH is merely host access; it does not grant Appctl privileges. **Every mutating operation requires an explicit, authenticated user-scoped token**, regardless of transport. Unix socket peer credentials identify the transport context, not user authority.
|
|
||||||
* **Git is the Authoritative Source of Deployment State**: Approved workload configurations are versioned in Git. `appctl` reconciles desired Git state into running containers, preserving immutable revision history, commit provenance, peer reviews, and atomic rollbacks (`git revert`).
|
|
||||||
* **Five-Stage Model Lifecycle (Intent vs. Implementation)**:
|
|
||||||
$$\text{Repository} \xrightarrow{\text{Investigation}} \text{Application Profile} \xrightarrow{\text{Proposal}} \text{DeploymentProposal} \xrightarrow{\text{Human Selection}} \text{DeploymentModel (Git)} \xrightarrow{\text{appctl Materialize}} \text{Deployment Definition} \xrightarrow{\text{Reconcile}} \text{Containers}$$
|
|
||||||
* `DeploymentModel`: The operator-selected, implementation-agnostic representation of intent (ports, domains, volumes, dependencies, secret references). Free of Compose syntax and Traefik label boilerplate.
|
|
||||||
* `Deployment Definition`: Concrete platform descriptors (`app.yaml` + `docker-compose.yml`) materialized and enforced by `appctl`.
|
|
||||||
* **AI Authoring Boundary**: AI agents act strictly as upstream proposal generators with **zero execution or mutation authority**. The AI analyzes repositories and drafts `DeploymentProposals`. After human approval into a `DeploymentModel`, the AI is completely out of the loop.
|
|
||||||
* **Secret Reference Invariant**: Deployment definitions contain secret references (`secretKeyRef`), never secret material. References are resolved at runtime through a defined `SecretProvider` interface. Host platform secrets remain declarative in `sops-nix`.
|
|
||||||
* **Clean State Root**: Mutable application data lives strictly under `~/var/lib/homelab/<app>/`, isolated from Git deployment repositories.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔍 Current Implementation Baseline vs. Target Architecture
|
|
||||||
|
|
||||||
To maintain clarity during development, this repository explicitly separates what is **currently implemented** from what is **planned in the roadmap**:
|
|
||||||
|
|
||||||
| Architectural Area | Current Implementation Baseline (Milestone P0) | Target Architecture (Roadmap v5) |
|
|
||||||
| :--- | :--- | :--- |
|
|
||||||
| **`appctl` Architecture** | Bash CLI wrapper (`scripts/appctl`) driving local subprocesses (`docker compose`, `git`) and metadata engines. | Dedicated daemon service (`homelab-appctl.service`) exposing one logical API over Unix socket and HTTP. |
|
|
||||||
| **Operational Auth** | Sudo / Unix user permissions on the host. Sourcing secrets from `/run/secrets/`. | LLDAP directory identity. Explicit user-scoped API tokens for all mutating actions; Authelia ForwardAuth for Web. |
|
|
||||||
| **Metadata Engine** | Authoritative dataclass engine (`scripts/appctl_engine.py`) with two-axis inspection and schema v1.0 parser (`core_manifest.py`). | Single unified engine (`core_manifest.py` / `appctl_engine.py`) embedded directly within the control plane daemon. |
|
|
||||||
| **Deployment Model** | Manual authoring of `app.yaml` and `docker-compose.yml` directly in `~/Sites/<app>/`. | 5-stage lifecycle: AI/human `DeploymentProposal` $\to$ operator-approved `DeploymentModel` committed to Git $\to$ `appctl` materialization. |
|
|
||||||
| **GitOps Engine** | Webhook dispatcher (`scripts/gitops_dispatcher.py`) listening on port 9000 with HMAC-SHA256 authentication and flock serialization. | Fully integrated into control-plane admission, calling central reconciliation endpoints. |
|
|
||||||
| **Secret Distribution** | Static Age-encrypted `nixos/secrets.yaml` decrypted by `sops-nix` to tmpfs `/run/secrets/`. | Host secrets remain in `sops-nix`; workload secrets referenced by key and projected at runtime via `SecretProvider`. |
|
|
||||||
| **Dashboard** | `appctl sync` statically compiles `config/homepage/services.yaml`. | Homepage consumes read-only live status from `appctl`; dedicated Operations UI client for interactive management. |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🗺️ System Topology & Runtime Layers
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Internet
|
Internet
|
||||||
@@ -98,129 +18,139 @@ To maintain clarity during development, this repository explicitly separates wha
|
|||||||
▼
|
▼
|
||||||
┌───────────────────────────────┐
|
┌───────────────────────────────┐
|
||||||
│ Traefik Edge Proxy (:443) │
|
│ Traefik Edge Proxy (:443) │
|
||||||
│ Wildcard TLS (*.roadtotech.me)│
|
│ Wildcard TLS (*.example.com) │
|
||||||
└───────┬───────────────┬───────┘
|
└───────┬───────────────┬───────┘
|
||||||
│ │
|
│ │
|
||||||
Public Traffic │ │ ForwardAuth Protected
|
Public Traffic │ │ ForwardAuth Protected
|
||||||
(e.g., mail, landing) │ │ (authelia-auth@docker)
|
(e.g., SMTP, public) │ │ (authelia-auth@docker)
|
||||||
▼ ▼
|
▼ ▼
|
||||||
[ Public Services ] [ Authelia SSO / 2FA ]
|
[ Public Services ] [ Authelia SSO / 2FA ]
|
||||||
│ │ (LDAP -> LLDAP)
|
│ │ (LDAP -> LLDAP)
|
||||||
│ │
|
|
||||||
▼ ▼
|
▼ ▼
|
||||||
┌───────────────────────────────┐
|
┌───────────────────────────────┐
|
||||||
│ Docker proxy-net │
|
│ Docker proxy-net │
|
||||||
├───────────────────────────────┤
|
├───────────────────────────────┤
|
||||||
│ • Core Services (Homepage, │
|
│ • Core Services (Homepage, │
|
||||||
│ Dozzle, etc.) │
|
│ Dozzle, Stalwart, etc.) │
|
||||||
│ • Workload Apps (~/Sites/*) │
|
│ • Workload Apps (~/Sites/*) │
|
||||||
└───────────────────────────────┘
|
└───────────────┬───────────────┘
|
||||||
│
|
│ (Protected API via TCP:2375)
|
||||||
(Protected API via TCP:2375)
|
|
||||||
▼
|
▼
|
||||||
┌───────────────────────────────┐
|
┌───────────────────────────────┐
|
||||||
│ Docker socket-proxy │
|
│ Docker socket-proxy │
|
||||||
│ (socket-net, Read-Only) │
|
│ (socket-net, Read-Only) │
|
||||||
└───────────────┬───────────────┘
|
└───────────────┬───────────────┘
|
||||||
│ (read-only mount)
|
│ (read-only mount :ro)
|
||||||
▼
|
▼
|
||||||
/var/run/docker.sock
|
/var/run/docker.sock
|
||||||
```
|
```
|
||||||
|
|
||||||
### Core Services (`docker-compose.yml`)
|
### Core Platform Services (`docker-compose.yml`)
|
||||||
| Service | Domain / Ingress | Function | Auth Policy |
|
|
||||||
|
| Service | Default Endpoint | Role | Access Policy |
|
||||||
| :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| **`traefik`** | `traefik.roadtotech.me` | Edge reverse proxy, Dynu DNS-01 ACME TLS | Authelia Guard |
|
| **`traefik`** | `traefik.${HOMELAB_DOMAIN}` | Edge reverse proxy & DNS-01 ACME wildcard TLS | Authelia Guard |
|
||||||
| **`socket-proxy`** | Internal (`socket-net:2375`) | Read-only Docker API gateway barrier | Internal Only |
|
| **`socket-proxy`** | Internal (`socket-net:2375`) | Read-only Docker API security barrier (`POST=0`) | Internal Only |
|
||||||
| **`lldap`** | `users.roadtotech.me` | LDAP directory & user database | Authelia Guard |
|
| **`lldap`** | `users.${HOMELAB_DOMAIN}` | Central LDAP user directory | Authelia Guard |
|
||||||
| **`authelia`** | `auth.roadtotech.me` | Single Sign-On (SSO) & ForwardAuth middleware | Public (Bypass) |
|
| **`authelia`** | `auth.${HOMELAB_DOMAIN}` | Single Sign-On (SSO), 2FA & ForwardAuth | Public (Auth Endpoint) |
|
||||||
| **`stalwart`** | `mail.roadtotech.me` | Mail Server (SMTP/IMAP/JMAP/Sieve) *(Moving to smtp in P1)* | Native / LLDAP |
|
| **`stalwart`** | `smtp.${HOMELAB_DOMAIN}` | Mail server (SMTP/IMAP/JMAP/Sieve) | Native / LLDAP |
|
||||||
| **`homepage`** | `dashboard.roadtotech.me` | Service portal & system dashboard | Authelia Guard |
|
| **`homepage`** | `dashboard.${HOMELAB_DOMAIN}` | Service portal dynamically synced via `appctl` | Authelia Guard |
|
||||||
| **`dozzle`** | `logs.roadtotech.me` | Container log viewer (via socket-proxy) | Authelia Guard |
|
| **`dozzle`** | `logs.${HOMELAB_DOMAIN}` | Real-time container log viewer (via `socket-proxy`) | Authelia Guard |
|
||||||
| **`watchtower`** | Internal | Automated container image updater | Internal Only |
|
| **`watchtower`** | Internal | Automated container image updater | Internal Only |
|
||||||
| **`diun`** | Internal | Container image update notifier | Internal Only |
|
| **`diun`** | Internal | Container image update notifier | Internal Only |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚡ Quick Start & Operator Workflows (Current Baseline)
|
## Repository Structure
|
||||||
|
|
||||||
### Host & System Operations
|
```text
|
||||||
```bash
|
.
|
||||||
# Rebuild and switch NixOS configuration
|
├── flake.nix # NixOS host configuration, devShell, and sandboxed CI checks
|
||||||
sudo nixos-rebuild switch --flake ~/Core#server
|
├── docker-compose.yml # Core platform service stack
|
||||||
# or use the built-in shell alias:
|
├── nixos/ # Declarative NixOS modules, systemd units, and SOPS secret wiring
|
||||||
nix-switch
|
├── config/ # Service configurations (Traefik, Authelia, Homepage, deployments.yaml)
|
||||||
|
├── scripts/
|
||||||
# Inspect systemd platform services
|
│ ├── appctl # Operational CLI entrypoint and Compose environment orchestrator
|
||||||
systemctl status homeserver-core.service # Core Compose stack
|
│ ├── appctl_engine.py # Discovery, two-axis provenance, TLS inspection, and Homepage sync engine
|
||||||
systemctl status homelab-gitops.service # GitOps webhook engine
|
│ ├── core_manifest.py # Authoritative Pydantic v2 schema v1.0 parser for workload app.yaml
|
||||||
systemctl status dynu-monitor.service # Smart DDNS IP monitor
|
│ ├── gitops_dispatcher.py # Authenticated webhook CD engine with Compose AST security validation
|
||||||
systemctl status dynu-monitor.timer # DDNS timer (every 30m)
|
│ └── test # Automated verification runner (Ruff, Pytest, Nix flake checks)
|
||||||
|
├── tests/ # Unit, structural, and security invariant test suites
|
||||||
|
└── docs/ # Architecture references, operational runbooks, and MADR decisions
|
||||||
```
|
```
|
||||||
|
|
||||||
### Workload Management (`appctl` CLI)
|
---
|
||||||
|
|
||||||
|
## Quickstart & Operations
|
||||||
|
|
||||||
|
### Development & Verification
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# List all application stacks with container health, Git tracking, and provenance status
|
# Enter the hermetic Nix development shell (Python 3, Pytest, Pydantic, PyYAML, Ruff, Pyright)
|
||||||
|
nix develop
|
||||||
|
|
||||||
|
# Run full automated verification (Ruff linter + Pytest suite + nix flake check + NixOS eval)
|
||||||
|
./scripts/test
|
||||||
|
|
||||||
|
# Run static type analysis
|
||||||
|
nix develop --command pyright
|
||||||
|
```
|
||||||
|
|
||||||
|
### Workload Management (`appctl`)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# List all workloads with container health and local Git checkout status
|
||||||
appctl list
|
appctl list
|
||||||
|
|
||||||
# Fetch upstream changes across all repos and inspect with SSL certificates
|
# Include upstream Git provenance (--fetch), TLS certificate expiry (--ssl), and Core services (--core)
|
||||||
appctl list --fetch --ssl --core
|
appctl list --fetch --ssl --core
|
||||||
|
|
||||||
# Inspect full diagnostic metadata for a service
|
# Inspect detailed manifest, provenance, and container diagnostics for a workload
|
||||||
appctl info jellyfin
|
appctl info <service>
|
||||||
|
|
||||||
# Start, stop, or restart an application or Core service
|
# Manage workload or Core service lifecycle
|
||||||
appctl up docs
|
appctl up <service|core>
|
||||||
appctl down mongodb
|
appctl down <service|core>
|
||||||
appctl restart traefik
|
appctl restart <service|core>
|
||||||
|
|
||||||
# Sequential stack update (clean working tree check -> git pull -> compose pull -> up -> sync)
|
# Full stack update (clean tree check -> git pull --ff-only -> compose pull -> recreate -> sync)
|
||||||
appctl update docs
|
appctl update <service|core>
|
||||||
appctl update core
|
|
||||||
|
|
||||||
# Recompile Homepage services.yaml from active app.yaml manifests
|
# Recompile Homepage dashboard configuration from discovered app.yaml manifests
|
||||||
appctl sync
|
appctl sync
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing & Verification
|
### Host System Management
|
||||||
```bash
|
|
||||||
# Run the complete test suite (Ruff linter + Pytest invariants + Nix flake check)
|
|
||||||
./scripts/test
|
|
||||||
|
|
||||||
# Run pure Nix flake evaluation and checks
|
```bash
|
||||||
nix flake check
|
# Rebuild and activate the NixOS host configuration
|
||||||
|
sudo nixos-rebuild switch --flake .#server
|
||||||
|
|
||||||
|
# Inspect platform systemd units
|
||||||
|
systemctl status homeserver-core.service
|
||||||
|
systemctl status homelab-gitops.service
|
||||||
|
systemctl status dynu-monitor.service
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📚 Documentation Navigation & Ownership
|
## Documentation Index
|
||||||
|
|
||||||
| Document | Ownership & Epistemic Role |
|
| Document | Scope |
|
||||||
| :--- | :--- |
|
| :--- | :--- |
|
||||||
| [**`ROADMAP.md`**](ROADMAP.md) | **Implementation Trajectory**: Phased milestones (P0 through P7), active status, and deliverables based on Roadmap v5. |
|
| [**`docs/architecture.md`**](docs/architecture.md) | Runtime layers, network segmentation, and Core / `~/Sites` boundaries. |
|
||||||
| [**ADR Index**](docs/decisions/README.md) | **Architectural Decisions**: Navigation index to authoritative ADRs governing the control plane and 3-tier provenance. |
|
| [**`docs/decisions/README.md`**](docs/decisions/README.md) | Architecture Decision Records (MADR 4.0) governing platform evolution. |
|
||||||
| [**Architecture Reference**](docs/architecture.md) | **Runtime Architecture**: Deep-dive into runtime layers, network segmentation, and component boundaries. |
|
| [**`ROADMAP.md`**](ROADMAP.md) | Phased engineering milestones (P0–P7) and baseline-to-target architecture matrix. |
|
||||||
| [**Appctl Reference**](docs/appctl.md) | **Current CLI Implementation**: Command syntax, arguments, resolution rules, and `app.yaml` fields consumed today. |
|
| [**`docs/appctl.md`**](docs/appctl.md) | `appctl` CLI commands, resolution hierarchy, and `app.yaml` schema v1.0 contract. |
|
||||||
| [**GitOps Engine**](docs/gitops.md) | **Current CD Implementation**: Webhook admission pipeline, HMAC verification, and lock serialization. |
|
| [**`docs/gitops.md`**](docs/gitops.md) | Webhook admission pipeline, HMAC verification, Compose AST validation, and locking. |
|
||||||
| [**Secrets & State**](docs/secrets-and-state.md) | **Current Runtime Secrets**: SOPS encryption, tmpfs projections, and persistent state roots. |
|
| [**`docs/secrets-and-state.md`**](docs/secrets-and-state.md) | SOPS secret management, `/run/secrets/` projections, and persistent state paths. |
|
||||||
| [**Operator Runbook**](docs/operations.md) | **Operational Runbook**: Host maintenance, updates, garbage collection, and recovery procedures. |
|
| [**`docs/operations.md`**](docs/operations.md) | Day-2 operational runbook, updates, backups, and recovery procedures. |
|
||||||
| [**Setup & Provisioning**](docs/setup_guide.md) | **Host Provisioning**: Bare-metal NixOS installation and platform bootstrapping. |
|
| [**`docs/setup_guide.md`**](docs/setup_guide.md) | Bare-metal NixOS installation and host bootstrapping guide. |
|
||||||
| [**Agent Guidelines**](AGENTS.md) | **Agent Invariants**: Hard rules, trust boundaries, Core/Sites boundaries, and testing rules. |
|
| [**`SECURITY.md`**](SECURITY.md) | Security controls, Docker socket isolation, and threat model. |
|
||||||
| [**Security Policy**](SECURITY.md) | **Security Controls**: Docker socket isolation, threat models, and hardening checklists. |
|
| [**`AGENTS.md`**](AGENTS.md) | Architectural invariants, TDD rules, and verification gates for AI contributors. |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🧠 Governance & Knowledge Architecture
|
## License
|
||||||
|
|
||||||
Durable architectural decisions, exploratory design trade-offs, and master execution roadmaps are governed in the operator's central knowledge vault under standard epistemic taxonomy:
|
|
||||||
* **Architectural Decisions**: Captured in MADR 4.0 format under `03-records/decisions/`.
|
|
||||||
* **Execution Roadmaps**: Phased engineering blueprints under `01-plans/`.
|
|
||||||
* **System Discussions**: Exploratory trade-off analyses under `02-discussions/`.
|
|
||||||
|
|
||||||
The repository documentation reflects the accepted architectural state and serves as the operational guide for the implementation.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📄 License
|
|
||||||
|
|
||||||
This repository is released into the public domain under [The Unlicense](UNLICENSE).
|
This repository is released into the public domain under [The Unlicense](UNLICENSE).
|
||||||
+24
-14
@@ -4,11 +4,7 @@ This document serves as the repository-facing projection of the authoritative **
|
|||||||
|
|
||||||
It describes the implementation trajectory and phased engineering milestones for transitioning Homelab Core into a unified platform driven by the `appctl` Operational Control Plane.
|
It describes the implementation trajectory and phased engineering milestones for transitioning Homelab Core into a unified platform driven by the `appctl` Operational Control Plane.
|
||||||
|
|
||||||
> **Authoritative Master Roadmap**: `01-plans/homelab/consolidation/architecture-consolidation-roadmap-v5.md` in the central knowledge vault.
|
> **Governing Architectural Decisions**: See [`docs/decisions/README.md`](docs/decisions/README.md) for the authoritative ADR index (Control Plane Architecture, 3-Tier Provenance Model, and Pydantic v2 Runtime Validation).
|
||||||
>
|
|
||||||
> **Governing Architectural Decisions**:
|
|
||||||
> - `homelab-appctl-control-plane-architecture.md` (Operational Control Plane & Deployment Model)
|
|
||||||
> - `homelab-3tier-architecture-and-provenance.md` (3-Tier Architecture & Provenance)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -24,14 +20,28 @@ It describes the implementation trajectory and phased engineering milestones for
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 🔍 Current Implementation Baseline vs. Target Architecture
|
||||||
|
|
||||||
|
| Architectural Area | Current Implementation Baseline (Milestone P3) | Target Architecture (Roadmap v5) |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| **`appctl` Architecture** | Bash CLI wrapper (`scripts/appctl`) driving local subprocesses (`docker compose`, `git`) and Python engine. | Dedicated daemon service (`homelab-appctl.service`) exposing one logical API over Unix socket and HTTP. |
|
||||||
|
| **Operational Auth** | Host Unix permissions; sourcing runtime secrets from `/run/secrets/`. | LLDAP directory identity; explicit user-scoped API tokens for mutating actions; Authelia ForwardAuth for Web. |
|
||||||
|
| **Metadata & Schema Engine** | Unified engine (`scripts/appctl_engine.py`) with two-axis provenance and fail-closed Pydantic v2 schema v1.0 parser (`scripts/core_manifest.py`). | Single unified engine embedded directly within the control-plane daemon and HTTP/socket routers. |
|
||||||
|
| **Deployment Model** | Direct authoring of `app.yaml` and `docker-compose.yml` in `~/Sites/<app>/`. | 5-stage lifecycle: `DeploymentProposal` $\to$ operator-approved `DeploymentModel` in Git $\to$ `appctl` materialization. |
|
||||||
|
| **GitOps Engine** | Webhook dispatcher (`scripts/gitops_dispatcher.py`) with HMAC-SHA256 auth, Compose AST security validator, and `flock` serialization. | Integrated into control-plane admission, invoking central reconciliation endpoints. |
|
||||||
|
| **Secret Distribution** | Age-encrypted `nixos/secrets.yaml` decrypted by `sops-nix` to tmpfs `/run/secrets/`. | Host secrets remain in `sops-nix`; workload secrets referenced by key and projected via `SecretProvider`. |
|
||||||
|
| **Dashboard** | `appctl sync` compiles `config/homepage/services.yaml` from `app.yaml` manifests. | Homepage consumes read-only live status from `appctl`; dedicated Operations UI client for management. |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 📊 Milestone Overview
|
## 📊 Milestone Overview
|
||||||
|
|
||||||
| Milestone | Title | Focus Area | Status | Deliverables Summary |
|
| Milestone | Title | Focus Area | Status | Deliverables Summary |
|
||||||
| :--- | :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- | :--- |
|
||||||
| **P0** | **Baseline Consolidation** | Git & Architecture | ✅ **Completed** | Synchronized `refactor/appctl-rework` with `main`, recorded control plane ADR, scaffolded v2 metadata engine. |
|
| **P0** | **Baseline Consolidation** | Git & Architecture | ✅ **Completed** | Synchronized `refactor/appctl-rework` with `main`, recorded control plane ADR, scaffolded v2 metadata engine. |
|
||||||
| **P1** | **Mail Topology Realignment** | Topology & State | ✅ **Completed** | Move Stalwart to `smtp.roadtotech.me`; migrate SnappyMail to `~/Sites/snappymail` with zero data loss. |
|
| **P1** | **Mail Topology Realignment** | Topology & State | ✅ **Completed** | Move Stalwart to `smtp.example.com`; migrate SnappyMail to `~/Sites/snappymail` with zero data loss. |
|
||||||
| **P2** | **GitOps Hardening** | Ingress Security | ✅ **Completed** | Authoritative Core repository registry (`deployments.yaml`), Compose AST security validator, systemd sandboxing. |
|
| **P2** | **GitOps Hardening** | Ingress Security | ✅ **Completed** | Authoritative Core repository registry (`deployments.yaml`), Compose AST security validator, systemd sandboxing. |
|
||||||
| **P3** | **Manifest Contract** | Domain Engine | ✅ **Completed** | Schema v1.0, authoritative `core_manifest.py` library, two-axis status inspection, engine promotion. |
|
| **P3** | **Manifest Contract** | Domain Engine | ✅ **Completed** | Schema v1.0 with Pydantic v2 fail-closed models (`core_manifest.py`), two-axis status inspection, unified `appctl_engine.py`. |
|
||||||
| **P4** | **Control Plane Daemon** | API & Dispatch | 🎯 **Current / Up Next** | `homelab-appctl.service` daemon, dual transports (socket + HTTP), thin-client CLI, append-only audit log. |
|
| **P4** | **Control Plane Daemon** | API & Dispatch | 🎯 **Current / Up Next** | `homelab-appctl.service` daemon, dual transports (socket + HTTP), thin-client CLI, append-only audit log. |
|
||||||
| **P5** | **Identity & Secrets** | Auth & Providers | ⏳ **Planned** | ForwardAuth header parsing, user-scoped API tokens, `SecretProvider` reference resolution. |
|
| **P5** | **Identity & Secrets** | Auth & Providers | ⏳ **Planned** | ForwardAuth header parsing, user-scoped API tokens, `SecretProvider` reference resolution. |
|
||||||
| **P6** | **Deployment Model & AI**| Intent Authoring | ⏳ **Planned** | Capability catalog, `DeploymentProposal` $\to$ `DeploymentModel` compiler, Git commit pipeline. |
|
| **P6** | **Deployment Model & AI**| Intent Authoring | ⏳ **Planned** | Capability catalog, `DeploymentProposal` $\to$ `DeploymentModel` compiler, Git commit pipeline. |
|
||||||
@@ -44,9 +54,9 @@ It describes the implementation trajectory and phased engineering milestones for
|
|||||||
### Milestone P0: Baseline Consolidation
|
### Milestone P0: Baseline Consolidation
|
||||||
**Status**: ✅ **Completed**
|
**Status**: ✅ **Completed**
|
||||||
* Merged `refactor/appctl-rework` and `main` into a unified architectural baseline (commit `2297cd5`).
|
* Merged `refactor/appctl-rework` and `main` into a unified architectural baseline (commit `2297cd5`).
|
||||||
* Modernized metadata engine (`scripts/appctl_engine_v2.py`) with strongly-typed dataclasses (`SitesApp`, `CoreService`, `SourceConfig`) and Docker status inspection.
|
* Modernized metadata engine with strongly-typed models (`SitesApp`, `CoreService`, `SourceConfig`) and Docker status inspection.
|
||||||
* Formalized the control-plane ADR and Roadmap v5 in the central knowledge vault; marked legacy roadmaps as superseded.
|
* Formalized the control-plane ADR and Roadmap v5; marked legacy roadmaps as superseded.
|
||||||
* Verified test suite (47 tests passing) and NixOS flake sandbox evaluation.
|
* Verified test suite and NixOS flake sandbox evaluation.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -57,8 +67,8 @@ It describes the implementation trajectory and phased engineering milestones for
|
|||||||
1. *State Freeze & Verified Snapshot*: Generate timestamped, SHA256-verified backup archive of `Core/config/snappymail/data`.
|
1. *State Freeze & Verified Snapshot*: Generate timestamped, SHA256-verified backup archive of `Core/config/snappymail/data`.
|
||||||
2. *Workload Provisioning*: Scaffold `~/Sites/snappymail/` (Class B Image-Only workload) and provision persistent state root at `~/var/lib/homelab/snappymail/`.
|
2. *Workload Provisioning*: Scaffold `~/Sites/snappymail/` (Class B Image-Only workload) and provision persistent state root at `~/var/lib/homelab/snappymail/`.
|
||||||
3. *Zero-Data-Loss State Replication*: Copy data using `cp -a` and prove byte parity (`diff -r`).
|
3. *Zero-Data-Loss State Replication*: Copy data using `cp -a` and prove byte parity (`diff -r`).
|
||||||
4. *Stalwart Re-homing*: Update Stalwart public endpoint in `Core/docker-compose.yml` to `smtp.roadtotech.me`; remove SnappyMail from Core stack.
|
4. *Stalwart Re-homing*: Update Stalwart public endpoint in `Core/docker-compose.yml` to `smtp.example.com`; remove SnappyMail from Core stack.
|
||||||
5. *Live Verification*: Verify webmail at `mail.roadtotech.me`, user logins, address books, IMAP/SMTP routing, and Diun SMTPS delivery on port 465.
|
5. *Live Verification*: Verify webmail at `mail.example.com`, user logins, address books, IMAP/SMTP routing, and Diun SMTPS delivery on port 465.
|
||||||
* **Exit Criteria**: 100% of user data survives cutover; mail flow and Diun alert delivery confirmed.
|
* **Exit Criteria**: 100% of user data survives cutover; mail flow and Diun alert delivery confirmed.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -79,9 +89,9 @@ It describes the implementation trajectory and phased engineering milestones for
|
|||||||
**Status**: ✅ **Completed**
|
**Status**: ✅ **Completed**
|
||||||
* **Objective**: Establish a single authoritative manifest schema and two-axis inspection engine across the platform.
|
* **Objective**: Establish a single authoritative manifest schema and two-axis inspection engine across the platform.
|
||||||
* **Key Deliverables**:
|
* **Key Deliverables**:
|
||||||
1. *Schema v1.0 & Parser Library (`core_manifest.py`)*: Strongly-typed manifest parsing, transport scheme validation (`https://`, `ssh://`, `git@`), and explicit ref semantics (moving branches vs. pinned tags vs. commit SHAs).
|
1. *Schema v1.0 & Parser Library (`core_manifest.py`)*: Fail-closed Pydantic v2 manifest validation (`ConfigDict(extra="forbid")`), transport scheme validation (`https://`, `ssh://`, `git@`), and explicit ref semantics (moving branches vs. pinned tags vs. commit SHAs).
|
||||||
2. *Two-Axis Inspection*: Local deployment checkout state (`✓ Synced`, `* Dirty`) evaluated independently of upstream software provenance (resolved via `git ls-remote` bounded by a 10s timeout during `--fetch`).
|
2. *Two-Axis Inspection*: Local deployment checkout state (`✓ Synced`, `* Dirty`) evaluated independently of upstream software provenance (resolved via `git ls-remote` bounded by a 10s timeout during `--fetch`).
|
||||||
3. *Engine Promotion*: Promote `scripts/appctl_engine_v2.py` to `scripts/appctl_engine.py` with complete behavioral test coverage.
|
3. *Engine Promotion & Cleanup*: Promoted unified engine to `scripts/appctl_engine.py`, retired `scripts/appctl_engine_v2.py` shim, and achieved zero Pyright static analysis warnings.
|
||||||
* **Exit Criteria**: Manifest validation active in CI; all provenance resolution tests passing.
|
* **Exit Criteria**: Manifest validation active in CI; all provenance resolution tests passing.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in new issue
Block a user