Skip to content

test(cli): regression test for non-string gatewayName normalization#2112

Merged
ericksoa merged 1 commit intomainfrom
fix/validate-gateway-name-type-v2
Apr 20, 2026
Merged

test(cli): regression test for non-string gatewayName normalization#2112
ericksoa merged 1 commit intomainfrom
fix/validate-gateway-name-type-v2

Conversation

@ericksoa
Copy link
Copy Markdown
Contributor

@ericksoa ericksoa commented Apr 20, 2026

Summary

Supersedes #1286 — the code fix landed in #2082 via parseSessionMetadata/readString; this PR carries forward the regression test.

Credit

Test authored by @latenighthackathon in #1286. Their other merged contributions to NemoClaw include #1125, #1133, #1137, #1220, #1302, #1358, #1392, #1597, #1602, #1772, #1773, #1774, #1846.

Test plan

  • npx vitest run src/lib/onboard-session.test.ts — all 21 tests pass

🤖 Generated with Claude Code

Verifies that a numeric gatewayName in session metadata is replaced
with the default "nemoclaw" during normalization.

Closes #1286
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

A new test case was added to verify that non-string metadata.gatewayName values are properly normalized to strings when loading a session file.

Changes

Cohort / File(s) Summary
Session Type Normalization Test
src/lib/onboard-session.test.ts
Added a Vitest test case that verifies non-string metadata.gatewayName values (e.g., numeric 123) are normalized to string values ("nemoclaw") during session loading.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A number sneaks where strings belong,
But our test catches it before long!
Normalize, validate, all types in place,
Quality assurance with a bunny's grace! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a regression test for non-string gatewayName normalization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/validate-gateway-name-type-v2

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericksoa ericksoa merged commit 25ed6c3 into main Apr 20, 2026
19 checks passed
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