@sun-asterisk/sungen 3.2.21 → 3.2.22-beta.2

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 (188) hide show
  1. package/dist/cli/commands/audit.d.ts.map +1 -1
  2. package/dist/cli/commands/audit.js +8 -0
  3. package/dist/cli/commands/audit.js.map +1 -1
  4. package/dist/cli/commands/delivery.d.ts +3 -0
  5. package/dist/cli/commands/delivery.d.ts.map +1 -1
  6. package/dist/cli/commands/delivery.js +15 -0
  7. package/dist/cli/commands/delivery.js.map +1 -1
  8. package/dist/cli/commands/inspect.d.ts +41 -0
  9. package/dist/cli/commands/inspect.d.ts.map +1 -0
  10. package/dist/cli/commands/inspect.js +134 -0
  11. package/dist/cli/commands/inspect.js.map +1 -0
  12. package/dist/cli/commands/trace.d.ts.map +1 -1
  13. package/dist/cli/commands/trace.js +9 -0
  14. package/dist/cli/commands/trace.js.map +1 -1
  15. package/dist/cli/index.js +2 -0
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/exporters/matrix/build.d.ts +10 -0
  18. package/dist/exporters/matrix/build.d.ts.map +1 -1
  19. package/dist/exporters/matrix/build.js +38 -0
  20. package/dist/exporters/matrix/build.js.map +1 -1
  21. package/dist/exporters/matrix/export.d.ts.map +1 -1
  22. package/dist/exporters/matrix/export.js +11 -0
  23. package/dist/exporters/matrix/export.js.map +1 -1
  24. package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
  25. package/dist/exporters/matrix/render-xlsx.js +44 -1
  26. package/dist/exporters/matrix/render-xlsx.js.map +1 -1
  27. package/dist/exporters/matrix/types.d.ts +10 -0
  28. package/dist/exporters/matrix/types.d.ts.map +1 -1
  29. package/dist/exporters/matrix/types.js.map +1 -1
  30. package/dist/exporters/playwright-report-parser.d.ts.map +1 -1
  31. package/dist/exporters/playwright-report-parser.js +1 -0
  32. package/dist/exporters/playwright-report-parser.js.map +1 -1
  33. package/dist/exporters/types.d.ts +2 -0
  34. package/dist/exporters/types.d.ts.map +1 -1
  35. package/dist/generators/test-generator/adapters/appium/templates/imports.hbs +9 -0
  36. package/dist/generators/test-generator/adapters/appium/templates/scenario.hbs +23 -1
  37. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/capture-row-column.hbs +2 -0
  38. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +10 -0
  39. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-with-alert-action.hbs +7 -0
  40. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/drag-action.hbs +14 -2
  41. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +3 -0
  42. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/table-action-in-row-nth.hbs +2 -0
  43. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-assertion.hbs +17 -0
  44. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-element.hbs +13 -0
  45. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-filter-assertion.hbs +26 -0
  46. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +24 -0
  47. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-variable-assertion.hbs +9 -0
  48. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-dialog-heading-assertion.hbs +10 -0
  49. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-filter-assertion.hbs +14 -0
  50. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +21 -0
  51. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-variable-assertion.hbs +10 -0
  52. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/row-scoped-column-assertion.hbs +2 -0
  53. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +23 -0
  54. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/storage-key-assertion.hbs +2 -0
  55. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/tab-order-assertion.hbs +3 -0
  56. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-dialog-heading-assertion.hbs +10 -0
  57. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-filtered-assertion.hbs +17 -0
  58. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +13 -0
  59. package/dist/generators/test-generator/adapters/appium/templates/steps/navigation/wait-table-refresh.hbs +13 -0
  60. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/drag-action.hbs +1 -1
  61. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/frame-enter-action.hbs +1 -1
  62. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -5
  63. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/row-scoped-column-assertion.hbs +1 -0
  64. package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
  65. package/dist/generators/test-generator/code-generator.js +29 -8
  66. package/dist/generators/test-generator/code-generator.js.map +1 -1
  67. package/dist/generators/test-generator/diagnostics.d.ts +25 -1
  68. package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
  69. package/dist/generators/test-generator/diagnostics.js +24 -0
  70. package/dist/generators/test-generator/diagnostics.js.map +1 -1
  71. package/dist/generators/test-generator/patterns/index.d.ts +45 -0
  72. package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
  73. package/dist/generators/test-generator/patterns/index.js +159 -20
  74. package/dist/generators/test-generator/patterns/index.js.map +1 -1
  75. package/dist/generators/test-generator/patterns/types.d.ts +36 -0
  76. package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
  77. package/dist/generators/test-generator/step-mapper.d.ts +33 -0
  78. package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
  79. package/dist/generators/test-generator/step-mapper.js +100 -24
  80. package/dist/generators/test-generator/step-mapper.js.map +1 -1
  81. package/dist/harness/audit.d.ts +2 -0
  82. package/dist/harness/audit.d.ts.map +1 -1
  83. package/dist/harness/audit.js +101 -10
  84. package/dist/harness/audit.js.map +1 -1
  85. package/dist/harness/flow-contract.d.ts +87 -0
  86. package/dist/harness/flow-contract.d.ts.map +1 -0
  87. package/dist/harness/flow-contract.js +259 -0
  88. package/dist/harness/flow-contract.js.map +1 -0
  89. package/dist/harness/flow-plan.d.ts +3 -0
  90. package/dist/harness/flow-plan.d.ts.map +1 -1
  91. package/dist/harness/flow-plan.js +6 -2
  92. package/dist/harness/flow-plan.js.map +1 -1
  93. package/dist/harness/parse.d.ts +5 -0
  94. package/dist/harness/parse.d.ts.map +1 -1
  95. package/dist/harness/parse.js +29 -1
  96. package/dist/harness/parse.js.map +1 -1
  97. package/dist/harness/perf.d.ts +40 -0
  98. package/dist/harness/perf.d.ts.map +1 -0
  99. package/dist/harness/perf.js +136 -0
  100. package/dist/harness/perf.js.map +1 -0
  101. package/dist/harness/sensors.d.ts.map +1 -1
  102. package/dist/harness/sensors.js +13 -1
  103. package/dist/harness/sensors.js.map +1 -1
  104. package/dist/harness/spec-coverage.d.ts +8 -0
  105. package/dist/harness/spec-coverage.d.ts.map +1 -1
  106. package/dist/harness/spec-coverage.js +60 -6
  107. package/dist/harness/spec-coverage.js.map +1 -1
  108. package/dist/orchestrator/templates/ai-src/commands/add-flow.md +51 -3
  109. package/dist/orchestrator/templates/ai-src/commands/create-test.md +10 -0
  110. package/dist/orchestrator/templates/ai-src/commands/run-test.md +23 -0
  111. package/dist/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md +2 -2
  112. package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -0
  113. package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +61 -12
  114. package/dist/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +22 -8
  115. package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +65 -17
  116. package/dist/orchestrator/templates/qa-context.md +14 -1
  117. package/dist/orchestrator/templates/specs-api.d.ts.map +1 -1
  118. package/dist/orchestrator/templates/specs-api.js +104 -29
  119. package/dist/orchestrator/templates/specs-api.js.map +1 -1
  120. package/dist/orchestrator/templates/specs-api.ts +104 -26
  121. package/dist/orchestrator/templates/specs-db.d.ts.map +1 -1
  122. package/dist/orchestrator/templates/specs-db.js +18 -5
  123. package/dist/orchestrator/templates/specs-db.js.map +1 -1
  124. package/dist/orchestrator/templates/specs-db.ts +19 -5
  125. package/package.json +3 -3
  126. package/src/cli/commands/audit.ts +8 -0
  127. package/src/cli/commands/delivery.ts +14 -2
  128. package/src/cli/commands/inspect.ts +128 -0
  129. package/src/cli/commands/trace.ts +9 -0
  130. package/src/cli/index.ts +2 -0
  131. package/src/exporters/matrix/build.ts +40 -0
  132. package/src/exporters/matrix/export.ts +11 -0
  133. package/src/exporters/matrix/render-xlsx.ts +45 -1
  134. package/src/exporters/matrix/types.ts +10 -0
  135. package/src/exporters/playwright-report-parser.ts +2 -0
  136. package/src/exporters/types.ts +2 -0
  137. package/src/generators/test-generator/adapters/appium/templates/imports.hbs +9 -0
  138. package/src/generators/test-generator/adapters/appium/templates/scenario.hbs +23 -1
  139. package/src/generators/test-generator/adapters/appium/templates/steps/actions/capture-row-column.hbs +2 -0
  140. package/src/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +10 -0
  141. package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-with-alert-action.hbs +7 -0
  142. package/src/generators/test-generator/adapters/appium/templates/steps/actions/drag-action.hbs +14 -2
  143. package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +3 -0
  144. package/src/generators/test-generator/adapters/appium/templates/steps/actions/table-action-in-row-nth.hbs +2 -0
  145. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-assertion.hbs +17 -0
  146. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-element.hbs +13 -0
  147. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-filter-assertion.hbs +26 -0
  148. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +24 -0
  149. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-variable-assertion.hbs +9 -0
  150. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-dialog-heading-assertion.hbs +10 -0
  151. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-filter-assertion.hbs +14 -0
  152. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +21 -0
  153. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-variable-assertion.hbs +10 -0
  154. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/row-scoped-column-assertion.hbs +2 -0
  155. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +23 -0
  156. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/storage-key-assertion.hbs +2 -0
  157. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/tab-order-assertion.hbs +3 -0
  158. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-dialog-heading-assertion.hbs +10 -0
  159. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-filtered-assertion.hbs +17 -0
  160. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +13 -0
  161. package/src/generators/test-generator/adapters/appium/templates/steps/navigation/wait-table-refresh.hbs +13 -0
  162. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/drag-action.hbs +1 -1
  163. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/frame-enter-action.hbs +1 -1
  164. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -5
  165. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/row-scoped-column-assertion.hbs +1 -0
  166. package/src/generators/test-generator/code-generator.ts +34 -9
  167. package/src/generators/test-generator/diagnostics.ts +25 -1
  168. package/src/generators/test-generator/patterns/index.ts +172 -25
  169. package/src/generators/test-generator/patterns/types.ts +35 -0
  170. package/src/generators/test-generator/step-mapper.ts +106 -23
  171. package/src/harness/audit.ts +104 -11
  172. package/src/harness/flow-contract.ts +261 -0
  173. package/src/harness/flow-plan.ts +10 -3
  174. package/src/harness/parse.ts +31 -1
  175. package/src/harness/perf.ts +112 -0
  176. package/src/harness/sensors.ts +13 -1
  177. package/src/harness/spec-coverage.ts +55 -5
  178. package/src/orchestrator/templates/ai-src/commands/add-flow.md +51 -3
  179. package/src/orchestrator/templates/ai-src/commands/create-test.md +10 -0
  180. package/src/orchestrator/templates/ai-src/commands/run-test.md +23 -0
  181. package/src/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md +2 -2
  182. package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -0
  183. package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +61 -12
  184. package/src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +22 -8
  185. package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +65 -17
  186. package/src/orchestrator/templates/qa-context.md +14 -1
  187. package/src/orchestrator/templates/specs-api.ts +104 -26
  188. package/src/orchestrator/templates/specs-db.ts +19 -5
