Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .baseline/product/deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# {{ .reponame }} — live deployment manifest

> Not rendered yet. The bootstrap's `08-docs` phase probes every live URL and
> regenerates this file from what answered — the workspace, the URLs and their
> status, and the secrets inventory by name. Until then, nothing here claims
> the product is live. The operating contract is
> [operations.md](operations.md).
22 changes: 11 additions & 11 deletions .github/workflows/baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Contract tests (manifest, phases, coverage, rebrand)
- name: Contract tests (manifest, phases, coverage, rebrand, retouch, bootstrap-defer, fleet-stubs, pen-reset)
run: |
set -euo pipefail
python3 -c 'import yaml' 2>/dev/null || pip install --quiet pyyaml
for t in manifest phases coverage rebrand; do
for t in manifest phases coverage rebrand retouch bootstrap-defer fleet-stubs pen-reset; do
echo "── $t"
bash "testing/$t.test.sh"
done
Expand All @@ -81,15 +81,15 @@ jobs:
- uses: actions/checkout@v6
- uses: sourceplane/orun-action@v1.2.0
with:
# The bootstrap floor (BOOTSTRAP.md), not the product lane pin: the
# blueprint's `orun.run/watch@v1` `sha:` exists from v2.58.5, and an
# older CLI refuses the whole document at parse; v2.58.6 is where a
# landing's check wait covers the whole PR run; v2.58.7 knows
# orun.doctor/check@v1's `githubOwner`; v2.58.8 reads
# orun.secrets/exists@v1's `environments`; v2.58.10 defers a probe
# about a project the bootstrap has not created yet; v2.58.11 fills
# an input declared `from: workspace`.
version: v2.58.11
# The bootstrap floor (BOOTSTRAP.md), not the product lane pin. It
# used to be v2.58.11 — the first CLI that could read this document
# at all (`orun.run/watch@v1`'s `sha:`, a landing's whole-run check
# wait, `githubOwner`, `environments`, a deferred project probe, and
# `from: workspace`). It is v2.88.0 now, for three keys an older CLI
# refuses at parse: `hooks.preInstantiate[].background`,
# `orun.pr/land@v1`'s `checks: local`, and
# `orun.integrations/reconcile@v1`'s `secrets:` list (v2.87.0).
version: v2.88.0
- name: repo-blueprint.yaml, read by the pinned CLI
run: |
set -euo pipefail
Expand Down
91 changes: 78 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,39 @@ permissions:
contents: read
packages: write
id-token: write
# A lane of several jobs posts one check run per job, named by the job's
# check title, so branch protection sees the same names as before lanes.
checks: write

jobs:
plan:
runs-on: ubuntu-latest
outputs:
job-matrix: ${{ steps.matrix.outputs.job-matrix }}
lane-matrix: ${{ steps.matrix.outputs.lane-matrix }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
# A TREE THAT NAMES NO WORKSPACE PLANS NOTHING, AND SAYS SO HERE.
# `ws_SET_ME` is what 01-scaffold's `orun-workspace` hook writes when the
# build resolved no workspace: every remote op of a plan here would be
# refused, and the refusal arrives as a secret-resolution error in each
# lane, an hour of runner time later, naming nothing an owner can act on.
# So the one check that can be made from the tree is made first.
#
# There is no "never linked" placeholder branch here, as there is in the
# Cloudflare-only baselines: this repository names a real workspace and
# every product's bootstrap writes its own, so `ws_SET_ME` is the only
# unset state reachable, and it is an error rather than a skip.
- id: linked
run: |
if grep -Eq '^[[:space:]]*workspace:[[:space:]]*ws_SET_ME[[:space:]]*$' intent.yaml; then
echo "::error title=Orun workspace unset::intent.yaml names no Orun workspace (ws_SET_ME). The build that created this repository resolved none. Set execution.state.workspace to your workspace id (orun cloud link, or the console's Git Repos), and re-run." >&2
exit 1
fi
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.56.2
version: v2.78.4
- env:
# Surface the best-effort catalog auto-sync (execution.state.autopushCatalog).
# A successful push prints "✓ pushed catalog …"; ORUN_VERBOSE also makes
Expand All @@ -49,9 +69,14 @@ jobs:
)

