Repository navigation
fix(rooms): grant guidance from a live room, and don't rank on opaque keys - #52
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #49, from the first test against a live VTA and room: room
…9381cab…on first.openvtc.net, hosted byfirst-vtc, read as the personal personaonce-rug.What the live test showed
Working end to end:
doctorreportsfirst: 8 recallable, 0 refused.memory_recallover MCP returns room records whosedid:webvhauthors (ondids.firstperson.dev,dids.ic3.devandwebvh.storm.ws) all come backverified.thisMember: true, and results are fenced.memory_getwithroomreturns the body.The grant. The
applicationrole already includesroomPresentandroomOpen. A read is refused withrooms/keys/browse:notAMember … as a persona you may act asuntil the agent's grant covers a context that holds the member persona. Here, the persona's DID and key are inopenvtc-iiw1/oss-developer, but the room's credentials were only reachable onceopenvtc-iiw1was 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: onnotAMember, prints the exactpnm 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 fromrooms::grant_hint, which has a unit test.rooms add: says up front that the agent's grant must cover the member persona's context.RoomRecord::rank_name), though the key is still shown as its name. Keys must be opaque on sealed rooms, and live keys likenote/<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.sources-room-abstention("an untitled record's key is not its name") fails under the old ranking and passes now.sourcesis 11/11 and all checks are 40/40; the other dimensions are unchanged.Version 0.8.1 → 0.8.2.
Changed on the test VTA (by the operator, not by this PR)
agent-memorycontext.init→pnm acl create→connect.agent-memoryandopenvtc-iiw1.