Skip to content

fix: const-to-let for currentPolicy reassignment#232

Merged
dnandakumar-nv merged 1 commit intomainfrom
fix/const-currentPolicy-reassignment
Mar 17, 2026
Merged

fix: const-to-let for currentPolicy reassignment#232
dnandakumar-nv merged 1 commit intomainfrom
fix/const-currentPolicy-reassignment

Conversation

@ericksoa
Copy link
Copy Markdown
Contributor

Summary

  • Fix runtime TypeError: Assignment to constant variable when applyPreset() encounters a sandbox with an existing policy that has no version: field

currentPolicy was declared const but conditionally reassigned on the branch that prepends version: 1\n. Changing to let fixes the crash.

Spotted by @dnandakumar-nv in #49 (comment).

Test plan

  • All 56 unit tests pass

currentPolicy was declared const but reassigned when prepending a
version field to policies missing one. This throws TypeError at
runtime for sandboxes with existing policies that lack a version field.

Spotted by @dnandakumar-nv in #49.
@dnandakumar-nv dnandakumar-nv merged commit 207622e into main Mar 17, 2026
Ryuketsukami pushed a commit to Ryuketsukami/NemoClaw that referenced this pull request Mar 24, 2026
…or (NVIDIA#232)

currentPolicy was declared const but reassigned when prepending a
version field to policies missing one. This throws TypeError at
runtime for sandboxes with existing policies that lack a version field.

Spotted by @dnandakumar-nv in NVIDIA#49.
jessesanford pushed a commit to jessesanford/NemoClaw that referenced this pull request Mar 24, 2026
…or (NVIDIA#232)

currentPolicy was declared const but reassigned when prepending a
version field to policies missing one. This throws TypeError at
runtime for sandboxes with existing policies that lack a version field.

Spotted by @dnandakumar-nv in NVIDIA#49.
mafueee pushed a commit to mafueee/NemoClaw that referenced this pull request Mar 28, 2026
* fix(cli): improve completion coverage and gateway selection

Closes NVIDIA#232

Add typed completion metadata for gateway, sandbox, and path arguments, make gateway selection interactive on TTYs, and expose root subcommands in completions while keeping non-interactive behavior stable.
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.

2 participants