Skip to content

Harden weather provider outbound egress#2610

Draft
rmusser01 wants to merge 2 commits into
devfrom
codex/audit-weather-egress-2026-07-04
Draft

Harden weather provider outbound egress#2610
rmusser01 wants to merge 2 commits into
devfrom
codex/audit-weather-egress-2026-07-04

Conversation

@rmusser01

@rmusser01 rmusser01 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Change summary

Human-written Change summary required before this draft PR is merge-ready under Docs/superpowers/AI_GENERATED_PR_CHANGE_SUMMARY_POLICY_2026_04_17.md.

What changed

Routes weather-provider HTTP requests through central HTTP policy and adds coverage for sanitized policy-denial behavior.

Backlog tracking: TASK-12139.

Latest dev refresh

  • Base: dev at 6b727b221e55646eba663a03571e38302f7fafc2.
  • Head: codex/audit-weather-egress-2026-07-04 at 38b264ca01c7609d621b8f5df0c0698585f20db4.
  • Post-amend check verified the final Backlog-note amend changed only the task record for this PR; merge-base still equals 6b727b221e55646eba663a03571e38302f7fafc2.

Validation

  • python -m pytest tldw_Server_API/tests/Chat_NEW/unit/test_weather_providers.py tldw_Server_API/tests/Chat_NEW/unit/test_command_router.py -q -> 36 passed, 80 warnings.
  • python -m bandit -r tldw_Server_API/app/core/Integrations/weather_providers.py -f json -o /tmp/bandit_weather_egress_origin_dev_6b727b.json -> 0 findings over 257 LOC.
  • git diff --check HEAD~1..HEAD -> clean.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 79f48f2d-b2f7-4a74-b0a4-ce5902fbce1d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/audit-weather-egress-2026-07-04

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request routes OpenWeather API requests through the central synchronous HTTP helper (fetch) with a single-attempt retry policy, replacing the raw httpx.Client usage. It also updates the exception handling to include central egress policy and network errors, and refactors the unit tests to mock the new fetch helper. Feedback is provided regarding the newly added markdown task file, suggesting it be renamed to remove spaces from its filename to prevent potential issues in CI/CD pipelines and shell scripts.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@@ -0,0 +1,54 @@
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The filename contains spaces (task-12139 - Harden-audit-Integrations-weather-provider-egress-policy.md). It is best practice to avoid spaces in filenames within a git repository, as they can cause issues with shell scripts, command-line utilities, and CI/CD pipelines. Consider renaming the file to use hyphens instead, such as task-12139-harden-audit-integrations-weather-provider-egress-policy.md.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Checked. No filename change here: this repository's Backlog.md convention uses task-id - title.md filenames, and the task was created through the Backlog workflow. The branch has been rebased onto latest dev and the task now records the refreshed validation evidence in d6768a7.

@rmusser01 rmusser01 force-pushed the codex/audit-weather-egress-2026-07-04 branch 3 times, most recently from 7f5d606 to 4aa0b9e Compare July 4, 2026 23:49
@rmusser01 rmusser01 force-pushed the codex/audit-weather-egress-2026-07-04 branch from 4aa0b9e to 38b264c Compare July 5, 2026 00:29
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.

1 participant