Add support for Tranquil PDS #78
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Besides the reference PDS from bluesky, also support Tranquil PDS for hosting.
🤖 On it — follow along in the action run; the reply will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the task runs.
Pushed to
claude/issue-78.What I did
Tranquil PDS is now supported alongside the reference Bluesky PDS, for both hosting and administration. I read the upstream source (
tranquil.farm/tranquil-pds) rather than working from the README, because two of its behaviours change the design.Hosting —
ATProtoNet.Aspire.HostingAddAtProtoTranquilPds(name, port?, tag?)adds theatcr.io/tranquil.farm/tranquil-pdscontainer, andWithAtProtoTranquilPds(pds)wires a project to it — the same shape as the existingAddAtProtoPds/WithAtProtoPdspair. Tranquil stores its repositories in PostgreSQL, so the call also provisions a server and database and waits on them;WithDatabase/WithDatabaseUrlpoint it at one you already have and drop the generated resources from the model. It's handed apostgres://URI, not the ADO.NET connection string Aspire'sPostgresDatabaseResourceexposes — that one wouldn't parse. Plus the usualWith*configuration surface (hostname, handle domains, secrets, blob storage incl. S3, PLC, crawlers, mail, report service).Administration —
PdsAdminClientThis is the difference that matters. The reference PDS has one server-wide admin password used with HTTP Basic; Tranquil has no such password and instead flags individual accounts as administrators, authenticated with an ordinary session token.
PdsAdminOptions.Authentication(newPdsAdminAuthenticationenum, default unchanged) selects the scheme,AdminIdentifiernames the account. UnderAdminAccountthe client signs in lazily, reuses the session, and re-authenticates once if the server rejects it — which a long-lived typedHttpClientregistration needs.AddAtProtoPdsAdmin()binds the new keys and fails at host-build time if the mode is set without an identifier.Two upstream behaviours worth flagging
CreateAccountAsync(signup is public, so it works before the client has any authority). The handle is derived from the hostname soWithHostnamealone leaves a valid one, and defaults topdsadmin—adminis on Tranquil's reserved-subdomain list and would be rejected at signup.WithDevelopmentMode(false)turns the set off.Verified
dotnet build— succeeds, 0 warnings (the repo treats CS1591 as an error on this package).dotnet test tests/ATProtoNet.Tests/ --configuration Release— 1162 passed, 0 failed, 5 gated integration tests skipped as before. 59 of those tests are new (45 hosting, 11 admin-auth, 3 DI).postgresql://DATABASE_URL,generateblocks for every secret,AdminIdentifiercorrectly resolving topdsadmin.{pds-hostname.value}, and no development-mode variables leaking into the published output.dotnet pack— the package declaresAspire.Hosting.PostgreSQL13.4.6 correctly.Not verified: I could not actually start the container.
atcr.iorequires authentication (docker login atcr.io) and this environment has no container runtime, so the run-mode path is verified at the application-model and manifest level only. Everything about the live container — that the env vars land as intended, that the health check answers — is untested against a running server. Documented the registry login requirement indocs/managed-pds.md.Docs updated: new Tranquil PDS section in
docs/managed-pds.md, plusdocs/aspire.md,docs/api-reference.md,docs/architecture.md,README.md, andCHANGELOG.mdunder[Unreleased].⏱ 22m 10s · 136 turns · tokens: 231.3k in / 101.4k out (+17744.1k cache-read)
📜 Full session transcript
→ Opened PR: #79