Skip to content

fix(incident): use lowercase needswrenchbotcheck field key#18

Merged
Kydoimos97 merged 1 commit into
mainfrom
fix/needs-wrench-bot-check-field-key
Jun 10, 2026
Merged

fix(incident): use lowercase needswrenchbotcheck field key#18
Kydoimos97 merged 1 commit into
mainfrom
fix/needs-wrench-bot-check-field-key

Conversation

@Kydoimos97

Copy link
Copy Markdown

Summary

The needswrenchbotcheck field was being patched with the key NeedsWrenchBotCheck (PascalCase). Datadog stores and matches the field as needswrenchbotcheck (all lowercase). The API silently accepted the wrong-cased key, returned 200, but the field never landed on the incident — meaning the Datadog notification rule never fired.

Root cause

Discovered by checking an incident that was already correctly triaged: its fields showed needswrenchbotcheck (lowercase). The incident being patched showed the field as absent. Direct verification: PATCH with NeedsWrenchBotCheck → field not present on read-back. This is the reason the retrigger sweep toggled 32 incidents with zero webhook fires.

End-user impact

The --needs-wrench-bot-check flag now actually works. Setting it to yes via the CLI or MCP will land the field on the incident and trigger the Datadog notification rule that fires the triage webhook.

Datadog stores the field as 'needswrenchbotcheck' (all lowercase).
The previous casing 'NeedsWrenchBotCheck' was silently discarded by the
API — the PATCH returned 200 but the field never landed on the incident,
which is why the notification rule never fired.
@Kydoimos97 Kydoimos97 requested review from a team, Wrench-Service-Bot and Copilot and removed request for Copilot June 10, 2026 22:42
@Kydoimos97 Kydoimos97 merged commit cd96582 into main Jun 10, 2026
10 checks passed

@Wrench-Service-Bot Wrench-Service-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.

PR Review

Verdict: APPROVED

Description

Fixes a silent bug where setting the needswrenchbotcheck Datadog incident field via puppy-kit had no effect — the API accepted the wrong-cased key (NeedsWrenchBotCheck) with a 200 but never persisted the field, so the notification rule never fired.

Highlights

  • Root cause investigation is thorough and evidence-based: verified correct key by reading a known-good incident, then confirmed the wrong-cased PATCH left the field absent on read-back
  • Fix is minimal and surgical — one line in source, one line in tests
  • Test updated in lockstep; the assertion now verifies the exact key Datadog persists

Style Notes

  • None

Overall Assessment

This is a one-line correctness fix with a well-documented root cause and an updated test. The fix unblocks the triage webhook notification rule that depended on this field being set. Ready to merge.

Sources

  • Diff: 2 files, +2/-2
  • Prior reviews: none
  • Related PRs/issues: N/A

— Claude

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.

2 participants