@andwhy/e2e-pipeline 0.13.0 → 0.13.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andwhy/e2e-pipeline",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Scaffolds the full e2e testing pipeline: agent-assisted Playwright tests, CI runs against Vercel previews, and Checkly monitors that follow production deploys",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,6 +55,9 @@ env:
|
|
|
55
55
|
PROTECTED_PATHS: '^(\.github/|\.claude/|\.mcp\.json$|.*\.config\.(ts|mjs|js|cjs)$|package\.json$|pnpm-lock\.yaml$|package-lock\.json$|yarn\.lock$|\.env)'
|
|
56
56
|
# How long a merged heal PR blocks a second silent attempt on the same check.
|
|
57
57
|
REPEAT_WINDOW_DAYS: 7
|
|
58
|
+
# Conventional-commit scope for heal commits and PR titles:
|
|
59
|
+
# fix(<scope>): heal check "<name>". Match your repo's convention.
|
|
60
|
+
HEAL_COMMIT_SCOPE: tests
|
|
58
61
|
|
|
59
62
|
jobs:
|
|
60
63
|
heal:
|
|
@@ -261,8 +264,14 @@ jobs:
|
|
|
261
264
|
git config user.name "github-actions[bot]"
|
|
262
265
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
263
266
|
git checkout -b "$branch"
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
# Stage everything, then unstage the agent's scratch dir. An
|
|
268
|
+
# ':(exclude).checkly-heal' pathspec looks equivalent but exits 1
|
|
269
|
+
# when the path is gitignored (as init makes it), which killed
|
|
270
|
+
# every PR step before a commit existed.
|
|
271
|
+
git add -A
|
|
272
|
+
git reset -q -- .checkly-heal
|
|
273
|
+
title="fix($HEAL_COMMIT_SCOPE): heal check \"$CHECK_NAME\""
|
|
274
|
+
git commit -m "$title"
|
|
266
275
|
git push -u origin "$branch"
|
|
267
276
|
|
|
268
277
|
gh label create checkly-heal --force \
|
|
@@ -289,7 +298,7 @@ jobs:
|
|
|
289
298
|
} > pr-body.md
|
|
290
299
|
|
|
291
300
|
url=$(gh pr create \
|
|
292
|
-
--title "
|
|
301
|
+
--title "$title" \
|
|
293
302
|
--body-file pr-body.md \
|
|
294
303
|
--label checkly-heal)
|
|
295
304
|
echo "url=$url" >> "$GITHUB_OUTPUT"
|
|
@@ -309,11 +318,23 @@ jobs:
|
|
|
309
318
|
APP_CHANGE: ${{ steps.outcome.outputs.app_change }}
|
|
310
319
|
PR_URL: ${{ steps.pr.outputs.url }}
|
|
311
320
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
321
|
+
BRANCH: checkly-heal/${{ steps.guard.outputs.slug }}-${{ github.run_id }}
|
|
312
322
|
run: |
|
|
313
|
-
|
|
323
|
+
# A fix only reaches review through a PR. When the PR step failed,
|
|
324
|
+
# "fix ready for review" would be false: report the failure and
|
|
325
|
+
# offer the re-run instead.
|
|
326
|
+
outcome="$CLASSIFICATION"
|
|
327
|
+
if { [ "$CLASSIFICATION" = "healed" ] || [ "$CLASSIFICATION" = "flaky" ]; } && [ -z "$PR_URL" ]; then
|
|
328
|
+
outcome="pr-failed"
|
|
329
|
+
fi
|
|
330
|
+
|
|
331
|
+
case "${MODE}:${outcome}" in
|
|
314
332
|
repeat:*)
|
|
315
333
|
title=":rotating_light: *\`$CHECK_NAME\` is failing again*"
|
|
316
334
|
body="A heal PR for this check merged within the last $REPEAT_WINDOW_DAYS days, so no second automatic fix was attempted. This needs a developer." ;;
|
|
335
|
+
*:pr-failed)
|
|
336
|
+
title=":rotating_light: *\`$CHECK_NAME\` failed — fix made, but the PR could not be opened*"
|
|
337
|
+
body="The agent classified this as $CLASSIFICATION and made a fix, then opening the PR failed, so nothing reached review. If branch \`$BRANCH\` exists, open the PR from it; otherwise check the run logs and re-run the heal. Agent diagnosis: $SUMMARY" ;;
|
|
317
338
|
*:healed)
|
|
318
339
|
title=":wrench: *\`$CHECK_NAME\` failed — fix ready for review*"
|
|
319
340
|
body="$SUMMARY" ;;
|
|
@@ -339,6 +360,8 @@ jobs:
|
|
|
339
360
|
# label it as what it is rather than defaulting to agent-failed.
|
|
340
361
|
label="${CLASSIFICATION:-agent-failed}"
|
|
341
362
|
[ "$MODE" = "repeat" ] && label="repeat-offender"
|
|
363
|
+
# agent-failed also renders the Re-run heal button.
|
|
364
|
+
[ "$outcome" = "pr-failed" ] && label="agent-failed"
|
|
342
365
|
|
|
343
366
|
# Failing test titles, best effort from the Checkly result's embedded
|
|
344
367
|
# Playwright report — the recursive search tolerates schema changes,
|