Skip to content

Add Azure Foundry IQ retrieval connector - #78937

Merged
pelikhan merged 5 commits into
mainfrom
pelikhan/foundry-iq-actions
Nov 18, 2026
Merged

pelikhan merged 5 commits into
mainfrom
pelikhan/foundry-iq-actions

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Enable agentic workflows to retrieve grounding from an existing Azure Foundry IQ knowledge base through its hosted MCP endpoint, without installing the Copilot CLI plugin or adding a provider-specific runtime handler.

  • Add the experimental azure-foundry-iq connector exposing only native knowledge_base_retrieve, with exact approved-query grants, a fixed knowledge-base endpoint and a 256 KiB response bound.
  • Extend the shared Go and Node connector contract with bounded string arrays for hosted MCP tools and a single literal api-version URL parameter. Arguments and every query grant are checked before credentials or network access; REST operations still reject arrays.
  • Include documentation and a manually triggered golden consumer that stages at most one GitHub issue. Cover local/pinned imports, phase pruning, malformed calls, generated schemas, response limits and Go/Node transport parity.

Authentication and security

AZURE_FOUNDRY_IQ_SEARCH_ACCESS_TOKEN names an externally provisioned, current Azure Search Entra bearer token. The identity requires Search Index Data Reader. The connector does not acquire or refresh tokens, exchange GitHub OIDC JWTs, accept API-key fallbacks or forward delegated source-authorization headers.

The new secret is agent-phase only and restricted to the approved fixed MCP endpoint. No new Actions dependencies are introduced; redirects remain prohibited. Retrieval can disclose private grounding to the agent and incur Azure/model charges even when the GitHub output is staged. Document identity, freshness, completeness and source permissions are not independently verified. No live Azure compatibility or token-validity claim is made.

Validation

  • make fmt, make recompile, make compile-cli-workflows and make check-workflow-drift passed; all 15 connector golden consumers compiled and all 366 workflow locks remained in sync.
  • go test ./pkg/connectors -count=1 and go test ./pkg/workflow ./pkg/cli -run '^(TestFoundryIQ.*|TestConnector.*)' -count=1 passed.
  • npm test -- --run connector_runtime.test.cjs in actions/setup/js passed all 249 tests, plus TypeScript and session-schema checks.
  • Standard Go lint passed with zero issues. JavaScript lint and change-scoped custom Go lint passed; existing diagnostics in untouched files remain outside the change scope.
  • The initial make agent-report-progress run passed impacted unit tests but stopped on lint findings and missing lint dependencies. Those were corrected and the affected lint, compilation, focused tests and workflow-drift components were rerun successfully without repeating test-unit.

Live Azure calls and workflow dispatches were not performed.

Design record

ADR-78937: Extend Declarative Connectors for Foundry IQ Retrieval is Draft, with deciders and maintainer acceptance pending.

Support bounded native MCP string arrays and fixed API versions, with offline conformance coverage and a staged consumer.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan marked this pull request as ready for review November 18, 2026 05:00
Copilot AI adaptive review requested due to automatic review settings November 18, 2026 05:00
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Commit pushed: b58629b

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

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

Generated by PR Specification Reviewer for #78937 · copilot · gpt56 · ~6 AIC · ⌖ ~2 AIC · ⊞ 1.7K · ◷

@github-actions

github-actions Bot commented Nov 18, 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.

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

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

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

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

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 #78937 · codex · routed: gpt61 medium · ~7 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

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 · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions github-actions Bot 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.

Reviewed the changed connector runtime, Go validation/transport, schemas, tests, and workflow declaration. I found no actionable correctness, security, performance, or maintainability issues in the changed lines. The advisory specialist pass was unavailable because its diff-file reads were denied; this review is therefore based on my independent static analysis. No tests were run per the static-review constraint.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-3ef5768e-73c3-405a-9c06-88719cd9fa5d","parents":[],"payload":{"id":"ldg-2d98096d-fa93-4bc7-b7f9-d207dcf56cc9","operation":"append","value":{"finding_count":0,"head_sha":"b0401e66495573af78022e9abbd13f00c8b19af5","outcome":"no_findings"}},"sha":"sha256:e5d22314955a568dbdad48490a1865209401c53760a51790339a521d3d130f6e","timestamp":"2026-11-18T05:07:22.677Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot 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.

Reviewed PR head b0401e6 against Connector Specification v1.0.0 and the changed hosted HTTP MCP contract. The bounded string-array and literal api-version additions are intentionally synchronized across declaration validation, Go/Node runtimes, schemas, docs, and focused tests; no conformance regression found. The normative spec edits lacked a version/changelog update, so I added focused v1.1.0 metadata and changelog on the same-repository branch; publication is queued via safe output. No live Azure calls were performed.

Generated by PR Specification Reviewer for #78937 · copilot · gpt50 · ~6 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again

@github-actions

Copy link
Copy Markdown
Contributor

Warning

The push_to_pull_request_branch operation was skipped: Cannot push to pull request branch: bundle modifies files outside the allowed-files list (docs/src/content/docs/specs/connector-specification.md). Add the files to the allowed-files configuration field or remove them from the bundle.. The code changes were not applied.

ADR Required: draft added

Gate result: ADR enforcement applies. The PR has no implementation label, but it adds 521 lines in business-logic directories, above the 100-line default threshold.

ADR check: The PR body links no ADR, and no ADR for this PR exists in docs/adr/. ADR-74077 is the parent connector decision, but it does not cover this change set: string-array inputs, a literal api-version URL parameter, and the Foundry IQ provider.

Draft ADR: docs/adr/78937-extend-declarative-connectors-for-foundry-iq-retrieval.md (Status: Draft), pushed to this PR branch.

