Skip to content

fix(skills): make weather workflow Windows-safe - #5303

Merged
Re-bin merged 2 commits into
HKUDS:mainfrom
KailBug:fix/windows-weather-workflow
Aug 11, 2026
Merged

fix(skills): make weather workflow Windows-safe#5303
Re-bin merged 2 commits into
HKUDS:mainfrom
KailBug:fix/windows-weather-workflow

Conversation

@KailBug

@KailBug KailBug commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Problem

On Windows PowerShell, bare curl may resolve to the Invoke-WebRequest alias instead of the native cURL executable.

The weather skill previously used bare curl in its examples. This could cause the first weather command to fail, requiring the agent to analyze the error and retry with curl.exe. Requests for today's weather could also trigger separate current-condition and daily-forecast calls.

These retries introduce avoidable tool calls, LLM iterations, latency, and token usage.

Changes

  • use curl.exe for weather requests on Windows PowerShell
  • document the platform-specific difference between Windows PowerShell and macOS/Linux shells
  • use explicit HTTPS wttr.in URLs
  • instruct the agent to use a single ?1&m request for today's weather
  • add a regression test for the bundled weather skill guidance

Result

Manual verification with “北京今天天气怎么样?” confirmed that the agent directly called:

curl.exe -s "https://wttr.in/Beijing?1&m"

This avoids the failed bare curl attempt, the follow-up recovery iteration, and a redundant separate current-weather request, reducing avoidable response latency and token usage.

Testing

  • pytest tests/agent/test_builtin_weather_skill.py -v — 1 passed
  • pytest tests/agent/test_context_builder.py -q — 49 passed
  • ruff check tests/agent/test_builtin_weather_skill.py — all checks passed
  • manually verified the workflow on Windows PowerShell with:
    nanobot agent --logs -s cli:weather-skill-test
  • confirmed that the agent directly called:
    curl.exe -s "https://wttr.in/Beijing?1&m"
  • confirmed that no failed bare curl attempt or redundant current-weather request occurred

@chengyongru chengyongru added priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. bug Something isn't working fix documentation Improvements or additions to documentation test labels Aug 9, 2026
@Re-bin
Re-bin force-pushed the fix/windows-weather-workflow branch from d80b9c6 to 2011668 Compare August 11, 2026 15:13
@Re-bin
Re-bin force-pushed the fix/windows-weather-workflow branch from 2011668 to 9d2a922 Compare August 11, 2026 17:40

@Re-bin Re-bin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. The built-in weather workflow now uses Windows-safe PowerShell commands, HTTPS assets, and platform-neutral output guidance, backed by focused skill regression tests.

Verified against the current main; all required checks pass.

@Re-bin
Re-bin merged commit 72d3ce6 into HKUDS:main Aug 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation fix priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants