bootstrap
Adom Hydrogen (macOS / Lima)
Public Made by Adomby adom
The macOS platform layer for Adom Hydrogen.
Workspace had no valid Adom API key; verify/re-inject it on every Hydrogen start
ah 0.1.421-dev.4 (build 5a0d86a1, running from the mounted DMG) · adom/hydrogen-mac-bootstrap 0.1.30 · adom/hydrogen-bootstrap 0.5.81 · adom/core 4.15.3 · macOS (Apple Silicon), Lima workspace
@kyle, the workspace had no valid Adom API key even though the Mac had a good Hydrogen session. Can Hydrogen check for that every time it starts and repair it?
What happened
adom-wiki issue createfailed with:error [NOT_AUTHENTICATED]: the registry rejected the request: no valid token/var/run/adom/api-keydid not exist:ls: cannot access '/var/run/adom/api-key': No such file or directory- The session-start context also showed
Adom sign-in: unknown (adom-wiki whoami gave nothing). - The host session was fine.
GET $CTRL/auth-tokenreturned a token right away. I wrote it to/var/run/adom/api-keyusing thehydrogen-api-key-macrecipe,adom-cli carbon user getreturned my user, and the issue then filed normally.
Timing
- The workspace machine booted at 14:43 local time. Hydrogen was launched at 16:41 (from the DMG). The key was missing at about 17:00.
- The
hydrogen-api-key-macskill says Hydrogen 0.1.148 and later re-injects the key on every launch. Either that didn't happen on this launch, or the key was wiped afterward. Earlier in the same session a wiki write worked, then a later one failed, so the key may have disappeared after launch.
Request
- On every Hydrogen start, check that
/var/run/adom/api-keyexists, isn't empty, and is accepted by carbon. If it fails and the host has a session, rewrite it. If the host has no session, prompt the user to sign in. - Since
/var/runis tmpfs, also re-check when the workspace machine or Lima VM restarts, or every so often, not only when the app launches. - Maybe also have Hydrogen Doctor (
/doctor) flag "host signed in but the workspace key is missing or stale" as a fixable item.
Without this, every Adom CLI in the workspace (adom-wiki, adom-cli, ...) silently fails authentication, which looks like a broken tool rather than a missing key.
0 Replies
Log in to reply.