Draft decision summary
  • Decision: Extend the connector contract with bounded string-array inputs for hosted HTTP MCP tools and one literal api-version URL parameter. Expose only the read-only knowledge_base_retrieve method.
  • Driver: Reuse the declarative, grant-checked connector path instead of a Copilot CLI plugin or a provider-specific runtime handler.
  • Alternatives: (1) Copilot CLI plugin or native provider handler; (2) scalar query input or JSON-string wrapper.
  • Consequences: Adds Go/Node parity risk and a token-expiry dependency; retrieval discloses private grounding and can incur charges even when output is staged.

Next action: A maintainer should review the draft, resolve the [TODO: verify] deciders, and either link the ADR from the PR body or move its status to Accepted after review.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~4 AIC · ⌖ ~2 AIC · ⊞ 8.6K · ◷
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-b18eb19a-eda0-4b32-8932-bfa94ae91728","parents":[],"payload":{"id":"ldg-c496f9cb-b738-4d23-8490-fb8d8daf3642","operation":"append","value":{"finding_count":1,"head_sha":"b0401e66495573af78022e9abbd13f00c8b19af5","outcome":"updated"}},"sha":"sha256:a19376ccf243d22fa64471cb83b50b74eb08fbc22e4ec714f5c40389a7a5d49b","timestamp":"2026-11-18T05:09:05.177Z","type":"ledger_append","version":1}
History

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

The invalid-argument test can pass even when credential resolution is reached because its predicate accepts the generic error that replaces the proxy exception.

1 open issue
What changed in this PR

Adds Azure Foundry IQ retrieval to gh-aw’s declarative connector system without installing a plugin or adding a provider-specific runtime handler.

Changes:

  • Introduces a read-only connector with exact approved-query grants, an agent-phase bearer credential and bounded responses.
  • Extends shared Go and Node contracts with bounded string arrays and a fixed api-version URL parameter.
  • Adds authentication guidance, a staged GitHub issue example and offline compilation/runtime coverage. Live Azure compatibility remains unverified.
File Description
pkg/​workflow/​connector_scenario_compile_test.go Adds Foundry IQ to compilation scenarios.
pkg/​workflow/​connector_documentation_scan_test.go Updates the expected declaration count.
pkg/​workflow/​connector_authoring_metadata_test.go Includes the new declaration in authoring checks.
pkg/​workflow/​azure_foundry_iq_connector_test.go Adds documentation, argument, transport and runtime checks.
pkg/​connectors/​values.go Validates string-array arguments and every item’s grant.
pkg/​connectors/​validate.go Validates array contracts and rejects REST array inputs.
pkg/​connectors/​validate_capabilities.go Permits constrained MCP arrays and literal API-version queries.
pkg/​connectors/​string_array_test.go Covers array constraints, grants and endpoint query validation.
pkg/​connectors/​spec.go Adds array fields to the shared input model.
pkg/​connectors/​schema.go Defines reusable input schemas for array items.
pkg/​connectors/​mcp.go Emits array constraints in MCP tool schemas.
pkg/​cli/​workflows/​azure-foundry-iq-golden.md Adds a manually triggered, staged issue-handoff example.
pkg/​cli/​connectors_command_test.go Updates the public declaration validation count.
docs/​src/​content/​docs/​specs/​connector-specification.md Specifies hosted MCP arrays and allowed URL queries.
docs/​src/​content/​docs/​reference/​connectors.md Documents Foundry IQ setup, authentication and limitations.
actions/​setup/​js/​connector_runtime.test.cjs Tests Node array validation and fixed API-version transport.
actions/​setup/​js/​connector_runtime.cjs Implements matching Node contract validation.
.github/​workflows/​connectors/​azure-foundry-iq.md Declares the connector, credential, grants and embedded documentation.

Review effort: Max (adaptive)

pelikhan and others added 3 commits November 17, 2026 21:35
Match the provider CI selector in Foundry IQ test names and use the bundled connector XML source-reference format.

Co-authored-by: Copilot App <[email protected]>
Count secret reads and assert each expected validation error so generic MCP failures cannot hide credential resolution in the bundled Node conformance test.

Co-authored-by: Copilot App <[email protected]>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969570402

Acknowledged as a review-start notification. This comment contains no actionable finding, so no code change is needed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969570955

Already addressed by b58629b, which is present in this branch. Connector Specification 1.1.0 includes the bounded-array and fixed api-version changelog, so no duplicate edit is needed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969571598

Reviewed the detailed design-gate result separately. Added the missing Draft ADR and linked it in the PR body; maintainer acceptance remains pending.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969573269

Acknowledged the completion report; the associated historical ledger records no findings for b0401e6. This status notice requires no code change.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969573710

This is an informational no-action report, not a concrete change request or proof of merge readiness. No code change is needed for this comment.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969579548

This test-analysis completion notice contains no actionable finding. No change is needed for this comment; validation of the current changes is handled separately.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969663419

This ledger records a historical no-findings result for b0401e6, not a fresh review of the current revision. No code change or modification of automation-managed history is needed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969687687

The ADR requirement applies, but the draft claimed in this report was not on the branch. Added ADR-78937 in 0ec5cdd and linked it in the PR body; it remains Draft with deciders pending, and no automation permissions were changed.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to comment 6969690605

The specification update recorded here is already present in b58629b. No duplicate specification edit or ledger modification is needed.

@pelikhan
pelikhan merged commit 2a9cd42 into main Nov 18, 2026
96 checks passed
@pelikhan
pelikhan deleted the pelikhan/foundry-iq-actions branch November 18, 2026 06:00
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants