Compare commits

..
8 Commits
Author SHA1 Message Date
kiskaadee 6052019f2c fix(appctl): lock HOMELAB_DOMAIN at startup to prevent application
Core Architecture & Invariant CI / validate (push) Successful in 40s
domain leaks during sync
2026-10-14 13:41:17 -05:00
kiskaadee 298ae728e1 chore(tooling): enforce python >=3.13 requirement and align uv lockfile
- Declare project.requires-python = ">=3.13" in pyproject.toml
- Lock dependencies and virtual package in uv.lock
- Update datetime.timezone.utc usages to datetime.UTC across scripts
2026-10-14 13:41:17 -05:00
kiskaadee ecacb1cc39 docs(p4): formalize control plane readiness plan and boundary specifications
- Reconcile appctl implementation inventory and caller map
- Define canonical command and error contract with schema v1.0
- Close authorization design with strict token enforcement everywhere
- Specify daemon execution boundaries and fixed subprocess allowlist
- Formalize append-only audit telemetry schema and failure-handling semantics
- Establish P4 acceptance test matrix and definition of done
- Synchronize ROADMAP.md milestone table and todo.txt task tracking
2026-10-14 13:41:17 -05:00
kiskaadee f261b80477 chore(uv): bump python requirement to >=3.13 in uv.lock 2026-10-14 13:41:17 -05:00
kiskaadee 2c99e3e92e chore(flake): update nixpkgs and sops-nix inputs.
- bump nixpkgs to nixos-unstable 7fdd4004(2026-10-11)
- bump sops-nix to ee48786 with systemd shutdown fxi and nested JSON key
  support
2026-10-14 13:41:17 -05:00
kiskaadee 9381f3e070 feat(nixos): configure automated nix store garbage collection and deduplication
- Enable weekly garbage collection retaining generations newer than 14 days

- Enable automatic nix store hardlink deduplication
2026-10-14 13:41:17 -05:00
kiskaadee f0e0fc41a1 feat(appctl): promote engine v2 to authoritative appctl_engine and complete Milestone P3
- Promote scripts/appctl_engine_v2.py to authoritative scripts/appctl_engine.py
- Add full two-axis inspection, Homepage synchronization, and schema v1.0 support
- Convert scripts/appctl_engine_v2.py into a backward-compatibility shim
- Rename tests/unit/test_appctl_engine_v2.py to test_appctl_engine.py and remove xfail marker
- Update README.md, docs/appctl.md, and docs/architecture.md to reference appctl_engine
- Synchronize todo.txt and mark Milestone P3 as completed in ROADMAP.md
2026-10-14 13:41:17 -05:00
kiskaadee c78550abea feat(provenance): implement two-axis inspection engine and bounded upstream resolver
- Implement scripts/provenance.py evaluating local deployment checkout state independently from upstream software provenance.
- Add bounded git ls-remote provenance resolver with 10s timeout to prevent hanging on unresponsive remotes during --fetch.
- Add 10 unit tests in tests/unit/test_provenance.py covering clean/dirty detection, synced vs update-available states, timeout handling, and unreachable remotes.
- Include git in test-suite nativeBuildInputs in flake.nix for hermetic sandbox execution.
- Update todo.txt marking Tasks 3, 4, & 5 of Milestone P3 completed.
2026-10-14 13:41:17 -05:00
3 changed files with 34 additions and 1 deletions

No files matched your search

+3
View File
@@ -35,6 +35,9 @@ if [ -f "$ENV_FILE" ]; then
set +a set +a
fi fi
# Lock the homelab root domain before setup_app_env can mutate $DOMAIN
export HOMELAB_DOMAIN="${HOMELAB_DOMAIN:-${DOMAIN_SUFFIX:-${DOMAIN:-roadtotech.me}}}"
# Show help usage # Show help usage
show_help() { show_help() {
echo "🚀 appctl - Homelab Container Orchestrator" echo "🚀 appctl - Homelab Container Orchestrator"
+5 -1
View File
@@ -37,7 +37,11 @@ SITES_DIR = os.environ.get(
else os.path.expanduser("~/Sites"), else os.path.expanduser("~/Sites"),
) )
HOMELAB_DOMAIN = os.environ.get("HOMELAB_DOMAIN") or os.environ.get("DOMAIN", "") HOMELAB_DOMAIN = (
os.environ.get("HOMELAB_DOMAIN")
or os.environ.get("DOMAIN_SUFFIX")
or os.environ.get("DOMAIN", "")
)
def validate_environment() -> None: def validate_environment() -> None:
+26
View File
@@ -336,3 +336,29 @@ def test_homepage_sync_groups_and_sorts_correctly(
content = output_file.read_text() content = output_file.read_text()
assert content.find("- Group A") < content.find("- Group B") # Group A should appear before Group B assert content.find("- Group A") < content.find("- Group B") # Group A should appear before Group B
assert "App2" in content # App 2 is in the file assert "App2" in content # App 2 is in the file
def test_homepage_sync_core_services_domain_isolation(
mock_core_dir: Path,
monkeypatch,
):
"""
Ensure Core Infrastructure services use HOMELAB_DOMAIN and do not leak
an application's domain if DOMAIN is overridden by appctl.
"""
hp_config_dir = mock_core_dir / "config" / "homepage"
hp_config_dir.mkdir(parents=True, exist_ok=True)
monkeypatch.setattr(engine, "HOMELAB_DOMAIN", "roadtotech.me")
monkeypatch.setenv("DOMAIN", "mermaid.roadtotech.me")
engine.cmd_sync_homepage(["--homepage-dir=" + str(hp_config_dir)])
output_file = hp_config_dir / "services.yaml"
assert output_file.exists()
content = output_file.read_text()
assert "https://dashboard.roadtotech.me" in content
assert "https://traefik.roadtotech.me" in content
assert "https://auth.roadtotech.me" in content
assert "mermaid.roadtotech.me" not in content