@gate-forge/cli 0.13.6 → 0.13.8
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/CHANGELOG.md +76 -0
- package/README.md +2 -0
- package/dist/commands/test-gates.d.ts +7 -0
- package/dist/commands/test-gates.d.ts.map +1 -1
- package/dist/commands/test-gates.js +100 -12
- package/dist/commands/test-gates.js.map +1 -1
- package/dist/serial-expansion.d.ts +44 -0
- package/dist/serial-expansion.d.ts.map +1 -0
- package/dist/serial-expansion.js +118 -0
- package/dist/serial-expansion.js.map +1 -0
- package/guides/QUICKSTART.md +7 -7
- package/guides/REFERENCE.md +36 -0
- package/package.json +11 -11
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PlannedRow } from './execution.js';
|
|
2
|
+
/** One expanded serial group, exactly as the report records it. */
|
|
3
|
+
export interface SerialExpansionRecord {
|
|
4
|
+
/** The group's title path (' > ' joined); null for a file-level serial scope. */
|
|
5
|
+
describe: string | null;
|
|
6
|
+
/** The repo-relative file the group lives in. */
|
|
7
|
+
file: string;
|
|
8
|
+
/** How many group members this expansion added to the selection. */
|
|
9
|
+
added: number;
|
|
10
|
+
/** The added members' logical keys, in FILE order (not key order). */
|
|
11
|
+
logicalKeys: string[];
|
|
12
|
+
}
|
|
13
|
+
/** The expanded selection: rows, added keys, and the per-group records. */
|
|
14
|
+
export interface SerialExpansionResult {
|
|
15
|
+
/** The original selection plus every added member, sorted by logical key. */
|
|
16
|
+
rows: PlannedRow[];
|
|
17
|
+
/** The added members' logical keys, sorted. */
|
|
18
|
+
addedLogicalKeys: string[];
|
|
19
|
+
/** One record per expanded group, ordered by (file, group position). */
|
|
20
|
+
expansions: SerialExpansionRecord[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Expands a narrowed selection to the serial groups its selected tests
|
|
24
|
+
* belong to.
|
|
25
|
+
*
|
|
26
|
+
* Args:
|
|
27
|
+
* cwd: absolute repository root (spec files resolve from here).
|
|
28
|
+
* rows: the current selection (a named or changed-slice plan).
|
|
29
|
+
* allRows: the FULL planned set the members may be drawn from.
|
|
30
|
+
* lineOf: a logical key's catalog source line (members are ordered
|
|
31
|
+
* and ranged by it; a row the catalog never located can still join
|
|
32
|
+
* a file-level scope).
|
|
33
|
+
*
|
|
34
|
+
* Returns:
|
|
35
|
+
* SerialExpansionResult: the expanded selection; identity when no
|
|
36
|
+
* selected test sits in a serial scope.
|
|
37
|
+
*/
|
|
38
|
+
export declare function expandSerialSelection(input: {
|
|
39
|
+
cwd: string;
|
|
40
|
+
rows: readonly PlannedRow[];
|
|
41
|
+
allRows: readonly PlannedRow[];
|
|
42
|
+
lineOf: (logicalKey: string) => number | undefined;
|
|
43
|
+
}): SerialExpansionResult;
|
|
44
|
+
//# sourceMappingURL=serial-expansion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serial-expansion.d.ts","sourceRoot":"","sources":["../src/serial-expansion.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,mEAAmE;AACnE,MAAM,WAAW,qBAAqB;IACpC,iFAAiF;IACjF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,2EAA2E;AAC3E,MAAM,WAAW,qBAAqB;IACpC,6EAA6E;IAC7E,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,+CAA+C;IAC/C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,wEAAwE;IACxE,UAAU,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5B,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IAC/B,MAAM,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACpD,GAAG,qBAAqB,CAkFxB"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serial-group selection expansion (plan seam): when a selected test
|
|
3
|
+
* belongs to a describe in serial mode, the run must select every test
|
|
4
|
+
* of that serial group in file order — a serial journey's later steps
|
|
5
|
+
* consume the state its earlier steps create, so executing a mapped
|
|
6
|
+
* later step without the group's own first step fails by construction.
|
|
7
|
+
*
|
|
8
|
+
* The expansion is additive and narrow:
|
|
9
|
+
*
|
|
10
|
+
* - members come from the FULL planned set (`allRows`), so quarantined
|
|
11
|
+
* rows (they left planning before this point) are never re-added;
|
|
12
|
+
* - a member is only added inside the selected test's OWN file and
|
|
13
|
+
* project — an expansion never leaks across files or projects;
|
|
14
|
+
* - a scope that declares nothing serial expands nothing (the
|
|
15
|
+
* detection itself is `@gate-forge/pack-playwright`'s static
|
|
16
|
+
* serial-scope reader — Playwright's own listing never exposes a
|
|
17
|
+
* suite's declared mode);
|
|
18
|
+
* - the result reports one record per expanded group, in file order,
|
|
19
|
+
* naming exactly what was added.
|
|
20
|
+
*/
|
|
21
|
+
import { join } from 'node:path';
|
|
22
|
+
import { readSerialScopes, scopeCoversTest, serialScopeOfTest, serialScopeTitle, } from '@gate-forge/pack-playwright';
|
|
23
|
+
/**
|
|
24
|
+
* Expands a narrowed selection to the serial groups its selected tests
|
|
25
|
+
* belong to.
|
|
26
|
+
*
|
|
27
|
+
* Args:
|
|
28
|
+
* cwd: absolute repository root (spec files resolve from here).
|
|
29
|
+
* rows: the current selection (a named or changed-slice plan).
|
|
30
|
+
* allRows: the FULL planned set the members may be drawn from.
|
|
31
|
+
* lineOf: a logical key's catalog source line (members are ordered
|
|
32
|
+
* and ranged by it; a row the catalog never located can still join
|
|
33
|
+
* a file-level scope).
|
|
34
|
+
*
|
|
35
|
+
* Returns:
|
|
36
|
+
* SerialExpansionResult: the expanded selection; identity when no
|
|
37
|
+
* selected test sits in a serial scope.
|
|
38
|
+
*/
|
|
39
|
+
export function expandSerialSelection(input) {
|
|
40
|
+
const { cwd, rows, allRows, lineOf } = input;
|
|
41
|
+
if (rows.length === 0) {
|
|
42
|
+
return { rows: [...rows], addedLogicalKeys: [], expansions: [] };
|
|
43
|
+
}
|
|
44
|
+
const selected = new Set(rows.map((row) => row.planned.logicalKey));
|
|
45
|
+
const added = new Set();
|
|
46
|
+
/** One record per (file, serial scope), keyed by file + scope start. */
|
|
47
|
+
const records = new Map();
|
|
48
|
+
const rowsByFile = new Map();
|
|
49
|
+
for (const row of rows) {
|
|
50
|
+
const fileRows = rowsByFile.get(row.planned.file) ?? [];
|
|
51
|
+
fileRows.push(row);
|
|
52
|
+
rowsByFile.set(row.planned.file, fileRows);
|
|
53
|
+
}
|
|
54
|
+
for (const file of [...rowsByFile.keys()].sort()) {
|
|
55
|
+
const scopes = readSerialScopes(join(cwd, file));
|
|
56
|
+
if (scopes.length === 0)
|
|
57
|
+
continue;
|
|
58
|
+
for (const row of rowsByFile.get(file) ?? []) {
|
|
59
|
+
const scope = serialScopeOfTest({ titlePath: row.planned.titlePath, line: lineOf(row.planned.logicalKey) }, scopes);
|
|
60
|
+
if (scope === null)
|
|
61
|
+
continue;
|
|
62
|
+
const recordKey = `${file}\u0000${scope.kind}\u0000${String(scope.startLine)}`;
|
|
63
|
+
const record = records.get(recordKey) ?? { scope, file, keys: [] };
|
|
64
|
+
records.set(recordKey, record);
|
|
65
|
+
// Members: the full plan's rows of the same file AND project that
|
|
66
|
+
// the group's serial chain covers, in file order.
|
|
67
|
+
const members = allRows
|
|
68
|
+
.filter((candidate) => candidate.planned.file === file &&
|
|
69
|
+
candidate.planned.project === row.planned.project &&
|
|
70
|
+
!selected.has(candidate.planned.logicalKey))
|
|
71
|
+
.map((candidate, index) => ({
|
|
72
|
+
candidate,
|
|
73
|
+
line: lineOf(candidate.planned.logicalKey),
|
|
74
|
+
index,
|
|
75
|
+
}))
|
|
76
|
+
.filter(({ candidate }) => {
|
|
77
|
+
if (added.has(candidate.planned.logicalKey))
|
|
78
|
+
return false;
|
|
79
|
+
return scopeCoversTest(scope, {
|
|
80
|
+
titlePath: candidate.planned.titlePath,
|
|
81
|
+
line: lineOf(candidate.planned.logicalKey),
|
|
82
|
+
});
|
|
83
|
+
})
|
|
84
|
+
.sort((left, right) => {
|
|
85
|
+
if (left.line !== undefined && right.line !== undefined && left.line !== right.line) {
|
|
86
|
+
return left.line - right.line;
|
|
87
|
+
}
|
|
88
|
+
if (left.line !== right.line)
|
|
89
|
+
return left.line === undefined ? 1 : -1;
|
|
90
|
+
return left.index - right.index;
|
|
91
|
+
});
|
|
92
|
+
for (const { candidate } of members) {
|
|
93
|
+
added.add(candidate.planned.logicalKey);
|
|
94
|
+
record.keys.push(candidate.planned.logicalKey);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (added.size === 0) {
|
|
99
|
+
return { rows: [...rows], addedLogicalKeys: [], expansions: [] };
|
|
100
|
+
}
|
|
101
|
+
const addedRows = allRows.filter((candidate) => added.has(candidate.planned.logicalKey));
|
|
102
|
+
const rowsByKey = new Map([...rows, ...addedRows].map((row) => [row.planned.logicalKey, row]));
|
|
103
|
+
const expansions = [...records.values()]
|
|
104
|
+
.filter((record) => record.keys.length > 0)
|
|
105
|
+
.sort((left, right) => (left.file < right.file ? -1 : left.file > right.file ? 1 : left.scope.startLine - right.scope.startLine))
|
|
106
|
+
.map((record) => ({
|
|
107
|
+
describe: serialScopeTitle(record.scope),
|
|
108
|
+
file: record.file,
|
|
109
|
+
added: record.keys.length,
|
|
110
|
+
logicalKeys: [...record.keys],
|
|
111
|
+
}));
|
|
112
|
+
return {
|
|
113
|
+
rows: [...rowsByKey.values()].sort((a, b) => (a.planned.logicalKey < b.planned.logicalKey ? -1 : 1)),
|
|
114
|
+
addedLogicalKeys: [...added].sort(),
|
|
115
|
+
expansions,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=serial-expansion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serial-expansion.js","sourceRoot":"","sources":["../src/serial-expansion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,6BAA6B,CAAC;AAyBrC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAKrC;IACC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC7C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IACnE,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,wEAAwE;IACxE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgE,CAAC;IACxF,MAAM,UAAU,GAAG,IAAI,GAAG,EAAwB,CAAC;IACnD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACxD,QAAQ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AC,MAAM,CAAC,KAAK,CAAC;QACxC,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;QACzB,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;KAC9B,CAAC,CAAC,CAAC;IACN,OAAO;QACL,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpG,gBAAgB,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE;QACnC,UAAU;KACX,CAAC;AACJ,CAAC"}
|
package/guides/QUICKSTART.md
CHANGED
|
@@ -24,11 +24,11 @@ Example for a React frontend, FastAPI backend, and SQLAlchemy data layer:
|
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
26
|
npm i -D \
|
|
27
|
-
@gate-forge/cli@0.13.
|
|
28
|
-
@gate-forge/pack-playwright@0.13.
|
|
29
|
-
@gate-forge/pack-http@0.13.
|
|
30
|
-
@gate-forge/pack-fastapi@0.13.
|
|
31
|
-
@gate-forge/pack-sqlalchemy@0.13.
|
|
27
|
+
@gate-forge/cli@0.13.8 \
|
|
28
|
+
@gate-forge/pack-playwright@0.13.8 \
|
|
29
|
+
@gate-forge/pack-http@0.13.8 \
|
|
30
|
+
@gate-forge/pack-fastapi@0.13.8 \
|
|
31
|
+
@gate-forge/pack-sqlalchemy@0.13.8
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Use the project-local `gateforge` binary from your npm script or add `node_modules/.bin` to your shell `PATH`. If the scan recommends other packs, add only the ones your code uses, at the same version. A mismatched Gateforge package contract can stop the CLI with exit code 2 and `GATEFORGE_PACKAGE_INCOMPATIBLE`.
|
|
@@ -49,7 +49,7 @@ This installs every pack of the release; the scan still recommends the ones your
|
|
|
49
49
|
|
|
50
50
|
**You should see:** npm installs the packages without a Gateforge compatibility error.
|
|
51
51
|
|
|
52
|
-
**If not:** align every direct `@gate-forge/*` package to `0.13.
|
|
52
|
+
**If not:** align every direct `@gate-forge/*` package to `0.13.8`, then install again. Do not work around the compatibility error.
|
|
53
53
|
|
|
54
54
|
## 2. Pick a goal
|
|
55
55
|
|
|
@@ -501,7 +501,7 @@ the registry. To gate a release that is not on the registry yet (a local
|
|
|
501
501
|
regenerate:
|
|
502
502
|
|
|
503
503
|
```sh
|
|
504
|
-
GATEFORGE_CI_ENGINE_SOURCE=vendor/gate-forge-cli-0.13.
|
|
504
|
+
GATEFORGE_CI_ENGINE_SOURCE=vendor/gate-forge-cli-0.13.8.tgz \
|
|
505
505
|
gateforge enforce --ci github
|
|
506
506
|
```
|
|
507
507
|
|
package/guides/REFERENCE.md
CHANGED
|
@@ -183,6 +183,30 @@ refuses to trust, so it executes the whole spec, drops every unselected
|
|
|
183
183
|
outcome and session (an unselected test never becomes evidence), and
|
|
184
184
|
says `also ran N other test(s) in the same file — not graded`.
|
|
185
185
|
|
|
186
|
+
##### Serial groups select whole (Playwright)
|
|
187
|
+
|
|
188
|
+
A serial journey cannot run in slices: a `test.describe.serial(...)`
|
|
189
|
+
describe — or a describe whose body calls
|
|
190
|
+
`test.describe.configure({ mode: 'serial' })`, including the file-level
|
|
191
|
+
form — chains its steps on shared state, so a mapped later step without
|
|
192
|
+
the group's own earlier steps fails by construction. When a selected
|
|
193
|
+
test belongs to a serial group, the run selects the WHOLE group, in
|
|
194
|
+
file order: the runner receives every step's location, the expected set
|
|
195
|
+
registers every step, and each step's own claims are graded like any
|
|
196
|
+
selected test's (a step that declares nothing contributes nothing). The
|
|
197
|
+
run names each expansion on its output and the report carries an
|
|
198
|
+
additive `serialExpansions` field:
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
scope: named (3 tests) — ...
|
|
202
|
+
selection: added 2 tests of serial group 'journey' (specs/journey.spec.js)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Detection is static — Playwright's own list mode never exposes a
|
|
206
|
+
suite's declared mode — and it reads exactly the three declaration
|
|
207
|
+
forms above. A describe that declares nothing serial is never expanded,
|
|
208
|
+
and an expansion never leaks beyond the selected test's own file.
|
|
209
|
+
|
|
186
210
|
#### What a named run grades, and its exit codes
|
|
187
211
|
|
|
188
212
|
A named run grades **only the selection**: the obligations its selected
|
|
@@ -326,6 +350,18 @@ their own config must repeat the value here — without it, Playwright's
|
|
|
326
350
|
default applies to every assertion that does not set an explicit timeout.
|
|
327
351
|
When the key is absent, nothing is emitted and Playwright's default stands.
|
|
328
352
|
|
|
353
|
+
Traces get the same treatment: `runtime.yml trace` takes one of
|
|
354
|
+
Playwright's trace modes (`off`, `on`, `retain-on-failure`,
|
|
355
|
+
`on-first-retry`, `on-all-retries`, `retain-on-first-failure`) and is
|
|
356
|
+
written as `use.trace` in the generated config a supervised Playwright
|
|
357
|
+
run executes under. The consumer config is never loaded, so an owner who
|
|
358
|
+
turned traces on in their own config must repeat the mode here — without
|
|
359
|
+
it the generated config keeps `trace: 'off'`, and `<state>/last-failures/`
|
|
360
|
+
never holds a `trace.zip` to diagnose a red supervised test from. When
|
|
361
|
+
the key is absent the default is unchanged, and a declared run's
|
|
362
|
+
`trace.zip` survives into `last-failures` with the other failure
|
|
363
|
+
artifacts. An unknown mode is a typed schema violation naming `trace`.
|
|
364
|
+
|
|
329
365
|
**Playwright only, and here is why.** A stall bound needs a stream of per-test
|
|
330
366
|
completions; today only the Playwright pack reads one. The pytest, Vitest,
|
|
331
367
|
Cypress and other supervisors keep their historical 30-minute whole-run
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gate-forge/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.8",
|
|
4
4
|
"gateforgeCompatibility": {
|
|
5
5
|
"supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
|
|
6
6
|
},
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"test": "vitest run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@gate-forge/core": "^0.13.
|
|
37
|
-
"@gate-forge/http-contract": "^0.13.
|
|
38
|
-
"@gate-forge/pack-fastapi": "^0.13.
|
|
39
|
-
"@gate-forge/pack-alembic": "^0.13.
|
|
40
|
-
"@gate-forge/pack-http": "^0.13.
|
|
41
|
-
"@gate-forge/pack-react-router": "^0.13.
|
|
42
|
-
"@gate-forge/pack-playwright": "^0.13.
|
|
43
|
-
"@gate-forge/pack-sqlalchemy": "^0.13.
|
|
44
|
-
"@gate-forge/pack-task": "^0.13.
|
|
45
|
-
"@gate-forge/plugin-protocol": "^0.13.
|
|
36
|
+
"@gate-forge/core": "^0.13.8",
|
|
37
|
+
"@gate-forge/http-contract": "^0.13.8",
|
|
38
|
+
"@gate-forge/pack-fastapi": "^0.13.8",
|
|
39
|
+
"@gate-forge/pack-alembic": "^0.13.8",
|
|
40
|
+
"@gate-forge/pack-http": "^0.13.8",
|
|
41
|
+
"@gate-forge/pack-react-router": "^0.13.8",
|
|
42
|
+
"@gate-forge/pack-playwright": "^0.13.8",
|
|
43
|
+
"@gate-forge/pack-sqlalchemy": "^0.13.8",
|
|
44
|
+
"@gate-forge/pack-task": "^0.13.8",
|
|
45
|
+
"@gate-forge/plugin-protocol": "^0.13.8",
|
|
46
46
|
"picomatch": "^4.0.7",
|
|
47
47
|
"yaml": "^2.8.1"
|
|
48
48
|
},
|