Skip to content

feat(incident): add --needs-wrench-bot-check to update command#16

Merged
Kydoimos97 merged 1 commit into
mainfrom
feat/incident-needs-wrench-bot-check
Jun 10, 2026
Merged

feat(incident): add --needs-wrench-bot-check to update command#16
Kydoimos97 merged 1 commit into
mainfrom
feat/incident-needs-wrench-bot-check

Conversation

@Kydoimos97

Copy link
Copy Markdown

Summary

  • Adds --needs-wrench-bot-check [yes|no] flag to puppy incident update
  • Exposes the NeedsWrenchBotCheck custom dropdown field without requiring callers to drop to the raw Datadog REST API
  • Setting to yes triggers the ec2-bot triage webhook; no clears the flag

Motivation

The ec2-bot triage webhook fires when NeedsWrenchBotCheck transitions to Yes. Scripts that re-trigger triage on open incidents (e.g. a 12h sweep to catch incidents created during a webhook outage) had no way to toggle this field via the CLI and had to bypass puppy and call the raw API directly.

Follows the exact same pattern as --is-duplicate, --triage-completed, and --needs-human-attention.

Test plan

  • uv run pytest tests/commands/test_incident.py::TestUpdateIncident -v — all 5 pass
  • puppy incident update --help shows the new flag
  • puppy incident update <id> --needs-wrench-bot-check yes sets NeedsWrenchBotCheck: Yes in Datadog and triggers the triage webhook

End-user impact

Enables fully automated re-triage sweeps via the puppy CLI. No manual API calls needed to retrigger incident triage after a webhook outage.

Exposes the NeedsWrenchBotCheck custom field via the CLI so scripts can
toggle it without dropping to the raw Datadog API. Setting this field to
yes triggers the ec2-bot triage webhook for the incident.

Follows the same pattern as --is-duplicate, --triage-completed, and
--needs-human-attention. Includes a test asserting the correct field
key and capitalized value are sent in the PATCH payload.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Kydoimos97 Kydoimos97 merged commit 1ce8191 into main Jun 10, 2026
10 of 11 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

Adds a --needs-wrench-bot-check [yes|no] option to puppy incident update, which sets the NeedsWrenchBotCheck dropdown field in Datadog via requests.patch — enabling the triage webhook to be re-triggered from the CLI without dropping to raw API calls.

Highlights

  • Follows the exact same pattern as --is-duplicate, --triage-completed, and --needs-human-attention — no deviation from convention
  • Guard if needs_wrench_bot_check is not None: correctly skips the field when the flag is not passed
  • capitalize() on the "yes"/"no" input produces "Yes"/"No" as expected by the Datadog dropdown schema — consistent with existing flags and confirmed by the test assertion
  • Test patches both get_datadog_client and requests.patch, verifying the exact field structure sent to Datadog ({"type": "dropdown", "value": "Yes"})

Style Notes

  • None

Overall Assessment

This is a clean, minimal, focused addition. The implementation is consistent with the existing flag pattern across all four fields, the guard condition is correct, and the test validates the critical contract (the exact Datadog field payload). Ready to merge.

Sources

  • Diff: 2 files, +35/-0
  • Prior reviews: none
  • Related PRs/issues: N/A — additive CLI flag, no breaking change to downstream consumers

— 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.

3 participants