fix(dynatrace): send the only unmute reason the API accepts and request the detail fields the tools map - #6463
Conversation
…st the detail fields the tools map Unmute forwarded the shared muteReason dropdown's FALSE_POSITIVE default, but Dynatrace accepts exactly one unmute reason, AFFECTED. The tool-level fallback never fired because a truthy invalid reason was already supplied, so unmute failed from the block unless the reason was changed by hand. The vulnerability, problem, and attack detail endpoints omit every optional property unless it is named in `fields`, so the descriptions, remediation guidance, affected entities, root-cause evidence, and attacker details those tools map were always null.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Unmute now always sends Get Problem, Get Security Problem, and Get Attack request their full optional List synthetic monitors uses a tri-state Reviewed by Cursor Bugbot for commit a0e1f7e. Configure here. |
…-unmute-check # Conflicts: # apps/sim/tools/generated/tool-metadata.ts
Greptile SummaryThis PR corrects Dynatrace request shaping and response handling while exposing pagination, sorting, and filtering parameters to agent-driven tool calls.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issues identified. The changed request mappings, input handling, response validation, generated metadata, documentation, and regression tests remain internally consistent, and investigated compatibility concerns were either contradicted by the execution path or lacked a reachable failure condition.
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/blocks/dynatrace.ts | Separates mute and unmute request mapping, adds robust tri-state boolean conversion, and aligns monitor input metadata with dropdown values. |
| apps/sim/tools/dynatrace/create_settings_object.ts | Converts per-object rejection statuses in HTTP 207 create responses into tool failures. |
| apps/sim/tools/dynatrace/update_settings_object.ts | Checks the response body’s per-object status before reporting an update as successful. |
| apps/sim/tools/dynatrace/get_security_problem.ts | Requests the complete mapped vulnerability detail field set by default while preserving explicit field selections. |
| apps/sim/tools/dynatrace/get_attack.ts | Requests all mapped attack detail properties by default while preserving explicit field selections. |
| apps/sim/tools/dynatrace/get_problem.ts | Requests optional problem evidence, impact analysis, and comments by default. |
| apps/sim/tools/dynatrace/query_metrics.ts | Removes the deprecated, always-null pagination cursor from the Query Metrics output contract. |
| apps/sim/tools/dynatrace/dynatrace.test.ts | Adds regression coverage for unmute reasons, detail-field defaults, boolean monitor filters, and per-object settings failures. |
| apps/sim/tools/generated/tool-metadata.ts | Regenerates tool metadata to reflect expanded parameter visibility and updated Dynatrace contracts. |
| apps/sim/tools/generated/tool-outputs.ts | Regenerates output metadata after removing Query Metrics’ deprecated cursor. |
Reviews (1): Last reviewed commit: "fix(dynatrace): send the only unmute rea..." | Re-trigger Greptile
Summary
muteReasondropdown'sFALSE_POSITIVEdefault, but Dynatrace accepts exactly one unmute reason —AFFECTED. The tool-levelparams.reason || 'AFFECTED'fallback never fired because a truthy invalid reason was already supplied, so unmute failed from the block (single and bulk) unless the reason was changed by hand. The block now sendsAFFECTEDitself and the dropdown is scoped to the mute operations.fields. Descriptions, remediation guidance, affected entities, vulnerable components, root-cause evidence, impact analysis, and attacker details were mapped but always null. Each detail tool now requests its full documented set by default; an explicitfieldsstill wins.pageSize/nextPageKey/sort(plus the SLO and metric filters) wereuser-onlyacross the 11 list tools, so an agent could not paginate or sort. Moved touser-or-llm, matching the rest of the repo.monitorEnabledwas declaredbooleanin block inputs while the dropdown emits''|'true'|'false'and the mapping compared=== 'true'— a real boolean wired from an upstream block read as "disabled only". Reads through a tri-state helper now.objectId. It now raises with the validation message.nextPageKeyfrom Query Metrics — the API documents it as deprecated and always null.Found while auditing the integration against the Dynatrace API reference. Every endpoint, parameter, default, page-size limit, and response key in the integration is now doc-verified.
Type of Change
Testing
bun run type-check,bun run lint,bun run tool-metadata:check,bun run integration-catalog:check, andbun run check:api-validationall pass. 49/49 tests intools/dynatrace/dynatrace.test.ts; the 7 new assertions were each verified to fail without their fix. Not exercised against a live Dynatrace tenant.Checklist