~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0

CI in series on four home bidders; the fixes of promote 11's cycle; the kcp docs

Merged johnandersen777.bsky.social asked to merge into main from socialweb.computer/socialweb-computer-kcp:phase-2
.knotless/workflows/promote.yml+17−9
@@ -1,17 +1,19 @@
# knotless CI: plan 0040's promote, the release of main, alongside its staging shares (plan 0040 decision 28: prod gets the
# build before staging has passed it; a roll is green only when every test-N and this are). On a push to main that changes
# code (the same paths as test-1 to test-4, so a push that skips one skips both; plan 0040 step 15), and when asked.
# After `release` (`after: [release]`: filed without running when release failed or was cancelled; it does not wait for
# the test-N workflows, and they do not cancel it: `superseded` is only about a newer commit's run), on the `release`
# knotless CI: plan 0040's promote, the release of main, after its staging gate (owner, 2026-11-19: staging and prod in
# series, for less compute): it starts only once this commit's `test` passed, so the two never rent at once for one
# commit. On a push to main that changes code (the same paths as release.yml and test.yml: deploy/check.sh; a push that
# skips test skips this too; plan 0040 step 15), and when asked. `after: [release, test]`: it waits for both at this
# commit; when either failed it is filed `failure` without running ("not run: test, which it runs after, ended
# failure"), when either was cancelled `cancelled`; release is named for its artifacts (the runner grants a run the
# artifacts of the workflows it names in `after` only: the test host, meshd and page of `scripts/ci-test.sh host`). A
# rerun of `test` does not start this again: ask it (docs/ci-debug.md "After a red test"). On the `release`
# executor binding (only main's names socialweb-computer-release, whose
# release-workload module holds the socialweb.computer session with the software.release.* scopes; the binding asks for
# no guest requester: the gate signs in as bob, alice and john, and `promote.sh prepare` exits 1 on a VM that has one and makes
# the gate's unix user r2): its one step is
# the gate's unix user r2): after the plain `staging gate` step, its release step is
# `release <command>`: the module writes the rc's manifest and version and moves channel rc, runs the command on the VM
# with RELEASE_VERSION (the rc), RELEASE_STABLE_VERSION (the stable vT a green writes), RELEASE_URL and RELEASE_SHA256
# (scripts/promote.sh: the prod target, the droplets, the rc operators' heartbeats, the prod gate: every `both` entry of
# tests/entries.txt as prod bob, alice and john, then the wait for this commit's test-1 to test-4 checks, so stable never moves
# on a commit whose staging gate is red, then the copy of main/<sha>/ to releases/vT/ in the bucket, checked from its
# tests/entries.txt as prod bob, alice and john; then the copy of main/<sha>/ to releases/vT/ in the bucket, checked from its
# public URLs: exit 0 only when all of it is green), then moves stable on exit 0, or moves rc back and runs
# `scripts/promote.sh rollback`.
# A cancel or a timeout drops that step mid-run, so `stop` (run after the step, whatever it came to, with the step's env
@@ -46,7 +48,7 @@ on:
asked:
refs: [refs/heads/main]
runners: [aliceoa.bsky.social]
after: [release]
after: [release, test]
executor: release
superseded: finish
secrets:
@@ -63,6 +65,12 @@ artifacts: [gate-runs]
stop: release-rollback
stop_timeout: 30
steps:
# a plain step, before release-workload does anything (it moves channel rc before the release step's command runs): exit 1
# unless this commit's `test` ran green (red, cancelled, path-skipped, or none at this commit, as an asked promote may
# find); then the release step never runs, rc never moves, and the stop finds no rc of this run (scripts/promote.sh test)
- name: staging gate
timeout: 10
run: bash scripts/promote.sh test
- name: release
timeout: 240
run: release bash scripts/promote.sh prepare && bash scripts/ci-test.sh host && bash scripts/ci-test.sh binary && bash scripts/promote.sh
.knotless/workflows/release.yml+3−3
@@ -5,7 +5,7 @@
# run's artifact dist/ elsewhere; skipped when already published for the tree), 0009's page from the commits pinned in tests/compositions/staging/page-tools.json
# (scripts/ci-page.sh: page/<sha256 of the pin>/ in the bucket, dist/ elsewhere, skipped when published), the node downloads by sha256 and the pinned guest image, staged in the
# bucket: downloads/<sha256>/, guest-images/<target>/<pin>/ (content-addressed) and, on main, staging/<sha>/ (the binaries and their manifest).
# test-1 to test-4 and promote run after this workflow and take its binary (by digest from ttl.sh; promote: main/<sha>/) and its test host. Its last steps, on main,
# test, then promote run after this workflow and take its binary (main: main/<sha>/; a branch's test: by digest from ttl.sh) and its test host. Its last steps, on main,
# publish: copy staging/<sha>/ inside the bucket to main/<sha>/ and main/latest/ and check what was published from the public URLs. No tag is built (plan 0040
# step 15): releases/<version>/ is promote's copy of main/<sha>/ when it moves channel stable (scripts/promote.sh). No other workflow builds a release binary, a
# test host or a module, and nothing rebuilds anything to compare (owner rules: one build; no reproducible-build verification in CI). The bucket key is a sealed
@@ -14,8 +14,8 @@
# 16 GB (binding kcp-build). CI runs on main only (owner rule: no branch CI, no merge-queue CI): every main commit is built and published; a branch runs it
# only when asked (`knotless run rerun <url> --ref refs/heads/<branch> --workflow release`). A newer push to main does not cancel a release that holds its
# turn (`superseded: finish`: the newest waits for it; the runner applies it to main and v* tags only).
# paths: the test-N workflows' list (scripts/ci-test-workflow.yml.tmpl): a push that changes none of them (docs, plans)
# builds nothing and tests nothing
# paths: test.yml's and promote.yml's list (deploy/check.sh): a push that changes none of them (docs, plans) builds nothing,
# tests nothing and releases nothing
on:
push:
refs: [refs/heads/main]
.knotless/workflows/test-1.ymldeleted+0−52
@@ -1,52 +0,0 @@
# GENERATED by scripts/ci-test-workflows.sh from scripts/ci-test-workflow.yml.tmpl (deploy/check.sh fails on drift): edit the template.
# knotless CI: staging network 1 of 4. The staging gate is 4 workflows, test-1 to test-4, side by side after `release`, each on its own kcp-test VM
# (4 vCPU / 8 GB; its own guest, so its own associated guest requester R2): a knotless workflow file has no fan-out, so they are files, all from one template
# and one count (scripts/ci-test-workflows.sh). Each stands up ONE staging network (tests/compositions/staging, the multi-VM layout: an atproto VM, two 4/8
# nested-virt bidder VMs and a gateway VM on one meshd overlay, rented by its R2) on THIS commit's build and runs its share of the gate on it
# (tests/gate.sh GATE_SHARD=1/4 from the network's atproto VM as its alice1..alice4; the shares are disjoint and their union is every entry of
# tests/entries.txt: scripts/check-shards.sh); an exclusive entry (gate.sh GATE_EXCLUSIVE: 0001, 0007:restart, 0014:*) is alone on its network. The step
# prints its RESULT lines and `gate: staging: K of M PASS (shard 1/4)`; `scripts/ci-staging-total.sh <commit>` reads the 4 workflows and prints the
# total, `gate: staging: N of 43 PASS`. The socialweb-computer is release's linux/amd64 of this commit, pulled by digest from ttl.sh (its artifact
# oci/binary.ref; no credential, so a fork's run works) on the CI VM and on every staging VM (target requester `oci:<ref>@sha256:<digest>`); the test host
# and meshd are release's too (the bucket on main, its artifacts dist/ on a branch). Nothing here builds. Runs after `release` on a push to main
# that changes code (paths below) and on a branch only when asked, each workflow by name (`knotless run rerun knotless://<owner>/socialweb-computer-kcp
# --ref refs/heads/<branch> --workflow test-1`). The run's dump is an artifact (runs/), kept on failure.
on:
push:
refs: [refs/heads/main]
paths: [internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, lexicons/**, hack/**, did-key-associator/**, typescript-helpers/**, go.mod, go.sum, Makefile, .knotless/**]
asked:
refs: [refs/heads/*]
runners: [aliceoa.bsky.social]
after: [release]
executor: kcp-test
# a landing on main does not cancel a staging run that holds its turn (`superseded: finish`: the newest waits for it): a 2 h staging run could not complete while
# agents landed; on a branch a newer push still cancels (the runner applies finish to main and v* tags only)
superseded: finish
artifacts: [runs]
# 0013's agent part: the owner's atirc agent config (the prod target's agentConfig), a sealed secret of main and v* pushes
secrets: [ATIRC_AGENT_CONFIG]
# a failed run freezes (--on-fail freeze): `knotless run attach` gives the owner's or a collaborator's key this, as
# root on the CI VM, only while the run goes (AGENTS.md: Debug a failed CI run; `knotless run attach ... --workflow test-1`)
attach: runuser -u r2 -- /usr/local/bin/swc-test-host attach /work/runs
# after the steps, whatever they came to (a cancel or a timeout cuts the staging step short): swc-test-host freezes the
# run as a failure does (attach stays open through `stop`), holds it 30 min, then releases what R2 rented before the
# runner gives the CI VM back; stop_timeout covers the hold and the cleanup
stop: if [ -x /usr/local/bin/swc-ci-test ]; then /usr/local/bin/swc-ci-test stop; fi
stop_timeout: 50
env:
SWC_RUNS: /work/runs
# this network's share of the gate's entries (scripts/ci-test.sh staging, tests/gate.sh GATE_SHARD)
CI_SHARD: 1/4
steps:
# every step is scripts/ci-test.sh <step> (plan 0042); the same script runs by hand (plan 0044: CI_ACCOUNT=alice)
- name: swc-test-host
timeout: 30
run: bash scripts/ci-test.sh host
- name: binary
timeout: 30
run: bash scripts/ci-test.sh binary
# a share of 4 is under an hour (plan 0040, Finding "Gate shards"); the input's deadlineMin 150, then a failed run's 30 min freeze
- name: staging
timeout: 200
run: bash scripts/ci-test.sh staging
.knotless/workflows/test-2.ymldeleted+0−52
@@ -1,52 +0,0 @@
# GENERATED by scripts/ci-test-workflows.sh from scripts/ci-test-workflow.yml.tmpl (deploy/check.sh fails on drift): edit the template.
# knotless CI: staging network 2 of 4. The staging gate is 4 workflows, test-1 to test-4, side by side after `release`, each on its own kcp-test VM
# (4 vCPU / 8 GB; its own guest, so its own associated guest requester R2): a knotless workflow file has no fan-out, so they are files, all from one template
# and one count (scripts/ci-test-workflows.sh). Each stands up ONE staging network (tests/compositions/staging, the multi-VM layout: an atproto VM, two 4/8
# nested-virt bidder VMs and a gateway VM on one meshd overlay, rented by its R2) on THIS commit's build and runs its share of the gate on it
# (tests/gate.sh GATE_SHARD=2/4 from the network's atproto VM as its alice1..alice4; the shares are disjoint and their union is every entry of
# tests/entries.txt: scripts/check-shards.sh); an exclusive entry (gate.sh GATE_EXCLUSIVE: 0001, 0007:restart, 0014:*) is alone on its network. The step
# prints its RESULT lines and `gate: staging: K of M PASS (shard 2/4)`; `scripts/ci-staging-total.sh <commit>` reads the 4 workflows and prints the
# total, `gate: staging: N of 43 PASS`. The socialweb-computer is release's linux/amd64 of this commit, pulled by digest from ttl.sh (its artifact
# oci/binary.ref; no credential, so a fork's run works) on the CI VM and on every staging VM (target requester `oci:<ref>@sha256:<digest>`); the test host
# and meshd are release's too (the bucket on main, its artifacts dist/ on a branch). Nothing here builds. Runs after `release` on a push to main
# that changes code (paths below) and on a branch only when asked, each workflow by name (`knotless run rerun knotless://<owner>/socialweb-computer-kcp
# --ref refs/heads/<branch> --workflow test-2`). The run's dump is an artifact (runs/), kept on failure.
on:
push:
refs: [refs/heads/main]
paths: [internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, lexicons/**, hack/**, did-key-associator/**, typescript-helpers/**, go.mod, go.sum, Makefile, .knotless/**]
asked:
refs: [refs/heads/*]
runners: [aliceoa.bsky.social]
after: [release]
executor: kcp-test
# a landing on main does not cancel a staging run that holds its turn (`superseded: finish`: the newest waits for it): a 2 h staging run could not complete while
# agents landed; on a branch a newer push still cancels (the runner applies finish to main and v* tags only)
superseded: finish
artifacts: [runs]
# 0013's agent part: the owner's atirc agent config (the prod target's agentConfig), a sealed secret of main and v* pushes
secrets: [ATIRC_AGENT_CONFIG]
# a failed run freezes (--on-fail freeze): `knotless run attach` gives the owner's or a collaborator's key this, as
# root on the CI VM, only while the run goes (AGENTS.md: Debug a failed CI run; `knotless run attach ... --workflow test-2`)
attach: runuser -u r2 -- /usr/local/bin/swc-test-host attach /work/runs
# after the steps, whatever they came to (a cancel or a timeout cuts the staging step short): swc-test-host freezes the
# run as a failure does (attach stays open through `stop`), holds it 30 min, then releases what R2 rented before the
# runner gives the CI VM back; stop_timeout covers the hold and the cleanup
stop: if [ -x /usr/local/bin/swc-ci-test ]; then /usr/local/bin/swc-ci-test stop; fi
stop_timeout: 50
env:
SWC_RUNS: /work/runs
# this network's share of the gate's entries (scripts/ci-test.sh staging, tests/gate.sh GATE_SHARD)
CI_SHARD: 2/4
steps:
# every step is scripts/ci-test.sh <step> (plan 0042); the same script runs by hand (plan 0044: CI_ACCOUNT=alice)
- name: swc-test-host
timeout: 30
run: bash scripts/ci-test.sh host
- name: binary
timeout: 30
run: bash scripts/ci-test.sh binary
# a share of 4 is under an hour (plan 0040, Finding "Gate shards"); the input's deadlineMin 150, then a failed run's 30 min freeze
- name: staging
timeout: 200
run: bash scripts/ci-test.sh staging
.knotless/workflows/test-3.ymldeleted+0−52
@@ -1,52 +0,0 @@
# GENERATED by scripts/ci-test-workflows.sh from scripts/ci-test-workflow.yml.tmpl (deploy/check.sh fails on drift): edit the template.
# knotless CI: staging network 3 of 4. The staging gate is 4 workflows, test-1 to test-4, side by side after `release`, each on its own kcp-test VM
# (4 vCPU / 8 GB; its own guest, so its own associated guest requester R2): a knotless workflow file has no fan-out, so they are files, all from one template
# and one count (scripts/ci-test-workflows.sh). Each stands up ONE staging network (tests/compositions/staging, the multi-VM layout: an atproto VM, two 4/8
# nested-virt bidder VMs and a gateway VM on one meshd overlay, rented by its R2) on THIS commit's build and runs its share of the gate on it
# (tests/gate.sh GATE_SHARD=3/4 from the network's atproto VM as its alice1..alice4; the shares are disjoint and their union is every entry of
# tests/entries.txt: scripts/check-shards.sh); an exclusive entry (gate.sh GATE_EXCLUSIVE: 0001, 0007:restart, 0014:*) is alone on its network. The step
# prints its RESULT lines and `gate: staging: K of M PASS (shard 3/4)`; `scripts/ci-staging-total.sh <commit>` reads the 4 workflows and prints the
# total, `gate: staging: N of 43 PASS`. The socialweb-computer is release's linux/amd64 of this commit, pulled by digest from ttl.sh (its artifact
# oci/binary.ref; no credential, so a fork's run works) on the CI VM and on every staging VM (target requester `oci:<ref>@sha256:<digest>`); the test host
# and meshd are release's too (the bucket on main, its artifacts dist/ on a branch). Nothing here builds. Runs after `release` on a push to main
# that changes code (paths below) and on a branch only when asked, each workflow by name (`knotless run rerun knotless://<owner>/socialweb-computer-kcp
# --ref refs/heads/<branch> --workflow test-3`). The run's dump is an artifact (runs/), kept on failure.
on:
push:
refs: [refs/heads/main]
paths: [internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, lexicons/**, hack/**, did-key-associator/**, typescript-helpers/**, go.mod, go.sum, Makefile, .knotless/**]
asked:
refs: [refs/heads/*]
runners: [aliceoa.bsky.social]
after: [release]
executor: kcp-test
# a landing on main does not cancel a staging run that holds its turn (`superseded: finish`: the newest waits for it): a 2 h staging run could not complete while
# agents landed; on a branch a newer push still cancels (the runner applies finish to main and v* tags only)
superseded: finish
artifacts: [runs]
# 0013's agent part: the owner's atirc agent config (the prod target's agentConfig), a sealed secret of main and v* pushes
secrets: [ATIRC_AGENT_CONFIG]
# a failed run freezes (--on-fail freeze): `knotless run attach` gives the owner's or a collaborator's key this, as
# root on the CI VM, only while the run goes (AGENTS.md: Debug a failed CI run; `knotless run attach ... --workflow test-3`)
attach: runuser -u r2 -- /usr/local/bin/swc-test-host attach /work/runs
# after the steps, whatever they came to (a cancel or a timeout cuts the staging step short): swc-test-host freezes the
# run as a failure does (attach stays open through `stop`), holds it 30 min, then releases what R2 rented before the
# runner gives the CI VM back; stop_timeout covers the hold and the cleanup
stop: if [ -x /usr/local/bin/swc-ci-test ]; then /usr/local/bin/swc-ci-test stop; fi
stop_timeout: 50
env:
SWC_RUNS: /work/runs
# this network's share of the gate's entries (scripts/ci-test.sh staging, tests/gate.sh GATE_SHARD)
CI_SHARD: 3/4
steps:
# every step is scripts/ci-test.sh <step> (plan 0042); the same script runs by hand (plan 0044: CI_ACCOUNT=alice)
- name: swc-test-host
timeout: 30
run: bash scripts/ci-test.sh host
- name: binary
timeout: 30
run: bash scripts/ci-test.sh binary
# a share of 4 is under an hour (plan 0040, Finding "Gate shards"); the input's deadlineMin 150, then a failed run's 30 min freeze
- name: staging
timeout: 200
run: bash scripts/ci-test.sh staging
.knotless/workflows/test-4.ymldeleted+0−52
@@ -1,52 +0,0 @@
# GENERATED by scripts/ci-test-workflows.sh from scripts/ci-test-workflow.yml.tmpl (deploy/check.sh fails on drift): edit the template.
# knotless CI: staging network 4 of 4. The staging gate is 4 workflows, test-1 to test-4, side by side after `release`, each on its own kcp-test VM
# (4 vCPU / 8 GB; its own guest, so its own associated guest requester R2): a knotless workflow file has no fan-out, so they are files, all from one template
# and one count (scripts/ci-test-workflows.sh). Each stands up ONE staging network (tests/compositions/staging, the multi-VM layout: an atproto VM, two 4/8
# nested-virt bidder VMs and a gateway VM on one meshd overlay, rented by its R2) on THIS commit's build and runs its share of the gate on it
# (tests/gate.sh GATE_SHARD=4/4 from the network's atproto VM as its alice1..alice4; the shares are disjoint and their union is every entry of
# tests/entries.txt: scripts/check-shards.sh); an exclusive entry (gate.sh GATE_EXCLUSIVE: 0001, 0007:restart, 0014:*) is alone on its network. The step
# prints its RESULT lines and `gate: staging: K of M PASS (shard 4/4)`; `scripts/ci-staging-total.sh <commit>` reads the 4 workflows and prints the
# total, `gate: staging: N of 43 PASS`. The socialweb-computer is release's linux/amd64 of this commit, pulled by digest from ttl.sh (its artifact
# oci/binary.ref; no credential, so a fork's run works) on the CI VM and on every staging VM (target requester `oci:<ref>@sha256:<digest>`); the test host
# and meshd are release's too (the bucket on main, its artifacts dist/ on a branch). Nothing here builds. Runs after `release` on a push to main
# that changes code (paths below) and on a branch only when asked, each workflow by name (`knotless run rerun knotless://<owner>/socialweb-computer-kcp
# --ref refs/heads/<branch> --workflow test-4`). The run's dump is an artifact (runs/), kept on failure.
on:
push:
refs: [refs/heads/main]
paths: [internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, lexicons/**, hack/**, did-key-associator/**, typescript-helpers/**, go.mod, go.sum, Makefile, .knotless/**]
asked:
refs: [refs/heads/*]
runners: [aliceoa.bsky.social]
after: [release]
executor: kcp-test
# a landing on main does not cancel a staging run that holds its turn (`superseded: finish`: the newest waits for it): a 2 h staging run could not complete while
# agents landed; on a branch a newer push still cancels (the runner applies finish to main and v* tags only)
superseded: finish
artifacts: [runs]
# 0013's agent part: the owner's atirc agent config (the prod target's agentConfig), a sealed secret of main and v* pushes
secrets: [ATIRC_AGENT_CONFIG]
# a failed run freezes (--on-fail freeze): `knotless run attach` gives the owner's or a collaborator's key this, as
# root on the CI VM, only while the run goes (AGENTS.md: Debug a failed CI run; `knotless run attach ... --workflow test-4`)
attach: runuser -u r2 -- /usr/local/bin/swc-test-host attach /work/runs
# after the steps, whatever they came to (a cancel or a timeout cuts the staging step short): swc-test-host freezes the
# run as a failure does (attach stays open through `stop`), holds it 30 min, then releases what R2 rented before the
# runner gives the CI VM back; stop_timeout covers the hold and the cleanup
stop: if [ -x /usr/local/bin/swc-ci-test ]; then /usr/local/bin/swc-ci-test stop; fi
stop_timeout: 50
env:
SWC_RUNS: /work/runs
# this network's share of the gate's entries (scripts/ci-test.sh staging, tests/gate.sh GATE_SHARD)
CI_SHARD: 4/4
steps:
# every step is scripts/ci-test.sh <step> (plan 0042); the same script runs by hand (plan 0044: CI_ACCOUNT=alice)
- name: swc-test-host
timeout: 30
run: bash scripts/ci-test.sh host
- name: binary
timeout: 30
run: bash scripts/ci-test.sh binary
# a share of 4 is under an hour (plan 0040, Finding "Gate shards"); the input's deadlineMin 150, then a failed run's 30 min freeze
- name: staging
timeout: 200
run: bash scripts/ci-test.sh staging
.knotless/workflows/test.ymlnew+49−0
@@ -0,0 +1,49 @@
# knotless CI: the staging gate, after `release` (which compiles everything and carries the gate's checks), on one kcp-test VM (4 vCPU / 8 GB, its own guest
# requester R2). It stands up ONE staging network (tests/compositions/staging, the multi-VM layout: an atproto VM, two 4/8 nested-virt bidder VMs and a gateway
# VM on one meshd overlay, rented by R2) on THIS commit's build and runs every entry of tests/entries.txt on it (tests/gate.sh from the network's atproto VM as
# its alice1..alice4, four at once; scripts/ci-test.sh input_default); an exclusive entry (gate.sh GATE_EXCLUSIVE: 0001, 0007:restart, 0014:*) is alone on it.
# The step prints its RESULT lines and `gate: staging: N of 43 PASS` (`scripts/ci-staging-total.sh <commit>` reads it back). `promote` runs after this one
# (owner, 2026-11-19: staging and prod in series, for less compute). The socialweb-computer is release's linux/amd64 of this commit (main: the bucket's
# main/<sha>/; a branch: pulled by digest from ttl.sh, its artifact oci/binary.ref) on the CI VM and on every staging VM; the test host and meshd are release's
# too (the bucket on main, its artifacts dist/ on a branch). Nothing here builds. Runs after `release` on a push to main that changes code (paths below; the
# same list as release.yml's and promote.yml's: deploy/check.sh) and on a branch only when asked (`knotless run rerun knotless://<owner>/socialweb-computer-kcp
# --ref refs/heads/<branch> --workflow test`). The run's dump is an artifact (runs/), kept on failure.
on:
push:
refs: [refs/heads/main]
paths: [internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, lexicons/**, hack/**, did-key-associator/**, typescript-helpers/**, go.mod, go.sum, Makefile, .knotless/**]
asked:
refs: [refs/heads/*]
runners: [aliceoa.bsky.social]
after: [release]
executor: kcp-test
# a landing on main does not cancel a staging run that holds its turn (`superseded: finish`: the newest waits for it): a 3 h staging run could not complete while
# agents landed; on a branch a newer push still cancels (the runner applies finish to main and v* tags only)
superseded: finish
artifacts: [runs]
# 0013's agent part: the owner's atirc agent config (the prod target's agentConfig), a sealed secret of main and v* pushes
secrets: [ATIRC_AGENT_CONFIG]
# a failed run freezes (--on-fail freeze): `knotless run attach` gives the owner's or a collaborator's key this, as
# root on the CI VM, only while the run goes (AGENTS.md: Debug a failed CI run; `knotless run attach ... --workflow test`)
attach: runuser -u r2 -- /usr/local/bin/swc-test-host attach /work/runs
# after the steps, whatever they came to (a cancel or a timeout cuts the staging step short): swc-test-host freezes the
# run as a failure does (attach stays open through `stop`), holds it 30 min, then releases what R2 rented before the
# runner gives the CI VM back; stop_timeout covers the hold and the cleanup
stop: if [ -x /usr/local/bin/swc-ci-test ]; then /usr/local/bin/swc-ci-test stop; fi
stop_timeout: 50
env:
SWC_RUNS: /work/runs
steps:
# every step is scripts/ci-test.sh <step> (plan 0042); the same script runs by hand (plan 0044: CI_ACCOUNT=alice)
- name: swc-test-host
timeout: 30
run: bash scripts/ci-test.sh host
- name: binary
timeout: 30
run: bash scripts/ci-test.sh binary
# 43 entries on one network: about 2 h 40 min with the stand-up (plan 0040, Finding "Gate shards": 9123 s of gate on two
# bidders); the input's deadlineMin 250 (from the rent: stand-up and gate), then a failed run's 30 min freeze, then the
# teardown; 300 is the runner's --step-timeout
- name: staging
timeout: 300
run: bash scripts/ci-test.sh staging
deploy/release/rc-operators.json+1−1
@@ -1,6 +1,6 @@
{
"operators": [
{ "handle": "bobvmbuilder.bsky.social", "bidders": ["did:plc:2l2wdry77c7jtucbslstagkj", "did:plc:4vcig7s43z3nyqrnepmcfzqt", "did:plc:7fj5jk5jxadrqtc5txp7xitp", "did:plc:kmccrdloxyziyhvga37tdg67", "did:plc:4srtkmossz4zzfzszpjpvoww", "did:plc:g5oltzb7gm2xiijdt7wazr4i", "did:plc:2nwkww3hif5atrybzjpqxbsr"] }
{ "handle": "bobvmbuilder.bsky.social", "bidders": ["did:plc:2l2wdry77c7jtucbslstagkj", "did:plc:4vcig7s43z3nyqrnepmcfzqt", "did:plc:7fj5jk5jxadrqtc5txp7xitp", "did:plc:kmccrdloxyziyhvga37tdg67"] }
],
"updateWithin": "10m"
}
deploy/check.sh+6−1
@@ -66,7 +66,12 @@ echo "check.sh: ok go vet"
scripts/check-architecture.sh || fail "architecture rules (scripts/check-architecture.sh)"
scripts/check-entries.sh || fail "tests/entries.txt and the plan's Entries table differ (scripts/check-entries.sh)"
scripts/check-shards.sh > /dev/null || fail "the gate's shares are not a partition of tests/entries.txt (scripts/check-shards.sh)"
scripts/ci-test-workflows.sh check || fail "the test-<i> workflows differ from their template (scripts/ci-test-workflows.sh write)"
w=.knotless/workflows
for f in release promote; do
[ "$(grep -m1 '^ paths:' $w/test.yml)" = "$(grep -m1 '^ paths:' $w/$f.yml)" ] || fail "$w/$f.yml's push paths are not test.yml's (a push that runs one of release, test and promote runs all three)"
done
grep -qx 'after: \[release, test\]' $w/promote.yml || fail "$w/promote.yml does not run after release and test"
[ "$(grep -m1 '^ run: ' $w/promote.yml)" = " run: bash scripts/promote.sh test" ] || fail "$w/promote.yml's first step is not the plain \`bash scripts/promote.sh test\` (it must end the run before release-workload moves channel rc)"
scripts/check-oauth-scope.sh || fail "the Go oauth scope lists and the QR page's TS ones differ (scripts/check-oauth-scope.sh)"
scripts/check-docs.sh || fail "a run=gate block of the docs did not pass (scripts/check-docs.sh)"
scripts/check-pins-records.sh || fail "the com.fedfork.exec.pins/atlibs records of john, alice and socialweb.computer differ (scripts/check-pins-records.sh)"
docs/plans/0040-findings.md+111−0
@@ -2045,3 +2045,114 @@ Each: what was seen (with the log), the cause, the fix, its proof.
`rc-image` (36c2be1a: `--network-timeout 20m`, as the module's other installs; a CI stage change: rehearse by hand
first). Reruns of both shares on the same commit started 05:19Z. The roll's restart window was clean on the three
droplets (no ERROR line; every guest subscribed).
- STAGING BIDDER INSTALL: GUEST IMAGE FETCH HIT THE 3 MIN DEFAULT (main db33c9ffd53c, 2026-11-19, test-1 and test-2).
SEEN: both shares failed in phase `bidders` before any entry: `bidder-1: install bidder failed: exited 1`, `REFUSED
guest-image context deadline exceeded` at 868.93 MiB (test-1) and 1009.53 MiB (test-2) of the 1.44 GiB rootfs.ext4.
Ticks: `install bidder` sent 04:45:02.8Z / 04:45:03.7Z, the poll read the exit 04:48:13.6Z / 04:48:16.6Z (3 min 11 s
and 3 min 13 s, the lookup and account steps included). CAUSE: the staging module's `bidder_install`
(`tests/modules/staging/src/lib.rs` ~598) passes no `--network-timeout`, so `install bidder` waits for the guest image
fetch `networkBudget()` = `DefaultNetworkBudget` 3 min (`internal/install/install.go:66`, ctx at :1474); the other
installs of the same module pass `--network-timeout 20m` (:20, :1118). 3 min for 1.44 GiB needs 8.2 MiB/s sustained.
Measured (progress line every 5 s, `internal/progress` DefaultInterval): test-1 868.93 MiB in about 180 s = 4.8 MiB/s
average (3.9 MiB/s to 470.92 MiB, 6.6 MiB/s in the last 60 s); test-2 1009.53 MiB = 5.6 MiB/s (4.5, then 7.9). Both
failed bidder-1 VMs ran on home hosts: test-1 on hat-8 (`deployed stagkj`, did:plc:2l2wdry77c7jtucbslstagkj), test-2
on hat-7 (`deployed 7tdg67`); every bidder VM on an sfo3 droplet (wazr4i, pqxbsr, jpvoww) was Ready in 63 to 82 s,
this run included (test-1 bidder-2 79.4 s, test-2 bidder-2 63.1 s), the same as every green cycle in ~/.tmp/ci-main
(bidderReadyS 78 to 82 s). The image comes from the Spaces origin `socialweb-computer-kcp.sfo3.digitaloceanspaces.com`
(`internal/clicfg/options.json` default release base; no CDN): in-region for the droplets, across the internet for a
home host. Green home-host installs: hat-8 94.6 s (test-4 7a0406d9, so >= 15.6 MiB/s), hat-9 128.7 s (test-1
ee133538, >= 11.5 MiB/s). Here two home-host bidder VMs (hat-7 and hat-8) fetched 1.44 GiB each at the same moment
and both ran at a third of that; the 03:1xZ by-hand failure (1.21 GiB at the deadline: 6.9 MiB/s) is the same
limit. The fetch itself is fine: `guestimage.Store` resumes with Range after a failed attempt (per attempt 60 s +
bytes / 5 MB/s, AttemptPause 2 s) under its own 30 min FetchTimeout on a detached context; only the install's 3 min
wait ends it, and the install exits 1. No per-VM rate shaping in our code (no tc/tbf; pasta has none). FIX (branch
`rc-image`, not landed): the staging bidder install passes `--network-timeout 20m`, the value the module already
gives its other installs; it covers 1.44 GiB down to 1.23 MiB/s (a third of the slowest rate seen), under
MaxNetworkBudget 30 min, and a healthy install still ends when it is ready. It is a CI stage change: rehearse by hand
before landing; `tests/publish-test-host.sh` for the new wasm. PROOF: `cargo check -p swc-test-host`, `cargo wasm`
in tests/modules. Unproven: what else loaded the home link at 04:45Z (no host counters read); that hat-7 and hat-8
share one uplink; the 20 m also lands in the staging bidder's config.json `network-timeout` (its run-time network,
ready and identity waits; prod bidders keep 3 m). Not done: a prod `install bidder` on a home link meets the same
3 min default; sizing the default from the pinned image bytes is an owner decision.
- 0014:CONCURRENT AT db33c9ff, THE SECOND TIME (agent rc-cap, branch rc-cap). SEEN: test-4 (shard 4/4, 04:38Z-06:08Z)
`gate: staging: 12 of 13 PASS`; `0014:concurrent FAIL 597: "st-0014-1795064361-6388-1-3" waited 4 rounds for capacity though
the run's rentals fit the bidders' room (2 each)`, refusals in round 0 by did:plc:mefk5ftilbbd3azt5ynmpq7m ("hold 8 of its 8")
and did:plc:lpbyio6wtm5htfuxykl2vetk ("hold 6 of its 8": one 4-vCPU rental of the run plus 2 vCPUs of nothing live).
EVIDENCE LOST AGAIN, by a second gap: the artifacts (`==> artifacts: kept 12 of runs`) hold no `logs/gate-runs/` and no
`logs/journals-<vm>/`. The staging composition called `computer.socialweb.test.logs.fetchRuns` four times (ticks
05:37:29Z `atproto:runs`, 05:37:31Z `bidder-1:journals`, 05:37:34Z `bidder-2:journals`, 05:37:35Z `gateway:journals`) and
each answered `computer.socialweb.test.logs.fetchRuns needs a session (sign in: atlibs login + --as, or --app-password)`
(readings `gateRuns`, `journals.*`). dbacebf6 listed the NSID in `tests/modules/staging/module.json` `calls`, but the
host serves only the NSIDs of `tests/host/src/swc.rs` `NSIDS` (its transport `provides`), which never named it: the
call fell through to the atproto XRPC route (atlibs `host-call.js`), which has no session on the CI VM. The
`"logs.fetchRuns" => self.fetch_runs(input)` arm of `more.rs` was never reached.
WHAT IS KEPT (`~/.tmp/rc-cap/artifacts/runs/staging-composition-1795063241907/ticks.ndjson.zst`, the `<vm>:mem` polls every
37 s, used memory of each staging bidder VM; the gate log tails of `atproto:suite-logs`): baseline about 1650M with no
guest. bidder-2 (lpbyio6, the 6-of-8 bidder) held a guest 04:51:28 to 04:52:06 (1977M, 2212M: 0007:run, 04:50:47 to
04:53:03, alice2) and 04:53:58 to 04:54:35 (2141M, 2229M: 0008:run, 04:53:03 to 04:54:59, alice3, `released in 0 s`),
then nothing (1734M at 04:55:13 .. 1669M at 04:59:33). bidder-1 (mefk5) held 0005:b (04:52:42 to 04:57:03, up to 4654M)
and 0012:run (04:58:17 2134M, 04:58:54 2308M; 1659M at 04:59:32). 0014:concurrent started 04:59:21 (run
0014-composition-1795064361120, right after 0012:run, the exclusive barrier) with no guest on either bidder (both at
baseline), so its sizing (preLive empty, fit 2) was right and the 2 vCPUs on bidder-2 were not a guest still
terminating: a reservation not backed by a guest. Its three rentals booted at 05:00:09 to 05:01:25 (bidder-1 1874M to
2595M, bidder-2 1848M to 2186M); the fourth booted on bidder-2 at 05:07:36 (2349M, 2556M at 05:08:14). With the waiting
rounds (30 s, 1 min, 2 min, 2 min) the last refused round was at about 05:04 and the Held one at about 05:06:30: the
phantom was counted from before 05:00 to about 05:04 and gone by about 05:06:30. A 10 min AcceptReserveHold ending then
was made at about 04:54 to 04:56:30, the minute 0008:run's 2-vCPU rental (the requester default, `DefaultComputeCPUs`
2; acc-0008 rents `--hold` only) was Held and released on bidder-2. Every entry before 0014 in this shard rents 2
vCPUs; only 0008 was on bidder-2 in that window (0007's would have expired by about 05:02).
CAUSE (code, the paths that leave an unbacked reservation; which one fired is not provable without the journals):
(A) a re-reserve of the RFP after `reservedFor` drops the VM link (branch rc-reserve f463dcb2): 10 min from the VM's
creation (0008: about 04:53:40, so until about 05:03:40, a minute short of the last refused round). (D, new) a
submitAccept that reaches `submittedAcceptRefused` after the contract is over: `vmForAccept` finds no VM once it is
deleted or ended, so `acceptRefused` reserves 10 min, after `completeBidRelease` already ran its unreserve, and nothing
releases it (10 min from 0008's release, about 04:54:50 to 05:04:50: fits the window). (B) an accept that ends before
`provision()` (accept gone, author not on the PLC, bid released/failed/expired, policy decline, RFP invalid): never
released. (C) a transient failure after the in-provision `acceptRefused` refreshes the hold on each outbox retry until
the bid expires (BidTTL 24 h). No requester path re-sends submitAccept after its receipt in this code (accept.go
`submitAcceptAndWait` stops at the receipt, and acceptCopies is off), so D needs a late or slow re-send; A needs a
re-send whose reserve lands between `reservedFor` and the ComputeVM informer. Both are races of the same 0.5 to 2 s
re-send loop around the receipt.
FIX (branch rc-cap; product): rc-reserve's f463dcb2 (A), with the review's tightening (a linked reservation's re-reserve
keeps `max(until, now + ReservedVMSeenGrace)`); `submittedAcceptRefused` reserves only for a live bid of the issuing
requester (`acceptOver`: released, failed, expired; or no matching bid, or another requester): otherwise it runs the
same capacity check with no hold (the same 409 when full, no failBid, no reservation) (D); the in-provision path
releases the accept's unplaced reservation (`unreserveUnplaced`: only one with no VM bound) when the bid is over, the RFP
is invalid or the policy declines it, and `releaseAccept` (the accept's remembered RFP) when the accept is gone or its
author does not resolve (B). C stays as designed: a retry of an accept that may still place keeps its reservation; it
ends at the bid's expiry (now released there) or a terminal exit. Exit paths: placed: `reservedFor` then the index (and
A); `placeAccepted` error: `provision` unreserves (unchanged); capacity refused: `failBid` (unchanged); abandoned:
`unresolvedAccept` give-up (unchanged); released: `completeBidRelease` (unchanged) and now no re-reserve after it;
over/invalid/declined/gone: the new releases. Every release before the in-provision `acceptRefused` is re-taken by that
check before any receipt, and no release touches a reservation bound to a VM, so nothing in flight is un-counted. No
new refusal, limit or check of input. Test host: `swc.rs` `NSIDS` names `computer.socialweb.test.logs.fetchRuns`, so the
next failed staging suite brings the run dirs and the bidder journals (a tests/ change: `tests/publish-test-host.sh`
before it lands, else CI builds the host itself).
RECURS: on any shard whose 0014 mode-0 entry (run, concurrent) starts within 10 min of an earlier 2-vCPU rental's
Held or release on a staging bidder (the exclusive barrier waits only for the entries to end, not for the bidders'
reservations), when that rental hit the A or D race: twice today in test-4 (a4aa6d62, db33c9ff).
PROOF: hat-8 under swc-heavy: `go build ./... && go vet ./internal/market/bidder/` exit 0; `deploy/check.sh --fast` exit 0,
last line `check.sh: ok policy engine specification tests`; `cargo check -p swc-test-host` exit 0. Not run on staging.
RISK: a policy run that denies once (transient) after an earlier attempt already wrote the receipt drops the unplaced
reservation, and the next attempt's capacity check can then refuse a rental that has a receipt. Unproven: which of A or D fired (the journals would show `bidder_accept_refused_capacity`, the
submitAccept handler lines after `a guest ComputeVM is applied` or after the release of 0008's VM).
- 0005:r2fail FAIL ON PROMOTE db33c9ff (2026-11-19, john, 1486 s; branch `rc-r2fail`, not landed). Seen: "the failed R2
left did:plc:fk6lydtaor3ib4r4dqpk7hae live at PLC 5 min after the release"; plc.directory audit log at 06:00Z: one
`plc_operation` (05:15:50Z), no tombstone (never done, not late; the rc165 DID did:plc:7f2a7u2jjxft6fngc4yzmxyr is
live too). Timeline (run dir `0005-composition-1795065220541`, core.log, ticks): R2 reported 05:15:52.68Z; the
module's kill done 05:15:54.06Z; the renter's getRecord of R2's associationRequest 05:15:55.6Z and 05:15:57.3Z:
HTTP 503 NoSubscriber (R2's PDS died with R2), so the guest requester stayed Pending; r2Release answered 05:16:51Z
`Failed: ... socialweb-r2-release.service failed because the control process exited with error code`; release done
05:17:03Z; no `requester_tombstone*` line at all. Passing runs 688c2105 (03:55Z) and a5269317 (01:47Z): the same read
came 0.7 s after the report, before the kill landed (`requester_guest_requester` Verified), r2Release Failed the same
way, and the renter tombstoned R2 by its rotation key 2 min after the release (`requester_tombstoned` 03:59:02Z,
01:50:17Z). Cause: two cleanups, both missed. (1) The renter fallback (`tombstoneFallback`, `GuestDIDs`) acted only on a
Verified guest requester, and an R2 that dies between its report and the renter's read of its record can never be
verified: a race (the read 0.7 s after the report in the passes, 2.9 s here; the kill lands 1.4 to 1.6 s after it). (2) The in-guest release (94fe3ccf, the rc166
fix: the release unit retires a crashed R2 with its own PDS rotation key) exits 1 in all three r2fail runs seen; its
journal died with the VM (the failed run's log fetch came after the release). Fix of (1): the fallback takes the
reported DID in any state; an unverified one is bound to this contract by its own DID document, which must name
`at://<label>-<rfp rkey>.<renter handle>` (the association request entry's handle) besides `agent-of/<renter>` and
the renter rotation key; `GuestDIDs` lists it, so `run request` waits for its tombstone before the kcp stops. With no
verified renter handle it is skipped (`requester_tombstone_skipped`). Open: (2), the release unit's exit 1 (read
`journalctl -u socialweb-r2-release.service` on a held 0005:r2fail guest). Proof: none yet (next promote).
docs/plans/0040-release-pipeline.md+50−43
docs/bidder.md+99−262
docs/ci-debug.md+94−62
docs/deploy.md+44−65
docs/gateway.md+40−57
docs/quickstart-local.md+57−337
docs/quickstart-prod.md+118−412
530 lines changed: not loaded until asked for.
docs/README.md+25−25
internal/market/requester/renterkey.go+21−9
internal/market/requester/runner.go+26−3
internal/market/requester/secrets.go+5−1
scripts/check-docs.sh+2−2
scripts/check-shards.sh+2−1
scripts/ci-check-wait.sh+9−6
scripts/ci-staging-total.sh+20−27
scripts/ci-test-workflow.yml.tmpldeleted+0−52
scripts/ci-test-workflows.shdeleted+0−32
scripts/ci-test.sh+17−15
scripts/install.shnew+55−0
scripts/promote.sh+26−30
tests/host/src/swc.rs+1−0
tests/modules/staging/src/lib.rs+2−2
tests/modules/staging/module.json+1−1
tests/targets/prod.json+0−36
tests/gate.sh+2−1
tests/publish-test-host.sh+1−1
AGENTS.md+11−11
README.md+54−49