orun plan "${plan_args[@]}"
# One matrix entry per LANE (execution.lanes in intent.yaml). A plan
# without lanes gets one per job, exactly the old matrix, and
# `orun run --lane <job id>` on it is `--job <job id>`.
- id: matrix
run: |
echo "job-matrix=$(jq -c '[.jobs[] | {"job-id": .id, "job-name": .checkName}]' plan.json)" >> "$GITHUB_OUTPUT"
echo "lane-matrix=$(jq -c 'if ((.lanes // []) | length) > 0
then [.lanes[] | {"lane": .id, "name": .name}]
else [.jobs[] | {"lane": .id, "name": .checkName}] end' plan.json)" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@v7
with:
name: orun-plan
Expand All @@ -60,18 +85,57 @@ jobs:
run:
needs: plan
runs-on: ubuntu-latest
if: ${{ needs.plan.outputs.job-matrix != '[]' && needs.plan.outputs.job-matrix != '' }}
# A BOOTSTRAP LANDING IS CHECKED BY `plan` ALONE. Every phase of the
# baseline bootstrap lands on a branch named for its task — the provenance
# pen's `orun/<KEY>-<slug>`, and the bootstrap's tasks are all `BASE-n` —
# and is merged by `orun.pr/land@v1` as soon as this workflow is green.
# On those pull requests `plan` above is the check: the intent, every
# component and every composition resolve, the changed set is computed,
# and the plan is uploaded. The lanes are not run there, because the merge
# runs every one of them again on main moments later, for real, and the
# bootstrap watches that convergence to green before the next phase — the
# PR pass was the same work twice, and a third of a bootstrap's wall-clock.
#
# Measured on pullely/multi-tenant-saas, 2026-10-25: 04-workers' landing PR
# ran 46 jobs in 6m49s, every one of them again on the merge. Six landings
# pay it; the fleet's is the dearest, and it is where that build ran out of
# token before it ever reached the convergence.
#
# Every other pull request runs its lanes exactly as before.
if: >-
${{ needs.plan.outputs.lane-matrix != '[]' && needs.plan.outputs.lane-matrix != ''
&& !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'orun/BASE-')) }}
strategy:
fail-fast: false
# Stagger the fan-out: every lane hits the lease-bound resolve at job
# start, and an unbounded herd saturated it twice. The orun DAG already
# serializes dependents, so capped parallelism costs little wall-clock.
max-parallel: 8
# start, and an unbounded herd saturated it twice. Nineteen is the free
# plan's twenty concurrent jobs less the `plan` job that is already
# done, and it is above execution.lanes.maxLanes (18), so a packed plan
# starts every lane at once; it only binds on a small plan that runs one
# lane per job. Inside a lane a job that waits on another lane holds no
# slot.
max-parallel: 19
matrix:
include: ${{ fromJson(needs.plan.outputs.job-matrix) }}
name: ${{ matrix.job-name }}
include: ${{ fromJson(needs.plan.outputs.lane-matrix) }}
name: ${{ matrix.name }}
env:
# One pnpm store for every lane, restored below. Each lane installs the
# whole workspace with --frozen-lockfile; without this every one of them
# downloaded all ~500 packages from the registry again.
npm_config_store_dir: /home/runner/.pnpm-store
PNPM_STORE_DIR: /home/runner/.pnpm-store
steps:
- uses: actions/checkout@v6
# Keyed by the lockfile alone, so every lane of every run shares one
# entry until a dependency changes. The first lane to finish saves it;
# the rest find the key taken and skip the save.
- name: pnpm store cache
uses: actions/cache@v4
with:
path: /home/runner/.pnpm-store
key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ runner.os }}-
- uses: actions/download-artifact@v8
with:
name: orun-plan
Expand All @@ -83,14 +147,15 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- uses: sourceplane/orun-action@v1.2.0
with:
version: v2.56.2
version: v2.78.4
# exec-id is the RUN id alone (no attempt suffix): a `gh run rerun
# --failed` then RESUMES the same orun execution — jobs that succeeded in
# a prior attempt stay completed, so re-run lanes' cross-job dependencies
# are already satisfied instead of waiting forever on lanes that are not
# re-running (the partial-rerun deadlock). --retry re-opens THIS lane's
# job when it terminally failed in a prior attempt (no-op on first
# attempts) — together they make `gh run rerun --failed` a true resume.
# failed jobs when they terminally failed in a prior attempt (no-op on
# first attempts); its completed jobs stay completed — together they make
# `gh run rerun --failed` a true resume.
- run: |
# --retry only on re-run attempts: on a fresh attempt a failed
# upstream is a genuine failure and dependents must fail fast; on a
Expand Down Expand Up @@ -126,7 +191,7 @@ jobs:
--plan plan.json \
--runner github-actions \
$state_flag \
--job "${{ matrix.job-id }}" \
--lane "${{ matrix.lane }}" \
--exec-id "${{ github.run_id }}" \
$retry_flag
env:
Expand Down
Loading
Loading