@zxyycom/vibe-check 0.0.2 → 0.0.3
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/README.md +36 -5
- package/dist/esm/check/check.mjs +4 -0
- package/dist/esm/check/check.mjs.map +1 -1
- package/dist/esm/check/flag-enablement.mjs +32 -0
- package/dist/esm/check/flag-enablement.mjs.map +1 -0
- package/dist/esm/check/handoff-provider-identity.mjs +18 -0
- package/dist/esm/check/handoff-provider-identity.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +1 -1
- package/dist/esm/check/inherited-collection.mjs.map +1 -1
- package/dist/esm/check/project-changes.mjs +2 -0
- package/dist/esm/check/project-changes.mjs.map +1 -0
- package/dist/esm/check/project-context.mjs +2 -0
- package/dist/esm/check/project-context.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -1
- package/dist/esm/check-settlement/record-store.mjs +1 -1
- package/dist/esm/check-settlement/record-store.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-data.mjs +36 -7
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -1
- package/dist/esm/data-boundary/closed-values.mjs +28 -4
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
- package/dist/esm/{package-checks/project-files → data-boundary}/config-glob.mjs +3 -3
- package/dist/esm/data-boundary/config-glob.mjs.map +1 -0
- package/dist/esm/data-boundary/project-path.mjs +19 -0
- package/dist/esm/data-boundary/project-path.mjs.map +1 -0
- package/dist/esm/index.mjs +12 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs +4 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
- package/dist/esm/package-checks/check-authoring.mjs +69 -0
- package/dist/esm/package-checks/check-authoring.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -1
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -1
- package/dist/esm/package-checks/command-check/command-check.mjs +55 -0
- package/dist/esm/package-checks/command-check/command-check.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/contract.mjs +2 -0
- package/dist/esm/package-checks/command-check/contract.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/execution.mjs +134 -0
- package/dist/esm/package-checks/command-check/execution.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/options.mjs +284 -0
- package/dist/esm/package-checks/command-check/options.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/transcript.mjs +26 -0
- package/dist/esm/package-checks/command-check/transcript.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +2 -4
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs +38 -0
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs +35 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +102 -29
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analysis.mjs +7 -2
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +1 -3
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +3 -2
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +12 -7
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +5 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +12 -5
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +20 -8
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/git.mjs +11 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/path.mjs +1 -17
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/result.mjs +43 -17
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/runner.mjs +7 -5
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +6 -2
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +11 -3
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/local-cache-options.mjs +28 -0
- package/dist/esm/package-checks/local-cache-options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +37 -45
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +3 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +19 -33
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +1 -3
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +3 -18
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +2 -14
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +4 -5
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-lint/adapter.mjs +125 -0
- package/dist/esm/package-checks/markdown-lint/adapter.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs +37 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs +202 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs +16 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs +72 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs +110 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs +74 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs +13 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs +65 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs +14 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +23 -19
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +2 -5
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +22 -6
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-paths.mjs +3 -3
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +11 -15
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/execution.mjs +2 -2
- package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs +46 -7
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +3 -4
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -1
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs +10 -0
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs.map +1 -0
- package/dist/esm/{cache → package-tools/cache}/cache-json-by-key.mjs +13 -14
- package/dist/esm/package-tools/cache/cache-json-by-key.mjs.map +1 -0
- package/dist/esm/package-tools/finding-presentation/finding-presentation.mjs.map +1 -0
- package/dist/esm/{finding-waivers → package-tools/finding-waivers}/reconciliation.mjs +14 -5
- package/dist/esm/package-tools/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/critical-path-ranking.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.mjs +2 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/prediction.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.mjs +4 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/preparation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/recording.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.mjs +8 -8
- package/dist/esm/package-tools/learned-critical-path/duration-model/storage.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.mjs +1 -2
- package/dist/esm/package-tools/learned-critical-path/selection-layers.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/static-decision.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/strategy.mjs +3 -3
- package/dist/esm/package-tools/learned-critical-path/strategy.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +8 -5
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +79 -66
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs +71 -0
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +13 -8
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/resolution.mjs +7 -6
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs +2 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -1
- package/dist/esm/project-definition/project-changes.mjs +70 -0
- package/dist/esm/project-definition/project-changes.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +40 -8
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
- package/dist/esm/project-definition/project-definition.mjs +22 -15
- package/dist/esm/project-definition/project-definition.mjs.map +1 -1
- package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +9 -6
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -1
- package/dist/esm/project-run/aggregation.mjs +42 -59
- package/dist/esm/project-run/aggregation.mjs.map +1 -1
- package/dist/esm/project-run/changes/git.mjs +161 -0
- package/dist/esm/project-run/changes/git.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs +41 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +3 -2
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/dependencies.mjs +80 -5
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +5 -3
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +37 -16
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/flag-controls.mjs +15 -7
- package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/{preflight-result.mjs → preparation-result.mjs} +24 -24
- package/dist/esm/project-run/check-execution/preparation-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/{preflight.mjs → preparation.mjs} +52 -52
- package/dist/esm/project-run/check-execution/preparation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs +71 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +27 -164
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs +79 -0
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +70 -25
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -1
- package/dist/esm/project-run/completion/completion.mjs +18 -1
- package/dist/esm/project-run/completion/completion.mjs.map +1 -1
- package/dist/esm/project-run/controls/contract.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation.mjs +7 -54
- package/dist/esm/project-run/controls/validation.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +3 -3
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidate.mjs +17 -13
- package/dist/esm/project-run/invocation/candidate.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidates.mjs +26 -0
- package/dist/esm/project-run/invocation/candidates.mjs.map +1 -0
- package/dist/esm/project-run/invocation/creation.mjs +7 -3
- package/dist/esm/project-run/invocation/creation.mjs.map +1 -1
- package/dist/esm/project-run/invocation/execution.mjs +98 -0
- package/dist/esm/project-run/invocation/execution.mjs.map +1 -0
- package/dist/esm/project-run/invocation/run.mjs +13 -112
- package/dist/esm/project-run/invocation/run.mjs.map +1 -1
- package/dist/esm/project-run/invocation/scheduler.mjs +13 -6
- package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -1
- package/dist/esm/project-run/outputs/status.mjs +12 -12
- package/dist/esm/project-run/outputs/status.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/presentation.mjs +31 -11
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +11 -4
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +20 -6
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer.mjs +6 -2
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
- package/dist/esm/project-run/project-context.mjs +2 -1
- package/dist/esm/project-run/project-context.mjs.map +1 -1
- package/dist/esm/project-run/result.mjs +2 -2
- package/dist/esm/project-run/result.mjs.map +1 -1
- package/dist/esm/project-run/run.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +9 -4
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +3 -5
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +25 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +8 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +8 -4
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +12 -6
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +3 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +17 -17
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +18 -6
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
- package/docs/api-mechanics.md +147 -28
- package/docs/changelog.md +145 -2
- package/docs/checks/duplicate-detection.md +22 -3
- package/docs/checks/file-metrics.md +25 -6
- package/docs/checks/function-metrics.md +21 -2
- package/docs/checks/json-schema-validation.md +25 -4
- package/docs/checks/json-validation.md +24 -5
- package/docs/checks/maintenance-reminders.md +30 -6
- package/docs/checks/markdown-link-validation.md +24 -4
- package/docs/checks/markdown-lint.md +167 -0
- package/docs/checks/secret-detection.md +31 -7
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +10 -10
- package/docs/guides/building-project-gate.md +706 -0
- package/docs/guides/callbacks.md +81 -22
- package/docs/guides/check-dependencies.md +41 -10
- package/docs/guides/collecting-project-files.md +7 -7
- package/docs/guides/command-check.md +155 -0
- package/docs/guides/data-boundaries.md +140 -0
- package/docs/guides/extending-check-lifecycle.md +77 -25
- package/docs/guides/finding-waivers.md +43 -1
- package/docs/guides/learned-scheduling.md +1 -1
- package/docs/guides/run-outputs.md +35 -9
- package/docs/guides/scheduling.md +15 -15
- package/docs/output.md +6 -5
- package/package.json +2 -1
- package/src/check/check.ts +332 -92
- package/src/check/flag-enablement.ts +76 -0
- package/src/check/handoff-provider-identity.ts +34 -0
- package/src/check/inherited-collection.ts +1 -1
- package/src/check/project-changes.ts +14 -0
- package/src/check/project-context.ts +11 -0
- package/src/check-settlement/facts.ts +1 -1
- package/src/check-settlement/record-store.ts +1 -1
- package/src/data-boundary/canonical-data.ts +36 -9
- package/src/data-boundary/canonical-json.ts +18 -1
- package/src/data-boundary/closed-values.ts +26 -6
- package/src/data-boundary/config-glob.ts +17 -0
- package/src/data-boundary/project-path.ts +21 -0
- package/src/index.ts +72 -11
- package/src/machine-output/v4/atomic-publication.ts +3 -1
- package/src/package-checks/check-authoring.ts +136 -0
- package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +1 -1
- package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +1 -1
- package/src/package-checks/command-check/command-check.ts +152 -0
- package/src/package-checks/command-check/contract.ts +168 -0
- package/src/package-checks/command-check/execution.ts +211 -0
- package/src/package-checks/command-check/options.ts +331 -0
- package/src/package-checks/command-check/transcript.ts +35 -0
- package/src/package-checks/duplicate-detection/default-check.ts +37 -6
- package/src/package-checks/duplicate-detection/execution.ts +2 -4
- package/src/package-checks/duplicate-detection/finding-messages.ts +2 -2
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
- package/src/package-checks/duplicate-detection/options.ts +6 -3
- package/src/package-checks/duplicate-detection/records.ts +1 -1
- package/src/package-checks/file-metrics/constructor.ts +29 -6
- package/src/package-checks/file-metrics/execution.ts +2 -4
- package/src/package-checks/file-metrics/finding-messages.ts +1 -1
- package/src/package-checks/file-metrics/options.ts +6 -3
- package/src/package-checks/file-metrics/records.ts +1 -1
- package/src/package-checks/file-metrics/scc/availability.ts +1 -1
- package/src/package-checks/file-metrics/scc/batch-planner.ts +56 -0
- package/src/package-checks/file-metrics/scc/logical-scan-resources.ts +59 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +134 -32
- package/src/package-checks/function-metrics/analysis.ts +7 -2
- package/src/package-checks/function-metrics/analyzer/analysis-model.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/extension-output.ts +14 -6
- package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +1 -3
- package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +3 -3
- package/src/package-checks/function-metrics/analyzer/pipeline.ts +4 -2
- package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +6 -6
- package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/readers/objc.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +14 -7
- package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +8 -4
- package/src/package-checks/function-metrics/analyzer/readers/python.ts +4 -3
- package/src/package-checks/function-metrics/analyzer/readers/r.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/zig.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +3 -1
- package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +10 -5
- package/src/package-checks/function-metrics/analyzer-worker-port.ts +20 -6
- package/src/package-checks/function-metrics/constructor.ts +30 -7
- package/src/package-checks/function-metrics/execution.ts +2 -4
- package/src/package-checks/function-metrics/finding-messages.ts +2 -2
- package/src/package-checks/function-metrics/measurement.ts +3 -1
- package/src/package-checks/function-metrics/options.ts +6 -3
- package/src/package-checks/function-metrics/records.ts +1 -1
- package/src/package-checks/host-environment/git.ts +11 -0
- package/src/package-checks/host-environment/path.ts +1 -20
- package/src/package-checks/host-environment/process/contract.ts +17 -9
- package/src/package-checks/host-environment/process/result.ts +48 -20
- package/src/package-checks/host-environment/process/runner.ts +8 -4
- package/src/package-checks/json-schema-validation/default-check.ts +38 -5
- package/src/package-checks/json-schema-validation/options.ts +4 -1
- package/src/package-checks/json-schema-validation/reference-resolver.ts +6 -2
- package/src/package-checks/json-schema-validation/schema-policy.ts +10 -5
- package/src/package-checks/json-validation/default-check.ts +27 -6
- package/src/package-checks/json-validation/options.ts +4 -1
- package/src/package-checks/local-cache-options.ts +40 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +89 -9
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +3 -3
- package/src/package-checks/markdown-link-validation/default-check.ts +48 -5
- package/src/package-checks/markdown-link-validation/execution.ts +1 -1
- package/src/package-checks/markdown-link-validation/finding-messages.ts +1 -1
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +1 -5
- package/src/package-checks/markdown-link-validation/options-resolution.ts +2 -19
- package/src/package-checks/markdown-link-validation/options-validation.ts +2 -17
- package/src/package-checks/markdown-link-validation/options.ts +6 -7
- package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +4 -5
- package/src/package-checks/markdown-lint/adapter.ts +167 -0
- package/src/package-checks/markdown-lint/default-check.ts +92 -0
- package/src/package-checks/markdown-lint/execution.ts +266 -0
- package/src/package-checks/markdown-lint/final-data.ts +33 -0
- package/src/package-checks/markdown-lint/finding-messages.ts +87 -0
- package/src/package-checks/markdown-lint/finding-waiver-identity.ts +54 -0
- package/src/package-checks/markdown-lint/findings-cache.ts +141 -0
- package/src/package-checks/markdown-lint/options-resolution.ts +102 -0
- package/src/package-checks/markdown-lint/options-validation.ts +50 -0
- package/src/package-checks/markdown-lint/options.ts +82 -0
- package/src/package-checks/markdown-lint/records.ts +132 -0
- package/src/package-checks/markdown-lint/unavailable-reasons.ts +33 -0
- package/src/package-checks/project-files/collection.ts +38 -22
- package/src/package-checks/project-files/config-glob.ts +1 -17
- package/src/package-checks/project-files/configuration.ts +1 -1
- package/src/package-checks/project-files/gitlink-revision.ts +4 -6
- package/src/package-checks/project-files/gitlink-worktree.ts +35 -7
- package/src/package-checks/project-files/public-collection.ts +1 -1
- package/src/package-checks/project-files/revision-paths.ts +3 -3
- package/src/package-checks/project-files/revision-worktree-files.ts +16 -16
- package/src/package-checks/secret-detection/default-check.ts +29 -6
- package/src/package-checks/secret-detection/execution.ts +2 -2
- package/src/package-checks/secret-detection/input-preparation.ts +64 -7
- package/src/package-checks/secret-detection/options.ts +5 -2
- package/src/package-checks/secret-detection/records.ts +1 -1
- package/src/package-checks/secret-detection/secretlint/adapter.ts +3 -4
- package/src/package-tools/admission-policy/define-admission-policy.ts +54 -0
- package/src/{cache → package-tools/cache}/cache-json-by-key.ts +13 -17
- package/src/{check → package-tools/finding-presentation}/finding-presentation.ts +3 -1
- package/src/{finding-waivers → package-tools/finding-waivers}/reconciliation.ts +16 -8
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.ts +5 -2
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.ts +5 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.ts +5 -4
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts +9 -10
- package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts +2 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts +1 -1
- package/src/{learned-critical-path → package-tools/learned-critical-path}/strategy.ts +7 -4
- package/src/project-definition/check-tree/authoring.ts +15 -8
- package/src/project-definition/check-tree/check-fields-authoring.ts +106 -91
- package/src/project-definition/check-tree/flag-conditions.ts +99 -0
- package/src/project-definition/check-tree/materialization.ts +12 -8
- package/src/project-definition/check-tree/resolution.ts +13 -15
- package/src/project-definition/declarative-snapshot.ts +9 -2
- package/src/project-definition/project-changes.ts +112 -0
- package/src/project-definition/project-definition-validation.ts +58 -10
- package/src/project-definition/project-definition.ts +41 -68
- package/src/project-definition/scheduler-policy.ts +6 -3
- package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +11 -8
- package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +2 -2
- package/src/project-run/aggregation.ts +51 -74
- package/src/project-run/changes/git.ts +206 -0
- package/src/project-run/check-execution/admitted-check-execution.ts +62 -0
- package/src/project-run/check-execution/callback.ts +3 -2
- package/src/project-run/check-execution/dependencies.ts +120 -6
- package/src/project-run/check-execution/execution-finalization.ts +6 -4
- package/src/project-run/check-execution/execution-settlement.ts +88 -29
- package/src/project-run/check-execution/flag-controls.ts +22 -8
- package/src/project-run/check-execution/lifecycle.ts +14 -6
- package/src/project-run/check-execution/{preflight-result.ts → preparation-result.ts} +34 -32
- package/src/project-run/check-execution/{preflight.ts → preparation.ts} +92 -84
- package/src/project-run/check-execution/ready-check-execution.ts +97 -0
- package/src/project-run/check-execution/resolved-checks.ts +40 -219
- package/src/project-run/check-execution/scheduled-check-run.ts +119 -0
- package/src/project-run/check-execution/terminal-result.ts +108 -29
- package/src/project-run/completion/completion.ts +17 -3
- package/src/project-run/controls/contract.ts +6 -16
- package/src/project-run/controls/validation.ts +7 -60
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +1 -2
- package/src/project-run/diagnostic-logging/observation-rendering.ts +1 -1
- package/src/project-run/invocation/candidate.ts +28 -15
- package/src/project-run/invocation/candidates.ts +56 -0
- package/src/project-run/invocation/creation.ts +7 -3
- package/src/project-run/invocation/execution.ts +136 -0
- package/src/project-run/invocation/run.ts +15 -179
- package/src/project-run/invocation/scheduler.ts +13 -6
- package/src/project-run/outputs/status.ts +15 -15
- package/src/project-run/progress-rendering/presentation.ts +35 -13
- package/src/project-run/progress-rendering/renderer-formatting.ts +20 -7
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +23 -6
- package/src/project-run/progress-rendering/renderer.ts +10 -4
- package/src/project-run/project-context.ts +8 -4
- package/src/project-run/result.ts +5 -5
- package/src/project-run/run.ts +1 -1
- package/src/project-run/task-scheduler/admission-core/compiled-graph-lookup.ts +71 -0
- package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +9 -4
- package/src/project-run/task-scheduler/admission-core/selection-query.ts +6 -4
- package/src/project-run/task-scheduler/admission-core/selection-seed.ts +36 -6
- package/src/project-run/task-scheduler/admission-core/selection-transition.ts +17 -8
- package/src/project-run/task-scheduler/execution-state.ts +4 -4
- package/src/project-run/task-scheduler/measurement/diagnostics.ts +10 -4
- package/src/project-run/task-scheduler/measurement/timing.ts +13 -5
- package/src/project-run/task-scheduler/scheduler-observation.ts +3 -1
- package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +24 -22
- package/src/project-run/task-scheduler/scheduler.ts +23 -6
- package/types/check/check.d.ts +178 -67
- package/types/check/flag-enablement.d.ts +42 -0
- package/types/check/handoff-provider-identity.d.ts +12 -0
- package/types/check/project-changes.d.ts +13 -0
- package/types/check/project-context.d.ts +10 -0
- package/types/check-settlement/facts.d.ts +1 -1
- package/types/data-boundary/canonical-data.d.ts +28 -5
- package/types/data-boundary/canonical-json.d.ts +18 -1
- package/types/data-boundary/closed-values.d.ts +17 -1
- package/types/data-boundary/config-glob.d.ts +5 -0
- package/types/data-boundary/project-path.d.ts +4 -0
- package/types/index.d.ts +27 -11
- package/types/package-checks/check-authoring.d.ts +45 -0
- package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +1 -1
- package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +1 -1
- package/types/package-checks/command-check/command-check.d.ts +48 -0
- package/types/package-checks/command-check/contract.d.ts +108 -0
- package/types/package-checks/command-check/execution.d.ts +7 -0
- package/types/package-checks/command-check/options.d.ts +11 -0
- package/types/package-checks/command-check/transcript.d.ts +8 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +5 -2
- package/types/package-checks/duplicate-detection/finding-messages.d.ts +1 -1
- package/types/package-checks/duplicate-detection/options.d.ts +4 -3
- package/types/package-checks/duplicate-detection/records.d.ts +1 -1
- package/types/package-checks/file-metrics/constructor.d.ts +5 -2
- package/types/package-checks/file-metrics/options.d.ts +4 -3
- package/types/package-checks/file-metrics/records.d.ts +1 -1
- package/types/package-checks/file-metrics/scc/batch-planner.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/logical-scan-resources.d.ts +14 -0
- package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +3 -3
- package/types/package-checks/function-metrics/constructor.d.ts +5 -2
- package/types/package-checks/function-metrics/finding-messages.d.ts +1 -1
- package/types/package-checks/function-metrics/options.d.ts +4 -3
- package/types/package-checks/function-metrics/records.d.ts +1 -1
- package/types/package-checks/host-environment/git.d.ts +2 -0
- package/types/package-checks/host-environment/path.d.ts +1 -3
- package/types/package-checks/host-environment/process/contract.d.ts +17 -9
- package/types/package-checks/json-schema-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-schema-validation/options.d.ts +2 -1
- package/types/package-checks/json-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-validation/options.d.ts +2 -1
- package/types/package-checks/local-cache-options.d.ts +9 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +11 -2
- package/types/package-checks/markdown-link-validation/default-check.d.ts +4 -1
- package/types/package-checks/markdown-link-validation/options.d.ts +4 -7
- package/types/package-checks/markdown-lint/adapter.d.ts +10 -0
- package/types/package-checks/markdown-lint/default-check.d.ts +37 -0
- package/types/package-checks/markdown-lint/execution.d.ts +24 -0
- package/types/package-checks/markdown-lint/final-data.d.ts +8 -0
- package/types/package-checks/markdown-lint/finding-messages.d.ts +6 -0
- package/types/package-checks/markdown-lint/finding-waiver-identity.d.ts +3 -0
- package/types/package-checks/markdown-lint/findings-cache.d.ts +17 -0
- package/types/package-checks/markdown-lint/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-lint/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-lint/options.d.ts +65 -0
- package/types/package-checks/markdown-lint/records.d.ts +39 -0
- package/types/package-checks/markdown-lint/unavailable-reasons.d.ts +3 -0
- package/types/package-checks/secret-detection/default-check.d.ts +4 -1
- package/types/package-checks/secret-detection/options.d.ts +3 -2
- package/types/package-tools/admission-policy/define-admission-policy.d.ts +26 -0
- package/types/{check → package-tools/finding-presentation}/finding-presentation.d.ts +3 -1
- package/types/{finding-waivers → package-tools/finding-waivers}/reconciliation.d.ts +3 -3
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.d.ts +2 -2
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/static-decision.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/strategy.d.ts +1 -1
- package/types/project-definition/check-tree/authoring.d.ts +5 -3
- package/types/project-definition/check-tree/check-fields-authoring.d.ts +12 -7
- package/types/project-definition/check-tree/flag-conditions.d.ts +5 -0
- package/types/project-definition/check-tree/resolution.d.ts +6 -4
- package/types/project-definition/declarative-snapshot.d.ts +4 -1
- package/types/project-definition/project-changes.d.ts +30 -0
- package/types/project-definition/project-definition.d.ts +15 -30
- package/types/project-definition/scheduler-policy.d.ts +3 -3
- package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +2 -2
- package/types/project-run/aggregation.d.ts +8 -6
- package/types/project-run/changes/git.d.ts +14 -0
- package/types/project-run/check-execution/admitted-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/dependencies.d.ts +3 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +1 -1
- package/types/project-run/check-execution/execution-settlement.d.ts +15 -7
- package/types/project-run/check-execution/flag-controls.d.ts +1 -1
- package/types/project-run/check-execution/lifecycle.d.ts +9 -5
- package/types/project-run/check-execution/{preflight-result.d.ts → preparation-result.d.ts} +3 -3
- package/types/project-run/check-execution/{preflight.d.ts → preparation.d.ts} +10 -9
- package/types/project-run/check-execution/ready-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +12 -13
- package/types/project-run/check-execution/scheduled-check-run.d.ts +10 -0
- package/types/project-run/check-execution/terminal-result.d.ts +13 -1
- package/types/project-run/completion/completion.d.ts +3 -1
- package/types/project-run/controls/contract.d.ts +6 -16
- package/types/project-run/invocation/candidates.d.ts +8 -0
- package/types/project-run/invocation/execution.d.ts +5 -0
- package/types/project-run/invocation/run.d.ts +2 -2
- package/types/project-run/outputs/status.d.ts +4 -4
- package/types/project-run/progress-rendering/presentation.d.ts +4 -3
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +5 -2
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +2 -0
- package/types/project-run/progress-rendering/renderer.d.ts +4 -2
- package/types/project-run/project-context.d.ts +3 -3
- package/types/project-run/result.d.ts +3 -3
- package/types/project-run/run.d.ts +1 -1
- package/types/project-run/task-scheduler/admission-core/compiled-graph-lookup.d.ts +10 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +4 -4
- package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +2 -2
- package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +1 -1
- package/dist/esm/cache/cache-json-by-key.mjs.map +0 -1
- package/dist/esm/check/finding-presentation.mjs.map +0 -1
- package/dist/esm/finding-waivers/reconciliation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +0 -1
- package/dist/esm/learned-critical-path/selection-layers.mjs.map +0 -1
- package/dist/esm/learned-critical-path/static-decision.mjs.map +0 -1
- package/dist/esm/learned-critical-path/strategy.mjs.map +0 -1
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight.mjs.map +0 -1
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +0 -1
- package/types/package-checks/project-files/config-glob.d.ts +0 -5
- /package/dist/esm/{check → package-tools/finding-presentation}/finding-presentation.mjs +0 -0
- /package/dist/esm/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/static-decision.mjs +0 -0
- /package/src/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.ts +0 -0
- /package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.ts +0 -0
- /package/types/{cache → package-tools/cache}/cache-json-by-key.d.ts +0 -0
- /package/types/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.d.ts +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import type { CheckMessage } from "../../check/check.ts";
|
|
6
6
|
import { parseCheckMessages } from "./messages.ts";
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type ParsedCheckPreparationResult =
|
|
9
9
|
| Readonly<{
|
|
10
10
|
readonly status: "success";
|
|
11
11
|
readonly preparedOptions: unknown;
|
|
@@ -25,30 +25,32 @@ export type ParsedCheckPreflightResult =
|
|
|
25
25
|
readonly messages: readonly CheckMessage[];
|
|
26
26
|
}>;
|
|
27
27
|
|
|
28
|
-
/** Parses the closed result vocabulary returned by one trusted Check
|
|
29
|
-
export function
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
/** Parses the closed result vocabulary returned by one trusted Check preparation. */
|
|
29
|
+
export function parseCheckPreparationResult(
|
|
30
|
+
value: unknown
|
|
31
|
+
): ParsedCheckPreparationResult | undefined {
|
|
32
|
+
const preparationResult = snapshotClosedRecord(value);
|
|
33
|
+
if (preparationResult === undefined) {
|
|
32
34
|
return undefined;
|
|
33
35
|
}
|
|
34
|
-
const messages = parseCheckMessages(
|
|
36
|
+
const messages = parseCheckMessages(preparationResult.messages);
|
|
35
37
|
if (messages === undefined) return undefined;
|
|
36
|
-
switch (
|
|
38
|
+
switch (preparationResult.status) {
|
|
37
39
|
case "success":
|
|
38
|
-
return
|
|
40
|
+
return parseSuccessfulPreparation(preparationResult, messages);
|
|
39
41
|
case "failure":
|
|
40
|
-
return
|
|
42
|
+
return parseFailedPreparation(preparationResult, messages);
|
|
41
43
|
default:
|
|
42
44
|
return undefined;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
+
function parseSuccessfulPreparation(
|
|
49
|
+
preparationResult: Readonly<Record<string, unknown>>,
|
|
48
50
|
messages: readonly CheckMessage[]
|
|
49
|
-
):
|
|
51
|
+
): ParsedCheckPreparationResult | undefined {
|
|
50
52
|
if (
|
|
51
|
-
!hasRequiredAndOptionalRecordKeys(
|
|
53
|
+
!hasRequiredAndOptionalRecordKeys(preparationResult, {
|
|
52
54
|
optional: ["messages"],
|
|
53
55
|
required: ["status", "preparedOptions"]
|
|
54
56
|
})
|
|
@@ -57,35 +59,35 @@ function parseSuccessfulPreflight(
|
|
|
57
59
|
}
|
|
58
60
|
return Object.freeze({
|
|
59
61
|
status: "success",
|
|
60
|
-
preparedOptions:
|
|
62
|
+
preparedOptions: preparationResult.preparedOptions,
|
|
61
63
|
messages
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
+
function parseFailedPreparation(
|
|
68
|
+
preparationResult: Readonly<Record<string, unknown>>,
|
|
67
69
|
messages: readonly CheckMessage[]
|
|
68
|
-
):
|
|
69
|
-
if (typeof
|
|
70
|
-
const reason =
|
|
70
|
+
): ParsedCheckPreparationResult | undefined {
|
|
71
|
+
if (typeof preparationResult.action !== "string") return undefined;
|
|
72
|
+
const reason = parsePreparationReason(preparationResult.reason);
|
|
71
73
|
if (reason === undefined) return undefined;
|
|
72
|
-
switch (
|
|
74
|
+
switch (preparationResult.action) {
|
|
73
75
|
case "block":
|
|
74
|
-
return
|
|
76
|
+
return parseBlockedPreparation(preparationResult, reason, messages);
|
|
75
77
|
case "continue":
|
|
76
|
-
return
|
|
78
|
+
return parseContinuedPreparation(preparationResult, reason, messages);
|
|
77
79
|
default:
|
|
78
80
|
return undefined;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
+
function parseBlockedPreparation(
|
|
85
|
+
preparationResult: Readonly<Record<string, unknown>>,
|
|
84
86
|
reason: Readonly<{ readonly code: string }>,
|
|
85
87
|
messages: readonly CheckMessage[]
|
|
86
|
-
):
|
|
88
|
+
): ParsedCheckPreparationResult | undefined {
|
|
87
89
|
if (
|
|
88
|
-
!hasRequiredAndOptionalRecordKeys(
|
|
90
|
+
!hasRequiredAndOptionalRecordKeys(preparationResult, {
|
|
89
91
|
optional: ["messages"],
|
|
90
92
|
required: ["status", "action", "reason"]
|
|
91
93
|
})
|
|
@@ -95,13 +97,13 @@ function parseBlockedPreflight(
|
|
|
95
97
|
return Object.freeze({ status: "failure", action: "block", reason, messages });
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
+
function parseContinuedPreparation(
|
|
101
|
+
preparationResult: Readonly<Record<string, unknown>>,
|
|
100
102
|
reason: Readonly<{ readonly code: string }>,
|
|
101
103
|
messages: readonly CheckMessage[]
|
|
102
|
-
):
|
|
104
|
+
): ParsedCheckPreparationResult | undefined {
|
|
103
105
|
if (
|
|
104
|
-
!hasRequiredAndOptionalRecordKeys(
|
|
106
|
+
!hasRequiredAndOptionalRecordKeys(preparationResult, {
|
|
105
107
|
optional: ["messages"],
|
|
106
108
|
required: ["status", "action", "fallback", "reason"]
|
|
107
109
|
})
|
|
@@ -111,13 +113,13 @@ function parseContinuedPreflight(
|
|
|
111
113
|
return Object.freeze({
|
|
112
114
|
status: "failure",
|
|
113
115
|
action: "continue" as const,
|
|
114
|
-
fallback:
|
|
116
|
+
fallback: preparationResult.fallback,
|
|
115
117
|
reason,
|
|
116
118
|
messages
|
|
117
119
|
});
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
function
|
|
122
|
+
function parsePreparationReason(value: unknown): Readonly<{ readonly code: string }> | undefined {
|
|
121
123
|
const reason = snapshotClosedRecord(value);
|
|
122
124
|
if (
|
|
123
125
|
reason === undefined ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckMessage, CheckOutcome } from "../../check/check.ts";
|
|
1
|
+
import type { CheckMessage, CheckOutcome, CheckProjectContext } from "../../check/check.ts";
|
|
2
2
|
import type { NormalizedCheck } from "../../project-definition/project-definition.ts";
|
|
3
3
|
import { snapshotJsonObject } from "../../check/options-snapshot.ts";
|
|
4
4
|
import {
|
|
@@ -6,35 +6,38 @@ import {
|
|
|
6
6
|
summarizeDiagnosticValue,
|
|
7
7
|
type DiagnosticLogger
|
|
8
8
|
} from "../diagnostic-logging/logger.ts";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
parseCheckPreparationResult,
|
|
11
|
+
type ParsedCheckPreparationResult
|
|
12
|
+
} from "./preparation-result.ts";
|
|
10
13
|
import { invokeWithCapturedConsole } from "./console-capture.ts";
|
|
11
14
|
import { combineCheckMessages } from "./messages.ts";
|
|
12
15
|
|
|
13
16
|
const EMPTY_MESSAGES: readonly CheckMessage[] = Object.freeze([]);
|
|
14
17
|
const INERT_SIGNAL = new AbortController().signal;
|
|
15
18
|
|
|
16
|
-
export type PreparedCheck = Omit<NormalizedCheck, "options" | "
|
|
17
|
-
Readonly<{ readonly options: object; readonly
|
|
19
|
+
export type PreparedCheck = Omit<NormalizedCheck, "options" | "prepare"> &
|
|
20
|
+
Readonly<{ readonly options: object; readonly preparationMessages: readonly CheckMessage[] }>;
|
|
18
21
|
|
|
19
|
-
type BlockedCheck = Pick<NormalizedCheck, "definition" | "
|
|
20
|
-
Readonly<{ readonly
|
|
22
|
+
type BlockedCheck = Pick<NormalizedCheck, "definition" | "omitQuietPassedRow"> &
|
|
23
|
+
Readonly<{ readonly preparationMessages: readonly CheckMessage[] }>;
|
|
21
24
|
|
|
22
|
-
export type
|
|
25
|
+
export type ReadyCheckPreparationResolution = Readonly<{
|
|
23
26
|
readonly kind: "ready";
|
|
24
27
|
readonly check: PreparedCheck;
|
|
25
28
|
}>;
|
|
26
29
|
|
|
27
|
-
export type
|
|
30
|
+
export type BlockedCheckPreparationResolution = Readonly<{
|
|
28
31
|
readonly kind: "blocked";
|
|
29
32
|
readonly check: BlockedCheck;
|
|
30
33
|
readonly outcome: CheckOutcome;
|
|
31
34
|
}>;
|
|
32
35
|
|
|
33
|
-
export type
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
+
export type CheckPreparationResolution =
|
|
37
|
+
| ReadyCheckPreparationResolution
|
|
38
|
+
| BlockedCheckPreparationResolution;
|
|
36
39
|
|
|
37
|
-
type
|
|
40
|
+
type PreparationResolutionResult =
|
|
38
41
|
| "skipped"
|
|
39
42
|
| "prepared"
|
|
40
43
|
| "continued"
|
|
@@ -48,15 +51,16 @@ type PreflightResolutionResult =
|
|
|
48
51
|
type PrepareCheckInput = Readonly<{
|
|
49
52
|
readonly check: NormalizedCheck;
|
|
50
53
|
readonly diagnosticLogger: DiagnosticLogger | undefined;
|
|
54
|
+
readonly project: CheckProjectContext;
|
|
51
55
|
readonly signal: AbortSignal | undefined;
|
|
52
56
|
}>;
|
|
53
57
|
|
|
54
|
-
type
|
|
58
|
+
type PreparationInvocation = Awaited<ReturnType<typeof invokeWithCapturedConsole<unknown>>>;
|
|
55
59
|
|
|
56
60
|
/** Resolves one Check's task-local preparation after Scheduler admission. */
|
|
57
|
-
export async function prepareCheck(input: PrepareCheckInput): Promise<
|
|
58
|
-
if (input.signal?.aborted) {
|
|
59
|
-
return
|
|
61
|
+
export async function prepareCheck(input: PrepareCheckInput): Promise<CheckPreparationResolution> {
|
|
62
|
+
if (input.signal?.aborted === true) {
|
|
63
|
+
return observeBlockedPreparation({
|
|
60
64
|
check: input.check,
|
|
61
65
|
diagnosticLogger: input.diagnosticLogger,
|
|
62
66
|
details: {},
|
|
@@ -64,13 +68,13 @@ export async function prepareCheck(input: PrepareCheckInput): Promise<CheckPrefl
|
|
|
64
68
|
reasonCode: "execution-cancelled"
|
|
65
69
|
});
|
|
66
70
|
}
|
|
67
|
-
if (input.check.
|
|
71
|
+
if (input.check.prepare === undefined) {
|
|
68
72
|
return resolveAuthoredOptions(input);
|
|
69
73
|
}
|
|
70
|
-
return
|
|
74
|
+
return resolvePreparationInvocation(input, await invokePreparation(input));
|
|
71
75
|
}
|
|
72
76
|
|
|
73
|
-
function resolveAuthoredOptions(input: PrepareCheckInput):
|
|
77
|
+
function resolveAuthoredOptions(input: PrepareCheckInput): CheckPreparationResolution {
|
|
74
78
|
const resolution = readyResolution({
|
|
75
79
|
authoredCheck: input.check,
|
|
76
80
|
messages: EMPTY_MESSAGES,
|
|
@@ -86,125 +90,129 @@ function resolveAuthoredOptions(input: PrepareCheckInput): CheckPreflightResolut
|
|
|
86
90
|
return resolution;
|
|
87
91
|
}
|
|
88
92
|
|
|
89
|
-
function
|
|
93
|
+
function resolvePreparationInvocation(
|
|
90
94
|
input: PrepareCheckInput,
|
|
91
|
-
invocation:
|
|
92
|
-
):
|
|
95
|
+
invocation: PreparationInvocation
|
|
96
|
+
): CheckPreparationResolution {
|
|
93
97
|
if (invocation.kind === "threw") {
|
|
94
|
-
return
|
|
98
|
+
return observeBlockedPreparation({
|
|
95
99
|
check: input.check,
|
|
96
100
|
diagnosticLogger: input.diagnosticLogger,
|
|
97
101
|
details: { error: invocation.error },
|
|
98
102
|
messages: invocation.messages,
|
|
99
|
-
result: input.signal?.aborted ? "cancelled-after-throw" : "threw",
|
|
100
|
-
reasonCode: input.signal?.aborted ? "execution-cancelled" : "
|
|
103
|
+
result: input.signal?.aborted === true ? "cancelled-after-throw" : "threw",
|
|
104
|
+
reasonCode: input.signal?.aborted === true ? "execution-cancelled" : "preparation-threw"
|
|
101
105
|
});
|
|
102
106
|
}
|
|
103
|
-
return
|
|
107
|
+
return resolveReturnedPreparation(input, invocation.output, invocation.messages);
|
|
104
108
|
}
|
|
105
109
|
|
|
106
|
-
function
|
|
110
|
+
function resolveReturnedPreparation(
|
|
107
111
|
input: PrepareCheckInput,
|
|
108
|
-
|
|
112
|
+
preparationOutput: unknown,
|
|
109
113
|
consoleMessages: readonly CheckMessage[]
|
|
110
|
-
):
|
|
111
|
-
if (input.signal?.aborted) {
|
|
112
|
-
return
|
|
114
|
+
): CheckPreparationResolution {
|
|
115
|
+
if (input.signal?.aborted === true) {
|
|
116
|
+
return observeBlockedPreparation({
|
|
113
117
|
check: input.check,
|
|
114
118
|
diagnosticLogger: input.diagnosticLogger,
|
|
115
|
-
details: { raw:
|
|
119
|
+
details: { raw: preparationOutput },
|
|
116
120
|
messages: consoleMessages,
|
|
117
121
|
result: "cancelled-after-callback",
|
|
118
122
|
reasonCode: "execution-cancelled"
|
|
119
123
|
});
|
|
120
124
|
}
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
return
|
|
125
|
+
const preparationResult = parseCheckPreparationResult(preparationOutput);
|
|
126
|
+
if (preparationResult === undefined) {
|
|
127
|
+
return observeBlockedPreparation({
|
|
124
128
|
check: input.check,
|
|
125
129
|
diagnosticLogger: input.diagnosticLogger,
|
|
126
|
-
details: { raw:
|
|
130
|
+
details: { raw: preparationOutput },
|
|
127
131
|
messages: consoleMessages,
|
|
128
132
|
result: "malformed",
|
|
129
|
-
reasonCode: "invalid-
|
|
133
|
+
reasonCode: "invalid-preparation-result"
|
|
130
134
|
});
|
|
131
135
|
}
|
|
132
|
-
if (
|
|
133
|
-
return
|
|
136
|
+
if (preparationResult.status === "failure" && preparationResult.action === "block") {
|
|
137
|
+
return resolveBlockedPreparationResult(input, preparationResult, consoleMessages);
|
|
134
138
|
}
|
|
135
|
-
return
|
|
139
|
+
return resolveReadyPreparationResult(
|
|
140
|
+
input,
|
|
141
|
+
preparationOutput,
|
|
142
|
+
preparationResult,
|
|
143
|
+
consoleMessages
|
|
144
|
+
);
|
|
136
145
|
}
|
|
137
146
|
|
|
138
|
-
function
|
|
147
|
+
function resolveBlockedPreparationResult(
|
|
139
148
|
input: PrepareCheckInput,
|
|
140
|
-
|
|
149
|
+
preparationResult: Extract<ParsedCheckPreparationResult, { readonly action: "block" }>,
|
|
141
150
|
consoleMessages: readonly CheckMessage[]
|
|
142
|
-
):
|
|
151
|
+
): CheckPreparationResolution {
|
|
143
152
|
const resolution = blockedResolution({
|
|
144
153
|
check: input.check,
|
|
145
|
-
messages: combineCheckMessages(consoleMessages,
|
|
146
|
-
reasonCode:
|
|
154
|
+
messages: combineCheckMessages(consoleMessages, preparationResult.messages),
|
|
155
|
+
reasonCode: preparationResult.reason.code
|
|
147
156
|
});
|
|
148
|
-
|
|
157
|
+
observePreparationResolution(
|
|
149
158
|
input.diagnosticLogger,
|
|
150
159
|
input.check.definition.checkId,
|
|
151
160
|
resolution,
|
|
152
161
|
"blocked",
|
|
153
162
|
{
|
|
154
|
-
...(
|
|
155
|
-
reason:
|
|
163
|
+
...(preparationResult.messages.length === 0 ? {} : { messages: preparationResult.messages }),
|
|
164
|
+
reason: preparationResult.reason
|
|
156
165
|
}
|
|
157
166
|
);
|
|
158
167
|
return resolution;
|
|
159
168
|
}
|
|
160
169
|
|
|
161
|
-
function
|
|
170
|
+
function resolveReadyPreparationResult(
|
|
162
171
|
input: PrepareCheckInput,
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
preparationOutput: unknown,
|
|
173
|
+
preparationResult: Exclude<ParsedCheckPreparationResult, { readonly action: "block" }>,
|
|
165
174
|
consoleMessages: readonly CheckMessage[]
|
|
166
|
-
):
|
|
175
|
+
): CheckPreparationResolution {
|
|
167
176
|
const checkId = input.check.definition.checkId;
|
|
168
|
-
const result =
|
|
177
|
+
const result = preparationResult.status === "success" ? "prepared" : "continued";
|
|
169
178
|
const resolution = readyResolution({
|
|
170
179
|
authoredCheck: input.check,
|
|
171
|
-
messages: combineCheckMessages(consoleMessages,
|
|
180
|
+
messages: combineCheckMessages(consoleMessages, preparationResult.messages),
|
|
172
181
|
preparedOptions:
|
|
173
|
-
|
|
174
|
-
?
|
|
175
|
-
:
|
|
182
|
+
preparationResult.status === "success"
|
|
183
|
+
? preparationResult.preparedOptions
|
|
184
|
+
: preparationResult.fallback
|
|
176
185
|
});
|
|
177
186
|
observeReadyOrMalformedResolution(input.diagnosticLogger, checkId, resolution, result, {
|
|
178
|
-
messages:
|
|
179
|
-
...(
|
|
180
|
-
raw:
|
|
187
|
+
messages: preparationResult.messages,
|
|
188
|
+
...(preparationResult.status === "success" ? {} : { reason: preparationResult.reason }),
|
|
189
|
+
raw: preparationOutput
|
|
181
190
|
});
|
|
182
191
|
return resolution;
|
|
183
192
|
}
|
|
184
193
|
|
|
185
|
-
async function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
)
|
|
189
|
-
return invokeWithCapturedConsole(() => check.preflight!(check.options, signal ?? INERT_SIGNAL));
|
|
194
|
+
async function invokePreparation(input: PrepareCheckInput): Promise<PreparationInvocation> {
|
|
195
|
+
return invokeWithCapturedConsole(() =>
|
|
196
|
+
input.check.prepare!(input.check.options, input.signal ?? INERT_SIGNAL, input.project)
|
|
197
|
+
);
|
|
190
198
|
}
|
|
191
199
|
|
|
192
|
-
function
|
|
200
|
+
function observeBlockedPreparation(
|
|
193
201
|
input: Readonly<{
|
|
194
202
|
readonly check: NormalizedCheck;
|
|
195
203
|
readonly diagnosticLogger: DiagnosticLogger | undefined;
|
|
196
204
|
readonly details: Readonly<Record<string, unknown>>;
|
|
197
205
|
readonly messages?: readonly CheckMessage[];
|
|
198
|
-
readonly result:
|
|
206
|
+
readonly result: PreparationResolutionResult;
|
|
199
207
|
readonly reasonCode: string;
|
|
200
208
|
}>
|
|
201
|
-
):
|
|
209
|
+
): BlockedCheckPreparationResolution {
|
|
202
210
|
const resolution = blockedResolution({
|
|
203
211
|
check: input.check,
|
|
204
212
|
messages: input.messages ?? EMPTY_MESSAGES,
|
|
205
213
|
reasonCode: input.reasonCode
|
|
206
214
|
});
|
|
207
|
-
|
|
215
|
+
observePreparationResolution(
|
|
208
216
|
input.diagnosticLogger,
|
|
209
217
|
input.check.definition.checkId,
|
|
210
218
|
resolution,
|
|
@@ -217,18 +225,18 @@ function observeBlockedPreflight(
|
|
|
217
225
|
function observeReadyOrMalformedResolution(
|
|
218
226
|
diagnosticLogger: DiagnosticLogger | undefined,
|
|
219
227
|
checkId: string,
|
|
220
|
-
resolution:
|
|
228
|
+
resolution: CheckPreparationResolution,
|
|
221
229
|
result: "skipped" | "prepared" | "continued",
|
|
222
230
|
details: Readonly<Record<string, unknown>>
|
|
223
231
|
): void {
|
|
224
232
|
if (resolution.kind === "blocked") {
|
|
225
|
-
|
|
233
|
+
observePreparationResolution(diagnosticLogger, checkId, resolution, "malformed", {
|
|
226
234
|
raw: "raw" in details ? details.raw : summarizeDiagnosticValue(details)
|
|
227
235
|
});
|
|
228
236
|
return;
|
|
229
237
|
}
|
|
230
238
|
const messages = "messages" in details ? details.messages : EMPTY_MESSAGES;
|
|
231
|
-
|
|
239
|
+
observePreparationResolution(diagnosticLogger, checkId, resolution, result, {
|
|
232
240
|
...(Array.isArray(messages) && messages.length > 0 ? { messages } : {}),
|
|
233
241
|
options: summarizeDiagnosticValue(resolution.check.options),
|
|
234
242
|
...("reason" in details ? { reason: details.reason } : {}),
|
|
@@ -236,16 +244,16 @@ function observeReadyOrMalformedResolution(
|
|
|
236
244
|
});
|
|
237
245
|
}
|
|
238
246
|
|
|
239
|
-
function
|
|
247
|
+
function observePreparationResolution(
|
|
240
248
|
diagnosticLogger: DiagnosticLogger | undefined,
|
|
241
249
|
checkId: string,
|
|
242
|
-
resolution:
|
|
243
|
-
result:
|
|
250
|
+
resolution: CheckPreparationResolution,
|
|
251
|
+
result: PreparationResolutionResult,
|
|
244
252
|
details: Readonly<Record<string, unknown>>
|
|
245
253
|
): void {
|
|
246
254
|
diagnosticLogger?.observe({
|
|
247
|
-
event: "
|
|
248
|
-
tags: diagnosticTags(`CHECK:${checkId}`, "
|
|
255
|
+
event: "preparation.resolved",
|
|
256
|
+
tags: diagnosticTags(`CHECK:${checkId}`, "PREPARATION", result.toUpperCase()),
|
|
249
257
|
details: {
|
|
250
258
|
...details,
|
|
251
259
|
...(resolution.kind === "blocked" ? { outcome: resolution.outcome } : {})
|
|
@@ -259,22 +267,22 @@ function readyResolution(
|
|
|
259
267
|
readonly messages: readonly CheckMessage[];
|
|
260
268
|
readonly preparedOptions: unknown;
|
|
261
269
|
}>
|
|
262
|
-
):
|
|
270
|
+
): CheckPreparationResolution {
|
|
263
271
|
const preparedOptions = snapshotJsonObject(input.preparedOptions);
|
|
264
272
|
if (preparedOptions === undefined) {
|
|
265
273
|
return blockedResolution({
|
|
266
274
|
check: input.authoredCheck,
|
|
267
275
|
messages: input.messages,
|
|
268
|
-
reasonCode: "invalid-
|
|
276
|
+
reasonCode: "invalid-preparation-result"
|
|
269
277
|
});
|
|
270
278
|
}
|
|
271
|
-
const {
|
|
279
|
+
const { prepare: _preparation, ...check } = input.authoredCheck;
|
|
272
280
|
return Object.freeze({
|
|
273
281
|
kind: "ready",
|
|
274
282
|
check: Object.freeze({
|
|
275
283
|
...check,
|
|
276
284
|
options: preparedOptions,
|
|
277
|
-
|
|
285
|
+
preparationMessages: input.messages
|
|
278
286
|
})
|
|
279
287
|
});
|
|
280
288
|
}
|
|
@@ -285,13 +293,13 @@ function blockedResolution(
|
|
|
285
293
|
readonly messages: readonly CheckMessage[];
|
|
286
294
|
readonly reasonCode: string;
|
|
287
295
|
}>
|
|
288
|
-
):
|
|
296
|
+
): BlockedCheckPreparationResolution {
|
|
289
297
|
return Object.freeze({
|
|
290
298
|
kind: "blocked",
|
|
291
299
|
check: Object.freeze({
|
|
292
300
|
definition: input.check.definition,
|
|
293
|
-
|
|
294
|
-
|
|
301
|
+
preparationMessages: input.messages,
|
|
302
|
+
omitQuietPassedRow: input.check.omitQuietPassedRow
|
|
295
303
|
}),
|
|
296
304
|
outcome: Object.freeze({
|
|
297
305
|
status: "unavailable",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** Executes and settles a Check after its task-local preparation has admitted it. */
|
|
2
|
+
|
|
3
|
+
import type { CheckProjectContext } from "../../check/check.ts";
|
|
4
|
+
import type { NormalizedCheck } from "../../project-definition/project-definition.ts";
|
|
5
|
+
import { artifactDirectoryForCheck, type ResolvedInvocationPaths } from "../invocation/paths.ts";
|
|
6
|
+
import { diagnosticTags, summarizeDiagnosticValue } from "../diagnostic-logging/logger.ts";
|
|
7
|
+
import { executeCheckCallback } from "./callback.ts";
|
|
8
|
+
import { createCheckDependencies } from "./dependencies.ts";
|
|
9
|
+
import { checkIdentity } from "./execution-finalization.ts";
|
|
10
|
+
import {
|
|
11
|
+
recordSettledCheck,
|
|
12
|
+
settleCallback,
|
|
13
|
+
type CheckExecutionState
|
|
14
|
+
} from "./execution-settlement.ts";
|
|
15
|
+
import type { ReadyCheckPreparationResolution } from "./preparation.ts";
|
|
16
|
+
|
|
17
|
+
export type ReadyCheckExecutionInput = CheckExecutionState &
|
|
18
|
+
Readonly<{
|
|
19
|
+
readonly check: NormalizedCheck;
|
|
20
|
+
readonly clock: Readonly<{ now(): number }>;
|
|
21
|
+
readonly invocationId: string;
|
|
22
|
+
readonly paths: ResolvedInvocationPaths | undefined;
|
|
23
|
+
readonly prepare: ReadyCheckPreparationResolution;
|
|
24
|
+
readonly project: CheckProjectContext;
|
|
25
|
+
readonly signal: AbortSignal;
|
|
26
|
+
}>;
|
|
27
|
+
|
|
28
|
+
export async function executeReadyCheck(input: ReadyCheckExecutionInput): Promise<boolean> {
|
|
29
|
+
const check = input.prepare.check;
|
|
30
|
+
const checkId = check.definition.checkId;
|
|
31
|
+
const scope = input.session.openCheckScope(checkId);
|
|
32
|
+
const identity = checkIdentity(check);
|
|
33
|
+
input.diagnosticLogger?.observe({
|
|
34
|
+
event: "check.started",
|
|
35
|
+
tags: diagnosticTags(`CHECK:${checkId}`, "EXECUTION", "STARTED"),
|
|
36
|
+
details: {
|
|
37
|
+
dependencies: check.dependsOn,
|
|
38
|
+
displayName: check.definition.displayName,
|
|
39
|
+
options: summarizeDiagnosticValue(check.options)
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
input.lifecycle?.started(
|
|
43
|
+
Object.freeze({
|
|
44
|
+
checkId: identity.checkId,
|
|
45
|
+
displayName: identity.displayName,
|
|
46
|
+
omitQuietPassedRow: identity.omitQuietPassedRow
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
const startedAt = input.clock.now();
|
|
50
|
+
const callback = await executeCheckCallback({
|
|
51
|
+
artifactDirectory:
|
|
52
|
+
input.paths === undefined ? null : artifactDirectoryForCheck(input.paths, checkId),
|
|
53
|
+
check,
|
|
54
|
+
dependencies: createCheckDependencies({
|
|
55
|
+
checkId,
|
|
56
|
+
directDependsOnCheckIds: check.dependsOn,
|
|
57
|
+
diagnosticLogger: input.diagnosticLogger,
|
|
58
|
+
directRelationCheckIds: directRelationCheckIds(check),
|
|
59
|
+
handoffsByCheckId: input.handoffsByCheckId,
|
|
60
|
+
session: input.session
|
|
61
|
+
}),
|
|
62
|
+
...(input.diagnosticLogger === undefined ? {} : { diagnosticLogger: input.diagnosticLogger }),
|
|
63
|
+
invocationId: input.invocationId,
|
|
64
|
+
project: input.project,
|
|
65
|
+
scope,
|
|
66
|
+
signal: input.signal
|
|
67
|
+
});
|
|
68
|
+
const settled = settleCallback({
|
|
69
|
+
callback,
|
|
70
|
+
checkId,
|
|
71
|
+
diagnosticLogger: input.diagnosticLogger,
|
|
72
|
+
handoff: check.handoff,
|
|
73
|
+
preparationMessages: check.preparationMessages,
|
|
74
|
+
scope,
|
|
75
|
+
state: input
|
|
76
|
+
});
|
|
77
|
+
recordSettledCheck({
|
|
78
|
+
check: identity,
|
|
79
|
+
durationMs: durationSince(startedAt, input.clock),
|
|
80
|
+
messages: settled.messages,
|
|
81
|
+
outcome: settled.outcome,
|
|
82
|
+
phase: "execution",
|
|
83
|
+
state: input
|
|
84
|
+
});
|
|
85
|
+
return settled.outcome.status === "passed";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function directRelationCheckIds(
|
|
89
|
+
check: Pick<NormalizedCheck, "dependsOn" | "observes">
|
|
90
|
+
): readonly string[] {
|
|
91
|
+
return Object.freeze([...new Set([...check.dependsOn, ...check.observes])].sort());
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function durationSince(startedAt: number, clock: Readonly<{ now(): number }>): number {
|
|
95
|
+
const elapsed = clock.now() - startedAt;
|
|
96
|
+
return Number.isFinite(elapsed) && elapsed >= 0 ? elapsed : 0;
|
|
97
|
+
}
|