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

socialweb.computer/socialweb-computer-kcp

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

1 collaborator
0
0
18 lines · 1.3 KB Raw History
#!/usr/bin/env bash
# One pins source (plan 0040 step 20): the requester repo's scripts/publish-chain.sh writes the atlibs pin set
# (atlibs pins.json) to com.fedfork.exec.pins/atlibs of three accounts: john's (the owner of the published compositions),
# alice's (the CI identity: a runner reads a binding's pins from the binding's owner) and socialweb.computer's (the owner of
# this repository's CI bindings). It skips alice's and socialweb.computer's when their credentials file is not on the host,
# so the three can part. This reads the three records as anyone can (the handle to its DID, the DID to its PDS,
# com.atproto.repo.getRecord; no credential, nothing written) and fails unless they are equal apart from createdAt.
# Run it after a publish; deploy/check.sh runs it too.
#   scripts/check-pins-records.sh [<handle or did> ...]
set -euo pipefail
cd "$(dirname "$0")/.."
owners=("$@")
[ "${#owners[@]}" -gt 0 ] || owners=(johnandersen777.bsky.social aliceoa.bsky.social socialweb.computer)
go run ./hack/pinsrecords atlibs "${owners[@]}" 2> >(grep -v '^exit status' >&2) || {
  echo "check-pins-records.sh: the com.fedfork.exec.pins/atlibs records of ${owners[*]} are not one pin set (publish again: the requester repo's scripts/publish-chain.sh, with every credentials file)" >&2
  exit 1
}
echo "check-pins-records.sh: ok ${#owners[@]} pins records equal"