@orion-qa/orion 3.3.0 → 3.4.1

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.
Files changed (103) hide show
  1. package/.claude/skills/appium/SKILL.md +2 -2
  2. package/.claude/skills/appium/templates/ci/github-actions-android.yml +1 -1
  3. package/.claude/skills/appium/templates/ci/github-actions-ios.yml +1 -1
  4. package/.claude/skills/appium/templates/ci/github-actions-windows.yml +1 -1
  5. package/.claude/skills/automation-implementation/SKILL.md +2 -2
  6. package/.claude/skills/automation-strategy/SKILL.md +1 -0
  7. package/.claude/skills/cicd-integration/SKILL.md +1 -1
  8. package/.claude/skills/code-review/SKILL.md +1 -1
  9. package/.claude/skills/code-review/references/pattern-rules.md +1 -0
  10. package/.claude/skills/csharp/SKILL.md +1 -0
  11. package/.claude/skills/documentation/SKILL.md +1 -1
  12. package/.claude/skills/execution/SKILL.md +8 -8
  13. package/.claude/skills/failure-analysis/SKILL.md +1 -0
  14. package/.claude/skills/failure-analysis/references/bug-report-standard.md +27 -0
  15. package/.claude/skills/httpclient/templates/ci/github-actions.yml +2 -2
  16. package/.claude/skills/java/SKILL.md +1 -0
  17. package/.claude/skills/javascript/SKILL.md +1 -0
  18. package/.claude/skills/junit5/SKILL.md +1 -1
  19. package/.claude/skills/k6/SKILL.md +1 -1
  20. package/.claude/skills/k6/templates/project/tests/load/products.js +1 -1
  21. package/.claude/skills/karate/SKILL.md +1 -1
  22. package/.claude/skills/karate/templates/ci/github-actions.yml +2 -2
  23. package/.claude/skills/newman/templates/ci/github-actions.yml +2 -2
  24. package/.claude/skills/newman/templates/collection/src/config/env.js +1 -1
  25. package/.claude/skills/nunit/SKILL.md +1 -1
  26. package/.claude/skills/orion/SKILL.md +1 -1
  27. package/.claude/skills/orion/references/assess-fix.md +1 -1
  28. package/.claude/skills/orion/references/batch.md +1 -1
  29. package/.claude/skills/orion/references/capabilities.md +1 -1
  30. package/.claude/skills/orion/references/conversation.md +4 -4
  31. package/.claude/skills/orion/references/modes.md +1 -1
  32. package/.claude/skills/orion/references/plain-language.md +3 -2
  33. package/.claude/skills/orion/references/recovery-loop.md +2 -2
  34. package/.claude/skills/orion/references/setup-card.md +1 -1
  35. package/.claude/skills/orion/references/status-lines.md +4 -4
  36. package/.claude/skills/orion/references/task-brief.md +1 -1
  37. package/.claude/skills/orion/scripts/batch_state.mjs +1 -1
  38. package/.claude/skills/orion/scripts/done_check.mjs +7 -5
  39. package/.claude/skills/orion/scripts/quiet.mjs +1 -1
  40. package/.claude/skills/orion/templates/project-context/report.md +2 -2
  41. package/.claude/skills/pact/SKILL.md +1 -1
  42. package/.claude/skills/playwright/SKILL.md +2 -2
  43. package/.claude/skills/playwright/references/electron.md +1 -1
  44. package/.claude/skills/playwright/templates/README.md +1 -1
  45. package/.claude/skills/playwright/templates/ci/azure-pipelines.yml +1 -1
  46. package/.claude/skills/playwright/templates/ci/github-actions-dotnet.yml +2 -2
  47. package/.claude/skills/playwright/templates/ci/github-actions-javascript.yml +2 -2
  48. package/.claude/skills/playwright/templates/ci/github-actions-python.yml +2 -2
  49. package/.claude/skills/playwright/templates/ci/github-actions.yml +1 -1
  50. package/.claude/skills/playwright/templates/javascript/.prettierignore +6 -0
  51. package/.claude/skills/playwright/templates/javascript/.prettierrc.json +4 -0
  52. package/.claude/skills/playwright/templates/javascript/fixtures/index.js +56 -48
  53. package/.claude/skills/playwright/templates/javascript/package.json +4 -1
  54. package/.claude/skills/playwright/templates/javascript/pageObjects/basePage.js +5 -1
  55. package/.claude/skills/playwright/templates/javascript/playwright.config.js +6 -2
  56. package/.claude/skills/playwright/templates/javascript/reporters/summaryReporter.js +80 -17
  57. package/.claude/skills/playwright/templates/javascript/resources/desc/signIn.desc.js +10 -3
  58. package/.claude/skills/playwright/templates/javascript/src/config/env.js +12 -3
  59. package/.claude/skills/playwright/templates/javascript/src/config/flags.js +3 -1
  60. package/.claude/skills/playwright/templates/javascript/tests/api/session.spec.js +8 -4
  61. package/.claude/skills/playwright/templates/javascript/tests/unit/summaryReporter.test.js +30 -6
  62. package/.claude/skills/playwright/templates/javascript/utils/random.js +3 -1
  63. package/.claude/skills/playwright/templates/project/.prettierignore +6 -0
  64. package/.claude/skills/playwright/templates/project/.prettierrc.json +4 -0
  65. package/.claude/skills/playwright/templates/project/fixtures/index.ts +21 -15
  66. package/.claude/skills/playwright/templates/project/fixtures/session.ts +9 -2
  67. package/.claude/skills/playwright/templates/project/package.json +4 -1
  68. package/.claude/skills/playwright/templates/project/pageObjects/basePage.ts +5 -1
  69. package/.claude/skills/playwright/templates/project/playwright.config.ts +4 -2
  70. package/.claude/skills/playwright/templates/project/reporters/summaryReporter.ts +84 -17
  71. package/.claude/skills/playwright/templates/project/resources/desc/signIn.desc.ts +10 -3
  72. package/.claude/skills/playwright/templates/project/src/config/env.ts +15 -4
  73. package/.claude/skills/playwright/templates/project/src/services/apiClient.ts +5 -1
  74. package/.claude/skills/playwright/templates/project/tests/api/session.spec.ts +8 -4
  75. package/.claude/skills/playwright/templates/project/tests/unit/summaryReporter.test.ts +30 -6
  76. package/.claude/skills/playwright/templates/project/utils/formFill.ts +4 -1
  77. package/.claude/skills/playwright/templates/project/utils/random.ts +3 -1
  78. package/.claude/skills/playwright/templates/project/utils/redact.ts +4 -1
  79. package/.claude/skills/pytest/SKILL.md +1 -1
  80. package/.claude/skills/python/SKILL.md +1 -0
  81. package/.claude/skills/quality-checks/SKILL.md +1 -1
  82. package/.claude/skills/requests/templates/ci/github-actions.yml +2 -2
  83. package/.claude/skills/rest-assured/SKILL.md +2 -2
  84. package/.claude/skills/rest-assured/templates/ci/github-actions.yml +2 -2
  85. package/.claude/skills/selenium/SKILL.md +1 -1
  86. package/.claude/skills/selenium/templates/ci/github-actions-csharp.yml +2 -2
  87. package/.claude/skills/selenium/templates/ci/github-actions-java.yml +2 -2
  88. package/.claude/skills/selenium/templates/ci/github-actions-python.yml +2 -2
  89. package/.claude/skills/self-healing/SKILL.md +1 -1
  90. package/.claude/skills/test-design/SKILL.md +2 -1
  91. package/.claude/skills/test-design/references/test-case-standard.md +31 -0
  92. package/.claude/skills/test-reporting/references/report-levels.md +1 -1
  93. package/.claude/skills/test-reporting/references/tool-mapping.md +1 -1
  94. package/.claude/skills/testng/SKILL.md +1 -1
  95. package/.claude/skills/typescript/SKILL.md +1 -0
  96. package/.claude/skills/ui-observation/SKILL.md +2 -2
  97. package/.claude-plugin/plugin.json +1 -1
  98. package/README.md +8 -7
  99. package/assets/architecture.svg +1 -1
  100. package/assets/run-flow.svg +1 -1
  101. package/bin/orion.mjs +6 -6
  102. package/hosts/gemini-extension/gemini-extension.json +1 -1
  103. package/package.json +2 -2
