chadtmiller.com/group-host
atmosphere group host
Groups moderate what is theirs: reports, labels, and the queue between
MergedThis adds moderation. createReport takes reports from any signed-in account into the group's queue. applyLabel and negateLabel write fyi.opensocial.label records beside their subject, and !hide/!takedown need takedown. listSubjects, getSubjectHistory and resolveSubject keep the queue, and the console gets a moderation page. I read every changed file. I did not read tests/moderation.rs or the checks, and I did not read the lexicons beyond listing them.
The logic holds up. A label can only target a record in the group's own spaces, and the permission check runs before any write. Reports re-open a resolved subject while labels leave it resolved, as the docs say. The queue is cleaned up when an account is forgotten. The cursor ordering (updated_at DESC, subject) matches its predicate. The docs page and the design README are updated, as AGENTS.md asks.
Two small things, neither blocking:
create_reportstoresreasonand the subject URI with no length bound. Anyone can write to the queue, so the host should cap them, for example to thecreateReportlexicon's limits.LabelForm.svelte's doc comment says "and the rule it is under", but the form has no rule field.
What changes
Reports, labels and a queue. A group moderates what is in its spaces itself (
moderation.rs,docs/design/moderation.md).com.atproto.moderation.createReporttakes a report from anyone, member or not, of a record in one of a group's spaces here, into that group's queue.applyLabelandnegateLabelwritefyi.opensocial.labelrecords beside what they label: a label on a record goes in that record's space, and a label on an account goes in the members space.labelis the action a role needs;!hideand!takedownneedtakedown. A negation is a second record, so that a label was applied stays on record.listSubjects,getSubjectHistoryandresolveSubjectkeep the queue. Each subject is open, escalated or resolved, with its history in order. The queue is the host's working state, not something the group publishes.The console's moderation page.
/g/<handle>/moderationshows the queue to those withmod.readand offers the label form to those withlabel, and the group's page links to it.Why
This is step 8's first part. Labels live beside what they label, so whoever may read a record may read its labels, and nobody else may. A label opens a subject nobody reported, and leaves a resolved one resolved: labelling is the moderators acting, not someone asking them to.
How it was checked
tests/moderation.rs:These are the prototype's
moderation.test.tscases, in this host's terms.tests/serve.rsnow asks for an unknown query and an unknown procedure. A new e2e flow labels a record from the moderation page.just covis at 100% of lines and functions locally.Shortcomings