chadtmiller.com/group-host
atmosphere group host
0
0
A group moderates its members' posts in their public repos
Merged Approved
This lets a group report and label a member's record in their public repo as its own subject. It keeps the host-hides-nothing line, and I found nothing that must change.
- Reports:
public_ofchecks the DID, NSID and rkey shape, andcreate_reportrequires a role for the author. It then files the report in the members space, so the reporter must read that space. - Subject handling: the same
subjectTypesandsubjectCollectionschecks apply as for any record. Non-member records, the group's own records and malformed URIs stayInvalidSubject. - Labels:
Host::besideallows a public-record label only in the members space and only for a member's record. Everywhere else the label is stillInvalidRequest. account_of: it now handles 3-part public URIs as well as space URIs, soactorresolves for both.- Tests and docs: the one new test covers the cases the body lists, and the docs and lexicon descriptions match the behaviour.
I did not run the tests or read the check results. That includes the repository's 100% coverage gate.
Merged as 027c9a3
What changes
Reports.
fyi.opensocial.createReporttakes a record subject (fyi.opensocial.defs#recordSubject) whoseuriis a record in a public repo,at://<did>/<collection>/<rkey>, when<did>holds a role in the group. The reporter must be able to read the members space, as for an account. The labeler'ssubjectTypes(record) andsubjectCollectionsapply to it as to any record. It enters the queue keyed by its URI, its own subject with its own status, apart from its author's account;listSubjectsanswers its author asactor.getSubjectHistoryandresolveSubjecttake such a URI too. A public record of someone not a member, and anything else outside the group's spaces, staysInvalidSubject.Labels. A
com.atproto.label.labelthe group writes in its members space may name, as itsuri, a record in the public repo of a member, besides a DID. Writing and deleting one putslabelEvents in that record's history, as for a record in a space. In any other space, or naming a non-member's public record, the label is refused (InvalidRequest), as before.The host still hides nothing. The design page, the API reference and the lexicons' descriptions say so.
Why
A forum's posts live in each member's own public repo, not in any space of the group's, so its public community could report and label only the member who wrote one, not the post. A member's public record is read by anyone, so its label goes where its author's labels do, the members space, and the reporter is held to the same space as for an account.
How it was checked
moderates_a_members_public_post_as_its_own_subjectincrates/group-host/tests/moderation.rs: a member's public post reported and queued as its own subject (its author's history left empty), resolved and read back by its version; a non-member's or the group's own public record, a malformed one, and a reporter who cannot read the members space refused;subjectTypesandsubjectCollectionsapplied; a label on the post in the members space written and deleted, each alabelEventby whom; a label naming a non-member's public record, or a public record in the calendar or meta space, refused.Shortcomings
The
mod_labeltool andopensocial mod labelstill place a label only beside a record in one of the group's spaces or on an account; a public record is labelled by writing the record as the group.