Skip to content

fix(policy): add weather preset for wttr.in and Open-Meteo#1918

Open
BenediktSchackenberg wants to merge 3 commits intoNVIDIA:mainfrom
BenediktSchackenberg:fix/weather-skill-policy-1417
Open

fix(policy): add weather preset for wttr.in and Open-Meteo#1918
BenediktSchackenberg wants to merge 3 commits intoNVIDIA:mainfrom
BenediktSchackenberg:fix/weather-skill-policy-1417

Conversation

@BenediktSchackenberg
Copy link
Copy Markdown
Contributor

@BenediktSchackenberg BenediktSchackenberg commented Apr 15, 2026

Problem

The built-in weather skill fails inside the sandbox because wttr.in and api.open-meteo.com are not in any policy preset. web_fetch calls return fetch failed and the skill falls back to a text explanation that it cannot retrieve weather data.

[tools] web_fetch failed: fetch failed
I attempted to use the weather skill...but it appears that network requests are currently blocked

Fix

Added nemoclaw-blueprint/policies/presets/weather.yaml with:

  • wttr.in:443 (GET) — primary weather source used by the skill
  • api.open-meteo.com:443 (GET) — free weather API, no key required
  • geocoding-api.open-meteo.com:443 (GET) — city name → coordinates lookup

Apply with:

nemoclaw <sandbox> policy-add weather

The preset is intentionally not included in any default tier — most workflows don't need weather data. Users who want the weather skill can add it explicitly.

Also updated docs/reference/network-policies.md with a note about the preset, regenerated agent skills, and added 3 regression tests.

Fixes #1417

Signed-off-by: Benedikt Schackenberg 6381261+BenediktSchackenberg@users.noreply.github.com

Summary by CodeRabbit

  • Documentation

    • Clarified onboarding behavior when a pre-existing sandbox session is detected and documented NEMOCLAW_SINGLE_SESSION to make the installer abort
    • Noted that the weather preset is excluded from default policy tiers and must be added explicitly
  • New Features

    • Added a configurable weather network preset for retrieving weather and geocoding data
  • Tests

    • Added validation tests for the weather preset

The built-in weather skill requires network access to wttr.in and
Open-Meteo, but no policy preset existed for these endpoints.
Without the preset, web_fetch calls fail and the skill cannot return
weather data from inside the sandbox.

Added nemoclaw-blueprint/policies/presets/weather.yaml with:
- wttr.in:443 (GET) — primary weather source
- api.open-meteo.com:443 (GET) — free weather API fallback
- geocoding-api.open-meteo.com:443 (GET) — city name resolution

Apply with: nemoclaw <sandbox> policy-add weather

Also:
- docs/reference/network-policies.md: note that weather preset exists
  but is not included in any default tier
- test/validate-blueprint.test.ts: regression tests for the preset

Fixes NVIDIA#1417

Signed-off-by: Benedikt Schackenberg <6381261+BenediktSchackenberg@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 15, 2026 18:38
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a848e22a-59f2-4450-9f6a-78a6f26875aa

📥 Commits

Reviewing files that changed from the base of the PR and between 5751beb and e34f558.

📒 Files selected for processing (2)
  • .agents/skills/nemoclaw-user-reference/references/network-policies.md
  • docs/reference/network-policies.md
✅ Files skipped from review due to trivial changes (2)
  • docs/reference/network-policies.md
  • .agents/skills/nemoclaw-user-reference/references/network-policies.md

📝 Walkthrough

Walkthrough

Added a new weather network policy preset (wttr.in, api.open-meteo.com, geocoding-api.open-meteo.com), updated docs to note the preset is excluded from default tiers and must be applied via nemoclaw <sandbox> policy-add weather, documented installer warning for existing sandbox sessions and NEMOCLAW_SINGLE_SESSION=1, and added tests validating the preset.

Changes

Cohort / File(s) Summary
Documentation
.agents/skills/nemoclaw-user-reference/references/commands.md, .agents/skills/nemoclaw-user-reference/references/network-policies.md, docs/reference/network-policies.md
Documented that the weather preset is excluded from default policy tiers and must be enabled with nemoclaw <sandbox> policy-add weather. Documented installer behavior that warns on pre-existing sandbox sessions and NEMOCLAW_SINGLE_SESSION=1 to make the installer abort.
Network Policy Preset
nemoclaw-blueprint/policies/presets/weather.yaml
Added weather preset declaring three enforced HTTPS REST endpoints (wttr.in:443, api.open-meteo.com:443, geocoding-api.open-meteo.com:443) allowing GET requests and bound to /usr/local/bin/node and /usr/local/bin/openclaw.
Tests
test/validate-blueprint.test.ts
New tests load the weather preset and assert presence of the three hosts and that each endpoint includes at least one rule allowing GET requests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through YAML, sniffed the breeze,
Three endpoints hidden in the trees.
Add the preset, unlock the sky,
Sandbox whispers, "now give it a try!" ☀️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly identifies the primary change: adding a weather preset configuration for wttr.in and Open-Meteo API endpoints.
Linked Issues check ✅ Passed The PR successfully addresses issue #1417 by implementing the weather policy preset with GET access to wttr.in, api.open-meteo.com, and geocoding-api.open-meteo.com, plus documentation updates and regression tests.
Out of Scope Changes check ✅ Passed All changes are directly related to resolving the weather skill sandbox issue: policy preset definition, documentation updates, and validation tests. No unrelated modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an explicit, opt-in network policy preset to allow the built-in weather skill to fetch data from its upstream providers while keeping default policy tiers unchanged.

