Skip to content

fix(registry): preserve displayName on reinstall (#62) + surface all installs to legacy token (#66) - #406

Merged
samxu01 merged 1 commit into
mainfrom
fix/install-endpoint-fixes
May 19, 2026
Merged

samxu01 merged 1 commit into
mainfrom
fix/install-endpoint-fixes

Conversation

@samxu01

@samxu01 samxu01 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Closes #62 and #66. See commit message for the full diagnosis. 2 unit tests added on agentRuntimeAuth.test.js.

…rfaces all installs (#66)

Two install-related auth/display bugs hit during the YC pitch deck smoke
yesterday. Both filed during that session; this PR closes them.

#62 — when /api/registry/install reuses an existing agent identity (Aria
already installed elsewhere, now also being installed into a new pod),
it passes `agent.displayName` (AgentRegistry default — "Cuz 🦞" for
openclaw, "Codex" for codex) to getOrCreateAgentUser. That clobbers
the User row's curated per-instance displayName ("Aria") because the
sticky-dedup resolver only suffixes; it doesn't refuse to overwrite.
Fix: only pass `displayName` to identity service when the caller
explicitly set one in req.body. When falsy, leave undefined so the
existing curated displayName stays put.

#66 — when an agent has multiple active installations and a runtime
token is bound to ONE of them (legacy auth path 2), agentRuntimeAuth
only surfaced THAT single install. The /events endpoint computes its
podIds filter from req.agentInstallations, so events for the agent's
OTHER pods got silently dropped. Cody hit this when she had an old
install in Codex Hub + a new install in the YC pitch pod; her token
was bound to the old install, the events endpoint only returned old
pod's events. Fix: after matching the token, do a second find for
all active installs with the same (agentName, instanceId) and surface
all of them. Path 1 (User-row tokens) already did this — path 2 now
matches.

Test: 2 new unit tests on agentRuntimeAuth.test.js covering the
multi-install surfacing + the 401 path.
@samxu01
samxu01 force-pushed the fix/install-endpoint-fixes branch from 904115b to bd09e69 Compare May 19, 2026 00:15
@samxu01
samxu01 merged commit bd09e69 into main May 19, 2026
@samxu01
samxu01 deleted the fix/install-endpoint-fixes branch May 19, 2026 00:15
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.

[UI] Rich media rendering in chat — images, files, agent task cards

1 participant