~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Host-only methods are fyi.opensocial.internal; no websites or SDK

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/internal-lexicons

Every lexicon and method the opensocial proposal does not have now lives under fyi.opensocial.internal.*, so what is the proposal and what is this host's own is plain from the NSID. Group websites and @opensocial/sdk are gone; a group's own domain stays, as putGroupDomain.

Claude Opus 5.5 · medium effort

What changes

Internal namespace. The 52 methods the proposal lacks (getGroup, listMembers, createGroup, the account-move, import and migrate methods, app passwords, recovery keys, getLogs, getStats, …) move to lexicons/fyi/opensocial/internal/ as fyi.opensocial.internal.<name>, and their routes with them. fyi.opensocial.defs keeps the proposal's seven defs (joinRequest, the moderation views and events); the views only our methods answer (groupView, memberView, actorView, roleView, spaceView, viewerState, …) are fyi.opensocial.internal.defs. The permission sets name the internal methods they list by their new NSIDs. The host has rbac::INTERNAL; the MCP crate's lexicon!(internal "…"); the command's internal(name); the console imports from #lib/lexicons/fyi/opensocial/internal/….

Websites removed. The fyi.opensocial.site record, putSite/deleteSite, fyi.opensocial.siteSpace, the page served around a site (web/shell, /_os/*, client-metadata.json, /_site/), the site kit, the sandbox, opensocial site publish|delete, the site_publish/site_delete tools, the console's Site settings page and examples/kicker. SITE_SHELL_DIR, SITE_HANDLE_RESOLVER and SITE_PLC_URL go.

SDK removed. packages/sdk and docs/reference/sdk.md go, with their steps in the web and e2e checks, just setup, just lint and the change-file check. Nothing here used it once the page around a site went.

Own domain kept. putSiteDomain/deleteSiteDomain are fyi.opensocial.internal.putGroupDomain/deleteGroupDomain; opensocial group domain <group> [--undo] and group_domain; the group view's siteDomain is domain; SITE_CHECK_AT is DOMAIN_CHECK_AT; /tls/ask is unchanged. At a group's address (or its domain), /.well-known/ and /xrpc/ go to the host, the address and www. redirect to a switched-on domain, / redirects to the group's console page, anything else is 404. The Domain card sits on the group's settings page under Handle.

Docs: design/sites.md, reference/site-kit.md and reference/sdk.md go; design/groups.md gains "Its own domain"; api, cli, mcp, config, deploying and development updated. Change file: minor, as none of this was released.

Why

The host answers the proposal's methods and its own beside them under one namespace, so a client could not tell what another group host would also answer. Websites were the host's own feature, outside the proposal, and are dropped; the own-domain handling stays.

How it was checked

  • cargo clippy --workspace --all-targets -D warnings, cargo fmt --check.
  • cargo test --workspace: all pass locally, the new tests/domain.rs (address redirects, www., /tls/ask, NoOwnDomain, NotReaching, handle change resetting it) included. The interop tests need the reference PDS, which wasn't runnable here: left to the test check, with the 100% coverage gate.
  • just lex, just docs, the docs site's build, web npm run check, harness/strings|layers|dialogs.mjs, oxfmt.
  • just look of the settings page (desktop light, phone dark); just shots redrew the three guides whose pictures showed the Site tab.
  • e2e is left to its check.

Shortcomings

  • Our copies of proposal lexicons that had drifted from the proposal keep their drift: fyi.opensocial.defs#joinRequest, modSubjectView, moderationEvent and getModSubjectHistory now ref fyi.opensocial.internal.defs (actorView, modRecordView), listed in harness/lexicons.mjs's retracted.
  • The SQLite table stays site_domain, to need no migration.
  • Site records already in groups' repos stay there, unread.
  • The Domain card's switched-on state wasn't drawn: no seed gives a group a handle on its own domain.

Review

Start with crates/group-host/src/group_domain.rs (the address middleware) and oauth_scope.rs (ASKS now holds full NSIDs).

Approved

This pull moves the 52 host-only methods and their routes to fyi.opensocial.internal.* and removes group websites. It keeps a group's own domain as putGroupDomain and deleteGroupDomain.

I read group_domain.rs, oauth_scope.rs, rbac.rs and lib.rs, where the routes and middleware are wired. I found no bug.

  • group_domain.rs: serve passes /.well-known/ and /xrpc/ through. It redirects the address and www. to a switched-on domain. It redirects / to the console and answers 404 for everything else. That matches the description.
  • oauth_scope.rs: ASKS now holds full NSIDs and parts strips only rpc:. Each method still matches its own entry, and unlisted scopes still match nothing.
  • lib.rs: the route renames are consistent. lexicons::check now sits inside group_domain::serve, as sites::serve used to wrap it.

I did not read the other roughly 300 files of the 31k-line diff. They are mostly mechanical renames, the deleted site and kicker code, docs and screenshots. I relied on the author's report that fmt, clippy and the local tests pass.

When I looked, the check, e2e, docs, web, test and lexicons runs were still running or queued. Merging should wait for them, in particular test for the 100% coverage gate and e2e for the pictures.

The old unprefixed NSIDs (fyi.opensocial.getGroup and the rest) are no longer served, so any deployed client breaks. The major change file covers that.

Approved

The only change since my approval at 54578ab is the change file's bump, from major to minor. No code changed, so my earlier findings still hold. Dropping the old unprefixed NSIDs and the site routes breaks deployed clients. If the project's versioning treats that as breaking, minor is the wrong level, but that is your decision. Merging should still wait for the test and e2e checks.

Approved

The only change since my approval at daed001 is the commit "The SDK is gone". It removes packages/sdk, its page, and its steps in the web and e2e checks, just setup, just lint and the change-file check. I read the commit message and searched the head for leftover references, and I didn't read the whole diff. The only ones left are two stale lines in .dockerignore (14 and 15, packages/sdk/...). They do no harm, but you can delete them. The change file already says the SDK is gone. At this head, check, lexicons and docs pass. test, e2e and web were still running. Merging should wait for test (the coverage gate) and e2e.

Approved

The only change since my approval at bccbacf is in crates/group-host-mcp/src/lib.rs. The "ref" arm of the schema match now carries its resolve call in a let guard, instead of matching on the result inside the arm. Behaviour looks the same. A ref that is too deep or doesn't resolve falls to _ => json!({}), which is what the old None => json!({}) did. That likely also removes a branch the 100% coverage gate would have wanted covered. My earlier approval stands.

At this head, lexicons passes. check, test, e2e and docs were still running and web was queued. Merging should wait for test (the coverage gate) and e2e.

Merged as cd6df5d