@sun-asterisk/sungen 3.2.32 → 3.2.34-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/audit.d.ts +5 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +64 -11
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +40 -18
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/changed.d.ts.map +1 -1
- package/dist/cli/commands/changed.js +2 -3
- package/dist/cli/commands/changed.js.map +1 -1
- package/dist/cli/commands/dashboard.d.ts.map +1 -1
- package/dist/cli/commands/dashboard.js +2 -28
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/commands/defect.d.ts +7 -0
- package/dist/cli/commands/defect.d.ts.map +1 -0
- package/dist/cli/commands/defect.js +68 -0
- package/dist/cli/commands/defect.js.map +1 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +113 -59
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +14 -7
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/results-merge.d.ts +9 -0
- package/dist/cli/commands/results-merge.d.ts.map +1 -1
- package/dist/cli/commands/results-merge.js +9 -12
- package/dist/cli/commands/results-merge.js.map +1 -1
- package/dist/cli/commands/results-sanitize.d.ts.map +1 -1
- package/dist/cli/commands/results-sanitize.js +2 -13
- package/dist/cli/commands/results-sanitize.js.map +1 -1
- package/dist/cli/commands/select.d.ts +12 -0
- package/dist/cli/commands/select.d.ts.map +1 -0
- package/dist/cli/commands/select.js +122 -0
- package/dist/cli/commands/select.js.map +1 -0
- package/dist/cli/commands/triage.d.ts +7 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +98 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +3 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/viewpoint.d.ts +7 -0
- package/dist/cli/commands/viewpoint.d.ts.map +1 -0
- package/dist/cli/commands/viewpoint.js +70 -0
- package/dist/cli/commands/viewpoint.js.map +1 -0
- package/dist/cli/index.js +13 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
- package/dist/dashboard/snapshot-builder.js +6 -10
- package/dist/dashboard/snapshot-builder.js.map +1 -1
- package/dist/dashboard/templates/index.html +1 -1
- package/dist/dashboard/types.d.ts +1 -0
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.d.ts +4 -0
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +12 -11
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +29 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +44 -1
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/json-exporter.d.ts.map +1 -1
- package/dist/exporters/json-exporter.js +7 -0
- package/dist/exporters/json-exporter.js.map +1 -1
- package/dist/exporters/locale-variants.d.ts +7 -1
- package/dist/exporters/locale-variants.d.ts.map +1 -1
- package/dist/exporters/locale-variants.js +23 -16
- package/dist/exporters/locale-variants.js.map +1 -1
- package/dist/exporters/manual-hybrid-oracle.d.ts +54 -0
- package/dist/exporters/manual-hybrid-oracle.d.ts.map +1 -0
- package/dist/exporters/manual-hybrid-oracle.js +114 -0
- package/dist/exporters/manual-hybrid-oracle.js.map +1 -0
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +68 -19
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.d.ts +89 -0
- package/dist/exporters/matrix/carry-manual-results.d.ts.map +1 -0
- package/dist/exporters/matrix/carry-manual-results.js +302 -0
- package/dist/exporters/matrix/carry-manual-results.js.map +1 -0
- package/dist/exporters/matrix/export.d.ts +9 -1
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +21 -3
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/gates.js +6 -0
- package/dist/exporters/matrix/gates.js.map +1 -1
- package/dist/exporters/matrix/render-csv.js +1 -1
- package/dist/exporters/matrix/render-csv.js.map +1 -1
- package/dist/exporters/matrix/render-testcase-sheet.d.ts.map +1 -1
- package/dist/exporters/matrix/render-testcase-sheet.js +10 -4
- package/dist/exporters/matrix/render-testcase-sheet.js.map +1 -1
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
- package/dist/exporters/matrix/render-xlsx.js +3 -0
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +13 -1
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/matrix/wording.d.ts +8 -1
- package/dist/exporters/matrix/wording.d.ts.map +1 -1
- package/dist/exporters/matrix/wording.js +37 -2
- package/dist/exporters/matrix/wording.js.map +1 -1
- package/dist/exporters/playwright-report-parser.d.ts.map +1 -1
- package/dist/exporters/playwright-report-parser.js +1 -0
- package/dist/exporters/playwright-report-parser.js.map +1 -1
- package/dist/exporters/run-environment.d.ts +32 -0
- package/dist/exporters/run-environment.d.ts.map +1 -0
- package/dist/exporters/run-environment.js +125 -0
- package/dist/exporters/run-environment.js.map +1 -0
- package/dist/exporters/scenario-merger.d.ts +18 -0
- package/dist/exporters/scenario-merger.d.ts.map +1 -1
- package/dist/exporters/scenario-merger.js +49 -3
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/test-data-resolver.d.ts +0 -4
- package/dist/exporters/test-data-resolver.d.ts.map +1 -1
- package/dist/exporters/test-data-resolver.js +0 -7
- package/dist/exporters/test-data-resolver.js.map +1 -1
- package/dist/exporters/types.d.ts +5 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +2 -0
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +7 -2
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/generators/gherkin-parser/index.d.ts +11 -4
- package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
- package/dist/generators/gherkin-parser/index.js +49 -19
- package/dist/generators/gherkin-parser/index.js.map +1 -1
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts +4 -0
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +2 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +8 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +7 -3
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +68 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/click-select-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/select-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/label-value-assertion.hbs +7 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +8 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/pick-option.hbs +13 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +5 -1
- package/dist/generators/test-generator/adapters/playwright/templates/test-file.hbs +16 -0
- package/dist/generators/test-generator/code-generator.d.ts +2 -1
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +90 -5
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +36 -5
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +35 -4
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/index.d.ts +12 -2
- package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/index.js +15 -9
- package/dist/generators/test-generator/patterns/index.js.map +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts +15 -0
- package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/with-parent-scope.d.ts +5 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/with-parent-scope.js +6 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.js.map +1 -1
- package/dist/generators/test-generator/step-mapper.d.ts +46 -0
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +84 -9
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.d.ts +25 -0
- package/dist/generators/test-generator/utils/data-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.js +39 -8
- package/dist/generators/test-generator/utils/data-resolver.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-entry-fields.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-entry-fields.js +1 -0
- package/dist/generators/test-generator/utils/selector-entry-fields.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts +37 -4
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +212 -79
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts +3 -0
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +60 -19
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability.d.ts +7 -1
- package/dist/harness/capability.d.ts.map +1 -1
- package/dist/harness/capability.js +15 -12
- package/dist/harness/capability.js.map +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +5 -5
- package/dist/harness/config-file.d.ts +17 -0
- package/dist/harness/config-file.d.ts.map +1 -0
- package/dist/harness/config-file.js +100 -0
- package/dist/harness/config-file.js.map +1 -0
- package/dist/harness/counted-assertions.d.ts +2 -0
- package/dist/harness/counted-assertions.d.ts.map +1 -0
- package/dist/harness/counted-assertions.js +38 -0
- package/dist/harness/counted-assertions.js.map +1 -0
- package/dist/harness/data-driven-lint.d.ts.map +1 -1
- package/dist/harness/data-driven-lint.js +69 -27
- package/dist/harness/data-driven-lint.js.map +1 -1
- package/dist/harness/defect-draft.d.ts +14 -0
- package/dist/harness/defect-draft.d.ts.map +1 -0
- package/dist/harness/defect-draft.js +143 -0
- package/dist/harness/defect-draft.js.map +1 -0
- package/dist/harness/defects.d.ts +24 -0
- package/dist/harness/defects.d.ts.map +1 -0
- package/dist/harness/defects.js +118 -0
- package/dist/harness/defects.js.map +1 -0
- package/dist/harness/depth-lint.d.ts.map +1 -1
- package/dist/harness/depth-lint.js +2 -1
- package/dist/harness/depth-lint.js.map +1 -1
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +6 -2
- package/dist/harness/flow-check.js.map +1 -1
- package/dist/harness/keyword-match.d.ts +59 -0
- package/dist/harness/keyword-match.d.ts.map +1 -0
- package/dist/harness/keyword-match.js +86 -0
- package/dist/harness/keyword-match.js.map +1 -0
- package/dist/harness/manifest.d.ts.map +1 -1
- package/dist/harness/manifest.js +2 -2
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/next-step.d.ts +2 -4
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +50 -5
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts +45 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +142 -24
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/perf.d.ts +7 -1
- package/dist/harness/perf.d.ts.map +1 -1
- package/dist/harness/perf.js +13 -10
- package/dist/harness/perf.js.map +1 -1
- package/dist/harness/quality-gates.d.ts +9 -2
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +22 -8
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/query-catalog.js +0 -0
- package/dist/harness/query-catalog.js.map +1 -1
- package/dist/harness/read-text.d.ts +21 -0
- package/dist/harness/read-text.d.ts.map +1 -1
- package/dist/harness/read-text.js +32 -1
- package/dist/harness/read-text.js.map +1 -1
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +7 -1
- package/dist/harness/script-check.js.map +1 -1
- package/dist/harness/secret-scan.d.ts +27 -1
- package/dist/harness/secret-scan.d.ts.map +1 -1
- package/dist/harness/secret-scan.js +57 -4
- package/dist/harness/secret-scan.js.map +1 -1
- package/dist/harness/select-by-ids.d.ts +31 -0
- package/dist/harness/select-by-ids.d.ts.map +1 -0
- package/dist/harness/select-by-ids.js +106 -0
- package/dist/harness/select-by-ids.js.map +1 -0
- package/dist/harness/sensors.d.ts +20 -1
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +133 -39
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/spec-branches.d.ts +0 -18
- package/dist/harness/spec-branches.d.ts.map +1 -1
- package/dist/harness/spec-branches.js +24 -3
- package/dist/harness/spec-branches.js.map +1 -1
- package/dist/harness/spec-coverage.d.ts.map +1 -1
- package/dist/harness/spec-coverage.js +14 -4
- package/dist/harness/spec-coverage.js.map +1 -1
- package/dist/harness/triage-signals.d.ts +20 -0
- package/dist/harness/triage-signals.d.ts.map +1 -0
- package/dist/harness/triage-signals.js +30 -0
- package/dist/harness/triage-signals.js.map +1 -0
- package/dist/harness/triage-unit.d.ts +23 -0
- package/dist/harness/triage-unit.d.ts.map +1 -0
- package/dist/harness/triage-unit.js +142 -0
- package/dist/harness/triage-unit.js.map +1 -0
- package/dist/harness/triage.d.ts +28 -0
- package/dist/harness/triage.d.ts.map +1 -0
- package/dist/harness/triage.js +99 -0
- package/dist/harness/triage.js.map +1 -0
- package/dist/harness/ui-inventory.d.ts +40 -0
- package/dist/harness/ui-inventory.d.ts.map +1 -0
- package/dist/harness/ui-inventory.js +191 -0
- package/dist/harness/ui-inventory.js.map +1 -0
- package/dist/harness/viewpoint-baseline.d.ts.map +1 -1
- package/dist/harness/viewpoint-baseline.js +7 -1
- package/dist/harness/viewpoint-baseline.js.map +1 -1
- package/dist/harness/viewpoint-draft-header.d.ts +7 -0
- package/dist/harness/viewpoint-draft-header.d.ts.map +1 -0
- package/dist/harness/viewpoint-draft-header.js +100 -0
- package/dist/harness/viewpoint-draft-header.js.map +1 -0
- package/dist/harness/viewpoint-ledger.d.ts +13 -3
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +106 -19
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/harness/viewpoint-mode.d.ts +9 -0
- package/dist/harness/viewpoint-mode.d.ts.map +1 -0
- package/dist/harness/viewpoint-mode.js +52 -0
- package/dist/harness/viewpoint-mode.js.map +1 -0
- package/dist/harness/viewpoint-priority.d.ts +19 -0
- package/dist/harness/viewpoint-priority.d.ts.map +1 -0
- package/dist/harness/viewpoint-priority.js +36 -0
- package/dist/harness/viewpoint-priority.js.map +1 -0
- package/dist/harness/viewpoint-review-open.d.ts +6 -0
- package/dist/harness/viewpoint-review-open.d.ts.map +1 -0
- package/dist/harness/viewpoint-review-open.js +90 -0
- package/dist/harness/viewpoint-review-open.js.map +1 -0
- package/dist/harness/viewpoint-scan-refs.d.ts +50 -0
- package/dist/harness/viewpoint-scan-refs.d.ts.map +1 -0
- package/dist/harness/viewpoint-scan-refs.js +200 -0
- package/dist/harness/viewpoint-scan-refs.js.map +1 -0
- package/dist/harness/viewpoint-scan.d.ts +41 -0
- package/dist/harness/viewpoint-scan.d.ts.map +1 -0
- package/dist/harness/viewpoint-scan.js +118 -0
- package/dist/harness/viewpoint-scan.js.map +1 -0
- package/dist/harness/write-atomic.d.ts +2 -0
- package/dist/harness/write-atomic.d.ts.map +1 -0
- package/dist/harness/write-atomic.js +62 -0
- package/dist/harness/write-atomic.js.map +1 -0
- package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -1
- package/dist/orchestrator/ai-skills/writer.js +15 -7
- package/dist/orchestrator/ai-skills/writer.js.map +1 -1
- package/dist/orchestrator/assets-drift.d.ts.map +1 -1
- package/dist/orchestrator/assets-drift.js +11 -6
- package/dist/orchestrator/assets-drift.js.map +1 -1
- package/dist/orchestrator/flow-manager.d.ts +0 -1
- package/dist/orchestrator/flow-manager.d.ts.map +1 -1
- package/dist/orchestrator/flow-manager.js +3 -52
- package/dist/orchestrator/flow-manager.js.map +1 -1
- package/dist/orchestrator/project-deps-sync.d.ts.map +1 -1
- package/dist/orchestrator/project-deps-sync.js +22 -1
- package/dist/orchestrator/project-deps-sync.js.map +1 -1
- package/dist/orchestrator/project-initializer.d.ts +8 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +49 -7
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +8 -62
- package/dist/orchestrator/screen-manager.js.map +1 -1
- package/dist/orchestrator/security-overrides-catalog.d.ts +39 -0
- package/dist/orchestrator/security-overrides-catalog.d.ts.map +1 -0
- package/dist/orchestrator/security-overrides-catalog.js +63 -0
- package/dist/orchestrator/security-overrides-catalog.js.map +1 -0
- package/dist/orchestrator/security-overrides.d.ts +51 -0
- package/dist/orchestrator/security-overrides.d.ts.map +1 -0
- package/dist/orchestrator/security-overrides.js +165 -0
- package/dist/orchestrator/security-overrides.js.map +1 -0
- package/dist/orchestrator/templates/ai-src/agents/discovery.md +11 -3
- package/dist/orchestrator/templates/ai-src/agents/reviewer.md +8 -0
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +32 -24
- package/dist/orchestrator/templates/ai-src/commands/review.md +2 -2
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +78 -15
- package/dist/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md +2 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +25 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +26 -8
- package/dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +5 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +58 -14
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +13 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +42 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +7 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +18 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/review-checklist.md +63 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/viewpoint-template.md +158 -0
- package/dist/orchestrator/templates/playwright.config.ts +4 -2
- package/dist/orchestrator/templates/specs-locale-fixture.ts +21 -9
- package/dist/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/dist/orchestrator/templates/specs-url-assert.d.ts +17 -1
- package/dist/orchestrator/templates/specs-url-assert.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.js +38 -4
- package/dist/orchestrator/templates/specs-url-assert.js.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.ts +47 -4
- package/dist/orchestrator/templates/wdio.conf.ts +24 -1
- package/dist/orchestrator/trace-mode-install.d.ts +14 -0
- package/dist/orchestrator/trace-mode-install.d.ts.map +1 -0
- package/dist/orchestrator/trace-mode-install.js +132 -0
- package/dist/orchestrator/trace-mode-install.js.map +1 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.d.ts +23 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.d.ts.map +1 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.js +48 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.js.map +1 -0
- package/dist/orchestrator/viewpoint-scaffold.d.ts +3 -0
- package/dist/orchestrator/viewpoint-scaffold.d.ts.map +1 -0
- package/dist/orchestrator/viewpoint-scaffold.js +70 -0
- package/dist/orchestrator/viewpoint-scaffold.js.map +1 -0
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +59 -12
- package/src/cli/commands/capability.ts +54 -19
- package/src/cli/commands/changed.ts +2 -4
- package/src/cli/commands/dashboard.ts +1 -26
- package/src/cli/commands/defect.ts +49 -0
- package/src/cli/commands/delivery.ts +106 -56
- package/src/cli/commands/generate.ts +15 -7
- package/src/cli/commands/results-merge.ts +9 -9
- package/src/cli/commands/results-sanitize.ts +2 -9
- package/src/cli/commands/select.ts +88 -0
- package/src/cli/commands/triage.ts +57 -0
- package/src/cli/commands/update.ts +3 -0
- package/src/cli/commands/viewpoint.ts +58 -0
- package/src/cli/index.ts +13 -2
- package/src/dashboard/snapshot-builder.ts +6 -8
- package/src/dashboard/templates/index.html +1 -1
- package/src/dashboard/types.ts +1 -0
- package/src/exporters/csv-exporter.ts +12 -11
- package/src/exporters/feature-parser.ts +44 -2
- package/src/exporters/json-exporter.ts +6 -1
- package/src/exporters/locale-variants.ts +23 -17
- package/src/exporters/manual-hybrid-oracle.ts +112 -0
- package/src/exporters/matrix/build.ts +71 -19
- package/src/exporters/matrix/carry-manual-results.ts +292 -0
- package/src/exporters/matrix/export.ts +24 -4
- package/src/exporters/matrix/gates.ts +6 -0
- package/src/exporters/matrix/render-csv.ts +1 -1
- package/src/exporters/matrix/render-testcase-sheet.ts +10 -4
- package/src/exporters/matrix/render-xlsx.ts +3 -0
- package/src/exporters/matrix/types.ts +13 -1
- package/src/exporters/matrix/wording.ts +36 -2
- package/src/exporters/playwright-report-parser.ts +1 -0
- package/src/exporters/run-environment.ts +89 -0
- package/src/exporters/scenario-merger.ts +51 -5
- package/src/exporters/test-data-resolver.ts +0 -6
- package/src/exporters/types.ts +5 -0
- package/src/exporters/xlsx-exporter.ts +7 -2
- package/src/generators/gherkin-parser/index.ts +50 -18
- package/src/generators/test-generator/adapters/adapter-interface.ts +6 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +2 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +8 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +7 -3
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +68 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/click-select-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/select-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/label-value-assertion.hbs +7 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +8 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/pick-option.hbs +13 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +5 -1
- package/src/generators/test-generator/adapters/playwright/templates/test-file.hbs +16 -0
- package/src/generators/test-generator/code-generator.ts +77 -5
- package/src/generators/test-generator/diagnostics.ts +36 -5
- package/src/generators/test-generator/patterns/index.ts +15 -8
- package/src/generators/test-generator/patterns/types.ts +15 -0
- package/src/generators/test-generator/patterns/with-parent-scope.ts +6 -0
- package/src/generators/test-generator/step-mapper.ts +90 -8
- package/src/generators/test-generator/utils/data-resolver.ts +41 -12
- package/src/generators/test-generator/utils/selector-entry-fields.ts +1 -0
- package/src/generators/test-generator/utils/selector-resolver.ts +238 -82
- package/src/harness/audit.ts +69 -24
- package/src/harness/capability.ts +23 -12
- package/src/harness/catalog/universal-viewpoints.yaml +5 -5
- package/src/harness/config-file.ts +66 -0
- package/src/harness/counted-assertions.ts +33 -0
- package/src/harness/data-driven-lint.ts +82 -24
- package/src/harness/defect-draft.ts +115 -0
- package/src/harness/defects.ts +94 -0
- package/src/harness/depth-lint.ts +2 -1
- package/src/harness/flow-check.ts +6 -2
- package/src/harness/keyword-match.ts +85 -0
- package/src/harness/manifest.ts +2 -2
- package/src/harness/next-step.ts +47 -5
- package/src/harness/parse.ts +151 -27
- package/src/harness/perf.ts +15 -7
- package/src/harness/quality-gates.ts +22 -8
- package/src/harness/query-catalog.ts +0 -0
- package/src/harness/read-text.ts +32 -1
- package/src/harness/script-check.ts +7 -1
- package/src/harness/secret-scan.ts +60 -4
- package/src/harness/select-by-ids.ts +83 -0
- package/src/harness/sensors.ts +141 -40
- package/src/harness/spec-branches.ts +6 -3
- package/src/harness/spec-coverage.ts +14 -4
- package/src/harness/triage-signals.ts +46 -0
- package/src/harness/triage-unit.ts +113 -0
- package/src/harness/triage.ts +127 -0
- package/src/harness/ui-inventory.ts +164 -0
- package/src/harness/viewpoint-baseline.ts +7 -1
- package/src/harness/viewpoint-draft-header.ts +55 -0
- package/src/harness/viewpoint-ledger.ts +113 -25
- package/src/harness/viewpoint-mode.ts +49 -0
- package/src/harness/viewpoint-priority.ts +38 -0
- package/src/harness/viewpoint-review-open.ts +51 -0
- package/src/harness/viewpoint-scan-refs.ts +154 -0
- package/src/harness/viewpoint-scan.ts +111 -0
- package/src/harness/write-atomic.ts +22 -0
- package/src/orchestrator/ai-skills/writer.ts +18 -3
- package/src/orchestrator/assets-drift.ts +10 -5
- package/src/orchestrator/flow-manager.ts +3 -53
- package/src/orchestrator/project-deps-sync.ts +23 -1
- package/src/orchestrator/project-initializer.ts +54 -6
- package/src/orchestrator/screen-manager.ts +7 -61
- package/src/orchestrator/security-overrides-catalog.ts +69 -0
- package/src/orchestrator/security-overrides.ts +149 -0
- package/src/orchestrator/templates/ai-src/agents/discovery.md +11 -3
- package/src/orchestrator/templates/ai-src/agents/reviewer.md +8 -0
- package/src/orchestrator/templates/ai-src/commands/create-test.md +32 -24
- package/src/orchestrator/templates/ai-src/commands/review.md +2 -2
- package/src/orchestrator/templates/ai-src/commands/run-test.md +78 -15
- package/src/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md +2 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +25 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +26 -8
- package/src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +5 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +58 -14
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +13 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +42 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +7 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +18 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/review-checklist.md +63 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/viewpoint-template.md +158 -0
- package/src/orchestrator/templates/playwright.config.ts +4 -2
- package/src/orchestrator/templates/specs-locale-fixture.ts +21 -9
- package/src/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/src/orchestrator/templates/specs-url-assert.ts +47 -4
- package/src/orchestrator/templates/wdio.conf.ts +24 -1
- package/src/orchestrator/trace-mode-install.ts +94 -0
- package/src/orchestrator/viewpoint-pattern-catalog.ts +61 -0
- package/src/orchestrator/viewpoint-scaffold.ts +36 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DEFECT_STATUSES = void 0;
|
|
37
|
+
exports.defectsDir = defectsDir;
|
|
38
|
+
exports.nextDefectId = nextDefectId;
|
|
39
|
+
exports.readDefects = readDefects;
|
|
40
|
+
exports.defectLinkFindings = defectLinkFindings;
|
|
41
|
+
/**
|
|
42
|
+
* Defect records — `qa/defects/DEF-NNN-<slug>.md`, one project-wide folder. A scenario points at a
|
|
43
|
+
* record with `@known-defect:DEF-NNN`; the record points back at units, scenarios, claims and legacy
|
|
44
|
+
* TCs in its frontmatter. This module reads the records and checks both directions of that link.
|
|
45
|
+
* Drafting a record from a triage row lives in defect-draft.ts.
|
|
46
|
+
*/
|
|
47
|
+
const fs = __importStar(require("fs"));
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
const yaml_1 = require("yaml");
|
|
50
|
+
exports.DEFECT_STATUSES = ['open', 'fixed', 'verified', 'closed', 'wont-fix'];
|
|
51
|
+
const DEF_FILE = /^(DEF-(\d+))-.*\.md$/;
|
|
52
|
+
const KNOWN_DEFECT_TAG = /@known-defect:(DEF-\d+)\b/g;
|
|
53
|
+
function defectsDir(cwd) {
|
|
54
|
+
return path.join(cwd, 'qa', 'defects');
|
|
55
|
+
}
|
|
56
|
+
function defectFiles(cwd) {
|
|
57
|
+
const dir = defectsDir(cwd);
|
|
58
|
+
return fs.existsSync(dir) ? fs.readdirSync(dir).filter((f) => DEF_FILE.test(f)).sort() : [];
|
|
59
|
+
}
|
|
60
|
+
/** The next free id: one above the highest number on disk, zero-padded to 3. */
|
|
61
|
+
function nextDefectId(cwd) {
|
|
62
|
+
const max = defectFiles(cwd).reduce((m, f) => Math.max(m, Number(f.match(DEF_FILE)[2])), 0);
|
|
63
|
+
return `DEF-${String(max + 1).padStart(3, '0')}`;
|
|
64
|
+
}
|
|
65
|
+
const list = (v) => (Array.isArray(v) ? v.map(String) : []);
|
|
66
|
+
/** Every record whose frontmatter parses; a malformed file is skipped, never thrown on. */
|
|
67
|
+
function readDefects(cwd) {
|
|
68
|
+
const out = [];
|
|
69
|
+
for (const f of defectFiles(cwd)) {
|
|
70
|
+
const file = path.join(defectsDir(cwd), f);
|
|
71
|
+
try {
|
|
72
|
+
const fm = (0, yaml_1.parse)(fs.readFileSync(file, 'utf-8').split(/^---\s*$/m)[1] ?? '');
|
|
73
|
+
if (!fm || typeof fm !== 'object')
|
|
74
|
+
continue;
|
|
75
|
+
out.push({
|
|
76
|
+
id: String(fm.id ?? f.match(DEF_FILE)[1]),
|
|
77
|
+
title: String(fm.title ?? ''),
|
|
78
|
+
severity: String(fm.severity ?? ''),
|
|
79
|
+
status: String(fm.status ?? ''),
|
|
80
|
+
units: list(fm.units),
|
|
81
|
+
scenarios: list(fm.scenarios),
|
|
82
|
+
file: path.relative(cwd, file),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
// unreadable frontmatter: not a record we can reason about
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Advisory audit findings for one unit (never scored):
|
|
93
|
+
* DEFECT-REF-MISSING a `@known-defect:DEF-NNN` tag with no record file.
|
|
94
|
+
* DEFECT-ORPHAN (info) an OPEN record of this unit names a scenario the unit no longer has.
|
|
95
|
+
*/
|
|
96
|
+
function defectLinkFindings(cwd, unitId, featureText, scenarioNames) {
|
|
97
|
+
const records = readDefects(cwd);
|
|
98
|
+
const findings = [];
|
|
99
|
+
const known = new Set(records.map((r) => r.id));
|
|
100
|
+
const tagged = new Set([...featureText.matchAll(KNOWN_DEFECT_TAG)].map((m) => m[1]));
|
|
101
|
+
for (const id of tagged) {
|
|
102
|
+
if (!known.has(id)) {
|
|
103
|
+
findings.push(`DEFECT-REF-MISSING: \`@known-defect:${id}\` has no record in qa/defects/ — draft it with \`sungen defect draft --screen ${unitId}\`, or correct the id.`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const names = new Set(scenarioNames);
|
|
107
|
+
for (const r of records) {
|
|
108
|
+
if (r.status !== 'open' || !r.units.includes(unitId))
|
|
109
|
+
continue;
|
|
110
|
+
for (const s of r.scenarios) {
|
|
111
|
+
if (!names.has(s)) {
|
|
112
|
+
findings.push(`DEFECT-ORPHAN (info): ${r.id} is open and names scenario "${s}", which ${unitId} no longer has — update the record's scenarios, or close it.`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return findings;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=defects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defects.js","sourceRoot":"","sources":["../../src/harness/defects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,gCAEC;AAQD,oCAGC;AAKD,kCAqBC;AAOD,gDAoBC;AA7FD;;;;;GAKG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,+BAA0C;AAE7B,QAAA,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAc5F,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AACxC,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAEtD,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED,gFAAgF;AAChF,SAAgB,YAAY,CAAC,GAAW;IACtC,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EA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AAK,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,SAAS;QAC/D,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClB,QAAQ,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,EAAE,gCAAgC,CAAC,YAAY,MAAM,8DAA8D,CAAC,CAAC;YAChK,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth-lint.d.ts","sourceRoot":"","sources":["../../src/harness/depth-lint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"depth-lint.d.ts","sourceRoot":"","sources":["../../src/harness/depth-lint.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,0FAA0F;IAC1F,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,4FAA4F;IAC5F,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAUD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,SAAe,GAAG,eAAe,CA+CzG;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,eAAe,GAAG,IAAI,CAmBxD"}
|
|
@@ -38,11 +38,12 @@ exports.renderDepthLint = renderDepthLint;
|
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const parse_1 = require("./parse");
|
|
40
40
|
const sensors_1 = require("./sensors");
|
|
41
|
+
const keyword_match_1 = require("./keyword-match");
|
|
41
42
|
/** Find the data-theme a scenario belongs to (precise depth.keywords, fallback theme.keywords). */
|
|
42
43
|
function matchTheme(s, dataThemes) {
|
|
43
44
|
return dataThemes.find((t) => {
|
|
44
45
|
const kws = t.depth?.keywords?.length ? t.depth.keywords : t.keywords;
|
|
45
|
-
return kws.some((k) => s.haystack
|
|
46
|
+
return kws.some((k) => (0, keyword_match_1.keywordHit)(s.haystack, k));
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
function runDepthLint(screenDir, screenName, focus = 'functional') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth-lint.js","sourceRoot":"","sources":["../../src/harness/depth-lint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"depth-lint.js","sourceRoot":"","sources":["../../src/harness/depth-lint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,oCA+CC;AAED,0CAmBC;AA1GD,2CAA6B;AAC7B,mCAAkG;AAClG,uCAAoG;AACpG,mDAA6C;AA2B7C,mGAAmG;AACnG,SAAS,UAAU,CAAC,CAAe,EAAE,UAA0B;IAC7D,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QAC3B,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAA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AO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IACnG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-check.d.ts","sourceRoot":"","sources":["../../src/harness/flow-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow-check.d.ts","sourceRoot":"","sources":["../../src/harness/flow-check.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,QAAQ;IAAG,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE;AACzJ,MAAM,WAAW,QAAQ;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AAC/G,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACnC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AA8BD,MAAM,WAAW,YAAY;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE;AAE7F;kGACkG;AAClG,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAQ7D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe,CAmD9E"}
|
|
@@ -49,6 +49,7 @@ exports.buildFlowCheck = buildFlowCheck;
|
|
|
49
49
|
const fs = __importStar(require("fs"));
|
|
50
50
|
const path = __importStar(require("path"));
|
|
51
51
|
const unit_paths_1 = require("./unit-paths");
|
|
52
|
+
const keyword_match_1 = require("./keyword-match");
|
|
52
53
|
const parse_1 = require("./parse");
|
|
53
54
|
const capability_plan_1 = require("./capability-plan");
|
|
54
55
|
const read_text_1 = require("./read-text");
|
|
@@ -74,7 +75,10 @@ function featureTags(fp) {
|
|
|
74
75
|
}
|
|
75
76
|
function targetsFromHint(hint) {
|
|
76
77
|
const h = hint.toLowerCase();
|
|
77
|
-
|
|
78
|
+
// Word-aware (#779): every KNOWN_TARGET is an ordinary noun, so a substring test read
|
|
79
|
+
// `re·order` / `dis·order` as the target `order` and then matched the two to each other —
|
|
80
|
+
// a deferral about reorder history reported COVERED by a flow scenario about a disorder.
|
|
81
|
+
const hits = KNOWN_TARGETS.filter((k) => (0, keyword_match_1.keywordHit)(h, k));
|
|
78
82
|
if (hits.length)
|
|
79
83
|
return hits;
|
|
80
84
|
// fallback: significant words after "->"
|
|
@@ -112,7 +116,7 @@ function buildFlowCheck(cwd, onlyFlow) {
|
|
|
112
116
|
// `@owned-by:<flow>` names the owner explicitly → only that flow's scenarios can cover it
|
|
113
117
|
// (a false @owned-by is then surfaced as missing). Else any flow may cover it (legacy).
|
|
114
118
|
const pool = s.ownedBy ? flowScenarios.filter((fs2) => fs2.flow === s.ownedBy) : flowScenarios;
|
|
115
|
-
const matches = pool.filter((fs2) => targets.some((t) => fs2.haystack
|
|
119
|
+
const matches = pool.filter((fs2) => targets.some((t) => (0, keyword_match_1.keywordHit)(fs2.haystack, t)));
|
|
116
120
|
let verdict = 'missing';
|
|
117
121
|
let via;
|
|
118
122
|
if (matches.some((m) => m.deep)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-check.js","sourceRoot":"","sources":["../../src/harness/flow-check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"flow-check.js","sourceRoot":"","sources":["../../src/harness/flow-check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,8CAQC;AAED,wCAmDC;AA3HD;;;;;;;;;;GAUG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,6CAA+C;AAC/C,mDAA6C;AAC7C,mCAAwC;AACxC,uDAAmD;AACnD,2CAA2C;AAE3C,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAWnH,SAAS,QAAQ,CAAC,CAAS;IACzB,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9H,CAAC;AACD,yFAAyF;AACzF,SAAS,YAAY,CAAC,IAAY,EAAE,IAAyB,EAAE,IAAY;IACzE,OAAO,IAAA,4BAAe,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AACD,SAAS,WAAW,CAAC,EAAU;IAC7B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,IAAA,wBAAY,EAAC,EA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AAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,cAAc,mGAAmG,EAAE,CAAC,CAAC;QAC5L,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;AACpH,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyword matching for the audit's coverage sensors — the single rule every "does a scenario
|
|
3
|
+
* mention this?" question goes through.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS (#776). The sensors used to ask `haystack.includes(keyword)`. A substring match
|
|
6
|
+
* is satisfied by a keyword buried inside an unrelated word, and it fails in the direction that
|
|
7
|
+
* HIDES problems: a theme nobody tested reads as covered. Measured case — the scenario title
|
|
8
|
+
* "…five steps from email through to information entry" made `format-boundary` covered on a screen
|
|
9
|
+
* with no text input at all, because in·format·ion contains `format`. That one word moved the
|
|
10
|
+
* screen from 7.9 FAIL to 8.9 PASS.
|
|
11
|
+
*
|
|
12
|
+
* THE RULE: anchor a word boundary at the START of the keyword, leave the END free.
|
|
13
|
+
*
|
|
14
|
+
* Not `\b…\b` at both ends, which is the obvious fix and is wrong. Every collision this defect
|
|
15
|
+
* produces is a PREFIX collision — the innocent word carries extra letters BEFORE the keyword:
|
|
16
|
+
*
|
|
17
|
+
* format ← in·format·ion, ·format·ting range ← ar·range·ment, o·range
|
|
18
|
+
* saved ← un·saved created ← re·created
|
|
19
|
+
* success ← un·success·ful length ← wave·length
|
|
20
|
+
*
|
|
21
|
+
* The `unsaved` / `unsuccessful` pair is the sharp end: the prefix INVERTS the meaning, so a
|
|
22
|
+
* scenario asserting a submit FAILED is what marks the submit-SUCCESS theme covered.
|
|
23
|
+
*
|
|
24
|
+
* Meanwhile English inflection lives entirely in the SUFFIX, and a trailing `\b` destroys it:
|
|
25
|
+
* `submit` stops matching "submitted", `success` stops matching "successfully", `valid` stops
|
|
26
|
+
* matching "validation", `create` stops matching "created". Those are true positives, and a
|
|
27
|
+
* both-ends boundary turns 4 of 5 of them into false gaps — trading a silent failure for a noisy
|
|
28
|
+
* one. A leading boundary alone kills all six collisions above and keeps all of them.
|
|
29
|
+
*
|
|
30
|
+
* WHAT THIS RULE DOES NOT FIX, stated rather than implied. A free suffix still admits a collision
|
|
31
|
+
* when the keyword is a true PREFIX of a common unrelated word:
|
|
32
|
+
*
|
|
33
|
+
* feed → "feedback" list → "listener" length → "lengthy"
|
|
34
|
+
*
|
|
35
|
+
* No boundary rule can separate `feed` from `feedback`, so the cure is a less ambiguous KEYWORD,
|
|
36
|
+
* which is a catalog decision rather than a matcher one. #778 took it: the shipped catalog no
|
|
37
|
+
* longer carries any of the three bare forms — `"product list"`, `"feed item"` and
|
|
38
|
+
* `"max length"` / `"min length"` replaced them, and `cart-correctness` lost bare `price` and
|
|
39
|
+
* `quantity` (ordinary listing vocabulary that credited a cart theme on a screen with no cart).
|
|
40
|
+
*
|
|
41
|
+
* That closes today's instances, not the class. `tests/harness/keyword-word-boundary.run.ts`
|
|
42
|
+
* section (e) sweeps every single-word ASCII keyword in the catalog — theme `keywords`,
|
|
43
|
+
* `detect_keywords` and `depth.keywords` alike — so a NEW loose keyword fails the suite instead of
|
|
44
|
+
* entering silently. Adding one is possible, but only as a conscious act via that file's
|
|
45
|
+
* `KNOWN_LOOSE` map, which #778 left empty.
|
|
46
|
+
*
|
|
47
|
+
* NON-ASCII KEYWORDS fall back to substring, on purpose. JavaScript's `\b` is defined against
|
|
48
|
+
* `[A-Za-z0-9_]`, so `\bログイン` and `\bđăng nhập` never match anything at all — the anchor would
|
|
49
|
+
* silently disable the keyword rather than tighten it. Japanese and Chinese have no word
|
|
50
|
+
* boundaries to anchor to, which is precisely where substring matching is the CORRECT behaviour
|
|
51
|
+
* and the false-positive risk is low. Today every keyword reaching here is ASCII by construction
|
|
52
|
+
* (the catalog is English; the ledger and spec sensors extract words with `[a-z]` character
|
|
53
|
+
* classes), so this branch is a guard against a future non-ASCII catalog entry failing closed.
|
|
54
|
+
*/
|
|
55
|
+
/** Does `haystack` mention `kw` as a word (not as the tail of a longer one)? */
|
|
56
|
+
export declare function keywordHit(haystack: string, kw: string): boolean;
|
|
57
|
+
/** Does ANY of `haystacks` mention `kw`? */
|
|
58
|
+
export declare function hasKeyword(haystacks: string[], kw: string): boolean;
|
|
59
|
+
//# sourceMappingURL=keyword-match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword-match.d.ts","sourceRoot":"","sources":["../../src/harness/keyword-match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAqBH,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAIhE;AAED,4CAA4C;AAC5C,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAEnE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Keyword matching for the audit's coverage sensors — the single rule every "does a scenario
|
|
4
|
+
* mention this?" question goes through.
|
|
5
|
+
*
|
|
6
|
+
* WHY THIS EXISTS (#776). The sensors used to ask `haystack.includes(keyword)`. A substring match
|
|
7
|
+
* is satisfied by a keyword buried inside an unrelated word, and it fails in the direction that
|
|
8
|
+
* HIDES problems: a theme nobody tested reads as covered. Measured case — the scenario title
|
|
9
|
+
* "…five steps from email through to information entry" made `format-boundary` covered on a screen
|
|
10
|
+
* with no text input at all, because in·format·ion contains `format`. That one word moved the
|
|
11
|
+
* screen from 7.9 FAIL to 8.9 PASS.
|
|
12
|
+
*
|
|
13
|
+
* THE RULE: anchor a word boundary at the START of the keyword, leave the END free.
|
|
14
|
+
*
|
|
15
|
+
* Not `\b…\b` at both ends, which is the obvious fix and is wrong. Every collision this defect
|
|
16
|
+
* produces is a PREFIX collision — the innocent word carries extra letters BEFORE the keyword:
|
|
17
|
+
*
|
|
18
|
+
* format ← in·format·ion, ·format·ting range ← ar·range·ment, o·range
|
|
19
|
+
* saved ← un·saved created ← re·created
|
|
20
|
+
* success ← un·success·ful length ← wave·length
|
|
21
|
+
*
|
|
22
|
+
* The `unsaved` / `unsuccessful` pair is the sharp end: the prefix INVERTS the meaning, so a
|
|
23
|
+
* scenario asserting a submit FAILED is what marks the submit-SUCCESS theme covered.
|
|
24
|
+
*
|
|
25
|
+
* Meanwhile English inflection lives entirely in the SUFFIX, and a trailing `\b` destroys it:
|
|
26
|
+
* `submit` stops matching "submitted", `success` stops matching "successfully", `valid` stops
|
|
27
|
+
* matching "validation", `create` stops matching "created". Those are true positives, and a
|
|
28
|
+
* both-ends boundary turns 4 of 5 of them into false gaps — trading a silent failure for a noisy
|
|
29
|
+
* one. A leading boundary alone kills all six collisions above and keeps all of them.
|
|
30
|
+
*
|
|
31
|
+
* WHAT THIS RULE DOES NOT FIX, stated rather than implied. A free suffix still admits a collision
|
|
32
|
+
* when the keyword is a true PREFIX of a common unrelated word:
|
|
33
|
+
*
|
|
34
|
+
* feed → "feedback" list → "listener" length → "lengthy"
|
|
35
|
+
*
|
|
36
|
+
* No boundary rule can separate `feed` from `feedback`, so the cure is a less ambiguous KEYWORD,
|
|
37
|
+
* which is a catalog decision rather than a matcher one. #778 took it: the shipped catalog no
|
|
38
|
+
* longer carries any of the three bare forms — `"product list"`, `"feed item"` and
|
|
39
|
+
* `"max length"` / `"min length"` replaced them, and `cart-correctness` lost bare `price` and
|
|
40
|
+
* `quantity` (ordinary listing vocabulary that credited a cart theme on a screen with no cart).
|
|
41
|
+
*
|
|
42
|
+
* That closes today's instances, not the class. `tests/harness/keyword-word-boundary.run.ts`
|
|
43
|
+
* section (e) sweeps every single-word ASCII keyword in the catalog — theme `keywords`,
|
|
44
|
+
* `detect_keywords` and `depth.keywords` alike — so a NEW loose keyword fails the suite instead of
|
|
45
|
+
* entering silently. Adding one is possible, but only as a conscious act via that file's
|
|
46
|
+
* `KNOWN_LOOSE` map, which #778 left empty.
|
|
47
|
+
*
|
|
48
|
+
* NON-ASCII KEYWORDS fall back to substring, on purpose. JavaScript's `\b` is defined against
|
|
49
|
+
* `[A-Za-z0-9_]`, so `\bログイン` and `\bđăng nhập` never match anything at all — the anchor would
|
|
50
|
+
* silently disable the keyword rather than tighten it. Japanese and Chinese have no word
|
|
51
|
+
* boundaries to anchor to, which is precisely where substring matching is the CORRECT behaviour
|
|
52
|
+
* and the false-positive risk is low. Today every keyword reaching here is ASCII by construction
|
|
53
|
+
* (the catalog is English; the ledger and spec sensors extract words with `[a-z]` character
|
|
54
|
+
* classes), so this branch is a guard against a future non-ASCII catalog entry failing closed.
|
|
55
|
+
*/
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.keywordHit = keywordHit;
|
|
58
|
+
exports.hasKeyword = hasKeyword;
|
|
59
|
+
/** True when `kw`'s first character can carry a `\b` anchor — i.e. it is an ASCII word character. */
|
|
60
|
+
const anchorable = (kw) => /^[a-z0-9_]/i.test(kw);
|
|
61
|
+
const cache = new Map();
|
|
62
|
+
/**
|
|
63
|
+
* Compile `kw` to its matcher, or `null` when the keyword must be compared as a plain substring.
|
|
64
|
+
* Cached: the sensors re-ask the same handful of catalog keywords once per scenario.
|
|
65
|
+
*/
|
|
66
|
+
function matcherFor(kw) {
|
|
67
|
+
const key = kw.toLowerCase();
|
|
68
|
+
if (cache.has(key))
|
|
69
|
+
return cache.get(key);
|
|
70
|
+
const re = anchorable(key)
|
|
71
|
+
? new RegExp(`\\b${key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`)
|
|
72
|
+
: null;
|
|
73
|
+
cache.set(key, re);
|
|
74
|
+
return re;
|
|
75
|
+
}
|
|
76
|
+
/** Does `haystack` mention `kw` as a word (not as the tail of a longer one)? */
|
|
77
|
+
function keywordHit(haystack, kw) {
|
|
78
|
+
const h = haystack.toLowerCase();
|
|
79
|
+
const re = matcherFor(kw);
|
|
80
|
+
return re ? re.test(h) : h.includes(kw.toLowerCase());
|
|
81
|
+
}
|
|
82
|
+
/** Does ANY of `haystacks` mention `kw`? */
|
|
83
|
+
function hasKeyword(haystacks, kw) {
|
|
84
|
+
return haystacks.some((h) => keywordHit(h, kw));
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=keyword-match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword-match.js","sourceRoot":"","sources":["../../src/harness/keyword-match.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;;AAsBH,gCAIC;AAGD,gCAEC;AA7BD,qGAAqG;AACrG,MAAM,UAAU,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEnE,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;AAE/C;;;GAGG;AACH,SAAS,UAAU,CAAC,EAAU;IAC5B,MAAM,GAAG,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;IAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;IAC3C,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC;QACxB,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,EAAE,CAAC;QAChE,CAAC,CAAC,IAAI,CAAC;IACT,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,gFAAgF;AAChF,SAAgB,UAAU,CAAC,QAAgB,EAAE,EAAU;IACrD,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACjC,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,4CAA4C;AAC5C,SAAgB,UAAU,CAAC,SAAmB,EAAE,EAAU;IACxD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/harness/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/harness/manifest.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,WAAW;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAC3D,MAAM,WAAW,aAAa;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACvG,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,QAAQ,CAAC;AAC1D,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACvF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CACpF;AA2BD,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAiBjE;AAqBD,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,QAAQ,CAyB7E;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAkClG;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvD;AACD,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAGhE;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAKhD"}
|
package/dist/harness/manifest.js
CHANGED
|
@@ -54,6 +54,7 @@ const path = __importStar(require("path"));
|
|
|
54
54
|
const crypto_1 = require("crypto");
|
|
55
55
|
const unit_paths_1 = require("./unit-paths");
|
|
56
56
|
const read_text_1 = require("./read-text");
|
|
57
|
+
const parse_1 = require("./parse");
|
|
57
58
|
function norm(s) {
|
|
58
59
|
return s.replace(/\(Tier[^)]*\)/i, '').replace(/[#*-]/g, '').trim().toLowerCase().replace(/\s+/g, ' ');
|
|
59
60
|
}
|
|
@@ -118,8 +119,7 @@ function parseFeatureSections(featurePath) {
|
|
|
118
119
|
const s = line.match(/^Scenario:\s*(.*)$/);
|
|
119
120
|
if (s) {
|
|
120
121
|
const name = s[1].trim();
|
|
121
|
-
|
|
122
|
-
out.push({ scenario: name, vpCode: code, section });
|
|
122
|
+
out.push({ scenario: name, vpCode: (0, parse_1.vpCodeOf)(name).vpCode, section });
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
return out;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/harness/manifest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/harness/manifest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,8CAiBC;AAqBD,sCAyBC;AAED,oCAkCC;AAED,oCAEC;AACD,oCAGC;AACD,oCAKC;AA9KD;;;;;;;;;GASG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,mCAAoC;AACpC,6CAA2D;AAC3D,2CAA2C;AAC3C,mCAAmC;AAoBnC,SAAS,IAAI,CAAC,CAAS;IACrB,OAAO,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACzG,CAAC;AACD,SAAS,SAAS,CAAC,CAAS;IAC1B,OAAO,IAAA,mBAAU,EAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,M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AAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAA,uBAAU,EAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC3F,CAAC;AACD,SAAgB,YAAY,CAAC,UAAkB;IAC7C,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAA,wBAAY,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC;AACD,SAAgB,YAAY,CAAC,CAAW;IACtC,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACjC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -17,6 +17,8 @@ export interface UnitState {
|
|
|
17
17
|
kind: 'screen' | 'flow' | 'api';
|
|
18
18
|
hasSpec: boolean;
|
|
19
19
|
hasViewpoint: boolean;
|
|
20
|
+
/** test-viewpoint.md carries `drafted-by: ai` — written by the AI, not yet accepted by a QA. */
|
|
21
|
+
viewpointIsAiDraft?: boolean;
|
|
20
22
|
hasContract: boolean;
|
|
21
23
|
hasFlowInventory: boolean;
|
|
22
24
|
scenarioCount: number;
|
|
@@ -43,10 +45,6 @@ export interface UnitState {
|
|
|
43
45
|
};
|
|
44
46
|
steps: NextStep[];
|
|
45
47
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Everything the resolver needs, read from disk. `unitId` is the catalog id
|
|
48
|
-
* (`<screen>` · `flows/<f>` · `api/<a>`); `unitDir` is its directory.
|
|
49
|
-
*/
|
|
50
48
|
export declare function readUnitState(projectRoot: string, unitDir: string, unit: string, kind: UnitState['kind']): UnitState;
|
|
51
49
|
/**
|
|
52
50
|
* The ordered answer. Earliest unmet precondition first, so the list reads as a path rather than
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-step.d.ts","sourceRoot":"","sources":["../../src/harness/next-step.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"next-step.d.ts","sourceRoot":"","sources":["../../src/harness/next-step.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,QAAQ;IACvB,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;CAChD;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gGAAgG;IAChG,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,OAAO,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;IACF;;;;;OAKG;IACH,WAAW,CAAC,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAClE,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAgDD,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,GAC1E,SAAS,CA2EX;AAaD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,GAAG,QAAQ,EAAE,CAmHpD"}
|
|
@@ -53,9 +53,12 @@ exports.deriveSteps = deriveSteps;
|
|
|
53
53
|
*/
|
|
54
54
|
const fs = __importStar(require("fs"));
|
|
55
55
|
const path = __importStar(require("path"));
|
|
56
|
+
const yaml_1 = require("yaml");
|
|
56
57
|
const unit_paths_1 = require("./unit-paths");
|
|
57
58
|
const read_text_1 = require("./read-text");
|
|
58
59
|
const assets_drift_1 = require("../orchestrator/assets-drift");
|
|
60
|
+
const viewpoint_draft_header_1 = require("./viewpoint-draft-header");
|
|
61
|
+
const viewpoint_baseline_1 = require("./viewpoint-baseline");
|
|
59
62
|
const exists = (p) => fs.existsSync(p);
|
|
60
63
|
function readJson(p) {
|
|
61
64
|
try {
|
|
@@ -77,6 +80,34 @@ function countScenarios(unitDir, unit) {
|
|
|
77
80
|
* Everything the resolver needs, read from disk. `unitId` is the catalog id
|
|
78
81
|
* (`<screen>` · `flows/<f>` · `api/<a>`); `unitDir` is its directory.
|
|
79
82
|
*/
|
|
83
|
+
const RESULT_FILE = /-test-result(?:\.[^.]+)*\.json$/;
|
|
84
|
+
/**
|
|
85
|
+
* Does the selector text resolve at least one element? A scaffold resolves none: the web one holds
|
|
86
|
+
* only the `page` route, the mobile one only header comments. Matching the WORD "placeholder" was
|
|
87
|
+
* wrong both ways (#868): it flagged a real file whose key names an input's placeholder text, and
|
|
88
|
+
* missed both scaffolds, which never contain it.
|
|
89
|
+
*/
|
|
90
|
+
function hasResolvedSelector(selectorText) {
|
|
91
|
+
let doc;
|
|
92
|
+
try {
|
|
93
|
+
doc = (0, yaml_1.parse)(selectorText);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return selectorText.trim().length >= 40;
|
|
97
|
+
}
|
|
98
|
+
if (!doc || typeof doc !== 'object')
|
|
99
|
+
return false;
|
|
100
|
+
// A real cell, not a marker left to be filled in. Numbers count (an id or index can be numeric).
|
|
101
|
+
const real = (v) => (typeof v === 'string' || typeof v === 'number')
|
|
102
|
+
&& String(v).trim() !== '' && !/^(?:todo|tbd|placeholder|replace me)$/i.test(String(v).trim());
|
|
103
|
+
return Object.values(doc).some((e) => {
|
|
104
|
+
if (!e || typeof e !== 'object')
|
|
105
|
+
return false;
|
|
106
|
+
const { type, value, name, locator } = e;
|
|
107
|
+
// Every SelectorEntry shape: a CSS `locator`, or a non-page `type` with a value or a role name.
|
|
108
|
+
return real(locator) || (typeof type === 'string' && type !== 'page' && (real(value) || real(name)));
|
|
109
|
+
});
|
|
110
|
+
}
|
|
80
111
|
function readUnitState(projectRoot, unitDir, unit, kind) {
|
|
81
112
|
const req = path.join(unitDir, 'requirements');
|
|
82
113
|
const slug = (0, unit_paths_1.reportSlug)(unit);
|
|
@@ -90,7 +121,7 @@ function readUnitState(projectRoot, unitDir, unit, kind) {
|
|
|
90
121
|
// `readTextFile` throws on a missing file, and every path here is legitimately absent at some
|
|
91
122
|
// point in a unit's life — the resolver exists to report exactly that, so it must not crash on it.
|
|
92
123
|
const read = (p) => (fs.existsSync(p) ? (0, read_text_1.readTextFile)(p) : '');
|
|
93
|
-
const
|
|
124
|
+
const selectorTexts = selectorFiles.map((f) => read(path.join(selectorsDir, f)));
|
|
94
125
|
const contractPath = path.join(req, 'flow-contract.yaml');
|
|
95
126
|
const contractText = read(contractPath);
|
|
96
127
|
const specDirs = [
|
|
@@ -107,7 +138,9 @@ function readUnitState(projectRoot, unitDir, unit, kind) {
|
|
|
107
138
|
});
|
|
108
139
|
const hasResults = specDirs.some((d) => {
|
|
109
140
|
try {
|
|
110
|
-
|
|
141
|
+
// `<f>-test-result[.<os>][.<env>].json` — a mobile run writes the OS into the name, an env
|
|
142
|
+
// run (SUNGEN_ENV=staging) the env; both are runs (#868).
|
|
143
|
+
return fs.readdirSync(d).some((f) => RESULT_FILE.test(f));
|
|
111
144
|
}
|
|
112
145
|
catch {
|
|
113
146
|
return false;
|
|
@@ -125,6 +158,9 @@ function readUnitState(projectRoot, unitDir, unit, kind) {
|
|
|
125
158
|
unit, kind,
|
|
126
159
|
hasSpec: exists(path.join(req, 'spec.md')),
|
|
127
160
|
hasViewpoint: exists(path.join(req, 'test-viewpoint.md')),
|
|
161
|
+
// An id-less draft has nothing to accept: only the missing-yardstick step speaks for it.
|
|
162
|
+
viewpointIsAiDraft: (0, viewpoint_draft_header_1.viewpointFileIsAiDraft)(path.join(req, 'test-viewpoint.md'))
|
|
163
|
+
&& (0, viewpoint_baseline_1.readViewpointDeclaration)(path.join(req, 'test-viewpoint.md')) !== null,
|
|
128
164
|
hasContract: exists(contractPath),
|
|
129
165
|
// A contract WITHOUT `flows:` can only be scored per phase, which is a materially weaker
|
|
130
166
|
// claim — so it is part of the state, not a detail.
|
|
@@ -133,8 +169,7 @@ function readUnitState(projectRoot, unitDir, unit, kind) {
|
|
|
133
169
|
hasSelectors: selectorFiles.length > 0,
|
|
134
170
|
// A scaffolded selector file exists but resolves nothing; treating it as "done" is what
|
|
135
171
|
// makes a run look further along than it is.
|
|
136
|
-
selectorsArePlaceholder: selectorFiles.length > 0
|
|
137
|
-
&& (/TODO|PLACEHOLDER|REPLACE ME/i.test(selectorText) || selectorText.trim().length < 40),
|
|
172
|
+
selectorsArePlaceholder: selectorFiles.length > 0 && !selectorTexts.some(hasResolvedSelector),
|
|
138
173
|
compiled, hasResults, hasDeliverable,
|
|
139
174
|
assetsDrift: (() => {
|
|
140
175
|
const d = (0, assets_drift_1.checkAssetsDrift)(projectRoot);
|
|
@@ -163,6 +198,7 @@ const REPAIRABLE = [
|
|
|
163
198
|
'SPEC-RESTATED-UNVERIFIED', 'VIEWPOINT-GESTURE-SUBSTITUTED', 'SPEC-UNCOVERED', 'SPEC-CLAUSE-UNCOVERED',
|
|
164
199
|
'TRIGGER-UNCOVERED', 'PERMISSION-PAIR-MISSING', 'VISIBILITY-PAIR-MISSING',
|
|
165
200
|
'VIEWPOINT-ITEM-MISSING', 'MANUAL-CODE-MISSING', 'MANUAL-AUTOMATABLE', 'DEPTH-DEFERRED',
|
|
201
|
+
'UI-INVENTORY-MISSING', 'UI-INVENTORY-INCOMPLETE', 'UI-ITEM-UNCOVERED',
|
|
166
202
|
];
|
|
167
203
|
/**
|
|
168
204
|
* The ordered answer. Earliest unmet precondition first, so the list reads as a path rather than
|
|
@@ -210,6 +246,15 @@ function deriveSteps(s) {
|
|
|
210
246
|
});
|
|
211
247
|
return out;
|
|
212
248
|
}
|
|
249
|
+
// Before any generation: the AI drafts the viewpoint and audits it BEFORE it writes scenarios, so
|
|
250
|
+
// this is exactly where a draft would otherwise be accepted by the process that wrote it.
|
|
251
|
+
if (s.viewpointIsAiDraft) {
|
|
252
|
+
out.push({
|
|
253
|
+
kind: 'decide',
|
|
254
|
+
command: `sungen audit --screen ${s.unit} --accept-viewpoint`,
|
|
255
|
+
because: 'test-viewpoint.md is marked `drafted-by: ai` — nobody has reviewed it, so the ledger and traceability axes are held as unverified. A QA reviews the claims (adds what matters, deletes what does not), then accepts; the command records the baseline and removes the marker. A decision, not a step: an agent presents it and does not run it',
|
|
256
|
+
});
|
|
257
|
+
}
|
|
213
258
|
if (s.scenarioCount === 0) {
|
|
214
259
|
out.push({ kind: 'do', command: design, because: 'no scenarios exist yet' });
|
|
215
260
|
return out;
|
|
@@ -225,7 +270,7 @@ function deriveSteps(s) {
|
|
|
225
270
|
out.push({ kind: 'do', command: `sungen audit --screen ${s.unit}`, because: 'the suite has never been measured' });
|
|
226
271
|
return out;
|
|
227
272
|
}
|
|
228
|
-
if (s.audit.viewpointBaselineStatus === 'changed') {
|
|
273
|
+
if (s.audit.viewpointBaselineStatus === 'changed' && !s.viewpointIsAiDraft) { // the draft's own decide step is already above
|
|
229
274
|
out.push({
|
|
230
275
|
kind: 'decide',
|
|
231
276
|
command: `sungen audit --screen ${s.unit} --accept-viewpoint`,
|