Changes:

  • Added a new weather policy preset allowing GET-only access to wttr.in and Open-Meteo (including geocoding).
  • Documented that the preset is not included in any default tier and must be manually applied.
  • Added regression tests and regenerated the agent reference markdown artifacts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/validate-blueprint.test.ts Adds regression tests ensuring the new weather preset exists and covers required hosts/methods.
nemoclaw-blueprint/policies/presets/weather.yaml Introduces the weather preset with required endpoints and binaries for the weather skill.
docs/reference/network-policies.md Documents manual application of the weather preset and why it’s excluded from tiers.
.agents/skills/nemoclaw-user-reference/references/network-policies.md Regenerated agent reference reflecting the new note about the weather preset.
.agents/skills/nemoclaw-user-reference/references/commands.md Regenerated agent reference; picks up existing installer/session documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const hosts = weatherEndpoints().map((ep) => ep.host);
expect(hosts).toContain("api.open-meteo.com");
});

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regression tests for the weather preset assert wttr.in and api.open-meteo.com, but do not assert geocoding-api.open-meteo.com even though the preset includes it and the PR description calls it required for city-name lookups. Add an assertion for the geocoding host so a future removal/rename doesn’t silently break the weather skill while tests still pass.

Suggested change
it("regression #1417: weather preset covers geocoding-api.open-meteo.com", () => {
const hosts = weatherEndpoints().map((ep) => ep.host);
expect(hosts).toContain("geocoding-api.open-meteo.com");
});

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/reference/network-policies.md`:
- Line 109: Replace the bolded callout with a MyST admonition (use :::note) and
split the sentences so each sentence is on its own source line; specifically
update the line describing the `weather` preset (`wttr.in`,
`api.open-meteo.com`, `geocoding-api.open-meteo.com`) and the installation hint
(`nemoclaw <sandbox> policy-add weather`) into separate lines inside the
admonition, and remove the GitHub issue URL
(https://github.com/NVIDIA/NemoClaw/issues/1417) entirely so the docs contain
only the official guidance and comply with the one-sentence-per-line rule.

In `@test/validate-blueprint.test.ts`:
- Around line 372-385: The test "regression `#1417`: weather preset covers
api.open-meteo.com" that collects hosts via weatherEndpoints() and asserts hosts
contains "api.open-meteo.com" should also assert that hosts contains
"geocoding-api.open-meteo.com"; update the test (the block using const hosts =
weatherEndpoints().map((ep) => ep.host) and the expect(hosts).toContain(...)
line) to include an additional
expect(hosts).toContain("geocoding-api.open-meteo.com") so removal of that host
will fail the suite.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3fa14e68-9401-4f05-8c85-a63048c1cb6a

📥 Commits

Reviewing files that changed from the base of the PR and between 1d4d8a2 and a0a55c1.

📒 Files selected for processing (5)
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • .agents/skills/nemoclaw-user-reference/references/network-policies.md
  • docs/reference/network-policies.md
  • nemoclaw-blueprint/policies/presets/weather.yaml
  • test/validate-blueprint.test.ts

Comment thread docs/reference/network-policies.md Outdated
Comment thread test/validate-blueprint.test.ts
- docs: replace Markdown blockquote with MyST admonition and remove
  GitHub issue URL from docs/ per coding guidelines
- test: add missing assertion for geocoding-api.open-meteo.com

Per Copilot + CodeRabbit review on NVIDIA#1918.

Signed-off-by: Benedikt Schackenberg <6381261+BenediktSchackenberg@users.noreply.github.com>
@BenediktSchackenberg
Copy link
Copy Markdown
Contributor Author

Addressed both review points:

  1. Docs: replaced the Markdown blockquote with a MyST :::{note} admonition and removed the GitHub issue URL from the docs source
  2. Test: added assertion for geocoding-api.open-meteo.com — 38 tests pass

- Split the weather preset note into one sentence per line
- Keep the note concise and docs-compliant
- Regenerated agent skills artifacts after the docs change

Per CodeRabbit review on NVIDIA#1918.

Signed-off-by: Benedikt Schackenberg <6381261+BenediktSchackenberg@users.noreply.github.com>
@BenediktSchackenberg
Copy link
Copy Markdown
Contributor Author

Fixed the docs style issue (split into one sentence per line, kept the MyST note) and added the missing geocoding host assertion. 38 tests still pass.

@wscurran wscurran added NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). fix enhancement: policy labels Apr 15, 2026
@wscurran
Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this PR, which proposes a way to improve the NemoClaw policy by adding a weather preset for wttr.in and Open-Meteo. This could help resolve the issue reported in #1417, where the weather skill fails inside the sandbox.


Possibly related open issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement: policy fix NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms][Skill] weather skill cannot complete in sandbox

3 participants