ado-sync 0.1.49 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -110
- package/dist/azure/test-cases.d.ts +6 -0
- package/dist/azure/test-cases.js +24 -0
- package/dist/azure/test-cases.js.map +1 -1
- package/dist/azure/test-runs.d.ts +60 -0
- package/dist/azure/test-runs.js +293 -0
- package/dist/azure/test-runs.js.map +1 -0
- package/dist/azure/work-items.d.ts +26 -0
- package/dist/azure/work-items.js +53 -0
- package/dist/azure/work-items.js.map +1 -1
- package/dist/cli.js +226 -1
- package/dist/cli.js.map +1 -1
- package/dist/sync/publish-results.d.ts +7 -0
- package/dist/sync/publish-results.js +27 -0
- package/dist/sync/publish-results.js.map +1 -1
- package/docs/cli.md +200 -1
- package/docs/publish-test-results.md +69 -0
- package/docs/workflows.md +76 -0
- package/package.json +1 -1
- package/.next-steps.md +0 -179
package/.next-steps.md
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
What I'd build next (priority order)
|
|
2
|
-
|
|
3
|
-
1. create_issue_on_failure — GitHub Issues + ADO Bugs (dual provider) ✅ DONE
|
|
4
|
-
|
|
5
|
-
When publish-test-results finds failures, automatically file issues so agents can pick them up
|
|
6
|
-
and propose fix PRs. Supports both GitHub Issues and ADO Bugs as providers under one config key.
|
|
7
|
-
|
|
8
|
-
--- Why GitHub Issues is the better default ---
|
|
9
|
-
|
|
10
|
-
GitHub Issues is preferred over ADO Bugs for most teams because:
|
|
11
|
-
- 5,000 req/hour API limit vs ADO's stricter rate limits
|
|
12
|
-
- The healer agent lives in GitHub Actions — Issue → PR → auto-close on merge is native
|
|
13
|
-
- Only requires repo `issues: write` permission, not ADO Work Items (Write)
|
|
14
|
-
- Dedup by label search is simpler than WiQL queries
|
|
15
|
-
- Issue body can embed the ADO TC URL, so full traceability is preserved
|
|
16
|
-
|
|
17
|
-
ADO Bugs remain available for teams fully inside ADO (no GitHub, or policy requires bugs in ADO).
|
|
18
|
-
|
|
19
|
-
--- The bulk-failure problem ---
|
|
20
|
-
|
|
21
|
-
A full environment outage (app down, auth broken) can fail 10,000 tests and would create 10,000
|
|
22
|
-
issues, hitting API limits and flooding the tracker. Guards are applied in order before any issue
|
|
23
|
-
is filed:
|
|
24
|
-
|
|
25
|
-
1. Failure rate threshold (default 20%)
|
|
26
|
-
If >20% of tests fail → skip per-test issues entirely.
|
|
27
|
-
Create ONE environment-failure issue with a summary of all failures.
|
|
28
|
-
|
|
29
|
-
2. Error signature clustering
|
|
30
|
-
Group failures by hashed error message.
|
|
31
|
-
If 500 tests all fail with ERR_CONNECTION_REFUSED → ONE cluster issue listing affected tests
|
|
32
|
-
(up to 20 names, then "+ N more").
|
|
33
|
-
|
|
34
|
-
3. Hard cap (default 50)
|
|
35
|
-
Ceiling regardless of strategy. After the cap, one "overflow" summary issue is created:
|
|
36
|
-
"50 issues filed; X additional failures suppressed — possible environment issue."
|
|
37
|
-
|
|
38
|
-
4. Dedup against open issues
|
|
39
|
-
Skip creation if an open issue already exists for that TC (matched by label tc:ID or title).
|
|
40
|
-
|
|
41
|
-
Decision tree at runtime:
|
|
42
|
-
|
|
43
|
-
failures > threshold% of total?
|
|
44
|
-
└─ YES → 1 environment issue, stop
|
|
45
|
-
└─ NO
|
|
46
|
-
└─ cluster by error signature
|
|
47
|
-
└─ cluster size > 10?
|
|
48
|
-
└─ YES → 1 issue per cluster (lists affected TCs)
|
|
49
|
-
└─ NO → 1 issue per TC (up to maxIssues cap)
|
|
50
|
-
└─ cap hit? → 1 overflow summary issue
|
|
51
|
-
|
|
52
|
-
--- CLI ---
|
|
53
|
-
|
|
54
|
-
ado-sync publish-test-results \
|
|
55
|
-
--testResult results/ctrf.json \
|
|
56
|
-
--create-issues-on-failure \
|
|
57
|
-
--github-repo owner/repo \
|
|
58
|
-
--github-token $GITHUB_TOKEN
|
|
59
|
-
|
|
60
|
-
# ADO Bugs instead:
|
|
61
|
-
ado-sync publish-test-results \
|
|
62
|
-
--testResult results/ctrf.json \
|
|
63
|
-
--create-issues-on-failure \
|
|
64
|
-
--issue-provider ado
|
|
65
|
-
|
|
66
|
-
--- Config (ado-sync.json) ---
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
"publishTestResults": {
|
|
70
|
-
"createIssuesOnFailure": {
|
|
71
|
-
"provider": "github", // "github" | "ado"
|
|
72
|
-
"repo": "owner/repo", // GitHub only
|
|
73
|
-
"labels": ["test-failure", "automated"],
|
|
74
|
-
"threshold": 20, // % of failures that triggers env-failure mode
|
|
75
|
-
"maxIssues": 50, // hard cap per run
|
|
76
|
-
"clusterByError": true, // group same-error failures into one issue
|
|
77
|
-
"dedupByTestCase": true, // skip if open issue for TC already exists
|
|
78
|
-
"areaPath": "MyProject\\QA", // ADO only
|
|
79
|
-
"assignTo": "$AZURE_DEVOPS_USER"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
--- MCP tools ---
|
|
85
|
-
|
|
86
|
-
create_issue({ title, failureDetails, testCaseId, buildId, provider })
|
|
87
|
-
→ files one issue (GitHub or ADO) and returns the issue/bug URL
|
|
88
|
-
|
|
89
|
-
create_issues_from_run({ runId, provider, ...guardOptions })
|
|
90
|
-
→ applies full guard logic against a completed test run, returns summary
|
|
91
|
-
|
|
92
|
-
--- GitHub Issue body template ---
|
|
93
|
-
|
|
94
|
-
## Test failure: {testName}
|
|
95
|
-
|
|
96
|
-
| Field | Value |
|
|
97
|
-
|---|---|
|
|
98
|
-
| ADO Test Case | [#{testCaseId}]({adoTcUrl}) |
|
|
99
|
-
| Build | #{buildId} |
|
|
100
|
-
| Run | [View in Azure DevOps]({runUrl}) |
|
|
101
|
-
| File | {filePath}:{line} |
|
|
102
|
-
|
|
103
|
-
### Error
|
|
104
|
-
```
|
|
105
|
-
{errorMessage}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Stack trace
|
|
109
|
-
```
|
|
110
|
-
{stackTrace}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
/cc @healer-agent
|
|
114
|
-
|
|
115
|
-
This unblocks Use Case 4 — the GitHub Agentic Workflow where the Playwright Healer Agent reads
|
|
116
|
-
the issue, understands the failure from errorMessage + stackTrace + ADO TC context, then proposes
|
|
117
|
-
a fix PR. The issue is the handoff between CI and the healer.
|
|
118
|
-
|
|
119
|
-
2. CTRF format support in publish-test-results ✅ DONE
|
|
120
|
-
The scope doc and materia article both use CTRF. It's becoming the standard cross-framework report format. Teams using the materia pattern will arrive with CTRF output expecting ado-sync to accept it.
|
|
121
|
-
Auto-detected from results.tests array structure. TC IDs from tags[] or test name. Attachments,
|
|
122
|
-
stdout/stderr uploaded automatically. Documented in docs/publish-test-results.md.
|
|
123
|
-
|
|
124
|
-
3. get_story_context MCP tool (Planner agent feed) ✅ DONE
|
|
125
|
-
Returns AC items (bullet list), inferred tags (@smoke, @auth…), extracted actors, and linked TC IDs.
|
|
126
|
-
CLI: ado-sync story-context --story-id 1234
|
|
127
|
-
MCP: get_story_context({ storyId: 1234 })
|
|
128
|
-
Implemented in src/azure/work-items.ts — getStoryContext() with tag inference + actor extraction.
|
|
129
|
-
|
|
130
|
-
4. ai-workflow-manifest.json generator ✅ DONE
|
|
131
|
-
CLI: ado-sync generate --manifest --story-ids 1234
|
|
132
|
-
MCP: generate_manifest({ storyIds: [1234], outputFolder: "e2e/bdd", format: "gherkin" })
|
|
133
|
-
Writes .ai-workflow-manifest-{id}.json with 8-step workflow, AC items, required docs checklist,
|
|
134
|
-
validation steps, and output paths. Implemented in src/sync/manifest.ts.
|
|
135
|
-
|
|
136
|
-
5. GitHub Actions reusable workflow
|
|
137
|
-
The scope doc explicitly asks for this:
|
|
138
|
-
|
|
139
|
-
"There is need to write GitHub Actions templates in TR Org Workflows repo"
|
|
140
|
-
|
|
141
|
-
A reusable workflow file:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
# .github/workflows/ado-sync.yml (reusable)
|
|
145
|
-
on:
|
|
146
|
-
workflow_call:
|
|
147
|
-
inputs:
|
|
148
|
-
test-result-path: ...
|
|
149
|
-
create-issues-on-failure: ...
|
|
150
|
-
Teams subscribe to it — one-line adoption in their own pipelines.
|
|
151
|
-
|
|
152
|
-
6. Flaky test detection in publish-test-results
|
|
153
|
-
Materia's 4-method flaky detection:
|
|
154
|
-
|
|
155
|
-
Summary-level flaky count
|
|
156
|
-
Retry pattern analysis
|
|
157
|
-
Explicit marking
|
|
158
|
-
Passed-after-retry
|
|
159
|
-
Add a --detect-flaky flag that outputs a flaky test report alongside the ADO publish. Tag flaky TCs in ADO with ado-sync:flaky so you can track trends across runs.
|
|
160
|
-
|
|
161
|
-
The full picture
|
|
162
|
-
|
|
163
|
-
User Story (ADO)
|
|
164
|
-
↓ get_story_context (MCP)
|
|
165
|
-
Planner Agent → Markdown spec
|
|
166
|
-
↓ generate --manifest
|
|
167
|
-
.ai-workflow-manifest.json + spec file
|
|
168
|
-
↓ generate (existing)
|
|
169
|
-
Playwright test skeleton
|
|
170
|
-
↓ push (existing)
|
|
171
|
-
ADO Test Case with @tc:ID writeback
|
|
172
|
-
↓ CI runs tests
|
|
173
|
-
CTRF / Playwright JSON results
|
|
174
|
-
↓ publish-test-results (existing + flaky detection)
|
|
175
|
-
ADO Test Run results
|
|
176
|
-
↓ failures → create_issue_on_failure (new, GitHub Issues or ADO Bugs)
|
|
177
|
-
GitHub Issue / ADO Bug → Healer Agent → fix PR
|
|
178
|
-
ado-sync becomes the connective tissue across all 4 use cases in that scope document. Right now you cover the right half. Items 1–3 above close the loop on Use Cases 3 and 4.
|
|
179
|
-
|