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

socialweb.computer/socialweb-computer-kcp

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

1 collaborator
0
0

prod gate as r2 with SWC_REPO (finding 89)

Merged johnandersen777.bsky.social asked to merge into main from socialweb.computer/socialweb-computer-kcp:gate-r2
docs/plans/0044-ci-by-hand.md+1−0
@@ -393,6 +393,7 @@ everything and exits (finding 5). If its cleanup reports errors (`cleanupErrors`
| 86 | Hand cycle 66c4eea7, `up` FAIL: `marketnetwork: the MarketNetwork was not Ready within 20m0s (phase Provisioning: the network's IngressProxy/http on 127.0.0.1:32922: listen tcp 127.0.0.1:32922: bind: address already in use)`. Read on the frozen atproto VM 20 min later: nothing bound 127.0.0.1:32922 (`ss -tan`), the network still Provisioning with that message. Cause: the loopback forwards' bind error (`bindForwards`) was written as status and returned no error (`p.write`), so the root never reconciled again: a moment's conflict (the controller set up again while the old one's forward still held the port, finding 30's class: APIExports served again at 10:30:27) stuck the network for good. Fix: `p.retry` (the runtime's backoff) | fixed |
| 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 |
## Runs
scripts/promote.sh+9−3
@@ -46,8 +46,14 @@ done
spec="$(cat "$home/requester.spec")"
jq --arg b "$spec" '.requester = $b | .accounts.r2 = {handle: "", did: "", guestRequester: true}' tests/targets/prod.json > "$home/target-prod.json"
if [ -n "${ATIRC_AGENT_CONFIG:-}" ]; then
(umask 077 && printf '%s\n' "$ATIRC_AGENT_CONFIG" > "$d/agent-config.toml")
jq --arg c "$d/agent-config.toml" '.agentConfig = $c' "$home/target-prod.json" > "$home/target-prod.json.part" && mv "$home/target-prod.json.part" "$home/target-prod.json"
(umask 077 && printf '%s\n' "$ATIRC_AGENT_CONFIG" > "$home/agent-config.toml")
chown r2 "$home/agent-config.toml"
jq --arg c "$home/agent-config.toml" '.agentConfig = $c' "$home/target-prod.json" > "$home/target-prod.json.part" && mv "$home/target-prod.json.part" "$home/target-prod.json"
fi
unset ATIRC_AGENT_CONFIG
GATE_HOST=$PWD/tests/target/release/swc-test-host GATE_ACCOUNTS=r2 bash tests/gate.sh "$home/target-prod.json"
chown r2 "$home/target-prod.json"
# as scripts/ci-test.sh runs the staging suite: as the guest requester r2, the checkout as SWC_REPO (a prebuilt test host's
# own source path is the build host's), the binary under test and meshd that ci-test.sh host and binary installed
runuser -u r2 -- env HOME=/home/r2 XDG_RUNTIME_DIR="/run/user/$(id -u r2)" SWC_REPO="$PWD" SWC_BINARY="$home/swc-under-test" \
SWC_MESHD=/usr/local/bin/socialweb-meshd CI=1 GATE_HOST="$PWD/tests/target/release/swc-test-host" GATE_ACCOUNTS=r2 \
bash tests/gate.sh "$home/target-prod.json"