test(executor-e2e): cover conclusion work-item filing for signal safe outputs - #2110
Open
jamesadevine with Copilot wants to merge 4 commits into
Open
test(executor-e2e): cover conclusion work-item filing for signal safe outputs#2110jamesadevine with Copilot wants to merge 4 commits into
jamesadevine with Copilot wants to merge 4 commits into
Conversation
… outputs Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jamesadevine
September 6, 2026 17:19
View session
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
jamesadevine
marked this pull request as ready for review
September 6, 2026 17:20
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are well-scoped to test harness + pipeline wiring, with added unit tests and no apparent contract mismatches in the Conclusion env/config handling.
Pull request overview
Extends the deterministic executor-e2e harness to exercise the real Conclusion reporter (conclusion.js) end-to-end for signal safe outputs, ensuring the “signal → executed manifest → filed work item” path is covered in CI and documented.
Changes:
- Added an optional
postExecutephase to scenarios and runner plumbing so post-Stage-3 consumers (Conclusion) can run before assertions. - Introduced a
conclusion-cliwrapper plus four newconclusion-*E2E scenarios that run the compiled bundle, then assert/cleanup the resulting work items via ADO REST. - Updated the executor-e2e pipeline and docs to build/pass the
conclusion.jsartifact and describe the new coverage.
File summaries
| File | Description |
|---|---|
| tests/executor-e2e/README.md | Documents new Conclusion scenarios and local env requirements. |
| tests/executor-e2e/azure-pipelines.yml | Builds conclusion.js, passes its path to the harness, and updates PR path filters. |
| scripts/ado-script/src/executor-e2e/scenarios/index.ts | Registers the new Conclusion scenarios in deterministic order. |
| scripts/ado-script/src/executor-e2e/scenarios/conclusion.ts | Adds four end-to-end Conclusion scenarios asserting work-item filing/dedup/opt-out. |
| scripts/ado-script/src/executor-e2e/scenario.ts | Adds PostExecuteRun and optional postExecute hook to the scenario contract. |
| scripts/ado-script/src/executor-e2e/runner.ts | Executes postExecute after a successful ado-aw execute, with skip/failure handling. |
| scripts/ado-script/src/executor-e2e/execute-cli.ts | Returns safeOutputDir and exports spawnCollect for shared hang protection. |
| scripts/ado-script/src/executor-e2e/conclusion-cli.ts | New wrapper that runs compiled conclusion.js with the compiler’s flat AW_* env contract and skips when absent. |
| scripts/ado-script/src/executor-e2e/tests/runner.test.ts | Adds unit tests pinning postExecute ordering, error handling, and skip behavior. |
| scripts/ado-script/src/executor-e2e/tests/conclusion-cli.test.ts | Adds unit tests for bundle resolution, env contract passing, and non-zero exit behavior. |
| docs/conclusion.md | Documents unit vs end-to-end test coverage for Conclusion reporting. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The signal safe outputs (
noop,missing-tool,missing-data) have no ADO write path — the executor only records them insafe-outputs-executed.ndjson. Their user-visible effect is produced one job later by the Conclusion job, which files work items from that manifest. The harness stopped at the executor record, so nothing exercised signal → manifest → work item end to end.Changes:
Post-execute phase (
scenario.ts,runner.ts,execute-cli.ts) — new optionalpostExecute(ctx, state, run)hook that runs after a successfulado-aw executeand beforeassert, handed the safe-output dir and parsed records. Failures report phasepost-execute;SkipErrorskips; cleanup still runs.runExecutenow returnssafeOutputDir, andspawnCollectis exported (with a label) so both child processes share the same hang protection.conclusion-cli.ts— spawns the compiledconclusion.jswith the same flatAW_*env contract the compiler emits (AW_SAFE_OUTPUT_DIR,AW_PIPELINE_NAME,AW_<TOOL>_TITLE_PREFIX, …). The bundle is a build artifact, so scenarios skip whenEXECUTOR_E2E_CONCLUSION_BUNDLEis unset or missing rather than failing.scenarios/conclusion.ts— four scenarios asserting the filed work item via ADO REST:conclusion-noopconclusion-missing-toolconclusion-missing-dataconclusion-report-as-work-item-falseTitles are unique per build (
[ado-aw-e2e conclusion] ado-aw-det-<buildId>-<scenario>) so concurrent runs never dedup into each other's item; each is deleted in cleanup. Work-item lookup polls because WIQL lags creation — which also guarantees the reporter's own dedup query can see the item before the append run.Pipeline / docs —
azure-pipelines.ymlbuildsconclusion.js, passes its path, and addsscripts/ado-script/src/conclusion/**to the PR path filter; coverage documented intests/executor-e2e/README.mdanddocs/conclusion.md.Test plan
npm run typecheckandnpm test(1190 tests) inscripts/ado-script.conclusion-cli.test.tspinning the env contract, the skip paths, and non-zero bundle exit.conclusion.jsover a hand-written manifest to confirm the signal-detection and opt-out log lines the scenarios assert on.