~ knotless Search/
โ†‘โ†“ moveโ†ต openโ‡งโ†ต all results

socialweb.computer/socialweb-computer-kcp

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

1 collaborator
0
0
277 lines ยท 23.4 KB Raw History

0053 - computer.socialweb: rename the NSIDs, publish the lexicons, lexicons as the one docs source

Status: plan. NOT in flight: it starts when plan 0040 is done (its Done when: two consecutive green CI promote rolls). Owner, 2026-11-19: "after we hit two stable CI/CD rolls we're going to s/com.publicdomainrelay.temp/computer.socialweb/g and publish using goat lex publish", and "Do you need to write a plan doc for that and the docs work?". Facts below read on main 4d40ce34 (2026-11-19) unless said. Scratch: ~/.tmp/plan-nsid/.

Why

Our NSIDs sit under a .temp name nobody can resolve. Rename them to computer.socialweb.*, publish them from the socialweb.computer account, and keep the lexicon files the one source of the lexicon docs.

Owner decisions

All 2026-11-19, verbatim.

  1. "after we hit two stable CI/CD rolls we're going to s/com.publicdomainrelay.temp/computer.socialweb/g and publish using goat lex publish". This plan does not start before plan 0040's Done when.
  2. "well publishing doesn't freeze the schemas until anyone is using them and right now you are the only user". So publishing is not a freeze. Evolution rules do not block publishing, and goat lex breaking is not a gate. We can change a lexicon and publish it again (--update).
  3. ".temp drops everywhere": com.publicdomainrelay.temp.X -> computer.socialweb.X and computer.socialweb.temp.X -> computer.socialweb.X.
  4. "we don't own software.release, that stays."
  5. "com.fedfork.exec stays - that's atlibs stuff which is distinct from compute contracts".
  6. "we own com.fedproxy,*, we don't won link.ident or network.attested". link.ident.* and network.attested.* keep their names. We never publish them, and lexicons/link, lexicons/network are third-party schemas we carry.
  7. "socialweb.computer account publishes obviously because that's the s/.../.../g we're doing in that plan".
  8. "rename reaches all sibling repos - everything we own/maintain. com.fedproxy.* is out of scope for this plan." We do not rename forks of upstreams we do not own; their patches stay on our fork branches.

com.fedproxy.* is out of scope (decision 8). This plan does not rename or publish it.

Facts

