From 477bfac868081eaf5565f6f6bd7e3a94f884d1d3 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Thu, 1 Oct 2026 05:58:11 +0530 Subject: [PATCH 1/5] Virga stands alone: three things the split exposed, and a gate for the worst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split out of sourceplane/cirrus, this tree ran its own workflows and its own bootstrap tooling as a repository root for the first time. Three things were wrong that could not be seen from inside Cirrus. 1. A product's secret refs named the baseline's workspace. rebrand.mjs kept `lumen` as the workspace segment of every `secret:////…` ref whenever `orunWorkspace` was a ws_… id — and the blueprint's input (`from: workspace`) is always a ws_… id. So every product built from Virga carried `secret://lumen//…`, which the platform refuses: `Ref workspace "lumen" does not name this run's workspace`. Cirrus fixed this rule; the port did not carry the fix. Now: explicit slug, else the workspace as given, else the repo name. `testing/tenancy.test.sh` rebrands a copy three ways and reads the refs back; it fails on the old rule and runs in Baseline CI. 2. Baseline CI's `migration-checksums` lane was red on the first push. setup-node@v5 reads `packageManager` from the root package.json and turns pnpm caching on, then fails looking for a pnpm the job never installs. A nested `.github/` is inert, so this lane had never run. `package-manager-cache: false`; the script needs node and nothing else. 3. `testing/retouch.test.sh` failed on macOS on its own plumbing. `head -n -1` is GNU-only. `sed '$d'` says the same thing everywhere. Not in this change: `intent.yaml` still says `ws_REPLACE_ME`, and the component.yaml refs still say `secret://lumen/virga/…`. Both wait on the workspace this repository is attached to. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/baseline.yml | 9 +++++ testing/retouch.test.sh | 8 ++-- testing/tenancy.test.sh | 74 ++++++++++++++++++++++++++++++++++ tooling/rebrand/rebrand.mjs | 22 ++++++++-- 4 files changed, 106 insertions(+), 7 deletions(-) create mode 100755 testing/tenancy.test.sh diff --git a/.github/workflows/baseline.yml b/.github/workflows/baseline.yml index f469118..c7efbd6 100644 --- a/.github/workflows/baseline.yml +++ b/.github/workflows/baseline.yml @@ -54,6 +54,8 @@ jobs: - run: bash testing/leak.test.sh # The tools the phases' hooks run, against this tree. - run: bash testing/retouch.test.sh + # A product's secret refs name the product's workspace, not this one's. + - run: bash testing/tenancy.test.sh - run: bash testing/tag-gate.test.sh # The migration checksums. This lived in `verify.yml` and travelled into every @@ -64,7 +66,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + # `package-manager-cache: false` is load-bearing. setup-node@v5 reads + # `packageManager` from the ROOT package.json and turns pnpm caching on by + # itself, then fails looking for a pnpm this job never installs. Inside + # Cirrus this workflow never ran — a nested `.github/` is inert — so the + # first run of this lane was the first push of the split repository, and + # it was red. The script needs node and nothing else. - uses: actions/setup-node@v5 with: node-version: 22 + package-manager-cache: false - run: node tooling/migrations/rechecksum.mjs --check diff --git a/testing/retouch.test.sh b/testing/retouch.test.sh index 0ab47a3..05e9da6 100755 --- a/testing/retouch.test.sh +++ b/testing/retouch.test.sh @@ -81,13 +81,15 @@ grep -q 'replace marker' "$tmp/two.log" || bad "second run did not report a repl ok "a second run replaces the marker (a different phase's too) rather than appending" echo "── retouch: every other byte is as it was" -if [ "$(head -n -1 "$tmp/apps/alpha/component.yaml" | cksum)" = "$(cksum < "$tmp/alpha.orig")" ]; then +# `sed '$d'`, not `head -n -1`: the negative count is GNU-only, and on a Mac +# this gate failed on the test's own plumbing while retouch.mjs was correct. +if [ "$(sed '$d' "$tmp/apps/alpha/component.yaml" | cksum)" = "$(cksum < "$tmp/alpha.orig")" ]; then ok "apps/alpha: the file above the marker is byte-for-byte the original" else bad "apps/alpha: bytes above the marker changed" - diff <(head -n -1 "$tmp/apps/alpha/component.yaml") "$tmp/alpha.orig" >&2 || true + diff <(sed '$d' "$tmp/apps/alpha/component.yaml") "$tmp/alpha.orig" >&2 || true fi -if [ "$(head -n -1 "$tmp/infra/beta/component.yaml" | cksum)" = "$(printf '%s\n' "$(cat "$tmp/beta.orig")" | cksum)" ]; then +if [ "$(sed '$d' "$tmp/infra/beta/component.yaml" | cksum)" = "$(printf '%s\n' "$(cat "$tmp/beta.orig")" | cksum)" ]; then ok "infra/beta: only a newline was added before the marker" else bad "infra/beta: bytes above the marker changed" diff --git a/testing/tenancy.test.sh b/testing/tenancy.test.sh new file mode 100755 index 0000000..4d2fe39 --- /dev/null +++ b/testing/tenancy.test.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# A PRODUCT'S SECRET REFS NAME THE PRODUCT'S WORKSPACE. +# +# Every deployable component reads its credentials through +# `secret://///`, and the platform refuses a ref +# whose workspace segment is not the workspace the run is in: +# +# Ref workspace "lumen" does not name this run's workspace +# +# This baseline's own refs say `lumen`. rebrand.mjs rewrites the segment — and +# for as long as it skipped a `ws_…` id, which is the only form the blueprint's +# `orunWorkspace` input ever takes, it left `lumen` standing in every product. +# Nothing offline noticed: the leftover sweep looks for THIS repository's name, +# and `lumen` is not it. The first thing to notice would have been phase 03's +# convergence, forty minutes into somebody's bootstrap. +# +# So this rebrands a copy of the tree three ways and reads the refs back. +# Needs: node, git. No network. +set -euo pipefail +here="$(cd "$(dirname "$0")" && pwd)" +root="$(cd "$here/.." && pwd)" + +command -v node >/dev/null || { echo "tenancy.test.sh needs node" >&2; exit 1; } + +fail=0 +ok() { echo " ok $*"; } +bad() { echo " ✕ $*" >&2; fail=1; } + +tmp="$(mktemp -d)" +trap 'rm -rf "$tmp"' EXIT + +# One rebranded copy per case: the tracked tree, in a repository of its own, +# because rebrand.mjs sweeps `git ls-files`. +rebranded_refs() { # -> prints the distinct ref prefixes + local dir="$tmp/$1" + mkdir -p "$dir" + (cd "$root" && git ls-files -z | tar --null -T - -cf -) | tar -C "$dir" -xf - + ( + cd "$dir" + git init -q && git add -A + mkdir -p .rebrand && printf '%s\n' "$2" > .rebrand/values.json + node tooling/rebrand/rebrand.mjs --values .rebrand/values.json --allow-dirty > rebrand.log 2>&1 \ + || { cat rebrand.log >&2; exit 1; } + git grep -h -o -E 'secret://[^/"]+/[^/"]+/' -- . ':!tooling/rebrand' ':!testing' ':!rebrand.log' | sort -u + ) +} + +base='"repoName":"acme-blog","productName":"Acme Blog","productDomain":"acme.blog","workersDevSubdomain":"acme","githubOrg":"acme-co"' + +echo "── a ws_… id, which is what the blueprint supplies" +refs="$(rebranded_refs wsid "{$base,\"orunWorkspace\":\"ws_ABCD1234\"}")" +[ "$refs" = "secret://ws_ABCD1234/acme-blog/" ] \ + && ok "every ref names ws_ABCD1234 and the product's own project" \ + || bad "refs after a ws_ rebrand: $(echo $refs)" + +echo "── a slug" +refs="$(rebranded_refs slug "{$base,\"orunWorkspace\":\"ws_ABCD1234\",\"orunWorkspaceSlug\":\"acme\"}")" +[ "$refs" = "secret://acme/acme-blog/" ] \ + && ok "an explicit orunWorkspaceSlug wins" \ + || bad "refs with an explicit slug: $(echo $refs)" + +echo "── no workspace at all" +refs="$(rebranded_refs none "{$base}")" +[ "$refs" = "secret://acme-blog/acme-blog/" ] \ + && ok "the repo name is the last resort — never the baseline's workspace" \ + || bad "refs with no workspace: $(echo $refs)" + +echo "── and this tree has refs to rewrite at all" +n="$(cd "$root" && git grep -h -o -E 'secret://[^/"]+/virga/' -- '*component.yaml' | wc -l | tr -d ' ')" +[ "$n" -ge 10 ] && ok "$n refs in component.yaml files" \ + || bad "only $n secret refs found in this tree — the cases above proved nothing" + +[ "$fail" -eq 0 ] || exit 1 +echo "tenancy.test.sh: ok" diff --git a/tooling/rebrand/rebrand.mjs b/tooling/rebrand/rebrand.mjs index ee544a9..7ade91b 100644 --- a/tooling/rebrand/rebrand.mjs +++ b/tooling/rebrand/rebrand.mjs @@ -71,14 +71,28 @@ const cliBin = values.cliBin ?? repoName; const workersDevSubdomain = values.workersDevSubdomain ?? "your-workers-subdomain"; // A `secret://///` ref names the WORKSPACE first // and the project (repo) second. In this baseline the workspace segment is -// `lumen` (the org's workspace slug) and the project is `virga`, so the two -// are already distinct — but an instance may live in its own workspace. +// `lumen` and the project is `virga`; a product lives in its own workspace, so +// the segment is renamed: orunWorkspaceSlug when the caller supplied one, else +// orunWorkspace itself. +// +// A ws_… id IS a valid workspace segment. The resolve verifies the segment +// against membership and accepts a slug, a public id or a ws_ ref (orun-cloud +// state-worker secrets-resolve.ts, verifySegments). This used to skip a ws_… +// id and KEEP `lumen` — and the blueprint's `orunWorkspace` input is always a +// ws_… id (`from: workspace`) and nothing supplies a slug, so every product +// built from this baseline carried `secret://lumen//…` and every +// resolve in it was refused: +// +// Ref workspace "lumen" does not name this run's workspace +// +// Cirrus fixed the same rule; this is that fix, which the split did not carry. +// The repo name is the last resort, only when no workspace was given at all. const orunWorkspaceSlug = (() => { const explicit = (values.orunWorkspaceSlug ?? "").trim(); if (explicit) return explicit; const ws = (values.orunWorkspace ?? "").trim(); - if (ws && !/^ws_/i.test(ws)) return ws; // already a slug - return "lumen"; // keep the baseline's workspace slug when none is given + if (ws) return ws; + return repoName; })(); const envPrefix = cliBin.toUpperCase().replace(/-/g, "_"); From a003a85039e5dbad8166d8b479e602bb8218da90 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Thu, 1 Oct 2026 06:06:54 +0530 Subject: [PATCH 2/5] The build document runs: two things no released orun would accept MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As pushed, `repo-blueprint.yaml` was refused by every released orun at the first phase: ✕ phases[0] (01-scaffold) hooks[9] (land): action orun.pr/land@v1 has no parameter "repo" ✕ input "domain" has unknown type "bool" All eight `orun.pr/land@v1` hooks passed a `repo` the action has never taken (checked at v2.58.15, v2.60.0, v2.65.0 and v2.71.0; Cirrus's hooks do not pass it), and `repoPrivate` / `domain` were typed `bool` where orun's word is `boolean`. A bootstrap would have failed before placing a file — with every gate green, because every gate read the document with PyYAML and none asked orun. `testing/placement.test.sh` asks. It places the whole blueprint with hooks off, which parses the document, validates every hook against the action registry and runs orun's own validate + plan --dry-run on the placed tree; then brands the tree as 01-scaffold's hooks do (the `orun-workspace` hook is extracted from the document and run, not re-typed) and checks the product carries no factory path and that intent.yaml and every secret ref name the build's workspace. Baseline CI runs it in a new `blueprint-runs` job pinned to the bootstrap floor, v2.60.0. Verified locally with orun v2.60.0 and v2.71.0; fails against the document as first pushed. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/baseline.yml | 32 +++++++ repo-blueprint.yaml | 12 +-- testing/placement.test.sh | 156 +++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+), 10 deletions(-) create mode 100755 testing/placement.test.sh diff --git a/.github/workflows/baseline.yml b/.github/workflows/baseline.yml index c7efbd6..bb58815 100644 --- a/.github/workflows/baseline.yml +++ b/.github/workflows/baseline.yml @@ -58,6 +58,38 @@ jobs: - run: bash testing/tenancy.test.sh - run: bash testing/tag-gate.test.sh + # THE BUILD DOCUMENT RUNS WITH THE BINARY A BOOTSTRAP ACTUALLY RUNS. + # + # The contract suite above reads `repo-blueprint.yaml` with PyYAML, which + # parses anything well-formed. As first pushed to this repository the document + # was refused by every released orun at phase one — + # + # ✕ action orun.pr/land@v1 has no parameter "repo" + # ✕ input "domain" has unknown type "bool" + # + # — with every gate green, because none of them asked orun. This job pins the + # bootstrap FLOOR (BOOTSTRAP.md: v2.60, where the run-level + # `hooks.preInstantiate` list arrives) and makes orun place the whole tree, + # hooks off: offline, no credential, about ten seconds. + blueprint-runs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: sourceplane/orun-action@v1.2.0 + with: + version: v2.60.0 + - uses: actions/setup-node@v5 + with: + node-version: 22 + package-manager-cache: false + - name: Python + PyYAML + run: python3 -c 'import yaml' || pip install --quiet pyyaml + - name: Tier 1 — the tree is placed, branded, and made to answer + run: | + set -euo pipefail + orun --version + bash testing/placement.test.sh + # The migration checksums. This lived in `verify.yml` and travelled into every # product, where `tooling/migrations/` does not exist because no module places # it — the lane could only be red. It is the baseline's own invariant, so it diff --git a/repo-blueprint.yaml b/repo-blueprint.yaml index bdd42a7..26faa43 100644 --- a/repo-blueprint.yaml +++ b/repo-blueprint.yaml @@ -59,7 +59,7 @@ inputs: default: "your-workers-subdomain" description: workers.dev subdomain, used by the site build and by every deploy smoke and probe. repoPrivate: - type: bool + type: boolean default: true description: Whether orun.repo/ensure creates the product repo private. Visibility is the operator's choice, so it is asked rather than assumed. orunWorkspace: @@ -78,7 +78,7 @@ inputs: The epic every phase clubs its task under. Found by slug, so a fresh run and a resumed run find the same work. domain: - type: bool + type: boolean default: false description: >- Whether to run 07-domain. It needs the Cloudflare zone to already @@ -649,7 +649,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(scaffold): the repository is born" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" - name: 02-foundation title: The shared packages @@ -693,7 +692,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(foundation): the shared packages" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: converge uses: orun.run/watch@v1 @@ -778,7 +776,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(infrastructure): D1 and KV on stage and prod" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: converge uses: orun.run/watch@v1 @@ -852,7 +849,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(mail): the schema and the mail Worker" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: converge uses: orun.run/watch@v1 @@ -907,7 +903,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(api): the public site API" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: converge uses: orun.run/watch@v1 @@ -969,7 +964,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(site): the website on Workers and Static Assets" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: converge uses: orun.run/watch@v1 @@ -1032,7 +1026,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "feat(domain): the custom domain in front of the site" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: converge uses: orun.run/watch@v1 @@ -1081,7 +1074,6 @@ phases: epic: "{{ .inputs.epicSlug }}" branchSlug: "{{ .phase.name }}" title: "docs(deployment): record the live deployment state" - repo: "{{ .inputs.githubOrg }}/{{ .inputs.repoName }}" await: - id: verify uses: orun.http/probe@v1 diff --git a/testing/placement.test.sh b/testing/placement.test.sh new file mode 100755 index 0000000..f8b7870 --- /dev/null +++ b/testing/placement.test.sh @@ -0,0 +1,156 @@ +#!/usr/bin/env bash +# THE BUILD DOCUMENT RUNS, AND WHAT IT PLACES IS A PRODUCT. +# +# Every other gate here reads `repo-blueprint.yaml` with PyYAML, which will +# parse anything well-formed. None of them asked the question that matters: +# can the orun CLI read it. It could not. As first pushed to this repository, +# +# ✕ phases[0] (01-scaffold) hooks[9] (land): action orun.pr/land@v1 has no +# parameter "repo" +# ✕ input "domain" has unknown type "bool" +# +# — refused by every released orun at the first phase, with six gates green. +# A bootstrap would have failed before placing a file. +# +# So this makes orun itself answer, and then looks at what it placed: +# 1. `orun new` places the whole blueprint, hooks off. That parses the +# document, validates every hook against the action registry, and runs +# the repo-scale gate (`orun validate` + `orun plan --dry-run`) on the +# placed tree. +# 2. The tree is branded exactly as 01-scaffold's hooks brand it, and +# `rebrand --verify` finds no baseline identity left. +# 3. The product carries no factory path, its `intent.yaml` claims the +# product's workspace, and every secret ref names that workspace. +# +# Offline: placement writes files and a run with hooks off does not probe. +# Needs: orun (>= the floor BOOTSTRAP.md names), node, python3, git. +set -euo pipefail +here="$(cd "$(dirname "$0")" && pwd)" +root="$(cd "$here/.." && pwd)" + +command -v orun >/dev/null || { echo "placement.test.sh needs orun on PATH" >&2; exit 1; } +command -v node >/dev/null || { echo "placement.test.sh needs node for rebrand" >&2; exit 1; } + +scratch="$(mktemp -d)" +trap 'rm -rf "$scratch"' EXIT +fails=0 +fail() { echo " ✕ $*" >&2; fails=$((fails + 1)); } + +# Awkward on purpose: a two-word name, a hyphenated slug, a workspace given as +# the ws_… id the blueprint's `from: workspace` always supplies. `domain` is on +# because 07-domain is conditional and a gate that skips a phase cannot vouch +# for it. +WS="ws_0000000F" +sets=( + --set repoName=acme-blog + --set "productName=Acme Blog" + --set productDomain=acme.blog + --set githubOrg=acme-co + --set workersDevSubdomain=acme + --set "orunWorkspace=$WS" + --set domain=true +) + +tree="$scratch/product" +mkdir -p "$tree"/{apps,infra,packages,tests} + +echo "── placing the whole blueprint (offline, no credential)" +if ! orun new --blueprint "$root/repo-blueprint.yaml" --out "$tree" "${sets[@]}" \ + > "$scratch/place.log" 2>&1; then + echo "FAIL: orun refused the build document, or the placement did not run ($(orun version 2>&1 | head -1))" >&2 + tail -20 "$scratch/place.log" >&2 + exit 1 +fi +grep -q "repo gate: validate + plan --dry-run passed" "$scratch/place.log" \ + || fail "the placement did not report the repo-scale gate (orun validate + plan --dry-run)" +placed_count="$(find "$tree" -type f -not -path "*/.orun/*" | wc -l | tr -d ' ')" +[ "$placed_count" -ge 200 ] || fail "only $placed_count files placed — that is not a product" +echo " $placed_count files placed; the repo-scale gate ran" + +echo "── branding, as 01-scaffold's hooks do, then rebrand --verify" +( + cd "$tree" + git init -q -b main + git config user.email t@example.invalid + git config user.name "tier one" + printf '.orun/\n' >> .gitignore + git add -A +) >/dev/null 2>&1 +if ! (cd "$tree" && node "$root/tooling/rebrand/rebrand.mjs" \ + --values .rebrand/values.json --allow-dirty) > "$scratch/brand.log" 2>&1; then + echo "FAIL: rebrand did not complete" >&2; tail -20 "$scratch/brand.log" >&2; exit 1 +fi +# The blueprint's own `orun-workspace` hook, extracted and run rather than +# re-typed here, so this exercises the document's code and not a copy of it. +python3 - "$root/repo-blueprint.yaml" "$scratch/ws-hook.js" <<'PY' +import sys, yaml +bp = yaml.safe_load(open(sys.argv[1])) +ph = next(p for p in bp["phases"] if p["name"] == "01-scaffold") +hooks = [h for hs in ph["hooks"].values() for h in hs] +hook = next((h for h in hooks if h.get("id") == "orun-workspace"), None) +if not hook or hook["run"][:2] != ["node", "-e"]: + sys.exit("01-scaffold has no `orun-workspace` node hook — this check has gone blind") +open(sys.argv[2], "w").write(hook["run"][2]) +PY +(cd "$tree" && node "$scratch/ws-hook.js") > "$scratch/ws.log" 2>&1 \ + || { echo "FAIL: the orun-workspace hook failed" >&2; cat "$scratch/ws.log" >&2; exit 1; } +(cd "$tree" && git add -A) >/dev/null 2>&1 +if ! (cd "$tree" && node "$root/tooling/rebrand/rebrand.mjs" \ + --verify --values .rebrand/values.json) > "$scratch/verify.log" 2>&1; then + echo "FAIL: rebrand --verify found baseline identity left in the product" >&2 + tail -20 "$scratch/verify.log" >&2; exit 1 +fi +echo " branded; no baseline-identity residue" + +echo "── what the product actually carries" +python3 - "$tree" "$WS" <<'PY' +import pathlib, re, sys +tree, ws = pathlib.Path(sys.argv[1]), sys.argv[2] +problems = [] +def bad(m): problems.append(m) + +placed = sorted( + p.relative_to(tree).as_posix() + for p in tree.rglob("*") + if p.is_file() and ".git" not in p.parts and ".orun" not in p.parts +) + +NEVER = ("flows/", "agents/", "tasks/", "specs/", "testing/", "hooks/", + "docs/phases/", "tooling/rebrand/", "tooling/bootstrap/", + "tooling/blueprint/", "tooling/migrations/", + "BOOTSTRAP.md", "repo-blueprint.yaml", "blueprint.yaml", + ".github/workflows/baseline.yml", ".github/workflows/tag.yml", + ".github/workflows/rehearsal.yml") +for p in placed: + for never in NEVER: + if p == never or p.startswith(never): + bad(f"{p} shipped — it is the factory, not the product") + +intent = (tree / "intent.yaml").read_text() +m = re.search(r"(?m)^\s*workspace:\s*(\S+)", intent) +if not m or m.group(1) != ws: + bad(f"intent.yaml claims workspace {m.group(1) if m else None!r}; the build ran in {ws!r}") + +refs = set() +for p in placed: + if p.endswith("component.yaml"): + refs |= set(re.findall(r"secret://[^/\"\s]+/[^/\"\s]+/", (tree / p).read_text())) +want = f"secret://{ws}/acme-blog/" +if not refs: + bad("no secret ref in any placed component.yaml — this check has gone blind") +for r in sorted(refs - {want}): + bad(f"a secret ref names {r} — the platform refuses a ref whose workspace is " + f"not the run's; every ref must be {want}") + +comps = [p for p in placed if p.endswith("/component.yaml")] +if problems: + print("FAIL: the placed product is not the product:", file=sys.stderr) + for p in problems: + print(f" - {p}", file=sys.stderr) + sys.exit(1) +print(f" {len(placed)} product files, {len(comps)} components; no factory path") +print(f" intent.yaml and every secret ref name {ws}") +PY + +[ "$fails" -eq 0 ] || exit 1 +echo "placement.test.sh: ok" From 04e55cea8ecc5c7c7b4eb20d80ae7fb95dae60f3 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Thu, 1 Oct 2026 13:35:26 +0530 Subject: [PATCH 3/5] Virga claims its own workspace: virga (ws_F6PEAMKD) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `intent.yaml` said `ws_REPLACE_ME`, which failed loudly on purpose, and the eighteen `secret://` refs named `lumen` — the workspace Cirrus declares. This repository now has a workspace of its own, `virga`, under the openproduct account, and both point at it. The refs use the workspace SLUG (`secret://virga/virga/…`), not the ws_… id: rebrand.mjs's scoped rule matches `[a-z0-9-]+` in that segment, so an id there would not be rewritten and a product would keep this tenant. The workspace and the repo now share a word, which is the case the rule's ordering exists for; `testing/tenancy.test.sh` and `testing/placement.test.sh` both rebrand this tree and read the refs back, and both pass. Attached and checked from a clone: `orun workspace` resolves ws_F6PEAMKD from intent.yaml, `orun cloud check` reports sourceplane/virga allow-listed, and `orun plan` resolves 16 components into 33 jobs. Co-Authored-By: Claude Fable 5.1 --- apps/mail-worker/component.yaml | 4 ++-- apps/site-api/component.yaml | 8 ++++---- infra/db-migrate/component.yaml | 6 +++--- infra/terraform/cloudflare-d1/component.yaml | 6 +++--- infra/terraform/cloudflare-domain/component.yaml | 6 +++--- infra/terraform/cloudflare-kv/component.yaml | 6 +++--- intent.yaml | 11 +++++++---- testing/tenancy.test.sh | 9 +++++---- tooling/rebrand/rebrand.mjs | 16 +++++++++++----- 9 files changed, 41 insertions(+), 31 deletions(-) diff --git a/apps/mail-worker/component.yaml b/apps/mail-worker/component.yaml index 2d90bab..eb2faaa 100644 --- a/apps/mail-worker/component.yaml +++ b/apps/mail-worker/component.yaml @@ -13,8 +13,8 @@ spec: - component: cloudflare-d1 - component: db-migrate secretEnv: - WIRING_CLOUDFLARE_D1_STAGE: "secret://lumen/virga/stage/WIRING_CLOUDFLARE_D1" - WIRING_CLOUDFLARE_D1_PROD: "secret://lumen/virga/prod/WIRING_CLOUDFLARE_D1" + WIRING_CLOUDFLARE_D1_STAGE: "secret://virga/virga/stage/WIRING_CLOUDFLARE_D1" + WIRING_CLOUDFLARE_D1_PROD: "secret://virga/virga/prod/WIRING_CLOUDFLARE_D1" subscribe: environments: diff --git a/apps/site-api/component.yaml b/apps/site-api/component.yaml index eaf5c5a..f787808 100644 --- a/apps/site-api/component.yaml +++ b/apps/site-api/component.yaml @@ -17,10 +17,10 @@ spec: # Wiring documents from orun secrets: lease-published by the infra # components; wire-live renders the wrangler template from these. secretEnv: - WIRING_CLOUDFLARE_D1_STAGE: "secret://lumen/virga/stage/WIRING_CLOUDFLARE_D1" - WIRING_CLOUDFLARE_D1_PROD: "secret://lumen/virga/prod/WIRING_CLOUDFLARE_D1" - WIRING_CLOUDFLARE_KV_STAGE: "secret://lumen/virga/stage/WIRING_CLOUDFLARE_KV" - WIRING_CLOUDFLARE_KV_PROD: "secret://lumen/virga/prod/WIRING_CLOUDFLARE_KV" + WIRING_CLOUDFLARE_D1_STAGE: "secret://virga/virga/stage/WIRING_CLOUDFLARE_D1" + WIRING_CLOUDFLARE_D1_PROD: "secret://virga/virga/prod/WIRING_CLOUDFLARE_D1" + WIRING_CLOUDFLARE_KV_STAGE: "secret://virga/virga/stage/WIRING_CLOUDFLARE_KV" + WIRING_CLOUDFLARE_KV_PROD: "secret://virga/virga/prod/WIRING_CLOUDFLARE_KV" subscribe: environments: diff --git a/infra/db-migrate/component.yaml b/infra/db-migrate/component.yaml index 6f7cc81..acc053e 100644 --- a/infra/db-migrate/component.yaml +++ b/infra/db-migrate/component.yaml @@ -35,9 +35,9 @@ spec: # connection fact, and the database id arrives in the wiring document the # cloudflare-d1 component lease-publishes. secretEnv: - CLOUDFLARE_API_TOKEN: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_D1_TOKEN" - CLOUDFLARE_ACCOUNT_ID: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" - WIRING_CLOUDFLARE_D1: "secret://lumen/virga/{{ .environment }}/WIRING_CLOUDFLARE_D1" + CLOUDFLARE_API_TOKEN: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_D1_TOKEN" + CLOUDFLARE_ACCOUNT_ID: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + WIRING_CLOUDFLARE_D1: "secret://virga/virga/{{ .environment }}/WIRING_CLOUDFLARE_D1" subscribe: environments: diff --git a/infra/terraform/cloudflare-d1/component.yaml b/infra/terraform/cloudflare-d1/component.yaml index b0ae039..4eece81 100644 --- a/infra/terraform/cloudflare-d1/component.yaml +++ b/infra/terraform/cloudflare-d1/component.yaml @@ -31,10 +31,10 @@ spec: # touch D1). Declared at component level because plan-only lanes refresh # against the live Cloudflare API too, not just apply. secretEnv: - CLOUDFLARE_API_TOKEN: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_D1_TOKEN" + CLOUDFLARE_API_TOKEN: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_D1_TOKEN" # Non-secret connection fact (account-id template). - CLOUDFLARE_ACCOUNT_ID: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" - TF_VAR_cloudflare_account_id: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + CLOUDFLARE_ACCOUNT_ID: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + TF_VAR_cloudflare_account_id: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" subscribe: environments: diff --git a/infra/terraform/cloudflare-domain/component.yaml b/infra/terraform/cloudflare-domain/component.yaml index 5082e44..8aaeb2e 100644 --- a/infra/terraform/cloudflare-domain/component.yaml +++ b/infra/terraform/cloudflare-domain/component.yaml @@ -34,9 +34,9 @@ spec: - component: web-site secretEnv: - CLOUDFLARE_API_TOKEN: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_API_TOKEN" - CLOUDFLARE_ACCOUNT_ID: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" - TF_VAR_cloudflare_account_id: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + CLOUDFLARE_API_TOKEN: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_API_TOKEN" + CLOUDFLARE_ACCOUNT_ID: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + TF_VAR_cloudflare_account_id: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" # PARKED BY DESIGN — no environment subscriptions, so no jobs are planned. # A fresh product has no zone in the connected account, and diff --git a/infra/terraform/cloudflare-kv/component.yaml b/infra/terraform/cloudflare-kv/component.yaml index 1f13df0..2323de6 100644 --- a/infra/terraform/cloudflare-kv/component.yaml +++ b/infra/terraform/cloudflare-kv/component.yaml @@ -25,9 +25,9 @@ spec: secretOutputs: "WIRING_CLOUDFLARE_KV=wiring" secretEnv: - CLOUDFLARE_API_TOKEN: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_API_TOKEN" - CLOUDFLARE_ACCOUNT_ID: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" - TF_VAR_cloudflare_account_id: "secret://lumen/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + CLOUDFLARE_API_TOKEN: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_API_TOKEN" + CLOUDFLARE_ACCOUNT_ID: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" + TF_VAR_cloudflare_account_id: "secret://virga/virga/{{ .environment }}/CLOUDFLARE_ACCOUNT_ID" subscribe: environments: diff --git a/intent.yaml b/intent.yaml index 9379bf1..c0360bb 100644 --- a/intent.yaml +++ b/intent.yaml @@ -14,10 +14,13 @@ execution: # enforce claim ⊆ authorized. Declaring it implies strict mode — a # non-interactive run that resolves no workspace fails fast. # - # REPLACE THIS before the first bootstrap. The placeholder is deliberate - # and fails loudly: inheriting another product's workspace id would make - # this repo's CI claim someone else's tenant. - workspace: ws_REPLACE_ME + # This repository's OWN workspace: `virga`, under the openproduct account. + # It is not a default for anything built from here — 01-scaffold's + # `orun-workspace` hook rewrites this line to the product's workspace, and + # rebrand.mjs rewrites the workspace segment of every `secret://` ref, + # because a product that inherits this id claims this tenant on every + # remote op. `testing/placement.test.sh` fails if either stops happening. + workspace: ws_F6PEAMKD requireOrg: true # Push the resolved catalog after a successful plan on the default branch, # keeping the workspace-global catalog head fresh without an explicit diff --git a/testing/tenancy.test.sh b/testing/tenancy.test.sh index 4d2fe39..0827fc7 100755 --- a/testing/tenancy.test.sh +++ b/testing/tenancy.test.sh @@ -7,11 +7,12 @@ # # Ref workspace "lumen" does not name this run's workspace # -# This baseline's own refs say `lumen`. rebrand.mjs rewrites the segment — and -# for as long as it skipped a `ws_…` id, which is the only form the blueprint's -# `orunWorkspace` input ever takes, it left `lumen` standing in every product. +# This baseline's own refs name ITS workspace (`virga`). rebrand.mjs rewrites +# the segment — and for as long as it skipped a `ws_…` id, which is the only +# form the blueprint's `orunWorkspace` input ever takes, it left the baseline's +# segment (then `lumen`) standing in every product. # Nothing offline noticed: the leftover sweep looks for THIS repository's name, -# and `lumen` is not it. The first thing to notice would have been phase 03's +# and a workspace slug is not it. The first thing to notice would have been phase 03's # convergence, forty minutes into somebody's bootstrap. # # So this rebrands a copy of the tree three ways and reads the refs back. diff --git a/tooling/rebrand/rebrand.mjs b/tooling/rebrand/rebrand.mjs index 7ade91b..df1e898 100644 --- a/tooling/rebrand/rebrand.mjs +++ b/tooling/rebrand/rebrand.mjs @@ -70,15 +70,21 @@ const brandSlug = values.brandSlug ?? repoName; const cliBin = values.cliBin ?? repoName; const workersDevSubdomain = values.workersDevSubdomain ?? "your-workers-subdomain"; // A `secret://///` ref names the WORKSPACE first -// and the project (repo) second. In this baseline the workspace segment is -// `lumen` and the project is `virga`; a product lives in its own workspace, so -// the segment is renamed: orunWorkspaceSlug when the caller supplied one, else -// orunWorkspace itself. +// and the project (repo) second. In this baseline both happen to be `virga` — +// the workspace's slug and the repo's — so the scoped rule below must run +// before the repo-slug pass, or one rename would rewrite both. A product lives +// in its own workspace, so the segment is renamed: orunWorkspaceSlug when the +// caller supplied one, else orunWorkspace itself. +// +// The baseline's own refs use the workspace SLUG, never its ws_… id: the rule +// below matches `[a-z0-9-]+`, and a `ws_F6…` segment would not be found, so a +// product would keep this repository's tenant. // // A ws_… id IS a valid workspace segment. The resolve verifies the segment // against membership and accepts a slug, a public id or a ws_ ref (orun-cloud // state-worker secrets-resolve.ts, verifySegments). This used to skip a ws_… -// id and KEEP `lumen` — and the blueprint's `orunWorkspace` input is always a +// id and KEEP the baseline's segment (then `lumen`, the workspace Cirrus +// declares) — and the blueprint's `orunWorkspace` input is always a // ws_… id (`from: workspace`) and nothing supplies a slug, so every product // built from this baseline carried `secret://lumen//…` and every // resolve in it was refused: From fe43aab2dd25f25f4858730935c684df5850932f Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Thu, 1 Oct 2026 13:39:11 +0530 Subject: [PATCH 4/5] =?UTF-8?q?docs:=20the=20gaps=20=E2=80=94=20what=20is?= =?UTF-8?q?=20proven=20about=20this=20baseline,=20and=20what=20is=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `docs/GAPS.md` records the state at the split: what was run and passed, and what has never been run, each with the thing that would prove it. Written so it can be shortened: an entry is deleted when it stops being true. The short version. Placement, the static contract, the attachment to workspace `virga` (ws_F6PEAMKD) and a credential-free CI run reaching the platform are proven. Not proven: any phase with its hooks on; a rehearsal, and so a tag and a registry row (left out deliberately for now); a bypass actor for the tag ruleset; and a workspace that can actually bootstrap — it is public while this repository is private, has no Cloudflare connection, and its GitHub connection is to the wrong account. `ORUN_CI` was set to prove the CI path and is unset again: with no secrets minted, every run lane fails at secret resolution, which is the pre-bootstrap red the variable exists to prevent. Co-Authored-By: Claude Fable 5.1 --- ai/context/open-risks.md | 2 +- docs/GAPS.md | 117 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 docs/GAPS.md diff --git a/ai/context/open-risks.md b/ai/context/open-risks.md index 1979407..061f556 100644 --- a/ai/context/open-risks.md +++ b/ai/context/open-risks.md @@ -6,4 +6,4 @@ | R2 | Broadcast size: a Worker invocation has CPU and subrequest limits; a large list must be paced. | mail-worker sends in batches and records progress per delivery, so a re-run resumes. Queues are the upgrade path (see the epic's open questions). | | R3 | Abuse of public write paths (subscribe, forms, reactions). | KV token-bucket rate limiting per fingerprint + optional Turnstile + honeypot; fail-open so an outage never takes the site down. | | R4 | The owner token is a single secret. | Constant-time comparison, never logged, rotated via `wrangler secret put`; the CLI reads it from the environment only. | -| R5 | No Virga product has been bootstrapped end to end yet. | The phases are one selection each on `repo-blueprint.yaml`, ported from Cirrus's one-document model in VG8; the first bootstrap records real timings in `docs/phases/TIMINGS.md`. | +| R5 | No Virga product has been bootstrapped end to end yet, and no phase has run with its hooks on. | Placement is gated (`testing/placement.test.sh`); everything past it is listed, with what would prove it, in [`docs/GAPS.md`](../../docs/GAPS.md). The first bootstrap records real timings in `docs/phases/TIMINGS.md`. | diff --git a/docs/GAPS.md b/docs/GAPS.md new file mode 100644 index 0000000..51f80f5 --- /dev/null +++ b/docs/GAPS.md @@ -0,0 +1,117 @@ +# Gaps — what is proven about this baseline, and what is not + +Written 2026-10-01, when Virga was split out of `sourceplane/cirrus` into this +repository and attached to its own workspace. Every line under "proven" was +run, not inferred; every line under "not proven" names what would prove it. +Delete an entry when it stops being true — a gaps file that is never shortened +is a file nobody reads. + +## Proven + +| What | How | +|---|---| +| The build document is one orun can run. | `testing/placement.test.sh` places the whole blueprint with hooks off, under orun v2.60.0 (the floor) and v2.71.0. Baseline CI's `blueprint-runs` job repeats it on every pull request. | +| A product placed from it is a product. | The placed tree is branded as `01-scaffold` brands it: no factory path, no baseline identity, `intent.yaml` and all 18 secret refs naming the product's workspace. | +| That product builds. | A placed, branded product passed its own `install`, `wire:fixture`, `typecheck`, `lint`, `test` and `build`. Run by hand once; **not** a gate. | +| The static contract holds. | `coverage`, `phases`, `manifest`, `leak`, `retouch`, `tag-gate`, `tenancy` — all in Baseline CI. | +| This repository is attached to a workspace. | `orun workspace` resolves `ws_F6PEAMKD` (`virga`) from `intent.yaml`; `orun cloud check` reports `sourceplane/virga` allow-listed; `orun plan` resolves 16 components into 33 jobs. | +| CI reaches the platform without a credential. | With `ORUN_CI=true`, run 36834192908 planned 12 jobs and each run lane was answered by the platform: `secret resolution failed … Secret not found (code: not_found) [requestId: req_…]`. That is the answer a workspace with no minted secrets should give. | +| An unproven tag cannot be pushed. | The ruleset `baseline-tags-restrict-creation` refused `baseline-v0-ruleset-probe` from an org admin: `Cannot create ref due to creations being restricted`. | + +## Not proven + +### 1. No phase has ever run with its hooks on + +Placement proves the document parses and the files land. It does not run +`orun.task/ensure`, `orun.repo/ensure`, `orun.pr/land`, `orun.run/watch`, +`orun.integrations/reconcile`, `orun.secrets/exists` or `orun.http/probe` — +which is everything a bootstrap does that is not copying a file. Two defects +that stopped the document at phase one (`repo:` on `orun.pr/land@v1`, and +`type: bool`) were found only because placement was finally run; the same +class of defect in a hook's *behaviour* is still unlooked-for. + +*Would prove it:* one real `orun new --resume --run-hooks` into a throwaway +repository and workspace. + +### 2. There is no rehearsal, so there is no tag — deliberately, for now + +`rehearsal.yml` and `testing/rehearsal/` are not ported from Cirrus. The tag +gate therefore answers exit 3, "the question could not be answered", for every +commit, and `baseline-v1` does not exist. Left out on purpose at the split: a +harness that creates and destroys real Cloudflare resources should not be +written without being run. + +Consequences that follow from it and are easy to forget: + +- **Virga is not in the registry.** `orun baseline list` shows `cirrus`, + `lumen` and `multi-tenant-saas`. A row in orun-cloud's + `infra/baselines-registry/baselines.yaml` needs a tag to pin, and the sync + refuses a tag that does not exist. Nobody can build from Virga through the + console until this is closed. +- **`docs/phases/TIMINGS.md` and `expectedMinutes: 43` are estimates.** No + bootstrap has been timed. + +### 3. The tag ruleset is binding in one direction only + +The ruleset restricts creation of `baseline-v*` and has **no bypass actor**. +GitHub refuses the Actions integration on a bypass list (`Actor GitHub Actions +integration must be part of the ruleset source or owner organization`), so +"`tag.yml`'s token is the only creator" cannot be expressed with +`GITHUB_TOKEN`. Today that costs nothing, because the gate refuses everything. +The day a rehearsal goes green, `tag.yml`'s `cut` job will pass the gate and +then be refused by the ruleset. + +*Closes it:* a GitHub App or a deploy key on the bypass list, and `cut` +creating the tag with that identity. It also only restricts **creation** — +moving an existing tag is not restricted, and should be once one exists. + +### 4. The workspace is public and this repository is private + +`virga` was created under the **openproduct** account. Workspaces there are +public, and the platform's covenant is that their repositories are public too: +linking a private one through the GitHub App is refused with *"This workspace +is public, so the repositories in it are public. Make sourceplane/virga public +to link it here — private repositories belong in a paid workspace."* The CLI +allow-list (`orun cloud link`) accepted the repository; the App-side link and +the visibility sweep have not been exercised and are expected to object. + +*Closes it:* make this repository public, or move it to a workspace under a +standard account. Not decided here — publishing a repository is not a side +effect. + +### 5. The workspace cannot bootstrap or deploy anything yet + +- **No Cloudflare connection.** `orun integrations cloudflare status` answers + `no cloudflare connection in this workspace`. Nothing can be minted, so the + token's D1 Write permission group (without which `03-infrastructure`'s + `d1-edit` mint is refused with `parent_grant_insufficient`) is unchecked. +- **GitHub is connected to the wrong account.** The only connection is + inherited from the account and is to `pullely`, a user. The platform learns + of a pull request through the App installation on the account that OWNS the + repository — `sourceplane` — so `orun integrations list` says "github: + active" and the landings would still not be filed. +- **No admin-role API key has been minted.** Builder and viewer keys read + fine and have their secret writes denied, masked as `not_found`. +- **No secrets.** `orun secrets list` is empty, which is why every run lane + above failed, and why `ORUN_CI` is **unset** again: the variable exists so a + pre-bootstrap repository is not red, and this is one. Set it with + `gh variable set ORUN_CI --body true` once the three items above are done. + +### 6. This repository's own environments have never deployed + +`intent.yaml` declares `dev`, `stage` and `prod` with `BASE_DOMAIN: virga.site`. +With `ORUN_CI` on, a push to `main` converges them for real. Whether the +`virga.site` zone exists in any connected Cloudflare account is unchecked. + +### 7. Smaller things, written down so they are not rediscovered + +- `kiox.lock` keeps `name: virga` in a product while `kiox.yaml` is renamed — + the rebrand excludes lock files. Cirrus does the same. Harmless so far. +- The secret refs here use the workspace **slug** (`secret://virga/virga/…`) + on purpose: the rebrand's scoped rule matches `[a-z0-9-]+`, so a `ws_…` id + in that segment would not be rewritten and a product would keep this tenant. +- `orun workspace create` cannot name an account, and a login that owns more + than one is refused. This workspace was created with a locally patched CLI + that sends `accountId`. The released CLI still cannot do it. +- `main` carries the document as first pushed until the pull request that adds + this file is merged. Until then, **nothing can be bootstrapped from `main`**. From 4dc26d135e225ea9b57d520ccbbd0d7fffaf78f2 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Thu, 1 Oct 2026 14:38:12 +0530 Subject: [PATCH 5/5] docs(gaps): the repository is public and Cloudflare is connected Two entries stopped being true and are removed, as the file asks. The repository was made public to satisfy the openproduct covenant, and the `virga` workspace now inherits a Cloudflare connection: `orun baseline check cirrus` answers `ready to build` there. What that does not prove stays written down: the token's D1 Write permission group (only a mint shows it), a GitHub connection on the account that owns the repository, an admin API key, and any secret at all. Co-Authored-By: Claude Fable 5.1 --- docs/GAPS.md | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/docs/GAPS.md b/docs/GAPS.md index 51f80f5..5c082f2 100644 --- a/docs/GAPS.md +++ b/docs/GAPS.md @@ -1,7 +1,7 @@ # Gaps — what is proven about this baseline, and what is not Written 2026-10-01, when Virga was split out of `sourceplane/cirrus` into this -repository and attached to its own workspace. Every line under "proven" was +repository, made public, and attached to its own workspace. Every line under "proven" was run, not inferred; every line under "not proven" names what would prove it. Delete an entry when it stops being true — a gaps file that is never shortened is a file nobody reads. @@ -65,26 +65,17 @@ then be refused by the ruleset. creating the tag with that identity. It also only restricts **creation** — moving an existing tag is not restricted, and should be once one exists. -### 4. The workspace is public and this repository is private +### 4. The workspace is not yet one a bootstrap can finish in -`virga` was created under the **openproduct** account. Workspaces there are -public, and the platform's covenant is that their repositories are public too: -linking a private one through the GitHub App is refused with *"This workspace -is public, so the repositories in it are public. Make sourceplane/virga public -to link it here — private repositories belong in a paid workspace."* The CLI -allow-list (`orun cloud link`) accepted the repository; the App-side link and -the visibility sweep have not been exercised and are expected to object. +Cloudflare is connected (inherited from the account, `Nexo@sourceplane.ai's +Account`), and `orun baseline check cirrus` — the nearest registered +Cloudflare-only baseline — answers `ready to build` here. What is left: -*Closes it:* make this repository public, or move it to a workspace under a -standard account. Not decided here — publishing a repository is not a side -effect. - -### 5. The workspace cannot bootstrap or deploy anything yet - -- **No Cloudflare connection.** `orun integrations cloudflare status` answers - `no cloudflare connection in this workspace`. Nothing can be minted, so the - token's D1 Write permission group (without which `03-infrastructure`'s - `d1-edit` mint is refused with `parent_grant_insufficient`) is unchecked. +- **The token's D1 Write permission group is unchecked.** Without it + `03-infrastructure`'s `d1-edit` mint is refused with + `parent_grant_insufficient`, and nothing short of a mint proves it either + way. The `d1-edit` template is listed as active, which says the platform + offers it, not that the connection's token can grant it. - **GitHub is connected to the wrong account.** The only connection is inherited from the account and is to `pullely`, a user. The platform learns of a pull request through the App installation on the account that OWNS the @@ -95,15 +86,16 @@ effect. - **No secrets.** `orun secrets list` is empty, which is why every run lane above failed, and why `ORUN_CI` is **unset** again: the variable exists so a pre-bootstrap repository is not red, and this is one. Set it with - `gh variable set ORUN_CI --body true` once the three items above are done. + `gh variable set ORUN_CI --body true` once this repository's own secrets + exist. -### 6. This repository's own environments have never deployed +### 5. This repository's own environments have never deployed `intent.yaml` declares `dev`, `stage` and `prod` with `BASE_DOMAIN: virga.site`. With `ORUN_CI` on, a push to `main` converges them for real. Whether the -`virga.site` zone exists in any connected Cloudflare account is unchecked. +`virga.site` zone exists in the connected Cloudflare account is unchecked. -### 7. Smaller things, written down so they are not rediscovered +### 6. Smaller things, written down so they are not rediscovered - `kiox.lock` keeps `name: virga` in a product while `kiox.yaml` is renamed — the rebrand excludes lock files. Cirrus does the same. Harmless so far. @@ -113,5 +105,9 @@ With `ORUN_CI` on, a push to `main` converges them for real. Whether the - `orun workspace create` cannot name an account, and a login that owns more than one is refused. This workspace was created with a locally patched CLI that sends `accountId`. The released CLI still cannot do it. -- `main` carries the document as first pushed until the pull request that adds - this file is merged. Until then, **nothing can be bootstrapped from `main`**. +- **This repository is public because its workspace is.** `virga` is under the + openproduct account, whose workspaces are public and whose covenant is that + their repositories are too. It was made public on 2026-10-01 for that reason; + its tree was already public inside `sourceplane/cirrus`. Making it private + again breaches the covenant — move it to a workspace under a standard account + first.