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

socialweb.computer/socialweb-computer-kcp

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

1 collaborator
0
0
75 lines · 5.8 KB Raw History
# 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 and alice, and `promote.sh prepare` exits 1 on a VM that has one and makes
# 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 and alice; 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
# 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 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
#                                 (bob and alice are the gate's only drivers: owner, 2026-11-19)
#   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)
#   SPACES_ACCESS_KEY_ID          the bucket key (release's, the same two values): the copy of main/<sha>/ to releases/vT/
#   SPACES_SECRET_ACCESS_KEY      only; scripts/promote.sh takes them out of the environment at its start and gives them
#                                 to scripts/copy-spaces.ts alone
# 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:
  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/main]
runners: [aliceoa.bsky.social]
after: [release, test]
executor: release
superseded: finish
secrets:
  - PROD_DEPLOY_SSH_KEY
  - ATIRC_AGENT_CONFIG
  - PROD_ALICE_ATPROTO_PASSWORD
  - PROD_BOB_ATPROTO_PASSWORD
  - PROD_OPS_READ_SECRET
  - SPACES_ACCESS_KEY_ID
  - SPACES_SECRET_ACCESS_KEY
# 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:
  # 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