0
0
plan 0052; 0001/0015 owner changes; deploy.sh verified ship (finding 90)
docs/acceptance/0001-auth-modes.md+1−1
| @@ -721,7 +721,7 @@ ssh hat-9 "sudo -n -u swc-bidder env HOME=/var/lib/socialweb-computer/swc-bidder | ||
sudo -n -u swc-bidder env HOME=/var/lib/socialweb-computer/swc-bidder KUBECONFIG=$LOCAL_K \ | ||
kubectl wait --for=condition=Ready bidders.socialweb.computer/bidder --timeout=120s | ||
| ||
Scale down one replica at a time, 3 -> 2 -> 1 -> 0. Each step must remove | ||
Scale down one replica at a time, 3 -> 2 -> 1 -> 0 (by hand with three bidders; composition `0001:run` scales 1 -> 2 -> 1 -> 0: staging runs two bidders). Each step must remove | ||
exactly one node and release exactly one VM before the next step starts: | ||
| ||
```bash | ||
docs/acceptance/0015-vm-memory.md+1−1
| @@ -27,7 +27,7 @@ cd compositions/0015 && deno run -A --no-lock compose.ts > composition.json && c | ||
SWC_TARGET=$PWD/targets/prod.json cargo run -p swc-test-host -- compositions/0015 --account bob | ||
``` | ||
| ||
Inputs (`--input '{...}'`): `cpus` (default "2"), `mem` ("2G"), `pct` (95), `seconds` (300). | ||
Inputs (`--input '{...}'`): `cpus` (default "2"), `mem` ("2G"), `pct` (95), `seconds` (10). | ||
| ||
1. `run request --hold --cpus 2 --mem 2G --expires-in 1h`; Held, the winner is the receipt's author | ||
2. Over `run request ssh`: `/var/tmp/memfill.sh` detached. It records the boot id, holds `MemAvailable - (100 - pct)% | ||
docs/plans/0044-ci-by-hand.md+1−0
| @@ -394,6 +394,7 @@ everything and exits (finding 5). If its cleanup reports errors (`cleanupErrors` | ||
| 87 | Hand cycle 4c59f2fd, `bidder-2:install` FAIL `error: connection lost`. bidder-2's guest journal (first boot 10:55:58): the install session (sshd[2615], 10:56:27) closed at 10:57:33, the second the guest's `iroh.service` (dumbpipe listen-tcp in front of sshd) exited 0 with `iroh::socket: Endpoint dropped without calling Endpoint::close`, no signal, nothing else logged before it; the unit restarted it at 10:57:38. Why dumbpipe's accept loop returned is in the pinned upstream dumbpipe (open). The module failed the whole run on one dropped session: the VM install (idempotent: getent/id checks, subuid reset, apt, the binary fetched and checked again) now runs again after 10 s on `connection lost`, 3 times at most (`readings.installRetries`) | fixed (the retry); dumbpipe's exit open | | ||
| 88 | main 17e94feb, the first green test into promote: rc172 written, `rc` moved, the droplets deployed, every rc operator's bidder followed (hat-8: `releasefollow_seen` rc172, upgraded and running 17e94feb in 3 s; all four heartbeat its sha256), then the prod gate: `sh: 1: cargo: not found`, rc172 red, `rc` back to rc171, the droplets back. Cause: `tests/gate.sh` always built the test host and the module wasm with cargo; the release VM has none, and `scripts/ci-test.sh host` had put the prebuilt ones there. Fix: `GATE_HOST` names a prebuilt host (no build); promote.sh passes `tests/target/release/swc-test-host` | fixed | | ||
| 89 | main 9bbe24cd promote: rc173 written, droplets deployed, all four bidders followed it; then every gate entry `exit 101` at once (a test host panic). Reproduced on hat-8 with the published test host of that tests/ tree: `testkit/src/lib.rs:41: Result::unwrap() on Err PermissionDenied` in `testkit::repo()`, which without `SWC_REPO` canonicalizes the build host's own source path (`CARGO_MANIFEST_DIR`). `ci-test.sh staging` sets `SWC_REPO` and runs the host as r2 with `SWC_BINARY` and `SWC_MESHD`; promote.sh ran gate.sh as root with none. Fix: promote.sh runs the gate the same way (r2, `SWC_REPO=$PWD`, the binary and meshd ci-test.sh installed, the target and the agent config owned by r2) | fixed | | ||
| 90 | main d6fe2876 promote: rc175 red right after `deploy: shipping ... to root@socialweb.computer`, no error line; the gateway held `incoming-8b7e518e...` of 294813696 bytes (the binary is 589 MB) under its full name. Cause: when the ssh connection drops mid-transfer, sshd ends the remote `cat` with EOF (exit 0), so `chmod` and `mv` still ran and a truncated copy was installed under the binary's sha256; the local ssh exited 255 and deploy.sh stopped. Fix: the remote checks the copy against its sha256 before the move, and the ship is tried 3 times (10 s apart); rehearsed against the gateway with a 10 MB file (right sha: moved, exit 0; wrong sha: exit 1, left `.partial`); the truncated file removed | fixed | | ||
| ||
## Runs | ||
| ||
docs/plans/0052-acceptance-coverage.mdnew+76−0
| @@ -0,0 +1,76 @@ | ||
# 0052 - Acceptance coverage: every entry, where it runs, its last pass | ||
| ||
Status: plan | ||
| ||
## Why | ||
| ||
The objective is every acceptance entry passing. The entries live only in `tests/gate.sh` (`all=`) and the runbooks; no plan | ||
tracked them, so CI's staging suite ran 17 of 44 while it was called green. This plan is the one list: each entry, what it | ||
proves, where it runs, its last pass. | ||
| ||
Runs: **S** CI's staging suite (`scripts/ci-test.sh` `input_default`, as staging's own alice: `tests/compositions/staging/suite.sh`), | ||
**P** the CI promote gate (r2: `GATE_R2_ENTRIES` in `scripts/promote.sh`), **G** the full prod gate on hat-8 | ||
(`tests/gate.sh <prod target> --account bob,alice`). Last full G: 2026-11-14 13:44Z, main 4d54b2b4, 33 of 37 PASS (0002:run, | ||
0013:c FAIL; 2 SKIP), `~/.tmp/swc-system-tests/gate/20261114T134403Z`. | ||
| ||
## Entries | ||
| ||
| Entry | Proves | S | P | G | | ||
|---|---|---|---|---| | ||
| 0001:run | tenant cluster on the gateway, kubeconfig + no-expiry revoke, deployment scaled 1 -> 2 -> 1 -> 0, one replica per bidder | - | - | yes | | ||
| 0001:s2 | staging: a temporary oauthQr bidder of its own account Ready (iroh + webrtc), removed after | - | - | yes | | ||
| 0002:run | `ssh <handle>@gateway` rents a VM as the user; `atirc agent run` transient and held | - | - | yes | | ||
| 0003:run | `run request --hold` ssh over WebRTC, fresh and after a restart, no plaintext secrets, released clean | yes | yes | yes | | ||
| 0004:run | agent VM (`--agent`): the owner's mesh node reaches it, it answers, records deleted, DIDs tombstoned | - | - | yes | | ||
| 0005:run | outer VM with guest requester R2 Held on a nested VM; release cascades; R2 tombstoned | yes | yes | yes | | ||
| 0005:b | R2 with a co-located account; outer VM deleted out of band; both DIDs tombstoned | - | - | yes | | ||
| 0005:r2fail | an R2 failed after reporting its DID leaves no live DID | - | - | yes | | ||
| 0006:run | every bidder: identity Ready, policy, 0 ERROR and 0 restarts in its first 10 min | yes | yes | yes | | ||
| 0006:compat | the previous rc's CLI rents and releases against the new servers | - | - | yes | | ||
| 0007:run | a VM deleted on its bidder: gone in 2 min, vm.terminated pinned, records deleted | yes | yes | yes | | ||
| 0007:restart | staging: the bidder core restarted in place under a Held VM, its unit unchanged | yes | yes | yes | | ||
| 0008:run | a VM's timeline on its host, release, vm.terminated, records gone, orphan check on every host | yes | yes | yes | | ||
| 0009:run | the browser page rents per bidder over webrtc, a shell over the datachannel, nothing left | - | - | yes | | ||
| 0010:run | iOS app requester | - | - | SKIP (iOS paused, owner) | | ||
| 0011:run | atirc deploy gates (binary, /chat, unauthenticated revoke 401) | - | - | yes | | ||
| 0011:token | a minted atirc token posts; refused after revoke | - | - | yes | | ||
| 0012:run | every examples/infra file dry-runs; VM, Deno sandbox, restart while Held; deletes remove every record | yes | yes | yes | | ||
| 0013:run | long-lived requester: vm1 (iroh + webrtc), sbx1, agent1 (association, answer); restart; clean delete | yes | yes | yes | | ||
| 0013:c | `run requester --with-gateway`: a cluster, a k8s workload on a market node, scale to zero | - | - | yes | | ||
| 0013:b | staging: `install requester` as root, Ready, DID kept across a restart, purge | - | - | yes | | ||
| 0014:run | more rentals than room: 409 CapacityExceeded, next bid, new RFP | yes | yes | yes | | ||
| 0014:concurrent | fillers plus four concurrent rentals all placed | yes | yes | yes | | ||
| 0014:exhausted | all rentals but one Held, never on a refusing bidder | yes | yes | yes | | ||
| 0014:giveup | bidders full: waits in rounds, fails at its deadline | - | - | yes | | ||
| 0014:wait | bidders full: waits; placed once a filler frees a slot | - | - | yes | | ||
| 0014:impossible | a request no bidder can take fails fast with the reason | - | - | yes | | ||
| 0014:abandon | an accept whose record is gone: bounded retries, abandoned, one line | - | - | yes | | ||
| 0014:backtoback | 6 VMs one after another on one bidder, every one Held | yes | yes | yes | | ||
| 0014:overcommit | CPU overcommit capacity honoured exactly | - | - | yes | | ||
| 0015:run | a VM fills ~95% RAM and fsyncs for 10 s and survives (no OOM, no reboot) | - | - | yes | | ||
| 0015:pressure | memory-pressure events fire once per crossing and re-arm | yes | yes | yes | | ||
| 0016:run | a VM boots the requester-chosen image, marker verified | yes | yes | yes | | ||
| 0016:badsha | a wrong image sha256 is refused by every bidder | yes | yes | yes | | ||
| 0016:bigmarker | a large image marker works | - | - | yes | | ||
| 0017:run | a separate release while the owner holds an interactive ssh session: Released in 60 s | - | - | yes | | ||
| 0017:killed | the owner killed inside the release: it still settles | - | - | yes | | ||
| 0017:killedlate | the owner killed while stopping after Released: summary Released | - | - | yes | | ||
| 0017:half | a half-ended invocation is not released by mistake | - | - | yes | | ||
| 0017:devsup | 12x `dev down` SIGKILLed then `dev up` at once: every kcp ready | - | - | yes | | ||
| 0017:samename | two instances of one name in two state dirs are independent | - | - | yes | | ||
| 0018:run | staging: a tampered downloads tree or build record is healed or refused | - | - | yes | | ||
| 0019:run | a rental's bidderDids filters discovery, never replaces it | yes | yes | yes | | ||
| 0020:run | staging: an installed bidder follows the rc channel to A, then B | yes | yes | yes | | ||
| ||
## Steps | ||
| ||
1. 0001:run scales 1 -> 2 -> 1 -> 0 (staging runs two bidders); 0015:run fills for 10 s (owner, 2026-11-17). | ||
2. A hand cycle on staging with all 44 entries (S for everything): each FAIL root-caused and fixed, findings in plan 0044. | ||
3. CI's staging suite (`input_default`) becomes every entry that passed in step 2; any entry left out is named here with its | ||
evidence. | ||
4. The full prod gate (G) on the current prod rc; each FAIL root-caused and fixed. | ||
5. Each entry's last pass (date, commit, S/P/G) in this table, kept current. | ||
| ||
## Order | ||
| ||
1. Step 1, then step 2 (a hand cycle), then step 3 (CI), then step 4. | ||
scripts/deploy.sh+10−1
| @@ -52,7 +52,16 @@ fi | ||
| ||
INCOMING="/var/lib/socialweb-computer/incoming-${SHA256}" | ||
say "shipping $BINARY ($SHA256) to $SSH_TARGET" | ||
ssh "${SSH_OPTS[@]}" "$SSH_TARGET" "install -d -m 0755 /var/lib/socialweb-computer && cat > $(q "$INCOMING.partial") && chmod 0755 $(q "$INCOMING.partial") && mv $(q "$INCOMING.partial") $(q "$INCOMING")" < "$BINARY" | ||
# a dropped connection ends the remote cat with EOF (exit 0): the copy is checked against its sha256 before it is moved into | ||
# place, and shipped again (3 tries) | ||
for try in 1 2 3; do | ||
if ssh "${SSH_OPTS[@]}" "$SSH_TARGET" "install -d -m 0755 /var/lib/socialweb-computer && cat > $(q "$INCOMING.partial") && echo $(q "$SHA256 $INCOMING.partial") | sha256sum -c --quiet && chmod 0755 $(q "$INCOMING.partial") && mv $(q "$INCOMING.partial") $(q "$INCOMING")" < "$BINARY"; then | ||
break | ||
fi | ||
[ "$try" = 3 ] && { say "shipping $BINARY failed 3 times"; exit 1; } | ||
say "shipping $BINARY failed (try $try); again in 10 s" | ||
sleep 10 | ||
done | ||
if [ -n "$GATEWAY_ENV_FILE" ]; then | ||
say "shipping $GATEWAY_ENV_FILE as $STATE_DIR/gateway.env" | ||
ssh "${SSH_OPTS[@]}" "$SSH_TARGET" "cat > $(q "$INCOMING.env")" < "$GATEWAY_ENV_FILE" | ||
tests/modules/acc-0001/src/lib.rs+2−2
| @@ -1,13 +1,13 @@ | ||
// docs/acceptance/0001-auth-modes.md sections 3-6 on the gateway: a tenant cluster, /readyz through the kubeconfig's | ||
// /clusters/... path, a no-expiry kubeconfig and its revoke over xrpc and on the k8s page (/api with Origin), then a | ||
// deployment with required pod anti-affinity scaled 1 -> 2 -> 3 -> 2 -> 1 -> 0, each replica on its own node; per step | ||
// deployment with required pod anti-affinity scaled 1 -> 2 -> 1 -> 0 (at most two replicas: staging runs two bidders), each replica on its own node; per step | ||
// the gateway requester's VMs on the bidders the host reaches and each released VM's vm.terminated. Discovery only. | ||
use abi::{Call, Event, Handle, Run, entries}; | ||
use serde_json::{Value, json}; | ||
use steps::{MIN, S, VM_TERMINATED, get_record, host, kube, names, out, ready_pods, termination_rkey}; | ||
| ||
const N: &str = "com.publicdomainrelay.temp.cluster."; | ||
const STEPS: [usize; 6] = [1, 2, 3, 2, 1, 0]; | ||
const STEPS: [usize; 4] = [1, 2, 1, 0]; | ||
const DEPLOY: &str = r#"apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
tests/modules/acc-0015/src/lib.rs+2−2
| @@ -1,5 +1,5 @@ | ||
// docs/acceptance/0015-vm-memory.md: this run's own VM fills ~95% of its RAM (incompressible) and writes with fsync for | ||
// 5 min; the VM lives through it: its contract stays Held, no vm.terminated, the guest never reboots, its ComputeVM is not | ||
// 10 s; the VM lives through it: its contract stays Held, no vm.terminated, the guest never reboots, its ComputeVM is not | ||
// Lost (OOMKilled). Then it is released and every record is gone. Prod and staging (it touches only its own VM). | ||
mod pressure; | ||
| ||
| @@ -76,7 +76,7 @@ fn run_0015(run: Run<Value>) -> Result<Handle, String> { | ||
return Ok(h); | ||
} | ||
let name = args["name"].as_str().ok_or("name")?.to_string(); | ||
let secs = args["seconds"].as_u64().unwrap_or(300); | ||
let secs = args["seconds"].as_u64().unwrap_or(10); | ||
let pct = args["pct"].as_u64().unwrap_or(95); | ||
let winner = s.st["winner"].as_str().unwrap_or_default().to_string(); | ||
let receipt = s.st["receipt"].as_str().unwrap_or_default().to_string(); | ||