Repository navigation
feat: [doppel_alert_takedown] add alert and takedown workflow actions - #1070
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a894cf7e41
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "data": { | ||
| "action": action, | ||
| "alert_id": data["id"], | ||
| "queue_state": data.get("queue_state"), |
There was a problem hiding this comment.
Fetch the queue state before returning it
For create_alert, data is the direct POST response, but the documented V1 submission response only provides the alert identity, entity, deep link, and activity timestamp; Doppel directs clients to GET /v1/alert to read queue_state. Consequently normal creation responses return "queue_state": null, despite the module's documented output contract. Fetch the created alert before constructing the result, or stop advertising this field for creation. See the Doppel submission response.
Useful? React with 👍 / 👎.
| "action": action, | ||
| "alert_id": data["id"], | ||
| "queue_state": data.get("queue_state"), | ||
| "link": "https://app.doppel.com/alerts/" + data["id"], |
There was a problem hiding this comment.
Return Doppel's supplied deep link
Successful responses supply doppel_link using the documented Doppel Vision route (for example, https://vision.doppel.com/drp/ACM-1234), but this discards it and invents an unrelated https://app.doppel.com/alerts/... URL. Workflow consumers following the returned link therefore do not receive the provider's supported alert destination. Preserve the response's doppel_link instead. See the documented response shape.
Useful? React with 👍 / 👎.
Explicit workflow actions create a Doppel alert or request takedown of an existing alert through the V1 API. Takedown requests read existing state before sending queue_state=actioned; actioned or resolved alerts are not updated again. Server environment credentials, response acknowledgements, bounded requests and uncertain submission outcomes are documented and tested.
Includes a usage guide and focused adapter tests.
Validation:
10 passed, 1 warning in 0.12swithpytest -q tests/test_doppel_alert_takedown.py; flake8 passed for the module. The combined enrichment regression check passed 389 tests.Authenticated provider API validation remains pending. Tests use sanitized fixtures; no provider credentials are included.
Review updates: Retrieve queue state after creation and return the provider-supplied alert deep link.
Updated validation: 11 passed, 1 warning in 0.10s; module lint passed. Combined regression validation passed 409 tests.