Skip to content

feat(manager): finish the create flow, and repair a room's history in one call - #209

Merged
stormer78 merged 1 commit into
mainfrom
feat/rooms-host-via-agent
Sep 9, 2026
Merged

feat(manager): finish the create flow, and repair a room's history in one call#209
stormer78 merged 1 commit into
mainfrom
feat/rooms-host-via-agent

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

The console can now do the two things it could compose and never send. Lands on @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 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/backfill is 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:

On screen
fetched: 0 "The host served no rungs below what your agent already holds." Not a failure — the history begins there, or was severed before joining.
rungs served, reach unmoved "…the readable range did not move… a gap in what the host served rather than history that is gone. Asking again is the repair."
stored: 0, rungs served Still reports the reach achieved — a retry that found everything already held is a success.

Reporting stored alone 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/list reports 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.mts now pins rooms/owner/register, and its constant says why naming rooms/create there 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 in task-surface.mjs (their host-served counterparts stay in NOT_IN_SDK and stay uncallable from here — that is not a gap left open, it is what the agent sends onward).

Bundles checked by hand: background.js still carries the spec/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.

… 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>
@stormer78
stormer78 merged commit 3618139 into main Sep 9, 2026
3 checks passed
@stormer78
stormer78 deleted the feat/rooms-host-via-agent branch September 9, 2026 05:14
@affinidi-appsecurity-bot

Copy link
Copy Markdown

🛡️ AI Agentic Security Code Review

🔎 A manual security review is recommended before merging. Please contact the Security team for specifics and remediation guidance.

ℹ️ Detailed findings are not published on public repositories; the Security team holds the complete report.

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.

2 participants