Skip to content

Commit a078012

Browse files
docs: fix stale {{ copilot_ado_env }} docs, add TODO for test engine hardcode (#295)
- Replace obsolete {{ copilot_ado_env }} AGENTS.md section with correct {{ engine_env }} docs (engine-specific env vars: GITHUB_TOKEN, OTEL) - Add TODO to CompileContext::for_test() flagging hardcoded Engine::Copilot as tech debt for when multiple engines are supported Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f90bd81 commit a078012

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,11 +873,15 @@ The step:
873873

874874
If `permissions.read` is not configured, this marker is replaced with an empty string.
875875

876-
## {{ copilot_ado_env }}
876+
## {{ engine_env }}
877877

878-
Generates environment variable entries for the copilot AWF step when `permissions.read` is configured. Sets both `AZURE_DEVOPS_EXT_PAT` and `SYSTEM_ACCESSTOKEN` to the read service connection token (`SC_READ_TOKEN`).
878+
Generates engine-specific environment variable entries for the AWF sandbox step via `Engine::env()`. For the Copilot engine, this produces:
879879

880-
If `permissions.read` is not configured, this marker is replaced with an empty string, and ADO access tokens are omitted from the copilot invocation.
880+
- `GITHUB_TOKEN: $(GITHUB_TOKEN)` — GitHub authentication
881+
- `GITHUB_READ_ONLY: 1` — Restricts GitHub API to read-only access
882+
- `COPILOT_OTEL_ENABLED`, `COPILOT_OTEL_EXPORTER_TYPE`, `COPILOT_OTEL_FILE_EXPORTER_PATH` — OpenTelemetry file-based tracing for agent statistics
883+
884+
ADO access tokens (`AZURE_DEVOPS_EXT_PAT`, `SYSTEM_ACCESSTOKEN`) are not part of this marker — they are injected separately by `{{ acquire_ado_token }}` and extension pipeline variable mappings when `permissions.read` is configured.
881885

882886
## {{ acquire_write_token }}
883887

src/compile/extensions/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ impl<'a> CompileContext<'a> {
156156
}
157157

158158
/// Create a context for tests (no async, no git remote inference).
159+
// TODO: resolve engine from front_matter.engine when multiple engines are supported,
160+
// instead of hardcoding Engine::Copilot. Currently safe because "copilot" is the only
161+
// engine variant, but this will need to call get_engine() once more are added.
159162
#[cfg(test)]
160163
pub fn for_test(front_matter: &'a FrontMatter) -> Self {
161164
Self {

0 commit comments

Comments
 (0)