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

chadtmiller.com/hatk

AT Protocol app framework

1
0

A reader refused as SpaceNotFound is refused, not told the space is gone

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/hatk:refused-reader-not-gone

The reference PDS, since 0.0.0-spaces-alpha-20261029171913, answers a reader it refuses SpaceNotFound rather than UserNotAuthorized, so as not to disclose that the space exists. hatk read SpaceNotFound as a deleted space (isSpaceGone), which meant:

  • getSpaceCredential stopped at the first refused reader instead of asking the next candidate;
  • reconcileAll unwatched the space for good, so an app such as grain stops following a group's pool once a host on this alpha refuses one reader (say, someone who left).

Now a signed-in reader's SpaceNotFound is reported as UserNotAuthorized, as mintPublicSpaceCredential already reports it as NotPublic, and only SpaceDeleted means a space is gone. A space that never existed is no longer unwatched on its own; it stays followed with its error recorded until the authority says SpaceDeleted or notifySpaceDeleted arrives.

Tests: two new in spaces-credential.test.ts (the refusal is a refusal; the next reader is asked), and "a deleted space stops the walk" now uses SpaceDeleted. Full suite: 1678 passed, 1 skipped, 2 todo. docs/spaces-appview.md notes the change.

Needed by grain before the opensocial host on this alpha is deployed; grain then bumps to the release carrying it.

🤖 Generated with Claude Code

Merged as 846819b