A. Scope on main

  • lexicons/ has 83 files (find lexicons -name '*.json' | wc -l). Each file's id matches its path:
    • 57 under com/publicdomainrelay/temp: 42 records, 11 procedures, 2 queries and 2 subscriptions. One record, market.heartbeat, uses key literal:self. The other 41 use key any.
    • 9 under computer/socialweb: infra, ephemeralInfra, peer, ingress.{answer,listen,offer}, mesh.roster, k8s.{getJob,kubectlApplyServerSide}.
    • 7 com.fedfork.exec.ops.*, 5 software.release.*, 3 network.attested.*, 1 link.ident.endorsement, 1 com.atproto.repo.strongRef.
  • computer.socialweb.temp.* has no lexicon file on main. Code uses policy.ghalite (28 lines), policy.typescript (19), policy.wasm (3), probe (1, docs/ARCHITECTURE.md:10991) and compute.vm (1, a test URI, internal/policyengine/spec/engine_test.go:80), in 24 files.
  • git grep -l 'com\.publicdomainrelay\.temp' swc/main | wc -l gives 175 files and 1012 lines. With computer\.socialweb\.temp added it is 180 files and 1056 lines. By directory: lexicons 58, docs 41, internal 20, tests 18, site 10, deploy 10, scripts 4, typescript-helpers 3, did-key-associator 3, rust 1, api 1, examples 1, plus 5 root files.
  • History holds 32 lines in 15 files (docs/plans/0001-0039, NEXT.yaml, docs/research).
  • Constants and literals:
    • Go defines the names as constants: internal/atproto/market/nsid.go (35), internal/atproto/oauth/scope.go (46, the OAuth collections) and api/v1alpha1/types_contractevent.go (8).
    • Some prefixes are matched, not just named: internal/eventstream/addressees.go:23,112 (temporaryNSIDPrefix = "com.publicdomainrelay.temp."), internal/xrpcserver/xrpcserver.go:34, internal/guestagent/wire.go:4, internal/atproto/market/nsid.go:50.
    • Generated files: internal/atproto/market/zz_generated.lexicons.go (126), did-key-associator/generated/oauth-scope.js (from typescript-helpers/lib/oauth-scope/mod.ts, 49), internal/identlink/vectors.json (71, hack/identlinkvectors).
    • Literals: Rust in 17 files under tests/ and rust/, 4 shell scripts (scripts/promote.sh:115 is the heartbeat collection), and 55 lines each in deploy/testaccounts/{alice,bob}/identity.yaml (scopes).
  • OAuth scopes: repo:<collection>?action=... and rpc:<nsid>?aud=*. Sources: internal/atproto/oauth/scope.go (RequesterOAuthScope, used by the page, iOS and run request: deploy/testaccounts/alice/identity.yaml:22), internal/app/compose/atprotoscope.go:31 and typescript-helpers/lib/oauth-scope/mod.ts (@publicdomainrelay/oauth-scope). A session keeps the scopes it was granted, so every OAuth session must consent again. CI signs in with main passwords (AGENTS.md:885), and those sessions carry no scope.
  • kcp schema: deploy/contractevent-apiresourceschema.yaml:48 is an enum of guest NSIDs under v1alpha1-5.contractevents. APIResourceSchema.spec is immutable (docs/ARCHITECTURE.md:997), so the rename bumps ContractEvent's Revision (api/v1alpha1/resources.go:140, 5 to 6).
  • Firehose filters: clients name collections in wantedCollections (internal/atproto/relay/filter.go:33), and the bidder routes by NSID prefix (AGENTS.md:593). Both ends change in the same commit.
  • Ingress relay: xrpc.fedproxy.com runs this repo's binary (socialweb-computer internal ingress-relay), deployed by hand with scripts/deploy-xrpc-relay.sh (docs/infra/FEDPROXY.md:29,143). It sends keepalives to /xrpc/com.publicdomainrelay.temp.keepalive.ping (internal/atproto/ingress/protocol.go:22, server.go:832), and atlibs-fedproxy answers them (modules/ingress/src/lib.rs:67). That path is in the substitution. Its com.fedproxy.temp.xrpc.* NSIDs are not.
  • Policy bundle: internal/policyengine/bundled-actions/tangy/policy-bid-payload/dist/index.js is built from @publicdomainrelay/policy-deno-typescript. It has to be rebuilt.
  • Release records: software.release.* stays (decision 4). The heartbeat (market.heartbeat) is renamed.
  • Collisions after both substitutions: one, by design. The test URI computer.socialweb.temp.compute.vm becomes computer.socialweb.compute.vm, the renamed com.publicdomainrelay.temp.compute.vm. Nothing else collides: none of the 57 renamed ids equals one of the 9 existing ones, and no computer.socialweb.policy.* or .probe exists (comm of the id lists, ~/.tmp/plan-nsid/).
  • Names used with no lexicon file on main: auth.allowlist.rbacDid, compute.config.wif.simple, compute.secrets.getSecrets, market.policies.denoWorker, market.bidderAssociation, keepalive.ping, requester.associateConfirm, meshRoster (rust/socialweb-meshd/tests/standalone.rs), computer.socialweb.temp.policy.{ghalite,typescript,wasm}, .probe. Only in docs: agent.class, agent.skill (docs/protocol/compute-contract-flow-map.md:55), cluster.setPublishInfra (history).
  • Branch lexicons-fix (worktree wt-lexicons, on 888df03f, uncommitted) adds 6 files (auth/allowlist/rbacDid, compute/config/wif/simple, compute/secrets/getSecrets, market/policies/denoWorker, computer/socialweb/temp/policy/{ghalite,typescript}) and changes 6 (market/submit{Accept,Bid,Event,Rfp}, software/release/{defs,manifest}).
  • Sibling repos we own (local checkouts, git -C <repo> grep -l -E 'com\.publicdomainrelay\.temp|computer\.socialweb\.temp' | wc -l; knotless lists from knotless repo list johnandersen777.bsky.social and socialweb.computer):
    • atlibs 20: its com.fedfork.exec lexicons attest.json and wasm/module.json, and the binary fixture rust/host/tests/fixtures/profile.car;
    • atlibs-socialweb-computer-requester 53: the release-workload module, the page, and 29 lexicon files. Twenty are copies of kcp's old names. Nine are its own: computer.socialweb.cicd.process.{exec,kill,list,read,start,write}, cicd.workload.run, vm.{provision,release}. It also has old-prefix files kcp lacks: market.evaluatePolicy and requester.associateConfirm;
    • console 14, atirc 12 (tangled), atlibs-socialweb-computer-app 9, atlibs-agents 8, atlibs-identlink 7, watch 4, atlibs-{fedproxy,agent-reference-spa} 3, atlibs-{iroh,webrtc} 2, atlibs-{atirc,market-status,mesh-agents} 1;
    • old or deferred: publicdomainrelay org-root 13, publicdomainrelay/socialweb-computer 13, emdash 9, socialweb-computer-ssh 4, dist-rts-client-web 2, atproto-reverse-proxy 1. 0 mentions: the other ten atlibs-*, asyncai, knotless-fork-infra, the knotless fork. Not checked out here: atirc-ios-client (iOS paused), atssh, knotless-runner-k8s, runner-smoke, vuln-notif, zkwid.
  • Pins: kcp pins the page's requester and atlibs commits (tests/compositions/staging/page-tools.json:4-10, a5dcb508 and f39c7a7) and atlibs through com.fedfork.exec.pins/atlibs (scripts/check-pins-records.sh).

