@sun-asterisk/sungen 3.2.12-beta.2 → 3.2.12-beta.3
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/dist/orchestrator/templates/ai-src/commands/create-data-test.md +4 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-data-factory/SKILL.md +8 -0
- package/package.json +3 -3
- package/src/orchestrator/templates/ai-src/commands/create-data-test.md +4 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-data-factory/SKILL.md +8 -0
|
@@ -90,6 +90,10 @@ Run (local-first): `[ -x ./bin/sungen.js ] && ./bin/sungen.js data lint --screen
|
|
|
90
90
|
|
|
91
91
|
Run (local-first): `[ -x ./bin/sungen.js ] && ./bin/sungen.js data gen --screen <name> || npx sungen data gen --screen <name>`. If `test-data/<name>.yaml` already exists it **merges** the standardized field data in — it **replaces only the field keys it owns and preserves every other key** (create-test's data, flow-namespaced keys, `@cases` datasets, overrides). It asks before merging (in ALL mode after they confirmed, add `--yes`; `--force` skips the prompt). The output is standardized `valid/boundary/invalid` values with `CHK-*` traceability.
|
|
92
92
|
|
|
93
|
+
### 5.5 Validate semantic correctness
|
|
94
|
+
|
|
95
|
+
Run (local-first): `[ -x ./bin/sungen.js ] && ./bin/sungen.js data validate --screen <name> || npx sungen data validate --screen <name>`. This is stronger than lint (coverage): it checks every generated value is **semantically** correct — each `valid`/`boundary` value actually satisfies the constraints, and each synthesized `invalid` value actually violates them (a value in the `valid` set that breaks `maxLength`, or a "below min" case that landed inside the range, is a `VALUE_NOT_VALID` error). Fix any `error`; `INVALID_LOOKS_VALID` warns are a prompt to confirm the value is invalid for a non-length reason (charset/format). Each generated value also carries an `expected: valid|invalid` field in the test-data for traceability.
|
|
96
|
+
|
|
93
97
|
### 6. Weave into scenarios (if create-test already ran)
|
|
94
98
|
|
|
95
99
|
If the `.feature` exists, turn the generated invalid/boundary sets into data-driven `Scenario Outline` + `Examples` (`@cases`) referencing the values — following `sungen-gherkin-syntax`. Otherwise leave the standardized `test-data/<name>.yaml` for `/sungen:run-test` to consume.
|
|
@@ -109,6 +109,14 @@ Then `sungen data gen` writes the standardized `test-data/<name>.yaml`. Do not h
|
|
|
109
109
|
generated values — change the field-map or `.overwrite` and re-run (determinism: same input → same
|
|
110
110
|
data).
|
|
111
111
|
|
|
112
|
+
Then run **`sungen data validate`** — the semantic check beyond coverage. It verifies each generated
|
|
113
|
+
value is *correct*, not just *present*: every `valid`/`boundary` value actually satisfies the
|
|
114
|
+
constraints and every synthesized `invalid` value actually violates them. A boundary is expanded to
|
|
115
|
+
**one case per point** (`min / min+1` → two cases; `< min` → min-1, below the minimum), each stamped
|
|
116
|
+
`expected: valid|invalid` in the output. Any `VALUE_NOT_VALID` error means a value labeled valid breaks
|
|
117
|
+
a constraint — fix the field-map/constraints and re-run. This is what stops the "structurally right but
|
|
118
|
+
semantically wrong" data (e.g. a "below minimum length" case that is actually long enough to pass).
|
|
119
|
+
|
|
112
120
|
## Weaving into scenarios
|
|
113
121
|
|
|
114
122
|
When a `.feature` exists, express invalid/boundary sets as data-driven `Scenario Outline` + `Examples`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sun-asterisk/sungen",
|
|
3
|
-
"version": "3.2.12-beta.
|
|
3
|
+
"version": "3.2.12-beta.3",
|
|
4
4
|
"description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@babel/types": "^7.28.5",
|
|
40
40
|
"@cucumber/gherkin": "^37.0.0",
|
|
41
41
|
"@cucumber/messages": "^31.0.0",
|
|
42
|
-
"@sungen/driver-data-factory": "3.2.12-beta.
|
|
43
|
-
"@sungen/driver-ui": "3.2.12-beta.
|
|
42
|
+
"@sungen/driver-data-factory": "3.2.12-beta.3",
|
|
43
|
+
"@sungen/driver-ui": "3.2.12-beta.3",
|
|
44
44
|
"chalk": "^5.6.2",
|
|
45
45
|
"commander": "^14.0.2",
|
|
46
46
|
"dotenv": "^17.2.3",
|
|
@@ -90,6 +90,10 @@ Run (local-first): `[ -x ./bin/sungen.js ] && ./bin/sungen.js data lint --screen
|
|
|
90
90
|
|
|
91
91
|
Run (local-first): `[ -x ./bin/sungen.js ] && ./bin/sungen.js data gen --screen <name> || npx sungen data gen --screen <name>`. If `test-data/<name>.yaml` already exists it **merges** the standardized field data in — it **replaces only the field keys it owns and preserves every other key** (create-test's data, flow-namespaced keys, `@cases` datasets, overrides). It asks before merging (in ALL mode after they confirmed, add `--yes`; `--force` skips the prompt). The output is standardized `valid/boundary/invalid` values with `CHK-*` traceability.
|
|
92
92
|
|
|
93
|
+
### 5.5 Validate semantic correctness
|
|
94
|
+
|
|
95
|
+
Run (local-first): `[ -x ./bin/sungen.js ] && ./bin/sungen.js data validate --screen <name> || npx sungen data validate --screen <name>`. This is stronger than lint (coverage): it checks every generated value is **semantically** correct — each `valid`/`boundary` value actually satisfies the constraints, and each synthesized `invalid` value actually violates them (a value in the `valid` set that breaks `maxLength`, or a "below min" case that landed inside the range, is a `VALUE_NOT_VALID` error). Fix any `error`; `INVALID_LOOKS_VALID` warns are a prompt to confirm the value is invalid for a non-length reason (charset/format). Each generated value also carries an `expected: valid|invalid` field in the test-data for traceability.
|
|
96
|
+
|
|
93
97
|
### 6. Weave into scenarios (if create-test already ran)
|
|
94
98
|
|
|
95
99
|
If the `.feature` exists, turn the generated invalid/boundary sets into data-driven `Scenario Outline` + `Examples` (`@cases`) referencing the values — following `sungen-gherkin-syntax`. Otherwise leave the standardized `test-data/<name>.yaml` for `/sungen:run-test` to consume.
|
|
@@ -109,6 +109,14 @@ Then `sungen data gen` writes the standardized `test-data/<name>.yaml`. Do not h
|
|
|
109
109
|
generated values — change the field-map or `.overwrite` and re-run (determinism: same input → same
|
|
110
110
|
data).
|
|
111
111
|
|
|
112
|
+
Then run **`sungen data validate`** — the semantic check beyond coverage. It verifies each generated
|
|
113
|
+
value is *correct*, not just *present*: every `valid`/`boundary` value actually satisfies the
|
|
114
|
+
constraints and every synthesized `invalid` value actually violates them. A boundary is expanded to
|
|
115
|
+
**one case per point** (`min / min+1` → two cases; `< min` → min-1, below the minimum), each stamped
|
|
116
|
+
`expected: valid|invalid` in the output. Any `VALUE_NOT_VALID` error means a value labeled valid breaks
|
|
117
|
+
a constraint — fix the field-map/constraints and re-run. This is what stops the "structurally right but
|
|
118
|
+
semantically wrong" data (e.g. a "below minimum length" case that is actually long enough to pass).
|
|
119
|
+
|
|
112
120
|
## Weaving into scenarios
|
|
113
121
|
|
|
114
122
|
When a `.feature` exists, express invalid/boundary sets as data-driven `Scenario Outline` + `Examples`
|