Skip to content

Route IssueLens workflows through an Azure Function bridge - #64

Open
Changyong Gong (chagong) wants to merge 1 commit into
mainfrom
chagong-issuelens-workflow-migration
Open

Changyong Gong (chagong) wants to merge 1 commit into
mainfrom
chagong-issuelens-workflow-migration

Conversation

@chagong

Copy link
Copy Markdown
Collaborator

Summary

  • Move the opt-in microsoft/IssueLens issue-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 /invocations API.
  • Validate workflow identity and job scope at the bridge, preserve team-memory serialization and receipts, and keep the Foundry host and authorized direct API callers unchanged.
  • Document the approved rollout and recovery steps. This PR does not deploy Azure resources, enable workflows, or change the GitHub App webhook.

Validation

233 targeted tests passed, including workflow admission, Foundry request compatibility, and queue settlement. The Foundry runtime files are unchanged from the base. Live Azure and Foundry integration has not been exercised.

Agent assessment

  • Change confidence: Medium — local tests cover the request and failure paths, but live managed identity access, queue delivery, and invocation still need verification before enabling the pilot.

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

and claims["repository_id"] == str(repository_id)
and claims["repository_visibility"] == "public"
and claims["ref"] == BRANCH
and claims.get("ref_protected") in {"true", True}

This branch has not been deployed

No deployments
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