@sun-asterisk/sungen 3.2.34 → 3.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +10 -5
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +6 -2
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/contract-derive-command.d.ts +11 -0
- package/dist/cli/commands/contract-derive-command.d.ts.map +1 -0
- package/dist/cli/commands/contract-derive-command.js +99 -0
- package/dist/cli/commands/contract-derive-command.js.map +1 -0
- package/dist/cli/commands/contract.d.ts +17 -0
- package/dist/cli/commands/contract.d.ts.map +1 -0
- package/dist/cli/commands/contract.js +162 -0
- package/dist/cli/commands/contract.js.map +1 -0
- package/dist/cli/commands/defect.d.ts +7 -0
- package/dist/cli/commands/defect.d.ts.map +1 -0
- package/dist/cli/commands/defect.js +68 -0
- package/dist/cli/commands/defect.js.map +1 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +96 -12
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +3 -1
- 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 +43 -15
- package/dist/cli/commands/journey.js.map +1 -1
- package/dist/cli/commands/next.d.ts +8 -0
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +68 -8
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/triage.d.ts +7 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +98 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/update.d.ts +11 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +31 -6
- 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/project-sungen-invocation.d.ts +7 -0
- package/dist/cli/project-sungen-invocation.d.ts.map +1 -0
- package/dist/cli/project-sungen-invocation.js +76 -0
- package/dist/cli/project-sungen-invocation.js.map +1 -0
- package/dist/contract/approve-contract.d.ts +31 -0
- package/dist/contract/approve-contract.d.ts.map +1 -0
- package/dist/contract/approve-contract.js +87 -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 +18 -0
- package/dist/contract/build-trace-conformance.d.ts.map +1 -0
- package/dist/contract/build-trace-conformance.js +153 -0
- package/dist/contract/build-trace-conformance.js.map +1 -0
- package/dist/contract/classify-contract-change.d.ts +23 -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 +32 -0
- package/dist/contract/classify-trace-conformance.d.ts.map +1 -0
- package/dist/contract/classify-trace-conformance.js +117 -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 +71 -0
- package/dist/contract/contract-schema.d.ts.map +1 -0
- package/dist/contract/contract-schema.js +102 -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 +140 -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 +38 -0
- package/dist/contract/derive-free-feature.d.ts.map +1 -0
- package/dist/contract/derive-free-feature.js +154 -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 +73 -0
- package/dist/contract/project-contract-blockers.js.map +1 -0
- package/dist/contract/record-contract-approval.d.ts +21 -0
- package/dist/contract/record-contract-approval.d.ts.map +1 -0
- package/dist/contract/record-contract-approval.js +98 -0
- package/dist/contract/record-contract-approval.js.map +1 -0
- package/dist/contract/render-free-gherkin.d.ts +40 -0
- package/dist/contract/render-free-gherkin.d.ts.map +1 -0
- package/dist/contract/render-free-gherkin.js +141 -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 +8 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts.map +1 -0
- package/dist/contract/resolve-unit-trace-identities.js +78 -0
- package/dist/contract/resolve-unit-trace-identities.js.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts +33 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.js +161 -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/select-final-attempt.d.ts +27 -0
- package/dist/contract/trace/select-final-attempt.d.ts.map +1 -0
- package/dist/contract/trace/select-final-attempt.js +116 -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 +21 -0
- package/dist/contract/trace/trace-binding.d.ts.map +1 -0
- package/dist/contract/trace/trace-binding.js +88 -0
- package/dist/contract/trace/trace-binding.js.map +1 -0
- package/dist/contract/trace/trace-file-reader.d.ts +41 -0
- package/dist/contract/trace/trace-file-reader.d.ts.map +1 -0
- package/dist/contract/trace/trace-file-reader.js +161 -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-identity-resolution.d.ts +26 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.js +84 -0
- package/dist/contract/trace/trace-identity-resolution.js.map +1 -0
- package/dist/contract/trace/trace-run-record.d.ts +30 -0
- package/dist/contract/trace/trace-run-record.d.ts.map +1 -0
- package/dist/contract/trace/trace-run-record.js +121 -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 +104 -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 +42 -0
- package/dist/decisions/decision-schema.d.ts.map +1 -0
- package/dist/decisions/decision-schema.js +75 -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 +7 -0
- package/dist/decisions/git-head-trust.d.ts.map +1 -0
- package/dist/decisions/git-head-trust.js +76 -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 +31 -0
- package/dist/decisions/legacy-waiver-migration.d.ts.map +1 -0
- package/dist/decisions/legacy-waiver-migration.js +170 -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 +4 -0
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +1 -1
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +8 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +12 -0
- package/dist/exporters/feature-parser.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 +59 -19
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.d.ts +19 -0
- package/dist/exporters/matrix/carry-manual-results.d.ts.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.js +76 -6
- package/dist/exporters/matrix/carry-manual-results.js.map +1 -1
- package/dist/exporters/matrix/export.d.ts +8 -2
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +16 -3
- 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 +4 -1
- 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 +6 -0
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +9 -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/playwright-report-parser.d.ts.map +1 -1
- package/dist/exporters/playwright-report-parser.js +1 -0
- package/dist/exporters/playwright-report-parser.js.map +1 -1
- package/dist/exporters/scenario-merger.d.ts.map +1 -1
- package/dist/exporters/scenario-merger.js +2 -0
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/types.d.ts +5 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +13 -0
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/graph/evaluate-graph.d.ts +23 -0
- package/dist/graph/evaluate-graph.d.ts.map +1 -0
- package/dist/graph/evaluate-graph.js +52 -0
- package/dist/graph/evaluate-graph.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/node-decl.d.ts +66 -0
- package/dist/graph/node-decl.d.ts.map +1 -0
- package/dist/graph/node-decl.js +8 -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 +59 -0
- package/dist/graph/nodes/test-case-contract-nodes.js.map +1 -0
- package/dist/graph/nodes/test-case-nodes.d.ts +26 -0
- package/dist/graph/nodes/test-case-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-nodes.js +66 -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 +95 -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 +88 -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 +11 -0
- package/dist/graph/test-case-results.d.ts.map +1 -0
- package/dist/graph/test-case-results.js +137 -0
- package/dist/graph/test-case-results.js.map +1 -0
- package/dist/graph/test-case-satisfied.d.ts +25 -0
- package/dist/graph/test-case-satisfied.d.ts.map +1 -0
- package/dist/graph/test-case-satisfied.js +51 -0
- package/dist/graph/test-case-satisfied.js.map +1 -0
- package/dist/graph/test-case-state-shape.d.ts +67 -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 +133 -0
- package/dist/graph/unit-artifact-probes.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 +11 -0
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +34 -9
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/gate-rules.yaml +647 -0
- package/dist/harness/counted-assertions.d.ts +2 -0
- package/dist/harness/counted-assertions.d.ts.map +1 -0
- package/dist/harness/counted-assertions.js +38 -0
- package/dist/harness/counted-assertions.js.map +1 -0
- package/dist/harness/defect-draft.d.ts +14 -0
- package/dist/harness/defect-draft.d.ts.map +1 -0
- package/dist/harness/defect-draft.js +143 -0
- package/dist/harness/defect-draft.js.map +1 -0
- package/dist/harness/defects.d.ts +24 -0
- package/dist/harness/defects.d.ts.map +1 -0
- package/dist/harness/defects.js +118 -0
- package/dist/harness/defects.js.map +1 -0
- package/dist/harness/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 +101 -0
- package/dist/harness/gates/audit-gate-verdict.js.map +1 -0
- package/dist/harness/gates/audit-input-hash.d.ts +4 -0
- package/dist/harness/gates/audit-input-hash.d.ts.map +1 -0
- package/dist/harness/gates/audit-input-hash.js +96 -0
- package/dist/harness/gates/audit-input-hash.js.map +1 -0
- package/dist/harness/gates/audit-report-verification.d.ts +41 -0
- package/dist/harness/gates/audit-report-verification.d.ts.map +1 -0
- package/dist/harness/gates/audit-report-verification.js +236 -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 +21 -0
- package/dist/harness/gates/delivery-checklist.d.ts.map +1 -0
- package/dist/harness/gates/delivery-checklist.js +128 -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 +138 -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-review.d.ts +6 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.js +116 -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 +43 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +207 -33
- 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 +73 -45
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/next-step.d.ts +37 -6
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +34 -174
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts +25 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +38 -13
- 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 +29 -6
- 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 +64 -44
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/triage-signals.d.ts +20 -0
- package/dist/harness/triage-signals.d.ts.map +1 -0
- package/dist/harness/triage-signals.js +30 -0
- package/dist/harness/triage-signals.js.map +1 -0
- package/dist/harness/triage-unit.d.ts +23 -0
- package/dist/harness/triage-unit.d.ts.map +1 -0
- package/dist/harness/triage-unit.js +142 -0
- package/dist/harness/triage-unit.js.map +1 -0
- package/dist/harness/triage.d.ts +28 -0
- package/dist/harness/triage.d.ts.map +1 -0
- package/dist/harness/triage.js +99 -0
- package/dist/harness/triage.js.map +1 -0
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +2 -1
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/hooks/bash-write-targets.d.ts +15 -0
- package/dist/hooks/bash-write-targets.d.ts.map +1 -0
- package/dist/hooks/bash-write-targets.js +173 -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 +9 -0
- package/dist/hooks/guard-protected-paths.d.ts.map +1 -0
- package/dist/hooks/guard-protected-paths.js +107 -0
- package/dist/hooks/guard-protected-paths.js.map +1 -0
- package/dist/hooks/guard-rules.d.ts +37 -0
- package/dist/hooks/guard-rules.d.ts.map +1 -0
- package/dist/hooks/guard-rules.js +61 -0
- package/dist/hooks/guard-rules.js.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts +15 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.js +21 -0
- package/dist/hooks/guard-tty-spoof-rule.js.map +1 -0
- package/dist/hooks/hand-back-core.d.ts +39 -0
- package/dist/hooks/hand-back-core.d.ts.map +1 -0
- package/dist/hooks/hand-back-core.js +122 -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 +13 -0
- package/dist/hooks/session-start-unit-state-hook.d.ts.map +1 -0
- package/dist/hooks/session-start-unit-state-hook.js +57 -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 +42 -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/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 +16 -6
- package/dist/orchestrator/ai-skills/commands.js.map +1 -1
- package/dist/orchestrator/ai-skills/golden-skills.test.js +29 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.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/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +4 -2
- package/dist/orchestrator/screen-manager.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 +2 -0
- 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 +14 -16
- package/dist/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +2 -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 +2 -0
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +14 -10
- package/dist/orchestrator/templates/ai-src/config/claude.md +20 -7
- package/dist/orchestrator/templates/ai-src/config/copilot.md +20 -7
- 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/skills/sungen-api-coverage-model/SKILL.md +1 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md +3 -3
- package/dist/orchestrator/templates/ai-src/skills/sungen-data-factory/SKILL.md +9 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +2 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +1 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +2 -0
- package/dist/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- 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/commands/audit.ts +10 -5
- package/src/cli/commands/capability.ts +4 -2
- package/src/cli/commands/contract-derive-command.ts +61 -0
- package/src/cli/commands/contract.ts +130 -0
- package/src/cli/commands/defect.ts +49 -0
- package/src/cli/commands/delivery.ts +92 -15
- package/src/cli/commands/generate.ts +3 -1
- package/src/cli/commands/journey.ts +41 -16
- package/src/cli/commands/next.ts +64 -10
- package/src/cli/commands/triage.ts +57 -0
- package/src/cli/commands/update.ts +35 -8
- package/src/cli/index.ts +24 -30
- package/src/cli/project-sungen-invocation.ts +39 -0
- package/src/contract/approve-contract.ts +94 -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 +100 -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 +116 -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 +137 -0
- package/src/contract/contract-units.ts +52 -0
- package/src/contract/contracts-lock-file.ts +97 -0
- package/src/contract/data-normalize.ts +66 -0
- package/src/contract/derive-free-feature.ts +120 -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 +36 -0
- package/src/contract/record-contract-approval.ts +70 -0
- package/src/contract/render-free-gherkin.ts +113 -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 +35 -0
- package/src/contract/trace/collect-trace-evidence.ts +109 -0
- package/src/contract/trace/identity-cache.ts +61 -0
- package/src/contract/trace/select-final-attempt.ts +70 -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 +56 -0
- package/src/contract/trace/trace-file-reader.ts +133 -0
- package/src/contract/trace/trace-fingerprint.ts +68 -0
- package/src/contract/trace/trace-identity-resolution.ts +74 -0
- package/src/contract/trace/trace-run-record.ts +80 -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 +60 -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 +76 -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 +32 -0
- package/src/decisions/human-confirmation.ts +119 -0
- package/src/decisions/legacy-waiver-migration.ts +135 -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 +5 -1
- package/src/exporters/feature-parser.ts +12 -0
- package/src/exporters/matrix/build.ts +62 -18
- package/src/exporters/matrix/carry-manual-results.ts +70 -7
- package/src/exporters/matrix/export.ts +17 -2
- package/src/exporters/matrix/gates.ts +62 -129
- package/src/exporters/matrix/render-csv.ts +4 -1
- package/src/exporters/matrix/render-gate-overrides-sheet.ts +50 -0
- package/src/exporters/matrix/render-xlsx.ts +6 -0
- package/src/exporters/matrix/types.ts +9 -1
- package/src/exporters/matrix/xlsx-cells.ts +1 -1
- package/src/exporters/playwright-report-parser.ts +1 -0
- package/src/exporters/scenario-merger.ts +2 -1
- package/src/exporters/types.ts +5 -0
- package/src/generators/test-generator/code-generator.ts +13 -0
- package/src/graph/evaluate-graph.ts +66 -0
- package/src/graph/locate-finding.ts +93 -0
- package/src/graph/node-decl.ts +72 -0
- package/src/graph/nodes/core-node-catalog.ts +15 -0
- package/src/graph/nodes/test-case-contract-nodes.ts +74 -0
- package/src/graph/nodes/test-case-nodes.ts +68 -0
- package/src/graph/nodes/unit-audit-nodes.ts +95 -0
- package/src/graph/nodes/unit-contract-node.ts +89 -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 +90 -0
- package/src/graph/test-case-satisfied.ts +55 -0
- package/src/graph/test-case-state-shape.ts +62 -0
- package/src/graph/test-case-states.ts +84 -0
- package/src/graph/unit-artifact-probes.ts +77 -0
- package/src/graph/unit-state-facts.ts +112 -0
- package/src/harness/audit.ts +46 -11
- package/src/harness/catalog/gate-rules.yaml +647 -0
- package/src/harness/counted-assertions.ts +33 -0
- package/src/harness/defect-draft.ts +115 -0
- package/src/harness/defects.ts +94 -0
- package/src/harness/gates/audit-gate-terms.ts +80 -0
- package/src/harness/gates/audit-gate-verdict.ts +78 -0
- package/src/harness/gates/audit-input-hash.ts +55 -0
- package/src/harness/gates/audit-report-verification.ts +201 -0
- package/src/harness/gates/decisions-hash.ts +42 -0
- package/src/harness/gates/delivery-checklist.ts +120 -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 +99 -0
- package/src/harness/gates/journey-gate-inputs.ts +89 -0
- package/src/harness/gates/migrated-waiver-review.ts +68 -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 +215 -38
- package/src/harness/manifest.ts +69 -45
- package/src/harness/next-step.ts +60 -170
- package/src/harness/parse.ts +40 -13
- package/src/harness/provenance.ts +99 -11
- package/src/harness/script-check.ts +27 -6
- package/src/harness/sensors.ts +73 -47
- package/src/harness/triage-signals.ts +46 -0
- package/src/harness/triage-unit.ts +113 -0
- package/src/harness/triage.ts +127 -0
- package/src/harness/viewpoint-ledger.ts +2 -2
- package/src/hooks/bash-write-targets.ts +109 -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 +71 -0
- package/src/hooks/guard-rules.ts +98 -0
- package/src/hooks/guard-tty-spoof-rule.ts +31 -0
- package/src/hooks/hand-back-core.ts +112 -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 +56 -0
- package/src/hooks/stop-next-step-hook.ts +37 -0
- package/src/hooks/sungen-project-root.ts +80 -0
- package/src/orchestrator/ai-skills/command-partial-includes.ts +72 -0
- package/src/orchestrator/ai-skills/commands.ts +22 -8
- package/src/orchestrator/ai-skills/golden-skills.test.ts +23 -0
- 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/screen-manager.ts +3 -1
- package/src/orchestrator/templates/ai-src/commands/add-api.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/add-flow.md +2 -0
- 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 +14 -16
- package/src/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/delivery.md +2 -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 +2 -0
- package/src/orchestrator/templates/ai-src/commands/run-test.md +14 -10
- package/src/orchestrator/templates/ai-src/config/claude.md +20 -7
- package/src/orchestrator/templates/ai-src/config/copilot.md +20 -7
- 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/skills/sungen-api-coverage-model/SKILL.md +1 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md +3 -3
- package/src/orchestrator/templates/ai-src/skills/sungen-data-factory/SKILL.md +9 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +2 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +1 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +2 -0
- package/src/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/src/utils/safe-yaml-parse.ts +44 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ContractScenario } from './contract-schema';
|
|
2
|
+
export declare function scenariosOfFeatureFile(file: string): ContractScenario[];
|
|
3
|
+
/** Every contract scenario of a unit, in `featureFilesFor` order. Missing feature files contribute nothing. */
|
|
4
|
+
export declare function loadContractScenarios(unitDir: string, unit: string): ContractScenario[];
|
|
5
|
+
/** Feature files that make up a unit's contract input (for the inputs hash). */
|
|
6
|
+
export declare const contractFeatureFiles: (unitDir: string, unit: string) => string[];
|
|
7
|
+
//# sourceMappingURL=normalize-feature-steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-feature-steps.d.ts","sourceRoot":"","sources":["../../src/contract/normalize-feature-steps.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAgC,MAAM,mBAAmB,CAAC;AAsCxF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAyBvE;AAED,+GAA+G;AAC/G,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAEvF;AAED,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,KAAG,MAAM,EACiB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.contractFeatureFiles = void 0;
|
|
37
|
+
exports.scenariosOfFeatureFile = scenariosOfFeatureFile;
|
|
38
|
+
exports.loadContractScenarios = loadContractScenarios;
|
|
39
|
+
/**
|
|
40
|
+
* A unit's `.feature` files → its contract scenarios (DOS-14.1, 14.2), through the existing
|
|
41
|
+
* GherkinParser — no second parser.
|
|
42
|
+
*
|
|
43
|
+
* which scenarios every automated one: not `@manual` (scenario or feature), not `@deferred:flow`,
|
|
44
|
+
* not a `@steps:` block or a `@beforeAll/@afterEach/@afterAll` hook
|
|
45
|
+
* steps Background + the `@extend:` base's Given/When (the compiler's own rule) + its own
|
|
46
|
+
* id the title's leading ID (`VP-LOGIN-001`), as the harness reads it; a title with no
|
|
47
|
+
* ID is locked by its name, so renaming it reads as removing it
|
|
48
|
+
* implementation `@free` → free, `@impl:code` → impl:code, otherwise compiled — scenario or feature tag
|
|
49
|
+
* hash contractHash(implementation, steps); the scenario name is not in it
|
|
50
|
+
*
|
|
51
|
+
* A file that does not parse throws: an unreadable contract is never an empty one.
|
|
52
|
+
*/
|
|
53
|
+
const fs = __importStar(require("fs"));
|
|
54
|
+
const path = __importStar(require("path"));
|
|
55
|
+
const gherkin_parser_1 = require("../generators/gherkin-parser");
|
|
56
|
+
const parse_1 = require("../harness/parse");
|
|
57
|
+
const unit_paths_1 = require("../harness/unit-paths");
|
|
58
|
+
const contract_hash_1 = require("./contract-hash");
|
|
59
|
+
const normalize_contract_step_1 = require("./normalize-contract-step");
|
|
60
|
+
const EXCLUDED = (tags) => tags.some((t) => /^@manual\b/i.test(t) || /^@deferred:flow$/i.test(t));
|
|
61
|
+
function implementationOf(tags) {
|
|
62
|
+
if (tags.some((t) => /^@free$/i.test(t)))
|
|
63
|
+
return 'free';
|
|
64
|
+
if (tags.some((t) => /^@impl:code$/i.test(t)))
|
|
65
|
+
return 'impl:code';
|
|
66
|
+
return 'compiled';
|
|
67
|
+
}
|
|
68
|
+
function idOf(name) {
|
|
69
|
+
const lead = name.match(/^\s*([A-Za-z][A-Za-z0-9.-]*)/)?.[1];
|
|
70
|
+
return lead && (0, parse_1.isIdLike)(lead) ? { id: lead.toUpperCase(), hasId: true } : { id: name.replace(/\s+/g, ' ').trim(), hasId: false };
|
|
71
|
+
}
|
|
72
|
+
/** Only Given→When of an `@extend` base: its Then (and the And/But after it) stay with the base. */
|
|
73
|
+
const extendPart = (steps) => steps.filter((_, i) => (0, normalize_contract_step_1.bucketsOf)(steps)[i] !== 'then');
|
|
74
|
+
const normalizeBlock = (steps) => {
|
|
75
|
+
const buckets = (0, normalize_contract_step_1.bucketsOf)(steps);
|
|
76
|
+
return steps.map((s, i) => (0, normalize_contract_step_1.normalizeContractStep)(s, buckets[i]));
|
|
77
|
+
};
|
|
78
|
+
/** 1-based line of each step, searched in order from line index `from` — for messages only (0 = not found). */
|
|
79
|
+
function stepLines(lines, from, steps) {
|
|
80
|
+
let at = Math.max(from, 0);
|
|
81
|
+
return steps.map((s) => {
|
|
82
|
+
const i = lines.findIndex((l, n) => n >= at && l.trim().endsWith(s.text.trim()));
|
|
83
|
+
if (i >= 0)
|
|
84
|
+
at = i + 1;
|
|
85
|
+
return i + 1;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const HEADER = /^\s*(?:Scenario|Scenario Outline|Scenario Template|Example):/;
|
|
89
|
+
const OUTLINE = /^\s*Scenario (?:Outline|Template):/;
|
|
90
|
+
const headerLine = (lines, name) => lines.findIndex((l) => HEADER.test(l) && l.includes(name.trim()));
|
|
91
|
+
function scenariosOfFeatureFile(file) {
|
|
92
|
+
const feature = new gherkin_parser_1.GherkinParser().parseFeatureFile(file);
|
|
93
|
+
const lines = fs.readFileSync(file, 'utf8').split(/\r?\n/);
|
|
94
|
+
const base = new Map();
|
|
95
|
+
for (const sc of feature.scenarios)
|
|
96
|
+
if (sc.stepsName)
|
|
97
|
+
base.set(sc.stepsName, sc);
|
|
98
|
+
const background = feature.background?.steps ?? [];
|
|
99
|
+
const out = [];
|
|
100
|
+
for (const sc of feature.scenarios) {
|
|
101
|
+
const tags = [...(feature.tags ?? []), ...(sc.tags ?? [])];
|
|
102
|
+
if (sc.stepsName || sc.hookType || EXCLUDED(tags))
|
|
103
|
+
continue;
|
|
104
|
+
const baseScenario = sc.extendsName ? base.get(sc.extendsName) : undefined;
|
|
105
|
+
const extended = extendPart(baseScenario?.steps ?? []);
|
|
106
|
+
const steps = [...normalizeBlock(background), ...normalizeBlock(extended), ...normalizeBlock(sc.steps)];
|
|
107
|
+
const implementation = implementationOf(tags);
|
|
108
|
+
const { id, hasId } = idOf(sc.name);
|
|
109
|
+
const header = headerLine(lines, sc.name);
|
|
110
|
+
const sourceLines = [
|
|
111
|
+
...stepLines(lines, 0, background),
|
|
112
|
+
...stepLines(lines, baseScenario ? headerLine(lines, baseScenario.name) : 0, extended),
|
|
113
|
+
...stepLines(lines, header, sc.steps),
|
|
114
|
+
];
|
|
115
|
+
const outline = header >= 0 && OUTLINE.test(lines[header]);
|
|
116
|
+
out.push({ id, implementation, steps, hash: (0, contract_hash_1.contractHash)(implementation, steps), source: { file, name: sc.name, hasId, lines: sourceLines, outline } });
|
|
117
|
+
}
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
/** Every contract scenario of a unit, in `featureFilesFor` order. Missing feature files contribute nothing. */
|
|
121
|
+
function loadContractScenarios(unitDir, unit) {
|
|
122
|
+
return (0, unit_paths_1.featureFilesFor)(unitDir, unit).filter((f) => fs.existsSync(f)).flatMap(scenariosOfFeatureFile);
|
|
123
|
+
}
|
|
124
|
+
/** Feature files that make up a unit's contract input (for the inputs hash). */
|
|
125
|
+
const contractFeatureFiles = (unitDir, unit) => (0, unit_paths_1.featureFilesFor)(unitDir, unit).filter((f) => fs.existsSync(f)).map((f) => path.resolve(f));
|
|
126
|
+
exports.contractFeatureFiles = contractFeatureFiles;
|
|
127
|
+
//# sourceMappingURL=normalize-feature-steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-feature-steps.js","sourceRoot":"","sources":["../../src/contract/normalize-feature-steps.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,wDAyBC;AAGD,sDAEC;AAxFD;;;;;;;;;;;;;GAaG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,iEAAyF;AACzF,4CAA4C;AAC5C,sDAAwD;AACxD,mDAA+C;AAE/C,uEAA6E;AAE7E,MAAM,QAAQ,GAAG,CAAC,IAAc,EAAW,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,mBAAmB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AA,oBAAoB,wBAC4D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ContractStep } from './contract-schema';
|
|
2
|
+
export { assertShapeOf, matcherStrength } from './assertion-matcher-vocabulary';
|
|
3
|
+
export type { AssertShape } from './assertion-matcher-vocabulary';
|
|
4
|
+
/** Does a passing `now` check prove the `was` check (both positive)? */
|
|
5
|
+
export declare function impliesMatcher(now: string | undefined, was: string | undefined): boolean;
|
|
6
|
+
export type AssertComparison = {
|
|
7
|
+
class: 'strengthened' | 'review' | 'oracle-weakened';
|
|
8
|
+
detail: string;
|
|
9
|
+
};
|
|
10
|
+
/** Two assertions on the same target that are NOT identical. */
|
|
11
|
+
export declare function compareAsserts(locked: ContractStep, current: ContractStep): AssertComparison;
|
|
12
|
+
//# sourceMappingURL=oracle-strength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oracle-strength.d.ts","sourceRoot":"","sources":["../../src/contract/oracle-strength.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAChF,YAAY,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAMxF;AAoBD,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,cAAc,GAAG,QAAQ,GAAG,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAIxG,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAsB5F"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matcherStrength = exports.assertShapeOf = void 0;
|
|
4
|
+
exports.impliesMatcher = impliesMatcher;
|
|
5
|
+
exports.compareAsserts = compareAsserts;
|
|
6
|
+
/**
|
|
7
|
+
* How a changed assertion compares to the approved one on the same target (DOS-14.4).
|
|
8
|
+
*
|
|
9
|
+
* Every rule is written for POSITIVE checks, from the approved check A to the new check B:
|
|
10
|
+
* weakened expected value dropped · a data-table row removed or a cell changed · a shorter
|
|
11
|
+
* literal under `contains` · a lower rung on the ladder (conservative)
|
|
12
|
+
* strengthened B implies A, with the same expected value, on the same element (IMPLICATION, never
|
|
13
|
+
* rung): equals ⇒ contains · all:X ⇒ X · url ⇒ url-contains · title ⇒ title-contains
|
|
14
|
+
* review anything else — it blocks delivery until QA re-approves it
|
|
15
|
+
* Nothing implies `visible`: a text or count check passes on a hidden element, and a state (enabled,
|
|
16
|
+
* checked, empty, focused, selected, loading, sorted…) says nothing about visibility either.
|
|
17
|
+
*
|
|
18
|
+
* Under a NEGATION the direction reverses — `not P` proves `not Q` exactly when Q ⇒ P — so the same
|
|
19
|
+
* rules run with A and B swapped: `does not see [Toast]` → `does not see [Toast] with text {{x}}` is
|
|
20
|
+
* a weakening (a visible toast with other text now passes). A negation added or removed is a flip.
|
|
21
|
+
*/
|
|
22
|
+
const contract_hash_1 = require("./contract-hash");
|
|
23
|
+
const assertion_matcher_vocabulary_1 = require("./assertion-matcher-vocabulary");
|
|
24
|
+
var assertion_matcher_vocabulary_2 = require("./assertion-matcher-vocabulary");
|
|
25
|
+
Object.defineProperty(exports, "assertShapeOf", { enumerable: true, get: function () { return assertion_matcher_vocabulary_2.assertShapeOf; } });
|
|
26
|
+
Object.defineProperty(exports, "matcherStrength", { enumerable: true, get: function () { return assertion_matcher_vocabulary_2.matcherStrength; } });
|
|
27
|
+
const IMPLIES = { equals: ['contains'], url: ['url-contains'], title: ['title-contains'] };
|
|
28
|
+
/** Does a passing `now` check prove the `was` check (both positive)? */
|
|
29
|
+
function impliesMatcher(now, was) {
|
|
30
|
+
if (!now || !was || now === was)
|
|
31
|
+
return false;
|
|
32
|
+
if (was.startsWith('all:') && !now.startsWith('all:'))
|
|
33
|
+
return false;
|
|
34
|
+
const n = now.replace(/^all:/, '');
|
|
35
|
+
const w = was.replace(/^all:/, '');
|
|
36
|
+
return n === w || (IMPLIES[n] ?? []).includes(w);
|
|
37
|
+
}
|
|
38
|
+
const CONNECTORS = new Set(['with', 'has', 'have', 'contains', 'contain', 'includes', 'include', 'is', 'matches', 'in', 'to', 'and']);
|
|
39
|
+
const elementType = (verb) => {
|
|
40
|
+
const m = verb.match(/\[\] ([\w-]+)/);
|
|
41
|
+
return m && !CONNECTORS.has(m[1]) ? m[1] : '';
|
|
42
|
+
};
|
|
43
|
+
const isLiteral = (v) => v !== undefined && !/\{\{|<[^>]+>/.test(v);
|
|
44
|
+
const baseOf = (m) => (m ?? '').replace(/^all:/, '');
|
|
45
|
+
const rowsOf = (t) => (t ?? []).map((r) => JSON.stringify(r));
|
|
46
|
+
const TEXT = new Set(['equals', 'contains']);
|
|
47
|
+
/** x ⇒ y for two positive LITERAL text checks (equals / contains); null when they are not both that. */
|
|
48
|
+
function literalImplies(x, y) {
|
|
49
|
+
const bx = baseOf(x.matcher);
|
|
50
|
+
const by = baseOf(y.matcher);
|
|
51
|
+
if (!isLiteral(x.expected) || !isLiteral(y.expected) || !TEXT.has(bx) || !TEXT.has(by))
|
|
52
|
+
return null;
|
|
53
|
+
return by === 'equals' ? bx === 'equals' && x.expected === y.expected : x.expected.includes(y.expected);
|
|
54
|
+
}
|
|
55
|
+
const show = (s) => `${s.negated ? 'not ' : ''}${s.matcher ?? '?'}${s.expected !== undefined ? ` "${s.expected}"` : ''}`;
|
|
56
|
+
/** Two assertions on the same target that are NOT identical. */
|
|
57
|
+
function compareAsserts(locked, current) {
|
|
58
|
+
const change = `${show(locked)} → ${show(current)}`;
|
|
59
|
+
const weak = (why) => ({ class: 'oracle-weakened', detail: `${why}: ${change}` });
|
|
60
|
+
const review = (why) => ({ class: 'review', detail: `${why}: ${change}` });
|
|
61
|
+
if (!!locked.negated !== !!current.negated)
|
|
62
|
+
return weak('negation flipped');
|
|
63
|
+
const neg = locked.negated === true;
|
|
64
|
+
const [a, b] = neg ? [current, locked] : [locked, current];
|
|
65
|
+
const sa = (0, assertion_matcher_vocabulary_1.matcherStrength)(a.matcher);
|
|
66
|
+
const sb = (0, assertion_matcher_vocabulary_1.matcherStrength)(b.matcher);
|
|
67
|
+
if (sa === null || sb === null)
|
|
68
|
+
return review(`the ladder cannot judge "${locked.verb}" → "${current.verb}"`);
|
|
69
|
+
if (a.expected !== undefined && b.expected === undefined)
|
|
70
|
+
return weak(neg ? 'a value was added to a negated check' : 'expected value dropped');
|
|
71
|
+
if (a.table) {
|
|
72
|
+
const kept = new Set(rowsOf(b.table));
|
|
73
|
+
const lost = rowsOf(a.table).filter((r) => !kept.has(r)).length;
|
|
74
|
+
if (lost)
|
|
75
|
+
return weak(`${lost} data-table row(s) ${neg ? 'added to a negated check' : 'removed or changed'}`);
|
|
76
|
+
}
|
|
77
|
+
if (literalImplies(a, b) === true && literalImplies(b, a) === false)
|
|
78
|
+
return weak(neg ? 'a longer literal under a negated check' : 'a shorter literal under contains');
|
|
79
|
+
if (sb < sa)
|
|
80
|
+
return weak('weaker check');
|
|
81
|
+
if (a.expected !== undefined && b.expected !== a.expected)
|
|
82
|
+
return review('expected value changed');
|
|
83
|
+
const sameElement = (0, contract_hash_1.sameJson)(a.target, b.target) && elementType(a.verb) === elementType(b.verb) && rowsOf(a.table).length === rowsOf(b.table).length;
|
|
84
|
+
if (sameElement && impliesMatcher(b.matcher, a.matcher))
|
|
85
|
+
return { class: 'strengthened', detail: `stronger check: ${change}` };
|
|
86
|
+
return review('changed, and the new check does not prove the approved one');
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=oracle-strength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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KAAK,SAAS,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QAAE,OAAO,MAAM,CAAC,wBAAwB,CAAC,CAAC;IACnG,MAAM,WAAW,GAAG,IAAA,wBAAQ,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IACrJ,IAAI,WAAW,IAAI,cAAc,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,mBAAmB,MAAM,EAAE,EAAE,CAAC;IAC/H,OAAO,MAAM,CAAC,4DAA4D,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContractUnit, VerdictValue } from './build-contract-verdict';
|
|
2
|
+
export interface ContractBlocker {
|
|
3
|
+
unit: string;
|
|
4
|
+
verdict: Exclude<VerdictValue, 'pass'>;
|
|
5
|
+
headline: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function contractBlockers(projectRoot: string, units: ContractUnit[], opts?: {
|
|
8
|
+
gitTimeoutMs?: number;
|
|
9
|
+
}): ContractBlocker[];
|
|
10
|
+
//# sourceMappingURL=project-contract-blockers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-contract-blockers.d.ts","sourceRoot":"","sources":["../../src/contract/project-contract-blockers.ts"],"names":[],"mappings":"AAWA,OAAO,EAAwB,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK5F,MAAM,WAAW,eAAe;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAE3G,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,eAAe,EAAE,CAiBpI"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.contractBlockers = contractBlockers;
|
|
37
|
+
/**
|
|
38
|
+
* Which units' contracts hold a delivery back — for the Claude Code guard (OES-12.3, DOS-14.4).
|
|
39
|
+
*
|
|
40
|
+
* HEAD is read once (one `git ls-tree`, bounded by the caller's timeout). A unit with no lock in the
|
|
41
|
+
* working tree AND none in HEAD has no contract to break and is skipped without parsing anything.
|
|
42
|
+
* Every other unit gets its verdict rebuilt by buildContractVerdict — the same function `contract
|
|
43
|
+
* check` runs — and anything but `pass` blocks. A lock deleted from the working tree still counts
|
|
44
|
+
* while HEAD holds it. If git FAILS in a checkout that has .git while a delivered unit has a lock,
|
|
45
|
+
* this throws (GitUnavailableError): the guard asks rather than calling an unverifiable lock clean.
|
|
46
|
+
*/
|
|
47
|
+
const fs = __importStar(require("fs"));
|
|
48
|
+
const build_contract_verdict_1 = require("./build-contract-verdict");
|
|
49
|
+
const contract_git_1 = require("./contract-git");
|
|
50
|
+
const contract_schema_1 = require("./contract-schema");
|
|
51
|
+
const contracts_lock_file_1 = require("./contracts-lock-file");
|
|
52
|
+
function contractBlockers(projectRoot, units, opts = {}) {
|
|
53
|
+
const unique = [...new Map(units.map((u) => [u.dir, u])).values()];
|
|
54
|
+
const snap = (0, contract_git_1.headSnapshot)(projectRoot, opts.gitTimeoutMs ?? contract_git_1.CLI_GIT_TIMEOUT_MS);
|
|
55
|
+
const hasWorkingLock = (u) => fs.existsSync((0, contracts_lock_file_1.lockPathFor)(u.dir));
|
|
56
|
+
if (snap.error && unique.some(hasWorkingLock))
|
|
57
|
+
throw new contract_git_1.GitUnavailableError(snap.error);
|
|
58
|
+
const out = [];
|
|
59
|
+
for (const unit of unique) {
|
|
60
|
+
if (!hasWorkingLock(unit) && !snap.blobs?.has((0, contract_git_1.posixRel)(projectRoot, (0, contracts_lock_file_1.lockPathFor)(unit.dir))))
|
|
61
|
+
continue;
|
|
62
|
+
const v = (0, build_contract_verdict_1.buildContractVerdict)(projectRoot, unit, { snapshot: snap });
|
|
63
|
+
if (v.verdict === 'pass')
|
|
64
|
+
continue;
|
|
65
|
+
const worst = v.scenarios.find((s) => contract_schema_1.HARD_CLASSES.has(s.class)) ?? v.scenarios.find((s) => s.class === 'hash-changed');
|
|
66
|
+
const headline = worst
|
|
67
|
+
? `${worst.id} ${worst.class}${worst.findings[0] ? ` (${worst.findings[0].detail})` : ''}`
|
|
68
|
+
: `${v.uncommitted.length} lock entr${v.uncommitted.length === 1 ? 'y is' : 'ies are'} not what QA approved and committed (${v.uncommitted[0]?.id} ${v.uncommitted[0]?.change})`;
|
|
69
|
+
out.push({ unit: unit.name, verdict: v.verdict, headline });
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=project-contract-blockers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-contract-blockers.js","sourceRoot":"","sources":["../../src/contract/project-contract-blockers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,4CAiBC;AAnCD;;;;;;;;;GASG;AACH,uCAAyB;AACzB,qEAA4F;AAC5F,iDAAiG;AACjG,uDAAiD;AACjD,+DAAoD;AAIpD,SAAgB,gBAAgB,CAAC,WAAmB,EAAE,KAAqB,EAAE,OAAkC,EAAE;IAC/G,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,IAAA,2BAAY,EAAC,WAAW,EAAE,IA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,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1F,CAAC,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,MAAM,aAAa,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC;QACnL,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ContractLock, ContractScenario } from './contract-schema';
|
|
2
|
+
export interface ApprovalWrite {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
unitDir: string;
|
|
5
|
+
unit: string;
|
|
6
|
+
approve: ContractScenario[];
|
|
7
|
+
removed: string[];
|
|
8
|
+
reason?: string;
|
|
9
|
+
lock: ContractLock | null;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_APPROVAL_REASON = "QA reviewed the normalized Gherkin contract";
|
|
12
|
+
/** The decision scope of a unit directory (`screens/login`, `api/flows/pay`…). */
|
|
13
|
+
export declare function scopeOfUnitDir(projectRoot: string, unitDir: string): string;
|
|
14
|
+
export declare function nextLock(w: ApprovalWrite, decisionId: string, approvedAt: string): ContractLock;
|
|
15
|
+
/** Throws LockSecretError when the lock this approval would write carries a sensitive value. */
|
|
16
|
+
export declare function checkApprovalSecrets(w: ApprovalWrite): void;
|
|
17
|
+
export declare function recordContractApproval(w: ApprovalWrite): {
|
|
18
|
+
decisionId: string;
|
|
19
|
+
lock: ContractLock;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=record-contract-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-contract-approval.d.ts","sourceRoot":"","sources":["../../src/contract/record-contract-approval.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAe,MAAM,mBAAmB,CAAC;AAIhF,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,gDAAgD,CAAC;AAErF,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAI3E;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,YAAY,CAK/F;AAED,gGAAgG;AAChG,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAE3D;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,aAAa,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAiBnG"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DEFAULT_APPROVAL_REASON = void 0;
|
|
37
|
+
exports.scopeOfUnitDir = scopeOfUnitDir;
|
|
38
|
+
exports.nextLock = nextLock;
|
|
39
|
+
exports.checkApprovalSecrets = checkApprovalSecrets;
|
|
40
|
+
exports.recordContractApproval = recordContractApproval;
|
|
41
|
+
/**
|
|
42
|
+
* What an approval writes, once a human has confirmed it (DOS-14.3, DOS-14.4, takumi T5):
|
|
43
|
+
*
|
|
44
|
+
* 1. the secret guard over the exact lock text — a hit writes nothing at all
|
|
45
|
+
* 2. a `contract-approval` decision listing every approved scenario id + hash (and the removals)
|
|
46
|
+
* 3. the lock: each approved entry `humanApproved: true`, `decisionId` = that decision, and
|
|
47
|
+
* `approvedAt` = its `valid_from` — the pair `contract check` cross-checks (M1)
|
|
48
|
+
*
|
|
49
|
+
* The decision goes first: a crash between the two leaves a record without a lock entry, never an
|
|
50
|
+
* entry pointing at nothing. Only `sungen contract approve` calls this after its TTY confirmation;
|
|
51
|
+
* the confirmation itself lives there (approve-contract.ts).
|
|
52
|
+
*/
|
|
53
|
+
const path = __importStar(require("path"));
|
|
54
|
+
const append_decision_1 = require("../decisions/append-decision");
|
|
55
|
+
const decision_file_1 = require("../decisions/decision-file");
|
|
56
|
+
const decision_source_1 = require("../decisions/decision-source");
|
|
57
|
+
const contract_schema_1 = require("./contract-schema");
|
|
58
|
+
const contracts_lock_file_1 = require("./contracts-lock-file");
|
|
59
|
+
const lock_secret_guard_1 = require("./lock-secret-guard");
|
|
60
|
+
exports.DEFAULT_APPROVAL_REASON = 'QA reviewed the normalized Gherkin contract';
|
|
61
|
+
/** The decision scope of a unit directory (`screens/login`, `api/flows/pay`…). */
|
|
62
|
+
function scopeOfUnitDir(projectRoot, unitDir) {
|
|
63
|
+
const scope = path.relative(path.join(projectRoot, 'qa'), unitDir).split(path.sep).join('/');
|
|
64
|
+
if (!(0, decision_file_1.isValidScope)(scope))
|
|
65
|
+
throw new Error(`${unitDir} is not a unit directory under qa/ (screens|flows|api/<unit>, api/flows/<flow>)`);
|
|
66
|
+
return scope;
|
|
67
|
+
}
|
|
68
|
+
function nextLock(w, decisionId, approvedAt) {
|
|
69
|
+
const scenarios = { ...(w.lock?.scenarios ?? {}) };
|
|
70
|
+
for (const id of w.removed)
|
|
71
|
+
delete scenarios[id];
|
|
72
|
+
for (const sc of w.approve)
|
|
73
|
+
scenarios[sc.id] = (0, contracts_lock_file_1.lockEntryFor)(sc, decisionId, approvedAt);
|
|
74
|
+
return { schema: contract_schema_1.LOCK_SCHEMA, scenarios };
|
|
75
|
+
}
|
|
76
|
+
/** Throws LockSecretError when the lock this approval would write carries a sensitive value. */
|
|
77
|
+
function checkApprovalSecrets(w) {
|
|
78
|
+
(0, lock_secret_guard_1.assertNoLockSecrets)(w.approve, (0, contracts_lock_file_1.serializeLock)(nextLock(w, 'D-0000000000000000', new Date().toISOString())));
|
|
79
|
+
}
|
|
80
|
+
function recordContractApproval(w) {
|
|
81
|
+
const scope = scopeOfUnitDir(w.projectRoot, w.unitDir);
|
|
82
|
+
checkApprovalSecrets(w);
|
|
83
|
+
const payload = {
|
|
84
|
+
unit: w.unit,
|
|
85
|
+
scenarios: w.approve.map((s) => ({ id: s.id, hash: s.hash, implementation: s.implementation })),
|
|
86
|
+
removed: w.removed,
|
|
87
|
+
};
|
|
88
|
+
const decision = (0, append_decision_1.appendDecision)(w.projectRoot, scope, {
|
|
89
|
+
kind: 'contract-approval', anchors: [], visibility: 'internal', valid_from: new Date().toISOString(), payload,
|
|
90
|
+
text: `Approved the Test Contract of ${w.unit}: ${[...w.approve.map((s) => s.id), ...w.removed.map((id) => `-${id}`)].join(', ')}`,
|
|
91
|
+
reason: w.reason?.trim() || exports.DEFAULT_APPROVAL_REASON,
|
|
92
|
+
source: { by: (0, decision_source_1.gitUserName)(w.projectRoot), where: 'cli' },
|
|
93
|
+
});
|
|
94
|
+
const lock = nextLock(w, decision.entry.id, decision.entry.valid_from);
|
|
95
|
+
(0, contracts_lock_file_1.writeLockFile)((0, contracts_lock_file_1.lockPathFor)(w.unitDir), lock);
|
|
96
|
+
return { decisionId: decision.entry.id, lock };
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=record-contract-approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-contract-approval.js","sourceRoot":"","sources":["../../src/contract/record-contract-approval.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,wCAIC;AAED,4BAKC;AAGD,oDAEC;AAED,wDAiBC;AArED;;;;;;;;;;;GAWG;AACH,2CAA6B;AAC7B,kEAA8D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AAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACvE,IAAA,mCAAa,EAAC,IAAA,iCAAW,EAAC,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TestDataIndex } from './data-normalize';
|
|
2
|
+
import type { TargetFacts, TargetIdentity } from './trace/target-identity';
|
|
3
|
+
import type { IntentStep } from './trace/trace-steps';
|
|
4
|
+
export declare const CONTROL_CHARS: RegExp;
|
|
5
|
+
export interface ResolvedTarget {
|
|
6
|
+
identity: TargetIdentity;
|
|
7
|
+
facts?: TargetFacts;
|
|
8
|
+
}
|
|
9
|
+
export interface RenderedStep {
|
|
10
|
+
keyword: 'Given' | 'When' | 'Then' | 'And';
|
|
11
|
+
sentence: string;
|
|
12
|
+
kind: 'action' | 'assert';
|
|
13
|
+
/** The outermost `test.step` title (impl:code compares group by group). */
|
|
14
|
+
group?: string;
|
|
15
|
+
low?: string;
|
|
16
|
+
opaque?: {
|
|
17
|
+
verbatim: string;
|
|
18
|
+
where?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface RenderContext {
|
|
22
|
+
index: TestDataIndex;
|
|
23
|
+
projectRoot: string;
|
|
24
|
+
specFile?: string;
|
|
25
|
+
secrets: Set<string>;
|
|
26
|
+
}
|
|
27
|
+
export declare function renderTraceSteps(steps: IntentStep[], targets: Map<string, ResolvedTarget>, ctx: RenderContext): RenderedStep[];
|
|
28
|
+
/** The Gherkin lines of one scenario's steps, with their comments. */
|
|
29
|
+
export declare function stepLines(steps: RenderedStep[]): string[];
|
|
30
|
+
export interface FreeScenarioBlock {
|
|
31
|
+
id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
tags: string[];
|
|
34
|
+
comments: string[];
|
|
35
|
+
steps: RenderedStep[];
|
|
36
|
+
}
|
|
37
|
+
export declare function scenarioBlockText(b: FreeScenarioBlock): string;
|
|
38
|
+
export declare const FREE_FEATURE_HEADER: string[];
|
|
39
|
+
export declare function freeFeatureText(unit: string, blocks: string[]): string;
|
|
40
|
+
//# sourceMappingURL=render-free-gherkin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-free-gherkin.d.ts","sourceRoot":"","sources":["../../src/contract/render-free-gherkin.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAsB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,aAAa,QAAuC,CAAC;AAElE,MAAM,WAAW,cAAc;IAAG,QAAQ,EAAE,cAAc,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE;AACjF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AACD,MAAM,WAAW,aAAa;IAAG,KAAK,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CA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