Skip to content

feat(manager): realign a DID's key records from the console - #245

Merged
stormer78 merged 1 commit into
mainfrom
feat/realign-keys-console
Sep 14, 2026
Merged

stormer78 merged 1 commit into
mainfrom
feat/realign-keys-console

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Completes the chain that started with the rename bug in #243. Drives vta/webvh/dids/realign-keys/1.0 from the DIDs pane.

Depends on OpenVTC/verifiable-trust-infrastructure#1470 (the dispatch arm). Merge that first — this snapshot claims the task is in vta-sdk, and until #1470 lands that is true only on its branch.

The dry run is the diagnosis, not a courtesy

Nothing on this screen tells an operator whether a DID needs realigning: the answer lives in the agent's key store and the DID's published log, and comparing them is precisely what the task does. So the preview is the feature — a consistent DID says so, and one that isn't lists every rename before any of them happen.

Which is why the action is offered on every DID rather than only where the console thinks it's needed. Deciding that here would mean a second, client-side copy of the comparison, and a copy that disagreed with the agent's would be invisible to the operator.

A repair is not a destruction

Destructive was the obvious home — already ask-then-confirm, and it already routes a consent refusal to the ceremony instead of a red string. But its voice is deletion throughout: a danger button, "what this would destroy", a danger note. A realign renames records and leaves key material untouched, and drawing that in red is the lie manager-theme.css forbids, where --w-danger is one of three colours that mean something.

So the shape of the decision stays shared and the voice became a parameter: nature: "corrective" asks what would change and draws in the accent. No force tick, because there's no refusal to override. A second component would have been a second place for the consent-refusal handling to be forgotten.

The three outcomes are kept apart

moved empty with unmatched non-empty is not "nothing to change" — it's an agent that cannot finish the repair, because it holds no key for a method the document publishes. Both have an empty moved, and the reassuring reading is the wrong one. Six rendered tests assert each outcome against the words on screen, including that the repair is never dressed as a destruction.

The snapshot moves more than this task

task-surface.json re-syncs 0.35.0 → 0.38.0, and the coverage expectation with it, 204 → 205. The canonical total jumps 227 → 235, and only one of those eight is this task.

The other seven were always in the SDK and invisible to the old scanner, which matched only string literals while vta-sdk increasingly derives a constant from the generated payload type. #244 taught it to resolve those. So this is not the agent growing seven families — it's a denominator that had been under-counting the very gap this number exists to keep reviewable. Nothing is lost in the resync: all 245 tasks in the old snapshot survive.

Checks

npm test — 1352 across the workspace, 0 failures. npm run build clean.

The chain, for the record

dtgwg-trust-tasks-tf#456 (spec) → #457 (unblocked its CI) → releases 0.20.5 / 0.19.5 → VTI#1466 (create fix + repair) → VTI#1470 (dispatch) → #244 (scanner) → this.

Drives `vta/webvh/dids/realign-keys/1.0` (specified at
trustoverip/dtgwg-trust-tasks-tf#456, served by
OpenVTC/verifiable-trust-infrastructure#1466 and dispatched by #1470) from the
DIDs pane.

## The dry run is the diagnosis, not a courtesy

Nothing on this screen tells an operator whether a DID needs realigning: the
answer lives in the agent's key store and the DID's published log, and
comparing them is precisely what the task does. So the preview *is* the
feature — a consistent DID says so, and one that is not lists every rename
before any of them happen.

Which is why the action is offered on every DID rather than only where the
console thinks it is needed. Deciding that here would mean a second,
client-side copy of the comparison, and a copy that disagreed with the agent's
would be invisible to the operator.

## A repair is not a destruction

`Destructive` was the obvious home — it is already ask-then-confirm, and it
already routes a consent refusal to the ceremony instead of a red string. But
its voice is deletion throughout: a danger button, "what this would destroy",
a danger note. A realign renames records and leaves the key material untouched,
and drawing that in red is the lie `manager-theme.css` forbids, where
`--w-danger` is one of three colours that mean something.

So the shape of the decision stays shared and the voice became a parameter:
`nature: "corrective"` asks what would *change* and draws in the accent. No
force tick, because there is no refusal to override. A second component would
have been a second place for the consent-refusal handling to be forgotten.

## The three outcomes are kept apart

`moved` empty with `unmatched` non-empty is **not** "nothing to change" — it is
an agent that cannot finish the repair because it holds no key for a method the
document publishes. Both have an empty `moved` and the reassuring reading is the
wrong one, so the pane says which it is. `dids-realign.render.test.mts` asserts
each of the three against the words on screen.

## The snapshot moves more than this task

`task-surface.json` is re-synced (vta-sdk 0.35.0 → 0.38.0) and the coverage
expectation with it, 204 → 205. The canonical *total* jumps 227 → 235, and only
one of those eight is this task: the other seven were always in the SDK and
invisible to the old scanner, which matched only string literals while vta-sdk
increasingly derives a constant from the generated payload type. The scanner
learned to resolve those in the previous commit, so this is not the agent
growing seven families — it is a denominator that had been under-counting the
gap this number exists to keep reviewable.

Nothing is lost in the resync: all 245 tasks in the old snapshot survive.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 merged commit db16fbb into main Sep 14, 2026
4 checks passed
@stormer78
stormer78 deleted the feat/realign-keys-console branch September 14, 2026 20:22
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