@@ -40,7 +40,13 @@ class StepMapper {
40
40
  // mobile→Appium). The adapter owns its templatesDir; resolving it here keeps step
41
41
  // rendering and the file skeleton (code-generator) on the same framework.
42
42
  const framework = options.framework || 'web';
43
- const templatesDir = adapters_1.adapterRegistry.getAdapter(framework).templatesDir;
43
+ const adapter = adapters_1.adapterRegistry.getAdapter(framework);
44
+ const templatesDir = adapter.templatesDir;
45
+ // The platform gate keys on the ADAPTER, not on the requested framework name: 'mobile' and
46
+ // 'appium' are aliases of the same adapter, so asking the adapter itself keeps one source of
47
+ // truth as more aliases appear.
48
+ this.adapterName = adapter.frameworkName;
49
+ this.platform = adapter.frameworkName === 'appium' ? 'mobile' : 'web';
44
50
  this.templateEngine = new template_engine_1.TemplateEngine(templatesDir);
45
51
  this.patternRegistry = new patterns_1.PatternRegistry();
46
52
  this.selectorResolver = new selector_resolver_1.SelectorResolver(undefined, options.screenName);
@@ -144,6 +150,28 @@ class StepMapper {
144
150
  if (keyword === 'Given' || keyword === 'When' || keyword === 'Then') {
145
151
  this.lastPrimaryKeyword = keyword;
146
152
  }
153
+ // SG-W015 — `see [X] card with {{n}}` where n is a bare number compiles to a TEXT
154
+ // assertion (toHaveText('3')), not a count. An author reaching for "3 cards are shown"
155
+ // gets an assertion that can only pass if the card's TEXT is the digit — a wrong test
156
+ // with no error. Count semantics live on row/table ("see [T] table with {{n}}",
157
+ // "see [Ref] row with {{n}}") and lists ("should have count"); on the container types
158
+ // below, a bare-number text expectation is almost never what the author meant. A text
159
+ // element asserting a numeric readout ("[Row Quantity] text with 4") stays silent.
160
+ const COUNT_MISREAD_TYPES = new Set(['card', 'item', 'items', 'cards', 'option', 'options']);
161
+ if (this.diagnostics && step.dataRef && step.selectorRef &&
162
+ COUNT_MISREAD_TYPES.has((step.elementType || '').toLowerCase()) &&
163
+ /\bsees?\s+\[/.test(step.text) && /\bwith\b/.test(step.text)) {
164
+ // peekBaseValue reads the literal from test-data even in runtime-data mode,
165
+ // where resolveData returns an opaque marker (never numeric-looking).
166
+ let resolvedValue;
167
+ try {
168
+ resolvedValue = this.dataResolver.peekBaseValue(step.dataRef, this.featureName);
169
+ }
170
+ catch { /* unresolved at compile time → cannot judge */ }
171
+ if (resolvedValue !== undefined && /^\d+$/.test(resolvedValue.trim())) {
172
+ this.diagnostics.add('SG-W015', `\`see [${step.selectorRef}] ${step.elementType} with {{${step.dataRef}}}\` compiles to a TEXT assertion toHaveText('${resolvedValue.trim()}'), NOT a count of ${step.elementType}s. For a count use \`see [Ref] row with {{n}}\` / \`see [T] table with {{n}}\` (or a list "should have count"); if '${resolvedValue.trim()}' really is the ${step.elementType}'s text, assert it on a text/label element instead`, { feature: this.featureName, step: step.text });
173
+ }
174
+ }
147
175
  // SG-W007 — a two-step-form browser-alert handler (`click [OK] alert`) written AFTER
148
176
  // an action step registers its page.once('dialog') listener too late: a dialog
149
177
  // triggered by the earlier action auto-dismisses with no error (issue #472).
@@ -176,10 +204,12 @@ class StepMapper {
176
204
  (step.elementType === 'frame' || step.elementType === 'iframe')) {
177
205
  const selectorRef = step.selectorRef || '';
178
206
  if (selectorRef.toLowerCase() === 'main') {
179
- // Exit frame scope
207
+ // Exit frame scope — routed through the adapter (C1): the Appium twin performs the
208
+ // real webview→native context switch; a bare comment here would silently no-op on mobile.
180
209
  this.inFrameScope = false;
181
210
  this.templateEngine.setBaseContext({ inFrame: false });
182
- return { code: '// Back to main page context', comment: 'Exit frame scope' };
211
+ const code = this.templateEngine.renderStep('frame-exit-action', {});
212
+ return { code, comment: 'Exit frame scope' };
183
213
  }
184
214
  // Enter frame scope
185
215
  this.inFrameScope = true;
@@ -192,13 +222,16 @@ class StepMapper {
192
222
  // Use selectorRef as-is
193
223
  }
194
224
  this.templateEngine.setBaseContext({ inFrame: true, frameSelector });
195
- const code = `const frame = page.frameLocator('${frameSelector}');`;
225
+ // C1 routed through the adapter instead of building `page.frameLocator(...)` inline:
226
+ // the Appium adapter's own template performs its webview-context switch instead.
227
+ const code = this.templateEngine.renderStep('frame-enter-action', { frameSelector });
196
228
  return { code, comment: `Switch to ${selectorRef} frame` };
197
229
  }
198
230
  // Dialog scope directives — intercept before pattern matching
199
231
  if (/\buse dialog\b/i.test(step.text)) {
200
232
  this.inDialogScope = true;
201
233
  this.templateEngine.setBaseContext({ inDialog: true });
234
+ this.warnDialogScopeIgnoredOnMobile(step);
202
235
  return { code: '', comment: 'Enter dialog scope' };
203
236
  }
204
237
  if (/\b(?:close|dismiss|exit)\s+dialog\b/i.test(step.text)) {
@@ -209,6 +242,7 @@ class StepMapper {
209
242
  // Given User is on [...] dialog — set dialog scope (3 cases)
210
243
  if (step.text.includes('is on') && step.elementType === 'dialog') {
211
244
  this.inDialogScope = true;
245
+ this.warnDialogScopeIgnoredOnMobile(step);
212
246
  // setBaseContext MERGES — clear every root key so a previous dialog scope in the
213
247
  // same scenario cannot leak its root into this one.
214
248
  const contextVars = {
@@ -294,6 +328,7 @@ class StepMapper {
294
328
  console.log(` ✓ Pattern matched: ${step.text.substring(0, 50)}...`);
295
329
  }
296
330
  this.checkDataRefConsumed(step, mappedStep);
331
+ this.checkPageAssertionNoOpOnMobile(step, mappedStep);
297
332
  this.checkPageAssertionFallback(step, mappedStep);
298
333
  this.checkDeclaredUrlHasNoQuery(step, mappedStep);
299
334
  return mappedStep;
@@ -453,6 +488,11 @@ class StepMapper {
453
488
  * includeHidden + visible filter: when a modal (e.g. Radix Dialog) is open the
454
489
  * background gets aria-hidden="true", which empties plain getByRole() even though
455
490
  * the cells are still rendered — measure what the user SEES, not the a11y tree.
491
+ *
492
+ * C2 — this method used to build the Playwright code string itself (referencing `tableRow`,
493
+ * a binding that only exists in the Playwright output). It now only gathers data and routes
494
+ * through the adapter template; the Appium twin throws (HTML table roles), matching the
495
+ * `table-*` house style.
456
496
  */
457
497
  generateRowScopedColumnAssertion(step) {
458
498
  const columnRef = step.selectorRef || '';
@@ -472,26 +512,9 @@ class StepMapper {
472
512
  }
473
513
  }
474
514
  const isGiven = this.lastPrimaryKeyword === 'Given';
475
- const escapedValue = cellValue.replace(/'/g, "\\'");
476
- let code;
477
- if (columnIndex !== undefined) {
478
- // Exact cell: nth(index) + toHaveText
479
- if (isGiven) {
480
- code = `await expect(tableRow.getByRole('cell', { includeHidden: true }).filter({ visible: true }).nth(${columnIndex})).toHaveText('${escapedValue}');`;
481
- }
482
- else {
483
- code = `await expect(tableRow.getByRole('cell', { includeHidden: true }).filter({ visible: true }).nth(${columnIndex})).toHaveText('${escapedValue}');`;
484
- }
485
- }
486
- else {
487
- // Fallback: filter by text
488
- if (isGiven) {
489
- code = `await tableRow.getByRole('cell', { includeHidden: true }).filter({ hasText: '${escapedValue}' }).filter({ visible: true }).waitFor();`;
490
- }
491
- else {
492
- code = `await expect(tableRow.getByRole('cell', { includeHidden: true }).filter({ hasText: '${escapedValue}' }).filter({ visible: true })).toBeVisible();`;
493
- }
494
- }
515
+ const code = this.templateEngine.renderStep('row-scoped-column-assertion', {
516
+ columnIndex, cellValue, isGiven,
517
+ });
495
518
  return {
496
519
  code,
497
520
  comment: `${isGiven ? 'Wait' : 'Assert'} ${columnRef} column = ${step.dataRef}`,
@@ -500,6 +523,56 @@ class StepMapper {
500
523
  /**
501
524
  * Create pattern context for generators
502
525
  */
526
+ /**
527
+ * SG-W022 — a `page` assertion that emitted no executable code on mobile.
528
+ *
529
+ * A native app has no URL, so the Appium `page-assertion` template is a bare comment. The step
530
+ * therefore READS as an assertion and checks nothing: the scenario passes whatever the app is
531
+ * showing. That is strictly worse than the missing-template crashes this pass closed — a crash is
532
+ * visible on the first run, a false pass hides until someone trusts it. (Its `is on [X] page` twin
533
+ * routes to `route-assertion`, which throws loudly; only this half was silent.)
534
+ *
535
+ * Keyed on the EMITTED CODE rather than on a template name, so any future page-assertion path
536
+ * that degrades to a comment is caught by the same check without being enumerated here. Scoped to
537
+ * the `see` form: the `is on` twin is mobile's app-launch directive, whose empty output is right.
538
+ */
539
+ checkPageAssertionNoOpOnMobile(step, mapped) {
540
+ if (this.platform !== 'mobile' || !this.diagnostics)
541
+ return;
542
+ if (step.elementType !== 'page')
543
+ return;
544
+ // Only the ASSERTION form. `Given User is on [X] page` is the app-LAUNCH directive on mobile —
545
+ // it emits a comment because wdio capabilities already launched the app, which is correct and
546
+ // must not be warned about. `Then User see [X] page` is the one that claims to check something.
547
+ if (!/\bsees?\b/i.test(step.text))
548
+ return;
549
+ // Strip comments; whatever remains is what actually runs. Block comments are handled as well as
550
+ // line ones: a template written with `/* … */` would otherwise read as executable code and
551
+ // silently defeat this check — the diagnostic would go quiet exactly when it was needed.
552
+ const executable = (mapped.code || '')
553
+ .replace(/\/\*[\s\S]*?\*\//g, '')
554
+ .split('\n')
555
+ .map((l) => l.replace(/\/\/.*$/, '').trim())
556
+ .filter(Boolean)
557
+ .join('');
558
+ if (executable)
559
+ return;
560
+ this.diagnostics.add('SG-W022', 'a native app has no URL, so this page assertion compiled to a COMMENT — it asserts nothing and the scenario passes regardless. Assert a marker that is actually on the screen instead (`Then User see [Some Element] ...`), or tag the scenario @manual', { feature: this.featureName, step: step.text });
561
+ }
562
+ /**
563
+ * SG-W021 — dialog scope is a no-op on the Appium adapter.
564
+ *
565
+ * `setBaseContext({ inDialog: true })` records the scope faithfully, and every Playwright locator
566
+ * partial consults it. No Appium template does. So on mobile the step reads as "narrow everything
567
+ * that follows to this dialog" and in fact narrows nothing — the following steps search the whole
568
+ * screen. Scope that is silently discarded is what produced this entire defect class, so it is
569
+ * reported rather than left to be discovered from a passing test.
570
+ */
571
+ warnDialogScopeIgnoredOnMobile(step) {
572
+ if (this.platform !== 'mobile')
573
+ return;
574
+ this.diagnostics?.add('SG-W021', 'dialog scope has no effect on the mobile adapter — no Appium template reads `inDialog`, so the following steps resolve against the whole screen, not the dialog. Scope the elements themselves instead (a `scope: dialog` entry, or accessibility-ids unique to the dialog)', { feature: this.featureName, step: step.text });
575
+ }
503
576
  createPatternContext() {
504
577
  return {
505
578
  stepCounter: this.stepCounter,
@@ -512,6 +585,9 @@ class StepMapper {
512
585
  dataResolver: this.dataResolver,
513
586
  renderLocator: (resolved) => this.templateEngine.renderStep('locator', resolved),
514
587
  appProfile: this.appProfile,
588
+ platform: this.platform,
589
+ adapterName: this.adapterName,
590
+ diagnostics: this.diagnostics,
515
591
  baseURL: this.baseURL,
516
592
  featureName: this.featureName,
517
593
  screenName: this.screenName,
@@ -1 +1 @@
1
- {"version":3,"file":"step-mapper.js","sourceRoot":"","sources":["../../../src/generators/test-generator/step-mapper.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AACnD,yCAA6C;AAC7C,yCAA6D;AAC7D,iEAA6D;AAC7D,yDAAqD;AAErD,+CAAmE;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AC/B,aAAa,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC;YAChF,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW,EAAG,gCAAgC;YAChE,aAAa,EAAE,IAAI,CAAC,oBAAoB,IAAI,EAAE,EAAG,yCAAyC;YAC1F,gBAAgB,EAAE,IAAI,CAAC,kBAAkB;SAC1C,CAAC;IACJ,CAAC;;AAnnBH,gCAqnBC;AAxPC;6EAC6E;AACrD,iCAAsB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,AAAtE,CAAuE"}
@@ -1,4 +1,5 @@
1
1
  import { ViewpointBaseline } from './viewpoint-baseline';
2
+ import { FlowQualityResult } from './flow-contract';
2
3
  import { GateResult, DepthResult, BalanceResult, DuplicateResult, TraceResult, ClaimProofResult, TaxonomyResult, AutomatableManualResult, FlowDepthResult, OracleStrengthResult } from './sensors';
3
4
  import { IntentProfile } from './intent';
4
5
  import { Provenance } from './provenance';
@@ -23,6 +24,7 @@ export interface AuditReport {
23
24
  oracle: OracleStrengthResult;
24
25
  ledger: LedgerResult;
25
26
  viewpointBaseline: ViewpointBaseline;
27
+ flowQuality?: FlowQualityResult;
26
28
  calibration: {
27
29
  axes: Record<string, number>;
28
30
  weakest: {
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/harness/audit.ts"],"names":[],"mappings":"AAWA,O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EAAE,UAAU,EAAE,MAAM,GAAG,WAAW,CAyd3E"}
@@ -49,6 +49,7 @@ const path = __importStar(require("path"));
49
49
  const fs = __importStar(require("fs"));
50
50
  const parse_1 = require("./parse");
51
51
  const viewpoint_baseline_1 = require("./viewpoint-baseline");
52
+ const flow_contract_1 = require("./flow-contract");
52
53
  const unit_paths_1 = require("./unit-paths");
53
54
  const sensors_1 = require("./sensors");
54
55
  const flow_check_1 = require("./flow-check");
@@ -139,13 +140,26 @@ function runAudit(screenDir, screenName) {
139
140
  // back to the in-core functions if the capability provides none.
140
141
  // A capability gate may need project context (the API gate resolves endpoint methods from the
141
142
  // catalog) + the focus depth threshold (so it scores depth with the SAME bar as the UI gate).
142
- const capGate = scoringCap?.gateProvider;
143
- const provided = capGate?.({ scenarios, viewpoints, catalog, focus: intent.focus, cwd: (0, intent_1.projectRootFromScreenDir)(screenDir), screenName: catalogScreenName, threshold: (0, sensors_1.depthThresholdFor)(intent.focus), businessCriticalMethods: intent.businessCriticalMethods });
144
143
  // Is the declaration this suite is measured against still the one a human accepted?
145
144
  const viewpointBaseline = (0, viewpoint_baseline_1.checkViewpointBaseline)((0, intent_1.projectRootFromScreenDir)(screenDir), catalogScreenName, viewpointPath);
146
145
  const viewpointText = fs.existsSync(viewpointPath) ? (0, read_text_1.readTextFile)(viewpointPath) : '';
147
- const gate = provided?.gate ?? (0, sensors_1.viewpointGate)(scenarios, viewpoints, catalog, platform === 'mobile', viewpointText);
148
- const depth = provided?.depth ?? (0, sensors_1.assertionDepth)(scenarios, (0, sensors_1.dataThemesFor)(catalog, gate.pageType), intent.focus);
146
+ // #569 a flow WITH a contract is measured against ITS declaration, not a screen's.
147
+ // Keyword page-type detection force-fit flows into screen checklists (a registration
148
+ // flow judged as a `form` screen scored coverage 0%), so for contract-holding flows the
149
+ // page-type machinery only applies when the project DECLARED a page type explicitly.
150
+ // The stripped catalog feeds the CAPABILITY gate too — driver-ui provides the gate on
151
+ // real projects, and handing it the unstripped catalog re-introduced the force-fit.
152
+ const isUiFlowUnit = /^flows\//.test(catalogScreenName);
153
+ const flowQ = isUiFlowUnit
154
+ ? (0, flow_contract_1.flowQuality)(screenDir, scenarios)
155
+ : { hasContract: false, errors: [], outcomeProven: false, outcomeManualOnly: false, offGoal: [], offGoalRatio: 0, offGoalCategories: [], phases: [], phaseRatio: 1, handoffs: { total: 0, asserted: 0, ratio: 1 }, sit: [] };
156
+ const gateCatalog = (flowQ.hasContract && !(0, sensors_1.declaredPageType)(viewpointText, catalog))
157
+ ? { ...catalog, page_types: {} }
158
+ : catalog;
159
+ const capGate = scoringCap?.gateProvider;
160
+ const provided = capGate?.({ scenarios, viewpoints, catalog: gateCatalog, focus: intent.focus, cwd: (0, intent_1.projectRootFromScreenDir)(screenDir), screenName: catalogScreenName, threshold: (0, sensors_1.depthThresholdFor)(intent.focus), businessCriticalMethods: intent.businessCriticalMethods });
161
+ const gate = provided?.gate ?? (0, sensors_1.viewpointGate)(scenarios, viewpoints, gateCatalog, platform === 'mobile', viewpointText);
162
+ const depth = provided?.depth ?? (0, sensors_1.assertionDepth)(scenarios, (0, sensors_1.dataThemesFor)(gateCatalog, gate.pageType), intent.focus);
149
163
  // TQ-4 — deferral-aware coverage credit: an inherently cross-screen theme (cart / detail /
150
164
  // filter correctness) belongs in a FLOW, not on the screen. When a flow deeply covers a screen
151
165
  // gate gap, credit it to the flow instead of double-counting it as a screen gap. Screens only
@@ -185,8 +199,15 @@ function runAudit(screenDir, screenName) {
185
199
  // collection, the regression dimensions (count/quantity proof · teardown · multi-source) cap the
186
200
  // businessDepth headroom: it can reach 1.0 only when all three are exercised, so a present-but-
187
201
  // shallow flow can't claim a perfect score (floor 0.5 — assertion depth still dominates).
188
- const isUiFlow = /^flows\//.test(catalogScreenName);
189
- const flowDepth = isUiFlow ? (0, sensors_1.flowRegressionDepth)(scenarios) : { stateful: false, countProof: false, teardown: false, multiSource: false, ratio: 1, missing: [] };
202
+ const isUiFlow = isUiFlowUnit;
203
+ let flowDepth = isUiFlow ? (0, sensors_1.flowRegressionDepth)(scenarios) : { stateful: false, countProof: false, teardown: false, multiSource: false, ratio: 1, missing: [] };
204
+ // Contract-declared statefulness generalizes the cart-hardcoded vocabulary: a flow that
205
+ // mutates ANY named collection (order, application, submission …) gets the same three
206
+ // regression dims. The legacy cart detection stays for contract-less flows (snapshots).
207
+ if (isUiFlow && !flowDepth.stateful && flowQ.contract?.stateful) {
208
+ const d = (0, flow_contract_1.statefulDepthFor)(flowQ.contract.stateful, scenarios);
209
+ flowDepth = { stateful: true, countProof: d.countProof, teardown: d.teardown, multiSource: d.multiSource, ratio: d.ratio, missing: d.missing };
210
+ }
190
211
  const FLOW_DEPTH_FLOOR = 0.5;
191
212
  // H4 — oracle strength: a weak facet oracle (name-substring "proves" category/brand membership)
192
213
  // caps businessDepth the same way (floor 0.5). A suite with no facet claim, or a strong oracle, is
@@ -195,7 +216,10 @@ function runAudit(screenDir, screenName) {
195
216
  const ORACLE_FLOOR = 0.5;
196
217
  // Sub-scores
197
218
  const coverage = gate.coverageRatio;
198
- const businessDepth = Math.min(depth.bcDepthRatio, flowDepth.stateful ? FLOW_DEPTH_FLOOR + (1 - FLOW_DEPTH_FLOOR) * flowDepth.ratio : 1, oracle.weak.length ? ORACLE_FLOOR + (1 - ORACLE_FLOOR) * oracle.ratio : 1);
219
+ // #569 handoff integrity: a flow's depth is also whether each cross-screen transition
220
+ // is followed by an assertion on the carried state (same floor discipline as the other caps).
221
+ const HANDOFF_FLOOR = 0.5;
222
+ const businessDepth = Math.min(depth.bcDepthRatio, flowDepth.stateful ? FLOW_DEPTH_FLOOR + (1 - FLOW_DEPTH_FLOOR) * flowDepth.ratio : 1, oracle.weak.length ? ORACLE_FLOOR + (1 - ORACLE_FLOOR) * oracle.ratio : 1, flowQ.hasContract && flowQ.handoffs.total > 0 ? HANDOFF_FLOOR + (1 - HANDOFF_FLOOR) * flowQ.handoffs.ratio : 1);
199
223
  // When the taxonomy drifted (most scenarios unclassified), the balance axis is unreliable — cap it
200
224
  // at 0.5 instead of awarding a vacuous 1.0 so a stale taxonomy fails loudly, not silently (H1).
201
225
  const balanceScore = balance.unclassifiedRatio > 0.4
@@ -225,8 +249,15 @@ function runAudit(screenDir, screenName) {
225
249
  // what a create-test run did, silently dropping the performance viewpoint on
226
250
  // the way. While the declaration is unconfirmed, neither axis is evidence.
227
251
  const viewpointMoved = viewpointBaseline.status === 'changed';
252
+ // 4. A flow with a contract is measured on ITS coverage: journey phases (HP/ER/EH
253
+ // automated) — not a screen's page-type themes. Same weight, same criticality,
254
+ // so a flow can finally EARN the coverage axis instead of always losing it to
255
+ // PAGE-TYPE-UNDETERMINED (or worse, being judged against a form checklist).
256
+ const flowScored = flowQ.hasContract;
228
257
  const axisDefs = [
229
- { key: 'coverage', value: coverage, weight: 0.22, applicable: !!gate.pageType && gate.themesTotal > 0, critical: true },
258
+ flowScored
259
+ ? { key: 'flowCoverage', value: flowQ.phaseRatio, weight: 0.22, applicable: true, critical: true }
260
+ : { key: 'coverage', value: coverage, weight: 0.22, applicable: !!gate.pageType && gate.themesTotal > 0, critical: true },
230
261
  { key: 'specFR', value: specRatio, weight: 0.15, applicable: spec.hasSpec && spec.frTotal > 0, critical: true },
231
262
  { key: 'atomicLedger', value: ledger.ratio, weight: 0.13, applicable: ledger.hasViewpoint && ledger.total > 0 && !viewpointMoved, critical: true },
232
263
  { key: 'businessDepth', value: businessDepth, weight: 0.20, applicable: true, critical: true },
@@ -277,9 +308,49 @@ function runAudit(screenDir, screenName) {
277
308
  ].filter(Boolean).join(', ');
278
309
  findings.push(`VIEWPOINT-BASELINE-CHANGED: test-viewpoint.md no longer declares what it did when this unit was last accepted — ${moved || 'the declared ids were reordered or replaced'}. atomicLedger + traceability measure the suite AGAINST this file, so they are excluded from the score until the change is confirmed: a generator that rewrites the declaration scores both 100% by construction, and a viewpoint dropped from the file stops being missing from anything. Review the diff (a removed id means that coverage is now unclaimed), then run \`sungen audit --screen ${screenName} --accept-viewpoint\`.`);
279
310
  }
280
- if (gate.pageTypeSource === 'undetermined') {
311
+ // On a contract flow the page type is INTENTIONALLY not applied — the contract is the checklist.
312
+ if (gate.pageTypeSource === 'undetermined' && !flowScored) {
281
313
  findings.push(`PAGE-TYPE-UNDETERMINED: no page type fits this screen with enough confidence (best ${gate.pageTypeEvidence?.hits ?? 0} keyword hit(s)), so NO critical themes were demanded and the coverage axis is excluded from the score — declare it in test-viewpoint.md (\`page-type: <id>\`) to have the theme checklist applied.`);
282
314
  }
315
+ // ---- #569: flow-quality findings -----------------------------------------
316
+ if (isUiFlow && !flowQ.hasContract) {
317
+ const why = flowQ.errors.length ? ` (${flowQ.errors.join('; ')})` : '';
318
+ findings.push(`FLOW-CONTRACT-MISSING: this flow declares no contract${why} — without \`requirements/flow-contract.yaml\` (goal · trigger · outcome.screen · phases) the flow cannot be scored on ITS coverage (journey phases) and falls back to screen machinery. Author it with the boundary checklist: one business goal, a clear trigger, ONE observable outcome valuable to the actor, name = "Verb + outcome"; split anything that forms an independently valuable flow.`);
319
+ }
320
+ if (flowQ.hasContract) {
321
+ if (!flowQ.outcomeProven) {
322
+ findings.push(flowQ.outcomeManualOnly
323
+ ? `FLOW-OUTCOME-UNPROVEN: the goal "${flowQ.contract.goal}" is covered only by @manual scenarios — the flow's own outcome (\`${flowQ.contract.outcome.screen}\`) has no AUTOMATED data assertion, so a regression run cannot prove the journey still works. Automate the happy-path proof first; it is the reason this flow exists.`
324
+ : `FLOW-OUTCOME-UNPROVEN: no scenario asserts data on the outcome screen \`${flowQ.contract.outcome.screen}\` — the flow never proves its own goal ("${flowQ.contract.goal}"). Add the happy-path scenario that ends in the declared final assertion.`);
325
+ }
326
+ if (flowQ.offGoalRatio > 0.35) {
327
+ findings.push(`FLOW-SCOPE-CREEP: ${flowQ.offGoal.length}/${scenarios.length} scenarios never touch the outcome screen \`${flowQ.contract.outcome.screen}\` and are not guards/error-recovery (categories: ${flowQ.offGoalCategories.join(', ')}) — evidence of a SECOND business goal in this flow. Split them into their own flow (one flow = one goal, one observable outcome).`);
328
+ }
329
+ for (const ph of flowQ.phases.filter((p) => !p.covered || !p.automated)) {
330
+ findings.push(`FLOW-PHASE-${ph.phase}-MISSING: journey phase ${ph.phase} (${ph.phase === 'HP' ? 'happy path proving the outcome' : ph.phase === 'ER' ? 'error recovery — validation must not trap the journey' : 'guards — direct access / back / refresh'}) is ${ph.covered ? 'covered only by @manual' : 'not covered'} → it does not count toward flowCoverage until automated.`);
331
+ }
332
+ // #580 P10 — the QA matrix keeps System INTEGRATION cases (external-system legs)
333
+ // separate, and holds their exit criteria open while they are mock-verified only.
334
+ for (const x of flowQ.sit.filter((v) => v.mockOnly).slice(0, 4)) {
335
+ findings.push(`SIT-MOCK-ONLY: "${x.name}" touches the external system "${x.external}" but is verified only against mocks — Pass (Mocked) says nothing about the real vendor behaviour. Re-verify on the real dependency before calling it Done (the delivery's External Dependency Tracking table holds the checklist).`);
336
+ }
337
+ // #580 P9 — a release-critical flow must carry its Final-Inspection selection.
338
+ if (flowQ.contract.golden && !/@golden\b/i.test(featureText)) {
339
+ findings.push(`GOLDEN-MISSING: the contract declares \`golden: true\` (release-critical) but no scenario is tagged @golden — Final Inspection (\`sungen inspect\`) will have nothing to run for this flow. Tag the happy-path scenario(s) that prove the outcome.`);
340
+ }
341
+ if (flowQ.handoffs.total > 0 && flowQ.handoffs.ratio < 0.7) {
342
+ findings.push(`FLOW-HANDOFF-SHALLOW: only ${flowQ.handoffs.asserted}/${flowQ.handoffs.total} cross-screen transitions are followed by an assertion in the new screen — carried state (the thing a flow exists to verify) is unproven at the handoff. businessDepth is capped until asserted.`);
343
+ }
344
+ }
345
+ if (isUiFlow) {
346
+ // Flows defer more than screens, so an UNCODED @manual is costlier here: the capability
347
+ // planner cannot route it to the driver that would automate it (password-reset: 11/22
348
+ // manual, most of them M5-inbox — invisible while tagged bare).
349
+ const bareManual = (featureText.match(/@manual(?![:\w])/g) || []).length;
350
+ if (bareManual > 0) {
351
+ findings.push(`MANUAL-CODE-MISSING: ${bareManual} @manual tag(s) carry no reason code — tag @manual:M1..M9 (M5 = external dependency e.g. inbox, M3 = mock/network, M7 = environment) so the capability planner can route what a driver would automate.`);
352
+ }
353
+ }
283
354
  for (const c of flowCredits) {
284
355
  findings.push(`COVERED-VIA-FLOW: critical theme "${c.theme}" is not covered on this screen but is deeply covered by flow "${c.flow}" — cross-screen depth correctly owned by the flow, so it is credited (not a screen gap). Verify with \`sungen flow-check\`.`);
285
356
  }
@@ -298,7 +369,7 @@ function runAudit(screenDir, screenName) {
298
369
  if (depth.businessCriticalShallow > 0) {
299
370
  const tag = depth.verdict === 'fail' ? 'DEPTH-FAIL' : depth.verdict === 'warn' ? 'DEPTH-WARN' : 'DEPTH';
300
371
  findings.push(`${tag}: ${depth.businessCriticalShallow}/${depth.businessCriticalTotal} data-correctness scenarios assert only visibility ` +
301
- `(ratio ${depth.bcDepthRatio.toFixed(2)} < threshold ${depth.threshold.toFixed(2)} for focus "${depth.focus}") → ` +
372
+ `(ratio ${depth.bcDepthRatio.toFixed(2)} ${depth.bcDepthRatio < depth.threshold ? '<' : '≥'} threshold ${depth.threshold.toFixed(2)} for focus "${depth.focus}"${depth.bcDepthRatio < depth.threshold ? '' : ' — the gate holds; these are the remaining deepen-targets'}) → ` +
302
373
  `add data assertions (\`... with {{value}}\`, \`see all ... contain {{v}}\`) or, if cross-screen, defer to a flow with @manual + reason.`);
303
374
  }
304
375
  // H5 — state isolation: a @parallel stateful flow that mutates the cart needs per-scenario
@@ -356,6 +427,13 @@ function runAudit(screenDir, screenName) {
356
427
  const shown = spec.inferredOnly.slice(0, 8).join(', ');
357
428
  findings.push(`SPEC-TRACE-IMPLICIT: ${spec.inferredOnly.length} requirement(s) are covered by keyword inference only (${shown}${spec.inferredOnly.length > 8 ? ', …' : ''}) — add \`@spec:<id>\` to the scenario that proves each so the trace survives edits and delivery can report it.`);
358
429
  }
430
+ // Safety net for the parser (#572): the feature CITES requirement ids the spec parser
431
+ // could not find a declaration for. Silence here would repeat the original failure —
432
+ // "nothing found" quietly excluding the specFR axis while the evidence sits in the file.
433
+ if (spec.hasSpec && spec.frTotal === 0 && /@spec:/i.test(featureText)) {
434
+ const cited = [...new Set([...featureText.matchAll(/@spec:([A-Za-z0-9.-]+)/g)].map((m) => m[1].toUpperCase()))];
435
+ findings.push(`SPEC-IDS-UNPARSED: the feature cites ${cited.length} requirement id(s) via @spec: (${cited.slice(0, 5).join(', ')}${cited.length > 5 ? ', …' : ''}) but requirements/spec.md yielded ZERO parseable requirement declarations — the spec likely declares ids in a scheme the parser cannot read. Declare each requirement on its own line as \`<ID>: <clause>\` (bullet/bold/backtick all fine; the id must end in a number) so the MUST-coverage gate and the specFR axis can run.`);
436
+ }
359
437
  if (taxonomyMismatch) {
360
438
  findings.push(`VP-TAXONOMY-MISMATCH: only ${(trace.mappedRatio * 100).toFixed(0)}% of scenarios use the viewpoint IDs declared in test-viewpoint.md — scenarios invented a generic VP-<CAT> scheme. Re-tag to the project's viewpoint IDs so the coverage matrix is accurate.`);
361
439
  }
@@ -409,6 +487,18 @@ function runAudit(screenDir, screenName) {
409
487
  for (const d of ownership.duplicates.slice(0, 6)) {
410
488
  findings.push(`DUPLICATE-FLOW-OWNERSHIP: "${d.scenario}" has the same shape as a scenario in flow "${d.flow}" — keep one owner (screen-local vs flow); the other should only reference/set up.`);
411
489
  }
490
+ // #580 — the flow→screen half of the ownership rule (ISTQB system-test design:
491
+ // representative, not exhaustive). A flow's cases take ONE representative input per
492
+ // branch — one valid value on the main flow, one error value that triggers the
493
+ // exception flow. An EP/data-family cluster (≥3 same-shape scenarios differing only
494
+ // in data) inside a FLOW is the screen's validation matrix being re-run where it
495
+ // does not belong: the screen already proved the field rejects each class; the flow
496
+ // only has to prove the journey survives one of them. Advisory — never a gate.
497
+ if (isUiFlow) {
498
+ for (const c of duplicates.clusters.filter((x) => !x.sameDataLikely && x.scenarios.length >= 3).slice(0, 4)) {
499
+ findings.push(`FLOW-EXHAUSTIVE-INPUTS: ${c.scenarios.length} same-shape scenarios differ only in data (${c.scenarios.slice(0, 3).join(' | ')}${c.scenarios.length > 3 ? ' …' : ''}) — a system-test flow uses REPRESENTATIVE inputs (one valid + one that triggers the exception branch); the full EP/boundary matrix belongs to the owning screen (or a @cases dataset there). Keep one representative per branch here.`);
500
+ }
501
+ }
412
502
  for (const u of unsourced.slice(0, 6)) {
413
503
  findings.push(`UNSOURCEABLE-SCENARIO: "${u}" doesn't trace to any FR / viewpoint item — link it to a source, or tag it @exploration (not part of the official suite).`);
414
504
  }
@@ -461,6 +551,7 @@ function runAudit(screenDir, screenName) {
461
551
  scenarioCount: scenarios.length,
462
552
  gate, depth, claim, taxonomy, balance, duplicates, trace, spec,
463
553
  taxonomyMismatch, downstream, manualOracle: manualOracleResult, automatableManual: autoManual, flowDepth, oracle, ledger, viewpointBaseline, calibration,
554
+ ...(isUiFlow ? { flowQuality: flowQ } : {}),
464
555
  score: {
465
556
  overall: Math.round(overall * 10) / 10,
466
557
  coverage: Math.round(coverage * 100) / 100,