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

socialweb.computer/socialweb-computer-kcp

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

1 collaborator
0
0

plan 0040: prod gate over read-only ops routes, promote alongside four staging shares, rollback job, 0014/0020 fixes

Merged johnandersen777.bsky.social asked to merge into main from socialweb.computer/socialweb-computer-kcp:integrate
.knotless/workflows/promote.yml+25−16
@@ -1,31 +1,41 @@
# knotless CI: plan 0040's promote, the release of a green main. Runs only when asked until plan 0040 step 15 (its push
# knotless CI: plan 0040's promote, the release of main, alongside its staging test (plan 0040 decision 28: prod gets the
# build before staging has passed it; a roll is green only when both `test` and this are). Runs only when asked until plan 0040 step 15 (its push
# trigger, with paths internal/**, cmd/**, api/**, tests/**, rust/**, deploy/**, scripts/**, go.mod, go.sum, .knotless/**,
# comes back then). After `test`, on the `release` executor binding (only main's names socialweb-computer-release, whose
# comes back then). After `release` (`after: [release]`: filed without running when release failed or was cancelled; it
# does not wait for `test`, and `test` does not cancel it: `superseded` is only about a newer commit's run), 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): its one step is
# `release <command>`: the module writes the rc's manifest and version and moves channel rc, runs the command on the VM
# (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 and alice), then moves stable on exit 0, or moves rc back and runs `scripts/promote.sh rollback`.
# tests/entries.txt as prod bob and alice, then the wait for this commit's `test` check: exit 0 only when test is green
# too, so stable never moves on a commit whose staging test is red), 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
# and secrets) is the module's `release-rollback`: when this commit's rc is still on channel rc and not stable, rc goes
# back to the version it pointed at before (the rc's `previous`) and `scripts/promote.sh rollback` ends the promote still
# running on the VM, puts the droplets back and waits for every rc operator's bidder; after a green or an already rolled
# back promote it moves nothing (plan 0040 step 12, decision 4). stop_timeout: the deploy, the bidders' updateWithin and
# the ended gate's test hosts releasing their rentals.
#
# Secrets, each sealed to refs/heads/main only (plan 0040 decision 7; sealing is the owner's act). scripts/promote.sh and
# scripts/ci-prod-target.sh write each to a 0600 file and drop it from the environment before the gate runs; none is
# printed, logged or kept as an artifact.
# PROD_DEPLOY_SSH_KEY (sealed) the droplet deploy key (root@socialweb.computer): the deploys, and r2's read of
# the ssh gateway's core log (the target's gateway.log, 0002:run)
# PROD_DEPLOY_SSH_KEY (sealed) the droplet deploy key (root@socialweb.computer): the deploys only (it is
# never r2's: the gate reads the ssh gateway's log through its read-only ops route)
# ATIRC_AGENT_CONFIG (sealed) the atirc client config of the agent VMs (the target's agentConfig), a TOML file
# PROD_ALICE_ATPROTO_PASSWORD aliceoa.bsky.social's main password, one line (not an app password: the OAuth sign-ins
# type it). The handle is tests/targets/prod.json's
# PROD_BOB_ATPROTO_PASSWORD bobvmbuilder.bsky.social's main password, one line
# PROD_KCP_KUBECONFIG_HAT_7 the kubeconfig file of hat-7's bidder kcp (hat-8's ~/.config/swc-system-tests/kcp/hat-7.kubeconfig)
# PROD_KCP_KUBECONFIG_HAT_8 the same of hat-8
# PROD_KCP_KUBECONFIG_HAT_9 the same of hat-9
# PROD_KCP_KUBECONFIG_HAT_10 the same of hat-10
# Not declared, the owner's decision (plan 0040 step 11): how r2 on the release VM reaches the bidder hosts hat-7..hat-10
# (each kcp is on its host's loopback, behind `ssh hat-N`; bidder.health and the bidder log read run on the host).
# PROD_OPS_READ_SECRET the shared secret of the read-only ops routes (GET /xrpc/com.fedfork.exec.ops.*) of
# every prod bidder and the ssh gateway, one line: each host holds the same value in its
# ops-read-secret file (0600; `install bidder --ops-read-secret-file`, docs/SYSTEM.md)
# The release VM reaches no bidder host and holds no kubeconfig (owner, 2026-11-18): the gate's operator-side reads go
# through each bidder's and the ssh gateway's read-only ops routes; the bidders are discovered (scripts/ci-prod-target.sh).
on:
asked:
refs: [refs/heads/main]
runners: [aliceoa.bsky.social]
after: [test]
after: [release]
executor: release
superseded: finish
secrets:
@@ -33,12 +43,11 @@ secrets:
- ATIRC_AGENT_CONFIG
- PROD_ALICE_ATPROTO_PASSWORD
- PROD_BOB_ATPROTO_PASSWORD
- PROD_KCP_KUBECONFIG_HAT_7
- PROD_KCP_KUBECONFIG_HAT_8
- PROD_KCP_KUBECONFIG_HAT_9
- PROD_KCP_KUBECONFIG_HAT_10
- PROD_OPS_READ_SECRET
# the prod gate's run dumps (failure, state, redacted logs: no secret), kept passed or failed; the gate's own dir (iroh keys) is not
artifacts: [gate-runs]
stop: release-rollback
stop_timeout: 30
steps:
- name: release
timeout: 240
.knotless/workflows/test-1.ymlnew+52−0
@@ -0,0 +1,52 @@
# 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 and v* tags, 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/**, go.mod, go.sum, .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.ymlnew+52−0
@@ -0,0 +1,52 @@
# 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 and v* tags, 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/**, go.mod, go.sum, .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.ymlnew+52−0
@@ -0,0 +1,52 @@
# 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 and v* tags, 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/**, go.mod, go.sum, .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.ymlnew+52−0
@@ -0,0 +1,52 @@
# 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 and v* tags, 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/**, go.mod, go.sum, .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.ymldeleted+0−45
@@ -1,45 +0,0 @@
# knotless CI: the staging composition (tests/compositions/staging) on THIS commit's build, after `release` (which compiles everything and carries the gate's
# checks): 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 and
# v* tags, 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 (`knotless run rerun knotless://<owner>/socialweb-computer-kcp --ref refs/heads/<branch> --workflow test`). Rented by R2 from the kcp-test VM
# (4 vCPU / 8 GB): the multi-VM layout (four small VMs, two of them 4/8 nested-virt bidders, one meshd overlay) and the whole gate (tests/gate.sh: every
# entry of tests/entries.txt, as the network's alice1..alice4, three at once; scripts/ci-test.sh input_default) run from its atproto VM: ONE staging network
# per push; an exclusive entry (gate.sh GATE_EXCLUSIVE: 0001, 0007:restart, 0014:*: they fill or restart the bidders) is alone on it. 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/**, go.mod, go.sum, .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)
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
- name: staging
timeout: 300
run: bash scripts/ci-test.sh staging
cmd/socialweb-computer/bidder.go+2−2
@@ -42,7 +42,7 @@ import (
const bidderIdentityWait = 5 * time.Minute
var bidderOptions = slices.Concat([]string{backendOpt, "profile", "network", "name", "instance", "state-dir", "fg", "ready-timeout",
"network-timeout", "market-network-file", "bidder-spec-file", "bidder-policy", "bidder-policy-args", "bidder-operator-signin", "bidder-vouch", "bidder-options", "kcp-path", "kine-path", "bao-path", "dumbpipe-path", "openbao-plugin-dir", "asset-cache", "unit-prefix", "kcp-front-address", "guest-image-release-base", "no-guest-lan-udp", "guest-host-udp", "compute-kinds", "cpu-overcommit"},
"network-timeout", "market-network-file", "ops-read-secret-file", "bidder-spec-file", "bidder-policy", "bidder-policy-args", "bidder-operator-signin", "bidder-vouch", "bidder-options", "kcp-path", "kine-path", "bao-path", "dumbpipe-path", "openbao-plugin-dir", "asset-cache", "unit-prefix", "kcp-front-address", "guest-image-release-base", "no-guest-lan-udp", "guest-host-udp", "compute-kinds", "cpu-overcommit"},
devVMOptions)
type bidderRun struct {
@@ -787,7 +787,7 @@ func (r *bidderRun) installedCore(ctx context.Context) int {
unit, _ := r.a.env.LookupEnv(devsup.EnvUnit)
cfg := bidder.CoreConfig{StateDir: state, Prefix: prefix, Handle: r.handle, Executables: exes, Spec: spec, VM: vm,
ComputeVM: computevm.Config{Handle: r.handle, Runtime: rt, Manager: m, Log: r.a.log}, FrontAddress: r.vals.String("kcp-front-address"),
ReadyTimeout: r.readyTimeout, Unit: unit, Log: r.a.log}
ReadyTimeout: r.readyTimeout, Unit: unit, Log: r.a.log, OpsReadSecretFile: r.vals.String("ops-read-secret-file")}
if err := bidder.RunCore(ctx, cfg, m); err != nil {
if errors.Is(err, context.Canceled) {
return exitOK
cmd/socialweb-computer/install.go+1−1
@@ -23,7 +23,7 @@ import (
)
var installOptions = []string{backendOpt, "handle", "account", "state-dir", "vm-slots", "dry-run", "adopt-account", "json", "root", "unit-prefix", "allow-dev-binary",
install.OptKcpFront, install.OptTLSFront, install.OptCertFront, install.OptSpecFile, install.OptBidderSpecFile, install.OptNetworkFile, install.OptGuestImg, install.OptGuestImgBase, install.OptReadyTimeout, install.OptNetworkTimeout, install.OptNoGuestLANUDP, install.OptGuestHostUDP, install.OptBidderPolicy, install.OptBidderOperator, install.OptComputeKinds, install.OptCPUOvercommit, install.OptVMM}
install.OptKcpFront, install.OptTLSFront, install.OptCertFront, install.OptSpecFile, install.OptBidderSpecFile, install.OptNetworkFile, install.OptGuestImg, install.OptGuestImgBase, install.OptReadyTimeout, install.OptNetworkTimeout, install.OptNoGuestLANUDP, install.OptGuestHostUDP, install.OptBidderPolicy, install.OptBidderOperator, install.OptComputeKinds, install.OptCPUOvercommit, install.OptVMM, install.OptOpsReadSecret}
var installRequesterOptions = []string{backendOpt, "name", "account", "state-dir", "dry-run", "adopt-account", "json", "root", "unit-prefix", "allow-dev-binary",
install.OptReadyTimeout, install.OptNetworkTimeout}
cmd/socialweb-computer/main.go+2−1
@@ -25,6 +25,7 @@ import (
"github.com/johnandersen777/socialweb-computer-kcp/internal/gatewaymain"
"github.com/johnandersen777/socialweb-computer-kcp/internal/hostcontract"
"github.com/johnandersen777/socialweb-computer-kcp/internal/hostsvc"
"github.com/johnandersen777/socialweb-computer-kcp/internal/kit/logx"
"github.com/johnandersen777/socialweb-computer-kcp/internal/providermain"
"github.com/johnandersen777/socialweb-computer-kcp/internal/tenantcredentialmain"
"github.com/johnandersen777/socialweb-computer-kcp/internal/vaultmain"
@@ -171,7 +172,7 @@ func run(ctx context.Context, args []string, env clicfg.Env, stdout, stderr io.W
return exitRefused
}
a := &app{env: env, stdout: stdout, stderr: stderr, spec: spec, config: config, goos: goos, goarch: goarch,
log: slog.New(slog.NewJSONHandler(stderr, nil)).With("service", serviceName)}
log: slog.New(logx.NewTee(slog.NewJSONHandler(stderr, nil))).With("service", serviceName)}
if err := assets.Ready(); err != nil {
fmt.Fprintf(stderr, "%s: %v\n", serviceName, err)
return exitRefused
deploy/check.sh+2−0
@@ -65,6 +65,8 @@ 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)"
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/acceptance/0001-auth-modes.md+1−1
docs/acceptance/0004-vm-atirc-agent.md+2−1
docs/acceptance/0013-mixed-prod.md+4−2
docs/acceptance/0014-accept-fallback.md+1−1
docs/acceptance/0020-bidder-follows-release.md+3−1
docs/plans/0040-release-pipeline.md+319−21
docs/plans/0041-after-the-pipeline.mdnew+41−0
docs/security/proposed-controls.md+10−0
docs/ci-debug.md+97−9
docs/SYSTEM.md+27−0
internal/atproto/release/zz_generated.lexicons.go+1−0
internal/clicfg/options.json+5−0
internal/contract/opsread/opsread.gonew+291−0
internal/controllers/opsread/opsread.gonew+182−0
internal/devcore/devcore.go+34−0
internal/install/install.go+2−1
internal/kit/logx/tee.gonew+66−0
internal/market/requester/market.go+25−2
internal/market/requester/runner.go+2−2
internal/opsread/hostread/hostread.gonew+442−0
442 lines changed: not loaded until asked for.
internal/services/bidder/routes.go+9−0
internal/services/bidder/service.go+5−0
internal/services/opsread/routes.gonew+234−0
internal/services/sshserver/config.go+6−0
internal/services/sshserver/service.go+2−0
internal/stack/bidder/core.go+6−4
internal/stack/componentcore/componentcore.go+14−2
internal/stack/componentcore/controllers.go+2−0
lexicons/com/fedfork/exec/ops/getBidder.jsonnew+167−0
lexicons/com/fedfork/exec/ops/getHealth.jsonnew+82−0
lexicons/com/fedfork/exec/ops/getLog.jsonnew+121−0
lexicons/com/fedfork/exec/ops/getRequesterLog.jsonnew+81−0
lexicons/com/fedfork/exec/ops/getVm.jsonnew+198−0
lexicons/com/fedfork/exec/ops/getVmMemory.jsonnew+58−0
lexicons/com/fedfork/exec/ops/listVms.jsonnew+144−0
lexicons/software/release/version.json+5−0
scripts/check-entries.sh+2−2
scripts/check-shards.shnew+29−0
scripts/ci-check-wait.shnew+52−0
scripts/ci-prod-target.sh+41−30
scripts/ci-staging-total.shnew+40−0
scripts/ci-test-workflow.yml.tmplnew+52−0
scripts/ci-test-workflows.shnew+31−0
scripts/ci-test.sh+36−7
scripts/promote.sh+89−22
tests/compositions/staging/accounts.sh+2−1
tests/compositions/staging/gateway.sh+5−3
tests/compositions/staging/README.md+17−13
tests/compositions/staging/suite.sh+2−1
tests/host/src/main.rs+13−4
tests/host/src/more.rs+40−6
tests/host/src/ops.rsnew+230−0
tests/host/src/swc.rs+4−0
tests/modules/acc-0001/src/lib.rs+1−1
tests/modules/acc-0003/src/lib.rs+27−5
tests/modules/acc-0004/src/lib.rs+9−8
tests/modules/acc-0005/src/lib.rs+9−2
tests/modules/acc-0007/src/lib.rs+17−2
tests/modules/acc-0013/src/lib.rs+9−8
tests/modules/acc-0020/src/lib.rs+11−5
tests/modules/staging/src/lib.rs+104−73
tests/modules/staging/module.json+11−5
tests/testkit/src/target.rs+19−0
tests/testkit/README.md+1−1
tests/entries.txt+48−45
tests/gate.sh+38−8
tests/publish-test-host.sh+1−1
.plans.yaml+17−1
AGENTS.md+14−13