chadtmiller.com/group-host
atmosphere group host
Lexicons nothing refers to may go while none is published
MergedThis pull lets the lexicon check drop a schema, def or field that nothing refers to while PUBLISHED is false. It removes defs#file, basePermissions and migrateExport's leaving. It also carries the docs pulls' commits, which I did not review in depth. I read harness/lexicons.mjs and the lexicon removals. A search for leaving in crates finds only prose, so that removal looks safe. The refusal for defs still in use is sound.
One weakness in the field rule: it treats a field as in use only if its name appears quoted in the code ("field"). Rust struct fields (serde derives), TypeScript property access like .field, and Svelte props are unquoted. A field read that way would be judged unused and its removal let through. That holds only until the first publish, and just lex plus compile and type checks would probably catch the fallout, so I'm not blocking. Consider also matching the bare name as a word, which only makes the rule stricter, or noting the limit in the comment.
harness/lexicons.mjsline 213Outdated
These lines can no longer be read.
This only finds fields written in quotes. A serde struct field, .field in TS or a Svelte prop isn't quoted, so a field the code does use can pass as unused. Matching the bare name as a word as well would be stricter.
The only change since my last review is a merge of main into the branch. The conflicts in AGENTS.md and defs.json were resolved, and I saw no problem in harness/lexicons.mjs.
My earlier note is still open, but I'm not blocking on it. A field counts as used only when its name appears quoted in the code, so a serde struct field, a .field access or a Svelte prop can pass as unused. That matters only until the first publish, and the compile and type checks would probably catch it. Matching the bare name as a word as well would make the rule stricter.
Carried forward: the change this pull makes at 03fb0b917cee49e8efa87eac12f95170e19a882a is the one reviewed at d8d7186c87b22840625065260a9d9f4919e1844e, so that review stands. What is new comes from its base.
What changes
The lexicon check lets a schema, a def or a field be removed when nothing here refers to it, while none of ours is published (
PUBLISHEDinharness/lexicons.mjs, false for now). A def is referred to by a ref in any lexicon (#namewithin its own) or by its id in the code; a field by its name, quoted, in the code. A removal of anything still referred to is refused as before.With it go three leftovers nothing used:
fyi.opensocial.defs#file, thefyi.opensocial.basePermissionspermission set, andmigrateExport'sleavingparameter.This pull includes the docs pulls' commits: at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3mzj7bgoa5egj and at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3mzjc6mhqt2ds.
Why
The schemas are this host's to change until they are published, but the check treated main as published, so nothing could be taken out. Allowing only what nothing refers to keeps the check's protection for everything in use.
How it was checked
just lexpasses with the three removed. Removing a field still in use (migrateExport'spart) and a def still in use (defs#actorView) is still refused.Shortcomings
PUBLISHEDhas to be set by hand once the first lexicon is published.🤖 Generated with Claude Code