Repository navigation
Route IssueLens workflows through an Azure Function bridge - #64
Conversation
Authenticate the opt-in issue and team-memory workflows at the bridge and invoke the existing Foundry API with managed identity. Keep the agent runtime and direct callers unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The admission check requires ref_protected, which is not a signed GitHub OIDC claim, causing legitimate pilot workflow tokens to receive HTTP 401 for both job submission and status polling.
1 open issue
What changed in this PR
This PR routes the opt-in IssueLens automation workflows through an Azure Function bridge while preserving the existing Foundry host, chat, and authorized direct callers. It does not deploy resources or enable the pilot.
Changes:
- Adds workflow identity validation, queued jobs, durable reservations, and managed-identity invocation of Foundry.
- Adds bridge transport to the shared action and switches the IssueLens callers to gated bridge use.
- Updates tests, CI, packaging exclusions, and rollout/recovery documentation. Live Azure and Foundry integration remains unverified.
| File | Description |
|---|---|
tests/test_team_memory_workflow.py |
Updates assertions for bridge transport and pilot gates. |
tests/test_team_memory_coordinator.py |
Checks coordinator metadata against bridge admission. |
tests/test_issue_triage_workflow.py |
Verifies bridge wiring and issue-loop opt-in gates. |
tests/test_deploy_foundry_workflow.py |
Separates deployment identity from bridge callers. |
tests/test_ci_workflow.py |
Updates dependency and syntax-check expectations. |
tests/test_automation_bridge.py |
Adds identity, transport, settlement, receipt, and bundle tests. |
docs/guide.md |
Documents bridge setup, rollout, and recovery. |
CONTRIBUTING.md |
Includes bridge dependencies and syntax checks. |
automation_bridge/requirements.txt |
Declares Function and Azure client dependencies. |
automation_bridge/host.json |
Configures worker timeout and queue concurrency. |
automation_bridge/function_app.py |
Adds ingress endpoints and queue-worker entry point. |
automation_bridge/bundle.py |
Packages the standalone Function source bundle. |
automation_bridge/bridge.py |
Implements admission, reservations, invocation, and receipts. |
.github/workflows/team-memory-coordinator.yml |
Uses bridge transport with manual-pilot gating. |
.github/workflows/issue-triage.yml |
Uses bridge transport with repository opt-in gating. |
.github/workflows/ci.yml |
Includes bridge dependencies and syntax validation. |
.github/copilot-instructions.md |
Updates architecture and operational guidance. |
.github/actions/issuelens/README.md |
Documents both transports and their outputs. |
.github/actions/issuelens/issuelens_action.py |
Adds workflow tokens, bridge submission, and polling. |
.github/actions/issuelens/action.yml |
Adds transport inputs and conditional Azure login. |
.dockerignore |
Excludes the bridge from the agent image. |
.agentignore |
Excludes the bridge from the hosted-agent package. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new GitHub OIDC-to-Foundry write trust boundary and durable cross-service reservations require human security/operations review, with live identity, message delivery, and interruption recovery still unverified.
No open issues 🎉
1 resolved since last review
Review effort: Balanced

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
8b07665c2d63b7d483e4ebceef9d22660206c3f0ref_protectedcan submit and poll, and no job is admitted when branch protection cannot be confirmed.↑ Foundry runtime files remain unchanged from the base.
↓ Live Actions tokens, Azure trigger delivery, and managed-identity invocation have not been verified.
Summary
microsoft/IssueLensissue-loop and team-memory workflows off direct Azure login. GitHub Actions authenticate to the Function, and its worker uses managed identity to POST the standard{"input": "..."}request to the existing Foundry/invocationsAPI.ref_protected, confirmmainbranch protection with GitHub before reserving or queueing a job. Status polls still require the owning workflow's signed identity and do not repeat the branch lookup.Validation
213 focused tests passed on the current head, covering workflow admission, Foundry request compatibility, queue settlement, and Function ZIP indexing. An earlier revision passed an issue-loop and manual team-memory smoke test using Azurite and stubs for identity, Service Bus, and Foundry. The Foundry runtime files are unchanged from the base. Live Azure and Foundry integration has not been exercised.