test: add deterministic Stage 3 executor safe-output E2E suite#1353
test: add deterministic Stage 3 executor safe-output E2E suite#1353jamesadevine wants to merge 3 commits into
Conversation
Adds a no-LLM end-to-end test of the `ado-aw execute` (Stage 3) executor: a TypeScript ado-script harness crafts the executor NDJSON directly, sets up ADO preconditions via REST, runs the real binary, asserts effects, cleans up, and files a deduped GitHub issue on failure. Covers all ADO-write safe outputs including the flagship create-pull-request. The harness is test-only and excluded from the shipped ado-script.zip. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Well-structured addition with good test hygiene — a few real issues worth fixing before merging. Findings🐛 Bugs / Logic Issues
🔒 Security Concerns
|
- github-issue: URL-encode SYSTEM_TEAMPROJECT in the build URL - create-pull-request: record PR id before fallible asserts so cleanup always abandons it; pass git auth via GIT_CONFIG_* env instead of -c argv so the token is not exposed in /proc/<pid>/cmdline - execute-cli: add a bounded timeout to the ado-aw execute child so a hung run fails fast instead of blocking the suite - runner: catch execute errors as a clean scenario failure; type runAll as Scenario<unknown>[] - ado-rest: move the readonly token field up with the other declarations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Looks good — well-engineered test harness with a clean scenario contract, correct cleanup semantics, and solid security hygiene. A few minor issues worth noting. Findings
|
- ado-rest: add a per-request AbortSignal timeout and route getWikiPage through the centralized authedFetch so auth + timeout stay in one place (covers hung ADO endpoints during the assert phase) - create-pull-request: log git commands via ctx (token rides in env, not argv) so the previously-unused ctx param has a purpose - execute-cli: quote the safe-outputs tool key as a JSON string (valid YAML) so an unusual tool name cannot emit broken YAML Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Overall solid work — the harness design is clean and well-structured. A few issues worth addressing before merge. Findings🐛 Bugs / Logic Issues
|
Summary
Adds a deterministic, no-LLM end-to-end test of the Stage 3 (
ado-aw execute) safe-output executor.The existing daily suite in
tests/safe-outputs/drives Stage 3 by having an LLM agent (Stage 1) emit each safe output, so it validates the full agentic flow but is inherently non-deterministic/flaky. This new suite removes the agent from the loop: for every ADO-write safe output itsafe_outputs.ndjsoninput directly (fixed literal values),ado-aw executebinary (built from the checkout),and, on any failure, files a deduped
[executor-e2e-failure]GitHub issue ongithubnext/ado-awand fails the build.What's included
scripts/ado-script/src/executor-e2e/(TypeScript): scenario contract, focused ADO REST client,ado-aw executewrapper, runner, entry point, and direct GitHub issue filer.agent-definitions, generates a realgit diffpatch +base_commit+patch_sha256, asserts the PR + pushed branch, then abandons + deletes).tests/executor-e2e/azure-pipelines.yml(daily + manual, builds HEAD, runs againstmsazuresphere/AgentPlayground) with a registration/handoffREADME.md.ado-script.zip:executor-e2eadded toNON_BUNDLE_DIRS, abuild:executor-e2escript emitting to gitignoredtest-bin/, kept out of the mainbuildchain.docs/ado-script.mdandtests/safe-outputs/README.md.Test plan
npm run typecheck— clean.npm test(vitest) — 477 pass, including 20 new offline unit tests (ndjson/source rendering, executed-record parsing, issue title/body/dedupe, runner skip/setup-failure handling, bundle-coverage carve-out).ado-aw execute --dry-runagainst a synthesized source + NDJSON — confirmed the source/config/NDJSON plumbing and executed-record output.npm run build:executor-e2e— bundle builds totest-bin/,git check-ignoreconfirms it's ignored, and no rootado-script/*.jsis produced (so it never enters the release glob).Remaining (one-time manual ADO handoff, documented in
tests/executor-e2e/README.md): register the pipeline in AgentPlayground, grant the build identity write access onagent-definitions, and set theEXECUTOR_E2E_GITHUB_TOKENsecret — after which the first live run exercises the scenarios end-to-end.