igneum/tools/fleet/publish-fleet.sh
igneum-labs 7eed16a29a Pre-public scrub, the text pass (7 October 2026, 19:5x UK): no founder name, personal login, earlier business or personal address in any tracked text file, and a gate check that keeps it so
The sweep (main's item 1): 199 tracked text files, 783 lines. The founder's full name, first name and possessive become "the founder" (sentence starts capitalised); the lowercase operating-system user name in WSL paths and commands becomes <user>; the second owner login becomes "the second owner login"; the three earlier businesses and the two other brands become "the other business", "the earlier entity", "the earlier business" and "another brand"; the Chrome profile rule names the igneum.network profile, not the profile's label. The standing commit login igneum-labs is not a founder term here: the fresh-repository step renames it in the history (docs/plans/history-rewrite.md, tools/repo/fresh-repo.sh).

The patterns never appear in plain text in the tree (a plaintext list would be the hit): tools/ci/founder-strings.b64 (perl regex, tab, a sample per row) is read by tools/ci/founder-strings-check.sh (every tracked text file, perl, known-failed first: the self-test plants each row's sample in a fixture and the hit must name the file), by tools/community/discord-hooks.mjs (the guard's founder and business rows; the test takes its fixtures from the samples) and by tools/repo/fresh-repo.sh (the business names of the rewrite rules). site/forbidden-strings.txt carries the same patterns as b64: lines, decoded case-insensitive by site/scrub.mjs and tools/ci/launch-gates-check.mjs (whose fixture now plants an encoded made-up name). The check runs in the gate's tree checks on every merge.

Not in this commit, by main's word: the 105 commit messages and 40 personal-identity commits that need the history rewrite (listed, not run), and the secrets found by gitleaks over the history (reported with owners).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 18:39:50 +00:00

33 lines
2.4 KiB
Bash
Executable file

#!/usr/bin/env bash
# Publish the rented-GPU fleet page's data: copies a fleet.json into the downloads site's fleet folder and deploys.
# tools/fleet/publish-fleet.sh <fleet.json> (the fleet agent calls this after every change, at most once a minute)
# The folder name is in ~/.config/igneum/fleet-path; the page is dl.igneum.network/<that path>/ (noindex, unlisted).
set -euo pipefail
JSON="${1:?fleet.json path}"
DLSITE="$(cat "$HOME/.config/igneum/dlsite-dir")"; P="$(cat "$HOME/.config/igneum/fleet-path")"
python3 -c "import json,sys; json.load(open(sys.argv[1]))" "$JSON"
cp "$JSON" "$DLSITE/$P/fleet.json"
# The Fleet | Workers nav is part of the page for good (6 October 2026, the founder: the link was missing): re-insert it and its
# four CSS lines whenever an index.html regeneration dropped them. Absolute paths: the host serves the folder without a slash.
python3 - "$DLSITE/$P/index.html" "$P" <<'PY'
import sys, re
f, p = sys.argv[1], sys.argv[2]; s = open(f).read()
nav = f'<nav aria-label="Pages"><a href="/{p}/" class="on" aria-current="page">Fleet</a><a href="/{p}/workers.html">Workers</a></nav>'
css = """ nav { display: flex; gap: 2px; border: 1px solid var(--line); }
nav a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 7px 12px; }
nav a.on { color: var(--ink); background: var(--panel-2); }
nav a:hover { color: var(--ember-2); }
"""
changed = False
if "nav {" not in s: s = s.replace("</style>", css + "</style>", 1); changed = True
if "workers.html" not in s:
m = re.search(r"<header[^>]*>", s) or re.search(r"<body[^>]*>", s)
s = s[:m.end()] + "\n " + nav + s[m.end():]; changed = True
if changed: open(f, "w").write(s); print("fleet index.html: nav restored")
PY
(cd "$DLSITE" && npx --yes vercel@latest --global-config "$HOME/.config/igneum/vercel" deploy --prod --yes >/dev/null 2>&1) || { echo "deploy failed" >&2; exit 1; }
for i in $(seq 1 12); do
if curl -fsS --max-time 10 "https://dl.igneum.network/$P/fleet.json?t=$(date +%s)" | python3 -c "import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get('spend',{}).get('updated_at')==json.load(open('$JSON')).get('spend',{}).get('updated_at') else 1)" 2>/dev/null; then echo "live: https://dl.igneum.network/$P/"; exit 0; fi
sleep 5
done
echo "deployed but the edge still serves the previous file" >&2; exit 2