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

socialweb.computer/socialweb-computer-kcp

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

1 collaborator
0
0
50 lines · 3.9 KB Raw History
# 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, 0007:upgrade,
# 0014:*, 0014:memfit among them) is alone on it. The step prints its RESULT lines and `gate: staging: N of 47 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
  # 46 entries on one network: about 2 h 45 min with the stand-up for the 45 before 0007:upgrade (plan 0040, Finding "Gate shards": 9123 s of gate on two
  # bidders, and 0014:memfit's 178 s), plus 0007:upgrade alone (the 900 in tests/entries.txt is an ordering hint; its bounds are the module's 60 min
  # timer and the 300 s wait in the guest); 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