Public: anyone can read this; nobody can change it.

seed: versioned packages with a holistic integration spec #127

Merged opened this view on origin

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

seed/packages-integration-spec → main 5 commits

  • Merged. seed/packages-integration-spec was merged into main.

Review

Sign in to review this change.
7 files changed +210 −7
README.md +5 −2
@@ -80,8 +80,11 @@ chair).
8080 ## Reproduce it
8181
8282 Your platform can have children: `PLAT_PAT=<forgejo-pat> nix run .#seed`
83 snapshots it; anyone with the result and this repo grows their **own** sovereign
84 platform — fresh keys, fresh secrets, its own identity, lineage recorded. One
83 snapshots it (add `PUBLISH=1` to version it into your platform's package
84 registry — then `SEED=latest nix run .#up` grows a child with no file to
85 carry, integrity-checked against the seed's own integration spec); anyone
86 with a seed and this repo grows their **own** sovereign platform — fresh
87 keys, fresh secrets, its own identity, lineage recorded. One
8588 command puts a platform on **AWS, Azure, or DigitalOcean** — bare VMs, single
8689 or 3-VM HA, one DNS record to finish: [deploy/](deploy/). For any other VPS, a
8790 tunnel edge, or adding machines:
bin/germinate +27 −2
@@ -23,7 +23,10 @@ set -euo pipefail
2323 export GIT_TERMINAL_PROMPT=0
2424 source "${MITOSIS_LIB:-$(dirname "$0")/lib.sh}"
2525
26 : "${SEED:?SEED=path-to-seed.tar.gz required}"
26 : "${SEED:?SEED=path-to-seed.tar.gz (or latest / r<serial> from the seed package registry) required}"
27 if [ ! -f "$SEED" ]; then
28 SEED=$(resolve_seed "$SEED") || { echo "FATAL: could not resolve SEED '$SEED'"; exit 1; }
29 fi
2730 : "${DOMAIN:=plat.local}" # the daughter's sovereign identity (git.$DOMAIN)
2831 : "${FORGEJO_NS:=forgejo}"; : "${FORGEJO_RELEASE:=forgejo}"
2932 : "${FORGEJO_USER:=plat}"; : "${FORGEJO_PASSWORD:=platplatplat}"; : "${FORGEJO_EMAIL:[email protected]}"
@@ -53,7 +56,18 @@ STEP="startup"
5356 CLUSTER_CTX=$(kubectl config current-context 2>/dev/null || echo '?')
5457 echo "==> germinate (fork) seed=$SEED domain=$DOMAIN target=$CLUSTER_CTX"
5558 WORK=$(mktemp -d); PF=""
56 cleanup(){ [ -n "$PF" ] && kill "$PF" 2>/dev/null || true; rm -rf "$WORK"; }
59 # On any failing exit, print the cluster state that explains it. The FATAL
60 # paths exit without firing the ERR trap (their failures are ||-handled), so
61 # this lives on EXIT — the one hook every path crosses. Three CI runs died at
62 # the forgejo handoff with nothing but the FATAL line to autopsy; never again.
63 diag(){
64 echo "── cluster state at failure (best-effort) ──" >&2
65 kubectl get pods -A --no-headers --request-timeout=5s 2>/dev/null \
66 | awk '{split($3,a,"/"); if (a[1]!=a[2] || ($4!="Running" && $4!="Completed")) print}' | head -15 >&2 || true
67 kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp --request-timeout=5s 2>/dev/null | tail -15 >&2 || true
68 kubectl get helmrelease,kustomization -A --request-timeout=5s 2>/dev/null | grep -v " True " | head -15 >&2 || true
69 }
70 cleanup(){ rc=$?; [ "$rc" -ne 0 ] && diag; [ -n "$PF" ] && kill "$PF" 2>/dev/null || true; rm -rf "$WORK"; }
5771 trap cleanup EXIT
5872 # trap ERR — name the failed phase and the honest recovery. germinate is one-shot
5973 # (it forges fresh keys/passwords each run); there is no partial resume, so the
@@ -68,6 +82,12 @@ on_err(){ local rc=$?
6882 }
6983 trap on_err ERR
7084 mkdir -p "$WORK/seed"; tar -xzf "$SEED" -C "$WORK/seed"
85 # v2 seeds are tamper-evident: every bundle must match its manifest sha256,
86 # and the manifest's integration block says exactly what this seed builds.
87 verify_seed_bundles "$WORK/seed" || exit 1
88 if grep -q '^integration:' "$WORK/seed/manifest.yaml" 2>/dev/null; then
89 echo " integrating: $(sed -n '/^integration:/,/^[a-z]/p' "$WORK/seed/manifest.yaml" | sed -n 's/^ \([a-zA-Z]*\): \(.*\)/\1=\2/p' | tr '\n' ' ')"
90 fi
7191 PROFILE=$(sed -n 's/^profile:[[:space:]]*//p' "$WORK/seed/manifest.yaml")
7292 RECIP=$(sed -n 's/^sopsRecipient:[[:space:]]*//p' "$WORK/seed/manifest.yaml")
7393 echo " profile=$PROFILE repos=$(ls "$WORK/seed/repos"|wc -l|tr -d ' ')"
@@ -470,6 +490,11 @@ if fork_register_grafana_oauth "$GITOPS_DIR" "$FJ" "$FJA" "$DOMAIN"; then
470490 else
471491 echo " WARN: Grafana OAuth registration failed — admin login still works; 'Sign in with Forgejo' errors until re-registered"
472492 fi
493
494 STEP="register fleet-edge (plat-auth) OAuth app"
495 if fork_register_edge_oauth "$GITOPS_DIR" "$FJ" "$FJA" "$DOMAIN"; then
496 echo " fleet-edge OAuth app registered (auth.$DOMAIN)"
497 fi
473498 # Chart tags come from the gitops pins VERBATIM — including pre-release strings
474499 # ("0.7.6-rc.1"): the daughter's CI must build exactly the version the
475500 # HelmRelease/OCIRepository pin or Flux never resolves it. Extraction is
bin/lib.sh +103
@@ -259,6 +259,71 @@ trim_gitops_lean() { # $1 = path to a working gitops clone
259259 git -C "$g" -c user.email=mitosis@plat -c user.name=mitosis commit -q -m "mitosis: lean profile (derive from the tree; monitoring+dashboards SHIP; strip flow/legacy-observability + parent apps; keda split; podMonitor ordering-guard off)" || true
260260 }
261261
262 # ── Seed resolution (packages) ───────────────────────────────────────────────
263 # resolve_seed — turn a SEED value into a local tarball path, echoed on stdout.
264 # a readable file -> itself (unchanged behavior)
265 # latest | r<serial> -> fetched from the seed package registry:
266 # <SEED_REGISTRY>/api/packages/plat/generic/seed/<ver>/
267 # (SEED_REGISTRY defaults to the root forge)
268 # Seeds published by bin/seed carry per-bundle sha256 in their manifest; the
269 # consumer (germinate) verifies them after extraction. The registry itself
270 # authenticates transport; the manifest hashes make the CONTENT tamper-evident.
271 resolve_seed() {
272 local spec="$1" reg ver files tarball dest
273 [ -f "$spec" ] && { printf '%s\n' "$spec"; return 0; }
274 case "$spec" in latest|r[0-9]*) ;; *) return 1 ;; esac
275 reg="${SEED_REGISTRY:-https://git.open-platform.sh}"
276 ver="$spec"
277 if [ "$spec" = latest ]; then
278 ver=$(curl -fsS "$reg/api/v1/packages/plat?type=generic&q=seed&limit=50" | jq -r '[.[] | select(.name=="seed")] | sort_by(.created_at) | last | .version // empty')
279 [ -n "$ver" ] || { echo "resolve_seed: no published seed found at $reg" >&2; return 1; }
280 fi
281 files=$(curl -fsS "$reg/api/v1/packages/plat/generic/seed/$ver/files" | jq -r '.[].name' 2>/dev/null | grep '\.tar\.gz$' | head -1)
282 [ -n "$files" ] || { echo "resolve_seed: seed $ver has no tarball at $reg" >&2; return 1; }
283 dest="$(mktemp -d)/$files"
284 echo "==> fetching seed $ver from $reg (package plat/seed)" >&2
285 curl -fsS -o "$dest" "$reg/api/packages/plat/generic/seed/$ver/$files" || { echo "resolve_seed: download failed" >&2; return 1; }
286 printf '%s\n' "$dest"
287 }
288
289 # publish_seed — upload a built seed (tarball + its inner manifest, readable
290 # standalone) as the generic package plat/seed/<version>. Publishing is a
291 # SEPARATE verb from building so reseed can verify a candidate by germinating
292 # it BEFORE anything reaches the registry — the registry only ever serves
293 # seeds that passed their gate. $1 = tarball $2 = version (needs PLAT_PAT)
294 publish_seed() {
295 local tarball="$1" ver="$2" forge="${FORGEJO_URL:-https://git.open-platform.sh}"
296 local user="${FORGEJO_USER:-plat}" pkg t code f dst
297 : "${PLAT_PAT:?publish_seed needs PLAT_PAT}"
298 pkg="$forge/api/packages/plat/generic/seed/$ver"
299 t=$(mktemp -d)
300 tar -xzf "$tarball" -C "$t" ./manifest.yaml 2>/dev/null || tar -xzf "$tarball" -C "$t" manifest.yaml
301 for f in "$tarball:$(basename "$tarball")" "$t/manifest.yaml:manifest.yaml"; do
302 dst="${f##*:}"
303 code=$(curl -s -o /dev/null -w '%{http_code}' -u "$user:$PLAT_PAT" -X PUT --upload-file "${f%%:*}" "$pkg/$dst")
304 case "$code" in
305 201) echo " published $dst -> $pkg/$dst" ;;
306 409) echo "FATAL: seed version $ver already published"; rm -rf "$t"; return 1 ;;
307 *) echo "FATAL: seed package upload of $dst failed (HTTP $code)"; rm -rf "$t"; return 1 ;;
308 esac
309 done
310 rm -rf "$t"
311 echo " fetch: SEED=$ver nix run .#up (or SEED=latest)"
312 }
313
314 # verify_seed_bundles — for a mitosisVersion>=2 extracted seed, check every
315 # bundle against the sha256 its manifest records. $1 = extracted seed dir.
316 # A v1 seed (no hashes) passes untouched; a MISMATCH is fatal to the caller.
317 verify_seed_bundles() {
318 local dir="$1" f h
319 grep -q '^mitosisVersion: *[2-9]' "$dir/manifest.yaml" 2>/dev/null || return 0
320 for f in "$dir"/repos/*.bundle; do
321 h=$(sha256sum "$f" 2>/dev/null | cut -d' ' -f1 || shasum -a 256 "$f" | cut -d' ' -f1)
322 grep -q "sha256: $h" "$dir/manifest.yaml" || { echo "FATAL: seed bundle $(basename "$f") does not match its manifest sha256 — refusing a tampered/corrupt seed" >&2; return 1; }
323 done
324 echo " seed integrity: every bundle matches its manifest sha256"
325 }
326
262327 # publish_wiki — materialize the in-repo wiki/ source as the NATIVE Forgejo wiki
263328 # of <owner>/mitosis. The wiki is documentation-as-an-organ: it ships inside the
264329 # mitosis repo (reviewable, versioned with the code it documents), and every
@@ -520,6 +585,19 @@ EOF
520585 # CA fields are filled post-Forgejo via fork_postforgejo_secrets/_register_oauth/
521586 # _seal_ca. We seal a manifest carrying every key so later `sops set` only mutates
522587 # existing paths. GITOPS_REMOTE embeds the fresh admin password (in-cluster URL).
588 # forwardAuth edge (fleet-edge, gitops ≥ r187): OAuth pair is registered
589 # post-Forgejo (fork_register_edge_oauth); PLAT_PAT here is the "user:token"
590 # Basic form auth-service expects, minted with the daughter PAT in
591 # fork_postforgejo_secrets. Placeholders keep the manifest decryptable NOW —
592 # an unsealed leftover parent secret is exactly what kills a fork's Flux.
593 if [ -f "$g/$P/mcp/plat-auth-secrets.yaml" ]; then
594 _fork_seal "$g" "$P/mcp/plat-auth-secrets.yaml" plat-auth-secrets mcp "$_FORK_LBL_MANAGED" <<EOF
595 PLAT_AUTH_OAUTH_CLIENT_ID: pending-registration
596 PLAT_AUTH_OAUTH_CLIENT_SECRET: pending-registration
597 PLAT_PAT: PLACEHOLDER
598 EOF
599 fi
600
523601 _fork_seal "$g" "$P/mcp/plat-mcp-secrets.yaml" plat-mcp-secrets mcp "$_FORK_LBL_MANAGED" <<EOF
524602 MCP_BEARER_TOKEN: $mcp_bearer
525603 MCP_SESSION_KEY: $mcp_session
@@ -659,6 +737,10 @@ fork_postforgejo_secrets() {
659737 dcj=$(printf '{"auths":{"git.%s":{"auth":"%s"},"forgejo-http.forgejo.svc.cluster.local:3000":{"auth":"%s"}}}' "$dom" "$rauth" "$rauth")
660738 sops set "$rps" '["stringData"][".dockerconfigjson"]' "$(printf '%s' "$dcj" | jq -Rs .)"
661739 fi
740 # forwardAuth edge: auth-service builds its Forgejo probe as Basic
741 # base64($PLAT_PAT) expecting "user:token" — this override is that form.
742 local pas="$1/clusters/local/platform/mcp/plat-auth-secrets.yaml"
743 [ -f "$pas" ] && sops set "$pas" '["stringData"]["PLAT_PAT"]' "\"plat:$pat\""
662744 # Agents dispatcher PLAT_TOKEN — the daughter's fresh PAT (the regen'd placeholder).
663745 # Same DPAT germinate mints with admin scopes, so the dispatcher self-registers
664746 # the system webhook (POST /admin/hooks) and self-provisions the QA user (POST
@@ -689,6 +771,27 @@ fork_register_oauth() { # $1=gitops $2=forgejo_url $3=basicauth $4=DOMAIN
689771 git -C "$g" -c user.email=mitosis@plat -c user.name=mitosis commit -aqm "mitosis fork: plat-mcp OAuth client ($dom)" || true
690772 }
691773
774 # fork_register_edge_oauth — register the fleet edge's 'plat-auth' OAuth app on
775 # the DAUGHTER Forgejo (redirect https://auth.<domain>/callback) and seal the
776 # pair into plat-auth-secrets. No-op when the seed predates the fleet edge.
777 fork_register_edge_oauth() { # $1=gitops $2=forgejo_url $3=basicauth $4=DOMAIN
778 local g="$1" fj="$2" auth="$3" dom="$4"
779 local pas="$1/clusters/local/platform/mcp/plat-auth-secrets.yaml" resp cid csec
780 [ -f "$pas" ] || return 0
781 resp=$(curl -fsS -u "$auth" -H 'Content-Type: application/json' \
782 -d "{\"name\":\"plat-auth\",\"redirect_uris\":[\"https://auth.$dom/callback\"],\"confidential_client\":true}" \
783 "$fj/api/v1/user/applications/oauth2" 2>/dev/null) || true
784 cid=$(printf '%s' "$resp" | jq -r '.client_id // empty' 2>/dev/null)
785 csec=$(printf '%s' "$resp" | jq -r '.client_secret // empty' 2>/dev/null)
786 if [ -z "$cid" ] || [ -z "$csec" ]; then
787 echo " WARN: plat-auth OAuth registration failed — the fleet edge will 503 until registered by hand" >&2
788 return 1
789 fi
790 sops set "$pas" '["stringData"]["PLAT_AUTH_OAUTH_CLIENT_ID"]' "\"$cid\""
791 sops set "$pas" '["stringData"]["PLAT_AUTH_OAUTH_CLIENT_SECRET"]' "\"$csec\""
792 git -C "$g" -c user.email=mitosis@plat -c user.name=mitosis commit -aqm "mitosis fork: fleet-edge (plat-auth) OAuth registered" || true
793 }
794
692795 # fork_register_grafana_oauth — register the daughter's own Grafana OAuth app on
693796 # its Forgejo and sops-set the client id/secret into grafana-oauth (replacing the
694797 # pending-registration placeholders fork_regen_secrets sealed). Mirrors
bin/seed +47 −2
@@ -12,6 +12,17 @@ export GIT_TERMINAL_PROMPT=0
1212 : "${PROFILE:=lean}" # lean | full
1313 : "${PLAT_PAT:?PLAT_PAT required (source Forgejo PAT with repo read)}"
1414 : "${OUT:=seed-$(date +%Y%m%d-%H%M%S)-${PROFILE}.tar.gz}"
15 # PUBLISH=1 uploads the seed (tarball + its manifest, separately readable) to
16 # the platform's own package registry as a GENERIC package — seeds become
17 # versioned, fetchable artifacts instead of blobs a repo has to carry:
18 # <forge>/api/packages/plat/generic/seed/<version>/<files>
19 # `up`/`germinate` resolve SEED=latest or SEED=r<serial> from there (lib.sh
20 # resolve_seed). The genesis/ blob remains the air-gap fallback.
21 : "${PUBLISH:=0}"
22 : "${SEED_VERSION:=r$(date -u +%Y%m%d%H%M%S)}"
23
24 # sha256 of a file, portable (coreutils sha256sum on runners/nix, shasum on mac).
25 _sha256(){ sha256sum "$1" 2>/dev/null | cut -d' ' -f1 || shasum -a 256 "$1" | cut -d' ' -f1; }
1526
1627 # System repos = the platform genome (always seeded). mitosis itself rides along
1728 # so daughters can spawn in turn. ci-builder is the job-container toolchain
@@ -75,8 +86,9 @@ seed_squash_main(){
7586 git -C "$bare" update-ref "refs/heads/$FLUX_BRANCH" "$c"
7687 git -C "$bare" symbolic-ref HEAD "refs/heads/$FLUX_BRANCH"
7788 }
78 echo "==> mitosis seed profile=$PROFILE out=$OUT domain=${SEED_DOMAIN:-?}"
79 { echo "mitosisVersion: 1"; echo "profile: $PROFILE"; echo "createdFrom: $CREATED_FROM";
89 echo "==> mitosis seed profile=$PROFILE out=$OUT domain=${SEED_DOMAIN:-?} version=$SEED_VERSION"
90 { echo "mitosisVersion: 2"; echo "seedVersion: $SEED_VERSION";
91 echo "profile: $PROFILE"; echo "createdFrom: $CREATED_FROM";
8092 echo "domain: ${SEED_DOMAIN:-UNKNOWN}";
8193 echo "sopsRecipient: ${SOPS_RECIPIENT:-UNKNOWN}"; echo "repos:"; } > "$WORK/seed/manifest.yaml"
8294 # yq-free JSON string escaper for manifest values (description/website may carry
@@ -125,10 +137,43 @@ for r in $REPOS; do
125137 | jq -r '(.topics // []) | join(",")' 2>/dev/null || echo "")
126138 {
127139 printf ' - owner: %s\n name: %s\n ref: %s\n tags: "%s"\n' "$owner" "$name" "$ref" "$tags"
140 printf ' sha256: %s\n' "$(_sha256 "$WORK/seed/repos/${owner}__${name}.bundle")"
128141 printf ' description: %s\n' "$(yqstr "$desc")"
129142 printf ' website: %s\n' "$(yqstr "$website")"
130143 printf ' topics: "%s"\n' "$topics"
131144 } >> "$WORK/seed/manifest.yaml"
132145 done
146
147 # ── The holistic integration block ───────────────────────────────────────────
148 # One spec describes everything this seed integrates: the platform versions the
149 # gitops tree pins (what the daughter will build through its own CI), the
150 # toolchain floor, and the acceptance gate the shape is validated by. Read from
151 # the SQUASHED gitops bundle itself so the spec can never drift from the tree
152 # it ships. Extraction is best-effort ("UNKNOWN" over a dead seed build).
153 g(){ git -C "$WORK/gitops.git" show "HEAD:$1" 2>/dev/null || true; }
154 # `|| true` on every extraction: pipefail + `head -1` means an early close
155 # SIGPIPEs the producer and set -e would kill the whole seed silently.
156 MCP_TAG=$(g clusters/local/platform/mcp/ocirepository.yaml | sed -n 's/^[[:space:]]*tag:[[:space:]]*"\{0,1\}\([0-9][^"]*\)"\{0,1\}/\1/p' | head -1 || true)
157 AGENTS_TAG=$(g clusters/local/platform/agents/helmrelease.yaml | sed -n 's/^[[:space:]]*tag:[[:space:]]*"\{0,1\}\([0-9][^"]*\)"\{0,1\}/\1/p' | head -1 || true)
158 CIR_TAG=$(g clusters/local/platform/forgejo/runner-isolated.yaml | grep -ohE 'ci-runner:[0-9]+\.[0-9]+\.[0-9]+' | head -1 | sed 's/.*://' || true)
159 [ -n "$CIR_TAG" ] || CIR_TAG=$(for f in $(git -C "$WORK/gitops.git" ls-tree -r --name-only HEAD -- clusters/local/platform/forgejo/ 2>/dev/null); do g "$f"; done | grep -ohE 'ci-runner:[0-9]+\.[0-9]+\.[0-9]+' | head -1 | sed 's/.*://' || true)
160 K3S_PIN=$(sed -n 's/.*K3S_IMAGE:=rancher\/k3s:\(v[^}]*\)}.*/\1/p' "$(dirname "$0")/up" 2>/dev/null | head -1 || true)
161 {
162 echo "integration:"
163 echo " mcp: ${MCP_TAG:-UNKNOWN}"
164 echo " agents: ${AGENTS_TAG:-UNKNOWN}"
165 echo " ciRunner: ${CIR_TAG:-UNKNOWN}"
166 echo " k3s: ${K3S_PIN:-UNKNOWN}"
167 echo " fluxMin: 2.6.0"
168 echo "gate: scripts/coldstart-assert.sh (A1-A11; nightly adds E1-E8)"
169 } >> "$WORK/seed/manifest.yaml"
170
133171 tar -czf "$OUT" -C "$WORK/seed" .
134172 echo "==> wrote $OUT ($(du -h "$OUT" | cut -f1)). manifest:"; sed 's/^/ /' "$WORK/seed/manifest.yaml"
173
174 if [ "$PUBLISH" = "1" ]; then
175 echo "==> publishing seed package $SEED_VERSION"
176 # shellcheck disable=SC1091
177 . "${MITOSIS_LIB:-$(dirname "$0")/lib.sh}"
178 publish_seed "$OUT" "$SEED_VERSION"
179 fi
bin/up +9
@@ -35,6 +35,15 @@ done
3535 : "${HTTPS_PORT:=443}" # host port -> traefik :443 (so git.$DOMAIN works via /etc/hosts)
3636 : "${SEED:=}"
3737
38 # A SEED of `latest` or r<serial> resolves from the platform's seed package
39 # registry (bin/seed PUBLISH=1 puts it there; SEED_REGISTRY overrides the
40 # forge). Files and the bundled genesis artifact behave exactly as before.
41 if [ -n "$SEED" ] && [ ! -f "$SEED" ]; then
42 # shellcheck disable=SC1090
43 . "${MITOSIS_LIB:-$HERE/lib.sh}"
44 SEED=$(resolve_seed "$SEED") || { echo "up: could not resolve SEED" >&2; exit 1; }
45 fi
46
3847 # Locate the seed: explicit SEED wins, else the flake-bundled genesis artifact
3948 # (MITOSIS_GENESIS, set by the flake wrapper when genesis/ rode along), else a
4049 # genesis/ or newest seed*.tar.gz beside the source or in the CWD you ran from.
scripts/reseed-run.sh +9
@@ -26,6 +26,15 @@ if [ -f genesis/seed.tar.gz ] && [ "$(refs "$PWD/seed-new.tar.gz")" = "$(refs ge
2626 exit 0
2727 fi
2828
29 # The candidate germinated clean (reseed-verify above) — NOW it may reach the
30 # registry: publish the verified tarball as the versioned seed package, so
31 # `SEED=latest` always resolves to a gate-passed seed. Failure here is fatal:
32 # a reseed whose package half went missing would leave the registry stale
33 # while the PR advances the blob.
34 # shellcheck disable=SC1091
35 . bin/lib.sh
36 publish_seed "$PWD/seed-new.tar.gz" "r${RUN_NUMBER}"
37
2938 B="reseed/r${RUN_NUMBER}"
3039 git checkout -q -b "$B"
3140 mv seed-new.tar.gz genesis/seed.tar.gz
wiki/Grow-Your-Own-Platform.md +10 −1
@@ -57,7 +57,16 @@ From a checkout against your running platform, run:
5757 PLAT_PAT=<a Forgejo PAT with repo read> nix run .#seed
5858 ```
5959
60 This writes `seed-<timestamp>-lean.tar.gz` and prints its manifest. The seed is git bundles plus a manifest. It carries no age key, so it leaks nothing usable. Hand the seed and this repo to anyone. They run `nix run .#up` and get a platform with a brand-new encryption key and freshly minted secrets. It shares nothing with yours. `PROFILE=full` additionally bundles your app repos.
60 This writes `seed-<timestamp>-lean.tar.gz` and prints its manifest — a **holistic integration spec**: every bundled repo with its commit and sha256, plus the platform versions the seed integrates (mcp, agents, the CI runner, the k3s and Flux floor) and the acceptance gate that shape answers to. The seed carries no age key, so it leaks nothing usable. `PROFILE=full` additionally bundles your app repos.
61
62 Seeds are also **published artifacts**. `PUBLISH=1` uploads the tarball and its spec to your platform's own package registry (`plat/seed`, a generic package), and anyone growing a child resolves one by version instead of carrying a file:
63
64 ```bash
65 SEED=latest nix run .#up # newest published seed
66 SEED=r20260814120000 nix run .#up # or an exact version
67 ```
68
69 Germination verifies every bundle against the spec's sha256 before it builds — a tampered or corrupt seed refuses loudly. The manifest is fetchable on its own (`…/api/packages/plat/generic/seed/<version>/manifest.yaml`), so you can read exactly what a seed integrates before downloading it. The nightly reseed publishes a fresh version only after germinating it clean — the registry only ever serves gate-passed seeds. A seed file handed over on a USB stick still works exactly as before; the registry is distribution, not a dependency.
6170
6271 ## Grow one on a cloud
6372

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs