@virtocommerce/test-automation-framework 0.1.0-alpha.1 → 0.2.0-alpha.20261127111327
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/.claude/agents/vc-qa-automation-expert.md +122 -0
- package/.claude/agents/{qa-coverage.md → vc-qa-coverage.md} +10 -7
- package/.claude/agents/{qa-explorer.md → vc-qa-explorer.md} +20 -15
- package/.claude/agents/{qa-healer.md → vc-qa-healer.md} +15 -13
- package/.claude/agents/{qa-judge.md → vc-qa-judge.md} +35 -35
- package/.claude/agents/{qa-planner.md → vc-qa-planner.md} +29 -16
- package/.claude/agents/{qa-reviewer.md → vc-qa-reviewer.md} +18 -11
- package/.claude/checks/browser-secrets.mts +45 -2
- package/.claude/checks/contract.mts +258 -33
- package/.claude/checks/facts-consistency.mts +335 -0
- package/.claude/checks/introspect.mts +157 -0
- package/.claude/checks/judge-verdict.mts +44 -3
- package/.claude/checks/probe.mts +91 -0
- package/.claude/checks/project-facts.mts +85 -6
- package/.claude/checks/prove-fails.mts +254 -59
- package/.claude/checks/prune.mts +584 -0
- package/.claude/checks/rank-gaps.mts +24 -5
- package/.claude/checks/readonly-shell.mts +137 -58
- package/.claude/checks/reconcile-run.mts +64 -7
- package/.claude/checks/run-record.mts +338 -0
- package/.claude/checks/stand-request.mts +76 -0
- package/.claude/checks/test-shape.mts +78 -14
- package/.claude/commands/vc-qa-coverage.md +20 -0
- package/.claude/commands/{qa-explore.md → vc-qa-explore.md} +4 -4
- package/.claude/commands/{qa-heal.md → vc-qa-heal.md} +6 -6
- package/.claude/commands/{qa-implement.md → vc-qa-implement.md} +7 -7
- package/.claude/commands/vc-qa-plan.md +64 -0
- package/.claude/commands/{qa-review.md → vc-qa-review.md} +12 -12
- package/.claude/commands/{qa.md → vc-qa.md} +31 -22
- package/.claude/hooks/readonly-shell.mts +1 -1
- package/.claude/skills/{coverage-analysis → vc-coverage-analysis}/SKILL.md +24 -15
- package/.claude/skills/{create-graphql-layer → vc-create-graphql-layer}/SKILL.md +5 -3
- package/.claude/skills/{create-ui-layer → vc-create-ui-layer}/SKILL.md +5 -3
- package/.claude/skills/vc-explore-api/SKILL.md +93 -0
- package/.claude/skills/{explore-frontend → vc-explore-frontend}/SKILL.md +15 -9
- package/.claude/skills/{framework-rules → vc-framework-rules}/SKILL.md +34 -11
- package/.claude/skills/{heal-tests → vc-heal-tests}/SKILL.md +21 -21
- package/.claude/skills/{heal-tests → vc-heal-tests}/guard-recipe.md +3 -3
- package/.claude/skills/{judge-criteria → vc-judge-criteria}/SKILL.md +5 -3
- package/.claude/skills/{judge-criteria → vc-judge-criteria}/expert.md +10 -5
- package/.claude/skills/{plan-implementation → vc-plan-implementation}/SKILL.md +23 -11
- package/.claude/skills/vc-plan-implementation/contract-template.md +86 -0
- package/.claude/skills/{plan-test-strategy → vc-plan-test-strategy}/SKILL.md +24 -14
- package/.claude/skills/{project-facts → vc-project-facts}/SKILL.md +58 -23
- package/.claude/skills/{read-change → vc-read-change}/SKILL.md +4 -4
- package/.claude/skills/{read-ticket → vc-read-ticket}/SKILL.md +3 -3
- package/.claude/skills/{review-pr → vc-review-pr}/SKILL.md +4 -4
- package/.claude/skills/{review-test-code → vc-review-test-code}/SKILL.md +29 -15
- package/.claude/skills/{write-e2e-test → vc-write-e2e-test}/SKILL.md +11 -7
- package/.claude/skills/{write-graphql-test → vc-write-graphql-test}/SKILL.md +11 -7
- package/.claude/skills/{write-rest-api-test → vc-write-rest-api-test}/SKILL.md +16 -11
- package/.claude/skills/{write-security-test → vc-write-security-test}/SKILL.md +15 -11
- package/CHANGELOG.md +121 -0
- package/README.md +17 -0
- package/bin/vc-qa-agents.mjs +595 -0
- package/dist/auth/browser-sessions.d.ts +88 -0
- package/dist/auth/browser-sessions.js +126 -0
- package/dist/auth/browser-sessions.js.map +1 -0
- package/dist/auth/index.d.ts +5 -5
- package/dist/auth/index.js +2 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sign-in-strategies.d.ts +67 -0
- package/dist/auth/sign-in-strategies.js +121 -0
- package/dist/auth/sign-in-strategies.js.map +1 -0
- package/dist/auth/token-client.d.ts +9 -1
- package/dist/auth/token-client.js +9 -4
- package/dist/auth/token-client.js.map +1 -1
- package/dist/core/default-reporters.d.ts +9 -6
- package/dist/core/default-reporters.js +16 -16
- package/dist/core/default-reporters.js.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/secret-masking-reporter.d.ts +48 -0
- package/dist/core/secret-masking-reporter.js +78 -0
- package/dist/core/secret-masking-reporter.js.map +1 -0
- package/dist/fixtures/default-fixtures.d.ts +12 -9
- package/dist/fixtures/default-fixtures.js +12 -8
- package/dist/fixtures/default-fixtures.js.map +1 -1
- package/docs/README.md +3 -3
- package/docs/concepts/auth.md +68 -16
- package/docs/concepts/config.md +14 -6
- package/docs/concepts/dataset.md +5 -4
- package/docs/concepts/environment.md +17 -12
- package/docs/concepts/fixtures.md +23 -16
- package/docs/concepts/modules.md +2 -1
- package/docs/contributing/architecture.md +22 -15
- package/docs/contributing/documentation.md +10 -21
- package/docs/contributing/releasing.md +35 -21
- package/docs/examples/sign-in-strategies.ts +22 -0
- package/docs/getting-started.md +62 -1
- package/docs/guides/generating-types.md +5 -4
- package/docs/guides/qa-agents.md +193 -35
- package/package.json +4 -4
- package/templates/suite/.mcp.json +16 -0
- package/templates/suite/.qa/project.json +70 -0
- package/templates/suite/CLAUDE.template.md +62 -0
- package/templates/suite/allurerc.mjs +13 -0
- package/templates/suite/arrange/context.ts +15 -0
- package/templates/suite/arrange/index.ts +69 -0
- package/templates/suite/arrange/security.ts +78 -0
- package/templates/suite/biome.template.json +12 -0
- package/templates/suite/builders/security.ts +46 -0
- package/templates/suite/codegen.ts +27 -0
- package/templates/suite/env.example +10 -0
- package/templates/suite/env.ts +25 -0
- package/templates/suite/fixtures/index.ts +96 -0
- package/templates/suite/gitignore +13 -0
- package/templates/suite/pages/README.md +10 -0
- package/templates/suite/playwright.config.ts +48 -0
- package/templates/suite/scripts/generate-rest-types.ts +16 -0
- package/templates/suite/support/require-fields.ts +53 -0
- package/templates/suite/support/shopper.ts +51 -0
- package/templates/suite/support/store.ts +33 -0
- package/templates/suite/support/unique-id.ts +11 -0
- package/templates/suite/support/users.ts +6 -0
- package/templates/suite/tests/restapi/security/sign-in.spec.ts +23 -0
- package/templates/suite/tsconfig.json +33 -0
- package/.claude/agents/qa-automation-expert.md +0 -119
- package/.claude/commands/qa-coverage.md +0 -13
- package/.claude/commands/qa-plan.md +0 -55
- package/.claude/skills/explore-api/SKILL.md +0 -74
- package/.claude/skills/plan-implementation/contract-template.md +0 -72
- package/bin/install-qa-agents.mjs +0 -94
- package/dist/auth/frontend-browser-sessions.d.ts +0 -71
- package/dist/auth/frontend-browser-sessions.js +0 -130
- package/dist/auth/frontend-browser-sessions.js.map +0 -1
- package/dist/auth/platform-browser-sessions.d.ts +0 -47
- package/dist/auth/platform-browser-sessions.js +0 -92
- package/dist/auth/platform-browser-sessions.js.map +0 -1
- /package/.claude/skills/{judge-criteria → vc-judge-criteria}/coverage.md +0 -0
- /package/.claude/skills/{judge-criteria → vc-judge-criteria}/explorer.md +0 -0
- /package/.claude/skills/{judge-criteria → vc-judge-criteria}/healer.md +0 -0
- /package/.claude/skills/{judge-criteria → vc-judge-criteria}/planner.md +0 -0
- /package/.claude/skills/{read-ticket → vc-read-ticket}/providers.md +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: explore-frontend
|
|
2
|
+
name: vc-explore-frontend
|
|
3
3
|
description: "Map an area of a frontend on the stand: its pages, the selectors in the framework's priority, the test ids that are missing, and a page-object proposal. Read-only; writes only the report under .qa/reports/"
|
|
4
4
|
argument-hint: "<page-or-area>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Explore Frontend
|
|
8
8
|
|
|
9
|
-
Used by `qa-explorer`. The result is the first four sections of `.qa/reports/explore-<slug>.md`. It writes no
|
|
10
|
-
page object and no test; the proposal is text for `qa-planner` and `qa-automation-expert`. Read first: the skill
|
|
11
|
-
`framework-rules`, then `project-facts` (`node .claude/checks/project-facts.mts`).
|
|
9
|
+
Used by `vc-qa-explorer`. The result is the first four sections of `.qa/reports/explore-<slug>.md`. It writes no
|
|
10
|
+
page object and no test; the proposal is text for `vc-qa-planner` and `vc-qa-automation-expert`. Read first: the skill
|
|
11
|
+
`vc-framework-rules`, then `vc-project-facts` (`node .claude/checks/project-facts.mts`). Before the first step run
|
|
12
|
+
`git status --short` and keep its output: Done compares with it.
|
|
12
13
|
|
|
13
14
|
## Step 1: What Exists
|
|
14
15
|
|
|
@@ -21,14 +22,14 @@ page object and no test; the proposal is text for `qa-planner` and `qa-automatio
|
|
|
21
22
|
|
|
22
23
|
## Step 2: Pages
|
|
23
24
|
|
|
24
|
-
Walk the area with the browser as `qa-explorer` allows, from the origin `node .claude/checks/stand.mts` prints (the
|
|
25
|
+
Walk the area with the browser as `vc-qa-explorer` allows, from the origin `node .claude/checks/stand.mts` prints (the
|
|
25
26
|
frontend's, or the backend's for the platform's own pages). For each page or state reached, one row:
|
|
26
27
|
|
|
27
28
|
| Path | What it shows | Reached as | Page object |
|
|
28
29
|
|---|---|---|---|
|
|
29
30
|
|
|
30
31
|
`Reached as` is the role or "anonymous", checked in the account menu (another account's session: the skill
|
|
31
|
-
`project-facts`, "Someone else's session"); `Page object` is the existing class, or `none`. Dialogs, tabs and states
|
|
32
|
+
`vc-project-facts`, "Someone else's session"); `Page object` is the existing class, or `none`. Dialogs, tabs and states
|
|
32
33
|
the user can reach on the page (empty, filled, error shown) are rows of their own. A page you could not reach is
|
|
33
34
|
a row with `not reached: <why>`.
|
|
34
35
|
|
|
@@ -36,7 +37,7 @@ a row with `not reached: <why>`.
|
|
|
36
37
|
|
|
37
38
|
From the page snapshot and the shipped page extractor (`browser_evaluate` with `PAGE_EXTRACTOR` from
|
|
38
39
|
`.claude/checks/explore-extractors.mts`, the only script the hook allows), list the elements a test
|
|
39
|
-
would use: for each, the best selector in the framework's order from `create-ui-layer` "Locator Conventions":
|
|
40
|
+
would use: for each, the best selector in the framework's order from `vc-create-ui-layer` "Locator Conventions":
|
|
40
41
|
|
|
41
42
|
1. the test id attribute (`getByTestId`);
|
|
42
43
|
2. a data attribute that names the item (a SKU, an id);
|
|
@@ -72,11 +73,16 @@ The explorer's `observe` mode records the value one case asserts, as the page sh
|
|
|
72
73
|
|
|
73
74
|
## Done
|
|
74
75
|
|
|
75
|
-
The four sections are in the report, each with its items
|
|
76
|
-
|
|
76
|
+
The four sections are in the report, each with its items, `none observed` (looked, found nothing) or `not reached: <why>`
|
|
77
|
+
(could not look: a role, a page the stand does not show), and every item says where it was seen.
|
|
78
|
+
Nothing outside `.qa/reports/` changed: `git status --short` now shows what the one you took before your first write
|
|
79
|
+
showed (the repository may already hold untracked or changed files, or not be under git: then say that it could not be
|
|
80
|
+
compared).
|
|
77
81
|
|
|
78
82
|
## Example from this repository
|
|
79
83
|
|
|
84
|
+
The framework's own suite, as an example and not a rule; another repository's values come from its facts and files.
|
|
85
|
+
|
|
80
86
|
- Test id attribute: `data-test-id` (the default `testIdAttribute` of the framework's `defaultUse`, which
|
|
81
87
|
`virtocommerce/playwright.config.ts` uses).
|
|
82
88
|
- Page objects: `virtocommerce/pages/frontend/pages/<area>/`, components
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: framework-rules
|
|
2
|
+
name: vc-framework-rules
|
|
3
3
|
description: "The rules of the test framework itself, the same in every repository that uses it: spec structure, arrange and cleanup, waits, platform defects, module gating, tests that target edge, isolated tests, working discipline and the order in which to read knowledge. Every agent reads this first"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -14,10 +14,10 @@ configuration, and neighbouring files. Facts that belong to this repository's Vi
|
|
|
14
14
|
**Precedence.** A framework rule beats a style rule. In a client repository the client's style beats this
|
|
15
15
|
repository's default style. When two framework rules seem to conflict, stop and ask; do not pick one silently.
|
|
16
16
|
|
|
17
|
-
**The suite directory.** The suite the agents work on is `suiteDir` in the project facts (skill `project-facts`).
|
|
17
|
+
**The suite directory.** The suite the agents work on is `suiteDir` in the project facts (skill `vc-project-facts`).
|
|
18
18
|
Spec paths are repo-relative and every Playwright command on the suite is
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
`<playwright> --no-deps <spec paths> --project=<name>`, `<playwright>` being the facts' `playwright` (the suite's
|
|
20
|
+
launcher and `--config=<suiteDir>`). In this suite `suiteDir` is `virtocommerce`. `--no-deps` keeps a run from seeding the stand again:
|
|
21
21
|
seed once with `commands.seed` before the first run and after a change to the seed data.
|
|
22
22
|
|
|
23
23
|
## Working Discipline
|
|
@@ -33,7 +33,7 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
33
33
|
|
|
34
34
|
## Reading Order for Knowledge
|
|
35
35
|
|
|
36
|
-
1. Read the knowledge snapshot first. Its directory is `knowledgeDir` in the project facts (skill `project-facts`).
|
|
36
|
+
1. Read the knowledge snapshot first. Its directory is `knowledgeDir` in the project facts (skill `vc-project-facts`).
|
|
37
37
|
Each entry carries its capture date.
|
|
38
38
|
2. Call the live service (tracker, documentation, platform, frontend) only when the snapshot cannot answer, or when
|
|
39
39
|
the entry's date makes it unsafe to rely on.
|
|
@@ -61,6 +61,8 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
61
61
|
setup that several specs need becomes an `arrange` method.
|
|
62
62
|
- No raw selectors in specs. Add them to the page objects.
|
|
63
63
|
- Place a test by the platform module that owns the behaviour, not by the noun in its title.
|
|
64
|
+
- Under a contract, a test's title starts with its case id (`C-01 …`), and each row of a table-driven test carries its
|
|
65
|
+
own case id in its title: `contract.mts check --implemented` finds a case's tests by it.
|
|
64
66
|
|
|
65
67
|
## Layers and Imports
|
|
66
68
|
|
|
@@ -74,13 +76,21 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
74
76
|
- Read seeded data from the dataset; a spec may name a dataset id as a constant. Create what the test changes with
|
|
75
77
|
`arrange`, which removes it after the test, last first, so tests have no teardown code.
|
|
76
78
|
- A test that changes the acting customer's own state (cart, lists, addresses, locks) uses a customer created for the
|
|
77
|
-
test, never a dataset user
|
|
78
|
-
|
|
79
|
+
test, never a dataset user: `shopperAs: "customer"` or an `arrange` customer method, if the suite has them; where it
|
|
80
|
+
has neither, add the `arrange` method that creates the customer (below); where there is no `arrange` layer, Shared
|
|
81
|
+
Accounts applies.
|
|
82
|
+
- REST administration tests run as `roleFor.admin`, the role the project facts name for administration; the facts may
|
|
83
|
+
name none, and then who administers is a scope question for the person. A test that
|
|
79
84
|
locks, deletes or changes the password of the acting user creates its own user through `arrange`.
|
|
80
85
|
- When the create is the action under test, register its removal with the `…Later` method of `arrange`: before the
|
|
81
86
|
act when a builder gave the draft a client-side id the platform keeps, right after the act when the platform assigns
|
|
82
87
|
the id, and always before the first assertion. `…Later` methods create nothing.
|
|
83
88
|
- Data `arrange` has no method for gets a new `arrange` method, never teardown code in the spec.
|
|
89
|
+
- **A client suite with no `arrange` layer** (the repository has none and the person did not ask for one) replaces
|
|
90
|
+
the rules above that name `arrange` with this one: the test removes what it created in a `finally`, last created
|
|
91
|
+
first, and never fails from inside the `finally`. A removal that throws is caught and reported with a `leaves data`
|
|
92
|
+
annotation that names the record, so it cannot hide the test's own failure; data the test cannot remove is reported
|
|
93
|
+
the same way.
|
|
84
94
|
- Find records by search criteria, never by "is listed in the first N" windows. Assert on the test's own records,
|
|
85
95
|
never on a whole shared list.
|
|
86
96
|
- Prove a deletion by reading the record by id (the read returns `undefined` or 404), not by a search.
|
|
@@ -89,6 +99,14 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
89
99
|
profile marks as owned. Where it does not yet, let `arrange` remove everything created and change nothing
|
|
90
100
|
platform-wide outside the isolated tests.
|
|
91
101
|
|
|
102
|
+
## Shared Accounts
|
|
103
|
+
|
|
104
|
+
- Where a customer cannot be created for the test (a client suite with one shared dataset shopper), the cases that
|
|
105
|
+
change state on that account (cart, lists, addresses, locks) run with `--workers=1`. The contract's `## Verification`
|
|
106
|
+
command carries the flag, and so does every series. `test.describe.configure({ mode: "serial" })` is not enough: it
|
|
107
|
+
orders one describe in one worker, while `--repeat-each` and other specs still use the account in parallel workers.
|
|
108
|
+
- The series also includes the neighbouring specs that use the same account, so a collision with them shows.
|
|
109
|
+
|
|
92
110
|
## Isolated Tests
|
|
93
111
|
|
|
94
112
|
- Tests that change platform-wide state (global settings, store access, the search index, a restart) are the only
|
|
@@ -106,8 +124,10 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
106
124
|
## Waiting
|
|
107
125
|
|
|
108
126
|
- Index-backed reads lag. Wait in `arrange` through its index-wait methods. In an assertion, use
|
|
109
|
-
`expect.poll(…, { timeout
|
|
110
|
-
|
|
127
|
+
`expect.poll(…, { timeout })` or `expect(…).toPass({ timeout })`, with the suite's index-lag constant
|
|
128
|
+
(`INDEX_LAG_TIMEOUT_MS`) if it has one, else one named constant that it declares once. Inside `arrange` and shared
|
|
129
|
+
code, wait with the suite's `pollUntil(read, isDone, describe, timeoutMs)` if it has one, else with `expect.poll`
|
|
130
|
+
there too, never a hand-written loop.
|
|
111
131
|
- Never `waitForTimeout`, `networkidle` or a sleep. A browser action waits for the state or the response it causes.
|
|
112
132
|
|
|
113
133
|
## Failing Loudly
|
|
@@ -158,8 +178,9 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
158
178
|
|
|
159
179
|
## Optional Modules
|
|
160
180
|
|
|
161
|
-
- A test that needs an optional module, or a module version, declares it on its describe
|
|
162
|
-
`test.use({ modules: { pickup: MODULES.pickup } })
|
|
181
|
+
- A test that needs an optional module, or a module version, declares it on its describe with the `modules` option, such as
|
|
182
|
+
`test.use({ modules: { pickup: MODULES.pickup } })` (`MODULES` is the suite's own list of modules and versions,
|
|
183
|
+
where it has one). The test is skipped where the module is missing or outside its
|
|
163
184
|
range (`minVersion` inclusive, `beforeVersion` exclusive), and the skip reason names the module. The seed manifest
|
|
164
185
|
uses the same `MODULES` entries, so a collection the seed skips and the tests that read it skip for the same reason.
|
|
165
186
|
- An inner `test.use` replaces the outer `modules`; spread them to keep both.
|
|
@@ -173,6 +194,8 @@ seed once with `commands.seed` before the first run and after a change to the se
|
|
|
173
194
|
|
|
174
195
|
## Example from this repository
|
|
175
196
|
|
|
197
|
+
The framework's own suite, as an example and not a rule; another repository's values come from its facts and files.
|
|
198
|
+
|
|
176
199
|
- Fixtures entry `virtocommerce/fixtures/index.ts` (`@fixtures`); options `user`, `shopperAs`, `modules`; module
|
|
177
200
|
constants `MODULES` in `virtocommerce/modules.ts` (`@modules`), each `minVersion` the edge version the suite is
|
|
178
201
|
proven on.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: heal-tests
|
|
2
|
+
name: vc-heal-tests
|
|
3
3
|
description: "Heal failing or flaky specs: reproduce, classify each failure (test defect, product defect, stand data, flaky), fix only test infrastructure under the healer paths (never a spec) within the area's autonomy, at most three rounds, write the heal report and the flaky list, finish with the expectation guard"
|
|
4
4
|
argument-hint: "<spec-file | test-title | .qa/runs/<contract-name>/>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Heal Tests
|
|
8
8
|
|
|
9
|
-
Used by `qa-healer`. Read first: the skill `framework-rules`, then `project-facts`
|
|
9
|
+
Used by `vc-qa-healer`. Read first: the skill `vc-framework-rules`, then `vc-project-facts`
|
|
10
10
|
(`node .claude/checks/project-facts.mts`). The rule above all others: **an expected value or an assertion never moves
|
|
11
11
|
toward what the build does.** A failure that can only be made green by changing one is a product defect, and it stays
|
|
12
12
|
red.
|
|
@@ -15,7 +15,7 @@ red.
|
|
|
15
15
|
|
|
16
16
|
- The target is a spec file, a test title or a run record directory `.qa/runs/<contract-name>/`. For a run record,
|
|
17
17
|
the failing tests are what this prints under `failures`, for each project whose pair of files the directory holds
|
|
18
|
-
(the names are in `project-facts`, "Hand-off Paths"):
|
|
18
|
+
(the names are in `vc-project-facts`, "Hand-off Paths"):
|
|
19
19
|
`node .claude/checks/reconcile-run.mts .qa/runs/<contract-name>/list.<project>.json .qa/runs/<contract-name>/report.<project>.json`.
|
|
20
20
|
A failure of a test whose case the contract lists under `## Platform defects` is a known product defect: list it,
|
|
21
21
|
heal nothing for it. No target: stop and say so.
|
|
@@ -24,30 +24,30 @@ red.
|
|
|
24
24
|
- A hook confines you: Write, Edit and MultiEdit work only under `facts.healerPaths`, `.qa/reports/heal-<slug>.md`,
|
|
25
25
|
`.qa/reports/flaky.md` and `.qa/runs/heal-<slug>/`, never on a `.git*` name or in the directory git runs hooks
|
|
26
26
|
from; Bash runs only the commands shown in this skill (git reads, `node .claude/checks/<module>.mts`,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- The dispatch carries a baseline: a git tree id that `/qa` or `/qa-heal` recorded with
|
|
27
|
+
`<playwright>` with `--project`, `--repeat-each`, `--retries=0`, `--reporter`, `-g`; `<launcher> tsc -p <suiteDir>
|
|
28
|
+
--noEmit`; `<launcher> biome check <paths>`; `node .claude/checks/expectation-guard.mts --base=<sha>`).
|
|
29
|
+
`<playwright>` is the facts' `playwright`, and `<launcher>` its words before `playwright test` (`npx --no`, or
|
|
30
|
+
`npm exec --prefix <suiteDir> --no --` for a suite that is its own npm project): `--no` stops npm from fetching a
|
|
31
|
+
package it does not find. A refused call is final: do not look for a way around it, report it.
|
|
32
|
+
- The dispatch carries a baseline: a git tree id that `/vc-qa` or `/vc-qa-heal` recorded with
|
|
33
33
|
`node .claude/checks/expectation-guard.mts --snapshot` before you started (working tree, untracked files included). It
|
|
34
34
|
is what the guard in step 7 compares against. Without one, stop and say so. Never record or replace a baseline
|
|
35
35
|
yourself: a new one would hide the changes made before it. Save the id in `.qa/runs/heal-<slug>/baseline.txt` for the
|
|
36
36
|
report.
|
|
37
37
|
- You may edit only files under `facts.healerPaths`. A spec is never one of them.
|
|
38
38
|
- Find the Playwright project of each test:
|
|
39
|
-
|
|
39
|
+
`<playwright> --list --reporter=json <spec>` names it per test. `<spec>` is
|
|
40
40
|
repository-relative. Run a project only when it is a key of `commands.test`.
|
|
41
41
|
|
|
42
42
|
## Step 2: Reproduce
|
|
43
43
|
|
|
44
|
-
For each project, run the failing tests with
|
|
45
|
-
|
|
44
|
+
For each project, run the failing tests with `<playwright>` itself (the hook refuses npm scripts), with the
|
|
45
|
+
project's name from `commands.test`. `-g` takes one word without quotes or spaces: join
|
|
46
46
|
the words of a title with `.`. The leading variable sends the JSON report to your run directory:
|
|
47
47
|
|
|
48
48
|
```shell
|
|
49
|
-
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/round-0.<project>.json
|
|
50
|
-
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/list.<project>.json
|
|
49
|
+
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/round-0.<project>.json <playwright> --no-deps <spec> --project=<project> -g <title.words> --reporter=list,json
|
|
50
|
+
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/list.<project>.json <playwright> --no-deps --list --reporter=json <spec> --project=<project> -g <title.words>
|
|
51
51
|
node .claude/checks/reconcile-run.mts .qa/runs/heal-<slug>/list.<project>.json .qa/runs/heal-<slug>/round-0.<project>.json
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -91,8 +91,8 @@ whose first run failed in a way that could be intermittent (a timeout, a wait, a
|
|
|
91
91
|
person named as flaky, run `facts.flakyRunSeries` times per project:
|
|
92
92
|
|
|
93
93
|
```shell
|
|
94
|
-
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/series.<project>.json
|
|
95
|
-
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/series-list.<project>.json
|
|
94
|
+
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/series.<project>.json <playwright> --no-deps <spec> --project=<project> -g <title.words> --repeat-each=<flakyRunSeries> --retries=0 --reporter=list,json
|
|
95
|
+
PLAYWRIGHT_JSON_OUTPUT_FILE=.qa/runs/heal-<slug>/series-list.<project>.json <playwright> --no-deps --list --reporter=json <spec> --project=<project> -g <title.words> --repeat-each=<flakyRunSeries>
|
|
96
96
|
node .claude/checks/reconcile-run.mts .qa/runs/heal-<slug>/series-list.<project>.json .qa/runs/heal-<slug>/series.<project>.json
|
|
97
97
|
```
|
|
98
98
|
|
|
@@ -112,12 +112,12 @@ Only a test defect, within the area's autonomy:
|
|
|
112
112
|
wait.
|
|
113
113
|
- What a fix may change, only under `facts.healerPaths`:
|
|
114
114
|
- Page objects and components: a locator that no longer matches, a missing wait for the element, the selector
|
|
115
|
-
priority of `framework-rules`.
|
|
115
|
+
priority of `vc-framework-rules`.
|
|
116
116
|
- Data: a builder, record or `arrange` method that is stale or invalid, never a value the test asserts against.
|
|
117
117
|
- Waits: `arrange` index-wait methods where a read lags behind a write; never `waitForTimeout`, `networkidle` or
|
|
118
118
|
`expect.poll`.
|
|
119
119
|
- Setup and cleanup that live in those directories (the `arrange` methods and the removals they register).
|
|
120
|
-
- A locator is fixed in the page object (selector priority: `framework-rules`, `create-ui-layer` "Locator
|
|
120
|
+
- A locator is fixed in the page object (selector priority: `vc-framework-rules`, `vc-create-ui-layer` "Locator
|
|
121
121
|
Conventions"). A lagging read is fixed in `arrange` (the dataset's index-wait methods). Never `waitForTimeout`,
|
|
122
122
|
`networkidle`, `expect.poll`, a raised retry count, a blanket timeout, a skip, `fixme` or an annotation that hides
|
|
123
123
|
the failure (`testInfo.skip` and `test.info().fixme` too): the guard flags each of them as an added line.
|
|
@@ -135,10 +135,10 @@ Only a test defect, within the area's autonomy:
|
|
|
135
135
|
## Step 6: Re-run, at Most Three Rounds
|
|
136
136
|
|
|
137
137
|
After each applied round run the same commands as step 2 (`round-<n>.<project>.json`) and reconcile. Typecheck
|
|
138
|
-
with
|
|
138
|
+
with `<launcher> tsc -p <suiteDir> --noEmit` (it only reads) must be clean. Lint only the files you changed, in the
|
|
139
139
|
linter's check mode and never with a command that fixes: `commands.lint` here is `npm run check`
|
|
140
140
|
(`biome check --write .`), which rewrites specs and `.claude/checks/` and would create findings, so run
|
|
141
|
-
|
|
141
|
+
`<launcher> biome check <changed files>` without `--write` (the hook refuses any flag). Fix what it reports by hand,
|
|
142
142
|
inside the healer paths. A fix that makes another test red is
|
|
143
143
|
reverted. After round three, whatever is still red is escalated: do not start a fourth round and do not change the
|
|
144
144
|
class to get out of it.
|
|
@@ -153,7 +153,7 @@ node .claude/checks/expectation-guard.mts --base=<tree id in .qa/runs/heal-<slug
|
|
|
153
153
|
|
|
154
154
|
This is your own early check; the hook keeps you from writing `.claude/checks/`, and the dispatcher repeats it from the
|
|
155
155
|
baseline's own copy of `.claude/checks/`, taken with `git cat-file`, together with a fingerprint of the git
|
|
156
|
-
configuration and hooks (`/qa`, `/qa-heal`, with `guard-recipe.md` in this directory, which is theirs and not yours to
|
|
156
|
+
configuration and hooks (`/vc-qa`, `/vc-qa-heal`, with `guard-recipe.md` in this directory, which is theirs and not yours to
|
|
157
157
|
run). It compares the working tree, untracked files included, with that tree, and reads `healerPaths` from the
|
|
158
158
|
baseline's `.qa/project.json`. Exit 0: every changed file is under `healerPaths`, no expectation line changed and no
|
|
159
159
|
added line switches a check off. Exit 1 lists `outside healer paths: <file>`, a changed expectation line, or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Guard Recipe
|
|
2
2
|
|
|
3
|
-
The dispatcher's check after a heal: `/qa` (stage Heal) and `/qa-heal` (step 2) store this file from the baseline
|
|
3
|
+
The dispatcher's check after a heal: `/vc-qa` (stage Heal) and `/vc-qa-heal` (step 2) store this file from the baseline
|
|
4
4
|
with `git cat-file blob` before dispatching the healer, never read it from the working tree after the heal, and run
|
|
5
5
|
the stored copy word for word. It is never the
|
|
6
6
|
healer's: the healer may not run `--repo-fingerprint`, and its own early check is step 7 of `SKILL.md`.
|
|
@@ -46,8 +46,8 @@ When the heal belongs to a contract's run record:
|
|
|
46
46
|
After a clean guard, re-run the definition of done's commands yourself (a mechanical re-run, not a role's work), so
|
|
47
47
|
that the reviewer reconciles the healed state and not the expert's red record: for each project of the contract's
|
|
48
48
|
case rows, with the expert's spec files, the stable series and the list into the same `report.<project>.json` and
|
|
49
|
-
`list.<project>.json`, then reconcile ("Hand-off Paths", all three commands, the listing with
|
|
50
|
-
|
|
49
|
+
`list.<project>.json`, then reconcile ("Hand-off Paths", all three commands, the listing with the facts'
|
|
50
|
+
`playwright`, such as `npx --no playwright test --config=virtocommerce --list ...`).
|
|
51
51
|
The expert's spec files are the ones that record's `list.<project>.json` files name; those name them relative to the
|
|
52
52
|
suite directory (`tests/restapi/...`), so pass them as `<suiteDir>/<path>` (`virtocommerce/tests/restapi/...`). Exit 1
|
|
53
53
|
on a project (a stand that is not reachable included): the run is not done; show the reconcile lines to the person.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: judge-criteria
|
|
2
|
+
name: vc-judge-criteria
|
|
3
3
|
description: "The criteria the judge answers pass or fail on, one file per role (planner, expert, explorer, healer, coverage), and the shape of the verdict file it writes"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ name, and answer no other.
|
|
|
24
24
|
|
|
25
25
|
## Step 3: Write the Verdict File
|
|
26
26
|
|
|
27
|
-
Write `.qa/judge/<contract-name>/judge-<role>.json` (`<contract-name>`: `project-facts`, "Hand-off Paths"; in the
|
|
27
|
+
Write `.qa/judge/<contract-name>/judge-<role>.json` (`<contract-name>`: `vc-project-facts`, "Hand-off Paths"; in the
|
|
28
28
|
evaluation suite, the directory the brief names), nowhere else:
|
|
29
29
|
|
|
30
30
|
```json
|
|
@@ -32,9 +32,11 @@ evaluation suite, the directory the brief names), nowhere else:
|
|
|
32
32
|
"role": "expert",
|
|
33
33
|
"subject": "<the contract path, or the files judged>",
|
|
34
34
|
"criteria": [{ "name": "<criterion>", "pass": false, "evidence": "<what you saw, where>" }],
|
|
35
|
+
"proofs": { "mechanical": 0, "reasoned": 0, "explanation": "<only when mechanical is 0: why no case could be proved>" },
|
|
35
36
|
"verdict": "fail"
|
|
36
37
|
}
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
`
|
|
40
|
+
`proofs` is for the expert's verdict only: the number of cases proved with `prove-fails` and the number judged from the
|
|
41
|
+
assertion, at least one case in all. `verdict` is `pass` only when every criterion passes, and `fail` otherwise. Then run
|
|
40
42
|
`node .claude/checks/judge-verdict.mts check <file>`; it must print `ok`. Fix the file, not the criteria, until it does.
|
|
@@ -10,11 +10,16 @@ copy itself.
|
|
|
10
10
|
- `checks-claimed-behaviour`: each test asserts the behaviour its case claims, on the data role and project the
|
|
11
11
|
case names, against the expected value of the case's oracle. A test that asserts something easier or different is
|
|
12
12
|
a fail. A test of a platform-defect case asserts the correct behaviour, not what the build does.
|
|
13
|
-
- `fails-when-behaviour-breaks`: each test fails when that behaviour breaks. Prove it where the script can change
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
- `fails-when-behaviour-breaks`: each test fails when that behaviour breaks. Prove it where the script can change the
|
|
14
|
+
assertion (evidence: the `prove-fails` output with `failed: true` and the line it changed); where it cannot, say why
|
|
15
|
+
and reason from the assertion. A proof on an arrange guard, an assertion inside an `arrange:` step, is never credited,
|
|
16
|
+
by the script or by reasoning: the case's own `assert:` step is what must fail. A `.not` assertion the script proved
|
|
17
|
+
by removing its `.not` shows only that the line is evaluated: also reason that the value it excludes is the broken
|
|
18
|
+
behaviour. A bound (`toBeGreaterThan`, `toBeLessThan` and their `OrEqual` forms) and a line with more than one
|
|
19
|
+
assertion are never proved by the script: reason from the assertion, and pass a bound only when its limit is the
|
|
20
|
+
oracle's and the tightest the case allows. Record in the verdict's `proofs` how many cases were proved with the script
|
|
21
|
+
(`mechanical`) and how many from the assertion (`reasoned`); with no mechanical proof the criterion fails unless
|
|
22
|
+
`proofs.explanation` says why none could be made. A test of a case under
|
|
18
23
|
`## Platform defects` already fails on the defect: its failure line, showing the oracle's value against the
|
|
19
24
|
build's, is the evidence. An assertion that cannot fail (a tautology, a check on a value the test set itself, a
|
|
20
25
|
missing await, an assertion on something that is always present) is a fail.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plan-implementation
|
|
2
|
+
name: vc-plan-implementation
|
|
3
3
|
description: "Write the contract: the file at .qa/contracts/<key-or-slug>.md that holds the source, scope, case matrix, stand needs, building blocks, platform defects and verification, checked by a script and approved by a person before anything is implemented"
|
|
4
4
|
argument-hint: "<ticket-key | spec-link | area | gap-id>"
|
|
5
5
|
---
|
|
@@ -7,20 +7,27 @@ argument-hint: "<ticket-key | spec-link | area | gap-id>"
|
|
|
7
7
|
## Writing the Contract
|
|
8
8
|
|
|
9
9
|
The contract is the only hand-off from the planner to the implementer: the implementer receives its path and nothing
|
|
10
|
-
else, and the reviewer receives it with the diff. Read `framework-rules` and `project-facts` first.
|
|
10
|
+
else, and the reviewer receives it with the diff. Read `vc-framework-rules` and `vc-project-facts` first.
|
|
11
11
|
|
|
12
12
|
## Step 1: Start from the Matrix
|
|
13
13
|
|
|
14
|
-
Take the case matrix from `plan-test-strategy`. If it does not exist yet, run that skill first.
|
|
14
|
+
Take the case matrix from `vc-plan-test-strategy`. If it does not exist yet, run that skill first.
|
|
15
15
|
|
|
16
16
|
## Step 2: Fill the Template
|
|
17
17
|
|
|
18
18
|
Copy `contract-template.md` (next to this file) to `.qa/contracts/<ticket-key-or-slug>.md`, which is git-ignored, and
|
|
19
19
|
fill every section:
|
|
20
20
|
|
|
21
|
-
- **Source**: first line `ticket: <key>`, `doc: <link>`, `area: <name>` or `gap: <id>`.
|
|
21
|
+
- **Source**: first line `ticket: <key>`, `doc: <link>`, `area: <name>` or `gap: <id>`. A line that names a file under
|
|
22
|
+
`.qa/reports/` or `.qa/kb/` (the explorer report, the card) ends with the day you read it, `(<yyyy-mm-dd>)`. The check
|
|
23
|
+
refuses a missing date and a file that changed after it; read these files again before you ask for approval, never
|
|
24
|
+
rely on what an earlier step told you about them.
|
|
22
25
|
- **Scope** and **Out of scope**: what is tested, and what is not and why.
|
|
23
|
-
- **
|
|
26
|
+
- **Existing coverage**: the specs that already cover a criterion and the building blocks that exist (`vc-plan-test-strategy`
|
|
27
|
+
Step 2), or `None found` and what you searched.
|
|
28
|
+
- **Cases**: the matrix. `Critical flow` is a flow of `critical` in the facts, or `no`. `Parameters` states every request
|
|
29
|
+
parameter whose value changes the answer (a quantity, a page size, a filter, a sort, a culture, a currency, a store)
|
|
30
|
+
with the value the case sends, or `none`. Every oracle starts with `ticket:`, `doc:`, `schema:` or `observed:`; every data role is a
|
|
24
31
|
role from the facts or `none`. An `observed:` part holds a value the explorer recorded and its report,
|
|
25
32
|
`observed: <value> (.qa/reports/explore-<slug>-observed.md)`, the value exactly as the report's line
|
|
26
33
|
`- <case id>: <value> (` has it (in double quotes when it holds `;`, a `|` written `\|`). The check refuses one
|
|
@@ -36,7 +43,7 @@ fill every section:
|
|
|
36
43
|
- **Platform defects**: each case whose correct behaviour the platform is known to break, with the defect and its
|
|
37
44
|
tracker link, or `no ticket yet`; `None` when there is none. Its test asserts the correct behaviour and stays
|
|
38
45
|
failing, with the link as an `issue` annotation.
|
|
39
|
-
- **Verification**: the typecheck, lint and test commands from the facts, then the commands that run the new specs.
|
|
46
|
+
- **Verification**: the typecheck, lint (when the facts have one) and test commands from the facts, then the commands that run the new specs.
|
|
40
47
|
|
|
41
48
|
## Step 3: Order the Building Blocks
|
|
42
49
|
|
|
@@ -52,14 +59,19 @@ Fix the contract until it passes; never edit the facts to make it pass.
|
|
|
52
59
|
|
|
53
60
|
## Step 5: Amendments
|
|
54
61
|
|
|
55
|
-
When implementation shows the contract is wrong, the implementer stops and adds an `## Amendments`
|
|
56
|
-
|
|
62
|
+
When implementation shows the contract is wrong, the implementer stops the cases concerned and adds an `## Amendments`
|
|
63
|
+
entry: a `Cases:` line with the case ids it touches, a `Changes:` line with the assertion, oracle or building block
|
|
64
|
+
that changes (from and to), a `Drops:` line with the cases no test will cover when it drops one, and the reason. It
|
|
65
|
+
counts only with an `Approved: <who>, <date>` line; an unapproved amendment, or one without `Cases:` and `Changes:`,
|
|
66
|
+
fails the check. The base contract's approval is
|
|
57
67
|
one such line under `## Approval`. Either line may end `(relayed: "<the person's words>")`. Only a person writes it,
|
|
58
68
|
or a session quoting the person's words verbatim (several lines joined with " / "); the planner and the implementer
|
|
59
69
|
never write it.
|
|
60
70
|
|
|
61
71
|
## Example from this repository
|
|
62
72
|
|
|
73
|
+
The framework's own suite, as an example and not a rule; another repository's values come from its facts and files.
|
|
74
|
+
|
|
63
75
|
All paths are in the suite directory `virtocommerce/`.
|
|
64
76
|
|
|
65
77
|
| Artifact | Location | Pattern reference |
|
|
@@ -77,6 +89,6 @@ All paths are in the suite directory `virtocommerce/`.
|
|
|
77
89
|
|
|
78
90
|
- Order: `.graphql` documents then `npm run codegen:vc`, page objects, dataset records then `npm run seed:vc` and a
|
|
79
91
|
reindex, builders, `arrange` methods, specs.
|
|
80
|
-
- Skills for the implementer: `/create-graphql-layer`, `/create-ui-layer`, `/write-graphql-test`,
|
|
81
|
-
`/write-rest-api-test`, `/write-security-test` (no session, wrong role, another customer's object, headers, input
|
|
82
|
-
validation), `/write-e2e-test`. REST calls use the generated types directly; there is no REST client layer.
|
|
92
|
+
- Skills for the implementer: `/vc-create-graphql-layer`, `/vc-create-ui-layer`, `/vc-write-graphql-test`,
|
|
93
|
+
`/vc-write-rest-api-test`, `/vc-write-security-test` (no session, wrong role, another customer's object, headers, input
|
|
94
|
+
validation), `/vc-write-e2e-test`. REST calls use the generated types directly; there is no REST client layer.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Contract: <ticket key, or area name> <short title>
|
|
2
|
+
|
|
3
|
+
<!-- Save as .qa/contracts/<ticket-key-or-slug>.md. The check ignores comments; leave them out of the file you write. -->
|
|
4
|
+
|
|
5
|
+
## Source
|
|
6
|
+
|
|
7
|
+
ticket: <key>
|
|
8
|
+
|
|
9
|
+
<!-- The first line is one of: `ticket: <key>`, `doc: <link or page>`, `area: <name>`, `gap: <gap id from the coverage report>`. Extra lines: the card path, the documentation pages, the explorer report. A line that names a file under `.qa/reports/` or `.qa/kb/` ends with the day you read it, `(<yyyy-mm-dd>)`, as in `explorer report: .qa/reports/explore-cart.md (2026-11-20)`; the check refuses one with no date, or one whose file changed after it. Read these files again before you ask for approval. -->
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
- <behaviour under test, one line each, in the words of the criterion or the documented rule>
|
|
14
|
+
|
|
15
|
+
## Out of scope
|
|
16
|
+
|
|
17
|
+
- <what is not tested and why: another ticket, covered by an existing spec, needs a module the stand lacks>
|
|
18
|
+
|
|
19
|
+
## Existing coverage
|
|
20
|
+
|
|
21
|
+
- Covered: <criterion> by <spec file>
|
|
22
|
+
- Reusable building blocks: <names>
|
|
23
|
+
- Gaps: <what is missing>
|
|
24
|
+
|
|
25
|
+
<!-- What the repository's specs already cover and the building blocks that exist, found by searching them (`vc-plan-test-strategy` Step 2). A criterion already covered is listed here, not planned again. When the search finds nothing, say `None found` and what you searched. -->
|
|
26
|
+
|
|
27
|
+
## Cases
|
|
28
|
+
|
|
29
|
+
| Case | Technique | Project | Data role | Critical flow | Parameters | Oracle |
|
|
30
|
+
|---|---|---|---|---|---|---|
|
|
31
|
+
| <id> <what it shows> | <equivalence partitioning, boundary value analysis, decision table, state transition, pairwise, error guessing, negative, regression> | <a key of commands.test in the facts> | <a role from the facts> | <a flow of critical in the facts, or no> | <the request parameters that change the answer, with the values the case sends, or none> | ticket: <criterion> |
|
|
32
|
+
|
|
33
|
+
<!-- Critical flow names the flow of `critical` in the facts that the case belongs to, or `no`. Parameters states every request parameter whose value changes the answer (a quantity, a page size, a filter, a sort, a culture, a currency, a store) with the value this case sends; `none` only when the answer depends on none. A case that must be run on its own (state changes on an account the other cases share) says so here. A case without an account says `none` in Data role; several roles are separated by commas. Every Oracle cell starts with the source of the expected value: `ticket:`, `doc:`, `schema:` or `observed:`. Several sources are separated by `;`, each starting with its own prefix. An `observed:` part holds the value the explorer recorded and the report it is in, `observed: <value> (.qa/reports/explore-<slug>-observed.md)`, the value written as the report's line `- <case id>: <value> (` has it, except that a value holding `;` is put in double quotes and a `|` is written `\|` (the report keeps the raw value, never quoted or escaped); until it is recorded, write `observed: pending <what to observe>` with no report, which the check refuses. A case the explorer could not reach, which the person chose to observe at the expert's first run, says `observed: at first run <what to observe>`; the check accepts it only once the contract has its approval line, and the expert's amendment `A-n first-run values: <case id> = <value> (<report>)` must be approved before that value counts. A JSON string value is written without its JSON quotes. One row per case. -->
|
|
34
|
+
|
|
35
|
+
## Observed only
|
|
36
|
+
|
|
37
|
+
- <id> <what it shows>: characterization
|
|
38
|
+
|
|
39
|
+
<!-- List every case whose oracle is only `observed:`. Mark each `confirmed by <who>` (a person confirmed at approval that the observed behaviour is intended) or `characterization` (the test is written and named as a characterization test). Leave the section out when no case is observed-only. -->
|
|
40
|
+
|
|
41
|
+
## Stand needs
|
|
42
|
+
|
|
43
|
+
- Profile: <stand profile>
|
|
44
|
+
- Modules: <required modules, with the minimum version the cases rely on>
|
|
45
|
+
- Data roles: <roles from the facts>
|
|
46
|
+
|
|
47
|
+
## Building blocks
|
|
48
|
+
|
|
49
|
+
- Reuse: <existing documents, generated types, page objects, arrange methods, builders, dataset records>
|
|
50
|
+
- Add: <what must be created, in dependency order>
|
|
51
|
+
|
|
52
|
+
## Platform defects
|
|
53
|
+
|
|
54
|
+
- <case id>: <the defect, in one line>; <tracker link, or no ticket yet>
|
|
55
|
+
|
|
56
|
+
<!-- One line per case whose correct behaviour the platform is known to break, or the single line `None`. The test
|
|
57
|
+
asserts the correct behaviour and is marked as a known issue (`vc-framework-rules`, Platform Defects); a tracker link
|
|
58
|
+
becomes its `issue` annotation. Never a skip or a workaround. -->
|
|
59
|
+
|
|
60
|
+
## Verification
|
|
61
|
+
|
|
62
|
+
- <the typecheck, lint (when the facts have one) and test commands from the facts, then the commands that run the new specs>
|
|
63
|
+
|
|
64
|
+
<!-- Cases that change state on an account other specs of the suite also use run with `--workers=1`, in a series that includes those neighbouring specs: write the flag in the command here (`vc-framework-rules`, Shared Accounts). `reconcile-run` compares the run with the flags written here. -->
|
|
65
|
+
|
|
66
|
+
<!-- ## Approval
|
|
67
|
+
Left out until a person approves. Written only by that person, or by the session they answered, quoting their reply word
|
|
68
|
+
for word; never by an agent. One line, the bracket only when relayed:
|
|
69
|
+
|
|
70
|
+
Approved: <who>, <YYYY-MM-DD> (relayed: "<the person's exact words, several lines joined with / >")
|
|
71
|
+
-->
|
|
72
|
+
|
|
73
|
+
<!-- ## Amendments
|
|
74
|
+
Written only by the implementer when the contract turns out to be wrong. It stops and waits; a person approves, and the
|
|
75
|
+
approval line is written as under Approval.
|
|
76
|
+
|
|
77
|
+
### A-1 <what changes>
|
|
78
|
+
|
|
79
|
+
Cases: <the case ids it touches>
|
|
80
|
+
Changes: <the assertion, oracle or building block that changes, from and to>
|
|
81
|
+
Drops: <case ids no test will cover, only when it drops a case>
|
|
82
|
+
|
|
83
|
+
<why>
|
|
84
|
+
|
|
85
|
+
Approved: <who>, <YYYY-MM-DD>
|
|
86
|
+
-->
|