Skip to content

fix(cli): validate metadata.gatewayName type in normalizeSession #1283

@ericksoa

Description

@ericksoa

Bug

In src/lib/onboard-session.ts, normalizeSession copies metadata.gatewayName without checking its type. A persisted payload like { "metadata": { "gatewayName": 123 } } survives normalization, so loadSession() can return a Session where metadata.gatewayName is not a string.

Fix

Add typeof gatewayName === "string" check before copying it into the normalized session.

Found by

CodeRabbit review on #1272. Pre-existing from original JS.

Metadata

Metadata

Assignees

Labels

NemoClaw CLIUse this label to identify issues with the NemoClaw command-line interface (CLI).bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions