Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place

preview-bot: read and write Tangled 1.0 pull requests #94

Merged nekomimi.pet
targeting main from preview-bot/tangled-1.0
Merged opened by and assigned to nekomimi.pet
targeting main from preview-bot/tangled-1.0

Tangled 1.0 moved pull requests, rounds and comments into the repo DID's account on its knot, and a repo's spindle into its org.tangled.repo.manifest. Since knot.gaze.systems went to 1.0, the preview bot could no longer find our repos or their pulls.

This keeps the bot's verification chain and teaches each link the 1.0 records:

  • the owner's org.tangled.repo.declaration names the repo DID; when the repo's knot serves a manifest, its owner and name must agree, and its spindle (resolved from did:web) is the one asked
  • spindles get org.tangled.ci.getPipeline / queryPipelines first, the sh.tangled.ci methods only when they lack them
  • a pull is an org.tangled.track.ticket with a target branch; its rounds are the org.tangled.review.patch records naming it; a branch maps to the open ticket of its newest patch
  • comments go through the knot with a service-auth token minted for that repo and method, then get an org.tangled.graph.attestation from the bot's PDS, as the 1.0 web app does; the bot finds its own comment by x-tngl-editor

Repos on pre-1.0 knots keep the old path untouched.

Tests: 149 in preview-bot (both paths), full suite 2185 pass / 0 fail, tsc clean. Mutants removing the manifest owner check, the comment editor check, or the open-ticket check each fail a test. Live read-only check against this repo: manifest, spindle (spindle.tangled.network), pipeline lookup and ticket all resolve. The bot's PDS mints a service-auth token for a knot createRecord; an actual comment hasn't been written yet, that needs a deploy and one test PR.

Commits 0