refact(frank-dragoon): serve gates run on the shared gate library

The hand-written image/ck/tokenizer gates are require_image, require_bytes and
require_dir_files from scripts/lib/llm-gates.sh. The serve seam is unchanged
and still green (its podman stub now models `podman image exists`, the
primitive the gate uses). Behaviour preserved: every refusal names the
artifact, the endpoint and the fetch script.
This commit is contained in:
Frank committed 2026-10-13 21:40:02 -07:00
1 parent acf2a5cee5
commit 028afdeb58
4 files changed
+50 -42

No files matched your search

+4 -2
View File
@@ -69,12 +69,14 @@ require_min_mib() {
# require_dir_files — DIR must be a directory and every named member a
# regular file (the flat-tokenizer law: snapshot symlinks dangle in the
# container mount even when the directory itself is real).
# container mount even when the directory itself is real. A symlinked
# DIRECTORY is refused too: a HF cache snapshot can link the directory
# itself, and a link dangles inside the container mount.
require_dir_files() {
local dir="$1" label="$2" hint="$3"
shift 3
local f
if [[ ! -d "$dir" ]]; then
if [[ -L "$dir" || ! -d "$dir" ]]; then
_gate_fail "$label: missing at $dir" "$hint"
fi
for f in "$@"; do