B. What the substitutions give

  • com.publicdomainrelay.temp.market.rfp becomes computer.socialweb.market.rfp, and computer.socialweb.temp.policy.ghalite becomes computer.socialweb.policy.ghalite.
  • These stay: com.fedfork.exec.* (decision 5), software.release.* (4), link.ident.* and network.attested.* (6), com.fedproxy.* (8), com.atproto.*, sh.tangled.*, chat.atirc.*.
  • AGENTS.md has no "NSID namespaces" rule on main. The ownership table is docs/protocol/README.md:44-64. It says "us" for software.release.* and network.attested.*, which decisions 4 and 6 contradict. Step 3 fixes the table and step 9 writes the rule.
  • Once renamed, the old prefix com.publicdomainrelay.temp. in temporaryNSIDPrefix covers every computer.socialweb.* collection, ingress, peer, infra and mesh included. That is a behaviour change, so it goes in its own commit (step 4). Likewise, site/lexref.ts:12-14 FAMILIES would list computer.socialweb twice.

C. goat and the Lexicon spec (goat v0.2.3, ~/Documents/go/bin/goat; spec https://atproto.com/specs/lexicon)

  • Spec: "Lexicon schemas are published publicly as records in atproto repositories, using the com.atproto.lexicon.schema type." and "a record with collection com.atproto.lexicon.schema and record-key edu.university.dept.lab.blogging.getBlogPost" (the record key is the NSID).
  • Spec: "Lexicon resolution of NSIDs is not hierarchical: DNS TXT records must be created for each authority section, and resolvers should not recurse up or down the DNS hierarchy looking for TXT records." The TXT value is did=<did> ("note the did= prefix").
  • Spec on evolution: "Any new fields must be optional ... Types can not change ... If larger breaking changes are necessary, a new Lexicon name must be used." and "At a minimum, public adoption and implementation by a third party ... indicates that the Lexicon has been released". Decision 2 says we are the only user, so the rules do not bind us yet.
  • goat lex publish [--username] [--update] [--skip-dns-check] <file-or-dir>*: it "will only publish lexicons with DNS configured for the current account". It skips a group whose _lexicon DID is not the logged-in DID (lex_publish.go:151-157), and it skips schemas already published unless --update is given (:129-134). With no path it covers all of lexicons/.
  • goat lex status marks each schema: ๐ŸŸข in sync, ๐ŸŸฃ differs, ๐ŸŸ  local only, โญ• remote only (lex_status.go:35-63). check-dns prints the missing TXT records. Both read the network.
  • The account is socialweb.computer, did:plc:gmlkrhimoueejcertevr4hl3: _atproto.socialweb.computer TXT has did=did:plc:gmlkrhimoueejcertevr4hl3, and plc.directory lists alsoKnownAs at://socialweb.computer with PDS brittlegill.us-west.host.bsky.network (also internal/app/marketbidder/marketbidder.go:39). No _lexicon.*socialweb.computer record exists yet.
  • DNS: the nameservers for socialweb.computer are cirrus.mqdns.at, nimbus.mqdns.app and stratus.mqdns.de. No repo doc says who controls the zone, so only the owner can add records.
  • Authorities after the rename. check-dns on a renamed copy of main's lexicons (~/.tmp/plan-nsid/renamed) gives 13 TXT names, each _lexicon.<authority> = did=did:plc:gmlkrhimoueejcertevr4hl3. NSID counts in brackets:
    • socialweb.computer [badgeBlueKeys, infra, ephemeralInfra, peer], cluster. [10], compute. [vm], guest.compute. [subscribeEvents], guest.events.compute. [14], vm.events.compute. [9], ingress. [4], k8s. [2], market. [14], accepts.market., bids.market. and receipts.market. [2 each], mesh. [1];
    • lexicons-fix adds 5: policy., allowlist.auth., wif.config.compute., secrets.compute., policies.market.;
    • the requester's own lexicons add 4 if kcp takes them: process.cicd., workload.cicd., vm., requester.;
    • keepalive. comes too if keepalive.ping gets a lexicon (step 1).
    • Total: 18 to 23 TXT records.
  • The third-party schemas already resolve elsewhere:
    • _lexicon.release.software names did:plc:zimrxnxvvkwixvtkazpx3zfx (release.software). Our 5 copies all differ from what is published there (๐ŸŸฃ). Its defs has no httpArtifact.
    • _lexicon.attested.network names did:plc:cq3w3bw7awp2rkeswfdzoubb (attested.network). Our 3 schemas are not published there (๐ŸŸ ).
    • link.ident has no _lexicon record.
    • With socialweb.computer logged in, publish skips all of these through the DNS check. Paths scope it anyway (step 11).
  • goat lex lint lexicons/ exits 255 on warnings alone: 242 warnings, 0 errors, in 77 of 83 files. By kind: unlimited-string 183 (47 lexicons), missing-primary-description 52 (52), large-string 4 (guest.secrets, vm.sandbox, computer.socialweb.infra), field-name-syntax 1 (compute.vm user_data), nullable-and-optional 1 (market.receipt payload), unlimited-bytes 1 (network.attested.signature, not ours). 62 of the 77 files are ours (54 old-prefix, 8 computer.socialweb); the rest: com.fedfork.exec 7, software.release 5, network.attested 3.

D. Wire compatibility (no backward-compat modes)

  • Collections, XRPC paths, OAuth scopes, ContractEvent enums, relay filters and the ingress keepalive all change in one commit. A renamed binary and an old one cannot talk.
  • 0006:compat runs the previous rc's CLI (SWC_COMPAT_REQUESTER, scripts/release-prev-rc.sh) against the new servers. It fails on the rename roll and passes again from the next roll.
  • 0020:run has its bidder follow the rc channel to A (this build) and then B (default main/bce9465b, docs/acceptance/0020-bidder-follows-release.md:11). After the rename, B has the old heartbeat NSID, so 0020 fails until B is a renamed build.
  • Promote rollback: scripts/promote.sh heartbeats() (:110-122) reads the new heartbeat collection. A rollback to a pre-rename rc writes the old one, so the rollback wait fails even when the bidders really are back.
  • Self-update: bidders follow rc within updateWithin (deploy/release/rc-operators.json). Until every bidder has moved, old bidders stay invisible to new requesters. Prod's gate starts only after every bidder heartbeats.
  • Outside promote: the ingress relay (fedproxy.com), the page (shell.socialweb.computer), qr.fedfork.com (did-key-associator), console, atirc and watch are deployed by hand. Each must go to its renamed build in the same window.
  • Old records under old NSIDs stay in prod repos, unread. AGENTS.md:876-878: "Do not plan migration, carry-over or rollback for a change of shape."

E. Docs

  • Done on main: 888df03f, the site's lexicon and XRPC reference (site/lexref.ts, site/build.ts); 4d40ce34, the generated field tables included in docs/protocol/* and the generated glossary.md.
  • Left: lexicons-fix; the hand-copied tables in docs/protocol/infra.md (107 table lines) and outside.md (90); field notes moved into lexicon descriptions; reference pages linking each published record; a goat lex status check.

Steps

Each step lands through pull and the merge queue only after an out-of-band proof (hat-8 local market, a hand staging cycle per docs/ci-debug.md). Behaviour changes land before the rename and apart from it. Use one code change per CI cycle.

  1. Start once 0040's Done when holds. This plan goes into .plans.yaml as in flight, with its agent.
  2. The lexicon set. Land lexicons-fix. Each name in Fact A with no lexicon file gets one or goes: keepalive.ping and market.bidderAssociation get lexicons, doc-only names leave the docs, meshRoster becomes mesh.roster. Add scripts/check-lexicons.sh to deploy/check.sh --fast (local, no network): every NSID literal in the code must be a lexicon id. Proof: the check passes on main.
  3. Lint. Our 62 files get descriptions, then maxLength or a format on each string, then userData, then receipt.payload made either nullable or optional. If the generated Go changes, run a hand staging cycle. Pin goat as a Go tool. Proof: goat lex lint lexicons/com/publicdomainrelay lexicons/computer exits 0, and the same command runs in deploy/check.sh --fast.
  4. Docs before the rename, so the rename stays mechanical: infra.md and outside.md use the generated tables, field notes move into descriptions, docs/protocol/README.md's owner column follows decisions 4-6. Proof: scripts/check-docs.sh and the site build pass.
  5. The behaviour changes the rename would otherwise smuggle in, each in its own commit and roll: temporaryNSIDPrefix becomes the market and compute prefixes it means; FAMILIES in site/lexref.ts; 0020's B as an input; promote's rollback check (open question 1). Proof: hand staging.
  6. Siblings, renamed in dependency order. Each lands on its main after its own proof, with deploys held; kcp's pins keep kcp on the old names until step 6:
    1. atlibs (regenerate profile.car), atlibs-identlink, atlibs-iroh, atlibs-webrtc, atlibs-fedproxy (keepalive);
    2. atlibs-socialweb-computer-requester (release-workload, page, lexicons per open question 3), atlibs-agents, atlibs-atirc, atlibs-market-status, atlibs-mesh-agents, atlibs-agent-reference-spa, atlibs-socialweb-computer-app;
    3. atirc, socialweb-computer-console, socialweb-computer-watch;
    4. the old or deferred repos;
    5. the repos not checked out here, counted at this step. Publish the npm packages (@publicdomainrelay/oauth-scope, policy-deno-typescript) as staged 2FA publishes. Proof per repo: git grep -c -E 'com\.publicdomainrelay\.temp|computer\.socialweb\.temp' is empty, and its own tests pass.
  7. The kcp rename, in ONE mechanical commit: git mv both lexicon trees into lexicons/computer/socialweb/, run both seds over tracked files (history per open question 4), regenerate (codegen zz_generated, apigen with ContractEvent Revision 6, hack/identlinkvectors, hack/oauthscopes, did-key-associator/generated, the policy dist), and move the pins to step 5's commits. Proof: the grep is empty; deploy/check.sh --fast passes; the hat-8 local market passes (webrtc and iroh loopback); a hand staging cycle passes all 46, with open question 1's treatment of 0006:compat and 0020.
  8. The rename roll. Land the commit, and the CI cycle runs. In the promote window, hand-deploy Fact D's outside-promote pieces. Do the OAuth consents as john, alice and bob. Proof: the promote log is green, and every rc operator heartbeats at computer.socialweb.market.heartbeat.
  9. A second green roll on the renamed code (a help-text change, as in 0040's Done when 3) puts the renamed code on stable. Proof: the promote log.
  10. AGENTS.md gets a short "NSID namespaces" rule: computer.socialweb.* is ours (compute contracts), published by socialweb.computer; com.fedfork.exec.* belongs to atlibs; software.release.*, link.ident.* and network.attested.* are third-party copies we never publish; com.fedproxy.* is not covered by this plan.
  11. DNS, an owner-only act: Fact C's 18-23 _lexicon.<authority> TXT records, each did=did:plc:gmlkrhimoueejcertevr4hl3. Proof: goat lex check-dns lexicons/computer/socialweb prints nothing unresolved.
  12. Publish, after step 8: GOAT_USERNAME=socialweb.computer GOAT_PASSWORD=<app password, never printed> goat lex publish lexicons/computer/socialweb. Never use --skip-dns-check. The path keeps software.release, link.ident, network.attested and com.fedfork.exec out. Later changes: the same command with --update. Proof: goat lex status lexicons/computer/socialweb shows all ๐ŸŸข, and goat lex resolve <nsid> for one NSID per authority returns at://did:plc:gmlkrhimoueejcertevr4hl3/com.atproto.lexicon.schema/<nsid>.
  13. Site and check. Each reference page links its published record. A goat lex status check (all ๐ŸŸข for lexicons/computer/socialweb) runs in promote after a green prod gate: the release VM already reads plc.directory and the PDS (scripts/promote.sh:110-115). It can also run by hand from deploy/check.sh. It is not in --fast: it needs the network. Proof: an unpublished change shows ๐ŸŸฃ in the promote log.

Open questions for the owner

  1. The rename roll's version mixes: 0006:compat (the old CLI), 0020's B, promote's rollback check, and the outside-promote deploys. Recommendation: document the rename roll as the one allowed break:
    • 0006:compat is expected red on that roll only (stated in its acceptance doc);
    • 0020's B becomes a renamed hand build in local/;
    • a red rename promote is rolled back and checked by hand (old heartbeat collection);
    • the outside-promote pieces are deployed right after a green promote. Why: no dual modes (AGENTS.md:876), and these are the only checks that span two versions.
  2. Publish every lexicon of ours, including the x402 and free bids, accepts and receipts that code reads (internal/market/requester/accept.go:276, inbox.go:580)? Recommendation: yes, all of them. Publishing does not freeze them (decision 2), and a schema left unpublished cannot resolve.
  3. One lexicon source. The requester repo holds 29 lexicon files: 20 copies of old names, plus its own NSIDs. Recommendation: kcp's lexicons/ is the only source for computer.socialweb.*. The requester's own NSIDs move into kcp, and its copies are removed. Why: one publisher and one docs source.
  4. History (docs/plans/0001-0039, NEXT.yaml, docs/research: 15 files, 32 lines): rename it too? Recommendation: leave it as written. It records what ran.
  5. Our software.release.* copies differ from the published ones (๐ŸŸฃ x5, and defs#httpArtifact is absent upstream), and lexicons-fix edits two of them. Recommendation: pull upstream verbatim (goat lex pull) and bring you each diff our records need. Why: decision 4.
  6. Later, once others use the lexicons: turn on goat lex breaking as a gate? Not a step now (decision 2).

Done when

  1. Every owned repo's main shows 0 old-prefix lines outside history. Proof: per-repo git grep -c, listed in this plan.
  2. Two consecutive green promote rolls on the renamed code, with stable on it. Proof: the knotless promote logs.
  3. All _lexicon TXT records resolve. Proof: goat lex check-dns lexicons/computer/socialweb is clean.
  4. Every lexicon of ours is published and in sync. Proof: goat lex status lexicons/computer/socialweb shows all ๐ŸŸข, and one goat lex resolve per authority succeeds.
  5. Docs come from the lexicons alone. Proof: infra.md and outside.md have no hand tables; scripts/check-docs.sh passes; the site links the published records; goat lex lint on our set exits 0.