chadtmiller.com/group-host
atmosphere group host
The lexicons say what the host answers, and an ejection is kept
MergedThis brings the lexicons in line with what the host answers. It makes negateLabel return the negation's uri and cid, and ejectMember note an eject event with the actor and reason. The diff matches the description, and the tests cover both behaviour changes. I read every file in the diff but did not run the tests or the lexicon check. I found nothing that blocks a merge. There are two small points on ejectMember, inline below.
crates/group-host/src/group_members.rslines 484 to 485Outdated
These lines can no longer be read.
chars().count() counts code points, not graphemes. A reason of 300 or fewer graphemes but more than 300 code points (emoji with joiners, combining marks) is refused although the lexicon allows it. It errs on the strict side. Say so in the comment, or count graphemes if the crate already has a way to.
crates/group-host/src/group_members.rslines 508 to 509Outdated
These lines can no longer be read.
put_out has already run when moderate fails. In that case the caller gets a 500 although the member is out, and retrying answers NotAMember. This is unlikely, but you could log the failure and still answer 200, since the ejection itself succeeded.
The only change since my last review is the follow-up commit. It updates the e2e moderation flow to expect the ejected member already in the queue, and changes the empty-state text to "Reports, labels and ejections show here." The selectors the test uses (.subject, .status, .events) exist in ModerationQueue.svelte, so the assertions should hold. This is the console break the PR body said was left to CI. I didn't run the e2e. My two earlier inline notes on ejectMember (code points versus graphemes in the length check, and the 500 if moderate fails after put_out) are minor, still open and don't block the merge.
The only changes since my last review are two merges: main into this branch, and lexicons/unused into it. The second drops defs#file and defs#actorLink and the leaving entry in retracted. That last one is what the pull body's shortcomings said would happen. I read the harness/lexicons.mjs and defs.json diffs. The retracted set and the mayGo rule are coherent and match what the body describes. I didn't run the tests or the lexicon check.
My two earlier notes on ejectMember are still open and minor. One is that the length check counts code points, not graphemes. The other is that a moderate failure after put_out answers 500 although the member is out. Neither blocks the merge.
The only change since my last review is a merge of main into the branch. The merge conflicted in lexicons/fyi/opensocial/defs.json, and I found no conflict markers left. actorLink now appears only in the retracted set in harness/lexicons.mjs, as intended. Every check at this head passed: web, test, lexicons, e2e, docs and the Rust lint. I didn't run anything myself. My two earlier notes on ejectMember are still open and minor: the length check counts code points, not graphemes, and a moderate failure after put_out answers 500 although the member is out. Neither blocks the merge.
What changes
NotPlc goes where it cannot happen. A group here is always a did:plc, made here or imported (import refuses anything else with
NotPlc), socheckGroupHandle,updateGroupHandle,addRecoveryKeyandremoveRecoveryKeyno longer list it.listRecoveryKeysnamesNotControllerinstead, which it answers for a group whose DID is ended. The handle methods' remaining errors are the onesgroup_handle.rsraises. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdf3ubdcv3migrateExport lists what it answers.
leavinggoes, as there is no export for a plain PDS. Its errors are nowInvalidTokenandBlobNotFoundin place ofForbiddenandNotFound, which it never answered. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjde7ndjzgqmigratePrepare's snapshot has the right shape. Its description now reads
{handle, address, spaces: [uri]}, each space a URI string, asspaces_ofwrites it andreceivereads it. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdeayzukizactorView holds what the host answers. That is a DID, the handle from the DID document, and
canCreateGroupon one's own view. The profile fields nothing filled (displayName,description,avatarwith its/img/actorroute,pronouns,links,bot) andactorLinkgo. They can come back as new optional fields once a profile is read. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdf6w3f5zocreateGroup lists the errors it answers. It now names
InvalidHandle(not one label under the handle domain) andAccountCreationFailed(the directory did not take the DID). Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdfabobx3xInvites and roles are described as they work.
createInvitelosesNoInvitesSpace, which nothing raises.requestJoinlosesinvite, which the handler never read. Its description says that a waiting invite admits the caller, redeemed from the host's own list.role.defaultsays it is also whatadmitMembergives when no roles are named, withmemberwhen no role is marked default.inviteandcreateInvitecall the space the inbox, as doesdocs/reference/api.md.ejectMember'sreasonis now kept (below), and it listsLastConfigurer, which it answers.Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjde5vf4oeh
negateLabel answers its record. It returns the negation's
uriandcid, asapplyLabeldoes and as its lexicon requires, where before it answered{}. The negation is a record someone may want to cite. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdeiu4jvwuAn ejection is kept in the group's queue. Once
ejectMemberhas put someone out, it notes anejectevent on the member's DID with who did it and thereason, if one was given.getSubjectHistoryshows it, aseventView.kindalways said. A reason longer than the lexicon's 300 graphemes or 3000 bytes is refused. Like a label, an ejection opens a subject nobody reported. Leaving keeps nothing there. The moderation and membership pages say so. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdelnfwy3gThe migration module's doc says only the
opensocialcommand walks through a move, since the console has no page for it. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdecer6zlclistSpaceRecords loses
revandactors, which it never answered. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdga4n3ysdWhy
The lexicons are what clients and assistants (whose MCP tools are described from them) are written from. None is published yet, so they can still be made to say what the host does. Where the lexicon described the better contract (a negation's record, an ejection in the moderation history), the code changed to match it instead.
The removed fields are still named in the code under other meanings (
displayName,bot,inviteand so on). The lexicon check's growth rule counts them as referred to, so they are let go by name in itsretractedset, each with why.How it was checked
tests/moderation.rs(writes_a_label_beside_what_it_labels) now checks thatnegateLabelanswers the negation's ownuriandcid. It failed before the fix.tests/members.rs(one_put_out_reads_no_more) now checks theejectevent, its actor and its reason in the queue, and that an overlong reason is refused. It failed before the fix.cargo test --workspacepasses, including the interop and command tests on the reference PDS. So docargo fmt --all,cargo clippy --workspace --all-targets -- -D warningsandnode harness/lexicons.mjs.web/srcreads the removed fields.Shortcomings
listSpaceRecordsstill answers"cursor": nullon its last page, where its lexicon has a string. It is not in this batch, so it is left as found.lexicons/unusedbranch (which also removesleaving) lands first, theleavingentry inretractedmatches nothing and can go.🤖 Generated with Claude Code