@@ -24,7 +24,7 @@ Nothing missing: no message; carry on. Otherwise:
24
24
  4. **You install:** <runtime> (<download page>); I can't install it for you.
25
25
  5. **<Jira> (to read <PR-1>):** not connected. To connect it: <its row from connect-tools.md, one line>. I won't wait for it: I'll design the cases from your request and the site now, and re-check them against <PR-1> once it's connected.
26
26
  Reply **yes** to set up all, **yes, not 1** to skip one, or **no**."
27
- Number only the items that are missing, in this order. Item 1 is offered only when the check printed `setup in the chat`; when it didn't, item 1 is "**Browser for exploring:** <its `ready: no` reason>; to fix it: <its Fix>", for the user to do. On Cursor and VS Code, after item 1 is set up or when the check says ready, the same message also asks, as its last line before the reply line: "And please confirm `browser_run_code_unsafe` and the other unused browser tools are switched off (<where>); it runs any code on this machine." (once per workspace, recorded). Windsurf and other tools whose settings live elsewhere (exit 3): "**Browser for exploring:** I can't see your tool's MCP settings; make sure its `playwright` entry points at `sut/<site>/.env`."
27
+ Number only the items that are missing, in this order. Item 1 is offered only when the check printed `setup in the chat`; when it didn't, item 1 is "**Browser for exploring:** <its `ready: no` reason>; to fix it: <its Fix>", for the user to do. Never ask the user to switch browser tools off in their tool's settings: the agents use only the tools their skills list, the host asks before any other one runs, and the doctor ("is everything set up?") reports the setting. Windsurf and other tools whose settings live elsewhere (exit 3): "**Browser for exploring:** I can't see your tool's MCP settings; make sure its `playwright` entry points at `sut/<site>/.env`."
28
28
 
29
29
  Nothing else goes in this message, with one exception that saves a round: when line 7 (the login, which has no default) is still unanswered, the message ends, after the reply line, with "**Login:** paste it with your reply (it goes only into the git-ignored `.env`), or say *I'll add it*." The yes approves only the numbered items; a login pasted in the same reply is written as [conversation.md](conversation.md) item 6. Any other unanswered card line is asked in its own message **after** the setup is done. Only a yes typed after this message counts; the card's "go" never approves it, and it's never bundled with the card or another question. Record message and reply in `decisions.md`. On yes, do the items approved, in order: item 1 with `node .claude/skills/orion/scripts/browser_setup.mjs <URL>` from the workspace root (an existing suite: add `--env-file <its own env file>`, so the browser signs in with the suite's account and no `sut/<site>/` is created) (never edit the file yourself; if it exits 1 or 2, give its warning in one line and use the test project's Playwright); items 2 and 3 with the install commands (the host shows its own prompts). Then one line on what was set up and what needs a reload ("**All set:** the browser for saucedemo (starts after you reload Cursor), Playwright in `sut/saucedemo/`. Exploring now.") and carry on; it never repeats the browser-tools reminder (said once, in the setup message). If the reply brought no login and the site needs one, the same line ends with the login question, once ("…in `sut/saucedemo/`. **Login:** paste it, or say *I'll add it*."), never a separate message. The tracker item (5) is never waited for: it is the user's to do whenever they like, so after **yes** (or **no**, or any reply that isn't "done") the run carries on without it, by [conversation.md](conversation.md) item 2a, in the same turn: explore, then the test-case table titled "Story <PR-1> not read: cases from your request and the site". Never end the turn after this message with only "connect <Jira> or paste the story". A skipped item 1 means the test project's Playwright for this run. **no**, or a skipped item the run can't do without: say in one line what that stops (for example "Without the test project I can't explore or run tests: I'll design the test cases from your description and mark the screens not observed") and carry on with what's possible; don't ask again in this run. "done" or "reloaded" means: run the checks again, then continue.
