Skip to content

fix(rooms): grant guidance from a live room, and don't rank on opaque keys - #52

Merged
stormer78 merged 1 commit into
mainfrom
feat/rooms-grant-hints
Nov 11, 2026
Merged

stormer78 merged 1 commit into
mainfrom
feat/rooms-grant-hints

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Follow-up to #49, from the first test against a live VTA and room: room …9381cab… on first.openvtc.net, hosted by first-vtc, read as the personal persona once-rug.

What the live test showed

Working end to end:

  • doctor reports first: 8 recallable, 0 refused.
  • memory_recall over MCP returns room records whose did:webvh authors (on dids.firstperson.dev, dids.ic3.dev and webvh.storm.ws) all come back verified.
  • The member's own note is marked thisMember: true, and results are fenced.
  • memory_get with room returns the body.

The grant. The application role already includes roomPresent and roomOpen. A read is refused with rooms/keys/browse:notAMember … as a persona you may act as until the agent's grant covers a context that holds the member persona. Here, the persona's DID and key are in openvtc-iiw1/oss-developer, but the room's credentials were only reachable once openvtc-iiw1 was granted. Custody is checked by context with ancestry, so a grant on the child context doesn't reach credentials held under the parent.

I first suspected a stale cached session token, and a 15-minute retry ruled that out. The parent grant then worked on the first try.

Changes

  • doctor: on notAMember, prints the exact pnm acl update <agent> --contexts <memory context>,<that context> command, advises a personal persona over the VTA's or a community's own DID, and says to try the parent context if the persona's own isn't enough. This comes from rooms::grant_hint, which has a unit test.
  • rooms add: says up front that the agent's grant must cover the member persona's context.
  • Ranking: an untitled room record no longer ranks on its storage key (RoomRecord::rank_name), though the key is still shown as its name. Keys must be opaque on sealed rooms, and live keys like note/<hash> matched every query containing "note". Live, "IIW test note" went from 7 results to 4, and the one remaining untitled record matches on its body.
  • Eval: a new probe in sources-room-abstention ("an untitled record's key is not its name") fails under the old ranking and passes now. sources is 11/11 and all checks are 40/40; the other dimensions are unchanged.
  • README: room grant guidance, including the parent-context case.

Version 0.8.1 → 0.8.2.

Changed on the test VTA (by the operator, not by this PR)

  • Created the agent-memory context.
  • Enrolled the agent via init → pnm acl create → connect.
  • Granted the agent agent-memory and openvtc-iiw1.

… keys

Tested against a live VTA and a room on first.openvtc.net.

- doctor turns a `notAMember` room refusal into the `pnm acl update`
  that fixes it. The room capabilities come with the `application` role;
  what is missing is a context holding the member persona, and the
  room's credentials can be held under a parent of the persona's own
  context (live: persona in openvtc-iiw1/oss-developer, credentials
  only reachable with openvtc-iiw1 granted).
- An untitled room record no longer ranks on its storage key. Keys are
  opaque on sealed rooms; `note/<hash>` keys matched every query
  containing "note" (live: 7 results -> 4). Eval probe added; it fails
  under the old ranking.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 merged commit f1e8466 into main Nov 11, 2026
4 checks passed
@stormer78
stormer78 deleted the feat/rooms-grant-hints branch November 11, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant