stansite #
An atproto labeler for account signals derived from standard.site publications. The values match panoptiblog's account rows, so the labeler and the rankings page describe an account the same way.
It serves com.atproto.label.queryLabels, com.atproto.label.subscribeLabels,
/.well-known/did.json and /health. Labels are signed with a secp256k1 key
and are informational; nothing here blurs or hides content.
Running #
npm --prefix labeler install
LABELER_DID=did:web:labeler.test \
LABELER_SIGNING_KEY=<hex> \
LABELER_PDS=https://pds.test \
PANOPTIBLOG_DATA_FILE=../scripts/panoptiblog/out/panoptiblog.json \
PORT=3000 \
node labeler/src/server.mjs
The dataset comes from PANOPTIBLOG_DATA_URL (the published accounts.json, which
carries every account the percentiles are computed against) or
PANOPTIBLOG_DATA_FILE for a local run. It is re-read every fifteen minutes;
labels that disappear are emitted as negations.
Provisioning #
The deployment is gated by labeler_enabled in infra/labeler.tf. Before
enabling it:
- Generate a secp256k1 key. Keep the private key out of this repository and put its hex in a Secrets Manager secret.
- Choose a
did:webidentity whose host serves this service. The default isdid:web:stansite.substandard.blog; the service answers its DID document at/.well-known/did.jsonwith the public key derived from the signing key. - Set
labeler_pdsto the PDS that hosts the labeler account's repository. - Set
labeler_pds,labeler_signing_key_secret_arnandlabeler_enabled = trueininfra/terraform.tfvars.json, then runlabeler/deploy.sh. - Publish the service record with
npm --prefix labeler run publish-service-recordonce the DID document answers. The record declares every value the service emits.
The DID document, the account's repository and the service record are three different things. The service owns the first, the PDS owns the second, and the publish script writes the third.
Key handling #
LABELER_SIGNING_KEY is read from the environment and used only to sign. The
service never writes it, prints it or derives the DID document from a separate
public key: the multibase in the DID document is derived from the same key.
Limits #
- Label history is in memory. A restart begins a new sequence, so a client
resuming an old cursor gets
FutureCursorand must start from zero. queryLabelspaginates with an index cursor. A client only has to return the cursor it was given.- The label set is a snapshot of the published dataset; the account rows are recomputed by the indexer, not here.