mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
- sdk/cloud/deploy/sprites/setup.sh: everything a box needs, run on the Sprite as
bash -s -- NAME RAEA_VERSION AGENTS [REF] < setup.sh: packages, Node, raea's Linux release (sha256-checked),
sdk/cloud's server (a tarball box.sh sends, or the public repo at REF), the ACP agents, the box's token, the farm's
env, the skills, and the raea-cloud service. box.sh up runs it by hand (RAEA_CLOUD_REF for a commit instead of the
local tree), and raea cloud's agents run the same script through the Sprites API, so the two can't differ (CR11).
Tested on two throwaway Sprites, one each way: both ready in about 50 s with the same /v1/health.
- sdk/cloud/deploy/sprites/org.sh: the org guard box.sh had, shared: the org only from
~/.config/raea-cloud/sprites.env, refused when private/cloud/sprites-denied.txt lists it.
- tools/linux-box.sh: makes and completes the Linux test Sprite raea-linux (RAEA_LINUX_BOX picks another) in that
org: build packages, the toolchain, the public repo, and an ubuntu 24.04 root /srv/noble for builds at glibc 2.39.
tools/linux-check.sh uses it by default; its first check passed at 5194d34ef (raea-cli in 726 s, raea-render
without default features in 134 s).
- tools/denied.sh: fails on any name from the private Sprites deny list found outside it, in the whole working tree;
with no private checkout (public CI) there's nothing to check. L1 runs it.
29 lines
1.9 KiB
Bash
Executable File
29 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# Names of other businesses' Sprites orgs, and of machines retired from them, appear nowhere in raea but in the list
|
|
# that denies them: private/cloud/sprites-denied.txt, which deploy/sprites/org.sh reads too (the 11-04 rule: nothing in
|
|
# raea runs on, is named for or points at another business). L1 runs it. It reads the words from the list itself, so
|
|
# it names none of them, and where the list isn't (a public clone, public CI) there is nothing to check. (The Modal
|
|
# list, modal-denied.txt, isn't read yet: bench case names still carry its word.)
|
|
# tools/denied.sh check every file of the working tree: public and private paths alike, the files Git ignores
|
|
# (node_modules, target) and the repositories nested in it (the feed, skills, projects) left out
|
|
set -u
|
|
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
|
LIVE=${RAEA_LIVE:-$HOME/raea}
|
|
list=$LIVE/private/cloud/sprites-denied.txt
|
|
[ -f "$list" ] || { echo "denied: no deny list here ($list), nothing to check"; exit 0; }
|
|
pat=$(mktemp)
|
|
trap 'rm -f "$pat"' EXIT
|
|
grep -v -e '^#' -e '^[[:space:]]*$' "$list" | sort -u > "$pat"
|
|
[ -s "$pat" ] || exit 0
|
|
# the other repositories in the tree are checked by their own
|
|
skip=()
|
|
while read -r d; do skip+=(-g "!${d#./}/**"); done < <(cd "$ROOT" && find . -maxdepth 4 -name .git -not -path ./.git -not -path ./private/.git | sed 's#/\.git$##')
|
|
# --no-ignore-exclude: the private paths are hidden from the public repository by .git/info/exclude, not .gitignore
|
|
hits=$(cd "$ROOT" && rg -n -i -F -f "$pat" --no-ignore-exclude --hidden -g '!.git' -g '!private/cloud/sprites-denied.txt' "${skip[@]}" . 2> /dev/null)
|
|
if [ -n "$hits" ]; then
|
|
echo "denied: a name from private/cloud/sprites-denied.txt (another business's org, or a machine retired from one):" >&2
|
|
echo "$hits" | cut -c1-200 >&2
|
|
exit 1
|
|
fi
|
|
echo "denied: none of the $(wc -l < "$pat" | tr -d ' ') denied names outside their list"
|