Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/plugin-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,22 @@ on:
type: string
default: "tests/_testkit"
capture-all-traces:
description: "Capture a Playwright trace for EVERY scenario (not just failures). Default: failing only."
# Kept for compatibility with existing callers (the caller template passes
# it from a workflow_dispatch input). It is now a no-op in the default
# direction: traces are ALWAYS captured (DEC-073). Setting it false no
# longer suppresses them — use trace-mode if you really want that.
description: "Deprecated — traces are always captured (DEC-073). Use trace-mode to override."
required: false
type: boolean
default: false
trace-mode:
# Escape hatch for the rare case where trace capture itself is the
# problem (disk pressure on a huge suite). Accepts any Playwright trace
# mode: on | retain-on-failure | on-first-retry | off.
description: "Playwright trace mode. Default 'on' (DEC-073 — a green run must leave evidence too)."
required: false
type: string
default: "on"
secrets:
# DEC-075: all three are now OPTIONAL. They were `required: true` back when
# the devkit was a PRIVATE repo and the submodule could only be cloned with
Expand Down Expand Up @@ -227,7 +239,12 @@ jobs:
A0_IMAGE: ${{ steps.resolve.outputs.a0_image }}
A0_POD_ENV: ${{ steps.resolve.outputs.pod_env }}
GHCR_TOKEN: ${{ secrets.GHCR_PULL_TOKEN }}
BDD_TRACE: ${{ inputs.capture-all-traces && 'on' || 'retain-on-failure' }}
# DEC-073: traces are ALWAYS captured, so a green run leaves evidence to
# diff a later regression against. This line used to hardcode
# 'retain-on-failure' unless capture-all-traces was set, which silently
# overrode the config default and meant every consumer's green e2e
# shipped 0 traces — the exact defect DEC-073 was written to fix.
BDD_TRACE: ${{ inputs.trace-mode }}
run: |
set -euo pipefail
mkdir -p dist "$GITHUB_WORKSPACE/artifacts"
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ the frozen Make target contract (SPEC Appendix E.1), the reusable workflow input
`Makefile.devkit` / `.devkit.yml` interface, or a tightening of the enforcement gates.
**MINOR** = new backward-compatible targets/checks/assets. **PATCH** = fixes that don't change the contract.

## Unreleased

- **Fix: traces still were not captured on green runs in consumers** (DEC-073, completing it).
v2.1.4 changed the trace default to `on` in `playwright-base.config.ts`, but two other places
still forced `retain-on-failure` and won: the reusable workflow hardcoded
`BDD_TRACE: ${{ inputs.capture-all-traces && 'on' || 'retain-on-failure' }}`, and the BDD suite
keeps its **own** `e2e/bdd/playwright.config.ts` whose default was also `retain-on-failure`.
Consumers therefore still shipped `copied 0 trace(s)` on a green run — the exact defect DEC-073
was written to fix, reported as fixed while two of the three settings still disagreed.
New `trace-mode` input (default `on`) replaces the boolean flip; `capture-all-traces` is kept for
caller compatibility but is now a no-op in the default direction.

## v2.1.4 — 2026-08-04

- **Fix: Dependabot PRs could never go green** (DEC-075). The reusable workflow declared its
Expand Down
12 changes: 9 additions & 3 deletions e2e/bdd/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ const RED_PROOF = process.env.BDD_SKIP_INSTALL === "1";
export default defineConfig({
testDir, reporter: [["list"]], timeout: 120000, workers: 1, fullyParallel: false,
// trace = the rich single-file artifact (network + DOM snapshots + console + video + timeline),
// viewable via `npx playwright show-trace` / trace.playwright.dev. Default: only failing scenarios
// (retain-on-failure); set BDD_TRACE=on (the workflow's capture-all-traces dispatch input) for every one.
// viewable via `npx playwright show-trace` / trace.playwright.dev.
//
// Default "on" (DEC-073): a GREEN run must leave evidence too, otherwise there
// is no baseline to diff a later regression against and a scenario can only be
// diagnosed after it has already broken. This default was "retain-on-failure",
// which is the same defect DEC-073 fixed in playwright-base.config.ts — the
// BDD suite kept its own copy of the setting and was missed. Override with
// BDD_TRACE / the workflow's trace-mode input.
use: {
baseURL: process.env.A0_BASE || "http://localhost:8099",
video: RED_PROOF ? "off" : "on",
screenshot: RED_PROOF ? "off" : "on",
trace: RED_PROOF ? "off" : ((process.env.BDD_TRACE as any) || "retain-on-failure"),
trace: RED_PROOF ? "off" : ((process.env.BDD_TRACE as any) || "on"),
},
});
Loading