[EW | test gates] dev: ew definition of done#379
Draft
anfibiacreativa wants to merge 6 commits intoewfrom
Draft
Conversation
- .github/PULL_REQUEST_TEMPLATE/ew_pr_template.md — selectable [EW] template with consolidated DoD checklist (functional, quality, architecture/contracts, Skills Lab conditional, E2E, security, branch hygiene) - .github/workflows/ew-pr-checklist.yml — GitHub Actions job that validates required DoD items are checked; enforces Skills Lab sub-checklist when "Skills Lab changed in this PR" is ticked - .github/pull_request_template.md — adds pointer to EW template for Experience Builder work
Husky pre-push hook detects if commits touching Skills Lab source files are being pushed, then automatically runs the 13 Playwright E2E tests in ../da-live before allowing the push to proceed. - Checks git diff of pushed range for nx/nx2 skills-lab paths - Resolves da-live test dir relative to da-nx root (sibling clone) - Errors with clear message if da-live is not found - Push can be bypassed with --no-verify when intentionally skipping
Routes changed source paths to their matching Playwright E2E spec(s): - skills-lab/skills-editor → skills-lab.spec.js - browse → browse.spec.js - canvas/form/quick-edit → edit.spec.js, formatting.spec.js - form/loc → sheet.spec.js - browse/shared → copy_rename.spec.js, delete.spec.js - snapshot-admin/canvas → versions.spec.js Canvas and nav specs stubbed as commented placeholders, ready to uncomment when specs land in da-live. Only runs specs relevant to what changed; no-ops on unrelated paths.
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.
[EW] Definition of Done — PR template, CI check, and pre-push E2E gate
Summary
[EW]pull request template with a consolidated Definition of Done checklist (functional, quality, architecture/contracts, Skills Lab, E2E, security, branch hygiene).ew, with conditional Skills Lab sub-checks when the "Skills Lab changed in this PR" box is ticked.pre-pushhook that maps changed source paths to their matching Playwright E2E spec(s) in the siblingda-livecheckout and runs only the relevant specs before a push is allowed.Why
exp-workspacetofeat/experience-builderhas behavioral contracts (data model, dual storage,.mdwins merge rule, public CSS selectors, DA admin API surface) that must not regress silently.What Changed
PR template + CI enforcement
.github/PULL_REQUEST_TEMPLATE/ew_pr_template.md— selectable EW template with the full DoD checklist, conditional Skills Lab section, and public API reminders..github/workflows/ew-pr-checklist.yml— GH Actions job that parses the PR body, skips when the EW template isn't in use, fails when required items are unchecked, and additionally enforces Skills Lab sub-items when that box is ticked..github/pull_request_template.md— note added pointing to?template=ew_pr_template.mdfor EW work.Local pre-push gate
.husky/pre-push— Husky hook that:npx playwright test <specs> --project=chromiumin../da-live/test/e2e,canvas.spec.js/nav.spec.jsready to uncomment when those specs land.Misc
.gitignore—PR-throwaways/entry so local PR drafts are never tracked.Test Plan
ewwithout the EW template → CI job runs and skips silently (green).ewusing?template=ew_pr_template.mdwith required items unchecked → CI job fails with a list of missing items.git pushfromda-nxon a branch that doesn't touch any mapped path → hook exits immediately, push proceeds.git pushfromda-nxon a branch that touchesnx/blocks/skills-lab/**withda-livecloned as sibling → hook runsskills-lab.spec.jsin chromium and blocks on failure.git pushwithoutda-liveas sibling → hook prints a helpful error and blocks.git push --no-verifybypasses the hook cleanly.Risks / Follow-ups
Risks:
npm installruns Husky'sprepare).pull_request_targettrigger runs with base-branch permissions and PR body content. The workflow only reads text and doesn't checkout the PR, so the attack surface is minimal, but worth noting.da-liveis a sibling clone. If not present, the hook errors rather than silently skipping — intentional, but new contributors may be surprised.Follow-ups:
maininda-live(so merging tomainis gated regardless of local hooks).canvas.spec.js/nav.spec.jswhen those specs are added toda-live.npm run preparereminder in the EW template so contributors activate Husky locally.