30
30
 
@@ -4,7 +4,7 @@ The user wants results and questions, not a narration of the machinery. Everythi
4
4
 
5
5
  ## Hosts that show their own activity (Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, Grok Build)
6
6
  - **No narration, three milestones.** The host already shows each file read, command and tool call. Write only: the one question you need, a result the user can use, a blocker, the deliverable. No "I'll…" lines between tool calls ("I'll pull, free the port and install", "I'll write the suite, then review it"), and no reasoning out loud while working ("Next I'll run the regression three times", "The checker wants a results file", "The output was cut off, so I'll rerun it", "I'll fix both"): the first text the user sees is the setup card, and during a build only the three milestones below. Fixing your own checker findings is silent work; its outcome shows in the result.
7
- - **Milestone lines** (a long run otherwise shows minutes of tool output and no sentence): one line, at most three times in a build or full run, each a result that just happened plus what comes next, never a plan: after exploring ("Signed in and mapped 4 pages; all 23 locators matched exactly one element. Designing the test cases."), after the code is reviewed ("8 tests written and reviewed in `sut/shop/tests`. Running them 3 times."), and after a slow install ("Playwright and Chromium installed in `sut/shop/`."). No milestone may restate one already sent.
7
+ - **Milestone lines** (a long run otherwise shows minutes of tool output and no sentence): one line, at most three times in a build or full run, each a result that just happened plus what comes next, never a plan: after exploring ("Signed in and mapped 4 pages; all 23 locators matched exactly one element. Designing the test cases."), after the code is reviewed ("8 tests written and reviewed in `sut/shop/tests`. Running them."), and after a slow install ("Playwright and Chromium installed in `sut/shop/`."). No milestone may restate one already sent.
8
8
  - **No step names, icons or prefixes** in chat: never `Understand ·`, `Design ·`, `Mode:`, `Confirmed:`, `⛔`, `📖` or the like. Two exceptions: the one-line confirmation of a decision the user just made, led by **Approved:**, **Updated:**, **Understood, …** or **All set:** ([conversation.md](conversation.md), Voice), and the result: its bold verdict (✅ ⚠️ ❌) and "⚠️ " on its attention lines, the same marks as the report ([conversation.md](conversation.md), "What the user sees"). The steps and gates are internal; they live in the run file.
9
9
  - Each message is plain sentences: what you found or did, then what you need (if anything). Numbers come from accepted RESULTs and the run file's `Run state` (UI map, test design, executor's `executed / planned`); no number without its source.
10
10
 
@@ -26,14 +26,14 @@ Signed in and mapped 3 pages: login, 6 products each with Add to cart, the cart.
26
26
  [the test-case table: ID · What it checks · Type · Priority · Expected]
27
27
  8 test cases, from your request and what the site shows. **Shall I write these?** Reply **go**, or tell me what to change in your own words, like "add a locked-out user" or "drop the fourth one".
28
28
  [user: go]
29
- 8 tests written and reviewed in sut/saucedemo/tests. Running them 3 times.
30
- **⚠️ Ready, with notes**: 8 tests in `sut/saucedemo/tests`, ran 3 times: 7 pass every time; each failed when its check was broken.
29
+ 8 tests written and reviewed in sut/saucedemo/tests. Running them.
30
+ **⚠️ Ready, with notes**: 8 tests in `sut/saucedemo/tests`, 7 of 8 pass with retries off; each failed when its check was broken.
31
31
 
32
32
  Login: automated, signed in once per run and the session reused.
33
33
 
34
34
  Coverage: log in → TS-1, TS-2 · add to cart → TS-3 to TS-5 · cart → TS-6 to TS-8.
35
35
 
36
- ⚠️ TS-6 fails every time: the app shows a different locked-out message than the story says. A defect draft is in the report; reply "file it" to send it to Jira.
36
+ ⚠️ TS-6 fails: the app shows a different locked-out message than the story says. A defect draft is in the report; reply "file it" to send it to Jira.
37
37
 
38
38
  Report: `project-context/runs/R-20261113-1010-cart.report.md`
39
39
 
@@ -34,7 +34,7 @@ Name files in `inputs`; don't paste their content into the brief. On Claude Code
34
34
  | implementer (clone task, before Gate 3) | the `git clone` command with its exit code and the clone's absolute path; `Changes` lists only that folder |
35
35
  | implementer (Gate 5) | per new or changed locator: the UI map row it came from (or `top-up` rows it added, or `unverified` on a host without a browser); the pattern rules self-check list; a fail check row per new test (or `not run` + reason); compile/collect command with exit code |
36
36
  | reviewer (Gate 5) | the `Pattern rules checked` line, the assertion inventory per changed test, and every blocking finding with its rule ID or evidence |
37
- | executor (Gate 6) | command, exit code, `executed / planned` counts, per-run results for new tests (3 runs), report paths |
37
+ | executor (Gate 6) | command, exit code, `executed / planned` counts, per-run results for new tests (1 counted run, or N for a stability check), report paths |
38
38
  | failure-analyst | the class with its evidence line; UI failures: the `heal` capture (fresh snapshot, screenshot, `error-context.md` if Playwright JS/TS) and the changed UI map rows; a heal proposal with same-target proof |
39
39
  | evidence-validator (Gate 7) | each summary claim marked supported / unsupported / contradicted |
40
40
  A UI story never reaches Gate 5 without a UI map or a recorded `not observed` reason, and scripts are never written before it (`ui-observation`, "Explore once, write after").
