fix(integrations): final review pass for the Atlassian and AWS sweeps

Merged
WA
2d ago
+917-376

Summary

Final-review follow-up for the Atlassian (#9950) and AWS (#9952) validation sweeps. An independent review of both merged diffs found no blockers. This PR applies the should-fix and nit findings. Everything changed here was added by those two PRs and isn't on main yet, so production behaviour is unaffected.

Atlassian

  • Jira search: the heavy per-issue fields #9950 added (descriptionAdf, customFields, attachments, issuelinks, subtasks) are now opt-in through fields, so default searches don't carry every customfield_* into agent prompts. renderedDescription needs the renderedFields expansion. Every field that exists on main keeps its exact value.
  • Moved transformIssueData into tools/jira/utils.ts with a typed raw payload (no any), shared by retrieve and search.
  • JSM Assets AQL: a trailing order by is split only at parenthesis depth 0 (still honouring quotes and escapes), and a leading order by with a scope filter produces valid AQL.
  • JSM object types: if the /flat fallback itself fails, the result is the original empty list, so the fallback can't add a new failure mode. Aborts still propagate.
  • Confluence search and search-in-space send next=true with a cursor, as Confluence's own _links.next does.
  • Agent-call hardening:
    • Trello update accepts label/member IDs as an array or a comma-separated string.
    • A blank Jira parent is treated as unset.
    • A numeric Confluence parentCommentId no longer throws.
  • JSM types include renderedValue.

AWS

  • New toBooleanFromInput in @sim/utils/coerce replaces the two local copies in Secrets Manager and CloudFormation. The duplicates in google_docs/blocks/utils belong to the Workspace sweep and migrate separately.
  • The IAM tags schema moves into iam-shared, and the SES message-tag schema into ses-shared.
  • SES send tools accept emailTags as a JSON string from agent calls.
  • Secrets Manager names the field on invalid JSON.
  • IAM accepts JSON-array tag strings and skips null tag values.
  • Textract rejects a JSON-object query string instead of sending it as question text, and the size error no longer suggests Multi-Page mode for operations that lack it.

Type of Change

  • Bug fix
  • Code quality

Testing

  • New regression tests, each red on the pre-fix code:
    • JSM: AQL splitting and the flat fallback.
    • Trello: ID list input.
    • Jira: search heavy fields and blank parent.
    • Confluence: numeric comment id and next=true paging.
  • The transformIssueData move was checked for output equivalence on sample payloads.
  • vitest across the Atlassian and AWS tools, internal ops, block tests, tools/google_docs and packages/utils: 443 + 120 passed.
  • check-block-registry.ts origin/staging, check:tool-metadata, check:docs, check:integration-catalog, check:unused-exports, check:utils, check:test-patterns and biome pass. Type-check and the remaining audits run in CI.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)