chadtmiller.com/group-host
atmosphere group host
Moderation follows the proposal: mod methods, URI subjects, takedowns
MergedThis renames the moderation methods, makes a subject one URI with an optional cid, and uses plain-word reasons. It also makes a group's !takedown labels hide records and files in listSpaceRecords and getSpaceBlob.
I read the new takedown.rs, the serving changes in index_api.rs, the moderation.rs changes, the rbac legacy-grant mapping and the SQL migration. I also read the createReport, resolveModSubject and labeler lexicons. I did not read the other 36 files, which are renames, docs, tests, MCP, web and example changes. I did not run the checks.
- Takedown is complete for what the host serves. The only reads of the space index are
list_space_recordsandget_space_blob, and both filter. The pagination loop advances its cursor past hidden rows, so a page of hidden records can't stall or end the listing early. - Cursors and expiry are handled. Lapsed labels are ignored, and a
cid-scoped label hides only that version. - Legacy data is read compatibly.
labeler_ofmaps the old reason refs to words and dropscreatedAt.rbac::grantsrewrites oldrpc:method names. The migration only touches rows beginningcom.atproto.moderation.defs#reason, and leaves any other reason as it was. - The 256-byte
reasonTypecheck moved into the lexicon.maxLength: 256in the lexicon now carries it, andacceptsstill checks the labeler's list.
One thing for the author to know, not to block on. A record !takedown written in the members space also hides a record in another space, because hides matches the record's URI. The comment in taken_down says a record's label covers only its own space. That only matters for labels the group wrote itself, so it isn't a security problem.
Since my approval at 75608355, the only changes are refreshed moderation guide screenshots and their text snapshots. The new text matches the takedown behavior described in the pull. No code changed, so my earlier approval stands.
Since my approval at 69713143, the only change is in tests/moderation.rs. Two assertions are rewrapped, and they now compare against picnic.as_str() instead of a clone. No behavior changed, so my earlier approval stands.
Since my approval at 0897367b, the only change is one assertion in crates/opensocial/tests/commands.rs. It now expects subject to be the DID string, which matches the URI-subject change in this pull. No behavior changed, so my earlier approval stands.
Since my approval at 929b0a8a, the only change is a refactor of named_now in rbac.rs. It now splits the scope at the ? and keeps the ? with the query. The old code did the same, apart from one case: a bare trailing ? used to be dropped and is now kept. That makes no practical difference. My earlier approval stands.
Since my approval at b8e42007, the only commits are merges of feature/proposal-nov into the branch. They bring in the base's changes (the role-grant and inbox pulls), not changes of this pull's own. I found no conflict markers in the tree. Lint, lexicons, docs and web checks pass at this head. The test and e2e checks were still running when I looked, and I did not read the merge diff. My earlier approval stands.
Moderation catches up with the opensocial proposal's 16–19 Nov changes: the queue's methods are named for moderation, a subject is one URI with an optional version, reasons are plain words, and a group's
!takedownlabel now takes content out of what the host serves.Claude Opus 5.5
What changes
Renamed methods.
fyi.opensocial.listSubjects,getSubjectHistoryandresolveSubjectare nowlistModSubjects,getModSubjectHistoryandresolveModSubject, answeringdefs#modSubjectView. Routes, lexicons, themoderatepermission set'slxms, the rbac scopes formod.read/mod.resolve, the MCPmod_*tools, theopensocialseed's moderator role, the console, kicker and the docs all follow. No aliases.Subjects are URIs.
createReport,resolveModSubjectandmodSubjectViewtakesubject(formaturi: an account's DID or a record's at-uri) and an optionalcid, asgetModSubjectHistoryalready did.defs#accountSubject,#recordSubjectand#subjectStatusare gone; statuses are inline enums, as upstream. Acidbeside an account is ignored. The MCP crate no longer turns text into a union: the tools take the lexicon's fields as they are.Reasons are plain words:
spam, violation, misleading, nsfw, rude, otherincreateReport,reportEventandlabeler.reasonTypes, plus our ownappeal, so appeals keep working (only the subject may file one, as before).labeler.subjectTypesisaccount, record. Our copy ofcom.atproto.moderation.defsis dropped (retired inharness/lexicons.mjs); nothing else refers to it.Labeler. No
createdAt; its policies arelabeler#policies(wasdefs#labelerPolicies). New groups' labelers are written in this shape.!takedowntakes content down. The host did nothing with labels before. Now (takedown.rs) a!takedownlabel in the group's own repo takes the record it names (only that version, if it names acid) out oflistSpaceRecords, and the files that record holds out ofgetSpaceBlob. An account's takedown hides everything the account wrote in that space; written in the members space, where account labels go, in every space of the group. Only the group's labels count; one past itsexpdoesn't. Deleting the label puts it back. The records stay in their writers' repos; the queue still has their history. The console's takedown copy and the moderating guide say so.InvalidCursoris named, and answered, bylistModSubjects,getModSubjectHistoryandlistJoinRequests(each parses its cursor and refuses one it never gave).Existing groups
None are kept: the deployed host's groups are wiped when
feature/proposal-novlands, so nothing reads or migrates the old shapes (old reason refs in reports or labelers, a labeler'screatedAt, role grants naming the old methods).How it was checked
New and updated tests in
tests/moderation.rs: string subjects (DID, record, bad URIs, bad cid), plain reasons and the labeler's limits,InvalidCursor, andtakes_out_of_the_space_what_the_group_takes_down(record takedown, its file, versioned, lapsed,!hide, a member's own label, an account takedown across spaces, and deleting labels).tests/rbac.rscovers the renamed methods' scopes.just lexpasses locally; targeted tests passed locally; every check passes on the runner.Shortcomings