fix: six pre-existing integration defects surfaced by the docs audit

Merged
WA
2mo ago
+1785-191

Six pre-existing defects surfaced by the audit work on #7169. All predate that PR; none is a regression from it. Each is one commit, so any can be reviewed, cherry-picked, or reverted on its own.

What each fixes

fix(github) — file comments were broken in production

github_comment with commentType: 'file_comment' POSTs to /pulls/{n}/comments, where GitHub's OpenAPI lists commit_id as required. It was declared hidden with no subBlock and no mapper write, so nothing could populate it and every request sent undefined → 422. The path is user-reachable: the commentType dropdown offers "File-specific Comment".

Now resolves the PR head SHA when commitId is absent, mirroring the Jira cloudId-from-domain pattern already used in this repo (a harmless lookup request, real work in transformResponse). Applied to both commentTool and commentV2Tool via a shared helper. Also drops position, which GitHub marks "deprecated": true — "This parameter is closing down. Use line instead."

fix(google-drive) — pagination was documented but unreachable

All five list/search tools declared pageToken and forwarded it to Google, but the block had zero occurrences of it in its entire history. Every call was capped at one page while the tools returned a nextPageToken with nowhere to go. Adds a per-operation Page Token field following the block's own existing pageSize/searchPageSize convention, and flips the params to user-only so they are documented.

fix(confluence) — documented a field users could not fill

cloudId was user-only, so it was published across 46 rows, but no subBlock exists. The inverse of the Jira defect. Confluence already resolves the cloud id at runtime — every operation goes through createConfluenceClient, which falls back to getConfluenceCloudId(domain, …) → the shared resolveAtlassianCloudId — so only the visibility was wrong. Marked hidden; domain stays user-settable at all 46 rows.

fix(vanta) — a field whose value was always discarded

The block rendered an advanced MIME Type input and forwarded it, but the upload path never reads it: every return path of downloadServableFileFromStorage yields a non-empty content type, so resolved.contentType always wins. The placeholder claimed it was "used when the file has no type of its own", which never happens.

Removes the subBlock, its mapper write, and its inputs entry, and marks the tool param hidden so it is no longer advertised to the model on a path where it cannot take effect. The param stays, because the base64 branch still reads it. Letting a typed value win instead was rejected: for a compiled artifact the storage-resolved type is the only one matching the bytes actually sent.

fix(docs) — the generator's sort was locale-sensitive

localeCompare with no locale uses the runtime default. Against the real 254 catalog names, tr-TR reorders 141 positions, et-EE 45, cs-CZ 2, and lt-LT diverges at index 40 — so a contributor on any of those regenerates a different integrations.json and fails CI with no obvious cause. Pins en-US at all four sort sites.

fix(docs) — regex literals desynced the source scanner

blankStringsAndComments had no concept of a regex literal, so /don't/ opened a phantom string that swallowed following subBlocks, and /[}]/ closed the enclosing object early. Both returned a short list with no warning — a confident wrong answer, which for the hidden-param filter means silently deleting a user-settable row.

Replaced with a linear scanner that distinguishes a regex literal from a division by the previous significant character, blanks regex bodies whole, and tracks ${} nesting so a backtick inside a template expression cannot end the template early. It now returns null when it ends inside an unterminated construct, and all three call sites treat that as UNKNOWN rather than guessing.

Verification

Every fix has a test proving red→green — reverted, watched it fail, restored, watched it pass.

The two generator fixes leave the generated tree byte-identical, verified by hashing before and after; the warning count is unchanged at 12. Documentation deltas are exactly as intended: Confluence −46, Drive +5, Vanta −1, GitHub 0 (both removed params were already unpublished).

bun run check:audits → 0 · bun run lint:check → 0 · affected suites 380/380.

Notes for review

  • Drive's pageToken is user-only rather than hidden-with-a-subBlock as google_vault does it. Both produce identical docs and behavior; user-only matches the type's own definition of hidden ("not shown to user or LLM") now that we do show it. One-word change if you prefer vault parity.
  • The GitHub fix adds one API call per file comment. directExecution would give tighter error control but bypasses the request transport (retry, redirect policy, secret provenance), so the lookup-plus-transform pattern was kept.