@sun-asterisk/sungen 3.3.0-alpha.1 → 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/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/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/contract-derive-command.d.ts +4 -2
- package/dist/cli/commands/contract-derive-command.d.ts.map +1 -1
- package/dist/cli/commands/contract-derive-command.js +19 -5
- package/dist/cli/commands/contract-derive-command.js.map +1 -1
- package/dist/cli/commands/contract.d.ts +3 -0
- package/dist/cli/commands/contract.d.ts.map +1 -1
- package/dist/cli/commands/contract.js +40 -7
- package/dist/cli/commands/contract.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +59 -18
- 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 +14 -2
- 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 +6 -4
- package/dist/cli/commands/journey.js.map +1 -1
- package/dist/cli/commands/next.d.ts +7 -2
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +41 -10
- 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.map +1 -1
- package/dist/cli/commands/update.js +6 -2
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +5 -1
- 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 +8 -1
- package/dist/contract/approve-contract.d.ts.map +1 -1
- package/dist/contract/approve-contract.js +6 -0
- package/dist/contract/approve-contract.js.map +1 -1
- package/dist/contract/build-contract-verdict.js +2 -2
- package/dist/contract/build-contract-verdict.js.map +1 -1
- package/dist/contract/build-trace-conformance.d.ts +5 -1
- package/dist/contract/build-trace-conformance.d.ts.map +1 -1
- package/dist/contract/build-trace-conformance.js +12 -14
- package/dist/contract/build-trace-conformance.js.map +1 -1
- package/dist/contract/classify-contract-change.d.ts +3 -2
- package/dist/contract/classify-contract-change.d.ts.map +1 -1
- package/dist/contract/classify-contract-change.js.map +1 -1
- package/dist/contract/classify-trace-conformance.d.ts +18 -3
- package/dist/contract/classify-trace-conformance.d.ts.map +1 -1
- package/dist/contract/classify-trace-conformance.js +64 -17
- package/dist/contract/classify-trace-conformance.js.map +1 -1
- package/dist/contract/contract-schema.d.ts +21 -0
- package/dist/contract/contract-schema.d.ts.map +1 -1
- package/dist/contract/contract-schema.js +25 -3
- package/dist/contract/contract-schema.js.map +1 -1
- package/dist/contract/contracts-lock-file.d.ts.map +1 -1
- package/dist/contract/contracts-lock-file.js +1 -0
- package/dist/contract/contracts-lock-file.js.map +1 -1
- package/dist/contract/derive-free-feature.d.ts +19 -0
- package/dist/contract/derive-free-feature.d.ts.map +1 -1
- package/dist/contract/derive-free-feature.js +40 -2
- package/dist/contract/derive-free-feature.js.map +1 -1
- package/dist/contract/project-contract-blockers.d.ts.map +1 -1
- package/dist/contract/project-contract-blockers.js +4 -2
- package/dist/contract/project-contract-blockers.js.map +1 -1
- package/dist/contract/record-contract-approval.d.ts +16 -1
- package/dist/contract/record-contract-approval.d.ts.map +1 -1
- package/dist/contract/record-contract-approval.js +29 -1
- package/dist/contract/record-contract-approval.js.map +1 -1
- package/dist/contract/render-free-gherkin.d.ts +2 -0
- package/dist/contract/render-free-gherkin.d.ts.map +1 -1
- package/dist/contract/render-free-gherkin.js +6 -0
- package/dist/contract/render-free-gherkin.js.map +1 -1
- package/dist/contract/resolve-unit-trace-identities.d.ts +12 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts.map +1 -1
- package/dist/contract/resolve-unit-trace-identities.js +33 -49
- package/dist/contract/resolve-unit-trace-identities.js.map +1 -1
- package/dist/contract/trace/collect-trace-evidence.d.ts +16 -5
- package/dist/contract/trace/collect-trace-evidence.d.ts.map +1 -1
- package/dist/contract/trace/collect-trace-evidence.js +101 -43
- package/dist/contract/trace/collect-trace-evidence.js.map +1 -1
- 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 +4 -2
- package/dist/contract/trace/select-final-attempt.d.ts.map +1 -1
- package/dist/contract/trace/select-final-attempt.js +7 -4
- package/dist/contract/trace/select-final-attempt.js.map +1 -1
- package/dist/contract/trace/test-step-join.d.ts +3 -3
- package/dist/contract/trace/test-step-join.d.ts.map +1 -1
- package/dist/contract/trace/test-step-join.js +2 -2
- package/dist/contract/trace/test-step-join.js.map +1 -1
- package/dist/contract/trace/trace-binding.d.ts +3 -2
- package/dist/contract/trace/trace-binding.d.ts.map +1 -1
- package/dist/contract/trace/trace-binding.js +6 -3
- package/dist/contract/trace/trace-binding.js.map +1 -1
- package/dist/contract/trace/trace-file-reader.d.ts +14 -2
- package/dist/contract/trace/trace-file-reader.d.ts.map +1 -1
- package/dist/contract/trace/trace-file-reader.js +27 -45
- package/dist/contract/trace/trace-file-reader.js.map +1 -1
- 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 +2 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts.map +1 -1
- package/dist/contract/trace/trace-identity-resolution.js +6 -3
- package/dist/contract/trace/trace-identity-resolution.js.map +1 -1
- package/dist/contract/trace/trace-run-record.d.ts +8 -3
- package/dist/contract/trace/trace-run-record.d.ts.map +1 -1
- package/dist/contract/trace/trace-run-record.js +42 -22
- package/dist/contract/trace/trace-run-record.js.map +1 -1
- package/dist/contract/trace/trace-steps.js +1 -1
- package/dist/contract/trace/trace-steps.js.map +1 -1
- package/dist/contract/trace/trace-zip-limits.d.ts +5 -1
- package/dist/contract/trace/trace-zip-limits.d.ts.map +1 -1
- package/dist/contract/trace/trace-zip-limits.js +6 -2
- package/dist/contract/trace/trace-zip-limits.js.map +1 -1
- package/dist/contract/verify-approval-decisions.d.ts.map +1 -1
- package/dist/contract/verify-approval-decisions.js +9 -4
- package/dist/contract/verify-approval-decisions.js.map +1 -1
- package/dist/decisions/confirmed-decision-commands.d.ts +11 -0
- package/dist/decisions/confirmed-decision-commands.d.ts.map +1 -1
- package/dist/decisions/confirmed-decision-commands.js +21 -3
- package/dist/decisions/confirmed-decision-commands.js.map +1 -1
- package/dist/decisions/decision-schema.d.ts +2 -1
- package/dist/decisions/decision-schema.d.ts.map +1 -1
- package/dist/decisions/decision-schema.js +2 -1
- package/dist/decisions/decision-schema.js.map +1 -1
- package/dist/decisions/git-head-trust.d.ts +12 -0
- package/dist/decisions/git-head-trust.d.ts.map +1 -1
- package/dist/decisions/git-head-trust.js +52 -0
- package/dist/decisions/git-head-trust.js.map +1 -1
- package/dist/decisions/human-confirmation.d.ts +2 -0
- package/dist/decisions/human-confirmation.d.ts.map +1 -1
- package/dist/decisions/human-confirmation.js +6 -0
- package/dist/decisions/human-confirmation.js.map +1 -1
- package/dist/decisions/legacy-waiver-migration.d.ts +8 -1
- package/dist/decisions/legacy-waiver-migration.d.ts.map +1 -1
- package/dist/decisions/legacy-waiver-migration.js +13 -4
- package/dist/decisions/legacy-waiver-migration.js.map +1 -1
- 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/export.d.ts +6 -1
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +11 -4
- package/dist/exporters/matrix/export.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/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/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 +21 -1
- package/dist/graph/evaluate-graph.d.ts.map +1 -1
- package/dist/graph/evaluate-graph.js +37 -9
- package/dist/graph/evaluate-graph.js.map +1 -1
- 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/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 +16 -0
- package/dist/graph/node-decl.d.ts.map +1 -1
- package/dist/graph/node-decl.js +4 -1
- package/dist/graph/node-decl.js.map +1 -1
- package/dist/graph/nodes/test-case-contract-nodes.d.ts +3 -1
- package/dist/graph/nodes/test-case-contract-nodes.d.ts.map +1 -1
- package/dist/graph/nodes/test-case-contract-nodes.js +22 -6
- package/dist/graph/nodes/test-case-contract-nodes.js.map +1 -1
- package/dist/graph/nodes/test-case-nodes.d.ts +3 -0
- package/dist/graph/nodes/test-case-nodes.d.ts.map +1 -1
- package/dist/graph/nodes/test-case-nodes.js +33 -4
- package/dist/graph/nodes/test-case-nodes.js.map +1 -1
- package/dist/graph/nodes/unit-audit-nodes.d.ts.map +1 -1
- package/dist/graph/nodes/unit-audit-nodes.js +1 -0
- package/dist/graph/nodes/unit-audit-nodes.js.map +1 -1
- package/dist/graph/nodes/unit-contract-node.d.ts +2 -1
- package/dist/graph/nodes/unit-contract-node.d.ts.map +1 -1
- package/dist/graph/nodes/unit-contract-node.js +16 -1
- package/dist/graph/nodes/unit-contract-node.js.map +1 -1
- package/dist/graph/nodes/unit-design-nodes.d.ts.map +1 -1
- package/dist/graph/nodes/unit-design-nodes.js +2 -1
- package/dist/graph/nodes/unit-design-nodes.js.map +1 -1
- package/dist/graph/test-case-results.d.ts +1 -0
- package/dist/graph/test-case-results.d.ts.map +1 -1
- package/dist/graph/test-case-results.js +27 -3
- package/dist/graph/test-case-results.js.map +1 -1
- package/dist/graph/test-case-satisfied.d.ts +5 -4
- package/dist/graph/test-case-satisfied.d.ts.map +1 -1
- package/dist/graph/test-case-satisfied.js +4 -0
- package/dist/graph/test-case-satisfied.js.map +1 -1
- package/dist/graph/test-case-state-shape.d.ts +7 -1
- package/dist/graph/test-case-state-shape.d.ts.map +1 -1
- package/dist/graph/unit-artifact-probes.d.ts.map +1 -1
- package/dist/graph/unit-artifact-probes.js +3 -1
- package/dist/graph/unit-artifact-probes.js.map +1 -1
- 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/harness/audit.d.ts +3 -2
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +4 -17
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/gate-rules.yaml +3 -3
- 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-verdict.d.ts.map +1 -1
- package/dist/harness/gates/audit-gate-verdict.js +2 -1
- package/dist/harness/gates/audit-gate-verdict.js.map +1 -1
- package/dist/harness/gates/audit-input-hash.d.ts +2 -0
- package/dist/harness/gates/audit-input-hash.d.ts.map +1 -1
- package/dist/harness/gates/audit-input-hash.js +30 -2
- package/dist/harness/gates/audit-input-hash.js.map +1 -1
- package/dist/harness/gates/audit-report-verification.d.ts +17 -6
- package/dist/harness/gates/audit-report-verification.d.ts.map +1 -1
- package/dist/harness/gates/audit-report-verification.js +55 -21
- package/dist/harness/gates/audit-report-verification.js.map +1 -1
- package/dist/harness/gates/delivery-checklist.d.ts +3 -0
- package/dist/harness/gates/delivery-checklist.d.ts.map +1 -1
- package/dist/harness/gates/delivery-checklist.js +39 -6
- package/dist/harness/gates/delivery-checklist.js.map +1 -1
- package/dist/harness/gates/delivery-decision-gate.d.ts +4 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts.map +1 -1
- package/dist/harness/gates/delivery-decision-gate.js +26 -1
- package/dist/harness/gates/delivery-decision-gate.js.map +1 -1
- package/dist/harness/gates/delivery-decision-step.d.ts +4 -1
- package/dist/harness/gates/delivery-decision-step.d.ts.map +1 -1
- package/dist/harness/gates/delivery-decision-step.js +17 -2
- package/dist/harness/gates/delivery-decision-step.js.map +1 -1
- package/dist/harness/gates/in-run-decision-check.d.ts.map +1 -1
- package/dist/harness/gates/in-run-decision-check.js +40 -12
- package/dist/harness/gates/in-run-decision-check.js.map +1 -1
- 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 +14 -4
- package/dist/harness/gates/migrated-waiver-review.d.ts.map +1 -1
- package/dist/harness/gates/migrated-waiver-review.js +78 -80
- package/dist/harness/gates/migrated-waiver-review.js.map +1 -1
- package/dist/harness/journey.d.ts +40 -0
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +155 -22
- package/dist/harness/journey.js.map +1 -1
- package/dist/harness/next-step.d.ts +19 -0
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +21 -0
- package/dist/harness/next-step.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/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 +12 -2
- package/dist/hooks/bash-write-targets.d.ts.map +1 -1
- package/dist/hooks/bash-write-targets.js +122 -29
- package/dist/hooks/bash-write-targets.js.map +1 -1
- package/dist/hooks/guard-protected-paths.d.ts +4 -0
- package/dist/hooks/guard-protected-paths.d.ts.map +1 -1
- package/dist/hooks/guard-protected-paths.js +13 -3
- package/dist/hooks/guard-protected-paths.js.map +1 -1
- package/dist/hooks/guard-rules.d.ts +0 -17
- package/dist/hooks/guard-rules.d.ts.map +1 -1
- package/dist/hooks/guard-rules.js +79 -10
- package/dist/hooks/guard-rules.js.map +1 -1
- package/dist/hooks/guard-tty-spoof-rule.d.ts +3 -1
- package/dist/hooks/guard-tty-spoof-rule.d.ts.map +1 -1
- package/dist/hooks/guard-tty-spoof-rule.js +3 -2
- package/dist/hooks/guard-tty-spoof-rule.js.map +1 -1
- package/dist/hooks/hand-back-core.d.ts +9 -4
- package/dist/hooks/hand-back-core.d.ts.map +1 -1
- package/dist/hooks/hand-back-core.js +24 -11
- package/dist/hooks/hand-back-core.js.map +1 -1
- package/dist/hooks/session-start-unit-state-hook.d.ts +2 -1
- package/dist/hooks/session-start-unit-state-hook.d.ts.map +1 -1
- package/dist/hooks/session-start-unit-state-hook.js +9 -4
- package/dist/hooks/session-start-unit-state-hook.js.map +1 -1
- package/dist/hooks/stop-next-step-hook.d.ts.map +1 -1
- package/dist/hooks/stop-next-step-hook.js +1 -0
- package/dist/hooks/stop-next-step-hook.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/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +1 -0
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +6 -3
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/review.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +1 -1
- 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/package.json +3 -3
- package/src/capabilities/discover.ts +15 -2
- package/src/cli/case-triage-hint.ts +31 -0
- package/src/cli/commands/audit.ts +1 -1
- package/src/cli/commands/contract-derive-command.ts +20 -8
- package/src/cli/commands/contract.ts +41 -7
- package/src/cli/commands/delivery.ts +56 -18
- package/src/cli/commands/gate.ts +2 -1
- package/src/cli/commands/generate.ts +13 -2
- package/src/cli/commands/journey.ts +8 -6
- package/src/cli/commands/next.ts +41 -12
- package/src/cli/commands/triage.ts +41 -3
- package/src/cli/commands/update.ts +6 -2
- package/src/cli/index.ts +5 -1
- 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 +10 -3
- package/src/contract/build-contract-verdict.ts +2 -2
- package/src/contract/build-trace-conformance.ts +11 -8
- package/src/contract/classify-contract-change.ts +3 -3
- package/src/contract/classify-trace-conformance.ts +76 -22
- package/src/contract/contract-schema.ts +31 -2
- package/src/contract/contracts-lock-file.ts +1 -0
- package/src/contract/derive-free-feature.ts +46 -3
- package/src/contract/project-contract-blockers.ts +4 -2
- package/src/contract/record-contract-approval.ts +41 -1
- package/src/contract/render-free-gherkin.ts +5 -0
- package/src/contract/resolve-unit-trace-identities.ts +35 -12
- package/src/contract/trace/collect-trace-evidence.ts +105 -36
- 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 +12 -5
- package/src/contract/trace/test-step-join.ts +6 -5
- package/src/contract/trace/trace-binding.ts +7 -4
- package/src/contract/trace/trace-file-reader.ts +34 -13
- package/src/contract/trace/trace-freshness.ts +110 -0
- package/src/contract/trace/trace-identity-resolution.ts +7 -4
- package/src/contract/trace/trace-run-record.ts +37 -15
- package/src/contract/trace/trace-steps.ts +1 -1
- package/src/contract/trace/trace-zip-limits.ts +6 -2
- package/src/contract/verify-approval-decisions.ts +9 -5
- package/src/decisions/confirmed-decision-commands.ts +25 -4
- package/src/decisions/decision-schema.ts +2 -1
- package/src/decisions/git-head-trust.ts +44 -0
- package/src/decisions/human-confirmation.ts +5 -0
- package/src/decisions/legacy-waiver-migration.ts +14 -3
- package/src/exporters/csv-exporter.ts +12 -4
- package/src/exporters/matrix/export.ts +11 -4
- package/src/exporters/matrix/xlsx-cells.ts +1 -1
- package/src/exporters/xlsx-exporter.ts +5 -4
- package/src/graph/board-human-actions.ts +80 -0
- package/src/graph/evaluate-graph.ts +45 -10
- package/src/graph/human-action.ts +33 -0
- package/src/graph/manual-triage-decisions.ts +55 -0
- package/src/graph/node-decl.ts +18 -0
- package/src/graph/nodes/test-case-contract-nodes.ts +28 -7
- package/src/graph/nodes/test-case-nodes.ts +37 -5
- package/src/graph/nodes/unit-audit-nodes.ts +2 -1
- package/src/graph/nodes/unit-contract-node.ts +20 -2
- package/src/graph/nodes/unit-design-nodes.ts +2 -1
- package/src/graph/test-case-results.ts +25 -4
- package/src/graph/test-case-satisfied.ts +7 -4
- package/src/graph/test-case-state-shape.ts +7 -2
- package/src/graph/unit-artifact-probes.ts +3 -1
- package/src/graph/unit-results-freshness.ts +165 -0
- package/src/harness/audit.ts +4 -13
- package/src/harness/catalog/gate-rules.yaml +3 -3
- 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-verdict.ts +2 -1
- package/src/harness/gates/audit-input-hash.ts +27 -3
- package/src/harness/gates/audit-report-verification.ts +57 -24
- package/src/harness/gates/delivery-checklist.ts +39 -7
- package/src/harness/gates/delivery-decision-gate.ts +29 -1
- package/src/harness/gates/delivery-decision-step.ts +19 -3
- package/src/harness/gates/in-run-decision-check.ts +38 -13
- package/src/harness/gates/migrated-waiver-import-bounds.ts +103 -0
- package/src/harness/gates/migrated-waiver-review.ts +90 -37
- package/src/harness/journey.ts +174 -21
- package/src/harness/next-step.ts +34 -1
- package/src/harness/provenance.ts +99 -11
- 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 +109 -23
- package/src/hooks/guard-protected-paths.ts +13 -3
- package/src/hooks/guard-rules.ts +37 -18
- package/src/hooks/guard-tty-spoof-rule.ts +6 -3
- package/src/hooks/hand-back-core.ts +24 -12
- package/src/hooks/session-start-unit-state-hook.ts +9 -4
- package/src/hooks/stop-next-step-hook.ts +1 -0
- package/src/orchestrator/assets-drift.ts +12 -5
- package/src/orchestrator/project-initializer.ts +1 -0
- package/src/orchestrator/templates/ai-src/commands/create-test.md +6 -3
- package/src/orchestrator/templates/ai-src/commands/delivery.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/review.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/run-test.md +1 -1
- 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
|
@@ -0,0 +1,141 @@
|
|
|
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.migratedWaiverRemedy = void 0;
|
|
37
|
+
exports.migratedWaiverImportBounds = migratedWaiverImportBounds;
|
|
38
|
+
/**
|
|
39
|
+
* Could a migrated waiver's legacy record have been the source of the import that wrote it? (#925)
|
|
40
|
+
*
|
|
41
|
+
* The one-time import (legacy-waiver-migration.ts) reads a record git HEAD ALREADY holds, and only
|
|
42
|
+
* before 3.3 takes over. So a genuine record was committed strictly before each of:
|
|
43
|
+
* 1. the decision file's first appearance — its first commit, else its creation on disk;
|
|
44
|
+
* 2. the unit's import marker `.sungen/migrations/<slug>.waivers-imported.json` — the commit that
|
|
45
|
+
* added the one HEAD holds (an agent can delete or recreate the file, not that commit), else its
|
|
46
|
+
* creation on disk; once it exists the import never reads that unit's legacy file again;
|
|
47
|
+
* 3. the project's adoption of 3.3 — the first commit that added any 3.3-only file: an import marker
|
|
48
|
+
* or other `.sungen/migrations/` file, a decision file (`qa/**\/decisions/*.yaml`) or a contract lock
|
|
49
|
+
* (`qa/**\/contracts.lock.yaml`). Only the 3.3 CLI writes them, and only committed ones count: a
|
|
50
|
+
* legacy waiver is one written before the project's first reviewed 3.3 change. Mixed versions pay
|
|
51
|
+
* for it: a waiver a pre-3.3 CLI writes after that commit must be re-confirmed on a terminal.
|
|
52
|
+
* A record failing any bound claims a migration that never happened: the decision is in-run.
|
|
53
|
+
*
|
|
54
|
+
* What stays open (the limit of any time-based check, as for ordinary decisions): a record forged and
|
|
55
|
+
* committed before the project's first 3.3 commit — indistinguishable from a real legacy waiver, as on
|
|
56
|
+
* a project adopting 3.3 for the very first time — and commit times forged with GIT_COMMITTER_DATE.
|
|
57
|
+
*/
|
|
58
|
+
const fs = __importStar(require("fs"));
|
|
59
|
+
const path = __importStar(require("path"));
|
|
60
|
+
const git_head_trust_1 = require("../../decisions/git-head-trust");
|
|
61
|
+
const human_confirmation_1 = require("../../decisions/human-confirmation");
|
|
62
|
+
const legacy_waiver_migration_1 = require("../../decisions/legacy-waiver-migration");
|
|
63
|
+
/** Files only the 3.3 CLI writes, as pathspecs relative to the project. */
|
|
64
|
+
const ADOPTION_PATHSPECS = ['.sungen/migrations', ':(glob)qa/**/decisions/*.yaml', ':(glob)qa/**/contracts.lock.yaml'];
|
|
65
|
+
/**
|
|
66
|
+
* What a human does about a migrated waiver its legacy record cannot vouch for: record it anew on a
|
|
67
|
+
* terminal (a `cli` decision that supersedes it — the superseded one is no longer judged), or accept it
|
|
68
|
+
* for one delivery.
|
|
69
|
+
*/
|
|
70
|
+
const migratedWaiverRemedy = (scope, ob) => `re-confirm it on a terminal: ${(0, human_confirmation_1.formatCommand)(['sungen', 'journey', '--screen', scope.split('/').pop() ?? scope, '--waive', ob, '--reason', '…'])}, `
|
|
71
|
+
+ 'then commit the new decision; or accept it once with `sungen delivery --accept-in-run`';
|
|
72
|
+
exports.migratedWaiverRemedy = migratedWaiverRemedy;
|
|
73
|
+
const validMs = (iso) => (iso && !Number.isNaN(Date.parse(iso)) ? Date.parse(iso) : null);
|
|
74
|
+
const createdMs = (abs) => {
|
|
75
|
+
try {
|
|
76
|
+
const s = fs.statSync(abs);
|
|
77
|
+
return s.birthtimeMs || s.mtimeMs;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
/** One run's bounds: each decision's first appearance, each unit's marker and the project's adoption, read once. */
|
|
84
|
+
function migratedWaiverImportBounds(projectRoot) {
|
|
85
|
+
const relOf = (abs) => path.relative(projectRoot, abs).split(path.sep).join('/');
|
|
86
|
+
const firstSeen = new Map();
|
|
87
|
+
const markers = new Map();
|
|
88
|
+
let adoption;
|
|
89
|
+
/** When a decision file first appeared: its first commit, else its creation (or last change) on disk. */
|
|
90
|
+
const decisionMs = (e) => {
|
|
91
|
+
if (!firstSeen.has(e.path)) {
|
|
92
|
+
const added = (0, git_head_trust_1.gitOutput)(projectRoot, ['log', '--diff-filter=A', '--format=%cI', '--', relOf(e.path)])?.trim().split('\n').filter(Boolean).pop();
|
|
93
|
+
firstSeen.set(e.path, validMs(added) ?? createdMs(e.path) ?? Number.NEGATIVE_INFINITY);
|
|
94
|
+
}
|
|
95
|
+
return firstSeen.get(e.path);
|
|
96
|
+
};
|
|
97
|
+
const markerMs = (slug) => {
|
|
98
|
+
if (!markers.has(slug)) {
|
|
99
|
+
const abs = (0, legacy_waiver_migration_1.importMarkerPath)(projectRoot, slug);
|
|
100
|
+
const added = (0, git_head_trust_1.committedText)(projectRoot, abs) !== null
|
|
101
|
+
? validMs((0, git_head_trust_1.gitOutput)(projectRoot, ['log', '-1', '--diff-filter=A', '--format=%cI', '--', relOf(abs)])?.trim()) : null;
|
|
102
|
+
markers.set(slug, added ?? createdMs(abs));
|
|
103
|
+
}
|
|
104
|
+
return markers.get(slug);
|
|
105
|
+
};
|
|
106
|
+
const adoptionMs = () => {
|
|
107
|
+
if (adoption === undefined) {
|
|
108
|
+
const added = ((0, git_head_trust_1.gitOutput)(projectRoot, ['log', '--diff-filter=A', '--format=%cI', '--', ...ADOPTION_PATHSPECS]) ?? '')
|
|
109
|
+
.split('\n').map((l) => validMs(l.trim())).filter((t) => t !== null);
|
|
110
|
+
adoption = added.length ? Math.min(...added) : null;
|
|
111
|
+
}
|
|
112
|
+
return adoption;
|
|
113
|
+
};
|
|
114
|
+
/** The first bound a record committed at `legacy` (ms) crosses, or undefined. */
|
|
115
|
+
const boundCrossed = (slug, e, legacy) => {
|
|
116
|
+
const decision = decisionMs(e);
|
|
117
|
+
if (legacy > decision)
|
|
118
|
+
return 'after this decision first appeared';
|
|
119
|
+
if (legacy === decision)
|
|
120
|
+
return 'when this decision first appeared, not before it — an import only reads a record already committed';
|
|
121
|
+
const marker = markerMs(slug);
|
|
122
|
+
if (marker !== null && legacy >= marker) {
|
|
123
|
+
return `after this unit's waivers were imported (${relOf((0, legacy_waiver_migration_1.importMarkerPath)(projectRoot, slug))}, ${new Date(marker).toISOString()}) `
|
|
124
|
+
+ '— from then on the import never reads the legacy file';
|
|
125
|
+
}
|
|
126
|
+
const adopted = adoptionMs();
|
|
127
|
+
if (adopted !== null && legacy >= adopted) {
|
|
128
|
+
return `after this project adopted sungen 3.3 (${new Date(adopted).toISOString()}: the first commit adding a .sungen/migrations/ file, `
|
|
129
|
+
+ 'a decision or a contract lock) — a legacy waiver is one written before that';
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
};
|
|
133
|
+
return {
|
|
134
|
+
/** Why a record committed at `at` (state file of `slug`) cannot have been the source of `e`'s import; undefined when it can. */
|
|
135
|
+
notImported(slug, e, at) {
|
|
136
|
+
const why = boundCrossed(slug, e, Date.parse(at));
|
|
137
|
+
return why && `migrated: its legacy record was committed at ${at}, ${why}; ${(0, exports.migratedWaiverRemedy)(e.scope, String(e.payload?.obligation))}`;
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=migrated-waiver-import-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrated-waiver-import-bounds.js","sourceRoot":"","sources":["../../../src/harness/gates/migrated-waiver-import-bounds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,gEAyDC;AAtGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,uCAAyB;AACzB,2CAA6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AE,CAAC;YACxC,OAAO,4CAA4C,KAAK,CAAC,IAAA,0CAAgB,EAAC,WAAW,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,IAAI;kBAChI,uDAAuD,CAAC;QAC9D,CAAC;QACD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;QAC7B,IAAI,OAAO,KAAK,IAAI,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;YAC1C,OAAO,0CAA0C,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,wDAAwD;kBACpI,6EAA6E,CAAC;QACpF,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACL,gIAAgI;QAChI,WAAW,CAAC,IAAY,EAAE,CAAe,EAAE,EAAU;YACnD,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;YAClD,OAAO,GAAG,IAAI,gDAAgD,EAAE,KAAK,GAAG,KAAK,IAAA,4BAAoB,EAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;QAC9I,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import type { ReadDecision } from '../../decisions/read-decisions';
|
|
2
|
-
/**
|
|
3
|
-
export
|
|
4
|
-
/** When
|
|
5
|
-
|
|
2
|
+
/** A migrated waiver HEAD's legacy file holds: when it was reviewed, or why that cannot be said. */
|
|
3
|
+
export interface MigratedReview {
|
|
4
|
+
/** When its legacy record was committed; null when that commit is out of reach (see `unvouched`). */
|
|
5
|
+
at: string | null;
|
|
6
|
+
/** Set with `at`: why the record cannot have been the import's source — the decision is in-run. */
|
|
7
|
+
notImported?: string;
|
|
8
|
+
/** Set when `at` is null: why the record vouches for nothing — the decision is judged as any other. */
|
|
9
|
+
unvouched?: string;
|
|
10
|
+
}
|
|
11
|
+
/** One run's reads for migrated waivers: each state file's history, decision's first commit and import marker, read once. */
|
|
12
|
+
export declare function migratedWaiverReview(projectRoot: string): {
|
|
13
|
+
/** How a migrated waiver was reviewed; null when it is not one HEAD's legacy file holds (judged as any other). */
|
|
14
|
+
reviewOf(scope: string, e: ReadDecision): MigratedReview | null;
|
|
15
|
+
};
|
|
6
16
|
//# sourceMappingURL=migrated-waiver-review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrated-waiver-review.d.ts","sourceRoot":"","sources":["../../../src/harness/gates/migrated-waiver-review.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrated-waiver-review.d.ts","sourceRoot":"","sources":["../../../src/harness/gates/migrated-waiver-review.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAYnE,oGAAoG;AACpG,MAAM,WAAW,cAAc;IAC7B,qGAAqG;IACrG,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4CD,6HAA6H;AAC7H,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM;IAWpD,kHAAkH;oBAClG,MAAM,KAAK,YAAY,GAAG,cAAc,GAAG,IAAI;EAgBlE"}
|
|
@@ -1,40 +1,6 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.decisionFirstSeenMs = decisionFirstSeenMs;
|
|
3
|
+
exports.migratedWaiverReview = migratedWaiverReview;
|
|
38
4
|
/**
|
|
39
5
|
* When a MIGRATED waiver was reviewed (DOS-13.5, phase 09) — for `decision.in-run`.
|
|
40
6
|
*
|
|
@@ -44,18 +10,28 @@ exports.decisionFirstSeenMs = decisionFirstSeenMs;
|
|
|
44
10
|
*
|
|
45
11
|
* vouched HEAD's state file holds the record (same reason, `at`, auditHashAtWaive) — reviewedAt is
|
|
46
12
|
* the commit time of the oldest commit in the unbroken run, back from HEAD, that holds it
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
13
|
+
* imported the record could have been the import's source (#925) — always checked, run start or not:
|
|
14
|
+
* committed strictly before the decision file, the unit's import marker and the project's
|
|
15
|
+
* adoption of 3.3 first appeared (migrated-waiver-import-bounds.ts). Failing one, the decision
|
|
16
|
+
* claims a migration that never happened → in-run, even at `gate --phase deliver`, which has
|
|
17
|
+
* no run start.
|
|
18
|
+
* with a run start also in-run when reviewedAt is after it (the same test as any committed decision)
|
|
50
19
|
* Anything else — no git, no such record in HEAD, a record that differs — is not vouched for: the
|
|
51
|
-
* decision is judged as any other (`not in git HEAD`, or its own commit time).
|
|
20
|
+
* decision is judged as any other (`not in git HEAD`, or its own commit time). Only a rewritten history
|
|
21
|
+
* (a squash or rebase that folds the record's commit into the import's) can fail a genuine import; the
|
|
22
|
+
* finding says which bound it crossed.
|
|
23
|
+
*
|
|
24
|
+
* Nor is a record whose introducing commit is out of reach — judged as any other, with `unvouched`
|
|
25
|
+
* saying why, never vouched for by a later commit taken for its introduction: the walk reads at most
|
|
26
|
+
* MAX_COMMITS commits of a state file and the record is held by the commit before them too (#924), or
|
|
27
|
+
* the record reaches a shallow clone's boundary commit. One review reads each state file's history
|
|
28
|
+
* once (one `git log`, one `git cat-file --batch`), however many waivers share it.
|
|
52
29
|
*/
|
|
53
|
-
const fs = __importStar(require("fs"));
|
|
54
|
-
const path = __importStar(require("path"));
|
|
55
30
|
const git_head_trust_1 = require("../../decisions/git-head-trust");
|
|
56
31
|
const waiver_decisions_1 = require("../../decisions/waiver-decisions");
|
|
57
32
|
const unit_paths_1 = require("../unit-paths");
|
|
58
|
-
|
|
33
|
+
const migrated_waiver_import_bounds_1 = require("./migrated-waiver-import-bounds");
|
|
34
|
+
/** Commits of one state file the walk reads at most. */
|
|
59
35
|
const MAX_COMMITS = 200;
|
|
60
36
|
const parse = (text) => {
|
|
61
37
|
if (text === null)
|
|
@@ -71,46 +47,68 @@ function holds(state, e, ob) {
|
|
|
71
47
|
const w = state?.waivers?.[ob];
|
|
72
48
|
return (0, waiver_decisions_1.isLegacyWaiver)(w) && w.at === e.valid_from && (0, waiver_decisions_1.sameWaiver)(w, (0, waiver_decisions_1.asLegacyWaiver)(e));
|
|
73
49
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
return oldest && !Number.isNaN(Date.parse(oldest)) ? oldest : null;
|
|
85
|
-
}
|
|
86
|
-
/** When a migrated waiver's legacy record was committed, or null when nothing in git HEAD vouches for it. */
|
|
87
|
-
function migratedWaiverReviewedAt(projectRoot, scope, e) {
|
|
88
|
-
const ob = e.payload?.obligation;
|
|
89
|
-
if (e.kind !== 'waiver' || e.source?.where !== 'migrated' || typeof ob !== 'string')
|
|
90
|
-
return null;
|
|
91
|
-
// The journey keys its state by the unit name it was given: `<name>`, or the catalog id for api units.
|
|
92
|
-
const slugs = new Set([scope.split('/').pop() ?? '', (0, unit_paths_1.reportSlug)(scope.replace(/^(screens|flows)\//, ''))]);
|
|
93
|
-
for (const slug of slugs) {
|
|
94
|
-
const file = path.join(projectRoot, '.sungen', 'journey', `${slug}.state.json`);
|
|
95
|
-
if (!holds(parse((0, git_head_trust_1.committedText)(projectRoot, file)), e, ob))
|
|
96
|
-
continue;
|
|
97
|
-
const at = introducedAt(projectRoot, path.relative(projectRoot, file).split(path.sep).join('/'), e, ob);
|
|
98
|
-
if (at)
|
|
99
|
-
return at;
|
|
100
|
-
}
|
|
101
|
-
return null;
|
|
50
|
+
function readHistory(projectRoot, rel) {
|
|
51
|
+
const log = ((0, git_head_trust_1.gitOutput)(projectRoot, ['log', `--max-count=${MAX_COMMITS + 1}`, '--format=%H %cI %P', '--', rel]) ?? '')
|
|
52
|
+
.split('\n').filter(Boolean).map((line) => line.trim().split(' '));
|
|
53
|
+
const texts = (0, git_head_trust_1.gitFileTexts)(projectRoot, [`HEAD:./${rel}`, ...log.map(([sha]) => `${sha}:./${rel}`)]);
|
|
54
|
+
return {
|
|
55
|
+
rel,
|
|
56
|
+
head: parse(texts?.[0] ?? null),
|
|
57
|
+
commits: log.map(([, at, ...parents], i) => ({ at, state: parse(texts?.[i + 1] ?? null), root: parents.length === 0 })),
|
|
58
|
+
};
|
|
102
59
|
}
|
|
103
|
-
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
60
|
+
/**
|
|
61
|
+
* The commit time of the oldest commit, in the unbroken run back from HEAD, whose state file holds the
|
|
62
|
+
* record. The walk reads MAX_COMMITS commits; the next one only says whether the last of them introduced it.
|
|
63
|
+
* In a shallow clone a commit with no parent shown is the boundary: every file seems to appear there, so a
|
|
64
|
+
* record reaching it has no known commit time.
|
|
65
|
+
*/
|
|
66
|
+
function introducedAt(h, e, ob, scope, shallow) {
|
|
67
|
+
let run = 0;
|
|
68
|
+
while (run < h.commits.length && holds(h.commits[run].state, e, ob))
|
|
69
|
+
run++;
|
|
70
|
+
const unvouched = (why) => ({ at: null, unvouched: `migrated, but its legacy record cannot vouch for it: ${why}` });
|
|
71
|
+
if (run > MAX_COMMITS) {
|
|
72
|
+
return unvouched(`${h.rel} changed in more than ${MAX_COMMITS} commits, and the commit that introduced the record is older than all of them`);
|
|
111
73
|
}
|
|
112
|
-
|
|
113
|
-
|
|
74
|
+
const oldest = run ? h.commits[run - 1] : null;
|
|
75
|
+
if (oldest?.root && shallow()) {
|
|
76
|
+
return unvouched(`the git history is shallow, so the record's real commit time is unknown — fetch the full history `
|
|
77
|
+
+ `(\`git fetch --unshallow\`; \`fetch-depth: 0\` in CI), or ${(0, migrated_waiver_import_bounds_1.migratedWaiverRemedy)(scope, ob)}`);
|
|
114
78
|
}
|
|
79
|
+
return oldest && !Number.isNaN(Date.parse(oldest.at)) ? { at: oldest.at } : null;
|
|
80
|
+
}
|
|
81
|
+
/** One run's reads for migrated waivers: each state file's history, decision's first commit and import marker, read once. */
|
|
82
|
+
function migratedWaiverReview(projectRoot) {
|
|
83
|
+
const histories = new Map();
|
|
84
|
+
const bounds = (0, migrated_waiver_import_bounds_1.migratedWaiverImportBounds)(projectRoot);
|
|
85
|
+
let isShallow;
|
|
86
|
+
const shallow = () => (isShallow ?? (isShallow = (0, git_head_trust_1.isShallowRepository)(projectRoot)));
|
|
87
|
+
const historyOf = (rel) => {
|
|
88
|
+
if (!histories.has(rel))
|
|
89
|
+
histories.set(rel, readHistory(projectRoot, rel));
|
|
90
|
+
return histories.get(rel);
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
/** How a migrated waiver was reviewed; null when it is not one HEAD's legacy file holds (judged as any other). */
|
|
94
|
+
reviewOf(scope, e) {
|
|
95
|
+
const ob = e.payload?.obligation;
|
|
96
|
+
if (e.kind !== 'waiver' || e.source?.where !== 'migrated' || typeof ob !== 'string')
|
|
97
|
+
return null;
|
|
98
|
+
// The journey keys its state by the unit name it was given: `<name>`, or the catalog id for api units.
|
|
99
|
+
const slugs = new Set([scope.split('/').pop() ?? '', (0, unit_paths_1.reportSlug)(scope.replace(/^(screens|flows)\//, ''))]);
|
|
100
|
+
let unvouched = null;
|
|
101
|
+
for (const slug of slugs) {
|
|
102
|
+
const h = historyOf(`.sungen/journey/${slug}.state.json`);
|
|
103
|
+
if (!holds(h.head, e, ob))
|
|
104
|
+
continue;
|
|
105
|
+
const review = introducedAt(h, e, ob, scope, shallow);
|
|
106
|
+
if (review?.at)
|
|
107
|
+
return { at: review.at, notImported: bounds.notImported(slug, e, review.at) };
|
|
108
|
+
unvouched = unvouched ?? review;
|
|
109
|
+
}
|
|
110
|
+
return unvouched;
|
|
111
|
+
},
|
|
112
|
+
};
|
|
115
113
|
}
|
|
116
114
|
//# sourceMappingURL=migrated-waiver-review.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrated-waiver-review.js","sourceRoot":"","sources":["../../../src/harness/gates/migrated-waiver-review.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrated-waiver-review.js","sourceRoot":"","sources":["../../../src/harness/gates/migrated-waiver-review.ts"],"names":[],"mappings":";;AA4FA,oDA4BC;AAxHD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,mEAA8F;AAE9F,uEAA8F;AAC9F,8CAA2C;AAC3C,mFAAmG;AAEnG,wDAAwD;AACxD,MAAM,WAAW,GAAG,GAAG,CAAC;AAgBxB,MAAM,KAAK,GAAG,CAAC,IAAmB,EAAS,EAAE;IAC3C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,IAAI,CAAC;QAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,SAAS,KAAK,CAAC,KAAY,EAAE,CAAe,EAAE,EAAU;IACtD,MAAM,CAAC,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/B,OAAO,IAAA,iCAAc,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,UAAU,IAAI,IAAA,6BAAU,EAAC,CAAC,EAAE,IAAA,iCAAc,EAAC,CAAC,CAAC,CAAC,CAAC;AACxF,CAAC;AAED,SAAS,WAAW,CAAC,WAAmB,EAAE,GAAW;IACnD,MAAM,GAAG,GAAG,CAAC,IAAA,0BAAS,EAAC,WAAW,EAAE,CAAC,KAAK,EAAE,eAAe,WAAW,GAAG,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;SACnH,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO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AAQ,CAAC,KAAa,EAAE,CAAe;YACrC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC;YACjC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,KAAK,UAAU,IAAI,OAAO,EAAE,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAC;YACjG,uGAAuG;YACvG,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,IAAA,uBAAU,EAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3G,IAAI,SAAS,GAA0B,IAAI,CAAC;YAC5C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,CAAC,GAAG,SAAS,CAAC,mBAAmB,IAAI,aAAa,CAAC,CAAC;gBAC1D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;oBAAE,SAAS;gBACpC,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;gBACtD,IAAI,MAAM,EAAE,EAAE;oBAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;gBAC9F,SAAS,GAAG,SAAS,IAAI,MAAM,CAAC;YAClC,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -45,6 +45,39 @@ export interface JourneyReport {
|
|
|
45
45
|
* A read-only checkout gets the same board without throwing.
|
|
46
46
|
*/
|
|
47
47
|
export declare function runJourney(projectRoot: string, unit: string): JourneyReport;
|
|
48
|
+
/** A waiver the board asks a human to give again: its evidence moved (stale), or git HEAD does not hold it (untrusted). */
|
|
49
|
+
export interface WaiverToRedecide {
|
|
50
|
+
obligation: string;
|
|
51
|
+
title: string;
|
|
52
|
+
reason: string;
|
|
53
|
+
why: 'stale' | 'untrusted';
|
|
54
|
+
}
|
|
55
|
+
/** What the board asks of a human, read without writing anything (`sungen next`'s "Waiting for you", #954). */
|
|
56
|
+
export interface JourneyHumanAsks {
|
|
57
|
+
report: JourneyReport;
|
|
58
|
+
redecide: WaiverToRedecide[];
|
|
59
|
+
/** OB-signoff: `pending` (never given), `stale` (given before the audit changed), `given`. */
|
|
60
|
+
signoff: {
|
|
61
|
+
status: 'pending' | 'stale' | 'given';
|
|
62
|
+
at?: string;
|
|
63
|
+
};
|
|
64
|
+
/** `sungen journey --signoff` would be accepted now (assertCanSignOff holds). */
|
|
65
|
+
canSignOff: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** The board's asks, read-only: no import, no dual-write, no state file — the same reconcile `runJourney` commits. */
|
|
68
|
+
export declare function readJourneyHumanAsks(projectRoot: string, unit: string): JourneyHumanAsks;
|
|
69
|
+
/** The single human gate (DOS §3.4, S5): given with `--signoff`, never waived (#936). */
|
|
70
|
+
export declare const SIGNOFF_OBLIGATION = "OB-signoff";
|
|
71
|
+
export declare const signoffCommand: (unit: string) => string;
|
|
72
|
+
/** "Never audited" (T3): a unit is measured by `sungen audit`, never waived through (review W2). */
|
|
73
|
+
export declare const CREATE_OBLIGATION = "OB-create";
|
|
74
|
+
/**
|
|
75
|
+
* Throws unless `obId` is an obligation of the board that a waiver can accept. Refused in every state,
|
|
76
|
+
* each with what does it instead: OB-signoff (before any audit it is not on the board, after one a
|
|
77
|
+
* waiver would let the human gate be waived away) and OB-create (an unaudited unit would pass every
|
|
78
|
+
* gate on a waiver; the audit measures it).
|
|
79
|
+
*/
|
|
80
|
+
export declare function assertWaivable(report: JourneyReport, unit: string, obId: string): void;
|
|
48
81
|
/**
|
|
49
82
|
* Waive an obligation — REQUIRES a reason (anti-amnesia: a waiver leaves a recorded "why").
|
|
50
83
|
* Records the current evidence cursor so reconcile can invalidate it if the audit changes.
|
|
@@ -55,6 +88,13 @@ export declare function waive(projectRoot: string, unit: string, obId: string, r
|
|
|
55
88
|
* obligation is satisfied or waived (you cannot sign off an unclean suite). Records who/when +
|
|
56
89
|
* the evidence cursor; reconcile invalidates it (stale → re-review) if the suite later changes.
|
|
57
90
|
*/
|
|
91
|
+
/** Throws unless the board may be signed off: no decision problem, every other obligation accepted. */
|
|
92
|
+
export declare function assertCanSignOff(before: JourneyReport): void;
|
|
93
|
+
/** Who signs off: `--by`, else the git user; throws when neither names anyone (never `by: unknown`). */
|
|
94
|
+
export declare function signoffSigner(projectRoot: string, unit: string, by?: string): {
|
|
95
|
+
signer: string;
|
|
96
|
+
gitUser: string;
|
|
97
|
+
};
|
|
58
98
|
export declare function signoff(projectRoot: string, unit: string, by?: string): JourneyReport;
|
|
59
99
|
/**
|
|
60
100
|
* Write a DERIVED journey file (board, report, roll-up). Best-effort by contract (DOS-13.3): a read-only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/harness/journey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/harness/journey.ts"],"names":[],"mappings":"AAwBA,OAAO,EAA4C,mBAAmB,EAAkG,MAAM,6BAA6B,CAAC;AAI5M,qHAAqH;AACrH,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAExF,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IAC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