@@ -75,7 +75,7 @@ export function next(b) {
75
75
  if (b.workflow === 'design') return { wave: 'done', start: [], why: `${done(b)} of ${b.stories.length} stories designed and approved` };
76
76
  if (at(b, 'approved').length && !b.foundation) return { wave: 'foundation', start: ['foundation'], why: 'shared page objects, fixtures and helpers built once, before any story' };
77
77
  if (at(b, 'approved').length) return { wave: 'build', start: at(b, 'approved').slice(0, k).map((s) => s.key), why: `stories built ${k} at a time, each in its own work copy from the foundation` };
78
- if (at(b, 'built').length) return { wave: 'verify', start: at(b, 'built').slice(0, Math.min(k, 2)).map((s) => s.key), why: 'review and 3 runs per story, at most 2 runs at a time on a shared environment' };
78
+ if (at(b, 'built').length) return { wave: 'verify', start: at(b, 'built').slice(0, Math.min(k, 2)).map((s) => s.key), why: 'review and the counted run per story, at most 2 runs at a time on a shared environment' };
79
79
  if (at(b, 'verified').length) return { wave: 'integration', start: at(b, 'verified').slice(0, 1).map((s) => s.key), why: 'merged one at a time, graph check and one regression run, then accepted' };
80
80
  return { wave: 'done', start: [], why: `${done(b)} of ${b.stories.length} stories accepted` };
81
81
  }
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Usage (from the workspace root):
10
10
  * node .claude/skills/orion/scripts/done_check.mjs --project <test project> --story <KEY> --run <run id>
11
- * [--existing] [--base <git sha>] [--command "npm test"] [--no-run] [--results project-context/results] [--report <report.md>]
11
+ * [--existing] [--base <git sha>] [--runs <n>] [--command "npm test"] [--no-run] [--results project-context/results] [--report <report.md>]
12
12
  * [--result-text <file with the result message>] [--known-failures TS-4,TS-6] [--json]
13
13
  * Checks (each PASS, FAIL with the next action, or SKIP with why):
14
14
  * project suite_check.mjs reports 0 findings (placeholders, layers, scripts that name missing projects, …); for an
@@ -16,7 +16,8 @@
16
16
  * hold for any suite count: placeholders left and scripts that name a missing project
17
17
  * command the command the result gives the user exits 0; a failing test is allowed only when it is in
18
18
  * --known-failures (an app defect the result reports)
19
- * runs 3 or more results files for this run (results_parse.mjs output, `<run id>*.json`), and in each, every
19
+ * runs at least --runs results files for this run (default 1; results_parse.mjs output, `<run id>*.json`; a
20
+ * stability check passes --runs 3 or more), and in each, every
20
21
  * test of the story passed on its first attempt (retries off), except --known-failures
21
22
  * coverage graph.mjs check --story finds no gap (an AC with no case, a case with no test, a test with no case)
22
23
  * report report_check.mjs finds nothing in the report
@@ -34,7 +35,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
34
35
  const HERE = path.dirname(fileURLToPath(import.meta.url));
35
36
 
