feat(incident): add --needs-wrench-bot-check to update command#16
Merged
Conversation
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.
Wrench-Service-Bot
approved these changes
Jun 10, 2026
Wrench-Service-Bot
left a comment
There was a problem hiding this comment.
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_clientandrequests.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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--needs-wrench-bot-check [yes|no]flag topuppy incident updateNeedsWrenchBotCheckcustom dropdown field without requiring callers to drop to the raw Datadog REST APIyestriggers the ec2-bot triage webhook;noclears the flagMotivation
The ec2-bot triage webhook fires when
NeedsWrenchBotChecktransitions toYes. 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 passpuppy incident update --helpshows the new flagpuppy incident update <id> --needs-wrench-bot-check yessetsNeedsWrenchBotCheck: Yesin Datadog and triggers the triage webhookEnd-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.