An upgraded install never sees enrolment, so it can never connect again #66
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
v2
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wayfinder:ticket
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiko/denpa#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-07-31 by launching the desktop app against a go-between running
#26's gate — the first time anything ran the two halves together.What happens
The app opens straight into the receiver chrome. Onboarding never draws, so there is no way to enrol, so the socket is refused forever. The server says so once per attempt:
The client is not at fault at the wire:
services/websocket-service.tsx:217callsfirstFrame(), getsnullbecause there is no credential and no pending code, and correctly leaves the socket to the gate's timeout. It is doing the right thing with nothing to present. It is simply never shown the screen that would give it something.Why
App.tsx:114gates the entire enrolment path on one boolean:and
hooks/receiver/use-onboarding.ts:53reads that fromlocalStorage:Any device that went through setup under ADR-0004 has
denpa.onboarded = trueleft in its webview store. On this machine the store also still helddenpa.deviceId = 059ca39b-6455-4186-b7cb-f1c24d42ba61— the old allowlisted id — and, of course, no token.So the flag says "this device has been through setup" and it is true: the device went through the setup that existed at the time. ADR-0011 changed what setup produces, and nothing re-runs it.
The intent is already written down, three lines above the bug
use-onboarding.ts:49-52:That last sentence is the fix, and it is not implemented. Nothing sends a refused device anywhere. Grep for
ONBOARDED_KEYfinds three hits — the constant, the import, the read — and no writer other thanfinish, so there is no reset path either.denpa#37's reset was assumed to survive ADR-0011 as "the deliberate way to re-enroll"; in the client it does not exist.Why no test caught it
Every test starts from empty storage, where
donedefaults tofalseand onboarding draws correctly. The broken state is only reachable by upgrading, which no test does and no fresh device does. The Pad and the Pixel will not hit this — they have never onboarded. It bites exactly one population: installs that predate#26. That is why the whole board went green through it.Same shape as the rest of this project's real defects: nothing throws, nothing fails, a screen just never appears.
Acceptance
denpa.onboardedsays — the credential, not the flag, decides whether setup is neededuse-onboarding.ts:49-52already promisesdenpa.onboarded = truewith no credential and asserts enrolment draws — the case no existing test coversdenpa.deviceIdshould be cleared on enrolment; it is a dead ADR-0004 leftover that currently outlives the model that gave it meaningWorkaround used today
Stop the app, then delete
%LOCALAPPDATA%\works.aiko.ollvt\EBWebView\Default\Local Storage\leveldb. That also dropsdenpa.pal.scale, which is cosmetic. Not a fix — nobody should have to know this.Related
ollvt-hermes-bridge#26,denpa#40, ADR-0011,denpa#37Merged to
maininee25aaa.Fix. The credential decides, and it survives a dropped socket.
use-onboarding.tsno longer treats a missing local flag as 'never enrolled', so an upgraded install that already holds a credential connects instead of being sent back through setup with no way forward. Newservices/origin.tsresolves the station the device enrolled against, so her model is served from that origin rather than a stale default.Tests.
use-onboarding.test.ts(+122) andservices/origin.test.ts(+57). Gate on merged main: 62 files / 854 tests passing.