36
37
  function args(argv) {
37
- const o = { results: 'project-context/results', known: [] };
38
+ const o = { results: 'project-context/results', known: [], runs: 1 };
38
39
  for (let i = 0; i < argv.length; i++) {
39
40
  const a = argv[i];
40
41
  const v = () => argv[++i];
@@ -50,6 +51,7 @@ function args(argv) {
50
51
  else if (a === '--json') o.json = true;
51
52
  else if (a === '--existing') o.existing = true;
52
53
  else if (a === '--base') o.base = v();
54
+ else if (a === '--runs') { o.runs = Number(v()); if (!Number.isInteger(o.runs) || o.runs < 1) { console.log('done_check: --runs takes a whole number, 1 or more'); process.exit(2); } }
53
55
  else { console.log(`done_check: unknown argument ${a}`); process.exit(2); }
54
56
  }
55
57
  if (!o.project || !o.story || !o.run) {
@@ -129,7 +131,7 @@ function main() {
129
131
  // runs
130
132
  const dir = path.resolve(root, o.results);
131
133
  const files = fs.existsSync(dir) ? fs.readdirSync(dir).filter((f) => f.startsWith(o.run) && f.endsWith('.json') && !/\.(pw|raw|report)\.json$/.test(f)).sort() : [];
132
- if (files.length < 3) add('runs', 'FAIL', `${files.length} results file(s) for ${o.run} in ${o.results}`, 'after each counted run: results_parse.mjs <project>/test-summary/results.json (or the run\'s JSON or JUnit report) --run <run id>-<n> --out project-context/results/<run id>-<n>.json');
134
+ if (files.length < o.runs) add('runs', 'FAIL', `${files.length} results file(s) for ${o.run} in ${o.results}`, 'after each counted run: results_parse.mjs <project>/test-summary/results.json (or the run\'s JSON or JUnit report) --run <run id>-<n> --out project-context/results/<run id>-<n>.json');
133
135
  else {
134
136
  const bad = [];
135
137
  for (const f of files) {
@@ -143,7 +145,7 @@ function main() {
143
145
  if (t.status !== 'passed' || (t.attempts || 1) > 1) bad.push(`${f}: ${id} ${t.status}${t.attempts > 1 ? ` after ${t.attempts} attempts` : ''}`);
144
146
  }
145
147
  }
146
- if (bad.length) add('runs', 'FAIL', bad.slice(0, 4).join(' | '), 'a new test passes 3 of 3 with retries off: recovery loop for each test named');
148
+ if (bad.length) add('runs', 'FAIL', bad.slice(0, 4).join(' | '), `a new test passes ${o.runs > 1 ? `${o.runs} of ${o.runs}` : 'its counted run'} with retries off: recovery loop for each test named`);
147
149
  else add('runs', 'PASS', `${files.length} recorded runs, every ${o.story} test passed first time`);
148
150
  }
149
151
 
@@ -28,7 +28,7 @@ import path from 'node:path';
28
28
  import { spawnSync } from 'node:child_process';
29
29
  import { pathToFileURL } from 'node:url';
30
30
 
31
- const ALLOWED = /^(npm (test|t|ci|install|i)\b|npm run (test|build|lint|typecheck|check|e2e|verify|smoke|compile)[\w:.-]*|npx (--no-install )?playwright (test|install|show-report|--version)\b|pytest\b|python3? -m pytest\b|py -m pytest\b|mvn\b|\.\/mvnw\b|gradle\b|\.\/gradlew\b|dotnet (test|build|restore)\b|k6 (run|version)\b|newman run\b|npx newman run\b|pip3? install\b|python3? -m pip install\b|node (?!-e\b|--eval\b)(?:[\w.-]+\/)*(?:run|test[\w-]*|[\w-]+\.(?:spec|test))\.(?:m?js|cjs)\b|yarn(\s*$| (test|install)\b| run (test|build|lint|typecheck|check|e2e|verify|smoke|compile)[\w:.-]*)|pnpm (test|install|i|run (test|build|lint|typecheck|check|e2e|verify|smoke|compile)[\w:.-]*)\b)/;
31
+ const ALLOWED = /^(npm (test|t|ci|install|i)\b|npm run (test|build|lint|typecheck|check|e2e|verify|smoke|compile|format)[\w:.-]*|npx (--no-install )?playwright (test|install|show-report|--version)\b|pytest\b|python3? -m pytest\b|py -m pytest\b|mvn\b|\.\/mvnw\b|gradle\b|\.\/gradlew\b|dotnet (test|build|restore|format)\b|npx (--no-install )?prettier\b|ruff (format|check)\b|python3? -m ruff (format|check)\b|k6 (run|version)\b|newman run\b|npx newman run\b|pip3? install\b|python3? -m pip install\b|node (?!-e\b|--eval\b)(?:[\w.-]+\/)*(?:run|test[\w-]*|[\w-]+\.(?:spec|test))\.(?:m?js|cjs)\b|yarn(\s*$| (test|install)\b| run (test|build|lint|typecheck|check|e2e|verify|smoke|compile|format)[\w:.-]*)|pnpm (test|install|i|run (test|build|lint|typecheck|check|e2e|verify|smoke|compile|format)[\w:.-]*)\b)/;
32
32
  const KEEP = /(\b(error|errors|failed|failing|failure|fail|exception|traceback|assert(ion)?error|timed? ?out|warning|warn|deprecated|npm err|err!|build (success|failure)|tests? run:|passed|skipped|flaky|did not run|interrupted|expected|received|not found|cannot find|unable to)\b|✘|✗|×|^\s*\d+\) |^\s*at .*\.(spec|test)\.|^={3,}|^-{3,} |^\s*\d+ (passed|failed|skipped|flaky))/i;
33
33
  const NOISE = /^\s*at .*(node_modules|internal\/|node:)|^\s*$|^\s*(✓|✔|ok \d+|\[\d+\/\d+\].*(✓|passed))/;
34
34
  const SECRET_NAME = /(PASSWORD|PASSWD|TOKEN|SECRET|API[_-]?KEY|AUTH|COOKIE)/i;
@@ -1,13 +1,13 @@
1
1
  # <Story title> · test report
2
2
 
3
- **<✅ Ready to accept | ⚠️ Ready, with notes | ❌ Not ready>**: <one sentence: what was built and how it ran, e.g. "6 new tests for login and logout, all passed in 3 runs in a row; no app bugs found.">
3
+ **<✅ Ready to accept | ⚠️ Ready, with notes | ❌ Not ready>**: <one sentence: what was built and how it ran, e.g. "6 new tests for login and logout, all passed with retries off; no app bugs found.">
4
4
 
5
5
  | | |
6
6
  |---|---|
7
7
  | Story | <key and title, or the request in a few words> |
8
8
  | App | <base URL> (<test environment name>) |
9
9
  | Tests | <n> <UI · API> tests · <tool + language> · `<test folder inside the workspace>` |
10
- | Runs | <3 runs, retries off: n/n passed each time> · <each new test also failed when its check was broken | fail check not run: reason> |
10
+ | Runs | <1 counted run, retries off: n/n passed (stability check: N runs, n/n each time)> · <each new test also failed when its check was broken | fail check not run: reason> |
11
11
  | Date | <d Mon yyyy> |
12
12
 
13
13
  ## Coverage
@@ -27,7 +27,7 @@ Adapter rules: holds only what differs from the capability skills; the project's
27
27
  - `publishVerificationResult` and `providerVersion` (the git SHA) only in CI and only with H9 [S3]; tokens (`pactBrokerToken`) from the environment.
28
28
 
29
29
  ## Run
30
- - Consumer: the project's runner on the contract tests (`npm run test:contract`, i.e. `node --test "tests/contract/**/*.test.js"`; a bare folder path fails on Node 22; or `npx jest test/contract`), 3 times for new tests [M1].
30
+ - Consumer: the project's runner on the contract tests (`npm run test:contract`, i.e. `node --test "tests/contract/**/*.test.js"`; a bare folder path fails on Node 22; or `npx jest test/contract`), once for new tests (a stability check on request: N times) [M1].
31
31
  - Provider: the verification script against the provider running locally or in a test environment (H6 for a shared one) [M3].
32
32
  - **Local verification behind a proxy:** clear `HTTP_PROXY` / `HTTPS_PROXY` for that command (`env -u HTTPS_PROXY -u HTTP_PROXY …`), or every interaction fails with the proxy's 403 (M5).
33
33
  - Fail checks: consumer, point the client at a wrong path or field and show the test failing on `mismatches` (M2); provider, change one response field's type and show the verifier naming it (M4). Restore both.
@@ -32,7 +32,7 @@ Adapter rules: holds only what differs from the capability skills; the project's
32
32
  ## Run
33
33
  - Use the project's script if present (`npm test`, `npm run e2e`). Otherwise `npx playwright test`.
34
34
  - Scope: `npx playwright test <file>` · `-g "<title>"` · `--project=<name>`. A suite on the suite architecture runs by project: `--project=regression` (UI), `--project=api`, `--project=unit`, `--project=smoke`; the `setup` project runs first on its own (a `--grep` keeps it).
35
- - New tests: `npx playwright test <files> --repeat-each=3 --retries=0` (all 3 must agree; on the suite architecture add the spec's project, e.g. `--project=regression`, so a test isn't counted twice through `smoke`).
35
+ - New tests: `npx playwright test <files> --retries=0`, once. A stability check the user asks for: `--repeat-each=<N> --retries=0` (default 3; all N must agree; on the suite architecture add the spec's project, e.g. `--project=regression`, so a test isn't counted twice through `smoke`).
36
36
  - Flaky: Playwright reports tests that passed on retry as `flaky` in the summary line; record that count, never fold it into passed.
37
37
  - Fail check: change the expected value of the main assertion, run the single test with `-g`, confirm it fails **on that assertion** (not on an earlier wait or visibility check), restore.
38
38
  - A quantity change: read the count before the action (`await quantity.inputValue()` or the cell's text), act, then assert `toHaveValue(String(before + added))` / `toHaveText(...)`; never assert a fixed 1 on a state you didn't measure.
@@ -51,7 +51,7 @@ Same rules (role, label and test-id locators; web-first assertions; no fixed wai
51
51
  | Locator | `page.getByRole('button', { name: 'Log in' })` | `page.get_by_role("button", name="Log in")` | `Page.GetByRole(AriaRole.Button, new() { Name = "Log in" })` |
52
52
  | Assertion | `await expect(loc).toBeVisible()` | `expect(loc).to_be_visible()` | `await Expect(loc).ToBeVisibleAsync()` |
53
53
  | Fixtures / setup | `test.extend` | pytest fixtures (`page`, `context`, `browser`, `base_url`) | `PageTest` base class, `ContextOptions()` |
54
- | New tests 3× | `--repeat-each=3 --retries=0` | the command 3 times | the command 3 times |
54
+ | Stability check, N× (on request) | `--repeat-each=<N> --retries=0` | the command N times | the command N times |
55
55
  | Trace on failure | config `trace: 'retain-on-failure'` | `--tracing retain-on-failure` | `Context.Tracing.StartAsync` / `StopAsync` in setup and teardown |
56
56
 
57
57
  ## Failure signals
@@ -6,7 +6,7 @@ Use this for desktop apps built on Electron (Windows, macOS, Linux). Native Wind
6
6
  - **Detect:** `electron` in the app's package.json and tests importing `_electron` from `playwright` (or `@playwright/test`).
7
7
  - **Launch:** `const app = await _electron.launch({ args: ['<main script>'] })`; `const window = await app.firstWindow()` gives a normal `Page`, so locators, web-first assertions and fixtures work as in the main adapter [E1]. Code in the main process: `app.evaluate(...)`.
8
8
  - **Write:** same locator order as web (`getByRole`, `getByLabel`, `getByTestId`); put the launch in a fixture that closes the app in teardown (`await app.close()`), even on failure.
9
- - **Run:** the project's Playwright command; new tests `--repeat-each=3 --retries=0`. On Linux CI the app needs a display (`xvfb-run`).
9
+ - **Run:** the project's Playwright command; new tests `--retries=0`, once (a stability check adds `--repeat-each=<N>`). On Linux CI the app needs a display (`xvfb-run`).
10
10
  - **Versions:** check the Electron versions Playwright supports on the page [E1]; an unsupported version → NEEDS_ENVIRONMENT.
11
11
  - **Failure signals:** launch timeout or "Process failed to launch" → NEEDS_ENVIRONMENT; locator timeouts → as in the main adapter.
12
12
 
@@ -13,7 +13,7 @@ config (environment first, then `.env`; nothing is read or thrown on import) →
13
13
  | `{{USERNAME_LABEL}}`, `{{PASSWORD_LABEL}}`, `{{SUBMIT_LABEL}}` | the sign-in form's labels as observed (UI map) |
14
14
  | `{{SIGNED_IN_ROLE}}` (.NET: `{{SIGNED_IN_ARIA_ROLE}}`, an `AriaRole` member such as `Heading`) | the role of the element that greets the signed-in user, as observed |
15
15
  | `{{SIGNED_IN_TEXT}}`, `{{LOGIN_ERROR_TEXT}}` | the expected greeting and wrong-password message, from the requirement (or as observed, said so) |
16
- | versions (`PLAYWRIGHT_VERSION`, `TYPES_NODE_VERSION`, `TYPESCRIPT_VERSION` (TypeScript), `PYTEST_PLAYWRIGHT_VERSION`, `PYTEST_VERSION`, `PLAYWRIGHT_DOTNET_VERSION`, `TEST_SDK_VERSION`, `NUNIT_ADAPTER_VERSION`) | looked up at init (`npm view`, `pip index versions`, `dotnet package search`) and recorded |
16
+ | versions (`PLAYWRIGHT_VERSION`, `TYPES_NODE_VERSION`, `TYPESCRIPT_VERSION` (TypeScript), `PRETTIER_VERSION` (JavaScript and TypeScript), `PYTEST_PLAYWRIGHT_VERSION`, `PYTEST_VERSION`, `PLAYWRIGHT_DOTNET_VERSION`, `TEST_SDK_VERSION`, `NUNIT_ADAPTER_VERSION`) | looked up at init (`npm view`, `pip index versions`, `dotnet package search`) and recorded |
17
17
 
18
18
  If the app has no sign-in (JavaScript and TypeScript starters): delete `setup/`; in the config the `setup` and `teardown` projects, `signedIn`, and the `dependencies` and `storageState` entries (UI projects then `use: desktop`); `pageObjects/loginPage` and its fixture; `tests/ui/signIn.spec`, `tests/api/session.spec` and `resources/desc/signIn.desc`. Start with the story's first page. `suite_check.mjs` then reports the app as having no sign-in and skips the sign-in-once checks (done this way for the quality-checks run, 2026-11-12). Other starters: delete the login page, the sign-in flow, its data and the smoke tests.
19
19
 
@@ -8,7 +8,7 @@ parameters:
8
8
  type: string
9
9
  default: ''
10
10
  - name: repeatEach
11
- displayName: Runs per test (3 for new tests, with retries off)
11
+ displayName: Runs per test (3 for a stability check, with retries off)
12
12
  type: string
13
13
  default: '1'
14
14
  values: ['1', '3']
@@ -2,7 +2,7 @@
2
2
  # Playwright (.NET, NUnit). Runs on PRs, pushes to the default branch, and on demand: the executor triggers it with
3
3
  # actions_run_trigger (run_workflow) on the work branch and reads the result with get_job_logs.
4
4
  # Actions are pinned to commit SHAs (tag in the comment, resolved 2026-10-15); update them with Dependabot.
5
- # "repeat: 3" runs the selection three times with retries off (the 3-run rule for new tests); any failing run fails the job.
5
+ # "repeat: 3" runs the selection three times with retries off (a stability check); any failing run fails the job.
6
6
  name: e2e
7
7
  on:
8
8
  pull_request:
@@ -22,7 +22,7 @@ on:
22
22
  required: false
23
23
  default: ""
24
24
  repeat:
25
- description: "Runs of the selection (3 for new tests)"
25
+ description: "Runs of the selection (3 for a stability check)"
26
26
  type: choice
27
27
  options: ["1", "3"]
28
28
  default: "1"
@@ -2,7 +2,7 @@
2
2
  # Playwright (JavaScript). Runs on PRs, pushes to the default branch, and on demand: the executor triggers it with
3
3
  # actions_run_trigger (run_workflow) on the work branch and reads the result with get_job_logs.
4
4
  # Actions are pinned to commit SHAs (tag in the comment, resolved 2026-10-15); update them with Dependabot.
5
- # "repeat: 3" runs the selection three times with retries off (the 3-run rule for new tests); any failing run fails the job.
5
+ # "repeat: 3" runs the selection three times with retries off (a stability check); any failing run fails the job.
6
6
  name: e2e
7
7
  on:
8
8
  pull_request:
@@ -22,7 +22,7 @@ on:
22
22
  required: false
23
23
  default: ""
24
24
  repeat:
25
- description: "Runs of the selection (3 for new tests)"
25
+ description: "Runs of the selection (3 for a stability check)"
26
26
  type: choice
27
27
  options: ["1", "3"]
28
28
  default: "1"
@@ -2,7 +2,7 @@
2
2
  # Playwright (Python, pytest). Runs on PRs, pushes to the default branch, and on demand: the executor triggers it with
3
3
  # actions_run_trigger (run_workflow) on the work branch and reads the result with get_job_logs.
4
4
  # Actions are pinned to commit SHAs (tag in the comment, resolved 2026-10-15); update them with Dependabot.
5
- # "repeat: 3" runs the selection three times with retries off (the 3-run rule for new tests); any failing run fails the job.
5
+ # "repeat: 3" runs the selection three times with retries off (a stability check); any failing run fails the job.
6
6
  name: e2e
7
7
  on:
8
8
  pull_request:
@@ -22,7 +22,7 @@ on:
22
22
  required: false
23
23
  default: ""
24
24
  repeat:
25
- description: "Runs of the selection (3 for new tests)"
25
+ description: "Runs of the selection (3 for a stability check)"
26
26
  type: choice
27
27
  options: ["1", "3"]
28
28
  default: "1"
@@ -22,7 +22,7 @@ on:
22
22
  required: false
23
23
  default: ""
24
24
  repeat_each:
25
- description: "Runs per test (3 for new tests, with retries off)"
25
+ description: "Runs per test (3 for a stability check, with retries off)"
26
26
  type: choice
27
27
  options: ["1", "3"]
28
28
  default: "1"
@@ -0,0 +1,6 @@
1
+ node_modules/
2
+ playwright-report/
3
+ test-results/
4
+ test-summary/
5
+ reports/
6
+ .auth/
@@ -0,0 +1,4 @@
1
+ {
2
+ "singleQuote": true,
3
+ "printWidth": 120
4
+ }
@@ -32,54 +32,62 @@ const { ensureSession } = require('./session');
32
32
  * @property {void} session Makes sure a project that starts signed in has a usable saved session.
33
33
  */
34
34
 
35
- const test = base.test.extend(/** @type {import('@playwright/test').Fixtures<SuiteFixtures, WorkerFixtures, TestArgs, WorkerArgs>} */ ({
36
- /**
37
- * Before the first test of a worker in a signed-in project: signs in again when the saved session is missing or
38
- * stale (the setup project didn't run, e.g. UI mode with only the tests' project ticked, or the session is old).
39
- * Normal runs, where setup has just signed in, reuse its session and do nothing here.
40
- */
41
- session: [async ({ playwright, browserName, channel, headless, launchOptions }, use, workerInfo) => {
42
- const projectUse = workerInfo.project.use;
43
- if (projectUse.storageState === paths.userSession) {
44
- /** Starts this project's browser, with its channel, only when the session must be renewed. */
45
- const launch = () => playwright[browserName].launch({ ...launchOptions, channel, headless });
46
- const why = await ensureSession(launch, projectUse);
47
- if (why) logger.info(`Signed in again before the tests: ${why}`);
48
- }
49
- await use();
50
- }, { scope: 'worker', auto: true }],
51
- /**
52
- * Playwright's browser context, plus the saved `sessionStorage` when `AUTH_SESSION_STORAGE=1` and the test
53
- * starts signed in (Playwright's own saved state doesn't include it; this is its documented workaround).
54
- */
55
- context: async ({ context, storageState }, use) => {
56
- if (flags.authSessionStorage && storageState && fs.existsSync(paths.sessionStorage)) {
57
- const origin = new URL(env.baseUrl() || 'http://localhost').origin;
58
- const storage = JSON.parse(fs.readFileSync(paths.sessionStorage, 'utf-8'));
59
- await context.addInitScript(({ origin: o, entries }) => {
60
- if (window.location.origin === o) {
61
- for (const [key, value] of Object.entries(entries)) window.sessionStorage.setItem(key, String(value));
35
+ const test = base.test.extend(
36
+ /** @type {import('@playwright/test').Fixtures<SuiteFixtures, WorkerFixtures, TestArgs, WorkerArgs>} */ ({
37
+ /**
38
+ * Before the first test of a worker in a signed-in project: signs in again when the saved session is missing or
39
+ * stale (the setup project didn't run, e.g. UI mode with only the tests' project ticked, or the session is old).
40
+ * Normal runs, where setup has just signed in, reuse its session and do nothing here.
41
+ */
42
+ session: [
43
+ async ({ playwright, browserName, channel, headless, launchOptions }, use, workerInfo) => {
44
+ const projectUse = workerInfo.project.use;
45
+ if (projectUse.storageState === paths.userSession) {
46
+ /** Starts this project's browser, with its channel, only when the session must be renewed. */
47
+ const launch = () => playwright[browserName].launch({ ...launchOptions, channel, headless });
48
+ const why = await ensureSession(launch, projectUse);
49
+ if (why) logger.info(`Signed in again before the tests: ${why}`);
62
50
  }
63
- }, { origin, entries: storage });
64
- }
65
- await use(context);
66
- },
67
- /** The sign-in page. */
68
- loginPage: async ({ page }, use) => {
69
- await use(new LoginPage(page));
70
- },
71
- /** The page a signed-in user lands on. */
72
- homePage: async ({ page }, use) => {
73
- await use(new HomePage(page));
74
- },
75
- /** The app's shell (header, navigation, account menu). */
76
- shellPage: async ({ page }, use) => {
77
- await use(new ShellPage(page));
78
- },
79
- /** The app's HTTP API, with the project's base URL and session. */
80
- apiClient: async ({ request }, use) => {
81
- await use(new ApiClient(request));
82
- },
83
- }));
51
+ await use();
52
+ },
53
+ { scope: 'worker', auto: true },
54
+ ],
55
+ /**
56
+ * Playwright's browser context, plus the saved `sessionStorage` when `AUTH_SESSION_STORAGE=1` and the test
57
+ * starts signed in (Playwright's own saved state doesn't include it; this is its documented workaround).
58
+ */
59
+ context: async ({ context, storageState }, use) => {
60
+ if (flags.authSessionStorage && storageState && fs.existsSync(paths.sessionStorage)) {
61
+ const origin = new URL(env.baseUrl() || 'http://localhost').origin;
62
+ const storage = JSON.parse(fs.readFileSync(paths.sessionStorage, 'utf-8'));
63
+ await context.addInitScript(
64
+ ({ origin: o, entries }) => {
65
+ if (window.location.origin === o) {
66
+ for (const [key, value] of Object.entries(entries)) window.sessionStorage.setItem(key, String(value));
67
+ }
68
+ },
69
+ { origin, entries: storage },
70
+ );
71
+ }
72
+ await use(context);
73
+ },
74
+ /** The sign-in page. */
75
+ loginPage: async ({ page }, use) => {
76
+ await use(new LoginPage(page));
77
+ },
78
+ /** The page a signed-in user lands on. */
79
+ homePage: async ({ page }, use) => {
80
+ await use(new HomePage(page));
81
+ },
82
+ /** The app's shell (header, navigation, account menu). */
83
+ shellPage: async ({ page }, use) => {
84
+ await use(new ShellPage(page));
85
+ },
86
+ /** The app's HTTP API, with the project's base URL and session. */
87
+ apiClient: async ({ request }, use) => {
88
+ await use(new ApiClient(request));
89
+ },
90
+ }),
91
+ );
84
92
 
85
93
  module.exports = { test, expect: base.expect };
@@ -8,10 +8,13 @@
8
8
  "test:regression": "playwright test --project=regression",
9
9
  "test:api": "playwright test --project=api",
10
10
  "test:unit": "playwright test --project=unit",
11
+ "format": "prettier --write \"**/*.{js,ts}\"",
12
+ "format:check": "prettier --check \"**/*.{js,ts}\"",
11
13
  "report": "playwright show-report"
12
14
  },
13
15
  "devDependencies": {
14
16
  "@playwright/test": "{{PLAYWRIGHT_VERSION}}",
15
- "@types/node": "{{TYPES_NODE_VERSION}}"
17
+ "@types/node": "{{TYPES_NODE_VERSION}}",
18
+ "prettier": "{{PRETTIER_VERSION}}"
16
19
  }
17
20
  }
@@ -28,7 +28,11 @@ class BasePage {
28
28
  async open() {
29
29
  if (/\{\{[A-Z_]+\}\}/.test(String(this.path))) {
30
30
  // A starter copied but not filled: say so now, instead of opening /%7B%7BLOGIN_PATH%7D%7D and timing out.
31
- throw new AutomationError('Open', this.path, 'unfilled starter placeholder: fill it in resources/testData from the UI map');
31
+ throw new AutomationError(
32
+ 'Open',
33
+ this.path,
34
+ 'unfilled starter placeholder: fill it in resources/testData from the UI map',
35
+ );
32
36
  }
33
37
  let response;
34
38
  try {
@@ -20,14 +20,18 @@ module.exports = defineConfig({
20
20
  fullyParallel: false,
21
21
  workers: 1,
22
22
  forbidOnly: !!process.env.CI,
23
- // New tests are accepted only after 3 runs with retries off.
23
+ // Retries stay off so a flaky test shows up instead of passing on a retry.
24
24
  retries: 0,
25
25
  // A missing screenshot baseline fails instead of being saved unseen; a person approves it first.
26
26
  updateSnapshots: 'none',
27
27
  timeout: flags.testTimeout,
28
28
  expect: { timeout: flags.expectTimeout },
29
29
  // list while it runs; the one-page summary to read and share (test-summary/index.html); Playwright's report for traces.
30
- reporter: [['list'], [path.join(__dirname, 'reporters', 'summaryReporter.js'), { outputFile: paths.summaryReport }], ['html', { open: 'never', outputFolder: paths.htmlReport }]],
30
+ reporter: [
31
+ ['list'],
32
+ [path.join(__dirname, 'reporters', 'summaryReporter.js'), { outputFile: paths.summaryReport }],
33
+ ['html', { open: 'never', outputFolder: paths.htmlReport }],
34
+ ],
31
35
  use: {
32
36
  baseURL: env.baseUrl(),
33
37
  // The installed Chrome or Edge for every project, not only the UI ones: the session fixture may start a browser in