feat(manager): finish the create flow, and repair a room's history in one call - #209
Merged
Conversation
… one call The console can now do both things it could compose and never send. Both land through `@openvtc/trust-tasks` 0.17.8 and OpenVTC/verifiable-trust-infrastructure#1332. **Creating a room now finishes.** Its second step called `rooms/create` addressed to a host, and this console cannot address a host — its bridge carries a type and a payload and the background addresses everything to the wallet's own VTA — so the registration never arrived and every create stopped halfway, leaving an owner holding a room DID and signing key for a room that existed nowhere. It now asks the agent, via `rooms/owner/register`, and the agent makes the call. **The history repair exists**, which is the state the rooms pane has been naming since it shipped: a room reading only from the epoch its holder joined at, because the epoch key chain never arrived. `rooms/keys/backfill` is one call where the honest version was three — mint a presentation, ask the host, store the rungs — of which this console could make the first and third and not the second. The screen reads all three numbers the response carries, because they come apart and only one answers the question. Nothing served means the host has no more, and is not a failure. Rungs served with the reach unmoved means they sit below a gap — early rather than wrong, and asking again is the repair, not evidence the history is gone. Reporting `stored` alone would celebrate over a room that still cannot open a word of it. It asks for the host because the agent does not know one: `rooms/keys/list` reports key custody, hosting is a different fact, and a room is portable so a remembered host would go stale the moment it moved. The create-flow tests moved with the code rather than being deleted: they now pin `rooms/owner/register`, and say why naming `rooms/create` there would be pinning a call that lands at a party which does not serve it. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
🛡️ AI Agentic Security Code Review🔎 A manual security review is recommended before merging. Please contact the Security team for specifics and remediation guidance.
|
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.
The console can now do the two things it could compose and never send. Lands on
@openvtc/trust-tasks0.17.8 and OpenVTC/verifiable-trust-infrastructure#1332.Creating a room now finishes
Its second step called
rooms/createaddressed to a host — and this console cannot address a host. Its bridge carries a type and a payload, and the background addresses everything to the wallet's own VTA, so the recipient never travelled. Every create stopped halfway: the DID was minted (the agent's own work, which succeeds) and the registration never arrived, leaving an owner holding a real, unrecoverable room DID and signing key for a room that existed nowhere.It now asks the agent via
rooms/owner/register, and the agent makes the call. The order is unchanged and still forced — identity first, then a host is told about a room that already exists.The history repair exists
This is the state the rooms pane has named since it shipped and could not fix: a room reading only from the epoch its holder joined at, because the epoch key chain never arrived.
rooms/keys/backfillis one call where the honest version was three — mint a presentation, ask the host for the rungs, store them — of which this console could make the first and the third and not the second. The agent does all three, holding both the credentials and the group state.The screen reads all three numbers, because they come apart and only one answers the question:
fetched: 0stored: 0, rungs servedReporting
storedalone would celebrate over a room that still cannot open a word of its history.It asks for the host because the agent does not know one:
rooms/keys/listreports key custody, hosting is a different fact it has no view of, and a room is portable — so a remembered host would go stale the moment the room moved. The screen also says the credentials never pass through the console, since "where did my membership go" is the obvious question when a browser asks for a host DID.The tests moved with the code
rooms-create.render.test.mtsnow pinsrooms/owner/register, and its constant says why namingrooms/createthere would be pinning a call that lands at a party which does not serve it. The backfill render tests are rewritten for one call: what is left to get wrong is no longer ordering, it is reporting the wrong number, and each of the three outcomes is asserted against the words on screen.Verification
npm run lint,npm run build,npm test— all green, 1066 tests, 0 failures. Coverage census resynced against the merged SDK: 196 → 198 of 216, with the reasoning recorded intask-surface.mjs(their host-served counterparts stay inNOT_IN_SDKand stay uncallable from here — that is not a gap left open, it is what the agent sends onward).Bundles checked by hand:
background.jsstill carries thespec/rooms/prefix exactly once, and it is the page-task refusal string, which belongs in the worker.What this closes
The data-rooms console is now complete for everything a member or owner does that terminates at their agent: see the rooms you hold keys for, diagnose which of the two delivery failures you are looking at and repair it, create a room end to end, and issue invitations, membership and authority in the room's name.
Record browse/read/write is the remaining surface, and it needs the same treatment — host-served verbs asked of the agent.