• PrivaPub 1.27.0
    Build / Build (push) Successful in 34s
    Deploy / privapub.thepra.dev (push) Successful in 57s
    Deploy / Release notes on the Releases tab (push) Successful in 3s
    Stable

    thepra released this 2026-11-10 17:19:31 +01:00 | 3 commits to master since this release

    What's new in PrivaPub 1.27.0

    20 changes since v1.26.0.

    No test project: PrivaPub.Tests goes, and neither CI nor the deploy runs tests

    Owner decision 2026-10-17: the tests took about 22 of a release's 25 minutes on the runner (9 in build.yml after a push,
    12 more in deploy.yml on the tag, for the same commit). PrivaPub.Tests is deleted with tools/ci/with-test-mongod.sh;
    build.yml builds and deploy.yml publishes. CLAUDE.md's Testing section becomes Verifying (build, run locally, the
    pasture), and the invariants no longer name the tests that checked them. decePubClient's tests/e2e goes too, so the
    pasture's peers/decepub.sh serves a plain publish with the Pasture environment (decePubClient/publish/wwwroot).

    R1 cleanup: collAnon and dead code gone, docs current, every peer's scenario in one sweep

    Starts the completion program (docs/ROADMAP.md, "Owner decisions on finishing everything", 2026-10-17).

    • Dead code: the commented-out collAnon blocks (discussions, seeding, admin user lists, HTTP/3, the old signature
      middleware), the empty PrivaPubWorkersConfiguration, PublicAvatarUsersService and UserPolicyType, unused helpers,
      the second IPasswordHasher registration, the PasswordGenerator package, SignUpAsync/LoginAsync's unused invitation
      parameters. "Starting PrivaPub"; a signed-in login is sent to "/", not to "/discussions".
    • Stored fields nothing read: RootUser.Contacts and ResetPasswordToken*, the local Avatar.AvatarServer,
      EmailRecovery.RecoveryCode/RequestIP/CreationDate, MongoSettings.LogsDatabase, and AppConfiguration's
      upload/discussion keys, RequiresFirstTimeSetup and Version (old documents still load: MongoDB.Entities ignores extra
      elements). DmPost's indexes are no longer made. 49 collAnon keys leave FieldsNameResource in every language.
    • /clientapi/data/current-version answers the build's ref. UsersIds is a list that can't throw, and the admin routes
      leave the administrator out without mutating the request.
    • deploy.yml checks SecureMode on a name no persona can have, and the browser redirect on the directory's first local
      persona: @thepra is the administrator's own now.
    • Town: decePub's e2e remnants (expect, client.jsonl, the decePub column) and town/tests go; the dead gaps/load
      commands too. Mobilizon no longer keeps an event for a deleted test.
    • tools/pasture/sweep.sh runs every peer's scenario, batch by batch, as CLAUDE.md asks before a change to what
      PrivaPub sends.
    • Docs: CLAUDE.md's repo map, route table (every frozen route) and stale lines; ROADMAP's status (setup, v1.25.0,
      v1.26.0, the program C), the 2026-10-17 decisions, and dated notes where earlier text no longer holds; FEDERATION.md's
      FEP list (7888, f228, 7628, ae0c and 8967 supported) and the deploy's persona.

    Verified: dotnet build PrivaPub.sln -c Release (0 errors, no new warnings); bash -n on the touched scripts; py_compile
    on the town; the pasture's gts, mastodon and lemmy scenarios on this build.

    R2 accounts are safe: email by password and code, recovery only to it, sessions that end

    Completion program R2 (docs/ROADMAP.md, 2026-10-17).

    • An email address is set only with the password and a 6-digit code sent to it: /clientapi/user/email, /email/verify,
      /email/remove and GET /clientapi/user/account (EmailVerification: an hour, five tries, the code's hash only;
      EmailVerificationJob through the new IMailer). The request answers one sentence whether or not the address is free,
      and nothing goes to an address another login verified. The old POST /clientapi/user/update, which changed the
      address with neither and said when one was taken, answers 422.
    • Recovery writes only to a verified address; migration _019 keeps the addresses given before verification existed.
    • A changed password ends every session and every persona token, and answers a new JWT for the device that changed it.
    • Sessions: every JWT carries its session's id ("si", kept by sniff/again). GET /clientapi/user/logout, which did
      nothing, ends that session alone (RootUser.EndedSessions, until its tokens would expire); POST
      /clientapi/user/logout/everywhere ends them all.
    • AppConfiguration:HashingOptions was never bound, so passwords were hashed at the default 9789 iterations: it is
      bound now, at 210,000, and a hash made at other iterations is made again at the next sign-in (matched on the old
      hash, so two sign-ins never undo each other).
    • Recovery and verification codes expire through TTL indexes; EmailVerification is never in a backup.
    • AppConfigurationService reads appsettings as they are now, not the copy older builds saved in Mongo on first boot.
    • ViewUserSettings and RootUserSettings carry SavedAt, so a client signing in keeps its own theme until one saved.
    • Pasture: peers/mailpit.sh (Mailpit 1.31.4 as mailpit.test) receives PrivaPub's mail; recovery links open
      https://decepub.test. scenarios/accounts.sh, in sweep batch A, checks all of the above (28 checks).

    Verified: dotnet build PrivaPub.sln -c Release; the pasture with gts and mailpit: accounts 28/28 and gts, 91 passed,
    0 failed.

    R3 two-factor sign-in: TOTP with recovery codes, asked for only after a correct password

    Completion program R3 (docs/ROADMAP.md, 2026-10-17).

    • Services/TwoFactor.cs: TOTP (RFC 6238, 30 s, 6 digits, SHA-1, one step of slack, Otp.NET 1.4.1) and ten recovery
      codes (SHA-256 kept, pulled when used). RootUser.Totp holds the secret, the last step taken (moved only by a
      conditional update, so a code works once even for two sign-ins at the same moment) and the codes' hashes.
    • /clientapi/user/totp/setup (the password) answers the secret, its otpauth:// URI and a QR code as an SVG data URI
      (QRCoder 1.8.0); /totp/enable takes the app's first code, shows the recovery codes once and ends every other session
      (this device gets a new one); /totp/disable takes the password and a code. GET /clientapi/user/account says whether
      it is on and how many recovery codes are left.
    • Sign-in (/clientapi/user/login, the invitation login, /oauth/login) asks for LoginForm.OneTimeCode with a 428, and
      only once the password was right; the OAuth page has the field. Recovery by email leaves two-factor on.
    • PrivaPub admin reset-totp : the way back for a login that lost its authenticator and its codes.
    • scenarios/accounts.sh checks it all, with codes computed in Python; the OAuth page with its antiforgery token.

    Verified: dotnet build PrivaPub.sln -c Release; the pasture (gts, mailpit): accounts 45/45.

    R4 server pieces: typed admin statistics, DELETE media, accounts by ids, hashtag history in search

    Completion program R4 (the client catching up), the server's part.

    • /clientapi/admin/statistics/hosts/{host}, /events and /server answer typed views (ViewHostDetail, ViewHostInstance,
      ViewHostDay, ViewInteractionEvent, ViewServerDay in ClientModels) instead of an anonymous object and raw entities:
      the instance's public description, never its raw instance API document; the events without their actor hash. The
      JSON names stay, so lib/interop.sh's stats_check reads them as before.
    • DELETE /api/v1/media/{id} (Mastodon 4.4): a persona's own upload goes to the trash while nothing holds it; a posted
      or scheduled one answers 422.
    • GET /api/v1/accounts?id[]= (Mastodon 4.3): up to 40 accounts, those that exist.
    • /api/v2/search's hashtags carry their week of use (TagsController.History), not an empty history.

    Verified: dotnet build PrivaPub.sln -c Release; the pasture: gts 64/64 (statistics included); by hand, an unattached
    upload deleted (then 404), a posted one refused (422), accounts by ids, a hashtag's history.

    R5 the server's own settings: instance, rules, announcements, relays, media limits, the staff's log

    A singleton ServerSettings (title, descriptions, contact, thumbnail, privacy policy, terms, rules, relays, media
    overrides, PublishActivity), cached by InstanceSettings and read by the instance API, NodeInfo, the instance actor, the
    web pages and the mailer; its defaults are the old literals, so nothing changes until an administrator edits.
    /clientapi/admin/settings (and /thumbnail), /announcements, /relays for administrators; /clientapi/moderator/log, the
    staff's log (AdminAction, written by domain blocks, backups, settings and the CLI; no IP, never a root paired with its
    personas). The Mastodon API's rules, extended description, privacy policy, terms of service, domain blocks (Published,
    Obfuscate), announcements (dismiss, reactions, streaming) and activity (only when published). Reports carry rule ids.
    Media overrides clamped to hard caps. Relays named by the settings reconcile next to the configured ones.

    Verified: interop.sh instance accounts relay with mastodon, relay, aoderelay and mailpit, 119 passed.

    R6 moderation: roles, silence and suspension, bans that write nothing on the personas, deletions, report actions

    Roles (user, moderator, administrator) from the CLI and /clientapi/admin/roots/{id}/role, never one's own nor the last
    administrator. Silence keeps an account's posts out of public timelines, hashtags, trends, search and relays while its
    followers still get them; suspension refuses and revokes a local persona's tokens, answers 404 for its posts and
    collections, holds back every delivery and tells other servers nothing new, its actor unchanged; a suspended remote
    account's activities are dropped and nothing goes to its own inbox (a shared one still serves its server). A banned
    login's personas are held back in memory alone (Restrictions), so nothing pairs them in stored data. Personas and groups
    are deleted one at a time (PersonaRemoval, GroupRemoval), by their login or an administrator with the password. Reports
    resolve with an action and a note; posts are taken down, a remote copy hidden. Warnings reach the persona as Mastodon's
    moderation_warning. Every staff act goes to the staff's log. Migration _020 limits posts from servers already silenced;
    a restore keeps the moderation made since the backup.

    Verified: interop.sh moderation gts mastodon with SecureMode, 194 passed; restore.sh, 25 passed, now with a suspension,
    a silence and a takedown made after the backup.

    R7 custom emoji: the server's own, added by administrators, sent on posts, profiles and reactions

    LocalEmoji, a new collection (unique shortcode whatever its case, never renamed: the shortcode is its id elsewhere),
    managed on /clientapi/admin/emoji/list|insert|update|delete and kept in the staff's log (emoji.insert, .update,
    .delete). Its picture goes through IMediaService.EmojiImage: PNG, GIF, WebP or JPEG up to 256 KB, a PNG within 256 px
    with alpha kept (an animated GIF or WebP stays an animated GIF, with a still PNG), keep=none, shrunk until it fits
    GoToSocial's 100 KiB, held by ServerUse "emoji:" so the janitor and the audit leave it. LocalEmojis keeps the
    offered ones in memory, reloaded on every change: GET /api/v1/custom_emojis is real; local posts (words, title, warning,
    poll options, each revision) and profiles keep the emoji they name; Notes, Questions, actors and EmojiReacts carry
    Mastodon's Emoji tag with its id, served as an Emoji at /emojis/{shortcode} (410 once deleted; the path awaits the
    owner's confirmation); a persona reacts with one (Pleroma's reactions, announcements). A restore keeps the live emoji
    as it keeps the settings, and trashes server pictures nothing holds. tools/pasture/scenarios/emoji.sh joins batch A.

    Verified: built, and run locally against a scratch database (uploads of every type, animation kept, metadata gone,
    refusals, rendering, reactions, history, announcements, delete and revive, backup and restore, media audit). The
    pasture scenario and the sweep were not run.

    R8 the Mastodon API made real: featured tags, endorsements, notes, notify and languages, suggestions, the direct stream

    Featured tags per persona (/api/v1/featured_tags, suggestions, tags/:name/feature, accounts' featured tags, max 10),
    listed at /tattoos as Hashtags and sent as Add/Remove{Hashtag} to followers on the featured collection, as Mastodon
    sends them; remote accounts' tags received and read from featuredTags. Endorsements (pin/endorse) and private notes
    (PersonaNote) kept per persona and never federated; the relationship's notifying, languages, endorsed and note, with
    follow's notify (status notifications) and languages (home filter). Reading preferences set on /clientapi. Suggestions
    v1/v2 with dismissals and staff picks, never the persona or a sibling. conversation events on the direct stream.
    translate, annual reports and the admin API answer. New collections backed up and removed with their persona.

    R9 Web Push, then the honest version: VAPID key, push subscriptions, encrypted pushes, 4.5.0 advertised

    The server's VAPID key (PushKeys, made on first need, in Mongo) is the instance API's vapid.public_key and every app's
    vapid_key. /api/v1/push/subscription (POST, GET, PUT, DELETE) keeps one subscription per access token, so per persona;
    every notification kept (never a filtered one) is queued as a SendPush job for the subscriptions whose alert and policy
    admit it, and sent through the push client (the safe handler, https only) encrypted as RFC 8291 aes128gcm or the
    aesgcm draft with an ES256 VAPID JWT. 404/410 delete the subscription, 429/5xx/timeouts retry, other answers drop the
    push. Subscriptions end with their tokens (revocation, sessions ended, suspension, deletion, a restore); backups hold
    neither keys nor subscriptions. The walk of every Mastodon 4.3-4.5 client route (docs/MASTODON-API.md) added
    conversations/:id/unread, domain_blocks/preview, v2 notifications clear and PUT policy, /oauth/userinfo and stubs, so both
    instance APIs now say 4.5.0 (compatible; PrivaPub ). The pasture gets a push sink (pushsink.test) and
    scenarios/push.sh in batch A.

    R7's emoji id is /grimaces/{shortcode}, the owner's name

    The federated id of a local custom emoji (LocalEmojis.Path) was the plan's /emojis/{shortcode} awaiting the owner; it is
    /grimaces/{shortcode}, in the style of the other routes, and freezes once it deploys.

    Instance.sh: the staff's log may hold acts that name nobody

    Since R6 an act on one of the acting login's own personas is logged without its name, and every persona of the pasture
    is the root's, so the scenario's log check takes an entry with no name too.

    Emoji.sh: read a status's emojis, and reactions named as strings

    The post check handed the whole status to has_code instead of its emojis, and Misskey lists its reactions by name
    (':code@host:'), which has_code took for objects.

    Deploys run as gitea-runner, the instance's one runner on Max since 1 November 2026

    build-runner was merged into it: the same labels (build stays), the same sudo verbs and
    folders, the .NET 9 SDK and the library clone cache.

    Every deploy tag ends with its release notes on the Releases tab

    The commit messages since the previous tag, written by app-stores' changelog action (Arasaka/app-stores, changelog@v1) after the deploy succeeded.

    House rules: primary constructors, a cancellation token on every async call, and the rules fail the build

    • Services, controllers and jobs take their dependencies through primary
      constructors and use them directly; where a method already named a local
      after a dependency, the dependency takes its type's name.
    • Every async method takes a CancellationToken last and passes it down to
      MongoDB, HTTP and the job queue. The setup claim is still given back when
      a request is cancelled.
    • The federation and media options are read through IOptionsMonitor.
    • The Mastodon entities keep sending "" for empty strings, and every model
      field where null means something says so.
    • The inbox's 503 with Retry-After, which other servers retry, is the one
      server error left, and says why.
    • Arasaka.HouseRules.Analyzers checks all of this in every build, here and in
      PrivaPub.ClientModels as decePubClient builds it.

    Checked against GoToSocial in the pasture: 64 passed, 0 failed.

    Every route is a constant in ApiPaths

    All 384 routes, the Mastodon API, the client API and the frozen federation
    paths, are read from one class with one nested class per controller. Their
    values are unchanged, checked one by one against the old literals; decePubClient
    keeps its own APIs class.

    Checked against GoToSocial in the pasture: 64 passed, 0 failed.

    Current libraries: the database, media, sanitizer, mail and sign-in libraries are on their latest versions

    • MongoDB.Entities 26, FFMpegCore 6, HtmlSanitizer 11, Serilog's MongoDB sink 8, OpenIddict 7.8, MailKit 4.18.2,
      Markdig 1.6, Swashbuckle 10.3, QRCoder 1.8.1 and the .NET 10.0.14 sign-in library; the build uses SDK 10.0.403.
      The two packages with known vulnerabilities in the old set are gone.
    • Stored records are read and written exactly as before: ids keep their form, personas and groups still get ids that
      carry their published day, and an older version can still read what this one writes.
    • Videos are probed, transcoded and given a poster frame as before.
    • Federated posts are cleaned exactly as before.

    The API's JSON is generated at build time, and no answer is an anonymous object

    Every answer of the Mastodon API and the client API now has its JSON shape generated when the server is built, instead
    of worked out by reflection while it runs; the bytes sent are unchanged. The small answers that were anonymous objects
    (the instance documents, notification policies, reports, lists, tags, trends, errors and the empty answers) are named
    types. A type without generated metadata fails at once in development and on the pasture, and in production is logged
    and still answered. Three lists that were sent as lazy sequences (moderation reports, the published domain blocks and
    the languages) are now built first.

    Every failure the server answers with names its own error code

    Each refusal and failure the client API sends now starts with a code no other failure uses, such as "[ERR0030006] That
    code is not valid.", so a screenshot or a report points at the exact place it came from. Nothing another program reads
    changes: ActivityPub, the Mastodon API's errors, sign-in tokens and the error kinds decePubClient branches on stay as they
    were. The house-rules checks move to 1.1.0.

    Downloads