Repository navigation
Foundry Deployment
Deploy IssueLens to Foundry is a manual-only (workflow_dispatch) deployment workflow. It accepts only this repository's default branch and requires the dispatched commit to equal the workflow SHA. Checkout uses that exact commit without persisted credentials.
The fixed foundry-production environment must have nonempty required reviewers and disable administrator bypass. Before Azure login, the workflow verifies those protections and a successful completed push run of ci.yml for the exact dispatched SHA. Self-approval follows the GitHub Environment's configured Prevent self-review policy: the workflow accepts either setting while still requiring environment approval. Administrator setup must also restrict the environment to exact main, not tags. Deployment concurrency does not cancel an active run.
Merging the workflow is not authorization for a live deployment and does not establish that the environment, Azure permissions, or secrets are configured.
The workflow uses Azure OIDC login, configures azd to use Azure CLI authentication, then runs native azd deploy IssueLens. The existing azure.yaml service uses Python 3.13, main.py, and remote dependency build, without a custom deployment helper or packaging hook. The code ZIP follows .agentignore, which excludes local credentials, azd state, and both directory and worktree-file .git metadata.
Actions are commit-pinned and azd is pinned to 1.34.2. Each extension is installed from the azd registry at an explicit version with --no-dependencies:
| Extension | Version |
|---|---|
azure.ai.agents |
1.0.0-beta.16 |
azure.ai.connections |
1.0.0-beta.7 |
azure.ai.inspector |
1.0.0-beta.7 |
azure.ai.projects |
1.0.0-beta.11 |
azure.ai.routines |
1.0.0-beta.6 |
azure.ai.skills |
1.0.0-beta.6 |
azure.ai.toolboxes |
1.0.0-beta.7 |
microsoft.foundry |
1.0.0-beta.2 |
Before Azure login, the complete installed inventory's installedVersion values must match these pins. Missing, extra, duplicate, mismatched, malformed, or unreadable inventories stop setup; registry-latest versions are not substituted. Upgrades require reviewed workflow, test, and documentation changes.
The repository deployment guide requires an existing Foundry project, model deployment, and hosted IssueLens agent. Provisioning and role assignments are separate administrator operations, not workflow steps. The configured GitHub-hosted runner needs project network access; private-network targets need a separately approved arrangement.
- Reuse secret names
AZURE_CLIENT_ID,AZURE_TENANT_ID, andAZURE_SUBSCRIPTION_ID. If the existing identity is invocation-only, use same-named environment-secret overrides for a dedicated deployer rather than expanding that identity's permissions. The documented deployment roles are Foundry User plus Contributor on the target project, or an approved narrower equivalent. - The documented OIDC subject is
repo:microsoft/IssueLens:environment:foundry-production, with GitHub's token issuer and audienceapi://AzureADTokenExchange. - Additional required deployment secrets are
AZURE_LOCATION,FOUNDRY_PROJECT_ENDPOINT,AZURE_AI_PROJECT_ID,AZURE_AI_MODEL_DEPLOYMENT_NAME, andISSUELENS_GITHUB_APP_PRIVATE_KEY_SECRET_URI. The existing variableISSUELENS_APP_IDbecomes runtimeGITHUB_APP_ID; the Key Vault URI becomesGITHUB_APP_PRIVATE_KEY_SECRET_URI. No App PEM is passed. -
TOOLBOX_ENDPOINT,MAILING_URL, andPERSONAL_NOTIFICATION_URLare optional secrets. Azure configuration is step-scoped and secret-backed.ISSUELENS_AGENT_URLis an invocation endpoint, not a substitute for the project endpoint. - The hosted runtime identity needs access to the App-key secret, documented as Key Vault Secrets User. Deployment identity and runtime/project inference identities remain separate; see Foundry model authentication. The deployment workflow does not consume or forward
AZURE_AI_MODEL_API_KEY.
After exact-commit CI succeeds, an authorized operator can dispatch the workflow and obtain environment approval. The workflow checks that azd's recorded AGENT_ISSUELENS_VERSION is the active IssueLens version, rejecting latest, then smoke-tests both protocols in fresh, explicit-version sessions. Responses also starts a new conversation. Invocations uses an input payload, not a generic message payload. Both checks require the expected ISSUELENS_DEPLOYMENT_OK reply and completion evidence rather than merely non-empty CLI output.
The fixed prompt requests no tools, subagents, repository access, wiki writes, or notifications. These checks test protocol/inference behavior, not App/wiki/notification permissions or host-enforced tool isolation.
The Invocations validator permits only one kind of subagent event: subagent.selected with data.agentName == "issuelens", and absent or null top-level agentId, data.parentToolCallId, and data.toolCallId. Available-tools metadata on that root selection is not tool execution; a stream without a selection event can also pass. All tool.* events, other subagent.* events, nonempty data.toolRequests on any event, and error/session.error events still fail. The last root assistant.message (absent/null agentId and data.parentToolCallId) must contain the exact expected reply, and the final stream object must have nonempty string invocation_id and session_id values. This narrow exception fixes a false negative without authorizing delegation or tool use.
The overall job is limited to 40 minutes; native deployment waits up to 1,200 seconds inside a 25-minute step. Each Responses and Invocations smoke request has a 300-second CLI timeout inside a six-minute step, leaving one minute for setup and validation. This headroom lets the SDK's existing retries finish after transient Foundry capacity or throttling errors; it adds no workflow-level retry and does not guarantee model capacity. Timeouts, invocation failures, and invalid replies still fail the job. Azure CLI account output is suppressed. Configuration/deployment diagnostics, readiness details, and raw responses remain runner-local and are not uploaded. Always-run cleanup removes temporary files and .azure; abrupt termination also relies on hosted-runner disposal. The summary contains commit, logical environment, version, and step outcomes, not Azure identifiers or endpoints.
Failure may occur after publication. There is no automatic retry or rollback. Inspect Foundry before another attempt; recovery requires a reviewed fix/revert, successful CI, and separately authorized, environment-approved deployment.
Original deployment source: microsoft/IssueLens#39, merged to main at 8c524ff144ff24ce8f15aa1144a78d44238ced5b. The original maintenance review inspected all four PR file patches and verified their blob identities at that merged revision. The workflow, manifest, and ignore file were read at that revision; the deployment-guide changes were inspected through the PR patch, not a full README read.
Approval-policy update: microsoft/IssueLens#43, merged to main at dde39d8301112f3621d91d8acd2b0c3766172ab4, also the supplied push-after and source-tip revision. All three PR file patches were inspected, with stable PR metadata rechecked after paging. The workflow and tests were read at that revision; the README exceeds the bounded full-file read limit, so its changed approval/setup guidance was inspected in the PR patch and its blob identity verified in the merged tree. This update removes only the workflow's hard-coded self-review prohibition, not required reviewers, disabled administrator bypass, or exact-commit push CI.
Invocations root-selection update: microsoft/IssueLens#44, merged to main at b7084a6738f24c35bd61fd703cacd47c5817b9f0, the supplied push-after/source-tip and observed main revision for this review. All three PR patches were inspected and PR metadata remained stable after paging; all changed-file blob identities matched the merged commit. The workflow and tests were read at that immutable revision; the README addition was verified through its PR patch and matching merged blob, not a full README read. The change leaves approval policy, protocol/version pins, runtime prompts, and recovery protections unchanged.
Regression tests cover gates, configuration, pinned actions/components, bounded deployment, protocol checks, cleanup, and manifest compatibility. Executable gate tests run the actual workflow step with Bash/jq and stubbed GitHub responses: both self-review settings are accepted with valid protections and CI; missing/empty reviewers, administrator bypass, missing/unsuccessful CI, and API failures are rejected. They also check the exact push/branch/SHA query arguments. Executable extension-setup tests use Bash/jq with a stubbed azd to cover drift, missing/extra/duplicate entries, malformed inventories, command failures, and newer registry versions alongside correctly installed pins. Tests were inspected, not executed during wiki maintenance. This page records merged implementation and documented prerequisites, not a release, live deployment, OIDC/RBAC verification, or hosted readiness guarantee.
Invocations regressions run the actual workflow Bash step with real jq, stubbed azd, and synthetic SSE. They cover root selection with tool inventory, absent/explicit-null identifiers, no selection, rejection of non-null nesting identifiers and other agent selections, tool/delegation events, tool requests, errors before/after the answer, wrong or nested-only replies, invalid terminal IDs, malformed/truncated streams, and nonzero azd exit. Responses regressions now execute that workflow step too, covering an exact successful completion plus empty, malformed, incomplete, cancelled, duplicate-completion, error, wrong-reply, and nonzero-CLI-exit cases. The shared test helper supplies scripts through stdin to preserve Bash/jq escaping; only Windows shims the unsupported Git Bash file-size limit, while non-Windows tests retain the real ulimit -f 8192 command.
Smoke-test retry-headroom update: microsoft/IssueLens#59, merged to main at c431d42dddf4e6bf20329b0ac96dbd8a4bf04006, the supplied push-after/source-tip revision. All three changed-file patches were inspected and PR metadata remained stable after manifest and patch paging; the three merged blob identities matched the immutable source tree. The workflow and tests were read at that revision. The 69,881-byte deployment guide exceeded the bounded full-file reader, so its changed operational guidance was inspected through the complete PR patch and its merged blob identity was verified. Tests were inspected, not executed during wiki maintenance. This documents merged workflow behavior, not a release, live deployment, capacity guarantee, or permission to retry a failed deployment.