Current libraries: the database, media, sanitizer, mail and sign-in libraries are on their latest versions
Build / Build (push) Successful in 35s

- 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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-11-10 06:19:23 +01:00
1 parent 739a1603ca
commit 8a1e4e419b
9 files changed
+88 -26

No files matched your search

+13 -5
View File
@@ -848,7 +848,7 @@ client's role route never does.
- **Usernames are `Constants.UserNameRegex`** (`^[a-z0-9_]+$`): the intersection of what Mastodon and Misskey accept. A
name outside it creates a persona nobody on those servers can reach.
- **An actor's `published` is `PublishedOn`**, a random whole day up to two weeks before creation, so personas made the
same day do not share a date. New persona and group ids carry that same day (`GenerateNewID`), because local clients
same day do not share a date. New persona and group ids carry that same day (`IOwnId.NewId`), because local clients
see ids. Never emit `CreatedAt`.
- **Per-avatar state stays per avatar:** blocks, mutes, notifications, follows, and since R8 featured tags,
endorsements, private notes (`PersonaNote`, never `RootUserNote`) and dismissed suggestions. Nothing may relate sibling
@@ -880,11 +880,18 @@ client's role route never does.
## Data
- MongoDB through **MongoDB.Entities 25.1**, instance API: `DB.Default.Find<T>()`, `.SaveAsync(e)`, `.Update<T>()`,
- MongoDB through **MongoDB.Entities 26**, instance API: `DB.Default.Find<T>()`, `.SaveAsync(e)`, `.Update<T>()`,
`.DeleteAsync<T>()`, `.CountAsync<T>()`. `DbEntities` wraps the finds.
- **Pass no cancellation token to `DeleteAsync` outside a transaction;** v25 throws if you do.
- **Pass no cancellation token to `DeleteAsync` outside a transaction;** the library throws if you do (v25 and v26).
- **Collection name = class name, so never rename an entity class.**
- `Entity.ID` is a 24-character lowercase hex string; `GenerateNewID()` returns `object`, so cast it.
- **IDs are stored as they always were.** Since v26 the library no longer decides it, so `EntityIds.Register()`
(`Infrastructure/Data/EntityIds.cs`) maps `Entity.ID` the way v25 did: an ObjectId-shaped id as a BSON ObjectId,
any other string as a string, both read back, nested entities too.
- A type that makes its own id implements `IOwnId.NewId()` (`Avatar`, `Group`); every other type gets a 24-character
lowercase hex string.
- `GenerateNewID()` is now the library's extension method, still returning `object`, so cast it.
- Checked on 10 November 2026 against a scratch mongod: records written with v25 read, filter, update and delete
under v26, new writes keep the same BSON types, and v25 reads them back.
- New fields must be additive: a deploy rollback restores the binary, not the database.
- **Every stored remote object has an `ObjectRecord`** (raw JSON up to 256 KB plus its hash; delivered or fetched; the
activity, inbox, key and signed headers; received time; up to 10 later revisions). Write it right after the post's
@@ -945,7 +952,8 @@ client's role route never does.
(`ActivityPubRenderer.Timestamp`). GoToSocial (ULIDs) and Mastodon (Snowflakes) derive a remote status's id from
`published` at millisecond resolution. With whole seconds, two of our posts from the same second sorted at random
there.
- **Startup order:** `EntityMaps.Warm()` (every entity's class map, one at a time; two mapped at once throw "An item
- **Startup order:** `EntityIds.Register()` (first: if anything built `Entity`'s class map before it, start-up throws
rather than store ids differently), then `EntityMaps.Warm()` (every entity's class map, one at a time; two mapped at once throw "An item
with the same key has already been added" and stay broken), then `MigrateAsync` (`Infrastructure/Data/Migrations`,
`_NNN_` order, each runs once), then `Indexes.Create()`. A new entity needs nothing; a new unique index needs a
dedupe migration before it.