Skip to content

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

Closed
BenediktSchackenberg wants to merge 7 commits into
NVIDIA:mainfrom
BenediktSchackenberg:fix/weather-skill-policy-1417
Closed

fix(policy): add weather preset for wttr.in and Open-Meteo#1918
BenediktSchackenberg wants to merge 7 commits into
NVIDIA: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

  • New Features

    • Added a weather preset to enable outbound access to weather and geocoding services; must be enabled explicitly post-onboarding.
  • Documentation

    • Clarified that the weather preset is not included in any default tier and documented the command to enable it after onboarding.
  • Tests

    • Added automated tests to validate required weather endpoints and basic GET access rules.

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

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2b05b748-a8dd-4553-8ebc-b6a5c24fa1ca

📥 Commits

Reviewing files that changed from the base of the PR and between 962fe37 and a5e1d20.

📒 Files selected for processing (1)
  • test/validate-blueprint.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/validate-blueprint.test.ts

📝 Walkthrough

Walkthrough

Adds a new weather network policy preset (enabling outbound HTTPS to specific weather APIs), documentation clarifying the weather preset is not in default tiers and must be enabled post-onboarding, and a test that validates the preset's endpoints and GET rules.

Changes

Cohort / File(s) Summary
Documentation Updates
\.agents/skills/nemoclaw-user-reference/references/network-policies.md, docs/reference/network-policies.md
Add note to "Policy Tiers" clarifying weather is not included in default tiers and must be enabled explicitly with nemoclaw <sandbox> policy-add weather.
Weather Policy Preset
nemoclaw-blueprint/policies/presets/weather.yaml
New preset weather declaring network_policies.weather with HTTPS REST endpoints for wttr.in:443, api.open-meteo.com:443, and geocoding-api.open-meteo.com:443, each allowing GET /**; binds to binaries /usr/local/bin/node and /usr/local/bin/openclaw.
Test Validation
test/validate-blueprint.test.ts
Add Vitest test that parses the new preset, asserts presence of the three expected hosts, and verifies each endpoint includes at least one rule permitting HTTP GET.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through YAML, docs, and test,
To let the weather skill go fetch its best.
To wttr and Open‑Meteo I dart,
Policies open, ready to start —
Breezy data for every request! ☁️

🚥 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 title accurately describes the main change: adding a weather preset policy for wttr.in and Open-Meteo endpoints to enable the weather skill in sandboxed environments.
Linked Issues check ✅ Passed The PR successfully addresses issue #1417 by implementing the required weather policy preset with GET access to wttr.in, api.open-meteo.com, and geocoding-api.open-meteo.com endpoints.
Out of Scope Changes check ✅ Passed All changes are directly related to issue #1417: the weather preset configuration, documentation updates explaining the preset, and regression tests validating the endpoints.

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

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

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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
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:

@wscurran wscurran requested a review from cv April 22, 2026 20:43
@wscurran
Copy link
Copy Markdown
Contributor

Thanks for addressing the review feedback! Submitting this for team review now.

@jyaunches jyaunches added v0.0.24 and removed v0.0.23 labels Apr 23, 2026
@cv cv added v0.0.28 and removed v0.0.24 labels Apr 27, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 27, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cv cv enabled auto-merge (squash) April 27, 2026 17:59
@cv cv added v0.0.29 and removed v0.0.28 labels Apr 28, 2026
@cv cv added the v0.0.30 label Apr 29, 2026
@cv cv added v0.0.31 and removed v0.0.29 labels Apr 29, 2026
@ericksoa
Copy link
Copy Markdown
Contributor

Hi @BenediktSchackenberg. At this time, we are pausing net new defaults in onboarding in NemoClaw until June, once we have our partner integration story worked out. This is a good integration and I would love to do it, so we will keep this open for when we are ready to consume it.

@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: integrations Third-party service integration behavior bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality needs: review PR is conflict-free and awaiting maintainer review and removed priority: medium labels Jun 3, 2026
@BenediktSchackenberg
Copy link
Copy Markdown
Contributor Author

Friendly ping @ericksoa — back in April you mentioned holding off on new onboarding defaults until June while the partner integration story settled. We're there now, so wanted to surface this again. PR is still rebased and green from my side; happy to adjust the preset shape (split presets, opt-in flag, naming) if that helps it fit whatever direction the partner integrations took.

@ericksoa
Copy link
Copy Markdown
Contributor

ericksoa commented Jun 5, 2026

Thanks for the ping. #4768 now carries the broader safe common-egress policy work, including weather defaults, so it likely supersedes this PR. I linked #1918 from #4768 so reviewers can keep the history and design context together.

cv pushed a commit that referenced this pull request Jun 5, 2026
## Summary
- add read-only `weather` and `public-reference` presets with
host/path/method-scoped public API egress
- include `weather` in balanced/open defaults and `public-reference` in
open defaults
- include all Hermes Nous managed-tool policy presets for Hermes open
policy selection while keeping OpenClaw open defaults agent-specific
- add direct agent E2E coverage for OpenClaw balanced/open and Hermes
open common-egress paths

Closes #4767
Fixes #4814

## Related
- Likely supersedes #1918, which proposed an opt-in weather preset; this
PR includes weather as part of the broader safe common-egress defaults.

## Tests
- `npm run build:cli`
- `npx vitest run test/policy-tiers.test.ts
test/policy-tiers-onboard.test.ts
test/onboard-policy-suggestions.test.ts test/policies.test.ts
test/validate-config-schemas.test.ts` (302 passed)
- `npx vitest run test/policies.test.ts
test/validate-config-schemas.test.ts` (229 passed after preset
binary-scope update)
- `npm run validate:configs`
- `bash -n test/e2e/test-common-egress-agent-e2e.sh && shellcheck
test/e2e/test-common-egress-agent-e2e.sh`

## E2E status
- `test/e2e/test-common-egress-agent-e2e.sh` exercises the allowed
common-egress paths through agent tool use for OpenClaw balanced/open
and Hermes open.
- Full live execution provisions multiple sandboxes and is expected to
run in CI/self-hosted runner diagnostics.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added "weather" and "public-reference" read-only presets for curated
public data, geocoding, weather, and reference APIs.

* **Behavior**
* Tiers updated: balanced now includes "weather" by default; open
includes "weather" and "public-reference".
* Onboarding now filters presets by agent (Hermes vs OpenClaw) and
auto-includes Hermes tool gateway presets for Hermes; agent-incompatible
presets are removed when resuming with a different agent.

* **Tests**
* New e2e script and expanded unit/integration tests covering presets,
onboarding, and agent-specific behavior.

* **Chores**
  * Nightly CI wired to run the new e2e job.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@cv
Copy link
Copy Markdown
Collaborator

cv commented Jun 5, 2026

Thanks again for putting this together and for keeping it rebased.

The weather policy work has now landed on main via #4768 as part of the broader safe common-egress defaults. That PR added a weather preset, includes it in the balanced/open tiers, and added broader policy/test coverage around the common weather path.

The implementation that landed is not a verbatim merge of this PR: it uses tighter path-scoped Open-Meteo / Weather.gov rules rather than the original broad wttr.in / Open-Meteo shape. If we find the built-in weather skill still specifically requires wttr.in, we can track that as a small follow-up. For now, this PR is superseded by #4768, so I’m closing it.

@cv cv closed this Jun 5, 2026
auto-merge was automatically disabled June 5, 2026 18:03

Pull request was closed

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

Labels

area: cli Command line interface, flags, terminal UX, or output area: integrations Third-party service integration behavior bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality needs: review PR is conflict-free and awaiting maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

6 participants