@sun-asterisk/sungen 3.2.35 → 3.3.0-alpha.10
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/basis/anchor-grammar.d.ts +32 -0
- package/dist/basis/anchor-grammar.d.ts.map +1 -0
- package/dist/basis/anchor-grammar.js +82 -0
- package/dist/basis/anchor-grammar.js.map +1 -0
- package/dist/basis/anchor-hash.d.ts +6 -0
- package/dist/basis/anchor-hash.d.ts.map +1 -0
- package/dist/basis/anchor-hash.js +28 -0
- package/dist/basis/anchor-hash.js.map +1 -0
- package/dist/basis/bm51-tables.d.ts +20 -0
- package/dist/basis/bm51-tables.d.ts.map +1 -0
- package/dist/basis/bm51-tables.js +71 -0
- package/dist/basis/bm51-tables.js.map +1 -0
- package/dist/basis/extract-spec-anchors.d.ts +39 -0
- package/dist/basis/extract-spec-anchors.d.ts.map +1 -0
- package/dist/basis/extract-spec-anchors.js +81 -0
- package/dist/basis/extract-spec-anchors.js.map +1 -0
- package/dist/basis/migration-sentinel.d.ts +47 -0
- package/dist/basis/migration-sentinel.d.ts.map +1 -0
- package/dist/basis/migration-sentinel.js +219 -0
- package/dist/basis/migration-sentinel.js.map +1 -0
- package/dist/basis/spec-frontmatter.d.ts +18 -0
- package/dist/basis/spec-frontmatter.d.ts.map +1 -0
- package/dist/basis/spec-frontmatter.js +55 -0
- package/dist/basis/spec-frontmatter.js.map +1 -0
- package/dist/basis/spec-sections.d.ts +18 -0
- package/dist/basis/spec-sections.d.ts.map +1 -0
- package/dist/basis/spec-sections.js +27 -0
- package/dist/basis/spec-sections.js.map +1 -0
- package/dist/basis/test-basis-schema.d.ts +28 -0
- package/dist/basis/test-basis-schema.d.ts.map +1 -0
- package/dist/basis/test-basis-schema.js +141 -0
- package/dist/basis/test-basis-schema.js.map +1 -0
- package/dist/capabilities/discover.d.ts +4 -0
- package/dist/capabilities/discover.d.ts.map +1 -1
- package/dist/capabilities/discover.js +16 -2
- package/dist/capabilities/discover.js.map +1 -1
- package/dist/capabilities/registry.d.ts +15 -0
- package/dist/capabilities/registry.d.ts.map +1 -1
- package/dist/capabilities/registry.js.map +1 -1
- package/dist/cli/case-triage-hint.d.ts +14 -0
- package/dist/cli/case-triage-hint.d.ts.map +1 -0
- package/dist/cli/case-triage-hint.js +23 -0
- package/dist/cli/case-triage-hint.js.map +1 -0
- package/dist/cli/commands/audit.js +1 -1
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.js +1 -1
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/contract-derive-command.d.ts +12 -0
- package/dist/cli/commands/contract-derive-command.d.ts.map +1 -0
- package/dist/cli/commands/contract-derive-command.js +113 -0
- package/dist/cli/commands/contract-derive-command.js.map +1 -0
- package/dist/cli/commands/contract.d.ts +20 -0
- package/dist/cli/commands/contract.d.ts.map +1 -0
- package/dist/cli/commands/contract.js +195 -0
- package/dist/cli/commands/contract.js.map +1 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +109 -19
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/gate.d.ts.map +1 -1
- package/dist/cli/commands/gate.js +2 -1
- package/dist/cli/commands/gate.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +17 -3
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/journey.d.ts.map +1 -1
- package/dist/cli/commands/journey.js +47 -17
- package/dist/cli/commands/journey.js.map +1 -1
- package/dist/cli/commands/next.d.ts +13 -0
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +98 -9
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/triage.d.ts +2 -1
- package/dist/cli/commands/triage.d.ts.map +1 -1
- package/dist/cli/commands/triage.js +45 -3
- package/dist/cli/commands/triage.js.map +1 -1
- package/dist/cli/commands/update.d.ts +11 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +37 -8
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +24 -33
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/json-error-on-exit.d.ts +34 -0
- package/dist/cli/json-error-on-exit.d.ts.map +1 -0
- package/dist/cli/json-error-on-exit.js +63 -0
- package/dist/cli/json-error-on-exit.js.map +1 -0
- package/dist/cli/project-sungen-invocation.d.ts +13 -0
- package/dist/cli/project-sungen-invocation.d.ts.map +1 -0
- package/dist/cli/project-sungen-invocation.js +95 -0
- package/dist/cli/project-sungen-invocation.js.map +1 -0
- package/dist/cli/run-command-hints.d.ts +9 -0
- package/dist/cli/run-command-hints.d.ts.map +1 -0
- package/dist/cli/run-command-hints.js +84 -0
- package/dist/cli/run-command-hints.js.map +1 -0
- package/dist/cli/waiting-for-you-block.d.ts +18 -0
- package/dist/cli/waiting-for-you-block.d.ts.map +1 -0
- package/dist/cli/waiting-for-you-block.js +22 -0
- package/dist/cli/waiting-for-you-block.js.map +1 -0
- package/dist/contract/accept-opaque-steps.d.ts +3 -0
- package/dist/contract/accept-opaque-steps.d.ts.map +1 -0
- package/dist/contract/accept-opaque-steps.js +114 -0
- package/dist/contract/accept-opaque-steps.js.map +1 -0
- package/dist/contract/approve-contract.d.ts +38 -0
- package/dist/contract/approve-contract.d.ts.map +1 -0
- package/dist/contract/approve-contract.js +93 -0
- package/dist/contract/approve-contract.js.map +1 -0
- package/dist/contract/assertion-matcher-vocabulary.d.ts +24 -0
- package/dist/contract/assertion-matcher-vocabulary.d.ts.map +1 -0
- package/dist/contract/assertion-matcher-vocabulary.js +100 -0
- package/dist/contract/assertion-matcher-vocabulary.js.map +1 -0
- package/dist/contract/build-contract-verdict.d.ts +32 -0
- package/dist/contract/build-contract-verdict.d.ts.map +1 -0
- package/dist/contract/build-contract-verdict.js +123 -0
- package/dist/contract/build-contract-verdict.js.map +1 -0
- package/dist/contract/build-trace-conformance.d.ts +22 -0
- package/dist/contract/build-trace-conformance.d.ts.map +1 -0
- package/dist/contract/build-trace-conformance.js +151 -0
- package/dist/contract/build-trace-conformance.js.map +1 -0
- package/dist/contract/classify-contract-change.d.ts +24 -0
- package/dist/contract/classify-contract-change.d.ts.map +1 -0
- package/dist/contract/classify-contract-change.js +98 -0
- package/dist/contract/classify-contract-change.js.map +1 -0
- package/dist/contract/classify-contract-unit.d.ts +18 -0
- package/dist/contract/classify-contract-unit.d.ts.map +1 -0
- package/dist/contract/classify-contract-unit.js +49 -0
- package/dist/contract/classify-contract-unit.js.map +1 -0
- package/dist/contract/classify-trace-conformance.d.ts +47 -0
- package/dist/contract/classify-trace-conformance.d.ts.map +1 -0
- package/dist/contract/classify-trace-conformance.js +164 -0
- package/dist/contract/classify-trace-conformance.js.map +1 -0
- package/dist/contract/contract-git.d.ts +24 -0
- package/dist/contract/contract-git.d.ts.map +1 -0
- package/dist/contract/contract-git.js +144 -0
- package/dist/contract/contract-git.js.map +1 -0
- package/dist/contract/contract-hash.d.ts +7 -0
- package/dist/contract/contract-hash.d.ts.map +1 -0
- package/dist/contract/contract-hash.js +38 -0
- package/dist/contract/contract-hash.js.map +1 -0
- package/dist/contract/contract-report-file.d.ts +4 -0
- package/dist/contract/contract-report-file.d.ts.map +1 -0
- package/dist/contract/contract-report-file.js +60 -0
- package/dist/contract/contract-report-file.js.map +1 -0
- package/dist/contract/contract-schema.d.ts +92 -0
- package/dist/contract/contract-schema.d.ts.map +1 -0
- package/dist/contract/contract-schema.js +124 -0
- package/dist/contract/contract-schema.js.map +1 -0
- package/dist/contract/contract-units.d.ts +12 -0
- package/dist/contract/contract-units.d.ts.map +1 -0
- package/dist/contract/contract-units.js +96 -0
- package/dist/contract/contract-units.js.map +1 -0
- package/dist/contract/contracts-lock-file.d.ts +24 -0
- package/dist/contract/contracts-lock-file.d.ts.map +1 -0
- package/dist/contract/contracts-lock-file.js +141 -0
- package/dist/contract/contracts-lock-file.js.map +1 -0
- package/dist/contract/data-normalize.d.ts +10 -0
- package/dist/contract/data-normalize.d.ts.map +1 -0
- package/dist/contract/data-normalize.js +110 -0
- package/dist/contract/data-normalize.js.map +1 -0
- package/dist/contract/derive-free-feature.d.ts +49 -0
- package/dist/contract/derive-free-feature.d.ts.map +1 -0
- package/dist/contract/derive-free-feature.js +183 -0
- package/dist/contract/derive-free-feature.js.map +1 -0
- package/dist/contract/field-semantic-redaction.d.ts +21 -0
- package/dist/contract/field-semantic-redaction.d.ts.map +1 -0
- package/dist/contract/field-semantic-redaction.js +118 -0
- package/dist/contract/field-semantic-redaction.js.map +1 -0
- package/dist/contract/free-feature-blocks.d.ts +10 -0
- package/dist/contract/free-feature-blocks.d.ts.map +1 -0
- package/dist/contract/free-feature-blocks.js +94 -0
- package/dist/contract/free-feature-blocks.js.map +1 -0
- package/dist/contract/lock-secret-guard.d.ts +22 -0
- package/dist/contract/lock-secret-guard.d.ts.map +1 -0
- package/dist/contract/lock-secret-guard.js +134 -0
- package/dist/contract/lock-secret-guard.js.map +1 -0
- package/dist/contract/lock-vs-git-head.d.ts +26 -0
- package/dist/contract/lock-vs-git-head.d.ts.map +1 -0
- package/dist/contract/lock-vs-git-head.js +28 -0
- package/dist/contract/lock-vs-git-head.js.map +1 -0
- package/dist/contract/normalize-contract-step.d.ts +21 -0
- package/dist/contract/normalize-contract-step.d.ts.map +1 -0
- package/dist/contract/normalize-contract-step.js +70 -0
- package/dist/contract/normalize-contract-step.js.map +1 -0
- package/dist/contract/normalize-feature-steps.d.ts +7 -0
- package/dist/contract/normalize-feature-steps.d.ts.map +1 -0
- package/dist/contract/normalize-feature-steps.js +127 -0
- package/dist/contract/normalize-feature-steps.js.map +1 -0
- package/dist/contract/oracle-strength.d.ts +12 -0
- package/dist/contract/oracle-strength.d.ts.map +1 -0
- package/dist/contract/oracle-strength.js +88 -0
- package/dist/contract/oracle-strength.js.map +1 -0
- package/dist/contract/project-contract-blockers.d.ts +10 -0
- package/dist/contract/project-contract-blockers.d.ts.map +1 -0
- package/dist/contract/project-contract-blockers.js +75 -0
- package/dist/contract/project-contract-blockers.js.map +1 -0
- package/dist/contract/record-contract-approval.d.ts +36 -0
- package/dist/contract/record-contract-approval.d.ts.map +1 -0
- package/dist/contract/record-contract-approval.js +126 -0
- package/dist/contract/record-contract-approval.js.map +1 -0
- package/dist/contract/render-free-gherkin.d.ts +42 -0
- package/dist/contract/render-free-gherkin.d.ts.map +1 -0
- package/dist/contract/render-free-gherkin.js +147 -0
- package/dist/contract/render-free-gherkin.js.map +1 -0
- package/dist/contract/render-trace-sentence.d.ts +20 -0
- package/dist/contract/render-trace-sentence.d.ts.map +1 -0
- package/dist/contract/render-trace-sentence.js +109 -0
- package/dist/contract/render-trace-sentence.js.map +1 -0
- package/dist/contract/render-trace-target.d.ts +14 -0
- package/dist/contract/render-trace-target.d.ts.map +1 -0
- package/dist/contract/render-trace-target.js +70 -0
- package/dist/contract/render-trace-target.js.map +1 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts +20 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts.map +1 -0
- package/dist/contract/resolve-unit-trace-identities.js +62 -0
- package/dist/contract/resolve-unit-trace-identities.js.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts +44 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.js +219 -0
- package/dist/contract/trace/collect-trace-evidence.js.map +1 -0
- package/dist/contract/trace/identity-cache.d.ts +19 -0
- package/dist/contract/trace/identity-cache.d.ts.map +1 -0
- package/dist/contract/trace/identity-cache.js +104 -0
- package/dist/contract/trace/identity-cache.js.map +1 -0
- package/dist/contract/trace/read-file-once.d.ts +20 -0
- package/dist/contract/trace/read-file-once.d.ts.map +1 -0
- package/dist/contract/trace/read-file-once.js +135 -0
- package/dist/contract/trace/read-file-once.js.map +1 -0
- package/dist/contract/trace/scenario-id-claims.d.ts +11 -0
- package/dist/contract/trace/scenario-id-claims.d.ts.map +1 -0
- package/dist/contract/trace/scenario-id-claims.js +89 -0
- package/dist/contract/trace/scenario-id-claims.js.map +1 -0
- package/dist/contract/trace/select-final-attempt.d.ts +29 -0
- package/dist/contract/trace/select-final-attempt.d.ts.map +1 -0
- package/dist/contract/trace/select-final-attempt.js +119 -0
- package/dist/contract/trace/select-final-attempt.js.map +1 -0
- package/dist/contract/trace/snapshot-html-renderer.d.ts +31 -0
- package/dist/contract/trace/snapshot-html-renderer.d.ts.map +1 -0
- package/dist/contract/trace/snapshot-html-renderer.js +172 -0
- package/dist/contract/trace/snapshot-html-renderer.js.map +1 -0
- package/dist/contract/trace/snapshot-resolver.d.ts +21 -0
- package/dist/contract/trace/snapshot-resolver.d.ts.map +1 -0
- package/dist/contract/trace/snapshot-resolver.js +65 -0
- package/dist/contract/trace/snapshot-resolver.js.map +1 -0
- package/dist/contract/trace/snapshot-store.d.ts +66 -0
- package/dist/contract/trace/snapshot-store.d.ts.map +1 -0
- package/dist/contract/trace/snapshot-store.js +173 -0
- package/dist/contract/trace/snapshot-store.js.map +1 -0
- package/dist/contract/trace/target-identity.d.ts +74 -0
- package/dist/contract/trace/target-identity.d.ts.map +1 -0
- package/dist/contract/trace/target-identity.js +68 -0
- package/dist/contract/trace/target-identity.js.map +1 -0
- package/dist/contract/trace/test-step-join.d.ts +65 -0
- package/dist/contract/trace/test-step-join.d.ts.map +1 -0
- package/dist/contract/trace/test-step-join.js +80 -0
- package/dist/contract/trace/test-step-join.js.map +1 -0
- package/dist/contract/trace/trace-binding.d.ts +22 -0
- package/dist/contract/trace/trace-binding.d.ts.map +1 -0
- package/dist/contract/trace/trace-binding.js +91 -0
- package/dist/contract/trace/trace-binding.js.map +1 -0
- package/dist/contract/trace/trace-file-reader.d.ts +47 -0
- package/dist/contract/trace/trace-file-reader.d.ts.map +1 -0
- package/dist/contract/trace/trace-file-reader.js +137 -0
- package/dist/contract/trace/trace-file-reader.js.map +1 -0
- package/dist/contract/trace/trace-fingerprint.d.ts +22 -0
- package/dist/contract/trace/trace-fingerprint.d.ts.map +1 -0
- package/dist/contract/trace/trace-fingerprint.js +96 -0
- package/dist/contract/trace/trace-fingerprint.js.map +1 -0
- package/dist/contract/trace/trace-freshness.d.ts +27 -0
- package/dist/contract/trace/trace-freshness.d.ts.map +1 -0
- package/dist/contract/trace/trace-freshness.js +146 -0
- package/dist/contract/trace/trace-freshness.js.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts +28 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.js +87 -0
- package/dist/contract/trace/trace-identity-resolution.js.map +1 -0
- package/dist/contract/trace/trace-run-record.d.ts +32 -0
- package/dist/contract/trace/trace-run-record.d.ts.map +1 -0
- package/dist/contract/trace/trace-run-record.js +135 -0
- package/dist/contract/trace/trace-run-record.js.map +1 -0
- package/dist/contract/trace/trace-steps.d.ts +19 -0
- package/dist/contract/trace/trace-steps.d.ts.map +1 -0
- package/dist/contract/trace/trace-steps.js +79 -0
- package/dist/contract/trace/trace-steps.js.map +1 -0
- package/dist/contract/trace/trace-zip-limits.d.ts +45 -0
- package/dist/contract/trace/trace-zip-limits.d.ts.map +1 -0
- package/dist/contract/trace/trace-zip-limits.js +52 -0
- package/dist/contract/trace/trace-zip-limits.js.map +1 -0
- package/dist/contract/trace/trace-zip-reader.d.ts +10 -0
- package/dist/contract/trace/trace-zip-reader.d.ts.map +1 -0
- package/dist/contract/trace/trace-zip-reader.js +186 -0
- package/dist/contract/trace/trace-zip-reader.js.map +1 -0
- package/dist/contract/verify-approval-decisions.d.ts +5 -0
- package/dist/contract/verify-approval-decisions.d.ts.map +1 -0
- package/dist/contract/verify-approval-decisions.js +109 -0
- package/dist/contract/verify-approval-decisions.js.map +1 -0
- package/dist/decisions/append-decision.d.ts +12 -0
- package/dist/decisions/append-decision.d.ts.map +1 -0
- package/dist/decisions/append-decision.js +73 -0
- package/dist/decisions/append-decision.js.map +1 -0
- package/dist/decisions/confirmed-decision-commands.d.ts +41 -0
- package/dist/decisions/confirmed-decision-commands.d.ts.map +1 -0
- package/dist/decisions/confirmed-decision-commands.js +190 -0
- package/dist/decisions/confirmed-decision-commands.js.map +1 -0
- package/dist/decisions/decision-file.d.ts +31 -0
- package/dist/decisions/decision-file.d.ts.map +1 -0
- package/dist/decisions/decision-file.js +139 -0
- package/dist/decisions/decision-file.js.map +1 -0
- package/dist/decisions/decision-identity.d.ts +12 -0
- package/dist/decisions/decision-identity.d.ts.map +1 -0
- package/dist/decisions/decision-identity.js +78 -0
- package/dist/decisions/decision-identity.js.map +1 -0
- package/dist/decisions/decision-integrity-check.d.ts +12 -0
- package/dist/decisions/decision-integrity-check.d.ts.map +1 -0
- package/dist/decisions/decision-integrity-check.js +102 -0
- package/dist/decisions/decision-integrity-check.js.map +1 -0
- package/dist/decisions/decision-schema.d.ts +43 -0
- package/dist/decisions/decision-schema.d.ts.map +1 -0
- package/dist/decisions/decision-schema.js +76 -0
- package/dist/decisions/decision-schema.js.map +1 -0
- package/dist/decisions/decision-source.d.ts +2 -0
- package/dist/decisions/decision-source.d.ts.map +1 -0
- package/dist/decisions/decision-source.js +18 -0
- package/dist/decisions/decision-source.js.map +1 -0
- package/dist/decisions/exclusive-file-create.d.ts +3 -0
- package/dist/decisions/exclusive-file-create.d.ts.map +1 -0
- package/dist/decisions/exclusive-file-create.js +84 -0
- package/dist/decisions/exclusive-file-create.js.map +1 -0
- package/dist/decisions/git-head-trust.d.ts +19 -0
- package/dist/decisions/git-head-trust.d.ts.map +1 -0
- package/dist/decisions/git-head-trust.js +128 -0
- package/dist/decisions/git-head-trust.js.map +1 -0
- package/dist/decisions/human-confirmation.d.ts +35 -0
- package/dist/decisions/human-confirmation.d.ts.map +1 -0
- package/dist/decisions/human-confirmation.js +161 -0
- package/dist/decisions/human-confirmation.js.map +1 -0
- package/dist/decisions/legacy-waiver-migration.d.ts +38 -0
- package/dist/decisions/legacy-waiver-migration.d.ts.map +1 -0
- package/dist/decisions/legacy-waiver-migration.js +179 -0
- package/dist/decisions/legacy-waiver-migration.js.map +1 -0
- package/dist/decisions/read-decisions.d.ts +19 -0
- package/dist/decisions/read-decisions.d.ts.map +1 -0
- package/dist/decisions/read-decisions.js +90 -0
- package/dist/decisions/read-decisions.js.map +1 -0
- package/dist/decisions/viewpoint-baseline-adapter.d.ts +7 -0
- package/dist/decisions/viewpoint-baseline-adapter.d.ts.map +1 -0
- package/dist/decisions/viewpoint-baseline-adapter.js +109 -0
- package/dist/decisions/viewpoint-baseline-adapter.js.map +1 -0
- package/dist/decisions/waiver-decisions.d.ts +24 -0
- package/dist/decisions/waiver-decisions.d.ts.map +1 -0
- package/dist/decisions/waiver-decisions.js +46 -0
- package/dist/decisions/waiver-decisions.js.map +1 -0
- package/dist/exporters/csv-exporter.d.ts +11 -2
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +8 -4
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/matrix/build.d.ts +3 -0
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +10 -9
- package/dist/exporters/matrix/build.js.map +1 -1
- 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 +13 -4
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/gates.d.ts +6 -1
- package/dist/exporters/matrix/gates.d.ts.map +1 -1
- package/dist/exporters/matrix/gates.js +57 -128
- package/dist/exporters/matrix/gates.js.map +1 -1
- package/dist/exporters/matrix/render-csv.d.ts.map +1 -1
- package/dist/exporters/matrix/render-csv.js +3 -0
- package/dist/exporters/matrix/render-csv.js.map +1 -1
- package/dist/exporters/matrix/render-gate-overrides-sheet.d.ts +13 -0
- package/dist/exporters/matrix/render-gate-overrides-sheet.d.ts.map +1 -0
- package/dist/exporters/matrix/render-gate-overrides-sheet.js +44 -0
- package/dist/exporters/matrix/render-gate-overrides-sheet.js.map +1 -0
- package/dist/exporters/matrix/render-xlsx.d.ts +1 -0
- 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 +4 -1
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/matrix/xlsx-cells.js +1 -1
- package/dist/exporters/matrix/xlsx-cells.js.map +1 -1
- package/dist/exporters/test-data-resolver.d.ts.map +1 -1
- package/dist/exporters/test-data-resolver.js +2 -12
- package/dist/exporters/test-data-resolver.js.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +3 -2
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +4 -4
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
- package/dist/generators/gherkin-parser/index.js +0 -1
- package/dist/generators/gherkin-parser/index.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/contain-text-assertion.hbs +1 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/fill-action.hbs +1 -13
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -9
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +18 -4
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +3 -9
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +3 -9
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.d.ts +0 -8
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +8 -52
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.d.ts +0 -16
- package/dist/generators/test-generator/utils/data-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.js +0 -59
- package/dist/generators/test-generator/utils/data-resolver.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +2 -10
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/graph/board-human-actions.d.ts +5 -0
- package/dist/graph/board-human-actions.d.ts.map +1 -0
- package/dist/graph/board-human-actions.js +83 -0
- package/dist/graph/board-human-actions.js.map +1 -0
- package/dist/graph/evaluate-graph.d.ts +41 -0
- package/dist/graph/evaluate-graph.d.ts.map +1 -0
- package/dist/graph/evaluate-graph.js +77 -0
- package/dist/graph/evaluate-graph.js.map +1 -0
- package/dist/graph/human-action.d.ts +21 -0
- package/dist/graph/human-action.d.ts.map +1 -0
- package/dist/graph/human-action.js +3 -0
- package/dist/graph/human-action.js.map +1 -0
- package/dist/graph/locate-finding.d.ts +20 -0
- package/dist/graph/locate-finding.d.ts.map +1 -0
- package/dist/graph/locate-finding.js +137 -0
- package/dist/graph/locate-finding.js.map +1 -0
- package/dist/graph/manual-triage-decisions.d.ts +19 -0
- package/dist/graph/manual-triage-decisions.d.ts.map +1 -0
- package/dist/graph/manual-triage-decisions.js +53 -0
- package/dist/graph/manual-triage-decisions.js.map +1 -0
- package/dist/graph/node-decl.d.ts +75 -0
- package/dist/graph/node-decl.d.ts.map +1 -0
- package/dist/graph/node-decl.js +11 -0
- package/dist/graph/node-decl.js.map +1 -0
- package/dist/graph/nodes/core-node-catalog.d.ts +7 -0
- package/dist/graph/nodes/core-node-catalog.d.ts.map +1 -0
- package/dist/graph/nodes/core-node-catalog.js +13 -0
- package/dist/graph/nodes/core-node-catalog.js.map +1 -0
- package/dist/graph/nodes/test-case-contract-nodes.d.ts +21 -0
- package/dist/graph/nodes/test-case-contract-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-contract-nodes.js +72 -0
- package/dist/graph/nodes/test-case-contract-nodes.js.map +1 -0
- package/dist/graph/nodes/test-case-nodes.d.ts +29 -0
- package/dist/graph/nodes/test-case-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-nodes.js +95 -0
- package/dist/graph/nodes/test-case-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-audit-nodes.d.ts +18 -0
- package/dist/graph/nodes/unit-audit-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/unit-audit-nodes.js +96 -0
- package/dist/graph/nodes/unit-audit-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-contract-node.d.ts +21 -0
- package/dist/graph/nodes/unit-contract-node.d.ts.map +1 -0
- package/dist/graph/nodes/unit-contract-node.js +96 -0
- package/dist/graph/nodes/unit-contract-node.js.map +1 -0
- package/dist/graph/nodes/unit-design-nodes.d.ts +14 -0
- package/dist/graph/nodes/unit-design-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/unit-design-nodes.js +91 -0
- package/dist/graph/nodes/unit-design-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-execution-nodes.d.ts +16 -0
- package/dist/graph/nodes/unit-execution-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/unit-execution-nodes.js +79 -0
- package/dist/graph/nodes/unit-execution-nodes.js.map +1 -0
- package/dist/graph/test-case-identity.d.ts +13 -0
- package/dist/graph/test-case-identity.d.ts.map +1 -0
- package/dist/graph/test-case-identity.js +106 -0
- package/dist/graph/test-case-identity.js.map +1 -0
- package/dist/graph/test-case-results.d.ts +12 -0
- package/dist/graph/test-case-results.d.ts.map +1 -0
- package/dist/graph/test-case-results.js +161 -0
- package/dist/graph/test-case-results.js.map +1 -0
- package/dist/graph/test-case-satisfied.d.ts +26 -0
- package/dist/graph/test-case-satisfied.d.ts.map +1 -0
- package/dist/graph/test-case-satisfied.js +55 -0
- package/dist/graph/test-case-satisfied.js.map +1 -0
- package/dist/graph/test-case-state-shape.d.ts +73 -0
- package/dist/graph/test-case-state-shape.d.ts.map +1 -0
- package/dist/graph/test-case-state-shape.js +3 -0
- package/dist/graph/test-case-state-shape.js.map +1 -0
- package/dist/graph/test-case-states.d.ts +9 -0
- package/dist/graph/test-case-states.d.ts.map +1 -0
- package/dist/graph/test-case-states.js +116 -0
- package/dist/graph/test-case-states.js.map +1 -0
- package/dist/graph/unit-artifact-probes.d.ts +19 -0
- package/dist/graph/unit-artifact-probes.d.ts.map +1 -0
- package/dist/graph/unit-artifact-probes.js +135 -0
- package/dist/graph/unit-artifact-probes.js.map +1 -0
- package/dist/graph/unit-results-freshness.d.ts +29 -0
- package/dist/graph/unit-results-freshness.d.ts.map +1 -0
- package/dist/graph/unit-results-freshness.js +213 -0
- package/dist/graph/unit-results-freshness.js.map +1 -0
- package/dist/graph/unit-state-facts.d.ts +43 -0
- package/dist/graph/unit-state-facts.d.ts.map +1 -0
- package/dist/graph/unit-state-facts.js +87 -0
- package/dist/graph/unit-state-facts.js.map +1 -0
- package/dist/harness/audit.d.ts +14 -2
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +20 -21
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/gate-rules.yaml +647 -0
- package/dist/harness/defect-draft.d.ts.map +1 -1
- package/dist/harness/defect-draft.js +12 -2
- package/dist/harness/defect-draft.js.map +1 -1
- package/dist/harness/defects.d.ts +14 -0
- package/dist/harness/defects.d.ts.map +1 -1
- package/dist/harness/defects.js +14 -10
- package/dist/harness/defects.js.map +1 -1
- package/dist/harness/flow-check.d.ts +9 -0
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +11 -0
- package/dist/harness/flow-check.js.map +1 -1
- package/dist/harness/gates/audit-gate-terms.d.ts +41 -0
- package/dist/harness/gates/audit-gate-terms.d.ts.map +1 -0
- package/dist/harness/gates/audit-gate-terms.js +72 -0
- package/dist/harness/gates/audit-gate-terms.js.map +1 -0
- package/dist/harness/gates/audit-gate-verdict.d.ts +31 -0
- package/dist/harness/gates/audit-gate-verdict.d.ts.map +1 -0
- package/dist/harness/gates/audit-gate-verdict.js +102 -0
- package/dist/harness/gates/audit-gate-verdict.js.map +1 -0
- package/dist/harness/gates/audit-input-hash.d.ts +6 -0
- package/dist/harness/gates/audit-input-hash.d.ts.map +1 -0
- package/dist/harness/gates/audit-input-hash.js +124 -0
- package/dist/harness/gates/audit-input-hash.js.map +1 -0
- package/dist/harness/gates/audit-report-verification.d.ts +43 -0
- package/dist/harness/gates/audit-report-verification.d.ts.map +1 -0
- package/dist/harness/gates/audit-report-verification.js +241 -0
- package/dist/harness/gates/audit-report-verification.js.map +1 -0
- package/dist/harness/gates/decisions-hash.d.ts +13 -0
- package/dist/harness/gates/decisions-hash.d.ts.map +1 -0
- package/dist/harness/gates/decisions-hash.js +72 -0
- package/dist/harness/gates/decisions-hash.js.map +1 -0
- package/dist/harness/gates/delivery-checklist.d.ts +24 -0
- package/dist/harness/gates/delivery-checklist.d.ts.map +1 -0
- package/dist/harness/gates/delivery-checklist.js +161 -0
- package/dist/harness/gates/delivery-checklist.js.map +1 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts +33 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts.map +1 -0
- package/dist/harness/gates/delivery-decision-gate.js +116 -0
- package/dist/harness/gates/delivery-decision-gate.js.map +1 -0
- package/dist/harness/gates/delivery-decision-step.d.ts +19 -0
- package/dist/harness/gates/delivery-decision-step.d.ts.map +1 -0
- package/dist/harness/gates/delivery-decision-step.js +86 -0
- package/dist/harness/gates/delivery-decision-step.js.map +1 -0
- package/dist/harness/gates/gate-override-report.d.ts +59 -0
- package/dist/harness/gates/gate-override-report.d.ts.map +1 -0
- package/dist/harness/gates/gate-override-report.js +86 -0
- package/dist/harness/gates/gate-override-report.js.map +1 -0
- package/dist/harness/gates/gate-override-scope.d.ts +18 -0
- package/dist/harness/gates/gate-override-scope.d.ts.map +1 -0
- package/dist/harness/gates/gate-override-scope.js +98 -0
- package/dist/harness/gates/gate-override-scope.js.map +1 -0
- package/dist/harness/gates/gate-override-validation.d.ts +25 -0
- package/dist/harness/gates/gate-override-validation.d.ts.map +1 -0
- package/dist/harness/gates/gate-override-validation.js +81 -0
- package/dist/harness/gates/gate-override-validation.js.map +1 -0
- package/dist/harness/gates/gate-rule-catalog.d.ts +24 -0
- package/dist/harness/gates/gate-rule-catalog.d.ts.map +1 -0
- package/dist/harness/gates/gate-rule-catalog.js +112 -0
- package/dist/harness/gates/gate-rule-catalog.js.map +1 -0
- package/dist/harness/gates/gate-terms.d.ts +33 -0
- package/dist/harness/gates/gate-terms.d.ts.map +1 -0
- package/dist/harness/gates/gate-terms.js +41 -0
- package/dist/harness/gates/gate-terms.js.map +1 -0
- package/dist/harness/gates/in-run-decision-check.d.ts +21 -0
- package/dist/harness/gates/in-run-decision-check.d.ts.map +1 -0
- package/dist/harness/gates/in-run-decision-check.js +166 -0
- package/dist/harness/gates/in-run-decision-check.js.map +1 -0
- package/dist/harness/gates/journey-gate-inputs.d.ts +37 -0
- package/dist/harness/gates/journey-gate-inputs.d.ts.map +1 -0
- package/dist/harness/gates/journey-gate-inputs.js +81 -0
- package/dist/harness/gates/journey-gate-inputs.js.map +1 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.d.ts +13 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.d.ts.map +1 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.js +141 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.js.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts +16 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.js +114 -0
- package/dist/harness/gates/migrated-waiver-review.js.map +1 -0
- package/dist/harness/gates/resolve-rule.d.ts +59 -0
- package/dist/harness/gates/resolve-rule.d.ts.map +1 -0
- package/dist/harness/gates/resolve-rule.js +41 -0
- package/dist/harness/gates/resolve-rule.js.map +1 -0
- package/dist/harness/gates/unit-gate-overrides.d.ts +25 -0
- package/dist/harness/gates/unit-gate-overrides.d.ts.map +1 -0
- package/dist/harness/gates/unit-gate-overrides.js +122 -0
- package/dist/harness/gates/unit-gate-overrides.js.map +1 -0
- package/dist/harness/journey.d.ts +64 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +258 -34
- package/dist/harness/journey.js.map +1 -1
- package/dist/harness/manifest.d.ts +12 -0
- package/dist/harness/manifest.d.ts.map +1 -1
- package/dist/harness/manifest.js +71 -43
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/next-step.d.ts +58 -4
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +55 -204
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts +7 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +18 -2
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/provenance.d.ts +29 -0
- package/dist/harness/provenance.d.ts.map +1 -1
- package/dist/harness/provenance.js +109 -9
- package/dist/harness/provenance.js.map +1 -1
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +22 -5
- package/dist/harness/script-check.js.map +1 -1
- package/dist/harness/sensors.d.ts +14 -3
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +41 -38
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/triage-manual-classification.d.ts +32 -0
- package/dist/harness/triage-manual-classification.d.ts.map +1 -0
- package/dist/harness/triage-manual-classification.js +56 -0
- package/dist/harness/triage-manual-classification.js.map +1 -0
- package/dist/harness/unit-paths.d.ts +8 -0
- package/dist/harness/unit-paths.d.ts.map +1 -1
- package/dist/harness/unit-paths.js +23 -1
- package/dist/harness/unit-paths.js.map +1 -1
- package/dist/hooks/bash-read-only-segment.d.ts +9 -0
- package/dist/hooks/bash-read-only-segment.d.ts.map +1 -0
- package/dist/hooks/bash-read-only-segment.js +168 -0
- package/dist/hooks/bash-read-only-segment.js.map +1 -0
- package/dist/hooks/bash-write-targets.d.ts +25 -0
- package/dist/hooks/bash-write-targets.d.ts.map +1 -0
- package/dist/hooks/bash-write-targets.js +266 -0
- package/dist/hooks/bash-write-targets.js.map +1 -0
- package/dist/hooks/claude-hook-entry.d.ts +11 -0
- package/dist/hooks/claude-hook-entry.d.ts.map +1 -0
- package/dist/hooks/claude-hook-entry.js +137 -0
- package/dist/hooks/claude-hook-entry.js.map +1 -0
- package/dist/hooks/claude-transcript-turn.d.ts +11 -0
- package/dist/hooks/claude-transcript-turn.d.ts.map +1 -0
- package/dist/hooks/claude-transcript-turn.js +143 -0
- package/dist/hooks/claude-transcript-turn.js.map +1 -0
- package/dist/hooks/guard-delivery-contract-rule.d.ts +10 -0
- package/dist/hooks/guard-delivery-contract-rule.d.ts.map +1 -0
- package/dist/hooks/guard-delivery-contract-rule.js +152 -0
- package/dist/hooks/guard-delivery-contract-rule.js.map +1 -0
- package/dist/hooks/guard-protected-paths.d.ts +13 -0
- package/dist/hooks/guard-protected-paths.d.ts.map +1 -0
- package/dist/hooks/guard-protected-paths.js +116 -0
- package/dist/hooks/guard-protected-paths.js.map +1 -0
- package/dist/hooks/guard-rules.d.ts +20 -0
- package/dist/hooks/guard-rules.d.ts.map +1 -0
- package/dist/hooks/guard-rules.js +130 -0
- package/dist/hooks/guard-rules.js.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts +17 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.js +22 -0
- package/dist/hooks/guard-tty-spoof-rule.js.map +1 -0
- package/dist/hooks/hand-back-core.d.ts +42 -0
- package/dist/hooks/hand-back-core.d.ts.map +1 -0
- package/dist/hooks/hand-back-core.js +128 -0
- package/dist/hooks/hand-back-core.js.map +1 -0
- package/dist/hooks/hook-cli-command.d.ts +9 -0
- package/dist/hooks/hook-cli-command.d.ts.map +1 -0
- package/dist/hooks/hook-cli-command.js +46 -0
- package/dist/hooks/hook-cli-command.js.map +1 -0
- package/dist/hooks/hook-registry.d.ts +10 -0
- package/dist/hooks/hook-registry.d.ts.map +1 -0
- package/dist/hooks/hook-registry.js +24 -0
- package/dist/hooks/hook-registry.js.map +1 -0
- package/dist/hooks/hook-result-contract.d.ts +50 -0
- package/dist/hooks/hook-result-contract.d.ts.map +1 -0
- package/dist/hooks/hook-result-contract.js +80 -0
- package/dist/hooks/hook-result-contract.js.map +1 -0
- package/dist/hooks/hook-toggles.d.ts +10 -0
- package/dist/hooks/hook-toggles.d.ts.map +1 -0
- package/dist/hooks/hook-toggles.js +107 -0
- package/dist/hooks/hook-toggles.js.map +1 -0
- package/dist/hooks/pre-tool-guard-hook.d.ts +10 -0
- package/dist/hooks/pre-tool-guard-hook.d.ts.map +1 -0
- package/dist/hooks/pre-tool-guard-hook.js +105 -0
- package/dist/hooks/pre-tool-guard-hook.js.map +1 -0
- package/dist/hooks/session-start-unit-state-hook.d.ts +14 -0
- package/dist/hooks/session-start-unit-state-hook.d.ts.map +1 -0
- package/dist/hooks/session-start-unit-state-hook.js +60 -0
- package/dist/hooks/session-start-unit-state-hook.js.map +1 -0
- package/dist/hooks/stop-next-step-hook.d.ts +16 -0
- package/dist/hooks/stop-next-step-hook.d.ts.map +1 -0
- package/dist/hooks/stop-next-step-hook.js +43 -0
- package/dist/hooks/stop-next-step-hook.js.map +1 -0
- package/dist/hooks/sungen-project-root.d.ts +19 -0
- package/dist/hooks/sungen-project-root.d.ts.map +1 -0
- package/dist/hooks/sungen-project-root.js +130 -0
- package/dist/hooks/sungen-project-root.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/ai-skills/command-partial-includes.d.ts +15 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.js +106 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.js.map +1 -0
- package/dist/orchestrator/ai-skills/commands.d.ts +5 -1
- package/dist/orchestrator/ai-skills/commands.d.ts.map +1 -1
- package/dist/orchestrator/ai-skills/commands.js +11 -3
- package/dist/orchestrator/ai-skills/commands.js.map +1 -1
- package/dist/orchestrator/assets-drift.d.ts +5 -0
- package/dist/orchestrator/assets-drift.d.ts.map +1 -1
- package/dist/orchestrator/assets-drift.js +12 -3
- package/dist/orchestrator/assets-drift.js.map +1 -1
- package/dist/orchestrator/claude-hooks-install.d.ts +27 -0
- package/dist/orchestrator/claude-hooks-install.d.ts.map +1 -0
- package/dist/orchestrator/claude-hooks-install.js +203 -0
- package/dist/orchestrator/claude-hooks-install.js.map +1 -0
- package/dist/orchestrator/lockstep-version.d.ts +15 -5
- package/dist/orchestrator/lockstep-version.d.ts.map +1 -1
- package/dist/orchestrator/lockstep-version.js +30 -17
- package/dist/orchestrator/lockstep-version.js.map +1 -1
- package/dist/orchestrator/project-initializer.d.ts +6 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +24 -0
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/add-api.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/add-flow.md +6 -26
- package/dist/orchestrator/templates/ai-src/commands/add-screen.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/create-data-test.md +1 -0
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +17 -16
- package/dist/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +4 -0
- package/dist/orchestrator/templates/ai-src/commands/design.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/feedback.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/locale.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/review.md +4 -0
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +6 -8
- package/dist/orchestrator/templates/ai-src/partials/hand-back-rule.claude.md +20 -0
- package/dist/orchestrator/templates/ai-src/partials/hand-back-rule.codex.md +20 -0
- package/dist/orchestrator/templates/ai-src/partials/hand-back-rule.copilot.md +20 -0
- package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.claude.md +11 -0
- package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.codex.md +11 -0
- package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.copilot.md +11 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +1 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -5
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +8 -24
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +3 -4
- package/dist/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/dist/orchestrator/templates/specs-test-data.ts +4 -22
- package/dist/utils/safe-yaml-parse.d.ts +8 -0
- package/dist/utils/safe-yaml-parse.d.ts.map +1 -0
- package/dist/utils/safe-yaml-parse.js +51 -0
- package/dist/utils/safe-yaml-parse.js.map +1 -0
- package/package.json +3 -3
- package/src/basis/anchor-grammar.ts +83 -0
- package/src/basis/anchor-hash.ts +27 -0
- package/src/basis/bm51-tables.ts +65 -0
- package/src/basis/extract-spec-anchors.ts +95 -0
- package/src/basis/migration-sentinel.ts +175 -0
- package/src/basis/spec-frontmatter.ts +68 -0
- package/src/basis/spec-sections.ts +35 -0
- package/src/basis/test-basis-schema.ts +81 -0
- package/src/capabilities/discover.ts +15 -2
- package/src/capabilities/registry.ts +16 -0
- package/src/cli/case-triage-hint.ts +31 -0
- package/src/cli/commands/audit.ts +1 -1
- package/src/cli/commands/capability.ts +1 -1
- package/src/cli/commands/contract-derive-command.ts +72 -0
- package/src/cli/commands/contract.ts +164 -0
- package/src/cli/commands/delivery.ts +106 -19
- package/src/cli/commands/gate.ts +2 -1
- package/src/cli/commands/generate.ts +16 -3
- package/src/cli/commands/journey.ts +45 -18
- package/src/cli/commands/next.ts +92 -11
- package/src/cli/commands/triage.ts +41 -3
- package/src/cli/commands/update.ts +41 -10
- package/src/cli/index.ts +24 -30
- package/src/cli/json-error-on-exit.ts +72 -0
- package/src/cli/project-sungen-invocation.ts +59 -0
- package/src/cli/run-command-hints.ts +47 -0
- package/src/cli/waiting-for-you-block.ts +27 -0
- package/src/contract/accept-opaque-steps.ts +114 -0
- package/src/contract/approve-contract.ts +101 -0
- package/src/contract/assertion-matcher-vocabulary.ts +93 -0
- package/src/contract/build-contract-verdict.ts +108 -0
- package/src/contract/build-trace-conformance.ts +103 -0
- package/src/contract/classify-contract-change.ts +92 -0
- package/src/contract/classify-contract-unit.ts +47 -0
- package/src/contract/classify-trace-conformance.ts +170 -0
- package/src/contract/contract-git.ts +106 -0
- package/src/contract/contract-hash.ts +34 -0
- package/src/contract/contract-report-file.ts +25 -0
- package/src/contract/contract-schema.ts +166 -0
- package/src/contract/contract-units.ts +52 -0
- package/src/contract/contracts-lock-file.ts +98 -0
- package/src/contract/data-normalize.ts +66 -0
- package/src/contract/derive-free-feature.ts +153 -0
- package/src/contract/field-semantic-redaction.ts +80 -0
- package/src/contract/free-feature-blocks.ts +56 -0
- package/src/contract/lock-secret-guard.ts +95 -0
- package/src/contract/lock-vs-git-head.ts +38 -0
- package/src/contract/normalize-contract-step.ts +74 -0
- package/src/contract/normalize-feature-steps.ts +93 -0
- package/src/contract/oracle-strength.ts +80 -0
- package/src/contract/project-contract-blockers.ts +38 -0
- package/src/contract/record-contract-approval.ts +110 -0
- package/src/contract/render-free-gherkin.ts +118 -0
- package/src/contract/render-trace-sentence.ts +98 -0
- package/src/contract/render-trace-target.ts +68 -0
- package/src/contract/resolve-unit-trace-identities.ts +58 -0
- package/src/contract/trace/collect-trace-evidence.ts +178 -0
- package/src/contract/trace/identity-cache.ts +61 -0
- package/src/contract/trace/read-file-once.ts +95 -0
- package/src/contract/trace/scenario-id-claims.ts +60 -0
- package/src/contract/trace/select-final-attempt.ts +77 -0
- package/src/contract/trace/snapshot-html-renderer.ts +136 -0
- package/src/contract/trace/snapshot-resolver.ts +66 -0
- package/src/contract/trace/snapshot-store.ts +151 -0
- package/src/contract/trace/target-identity.ts +104 -0
- package/src/contract/trace/test-step-join.ts +104 -0
- package/src/contract/trace/trace-binding.ts +59 -0
- package/src/contract/trace/trace-file-reader.ts +144 -0
- package/src/contract/trace/trace-fingerprint.ts +68 -0
- package/src/contract/trace/trace-freshness.ts +110 -0
- package/src/contract/trace/trace-identity-resolution.ts +77 -0
- package/src/contract/trace/trace-run-record.ts +96 -0
- package/src/contract/trace/trace-steps.ts +88 -0
- package/src/contract/trace/trace-zip-limits.ts +77 -0
- package/src/contract/trace/trace-zip-reader.ts +127 -0
- package/src/contract/verify-approval-decisions.ts +64 -0
- package/src/decisions/append-decision.ts +35 -0
- package/src/decisions/confirmed-decision-commands.ts +149 -0
- package/src/decisions/decision-file.ts +93 -0
- package/src/decisions/decision-identity.ts +73 -0
- package/src/decisions/decision-integrity-check.ts +61 -0
- package/src/decisions/decision-schema.ts +77 -0
- package/src/decisions/decision-source.ts +14 -0
- package/src/decisions/exclusive-file-create.ts +42 -0
- package/src/decisions/git-head-trust.ts +76 -0
- package/src/decisions/human-confirmation.ts +119 -0
- package/src/decisions/legacy-waiver-migration.ts +146 -0
- package/src/decisions/read-decisions.ts +61 -0
- package/src/decisions/viewpoint-baseline-adapter.ts +74 -0
- package/src/decisions/waiver-decisions.ts +56 -0
- package/src/exporters/csv-exporter.ts +12 -4
- package/src/exporters/matrix/build.ts +11 -9
- package/src/exporters/matrix/export.ts +16 -4
- package/src/exporters/matrix/gates.ts +62 -129
- package/src/exporters/matrix/render-csv.ts +3 -0
- package/src/exporters/matrix/render-gate-overrides-sheet.ts +50 -0
- package/src/exporters/matrix/render-xlsx.ts +3 -0
- package/src/exporters/matrix/types.ts +4 -1
- package/src/exporters/matrix/xlsx-cells.ts +1 -1
- package/src/exporters/test-data-resolver.ts +2 -10
- package/src/exporters/xlsx-exporter.ts +5 -4
- package/src/generators/gherkin-parser/index.ts +0 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/contain-text-assertion.hbs +1 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/fill-action.hbs +1 -13
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -9
- package/src/generators/test-generator/code-generator.ts +17 -4
- package/src/generators/test-generator/diagnostics.ts +3 -9
- package/src/generators/test-generator/patterns/types.ts +0 -2
- package/src/generators/test-generator/step-mapper.ts +9 -56
- package/src/generators/test-generator/utils/data-resolver.ts +0 -53
- package/src/generators/test-generator/utils/selector-resolver.ts +2 -10
- package/src/graph/board-human-actions.ts +80 -0
- package/src/graph/evaluate-graph.ts +97 -0
- package/src/graph/human-action.ts +33 -0
- package/src/graph/locate-finding.ts +93 -0
- package/src/graph/manual-triage-decisions.ts +55 -0
- package/src/graph/node-decl.ts +83 -0
- package/src/graph/nodes/core-node-catalog.ts +15 -0
- package/src/graph/nodes/test-case-contract-nodes.ts +90 -0
- package/src/graph/nodes/test-case-nodes.ts +100 -0
- package/src/graph/nodes/unit-audit-nodes.ts +96 -0
- package/src/graph/nodes/unit-contract-node.ts +100 -0
- package/src/graph/nodes/unit-design-nodes.ts +89 -0
- package/src/graph/nodes/unit-execution-nodes.ts +77 -0
- package/src/graph/test-case-identity.ts +75 -0
- package/src/graph/test-case-results.ts +111 -0
- package/src/graph/test-case-satisfied.ts +58 -0
- package/src/graph/test-case-state-shape.ts +67 -0
- package/src/graph/test-case-states.ts +84 -0
- package/src/graph/unit-artifact-probes.ts +79 -0
- package/src/graph/unit-results-freshness.ts +165 -0
- package/src/graph/unit-state-facts.ts +112 -0
- package/src/harness/audit.ts +31 -18
- package/src/harness/catalog/gate-rules.yaml +647 -0
- package/src/harness/defect-draft.ts +13 -2
- package/src/harness/defects.ts +22 -9
- package/src/harness/flow-check.ts +11 -0
- package/src/harness/gates/audit-gate-terms.ts +80 -0
- package/src/harness/gates/audit-gate-verdict.ts +79 -0
- package/src/harness/gates/audit-input-hash.ts +79 -0
- package/src/harness/gates/audit-report-verification.ts +206 -0
- package/src/harness/gates/decisions-hash.ts +42 -0
- package/src/harness/gates/delivery-checklist.ts +152 -0
- package/src/harness/gates/delivery-decision-gate.ts +139 -0
- package/src/harness/gates/delivery-decision-step.ts +89 -0
- package/src/harness/gates/gate-override-report.ts +114 -0
- package/src/harness/gates/gate-override-scope.ts +66 -0
- package/src/harness/gates/gate-override-validation.ts +75 -0
- package/src/harness/gates/gate-rule-catalog.ts +82 -0
- package/src/harness/gates/gate-terms.ts +59 -0
- package/src/harness/gates/in-run-decision-check.ts +124 -0
- package/src/harness/gates/journey-gate-inputs.ts +89 -0
- package/src/harness/gates/migrated-waiver-import-bounds.ts +103 -0
- package/src/harness/gates/migrated-waiver-review.ts +121 -0
- package/src/harness/gates/resolve-rule.ts +94 -0
- package/src/harness/gates/unit-gate-overrides.ts +99 -0
- package/src/harness/journey.ts +287 -39
- package/src/harness/manifest.ts +67 -43
- package/src/harness/next-step.ts +91 -193
- package/src/harness/parse.ts +20 -2
- package/src/harness/provenance.ts +99 -11
- package/src/harness/script-check.ts +20 -5
- package/src/harness/sensors.ts +47 -40
- package/src/harness/triage-manual-classification.ts +76 -0
- package/src/harness/unit-paths.ts +19 -0
- package/src/hooks/bash-read-only-segment.ts +130 -0
- package/src/hooks/bash-write-targets.ts +195 -0
- package/src/hooks/claude-hook-entry.ts +85 -0
- package/src/hooks/claude-transcript-turn.ts +96 -0
- package/src/hooks/guard-delivery-contract-rule.ts +110 -0
- package/src/hooks/guard-protected-paths.ts +80 -0
- package/src/hooks/guard-rules.ts +117 -0
- package/src/hooks/guard-tty-spoof-rule.ts +34 -0
- package/src/hooks/hand-back-core.ts +118 -0
- package/src/hooks/hook-cli-command.ts +17 -0
- package/src/hooks/hook-registry.ts +24 -0
- package/src/hooks/hook-result-contract.ts +114 -0
- package/src/hooks/hook-toggles.ts +66 -0
- package/src/hooks/pre-tool-guard-hook.ts +67 -0
- package/src/hooks/session-start-unit-state-hook.ts +59 -0
- package/src/hooks/stop-next-step-hook.ts +38 -0
- package/src/hooks/sungen-project-root.ts +80 -0
- package/src/index.ts +1 -2
- package/src/orchestrator/ai-skills/command-partial-includes.ts +72 -0
- package/src/orchestrator/ai-skills/commands.ts +17 -5
- package/src/orchestrator/assets-drift.ts +12 -5
- package/src/orchestrator/claude-hooks-install.ts +168 -0
- package/src/orchestrator/lockstep-version.ts +28 -15
- package/src/orchestrator/project-initializer.ts +22 -0
- package/src/orchestrator/templates/ai-src/commands/add-api.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/add-flow.md +6 -26
- package/src/orchestrator/templates/ai-src/commands/add-screen.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/create-data-test.md +1 -0
- package/src/orchestrator/templates/ai-src/commands/create-test.md +17 -16
- package/src/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/delivery.md +4 -0
- package/src/orchestrator/templates/ai-src/commands/design.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/feedback.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/locale.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/review.md +4 -0
- package/src/orchestrator/templates/ai-src/commands/run-test.md +6 -8
- package/src/orchestrator/templates/ai-src/partials/hand-back-rule.claude.md +20 -0
- package/src/orchestrator/templates/ai-src/partials/hand-back-rule.codex.md +20 -0
- package/src/orchestrator/templates/ai-src/partials/hand-back-rule.copilot.md +20 -0
- package/src/orchestrator/templates/ai-src/partials/waiting-for-you.claude.md +11 -0
- package/src/orchestrator/templates/ai-src/partials/waiting-for-you.codex.md +11 -0
- package/src/orchestrator/templates/ai-src/partials/waiting-for-you.copilot.md +11 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +1 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -5
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +8 -24
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +3 -4
- package/src/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/src/orchestrator/templates/specs-test-data.ts +4 -22
- package/src/utils/safe-yaml-parse.ts +44 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/expanded-assertion.hbs +0 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/date-picker-unsupported.hbs +0 -5
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/expanded-assertion.hbs +0 -12
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/expanded-assertion.hbs +0 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/date-picker-unsupported.hbs +0 -5
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/expanded-assertion.hbs +0 -12
|
@@ -9,6 +9,7 @@ import { parseResetTier, DEFAULT_RESET_TIER } from './reset-tier';
|
|
|
9
9
|
import { capabilityRegistry } from '../../capabilities/registry';
|
|
10
10
|
import { discoverAndRegisterCapabilities } from '../../capabilities/discover';
|
|
11
11
|
import { readCapabilities } from '../../harness/capability';
|
|
12
|
+
import { isHandWritten } from '../../harness/parse';
|
|
12
13
|
import { parseManualComments } from '../../exporters/scenario-merger';
|
|
13
14
|
import { isPresencePlaceholderHybrid } from '../../exporters/manual-hybrid-oracle';
|
|
14
15
|
import { findSyntaxError } from './utils/spec-syntax-check';
|
|
@@ -780,6 +781,12 @@ export class CodeGenerator {
|
|
|
780
781
|
|
|
781
782
|
const renderedScenarios: Array<{ code: string; authRole?: string; noAuth?: boolean }> = [];
|
|
782
783
|
for (const scenario of feature.scenarios) {
|
|
784
|
+
// @free / @impl:code / @proposed: implemented by hand-written code and proven by its trace —
|
|
785
|
+
// never compiled (DOS-14.8). The same predicate script-check uses, so the counts agree.
|
|
786
|
+
if (!scenario.stepsName && !scenario.hookType && isHandWritten([...(feature.tags || []), ...(scenario.tags || [])], feature.sourceFile)) {
|
|
787
|
+
console.log(` ⊘ Skipped hand-written scenario: ${scenario.name}`);
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
783
790
|
if (isManual(scenario.tags)) {
|
|
784
791
|
// SG-W008 — two-direction rule for @manual scenarios:
|
|
785
792
|
// • HAS Gherkin steps → the Gherkin must be COMPLETE: Given/When/Then. A dangling
|
|
@@ -1187,9 +1194,9 @@ export class CodeGenerator {
|
|
|
1187
1194
|
): { preconditions: CapabilityPrecondition[]; casesDataset?: string } {
|
|
1188
1195
|
this.stepMapper.setScenarioContext(stepsToMap);
|
|
1189
1196
|
|
|
1190
|
-
// Data-driven (@cases): the scenario's {{col}} refs
|
|
1191
|
-
// only at runtime —
|
|
1192
|
-
//
|
|
1197
|
+
// Data-driven (@cases): the scenario's {{col}} refs are dataset *row columns* that
|
|
1198
|
+
// exist only at runtime — register them as captured so they resolve to a runtime
|
|
1199
|
+
// get() (→ rowData.get) instead of compile-time YAML lookup.
|
|
1193
1200
|
const casesTag = scenario.tags.find((t) => t.startsWith('@cases:'));
|
|
1194
1201
|
const casesDataset = casesTag ? casesTag.slice('@cases:'.length).trim() : undefined;
|
|
1195
1202
|
if (casesDataset) {
|
|
@@ -1197,7 +1204,7 @@ export class CodeGenerator {
|
|
|
1197
1204
|
for (const st of stepsToMap) {
|
|
1198
1205
|
for (const m of (st.text || '').matchAll(/\{\{\s*([\w.]+)\s*\}\}/g)) refs.add(m[1]);
|
|
1199
1206
|
}
|
|
1200
|
-
this.stepMapper.
|
|
1207
|
+
for (const r of refs) this.stepMapper.registerCaptured(r);
|
|
1201
1208
|
}
|
|
1202
1209
|
|
|
1203
1210
|
const preconditions = this.capabilityPreconditions(scenario);
|
|
@@ -1458,6 +1465,12 @@ export class CodeGenerator {
|
|
|
1458
1465
|
console.log(`⊘ Skipped @manual feature: ${feature.name}`);
|
|
1459
1466
|
continue;
|
|
1460
1467
|
}
|
|
1468
|
+
// A feature whose scenarios are all hand-written (a derived *.free.feature) emits no spec.
|
|
1469
|
+
const own = feature.scenarios.filter((sc) => !sc.stepsName && !sc.hookType);
|
|
1470
|
+
if (own.length && own.every((sc) => isHandWritten([...(feature.tags || []), ...(sc.tags || [])], feature.sourceFile))) {
|
|
1471
|
+
console.log(`⊘ Skipped hand-written feature: ${feature.name}`);
|
|
1472
|
+
continue;
|
|
1473
|
+
}
|
|
1461
1474
|
|
|
1462
1475
|
try {
|
|
1463
1476
|
const generatedTest = await this.generateTest(feature, outputDir);
|
|
@@ -49,8 +49,7 @@
|
|
|
49
49
|
* nothing for the query half to assert, so the step checks the PATH only. Not an
|
|
50
50
|
* error (the value may legitimately vary per environment), but the step asserts
|
|
51
51
|
* strictly less than it appears to
|
|
52
|
-
* SG-W015 — `see [X] card/item with {{n}}` where the value is a bare number
|
|
53
|
-
* any row), or `see [X] row with {{n}}` whose @cases rows mix numbers and text: this compiles
|
|
52
|
+
* SG-W015 — `see [X] card/item with {{n}}` where the value is a bare number: this compiles
|
|
54
53
|
* to a TEXT assertion (toHaveText('3')), NOT a count — an author reaching for
|
|
55
54
|
* "3 cards are shown" gets an assertion that can only pass if the card's text
|
|
56
55
|
* IS the digit. Count semantics exist on row/table ("see [T] table with {{n}}",
|
|
@@ -68,18 +67,13 @@
|
|
|
68
67
|
* SG-E023 — the step carries an assertion clause (`matches "…"`, `contains`, `has text`, a state)
|
|
69
68
|
* but the generated code is a BARE VISIBILITY check: the clause was swallowed by the
|
|
70
69
|
* catch-all and the test would pass whatever the element says. Four separate defects
|
|
71
|
-
* have arrived this way, so the step compiles to a runtime throw instead.
|
|
72
|
-
* trailing `is <word>` / `is not <word>` that is no state (`is on`, `is open`,
|
|
73
|
-
* `is not visible`), other than visibility itself (#911).
|
|
70
|
+
* have arrived this way, so the step compiles to a runtime throw instead.
|
|
74
71
|
* SG-W017 — a step needs a selector-entry field the entry does not declare, so there is nothing
|
|
75
72
|
* honest to compile. Today: a table paginate step whose table declares no
|
|
76
|
-
* `pagination.next`/`.prev` (#712)
|
|
77
|
-
* `expanded.state: none` (#911). The mirror of SG-W004 — that one reports a field
|
|
73
|
+
* `pagination.next`/`.prev` (#712). The mirror of SG-W004 — that one reports a field
|
|
78
74
|
* written that nothing reads, this one a field a consumer needs that nobody wrote.
|
|
79
75
|
* Compiles the step to a loud runtime throw rather than guessing a locator, which is
|
|
80
76
|
* the #690 failure (a locator no page has, failing far from the cause).
|
|
81
|
-
* Also a web `fill [X] date-picker` whose entry locates a `<button>` (a calendar
|
|
82
|
-
* trigger) and names no `fill` recipe — `.fill()` cannot type into a button (#907).
|
|
83
77
|
* SG-W018 — a selectors.yaml entry declares an `nth:` the compiler cannot use (#720). `nth:` was
|
|
84
78
|
* the one entry field whose VALUE nothing checked: the key is known (SG-W004 quiet) and
|
|
85
79
|
* the `type:` is valid (SG-E027 quiet), so `nth: -1`, `nth: 'last'`, `nth: 1.5` and
|
|
@@ -13,9 +13,6 @@ import { isKnownSelectorType } from './utils/selector-type-validation';
|
|
|
13
13
|
import { loadAppProfile, ResolvedAppProfile } from './app-profile';
|
|
14
14
|
import { capabilityRegistry } from '../../capabilities/registry';
|
|
15
15
|
|
|
16
|
-
/** Trailing `is <word>` that a visibility check honestly asserts (SG-E023 lets these through). */
|
|
17
|
-
const VISIBILITY_WORDS = new Set(['visible', 'displayed', 'shown', 'present']);
|
|
18
|
-
|
|
19
16
|
/**
|
|
20
17
|
* The correction SG-W001 owes a project that gated a platform driver away.
|
|
21
18
|
*
|
|
@@ -146,10 +143,6 @@ export class StepMapper {
|
|
|
146
143
|
this.featurePlatform = featurePlatform;
|
|
147
144
|
this.featurePath = featurePath;
|
|
148
145
|
this.selectorResolver.setFeatureContext(featureName);
|
|
149
|
-
// Scenario-scoped data state (captured vars, the bound @cases dataset) of the previous feature's
|
|
150
|
-
// last scenario must not reach this feature's Background, which is mapped before any scenario
|
|
151
|
-
// resets it: a column `{{k}}` there made a plain `{{k}}` here unreadable (#950).
|
|
152
|
-
this.dataResolver.clearCaptured();
|
|
153
146
|
// One StepMapper serves every feature in a run, so the step counter that names the
|
|
154
147
|
// generated temporaries (`__t_<n>`) used to carry over between files: a screen's spec
|
|
155
148
|
// then depended on how many steps the PRECEDING files happened to contain — i.e. on
|
|
@@ -219,23 +212,6 @@ export class StepMapper {
|
|
|
219
212
|
this.dataResolver.registerCaptured(name);
|
|
220
213
|
}
|
|
221
214
|
|
|
222
|
-
/**
|
|
223
|
-
* `@cases:<dataset>` — bind the scenario's dataset and register as runtime-only the refs that are
|
|
224
|
-
* its COLUMNS (each row supplies them). A plain key the base test-data defines stays a normal ref,
|
|
225
|
-
* so the compiler can still read its value (#950: registering every ref turned
|
|
226
|
-
* `row with {{rows_per_page}}` into a text assertion). A ref that is neither stays runtime-only,
|
|
227
|
-
* as before.
|
|
228
|
-
*/
|
|
229
|
-
bindCasesDataset(dataset: string, refs: Iterable<string>): void {
|
|
230
|
-
const columns = new Set(this.dataResolver.setCasesDataset(dataset, this.featureName));
|
|
231
|
-
for (const ref of refs) {
|
|
232
|
-
const isColumn = columns.has(ref.split(/[.[]/)[0]);
|
|
233
|
-
if (isColumn || this.dataResolver.peekBaseValue(ref, this.featureName) === undefined) {
|
|
234
|
-
this.dataResolver.registerCaptured(ref);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
215
|
/**
|
|
240
216
|
* Register the head of a variable bound by the feature's `@beforeAll` hook. Feature-scoped: it
|
|
241
217
|
* survives setScenarioContext() so every scenario can read `{{head.*}}` as a runtime get().
|
|
@@ -315,11 +291,8 @@ export class StepMapper {
|
|
|
315
291
|
/\bsees?\s+\[/.test(step.text) && /\bwith\b/.test(step.text)) {
|
|
316
292
|
// peekBaseValue reads the literal from test-data even in runtime-data mode,
|
|
317
293
|
// where resolveData returns an opaque marker (never numeric-looking).
|
|
318
|
-
// Every value the ref takes — a @cases column has one per row (#950).
|
|
319
294
|
let resolvedValue: string | undefined;
|
|
320
|
-
try {
|
|
321
|
-
resolvedValue = this.dataResolver.peekValues(step.dataRef, this.featureName)?.find((v) => /^\d+$/.test(v.trim()));
|
|
322
|
-
} catch { /* unresolved at compile time → cannot judge */ }
|
|
295
|
+
try { resolvedValue = this.dataResolver.peekBaseValue(step.dataRef, this.featureName); } catch { /* unresolved at compile time → cannot judge */ }
|
|
323
296
|
if (resolvedValue !== undefined && /^\d+$/.test(resolvedValue.trim())) {
|
|
324
297
|
this.diagnostics.add('SG-W015',
|
|
325
298
|
`\`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`,
|
|
@@ -682,8 +655,7 @@ export class StepMapper {
|
|
|
682
655
|
if (!/\b(?:urlMatches|expectPage)\(/.test(mapped.code || '')) return; // both URL-assertion shapes (#662)
|
|
683
656
|
// The base value, never resolveData(): in runtime mode that returns the marker, which carries
|
|
684
657
|
// no query by construction — the diagnostic would then fire on every single step.
|
|
685
|
-
|
|
686
|
-
const value = this.dataResolver.peekValues(step.dataRef, this.featureName)?.find((v) => !/[?#]/.test(v));
|
|
658
|
+
const value = this.dataResolver.peekBaseValue(step.dataRef, this.featureName);
|
|
687
659
|
if (value == null || /[?#]/.test(value)) return;
|
|
688
660
|
this.diagnostics.add('SG-W014',
|
|
689
661
|
`{{${step.dataRef}}} = "${value}" carries no query and no fragment, so this page assertion checks the PATH only. Pass a value like "?q=…" (or drop the "with" and let the step assert a bare page).`,
|
|
@@ -884,32 +856,13 @@ export class StepMapper {
|
|
|
884
856
|
[/\b(?:should\s+have|has)\s+text\b/i, 'has text'],
|
|
885
857
|
];
|
|
886
858
|
const hit = CLAUSES.find(([re]) => re.test(step.text));
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
if (!hit && !step.state) {
|
|
895
|
-
const m = maskRefsForMatching(step.text).replace(/\s+/g, ' ').replace(/ ?\.$/, '').toLowerCase()
|
|
896
|
-
.match(/ (?:is|are)( not| no longer)? ([a-z][\w-]*)$/);
|
|
897
|
-
const honest = m && (m[1] ? m[2] === 'hidden' : VISIBILITY_WORDS.has(m[2]));
|
|
898
|
-
if (m && !honest) state = `is${m[1] ?? ''} ${m[2]}`;
|
|
899
|
-
}
|
|
900
|
-
if (!hit && !state) return null;
|
|
901
|
-
|
|
902
|
-
const reason = state
|
|
903
|
-
? `step "${step.text}" ends in \`${state}\`, which is not a sungen state, but compiled to a bare `
|
|
904
|
-
+ `visibility check — the words were dropped, so the step would pass whenever the element is `
|
|
905
|
-
+ `shown. Use a state the compiler asserts (is visible / is hidden / is disabled / is enabled / `
|
|
906
|
-
+ `is checked / is unchecked / is selected / is focused / is empty / is expanded / is collapsed …, `
|
|
907
|
-
+ `see the sungen-gherkin-syntax States list), or tag the scenario @manual.`
|
|
908
|
-
: `step "${step.text}" carries the clause \`${hit![1]}\` but compiled to a bare `
|
|
909
|
-
+ `visibility check — the clause was dropped, so the assertion would pass whatever the element `
|
|
910
|
-
+ `says. Either the phrasing is not the supported one for that clause (see the `
|
|
911
|
-
+ `sungen-gherkin-syntax reference), or this sungen predates the step: check you are running `
|
|
912
|
-
+ `the project-local compiler (\`npx sungen\`), not an older global one.`;
|
|
859
|
+
if (!hit) return null;
|
|
860
|
+
|
|
861
|
+
const reason = `step "${step.text}" carries the clause \`${hit[1]}\` but compiled to a bare `
|
|
862
|
+
+ `visibility check — the clause was dropped, so the assertion would pass whatever the element `
|
|
863
|
+
+ `says. Either the phrasing is not the supported one for that clause (see the `
|
|
864
|
+
+ `sungen-gherkin-syntax reference), or this sungen predates the step: check you are running `
|
|
865
|
+
+ `the project-local compiler (\`npx sungen\`), not an older global one.`;
|
|
913
866
|
this.diagnostics?.add('SG-E023', reason, { feature: this.featureName, step: step.text });
|
|
914
867
|
return {
|
|
915
868
|
code: unsupportedStepCode(reason),
|
|
@@ -54,7 +54,6 @@ export class DataResolver {
|
|
|
54
54
|
/** Clear captured vars — call at the start of each scenario. */
|
|
55
55
|
clearCaptured(): void {
|
|
56
56
|
this.capturedVars.clear();
|
|
57
|
-
this.casesRows = undefined;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
// Vars bound by a `@beforeAll` hook's `@api:`/`@query:` preconditions. The hook runs before every
|
|
@@ -132,58 +131,6 @@ export class DataResolver {
|
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
133
|
|
|
135
|
-
/** The `@cases:<name>` dataset rows of the scenario being compiled (scenario-scoped). */
|
|
136
|
-
private casesRows?: Array<Record<string, unknown>>;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Bind the scenario's `@cases` dataset so its values can be judged at compile time, and return its
|
|
140
|
-
* column names (empty when the dataset cannot be read — the caller then treats every ref as
|
|
141
|
-
* runtime-only, as before #950).
|
|
142
|
-
*/
|
|
143
|
-
setCasesDataset(dataset: string | undefined, featureName?: string): string[] {
|
|
144
|
-
this.casesRows = undefined;
|
|
145
|
-
if (!dataset || !featureName) return [];
|
|
146
|
-
try {
|
|
147
|
-
const rows = this.loadDataFile(featureName, dataset)?.[dataset];
|
|
148
|
-
if (Array.isArray(rows) && rows.length) {
|
|
149
|
-
// A scalar row is the `value` column — the runtime cases() wraps it the same way.
|
|
150
|
-
this.casesRows = rows.map((r) => (r && typeof r === 'object' && !Array.isArray(r) ? r : { value: r }));
|
|
151
|
-
}
|
|
152
|
-
} catch {
|
|
153
|
-
// unreadable dataset → no columns known
|
|
154
|
-
}
|
|
155
|
-
return this.casesRows ? [...new Set(this.casesRows.flatMap((r) => Object.keys(r)))] : [];
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Every value a ref can take at run time, for compile-time judgements: the base value of a plain
|
|
160
|
-
* key, or — for a column of the scenario's `@cases` dataset — the value on EACH row (a row that
|
|
161
|
-
* lacks the column falls back to the base key, as `rowData.get()` does). A dataset column used to
|
|
162
|
-
* be opaque here, so `row with {{n}}` lost its count reading in @cases and the SG-W014 / SG-W015
|
|
163
|
-
* checks went silent (#950). Undefined when any value cannot be read.
|
|
164
|
-
*/
|
|
165
|
-
peekValues(dataRef: string, featureName?: string): string[] | undefined {
|
|
166
|
-
const head = dataRef.split(/[.[]/)[0];
|
|
167
|
-
if (!this.casesRows?.some((row) => head in row)) {
|
|
168
|
-
const base = this.peekBaseValue(dataRef, featureName);
|
|
169
|
-
return base === undefined ? undefined : [base];
|
|
170
|
-
}
|
|
171
|
-
const out: string[] = [];
|
|
172
|
-
for (const row of this.casesRows) {
|
|
173
|
-
let value: unknown;
|
|
174
|
-
if (head in row) {
|
|
175
|
-
value = row;
|
|
176
|
-
for (const key of dataRef.split('.')) value = value && typeof value === 'object' ? (value as Record<string, unknown>)[key] : undefined;
|
|
177
|
-
} else {
|
|
178
|
-
try { value = this.resolveValue(dataRef, featureName); } catch { return undefined; }
|
|
179
|
-
}
|
|
180
|
-
if (typeof value === 'number' || typeof value === 'boolean') value = String(value);
|
|
181
|
-
if (typeof value !== 'string') return undefined;
|
|
182
|
-
out.push(value);
|
|
183
|
-
}
|
|
184
|
-
return out;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
134
|
private resolveValue(dataRef: string, featureName?: string): string {
|
|
188
135
|
const { fileName, valuePath } = this.parseDataRef(dataRef, featureName);
|
|
189
136
|
const data = this.loadDataFile(fileName, dataRef);
|
|
@@ -1024,8 +1024,8 @@ export class SelectorResolver {
|
|
|
1024
1024
|
// `type: locator` had to be used instead, which no page of the reference says (issue #690).
|
|
1025
1025
|
//
|
|
1026
1026
|
// Handled HERE, above the generic `locator:`-field branch below, because that branch returns
|
|
1027
|
-
// strategy 'css' — putting `upload` in the switch left the two spellings
|
|
1028
|
-
// entry that sets `locator:`. `withExtras` still stamps the declared
|
|
1027
|
+
// strategy 'css' and drops `exact` — putting `upload` in the switch left the two spellings
|
|
1028
|
+
// diverging for any entry that sets `locator:`. `withExtras` still stamps the declared
|
|
1029
1029
|
// `selectorType`, so a consumer that needs to tell an upload from a plain locator still can.
|
|
1030
1030
|
//
|
|
1031
1031
|
// `exact` is inert for the upload action itself (`setInputFiles` takes no text filter), but it
|
|
@@ -1049,7 +1049,6 @@ export class SelectorResolver {
|
|
|
1049
1049
|
value: locator,
|
|
1050
1050
|
locator: locator,
|
|
1051
1051
|
nth,
|
|
1052
|
-
exact,
|
|
1053
1052
|
});
|
|
1054
1053
|
}
|
|
1055
1054
|
|
|
@@ -1114,18 +1113,11 @@ export class SelectorResolver {
|
|
|
1114
1113
|
return resolvedRole;
|
|
1115
1114
|
}
|
|
1116
1115
|
|
|
1117
|
-
// `exact` carries no meaning for getByTestId itself, but text assertions on the entry read it
|
|
1118
|
-
// (`label with {{v}}` → toHaveText vs toContainText). Dropping it here made `exact: true`
|
|
1119
|
-
// inert on a testid entry while working on every other identity strategy (#910).
|
|
1120
1116
|
case 'testid':
|
|
1121
|
-
// `exact` travels with a testid entry too: the getByTestId locator ignores it, but a step
|
|
1122
|
-
// that compares text (`label with {{v}}`) reads it to pick toHaveText over toContainText.
|
|
1123
|
-
// It used to be dropped here alone, so `exact: true` on a testid entry did nothing (#910).
|
|
1124
1117
|
return withExtras({
|
|
1125
1118
|
strategy: 'testid',
|
|
1126
1119
|
value,
|
|
1127
1120
|
nth,
|
|
1128
|
-
exact,
|
|
1129
1121
|
});
|
|
1130
1122
|
|
|
1131
1123
|
case 'label':
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The human-only actions the graph does not hold ("Waiting for you", #954) — asked by the journey
|
|
3
|
+
* board and the delivery's decision check, read through THEIR functions (never restated here):
|
|
4
|
+
*
|
|
5
|
+
* waive a waiver the board re-surfaces: stale (the audit changed since) or untrusted (not
|
|
6
|
+
* in git HEAD) — readJourneyHumanAsks, the reconcile `runJourney` commits
|
|
7
|
+
* decide a gate-override that relaxes nothing because no human confirmed it (ineffective) —
|
|
8
|
+
* re-recorded with `journey --decide`, superseding it (loadUnitGateOverrides)
|
|
9
|
+
* signoff every other obligation holds — assertCanSignOff, as `journey --signoff` checks it
|
|
10
|
+
* accept-in-run a decision recorded during the run — evaluateDeliveryDecisions, as `delivery` runs it
|
|
11
|
+
* The sign-off and accept-in-run only once the frontier was not cut (the unit has run and nothing
|
|
12
|
+
* blocks before it). Read-only and advisory: whatever cannot be read adds nothing.
|
|
13
|
+
*/
|
|
14
|
+
import { formatCommand } from '../decisions/human-confirmation';
|
|
15
|
+
import { waiveCommand } from '../decisions/legacy-waiver-migration';
|
|
16
|
+
import { evaluateDeliveryDecisions } from '../harness/gates/delivery-decision-gate';
|
|
17
|
+
import { IN_RUN_RULE } from '../harness/gates/in-run-decision-check';
|
|
18
|
+
import { loadUnitGateOverrides, unitScopeOfDir } from '../harness/gates/unit-gate-overrides';
|
|
19
|
+
import { readJourneyHumanAsks, signoffCommand } from '../harness/journey';
|
|
20
|
+
import type { UnitState } from '../harness/next-step';
|
|
21
|
+
import type { HumanAction } from './human-action';
|
|
22
|
+
import { unitResultFiles } from './unit-artifact-probes';
|
|
23
|
+
|
|
24
|
+
function journeyActions(projectRoot: string, s: UnitState, cut: boolean): HumanAction[] {
|
|
25
|
+
const asks = readJourneyHumanAsks(projectRoot, s.unit);
|
|
26
|
+
const out: HumanAction[] = asks.redecide.map((w) => ({
|
|
27
|
+
kind: 'waive',
|
|
28
|
+
command: waiveCommand(s.unit, w.obligation, w.reason),
|
|
29
|
+
reason: w.why === 'stale'
|
|
30
|
+
? `the waiver on "${w.title}" is stale — the evidence changed since it was given, so it no longer counts; if it still holds, a human gives it again on a terminal (or repair the obligation)`
|
|
31
|
+
: `the waiver on "${w.title}" is not in git HEAD (decision.in-run), so it is not counted — if it is yours, confirm it on a terminal`,
|
|
32
|
+
}));
|
|
33
|
+
if (!cut && asks.canSignOff && asks.signoff.status !== 'given') {
|
|
34
|
+
out.push({
|
|
35
|
+
kind: 'signoff',
|
|
36
|
+
command: signoffCommand(s.unit),
|
|
37
|
+
reason: asks.signoff.status === 'stale'
|
|
38
|
+
? `the sign-off of ${asks.signoff.at} is stale — the suite changed since; review the queue (\`sungen journey --screen ${s.unit}\`) and sign off again`
|
|
39
|
+
: `every other obligation is satisfied or waived — the human sign-off is the one gate \`sungen gate --phase deliver\` still waits on; review the queue (\`sungen journey --screen ${s.unit}\`, ${asks.report.needsYou.length} item(s)), then sign`,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function unconfirmedOverrides(projectRoot: string, unitDir: string, s: UnitState): HumanAction[] {
|
|
46
|
+
return loadUnitGateOverrides(projectRoot, unitScopeOfDir(projectRoot, unitDir)).ineffective.map((o) => {
|
|
47
|
+
const { humanAccepted: _ignored, ...payload } = o.entry.payload ?? {};
|
|
48
|
+
return {
|
|
49
|
+
kind: 'decide',
|
|
50
|
+
command: formatCommand(['sungen', 'journey', '--screen', s.unit, '--decide', 'gate-override', '--text', o.entry.text, '--reason', o.entry.reason,
|
|
51
|
+
'--payload', JSON.stringify(payload), '--supersedes', o.decisionId]),
|
|
52
|
+
reason: `the gate-override ${o.decisionId}${o.rule ? ` (${o.rule})` : ''} relaxes nothing: ${o.reason} — if it is meant, a human records it again on a terminal, superseding it`,
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function inRunActions(projectRoot: string, unitDir: string, s: UnitState): HumanAction[] {
|
|
58
|
+
const files = unitResultFiles(projectRoot, s.unit);
|
|
59
|
+
const refs = (files.length ? files : [null]).map((resultsPath) => ({ label: s.unit, unitName: s.unit, unitDir, resultsPath }));
|
|
60
|
+
const inRun = evaluateDeliveryDecisions(projectRoot, refs).inRun;
|
|
61
|
+
if (!inRun.length) return [];
|
|
62
|
+
const which = inRun.slice(0, 3).map((d) => `${d.kind} ${d.id}`).join(', ');
|
|
63
|
+
return [{
|
|
64
|
+
kind: 'accept-in-run',
|
|
65
|
+
command: formatCommand(['sungen', 'delivery', s.unit, '--accept-in-run']),
|
|
66
|
+
reason: `${inRun.length} decision(s) recorded during the run (${IN_RUN_RULE}): ${which}${inRun.length > 3 ? ', …' : ''} — \`sungen delivery\` refuses them until they are committed through review and the tests re-run, or a human accepts them on a terminal`,
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The board's and the delivery's asks of a human for this unit. `cut`: the frontier stopped at a blocking node. */
|
|
71
|
+
export function boardHumanActions(projectRoot: string, unitDir: string, s: UnitState, cut: boolean): HumanAction[] {
|
|
72
|
+
const out: HumanAction[] = [];
|
|
73
|
+
const add = (read: () => HumanAction[]): void => {
|
|
74
|
+
try { out.push(...read()); } catch { /* advisory: an unreadable board or decision adds nothing */ }
|
|
75
|
+
};
|
|
76
|
+
add(() => journeyActions(projectRoot, s, cut));
|
|
77
|
+
add(() => unconfirmedOverrides(projectRoot, unitDir, s));
|
|
78
|
+
if (!cut) add(() => inRunActions(projectRoot, unitDir, s));
|
|
79
|
+
return out;
|
|
80
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ready frontier of the `sungen next` graph (OES-10.1). Deterministic, read-only: the same
|
|
3
|
+
* unit state and test-case states always give the same steps, in rank order.
|
|
4
|
+
*
|
|
5
|
+
* open active ∧ ¬satisfied (a test-case node is open when at least one case is)
|
|
6
|
+
* frontier open ∧ (every `requires` satisfied ∨ ¬blocking)
|
|
7
|
+
* cut an open blocking node ends the walk — nothing ranked after it is offered, except a
|
|
8
|
+
* node's instances that `surfacesPastCut` (a hard contract verdict, #940), which follow
|
|
9
|
+
* the cutting step and never cut themselves
|
|
10
|
+
*
|
|
11
|
+
* `--case <id>` (`testCase` option): the frontier is that case's test-case nodes plus the blocking
|
|
12
|
+
* unit nodes before them; non-blocking unit advice is left to the unit view. A `caseOnly` test-case
|
|
13
|
+
* node speaks only there (its unit-level decision is in the unit view already).
|
|
14
|
+
*
|
|
15
|
+
* evaluateHumanActions reads the SAME walk for "Waiting for you" (#954): the human-only actions behind
|
|
16
|
+
* the offered steps, and whether the walk was cut.
|
|
17
|
+
*/
|
|
18
|
+
import type { NextStep, UnitState } from '../harness/next-step';
|
|
19
|
+
import type { HumanAction } from './human-action';
|
|
20
|
+
import type { NodeDecl, StepCore } from './node-decl';
|
|
21
|
+
import type { TestCaseState } from './test-case-state-shape';
|
|
22
|
+
|
|
23
|
+
export interface EvaluateOptions {
|
|
24
|
+
/** Only this test case's nodes (plus the blocking unit nodes before them). */
|
|
25
|
+
testCase?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function withMeta(node: NodeDecl, core: StepCore, testCase?: string): NextStep {
|
|
29
|
+
return {
|
|
30
|
+
...core,
|
|
31
|
+
nodeId: node.id,
|
|
32
|
+
granularity: node.granularity,
|
|
33
|
+
...(testCase ? { testCase } : {}),
|
|
34
|
+
...(node.gates.length ? { gates: [...node.gates] } : {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The cases open at a test-case node, in their given order; none without test-case states. */
|
|
39
|
+
function openCases(node: NodeDecl, s: UnitState, tcStates: TestCaseState[] | undefined, only?: string): TestCaseState[] {
|
|
40
|
+
if (node.granularity !== 'test-case' || !tcStates) return [];
|
|
41
|
+
return tcStates.filter((tc) => (!only || tc.id === only) && node.active(s, tc) && !node.satisfied(s, tc));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** One offered step and what produced it: the node, and the cases open at it (test-case nodes). */
|
|
45
|
+
interface Offered { node: NodeDecl; step: NextStep; cases: TestCaseState[] }
|
|
46
|
+
|
|
47
|
+
/** The walk both answers share: the offered steps in rank order, and whether an open blocking node cut it. */
|
|
48
|
+
function walkFrontier(nodes: readonly NodeDecl[], s: UnitState, tcStates: TestCaseState[] | undefined, opts: EvaluateOptions): { offered: Offered[]; cut: boolean; cutBy?: NodeDecl } {
|
|
49
|
+
const ordered = [...nodes].sort((a, b) => a.rank - b.rank);
|
|
50
|
+
const open = new Set<string>();
|
|
51
|
+
const offered: Offered[] = [];
|
|
52
|
+
let cut = false;
|
|
53
|
+
let cutBy: NodeDecl | undefined;
|
|
54
|
+
for (const node of ordered) {
|
|
55
|
+
if (!node.appliesTo.includes(s.kind) || (node.granularity === 'test-case' && node.caseOnly && !opts.testCase)) continue;
|
|
56
|
+
if (cut && !node.surfacesPastCut) continue;
|
|
57
|
+
let step: NextStep | null = null;
|
|
58
|
+
let cases: TestCaseState[] = [];
|
|
59
|
+
if (node.granularity === 'unit') {
|
|
60
|
+
if (!node.active(s) || node.satisfied(s) || (cut && !node.surfacesPastCut!(s))) continue;
|
|
61
|
+
if (!opts.testCase || node.blocking) step = withMeta(node, node.step(s));
|
|
62
|
+
} else {
|
|
63
|
+
cases = openCases(node, s, tcStates, opts.testCase).filter((tc) => !cut || node.surfacesPastCut!(s, tc));
|
|
64
|
+
if (!cases.length) continue;
|
|
65
|
+
const single = Boolean(opts.testCase);
|
|
66
|
+
step = withMeta(node, node.step(s, cases, single), single ? cases[0].id : undefined);
|
|
67
|
+
}
|
|
68
|
+
open.add(node.id);
|
|
69
|
+
const ready = node.requires.every((r) => !open.has(r));
|
|
70
|
+
if (step && (cut || ready || !node.blocking)) offered.push({ node, step, cases });
|
|
71
|
+
if (node.blocking && !cut) { cut = true; cutBy = node; }
|
|
72
|
+
}
|
|
73
|
+
return { offered, cut, ...(cutBy ? { cutBy } : {}) };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function evaluateGraph(
|
|
77
|
+
nodes: readonly NodeDecl[], s: UnitState, tcStates?: TestCaseState[], opts: EvaluateOptions = {},
|
|
78
|
+
): NextStep[] {
|
|
79
|
+
return walkFrontier(nodes, s, tcStates, opts).offered.map((o) => o.step);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The HUMAN-ONLY actions of the same frontier ("Waiting for you", #954) — never a second walk with
|
|
84
|
+
* rules of its own: each offered step's node says what a person runs (its `human` hook), and a decide
|
|
85
|
+
* step without one is its own command. `cut`: an open blocking node ended the walk, so only what does
|
|
86
|
+
* not depend on it is offered (a hard verdict that surfaces past the cut), and the board's asks that
|
|
87
|
+
* need the unit past it (sign-off, accept-in-run) wait; `heldBy` is that node's title and `heldByCommand`
|
|
88
|
+
* its offered step's command (#966: "More appear once …" names what to run).
|
|
89
|
+
*/
|
|
90
|
+
export function evaluateHumanActions(nodes: readonly NodeDecl[], s: UnitState, tcStates?: TestCaseState[]): { actions: HumanAction[]; cut: boolean; heldBy?: string; heldByCommand?: string } {
|
|
91
|
+
const { offered, cut, cutBy } = walkFrontier(nodes, s, tcStates, {});
|
|
92
|
+
const actions = offered.flatMap(({ node, step, cases }) => (node.human
|
|
93
|
+
? node.human(s, step, cases)
|
|
94
|
+
: step.kind === 'decide' ? [{ command: step.command, reason: step.because, kind: 'decide' as const }] : []));
|
|
95
|
+
const heldByCommand = cutBy ? offered.find((o) => o.node === cutBy)?.step.command : undefined;
|
|
96
|
+
return { actions, cut, ...(cutBy ? { heldBy: cutBy.title } : {}), ...(heldByCommand ? { heldByCommand } : {}) };
|
|
97
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A HUMAN-ONLY action of a unit — what `sungen next` lists under "Waiting for you" (#954) and `--json`
|
|
3
|
+
* carries as `humanActions`. An agent presents these and never runs them: they approve, sign, waive,
|
|
4
|
+
* classify or accept something on a person's behalf, and most refuse without a typed confirmation.
|
|
5
|
+
*
|
|
6
|
+
* `command` is canonical (`sungen …`, or a slash command); the text renders it as the project runs
|
|
7
|
+
* sungen (`npx sungen` with a local install). Placeholders a human fills are quoted (`"<name>"`, `"…"`)
|
|
8
|
+
* so a copied command never turns into a shell redirection.
|
|
9
|
+
*/
|
|
10
|
+
export type HumanActionKind =
|
|
11
|
+
| 'contract-approve' // approve (or re-approve) the Test Contract — `sungen contract approve`
|
|
12
|
+
| 'accept-opaque' // accept a reviewed opaque trace step — `contract approve --scenario <id> --accept-opaque`
|
|
13
|
+
| 'contract-commit' // commit, or restore, a lock / approval decision through review
|
|
14
|
+
| 'contract-review' // read the contract verdict on a terminal (it could not be built)
|
|
15
|
+
| 'accept-viewpoint' // accept the changed viewpoint baseline — `sungen audit --accept-viewpoint`
|
|
16
|
+
| 'defect-draft' // decide whether a product-defect candidate is a defect — `sungen defect draft`
|
|
17
|
+
| 'rerun-environment' // re-run the reds the environment caused, once a human confirms it is up
|
|
18
|
+
| 'triage-classify' // classify a red by hand as test-defect / environment — `sungen triage --case --as`
|
|
19
|
+
| 'signoff' // the single human gate — `sungen journey --signoff`
|
|
20
|
+
| 'waive' // give a waiver again — `sungen journey --waive`
|
|
21
|
+
| 'decide' // record a decision — `sungen journey --decide`
|
|
22
|
+
| 'accept-in-run'; // deliver despite decisions recorded during the run — `sungen delivery --accept-in-run`
|
|
23
|
+
|
|
24
|
+
export interface HumanAction {
|
|
25
|
+
command: string;
|
|
26
|
+
reason: string;
|
|
27
|
+
kind: HumanActionKind;
|
|
28
|
+
/**
|
|
29
|
+
* `command` is an instruction a person carries out by hand (commit through review, restore from git),
|
|
30
|
+
* not a command line to copy — the block marks it so, and never renders it as one.
|
|
31
|
+
*/
|
|
32
|
+
instruction?: true;
|
|
33
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit findings pinned to the test case they name, in the shared trace vocabulary (DOS-12.1, takumi
|
|
3
|
+
* T7): a citation `repo@SHA:path#Lx-Ly` plus a confidence label.
|
|
4
|
+
*
|
|
5
|
+
* EXTRACTED 0.95 the finding names the case's VP-id, and only that case carries it
|
|
6
|
+
* EXTRACTED 0.90 the finding quotes the case's full title, and only that case has it
|
|
7
|
+
* INFERRED 0.60 the finding names the id's family (`VP-LOGIC` for `VP-LOGIC-003`), shared by ≤ 3 cases
|
|
8
|
+
* AMBIGUOUS 0.40 the id or title it names is carried by several cases — each is cited
|
|
9
|
+
* A finding that names no case is located nowhere (it stays a unit-level finding).
|
|
10
|
+
*
|
|
11
|
+
* SHA is the HEAD commit when the file's bytes equal its HEAD blob; otherwise (no git, uncommitted
|
|
12
|
+
* edit) it is `worktree`, so a citation never points a commit at lines it does not hold. git runs
|
|
13
|
+
* twice per unit at most, with fixed arguments and a short timeout; a git failure only means `worktree`.
|
|
14
|
+
*/
|
|
15
|
+
import { execFileSync } from 'child_process';
|
|
16
|
+
import * as fs from 'fs';
|
|
17
|
+
import * as path from 'path';
|
|
18
|
+
import { gitBlobId, GUARD_GIT_TIMEOUT_MS } from '../contract/contract-git';
|
|
19
|
+
import { idPrefix } from '../harness/parse';
|
|
20
|
+
import type { ConfidenceLabel, LocatedFinding } from './test-case-state-shape';
|
|
21
|
+
|
|
22
|
+
export interface CitableCase { id: string; unstableId?: true; title: string; absFile: string; lines: [number, number] }
|
|
23
|
+
export interface GitCitationContext { repo: string; repoRoot: string; sha: string | null; headBlobs: Map<string, string> }
|
|
24
|
+
|
|
25
|
+
/** git reports real paths (macOS `/var` is `/private/var`), so paths are compared real. */
|
|
26
|
+
const real = (p: string): string => { try { return fs.realpathSync(p); } catch { return path.resolve(p); } };
|
|
27
|
+
|
|
28
|
+
function git(cwd: string, args: string[]): string | null {
|
|
29
|
+
try {
|
|
30
|
+
return execFileSync('git', args, { cwd, stdio: ['ignore', 'pipe', 'ignore'], timeout: GUARD_GIT_TIMEOUT_MS }).toString('utf8');
|
|
31
|
+
} catch { return null; }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** HEAD sha, repository root and HEAD blob ids of `files` — or a no-git context. */
|
|
35
|
+
export function gitCitationContext(projectRoot: string, files: string[]): GitCitationContext {
|
|
36
|
+
const top = git(projectRoot, ['rev-parse', '--show-toplevel', 'HEAD'])?.trim().split('\n');
|
|
37
|
+
if (!top || top.length < 2 || !/^[0-9a-f]{40,64}$/.test(top[1])) {
|
|
38
|
+
return { repo: path.basename(projectRoot), repoRoot: real(projectRoot), sha: null, headBlobs: new Map() };
|
|
39
|
+
}
|
|
40
|
+
const repoRoot = real(top[0]);
|
|
41
|
+
const root = real(projectRoot);
|
|
42
|
+
const rels = files.map((f) => path.relative(root, real(f)));
|
|
43
|
+
const headBlobs = new Map<string, string>();
|
|
44
|
+
for (const line of (git(projectRoot, ['ls-tree', 'HEAD', '--', ...rels]) ?? '').split('\n')) {
|
|
45
|
+
const m = line.match(/^\d+ blob ([0-9a-f]+)\t(.+)$/);
|
|
46
|
+
if (m) headBlobs.set(path.resolve(root, m[2]), m[1]);
|
|
47
|
+
}
|
|
48
|
+
return { repo: path.basename(repoRoot), repoRoot, sha: top[1].slice(0, 12), headBlobs };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function citationOf(ctx: GitCitationContext, absFile: string, lines: [number, number]): string {
|
|
52
|
+
const file = real(absFile);
|
|
53
|
+
let sha = 'worktree';
|
|
54
|
+
try {
|
|
55
|
+
if (ctx.sha && ctx.headBlobs.get(file) === gitBlobId(fs.readFileSync(file, 'utf8'))) sha = ctx.sha;
|
|
56
|
+
} catch { /* unreadable now — cite the working tree */ }
|
|
57
|
+
const rel = path.relative(ctx.repoRoot, file).split(path.sep).join('/');
|
|
58
|
+
return `${ctx.repo}@${sha}:${rel}#L${lines[0]}-L${lines[1]}`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const escapeRe = (s: string): string => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
62
|
+
/** `id` as a whole token — `VP-UI-001` in "VP-UI-001 does not…", never inside `VP-UI-0012`. */
|
|
63
|
+
const namesId = (text: string, id: string): boolean => new RegExp(`(?<![A-Za-z0-9-])${escapeRe(id)}(?![A-Za-z0-9-])`).test(text);
|
|
64
|
+
/** A family token standing alone — `VP-LOGIC` but not the start of another case's `VP-LOGIC-004`. */
|
|
65
|
+
const namesFamily = (text: string, family: string): boolean => new RegExp(`(?<![A-Za-z0-9-])${escapeRe(family)}(?![A-Za-z0-9])(?!-[A-Za-z0-9])`).test(text);
|
|
66
|
+
|
|
67
|
+
/** Which cases a finding names, and how surely. */
|
|
68
|
+
function matchesOf(finding: string, cases: CitableCase[]): { hits: CitableCase[]; label: ConfidenceLabel; score: number } | null {
|
|
69
|
+
const byId = cases.filter((c) => !c.unstableId && namesId(finding, c.id));
|
|
70
|
+
if (byId.length) return byId.length === 1 ? { hits: byId, label: 'EXTRACTED', score: 0.95 } : { hits: byId, label: 'AMBIGUOUS', score: 0.4 };
|
|
71
|
+
const byTitle = cases.filter((c) => c.title.length >= 8 && finding.includes(c.title));
|
|
72
|
+
if (byTitle.length) return byTitle.length === 1 ? { hits: byTitle, label: 'EXTRACTED', score: 0.9 } : { hits: byTitle, label: 'AMBIGUOUS', score: 0.4 };
|
|
73
|
+
const byFamily = cases.filter((c) => !c.unstableId && idPrefix(c.id) !== c.id && namesFamily(finding, idPrefix(c.id)));
|
|
74
|
+
if (byFamily.length && byFamily.length <= 3) return { hits: byFamily, label: 'INFERRED', score: 0.6 };
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Every finding that names a case, keyed by the case's index in `cases`. */
|
|
79
|
+
export function locateFindings(findings: string[], cases: CitableCase[], ctx: GitCitationContext): Map<number, LocatedFinding[]> {
|
|
80
|
+
const out = new Map<number, LocatedFinding[]>();
|
|
81
|
+
for (const text of findings) {
|
|
82
|
+
if (typeof text !== 'string' || !text.trim()) continue;
|
|
83
|
+
const m = matchesOf(text, cases);
|
|
84
|
+
if (!m) continue;
|
|
85
|
+
const head = text.split(':')[0].trim();
|
|
86
|
+
const code = /^[A-Z][A-Z0-9-]+$/.test(head) ? head : 'FINDING';
|
|
87
|
+
for (const c of m.hits) {
|
|
88
|
+
const i = cases.indexOf(c);
|
|
89
|
+
out.set(i, [...(out.get(i) ?? []), { code, text, citation: citationOf(ctx, c.absFile, c.lines), confidence: { label: m.label, score: m.score } }]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return out;
|
|
93
|
+
}
|