Skip to content

[Linux] nemoclaw policy-add fails: missing version field in generated policy YAML #991

Closed

Description

@zNeill

Description

Test Plan 2- https://docs.google.com/document/d/1KkbgO4KClboR6XB52ztkOyeUsUgWTzWXwsVWM4PuCSA/edit?tab=t.0
4.2

Description

1. Issue summary

nemoclaw policy-add fails with failed to parse sandbox policy YAML — missing field 'version' because bin/lib/policies.js generates a policy YAML without the required version field that openshell policy set expects.

2. Detailed description

What were you trying to do?

Apply the outlook policy preset to sandbox my-assistant using nemoclaw my-assistant policy-add.
What happened instead?

Command failed with:

Error:   × failed to parse sandbox policy YAML
  ╰─▶ missing field `version`

  Command failed (exit 1): openshell policy set --policy "/tmp/nemoclaw-policy-1773628802112.yaml" --wait my-assistant

Steps to reproduce:

    Install nemoclaw from repo root: npm install -g .
    Have a sandbox registered (e.g. my-assistant).
    Run nemoclaw my-assistant policy-add.
    Type outlook at the preset prompt.
    Type Y at the confirmation prompt.
    Expected: Outlook preset is applied — graph.microsoft.com, login.microsoftonline.com, outlook.office365.com, outlook.office.com endpoints added. No schema errors.
    Actual: openshell policy set rejects the YAML with missing field 'version'.
Environment: openshell 0.0.4, nemoclaw 0.1.0, Node.js v22.16.0, Ubuntu (asdf). Root cause: The applyPreset() function in bin/lib/policies.js (lines 132–138) generates the merged policy YAML without a version field. When no existing policy is found, it produces:
network_policies:
  outlook_graph:
    ...
But openshell policy set requires:
version: "1.0"
network_policies:
  outlook_graph:
    ...

Log :

  Available presets:
    ○ discord — Discord API, gateway, and CDN access
    ○ docker — Docker Hub and NVIDIA container registry access
    ○ huggingface — Hugging Face Hub, LFS, and Inference API access
    ○ jira — Jira and Atlassian Cloud access
    ○ npm — npm and Yarn registry access
    ○ outlook — Microsoft Outlook and Graph API access
    ○ pypi — Python Package Index (PyPI) access
    ○ slack — Slack API and webhooks access
    ○ telegram — Telegram Bot API access

  Preset to apply: outlook
  Apply 'outlook' to sandbox 'my-assistant'? [Y/n]: Y
Error:   × failed to parse sandbox policy YAML
  ╰─▶ missing field `version`

  Command failed (exit 1): openshell policy set --policy "/tmp/nemoclaw-policy-1773628802112.yaml" --wait m
pruprakash@700d01b-lcedt:~/Documents/pruprakash/openshell-openclaw-plugin/nemoclaw$ 

Steps to reproduce

No steps provided.


[NVB# 5982764]

[NVB#5982764]

Activity

  1. added
    NV QABugs found by the NVIDIA QA Team
    on Mar 26, 2026
  2. WuKongAI-CMU commented on Mar 27, 2026

    @WuKongAI-CMU
    Contributor

    Quick check against current main: this looks already covered in bin/lib/policies.js. The current merge path now injects version: 1 both when there is no current policy and when an existing policy blob is missing a top-level version: field before appending network_policies:.

    That means this report likely needs a re-test on current main before we open another PR for it.

  3. senthilr-nv commented on Mar 27, 2026

    @senthilr-nv
    Collaborator

    The bug is still present on current main (c051cbb). The version: check at lines 170–172 only covers the path where the current policy exists but has no network_policies: section. The third path (lines 133–166) — where the policy does have network_policies: but no version: — never adds the version field.

    Reproduced on DGX Spark: writing a versionless policy with network_policies: through the merge path and calling openshell policy set fails with missing field 'version'.

    PR #101 fixes this correctly.

  4. changed the title [-][NeMoClaw][Linux]  nemoclaw policy-add fails: missing version field in generated policy YAML[/-] [+][Linux] nemoclaw policy-add fails: missing version field in generated policy YAML[/+] on Apr 22, 2026
  5. added
    area: cliCommand line interface, flags, terminal UX, or output
    on Jun 3, 2026
  6. 5 remaining items

  7. latenighthackathon commented on Jun 24, 2026

    @latenighthackathon
    Collaborator

    Hi @zNeill, thanks for raising this. The missing version field in generated policy YAML looks like it was fixed in #101 (v0.0.23), which injects version: 1 when merging a preset into a versionless policy. Could you check whether it is resolved on the latest NemoClaw (v0.0.67)? Cheers!

  8. sandl99 commented on Jun 25, 2026

    @sandl99
    Collaborator

    Retested this flow and it is fixed now.

    Command run:

    nemoclaw dp policy-add outlook
    

    Result:

    Endpoints that would be opened: graph.microsoft.com, login.microsoftonline.com, outlook.office365.com, outlook.office.com
    Apply 'outlook' to sandbox 'dp'? [Y/n]:
    Widening sandbox egress — adding: graph.microsoft.com, login.microsoftonline.com, outlook.office365.com, outlook.office.com
    ✓ Policy version 6 submitted (hash: 9772574021d4)
    ✓ Policy version 6 loaded (active version: 6)
    Applied preset: outlook
    

    The Outlook preset now applies successfully and OpenShell accepts the generated policy, so the missing version field failure no longer reproduces. Closing as fixed.

  9. self-assigned this
    on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NV QABugs found by the NVIDIA QA TeamPRRPRR recommendation trackingVDRLinked to VDR findingarea: cliCommand line interface, flags, terminal UX, or outputneeds: cleanup-reviewInactive item needs maintainer cleanup reviewplatform: ubuntuAffects Ubuntu Linux environments

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions