Skip to content

Fix Foundry IQ retrieval arguments - #79190

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-azure-foundry-iq-connector
Nov 19, 2026
Merged

pelikhan merged 4 commits into
mainfrom
copilot/fix-azure-foundry-iq-connector

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

The Foundry IQ connector sends queries, but the Azure AI Search preview MCP server requires query_variants. The runtime also masks the upstream error that identifies the mismatch.

  • Retrieval contract: Send one approved question as query_variants, bounded to 150 Unicode characters. Existing with.queries grants remain compatible and are validated at compile time.
  • Diagnostics: Distinguish upstream tool errors from unsupported interactive input. Surface the recognized missing-array-argument diagnostic while withholding arbitrary provider text.
  • Documentation: Update the connector reference, consumer example, and ADR for the preview contract.
{"query_variants": ["What deployment rollback checks are documented?"]}

pelikhan and others added 2 commits November 19, 2026 05:26
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@pelikhan pelikhan changed the title [WIP] Fix azure-foundry-iq connector to include query_variants Fix Foundry IQ retrieval arguments Nov 19, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 19, 2026 06:12
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 06:12
@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⊞ 8.6K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@pelikhan
pelikhan merged commit 92897a3 into main Nov 19, 2026
2 checks passed
@pelikhan
pelikhan deleted the copilot/fix-azure-foundry-iq-connector branch November 19, 2026 06:13
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #79190 · codex · routed: gpt61 medium · ~8 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⊞ 7.2K · ◷

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved schema-validation and null-input handling defects allow malformed filters to pass validation and replace upstream tool errors with misleading connector failures.

2 open issues
What changed in this PR

Updates gh-aw’s Foundry IQ connector to match the Azure AI Search preview retrieval contract, addressing #79145 while preserving existing with.queries grants.

Changes:

  • Sends query_variants with one approved question, limited to 150 Unicode code points, and validates grant length at compile time.
  • Separates upstream tool errors from interactive-input failures while withholding arbitrary provider diagnostics.
  • Updates tests, examples, and documentation; also refreshes workflow event schemas and smoke-test routing.
File Description
pkg/​workflow/​schemas/​github-workflow.json Adds image-version events and pull-request activity types.
pkg/​workflow/​azure_foundry_iq_connector_test.go Tests argument shape, Unicode limits, and error handling.
pkg/​parser/​schemas/​main_workflow_schema.json Allows string-array item length bounds.
pkg/​parser/​import_schema_validation.go Enforces Unicode length limits on import inputs.
pkg/​parser/​import_schema_validation_input_type_test.go Tests Unicode boundaries and invalid bounds.
pkg/​connectors/​mcp.go Separates and sanitizes upstream error diagnostics.
pkg/​cli/​workflows/​azure-foundry-iq-golden.md Updates the consumer’s native retrieval argument.
docs/​src/​content/​docs/​reference/​imports.md Documents string-array length validation.
docs/​src/​content/​docs/​reference/​connectors.md Documents the revised retrieval contract and diagnostics.
docs/​adr/​78937-extend-declarative-connectors-for-foundry-iq-retrieval.md Records the preview contract change.
actions/​setup/​js/​connector_runtime.test.cjs Updates tool-error and interactive-input assertions.
actions/​setup/​js/​connector_runtime.cjs Adds distinct, filtered upstream error messages.
.github/​workflows/​connectors/​azure-foundry-iq.md Declares query_variants and 150-character grant limits.
.github/​workflows/​agentic_commands.yml Adds OpenTelemetry backend smoke-test routing.

Review effort: Balanced (adaptive)

if (!result.isError) assert([undefined, "", "complete"].includes(result.resultType) && !result.inputRequests && !result.needsInput, "Connector HTTP MCP tool requires unsupported interactive input");
assert(Array.isArray(result.content) && jsonBytes(result) <= server.maxResponseBytes, "Connector HTTP MCP result exceeds its byte bound or has invalid content");
if (result.isError) {
for (const [name, input] of Object.entries(constraints.inputs)) {
},
"image_version": {
"$comment": "https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#image_version",
"$ref": "#/definitions/eventObject",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azure-foundry-iq connector: knowledge_base_retrieve always fails (sends queries; live MCP server requires query_variants)

3 participants