Skip to content

feat(preset): add PATCH method to Outlook preset for Graph API updates#1478

Open
stevenobiajulu wants to merge 1 commit intoNVIDIA:mainfrom
stevenobiajulu:feat/outlook-preset-patch-method
Open

feat(preset): add PATCH method to Outlook preset for Graph API updates#1478
stevenobiajulu wants to merge 1 commit intoNVIDIA:mainfrom
stevenobiajulu:feat/outlook-preset-patch-method

Conversation

@stevenobiajulu
Copy link
Copy Markdown

@stevenobiajulu stevenobiajulu commented Apr 4, 2026

Summary

Add PATCH method support to the graph.microsoft.com endpoint in the Outlook network policy preset.

Microsoft Graph API uses PATCH for standard email and calendar operations — marking messages as read, flagging for follow-up, and updating drafts. The current preset only allows GET and POST, which blocks these workflows inside sandboxes.

Fixes #1477

Changes

  • nemoclaw-blueprint/policies/presets/outlook.yaml: Add allow: { method: PATCH, path: "/**" } to graph.microsoft.com (1 line)
  • test/policies.test.js: Add regression test asserting PATCH is allowed on graph.microsoft.com in the Outlook preset (8 lines)

Scope

  • Only graph.microsoft.com — the other endpoints in the preset do not need PATCH
  • No PUT (Graph API uses PATCH, not PUT, for updates)
  • No wildcards — explicit method rule follows the principle of least privilege

Testing

  • All 964 tests pass (npx vitest run)
  • New test fails against the unmodified preset, passes after the fix

Summary by CodeRabbit

  • New Features

    • Added support for PATCH requests to Microsoft Graph endpoints in the Outlook policy configuration.
  • Tests

    • Added test verification for PATCH method support in the Outlook preset.

Microsoft Graph API uses PATCH for standard email and calendar operations:
marking messages as read, flagging for follow-up, and updating drafts.
The Outlook preset currently only allows GET and POST on
graph.microsoft.com, blocking these workflows inside sandboxes.

Add PATCH rule to graph.microsoft.com and a regression test.

Fixes NVIDIA#1477

Signed-off-by: Steven Obiajulu <steven@usejunior.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 4, 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

Run ID: 1e732d88-3239-40bd-8cf0-a112f57f5f1e

📥 Commits

Reviewing files that changed from the base of the PR and between 374a847 and 71e2508.

📒 Files selected for processing (2)
  • nemoclaw-blueprint/policies/presets/outlook.yaml
  • test/policies.test.js

📝 Walkthrough

Walkthrough

Added a PATCH method rule to the Outlook network policy preset for graph.microsoft.com to allow non-destructive email operations via Microsoft Graph API (marking messages as read, flagging for follow-up, updating drafts). Corresponding test case validates the rule presence.

Changes

Cohort / File(s) Summary
Outlook Preset Configuration
nemoclaw-blueprint/policies/presets/outlook.yaml
Added single network policy rule allowing PATCH requests to graph.microsoft.com with path /**.
Preset Test Coverage
test/policies.test.js
Added test case that loads the outlook preset and asserts the presence of method: PATCH in the graph.microsoft.com section.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A patch for outlook's way,
PATCH methods have their say,
Mark emails read with care,
Flag messages fair,
One simple rule makes the day! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main change: adding PATCH method support to the Outlook preset for Graph API operations.
Linked Issues check ✅ Passed The PR fully implements issue #1477 requirements: adds explicit PATCH rule to graph.microsoft.com in outlook.yaml and includes regression test.
Out of Scope Changes check ✅ Passed All changes are scoped to issue #1477: only graph.microsoft.com PATCH rule and related test were modified; no other endpoints or methods altered.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

@wscurran wscurran added enhancement: feature Use this label to identify requests for new capabilities in NemoClaw. enhancement: policy Integration: Outlook labels Apr 6, 2026
@wscurran
Copy link
Copy Markdown
Contributor

wscurran commented Apr 6, 2026

✨ Thanks for submitting this fix, which proposes a way to add PATCH method support to the Outlook network policy preset for Microsoft Graph API operations.


Possibly related open issues:

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

Labels

enhancement: feature Use this label to identify requests for new capabilities in NemoClaw. enhancement: policy Integration: Outlook

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(preset): add PATCH method to Outlook preset for Graph API updates

2 participants