Homepage (TDD slice 6): the git-driven deploy

Red tests first.
- tests/homepage_deploy.bats: the deploy ships the homepage (assets to
  /srv/homepage, the checker timer, both Caddy hashes, deployed.js) and is
  git-driven (pulls main); the checker runs as a systemd timer.
- scripts/homepage-status.service / .timer: the checker as a oneshot service
  + a 3-minute timer (Q2/Q35).
- scripts/deploy.sh: the Caddyfile render now substitutes BOTH hashes
  (REPLACE_WITH_HASH <- CADDY_BASICAUTH_HASH, REPLACE_WITH_ADMIN_HASH <-
  CADDY_ADMIN_HASH). A new homepage step copies the assets to /srv/homepage,
  generates deployed.js from the deployed commit's datetime (Q43), installs
  the checker timer, and runs the checker once so status.json exists at once.
- tests/llm_units.bats: scoped the three LLM-unit tests to
  frank-default-*.service (the homepage unit is a different pattern: it
  installs to /usr/local/bin and runs from /srv at deploy time).
This commit is contained in:
Frank committed 2026-08-23 12:59:56 -07:00
1 parent 13ea2d7d3e
commit 2e6c44f3ba
5 files changed
+78 -11

No files matched your search

+6 -4
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
# Seam: LLM systemd unit integrity.
# Every scripts/*.service unit must point at files that exist in this repo.
# Every LLM unit (frank-default-*.service) must point at files that exist in
# this repo. The homepage-status unit is a different pattern (it installs to
# /usr/local/bin and runs from /srv at deploy time) and is not checked here.
# The units reference absolute paths on the target checkout
# (/home/dank/serverAppConfigs/...); the relative part of each path must
# resolve to a tracked file here. A unit that points at a retired checkout
@@ -48,7 +50,7 @@ unit_repo_path() {
echo "$bad"
return 1
fi
done < <(find "$REPO_ROOT/scripts" -name '*.service' -type f | sort)
done < <(find "$REPO_ROOT/scripts" -name 'frank-default-*.service' -type f | sort)
[ "$any" -eq 1 ] || skip "no LLM units yet"
}
@@ -63,7 +65,7 @@ unit_repo_path() {
echo "unit $(basename "$unit") env file $envfile not in repo"
return 1
}
done < <(find "$REPO_ROOT/scripts" -name '*.service' -type f | sort)
done < <(find "$REPO_ROOT/scripts" -name 'frank-default-*.service' -type f | sort)
}
@test "LLM serve scripts exist for every unit" {
@@ -76,5 +78,5 @@ unit_repo_path() {
echo "unit $svc: ExecStart script $script not in repo"
return 1
}
done < <(find "$REPO_ROOT/scripts" -name '*.service' -type f | sort)
done < <(find "$REPO_ROOT/scripts" -name 'frank-default-*.service' -type f | sort)
}