@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
|
@@ -1,72 +1,39 @@
|
|
|
1
1
|
import type { CheckMessage, CheckProjectContext } from "../../check/check.ts";
|
|
2
2
|
import type {
|
|
3
3
|
NormalizedCheck,
|
|
4
|
-
|
|
4
|
+
SchedulerTerminalEffect
|
|
5
5
|
} from "../../project-definition/project-definition.ts";
|
|
6
6
|
import type { ResourceUnitMapping } from "../../project-definition/resource-unit-mapping.ts";
|
|
7
7
|
import { createCoreCheckSession } from "../../check-settlement/session.ts";
|
|
8
|
-
import {
|
|
9
|
-
diagnosticTags,
|
|
10
|
-
summarizeDiagnosticValue,
|
|
11
|
-
type DiagnosticLogger
|
|
12
|
-
} from "../diagnostic-logging/logger.ts";
|
|
13
|
-
import { prepareTaskGraph } from "../task-scheduler/graph.ts";
|
|
8
|
+
import type { DiagnosticLogger } from "../diagnostic-logging/logger.ts";
|
|
14
9
|
import type { AdmissionSelectionPolicy } from "../task-scheduler/admission-selection-policy.ts";
|
|
15
|
-
import {
|
|
10
|
+
import { prepareTaskGraph } from "../task-scheduler/graph.ts";
|
|
16
11
|
import type { SchedulerPerformanceDiagnosticsInput } from "../task-scheduler/measurement/diagnostics.ts";
|
|
17
|
-
import {
|
|
18
|
-
import { artifactDirectoryForCheck, type ResolvedInvocationPaths } from "../invocation/paths.ts";
|
|
12
|
+
import type { ResolvedInvocationPaths } from "../invocation/paths.ts";
|
|
19
13
|
import { runWithCheckConsoleRouter } from "./console-capture.ts";
|
|
20
|
-
import { createCheckDependencies } from "./dependencies.ts";
|
|
21
14
|
import {
|
|
22
|
-
CheckExecutionInvariantFailure,
|
|
23
15
|
recordSettledCheck,
|
|
24
|
-
settleCallback,
|
|
25
16
|
type CheckExecutionState,
|
|
26
|
-
type CheckIdentity,
|
|
27
17
|
type SettledCheckFacts
|
|
28
18
|
} from "./execution-settlement.ts";
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
closeResolvedChecks,
|
|
32
|
-
settleBlockedDependent,
|
|
33
|
-
trustedFailure
|
|
34
|
-
} from "./execution-finalization.ts";
|
|
35
|
-
import type { CheckExecutionLifecycle } from "./lifecycle.ts";
|
|
19
|
+
import { checkIdentity, closeResolvedChecks } from "./execution-finalization.ts";
|
|
20
|
+
import type { CheckExecutionLifecycle, InvocationLifecycle } from "./lifecycle.ts";
|
|
36
21
|
import { planStaticCheckGraph } from "./plan.ts";
|
|
37
22
|
import {
|
|
38
23
|
selectEffectiveCheckIds,
|
|
39
24
|
resolveFlagControlSettlements,
|
|
40
25
|
type FlagControlSettlement
|
|
41
26
|
} from "./flag-controls.ts";
|
|
42
|
-
import {
|
|
43
|
-
|
|
44
|
-
type CheckPreflightResolution,
|
|
45
|
-
type ReadyCheckPreflightResolution
|
|
46
|
-
} from "./preflight.ts";
|
|
27
|
+
import { runScheduledChecks } from "./scheduled-check-run.ts";
|
|
28
|
+
import type { CheckExecutionClock } from "./admitted-check-execution.ts";
|
|
47
29
|
import type { ResolvedCheckExecution } from "./resolved-execution-result.ts";
|
|
48
30
|
|
|
49
|
-
const INERT_SIGNAL = new AbortController().signal;
|
|
50
31
|
const NO_CHECK_MESSAGES: readonly CheckMessage[] = Object.freeze([]);
|
|
51
|
-
const DIRECT_EXECUTION_INVOCATION_ID = "invocation/v1:direct-check-execution";
|
|
52
|
-
const SYSTEM_MONOTONIC_CLOCK: CheckExecutionClock = Object.freeze({
|
|
53
|
-
now: () => performance.now()
|
|
54
|
-
});
|
|
55
32
|
|
|
56
33
|
/** Package-private monotonic clock seam for execution accounting. */
|
|
57
|
-
export type CheckExecutionClock
|
|
58
|
-
|
|
59
|
-
interface ExecuteCheckInput extends CheckExecutionState {
|
|
60
|
-
readonly check: NormalizedCheck;
|
|
61
|
-
readonly clock: CheckExecutionClock;
|
|
62
|
-
readonly onAdmittedCheck: ((check: NormalizedCheck) => void) | undefined;
|
|
63
|
-
readonly invocationId: string;
|
|
64
|
-
readonly paths: ResolvedInvocationPaths | undefined;
|
|
65
|
-
readonly project: CheckProjectContext;
|
|
66
|
-
readonly signal: AbortSignal;
|
|
67
|
-
}
|
|
34
|
+
export type { CheckExecutionClock } from "./admitted-check-execution.ts";
|
|
68
35
|
|
|
69
|
-
type ResolvedCheckExecutionInput = Readonly<{
|
|
36
|
+
export type ResolvedCheckExecutionInput = Readonly<{
|
|
70
37
|
/** Complete prepared private policy handoff; public policy dispatch stays outside execution. */
|
|
71
38
|
readonly admissionPolicy?: AdmissionSelectionPolicy;
|
|
72
39
|
readonly checks: readonly NormalizedCheck[];
|
|
@@ -85,10 +52,11 @@ type ResolvedCheckExecutionInput = Readonly<{
|
|
|
85
52
|
readonly schedulerDiagnosticLogger?: DiagnosticLogger;
|
|
86
53
|
/** Explicit enabled-only diagnostics handoff from the invocation output owner. */
|
|
87
54
|
readonly schedulerPerformanceDiagnostics?: SchedulerPerformanceDiagnosticsInput;
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
55
|
+
readonly schedulerTerminalEffects?: readonly SchedulerTerminalEffect[];
|
|
56
|
+
readonly onSchedulerTerminalEffectFailure?: () => void;
|
|
57
|
+
readonly onSchedulerTerminalEffectsSettled?: () => void;
|
|
58
|
+
readonly checkLifecycle?: CheckExecutionLifecycle;
|
|
59
|
+
readonly invocationLifecycle?: InvocationLifecycle;
|
|
92
60
|
/** Provider-owned bounded learned admission diagnostics, delivered by invocation. */
|
|
93
61
|
readonly onAdmittedCheck?: (check: NormalizedCheck) => void;
|
|
94
62
|
}>;
|
|
@@ -112,76 +80,34 @@ async function executePreparedResolvedChecks(
|
|
|
112
80
|
const state = createExecutionState({
|
|
113
81
|
checks: input.checks,
|
|
114
82
|
diagnosticLogger: input.diagnosticLogger,
|
|
115
|
-
lifecycle: input.
|
|
116
|
-
});
|
|
117
|
-
const flagControlSettlements = resolveFlagControlSettlements({
|
|
118
|
-
checks: input.checks,
|
|
119
|
-
diagnosticLogger: input.diagnosticLogger,
|
|
120
|
-
effectiveCheckIds,
|
|
121
|
-
signal: input.signal
|
|
83
|
+
lifecycle: input.checkLifecycle
|
|
122
84
|
});
|
|
123
|
-
for (const settlement of flagControlSettlements) {
|
|
124
|
-
settleFlagControlOutcome(state, settlement);
|
|
125
|
-
}
|
|
126
|
-
input.lifecycle?.flagControlCompleted();
|
|
127
|
-
const checksByCheckId = new Map(
|
|
128
|
-
input.checks.map((check) => [check.definition.checkId, check] as const)
|
|
129
|
-
);
|
|
130
|
-
let graphRun: Awaited<ReturnType<typeof runTaskGraph<boolean>>>;
|
|
131
85
|
try {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
})
|
|
147
|
-
)
|
|
148
|
-
),
|
|
149
|
-
signal: input.signal,
|
|
150
|
-
isPrerequisiteSatisfied: (satisfied) => satisfied,
|
|
151
|
-
onTaskBlocked: (task, dependencyIds) => {
|
|
152
|
-
const check = checksByCheckId.get(task.id);
|
|
153
|
-
if (check === undefined) {
|
|
154
|
-
throw new CheckExecutionInvariantFailure("Blocked Task has no normalized Check");
|
|
155
|
-
}
|
|
156
|
-
settleBlockedDependent({ check, dependencyIds, state });
|
|
157
|
-
},
|
|
158
|
-
execute: (task, context) => {
|
|
159
|
-
const check = checksByCheckId.get(task.id);
|
|
160
|
-
if (check === undefined) {
|
|
161
|
-
throw new CheckExecutionInvariantFailure("Task graph has no normalized Check");
|
|
162
|
-
}
|
|
163
|
-
return executeAdmittedCheck({
|
|
164
|
-
...state,
|
|
165
|
-
check,
|
|
166
|
-
clock: input.clock ?? SYSTEM_MONOTONIC_CLOCK,
|
|
167
|
-
onAdmittedCheck: input.onAdmittedCheck,
|
|
168
|
-
invocationId: input.invocationId ?? DIRECT_EXECUTION_INVOCATION_ID,
|
|
169
|
-
paths: input.paths,
|
|
170
|
-
project: input.project,
|
|
171
|
-
signal: context.signal ?? INERT_SIGNAL
|
|
172
|
-
});
|
|
173
|
-
}
|
|
86
|
+
const flagControlSettlements = resolveFlagControlSettlements({
|
|
87
|
+
checks: input.checks,
|
|
88
|
+
...(input.diagnosticLogger === undefined ? {} : { diagnosticLogger: input.diagnosticLogger }),
|
|
89
|
+
effectiveCheckIds,
|
|
90
|
+
signal: input.signal
|
|
91
|
+
});
|
|
92
|
+
for (const settlement of flagControlSettlements) {
|
|
93
|
+
settleFlagControlOutcome(state, settlement);
|
|
94
|
+
}
|
|
95
|
+
input.invocationLifecycle?.selectionSettled();
|
|
96
|
+
const graphRun = await runScheduledChecks({
|
|
97
|
+
execution: input,
|
|
98
|
+
flagControlSettlements,
|
|
99
|
+
state
|
|
174
100
|
});
|
|
175
|
-
} catch (error) {
|
|
176
|
-
throw trustedFailure(error);
|
|
177
|
-
}
|
|
178
101
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
102
|
+
return closeResolvedChecks({
|
|
103
|
+
allChecks: input.checks,
|
|
104
|
+
effectiveCheckIds,
|
|
105
|
+
graphRun,
|
|
106
|
+
state
|
|
107
|
+
});
|
|
108
|
+
} finally {
|
|
109
|
+
state.handoffsByCheckId.clear();
|
|
110
|
+
}
|
|
185
111
|
}
|
|
186
112
|
|
|
187
113
|
function createExecutionState(
|
|
@@ -193,6 +119,7 @@ function createExecutionState(
|
|
|
193
119
|
): CheckExecutionState {
|
|
194
120
|
return {
|
|
195
121
|
diagnosticLogger: input.diagnosticLogger,
|
|
122
|
+
handoffsByCheckId: new Map(),
|
|
196
123
|
settledFactsByCheckId: new Map<string, SettledCheckFacts>(),
|
|
197
124
|
lifecycle: input.lifecycle,
|
|
198
125
|
session: createCoreCheckSession(
|
|
@@ -216,109 +143,3 @@ function settleFlagControlOutcome(
|
|
|
216
143
|
state
|
|
217
144
|
});
|
|
218
145
|
}
|
|
219
|
-
|
|
220
|
-
function settleBlockedPreflight(
|
|
221
|
-
state: CheckExecutionState,
|
|
222
|
-
preflight: Extract<CheckPreflightResolution, { readonly kind: "blocked" }>
|
|
223
|
-
): void {
|
|
224
|
-
const scope = state.session.openCheckScope(preflight.check.definition.checkId);
|
|
225
|
-
const outcome = scope.settleProduct(preflight.outcome);
|
|
226
|
-
recordSettledCheck({
|
|
227
|
-
check: checkIdentity(preflight.check),
|
|
228
|
-
durationMs: null,
|
|
229
|
-
messages: preflight.check.preflightMessages,
|
|
230
|
-
outcome,
|
|
231
|
-
phase: "preflight",
|
|
232
|
-
state
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async function executeAdmittedCheck(input: ExecuteCheckInput): Promise<boolean> {
|
|
237
|
-
observeAdmittedCheck(input);
|
|
238
|
-
const preflight = await prepareCheck({
|
|
239
|
-
check: input.check,
|
|
240
|
-
diagnosticLogger: input.diagnosticLogger,
|
|
241
|
-
signal: input.signal
|
|
242
|
-
});
|
|
243
|
-
if (preflight.kind === "blocked") {
|
|
244
|
-
settleBlockedPreflight(input, preflight);
|
|
245
|
-
return false;
|
|
246
|
-
}
|
|
247
|
-
return executeReadyCheck({ ...input, preflight });
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/** Diagnostic observation belongs to the invocation; it cannot revise admitted Task facts. */
|
|
251
|
-
function observeAdmittedCheck(input: ExecuteCheckInput): void {
|
|
252
|
-
try {
|
|
253
|
-
input.onAdmittedCheck?.(input.check);
|
|
254
|
-
} catch {
|
|
255
|
-
// Learned diagnostic output is best-effort and has no execution consequence.
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
async function executeReadyCheck(
|
|
260
|
-
input: ExecuteCheckInput & Readonly<{ readonly preflight: ReadyCheckPreflightResolution }>
|
|
261
|
-
): Promise<boolean> {
|
|
262
|
-
const check = input.preflight.check;
|
|
263
|
-
const checkId = check.definition.checkId;
|
|
264
|
-
const scope = input.session.openCheckScope(checkId);
|
|
265
|
-
const identity = checkIdentity(check);
|
|
266
|
-
input.diagnosticLogger?.observe({
|
|
267
|
-
event: "check.started",
|
|
268
|
-
tags: diagnosticTags(`CHECK:${checkId}`, "EXECUTION", "STARTED"),
|
|
269
|
-
details: {
|
|
270
|
-
dependencies: check.dependsOn,
|
|
271
|
-
displayName: check.definition.displayName,
|
|
272
|
-
options: summarizeDiagnosticValue(check.options)
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
emitStarted(input.lifecycle, identity);
|
|
276
|
-
const startedAt = input.clock.now();
|
|
277
|
-
const callback = await executeCheckCallback({
|
|
278
|
-
artifactDirectory:
|
|
279
|
-
input.paths === undefined ? null : artifactDirectoryForCheck(input.paths, checkId),
|
|
280
|
-
check,
|
|
281
|
-
dependencies: createCheckDependencies({
|
|
282
|
-
checkId,
|
|
283
|
-
diagnosticLogger: input.diagnosticLogger,
|
|
284
|
-
directRelationCheckIds: directRelationCheckIds(check),
|
|
285
|
-
session: input.session
|
|
286
|
-
}),
|
|
287
|
-
diagnosticLogger: input.diagnosticLogger,
|
|
288
|
-
invocationId: input.invocationId,
|
|
289
|
-
project: input.project,
|
|
290
|
-
scope,
|
|
291
|
-
signal: input.signal
|
|
292
|
-
});
|
|
293
|
-
const settled = settleCallback({
|
|
294
|
-
callback,
|
|
295
|
-
checkId,
|
|
296
|
-
diagnosticLogger: input.diagnosticLogger,
|
|
297
|
-
preflightMessages: check.preflightMessages,
|
|
298
|
-
scope
|
|
299
|
-
});
|
|
300
|
-
recordSettledCheck({
|
|
301
|
-
check: identity,
|
|
302
|
-
durationMs: durationSince(startedAt, input.clock),
|
|
303
|
-
messages: settled.messages,
|
|
304
|
-
outcome: settled.outcome,
|
|
305
|
-
phase: "execution",
|
|
306
|
-
state: input
|
|
307
|
-
});
|
|
308
|
-
return settled.outcome.status === "passed";
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
function directRelationCheckIds(
|
|
312
|
-
check: Pick<NormalizedCheck, "dependsOn" | "observes">
|
|
313
|
-
): readonly string[] {
|
|
314
|
-
return Object.freeze([...new Set([...check.dependsOn, ...check.observes])].sort());
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function emitStarted(lifecycle: CheckExecutionLifecycle | undefined, check: CheckIdentity): void {
|
|
318
|
-
lifecycle?.started(Object.freeze({ checkId: check.checkId, displayName: check.displayName }));
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
function durationSince(startedAt: number, clock: CheckExecutionClock): number {
|
|
322
|
-
const elapsed = clock.now() - startedAt;
|
|
323
|
-
return Number.isFinite(elapsed) && elapsed >= 0 ? elapsed : 0;
|
|
324
|
-
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/** Maps normalized Checks into the Scheduler's opaque Task execute contract. */
|
|
2
|
+
|
|
3
|
+
import type { NormalizedCheck } from "../../project-definition/project-definition.ts";
|
|
4
|
+
import { runTaskGraph, type RunTaskGraphOptions } from "../task-scheduler/scheduler.ts";
|
|
5
|
+
import {
|
|
6
|
+
CheckExecutionInvariantFailure,
|
|
7
|
+
type CheckExecutionState
|
|
8
|
+
} from "./execution-settlement.ts";
|
|
9
|
+
import { settleBlockedDependent, trustedFailure } from "./execution-finalization.ts";
|
|
10
|
+
import type { FlagControlSettlement } from "./flag-controls.ts";
|
|
11
|
+
import { planStaticCheckGraph } from "./plan.ts";
|
|
12
|
+
import {
|
|
13
|
+
executeAdmittedCheck,
|
|
14
|
+
type AdmittedCheckExecutionInput,
|
|
15
|
+
type CheckExecutionClock
|
|
16
|
+
} from "./admitted-check-execution.ts";
|
|
17
|
+
import type { ResolvedCheckExecutionInput } from "./resolved-checks.ts";
|
|
18
|
+
|
|
19
|
+
const INERT_SIGNAL = new AbortController().signal;
|
|
20
|
+
const DIRECT_EXECUTION_INVOCATION_ID = "invocation/v1:direct-check-execution";
|
|
21
|
+
const SYSTEM_MONOTONIC_CLOCK: CheckExecutionClock = Object.freeze({
|
|
22
|
+
now: () => performance.now()
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export async function runScheduledChecks(
|
|
26
|
+
input: Readonly<{
|
|
27
|
+
readonly execution: ResolvedCheckExecutionInput;
|
|
28
|
+
readonly flagControlSettlements: readonly FlagControlSettlement[];
|
|
29
|
+
readonly state: CheckExecutionState;
|
|
30
|
+
}>
|
|
31
|
+
): Promise<Awaited<ReturnType<typeof runTaskGraph<boolean>>>> {
|
|
32
|
+
try {
|
|
33
|
+
return await runTaskGraph(schedulerOptionsFor(input));
|
|
34
|
+
} catch (error) {
|
|
35
|
+
throw trustedFailure(error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function schedulerOptionsFor(
|
|
40
|
+
input: Readonly<{
|
|
41
|
+
readonly execution: ResolvedCheckExecutionInput;
|
|
42
|
+
readonly flagControlSettlements: readonly FlagControlSettlement[];
|
|
43
|
+
readonly state: CheckExecutionState;
|
|
44
|
+
}>
|
|
45
|
+
): RunTaskGraphOptions<boolean> {
|
|
46
|
+
const execution = input.execution;
|
|
47
|
+
const checksByCheckId = new Map(
|
|
48
|
+
execution.checks.map((check) => [check.definition.checkId, check] as const)
|
|
49
|
+
);
|
|
50
|
+
const schedulerDiagnosticLogger =
|
|
51
|
+
execution.schedulerDiagnosticLogger ?? execution.diagnosticLogger;
|
|
52
|
+
return {
|
|
53
|
+
graph: planStaticCheckGraph(execution.checks, execution.resourceCapacities),
|
|
54
|
+
...(execution.admissionPolicy === undefined
|
|
55
|
+
? {}
|
|
56
|
+
: { admissionPolicy: execution.admissionPolicy }),
|
|
57
|
+
maxParallel: execution.maxParallel,
|
|
58
|
+
...(schedulerDiagnosticLogger === undefined
|
|
59
|
+
? {}
|
|
60
|
+
: { diagnosticLogger: schedulerDiagnosticLogger }),
|
|
61
|
+
...(execution.schedulerPerformanceDiagnostics === undefined
|
|
62
|
+
? {}
|
|
63
|
+
: { performanceDiagnostics: execution.schedulerPerformanceDiagnostics }),
|
|
64
|
+
...(execution.schedulerTerminalEffects === undefined
|
|
65
|
+
? {}
|
|
66
|
+
: { terminalEffects: execution.schedulerTerminalEffects }),
|
|
67
|
+
...(execution.onSchedulerTerminalEffectFailure === undefined
|
|
68
|
+
? {}
|
|
69
|
+
: { onTerminalEffectFailure: execution.onSchedulerTerminalEffectFailure }),
|
|
70
|
+
...(execution.onSchedulerTerminalEffectsSettled === undefined
|
|
71
|
+
? {}
|
|
72
|
+
: { onTerminalEffectsSettled: execution.onSchedulerTerminalEffectsSettled }),
|
|
73
|
+
preAdmissionTaskResults: Object.freeze(
|
|
74
|
+
input.flagControlSettlements.map((settlement) =>
|
|
75
|
+
Object.freeze({ taskId: settlement.check.definition.checkId, value: false })
|
|
76
|
+
)
|
|
77
|
+
),
|
|
78
|
+
...(execution.signal === undefined ? {} : { signal: execution.signal }),
|
|
79
|
+
isPrerequisiteSatisfied: (satisfied) => satisfied,
|
|
80
|
+
onTaskBlocked: (task, dependencyIds) => {
|
|
81
|
+
settleBlockedDependent({
|
|
82
|
+
check: requiredNormalizedCheck(checksByCheckId, task, "Blocked Task"),
|
|
83
|
+
dependencyIds,
|
|
84
|
+
state: input.state
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
execute: (task, context) =>
|
|
88
|
+
executeAdmittedCheck({
|
|
89
|
+
...input.state,
|
|
90
|
+
...admittedExecutionFacts(execution),
|
|
91
|
+
check: requiredNormalizedCheck(checksByCheckId, task, "Task graph"),
|
|
92
|
+
signal: context.signal ?? INERT_SIGNAL
|
|
93
|
+
})
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function requiredNormalizedCheck(
|
|
98
|
+
checksByCheckId: ReadonlyMap<string, NormalizedCheck>,
|
|
99
|
+
task: Readonly<{ readonly id: string }>,
|
|
100
|
+
owner: "Blocked Task" | "Task graph"
|
|
101
|
+
): NormalizedCheck {
|
|
102
|
+
const check = checksByCheckId.get(task.id);
|
|
103
|
+
if (check === undefined) {
|
|
104
|
+
throw new CheckExecutionInvariantFailure(`${owner} has no normalized Check`);
|
|
105
|
+
}
|
|
106
|
+
return check;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function admittedExecutionFacts(
|
|
110
|
+
execution: ResolvedCheckExecutionInput
|
|
111
|
+
): Omit<AdmittedCheckExecutionInput, keyof CheckExecutionState | "check" | "signal"> {
|
|
112
|
+
return {
|
|
113
|
+
clock: execution.clock ?? SYSTEM_MONOTONIC_CLOCK,
|
|
114
|
+
onAdmittedCheck: execution.onAdmittedCheck,
|
|
115
|
+
invocationId: execution.invocationId ?? DIRECT_EXECUTION_INVOCATION_ID,
|
|
116
|
+
paths: execution.paths,
|
|
117
|
+
project: execution.project
|
|
118
|
+
};
|
|
119
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CheckMessage } from "../../check/check.ts";
|
|
2
|
+
import type { HandoffProviderIdentity } from "../../check/handoff-provider-identity.ts";
|
|
2
3
|
import {
|
|
3
4
|
hasRequiredAndOptionalRecordKeys,
|
|
4
5
|
snapshotClosedRecord
|
|
@@ -11,10 +12,17 @@ import { parseCheckMessages } from "./messages.ts";
|
|
|
11
12
|
* Core; this adapter never validates outcome data or reasons.
|
|
12
13
|
*/
|
|
13
14
|
export interface ParsedCheckTerminalResult {
|
|
15
|
+
readonly handoff: ParsedCheckTerminalHandoff | undefined;
|
|
14
16
|
readonly messages: readonly CheckMessage[];
|
|
15
17
|
readonly result: StrippedTerminalResult;
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
/** A validated reference held only until its owning Core terminal settlement accepts it. */
|
|
21
|
+
export interface ParsedCheckTerminalHandoff {
|
|
22
|
+
readonly identity: HandoffProviderIdentity;
|
|
23
|
+
readonly value: object;
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
type StrippedTerminalResult =
|
|
19
27
|
| Readonly<{ readonly status: "passed" | "failed"; readonly data: unknown }>
|
|
20
28
|
| Readonly<{ readonly status: "not-applicable"; readonly reason?: unknown }>
|
|
@@ -25,50 +33,121 @@ type StrippedTerminalResult =
|
|
|
25
33
|
* closed author result. Any malformed attachment rejects the whole value so a
|
|
26
34
|
* valid prefix can never escape into lifecycle or Run result state.
|
|
27
35
|
*/
|
|
28
|
-
export function parseCheckTerminalResult(
|
|
36
|
+
export function parseCheckTerminalResult(
|
|
37
|
+
value: unknown,
|
|
38
|
+
handoffIdentity: HandoffProviderIdentity | undefined
|
|
39
|
+
): ParsedCheckTerminalResult | undefined {
|
|
29
40
|
const terminal = snapshotClosedRecord(value);
|
|
30
41
|
if (terminal === undefined || typeof terminal.status !== "string") return undefined;
|
|
31
42
|
|
|
32
|
-
const result = strippedTerminalResult(terminal);
|
|
43
|
+
const result = strippedTerminalResult(terminal, handoffIdentity);
|
|
33
44
|
if (result === undefined) return undefined;
|
|
34
45
|
const messages = parseCheckMessages(terminal.messages);
|
|
35
|
-
|
|
46
|
+
const handoff = terminalHandoff(terminal, handoffIdentity);
|
|
47
|
+
return messages === undefined || handoff === null
|
|
48
|
+
? undefined
|
|
49
|
+
: Object.freeze({ handoff, messages, result });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A declared provider result can contain an invocation-private reference. Diagnostics
|
|
54
|
+
* retain only its parsed terminal result, and represent malformed values as null.
|
|
55
|
+
*/
|
|
56
|
+
export function diagnosticCallbackResult(
|
|
57
|
+
value: unknown,
|
|
58
|
+
handoffIdentity: HandoffProviderIdentity | undefined
|
|
59
|
+
): unknown {
|
|
60
|
+
const terminal = snapshotClosedRecord(value);
|
|
61
|
+
if (
|
|
62
|
+
handoffIdentity === undefined &&
|
|
63
|
+
(terminal === undefined || !Object.hasOwn(terminal, "handoff"))
|
|
64
|
+
) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
return parseCheckTerminalResult(value, handoffIdentity)?.result ?? null;
|
|
36
68
|
}
|
|
37
69
|
|
|
38
70
|
function strippedTerminalResult(
|
|
39
|
-
terminal: Readonly<Record<string, unknown
|
|
71
|
+
terminal: Readonly<Record<string, unknown>>,
|
|
72
|
+
handoffIdentity: HandoffProviderIdentity | undefined
|
|
40
73
|
): StrippedTerminalResult | undefined {
|
|
41
74
|
switch (terminal.status) {
|
|
42
75
|
case "passed":
|
|
76
|
+
return strippedPassedTerminalResult(terminal, handoffIdentity);
|
|
43
77
|
case "failed":
|
|
44
|
-
return
|
|
45
|
-
required: ["status", "data"],
|
|
46
|
-
optional: ["messages"]
|
|
47
|
-
})
|
|
48
|
-
? Object.freeze({ status: terminal.status, data: terminal.data })
|
|
49
|
-
: undefined;
|
|
78
|
+
return strippedFailedTerminalResult(terminal);
|
|
50
79
|
case "not-applicable":
|
|
51
|
-
|
|
52
|
-
!hasRequiredAndOptionalRecordKeys(terminal, {
|
|
53
|
-
required: ["status"],
|
|
54
|
-
optional: ["reason", "messages"]
|
|
55
|
-
})
|
|
56
|
-
) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
return Object.freeze(
|
|
60
|
-
Object.hasOwn(terminal, "reason")
|
|
61
|
-
? { status: "not-applicable", reason: terminal.reason }
|
|
62
|
-
: { status: "not-applicable" }
|
|
63
|
-
);
|
|
80
|
+
return strippedNotApplicableTerminalResult(terminal);
|
|
64
81
|
case "unavailable":
|
|
65
|
-
return
|
|
66
|
-
required: ["status", "reason"],
|
|
67
|
-
optional: ["messages"]
|
|
68
|
-
})
|
|
69
|
-
? Object.freeze({ status: "unavailable", reason: terminal.reason })
|
|
70
|
-
: undefined;
|
|
82
|
+
return strippedUnavailableTerminalResult(terminal);
|
|
71
83
|
default:
|
|
72
84
|
return undefined;
|
|
73
85
|
}
|
|
74
86
|
}
|
|
87
|
+
|
|
88
|
+
/** A declared provider can only publish its reference alongside a passed data result. */
|
|
89
|
+
function strippedPassedTerminalResult(
|
|
90
|
+
terminal: Readonly<Record<string, unknown>>,
|
|
91
|
+
handoffIdentity: HandoffProviderIdentity | undefined
|
|
92
|
+
): StrippedTerminalResult | undefined {
|
|
93
|
+
const required =
|
|
94
|
+
handoffIdentity === undefined ? ["status", "data"] : ["status", "data", "handoff"];
|
|
95
|
+
return hasRequiredAndOptionalRecordKeys(terminal, { required, optional: ["messages"] })
|
|
96
|
+
? Object.freeze({ status: "passed", data: terminal.data })
|
|
97
|
+
: undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Failed results retain canonical data but never carry an invocation-private handoff. */
|
|
101
|
+
function strippedFailedTerminalResult(
|
|
102
|
+
terminal: Readonly<Record<string, unknown>>
|
|
103
|
+
): StrippedTerminalResult | undefined {
|
|
104
|
+
return hasRequiredAndOptionalRecordKeys(terminal, {
|
|
105
|
+
required: ["status", "data"],
|
|
106
|
+
optional: ["messages"]
|
|
107
|
+
})
|
|
108
|
+
? Object.freeze({ status: "failed", data: terminal.data })
|
|
109
|
+
: undefined;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function strippedNotApplicableTerminalResult(
|
|
113
|
+
terminal: Readonly<Record<string, unknown>>
|
|
114
|
+
): StrippedTerminalResult | undefined {
|
|
115
|
+
if (
|
|
116
|
+
!hasRequiredAndOptionalRecordKeys(terminal, {
|
|
117
|
+
required: ["status"],
|
|
118
|
+
optional: ["reason", "messages"]
|
|
119
|
+
})
|
|
120
|
+
) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
return Object.freeze(
|
|
124
|
+
Object.hasOwn(terminal, "reason")
|
|
125
|
+
? { status: "not-applicable", reason: terminal.reason }
|
|
126
|
+
: { status: "not-applicable" }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function strippedUnavailableTerminalResult(
|
|
131
|
+
terminal: Readonly<Record<string, unknown>>
|
|
132
|
+
): StrippedTerminalResult | undefined {
|
|
133
|
+
return hasRequiredAndOptionalRecordKeys(terminal, {
|
|
134
|
+
required: ["status", "reason"],
|
|
135
|
+
optional: ["messages"]
|
|
136
|
+
})
|
|
137
|
+
? Object.freeze({ status: "unavailable", reason: terminal.reason })
|
|
138
|
+
: undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function terminalHandoff(
|
|
142
|
+
terminal: Readonly<Record<string, unknown>>,
|
|
143
|
+
handoffIdentity: HandoffProviderIdentity | undefined
|
|
144
|
+
): ParsedCheckTerminalHandoff | null | undefined {
|
|
145
|
+
if (handoffIdentity === undefined) return undefined;
|
|
146
|
+
if (terminal.status !== "passed") return undefined;
|
|
147
|
+
if (!isHandoffReference(terminal.handoff)) return null;
|
|
148
|
+
return Object.freeze({ identity: handoffIdentity, value: terminal.handoff });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function isHandoffReference(value: unknown): value is object {
|
|
152
|
+
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
153
|
+
}
|
|
@@ -26,7 +26,7 @@ type OutcomeCounts = {
|
|
|
26
26
|
|
|
27
27
|
/** Settled Check facts consumed by completion and output publication. */
|
|
28
28
|
export type CoreExecution = Readonly<{
|
|
29
|
-
readonly aggregate: CheckAggregate
|
|
29
|
+
readonly aggregate: CheckAggregate;
|
|
30
30
|
readonly checkDurations: readonly CheckDuration[];
|
|
31
31
|
readonly checkMessages: readonly CheckRunMessage[];
|
|
32
32
|
readonly snapshot: CoreSnapshot;
|
|
@@ -136,9 +136,23 @@ export function finalizeInvocation(
|
|
|
136
136
|
return resolveFinalRunResult(candidate, invocation.outputs.value());
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/** Closes invocation-owned writers after aggregation rejects without fabricating a terminal Run result. */
|
|
140
|
+
export function closeAggregationFailure(invocation: Invocation): void {
|
|
141
|
+
try {
|
|
142
|
+
invocation.diagnosticLogging.close();
|
|
143
|
+
} catch {
|
|
144
|
+
// Cleanup must not replace the callback error returned to the caller.
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
invocation.progressRendering.close();
|
|
148
|
+
} catch {
|
|
149
|
+
// Cleanup must not replace the callback error returned to the caller.
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
139
153
|
function terminalStatusTag(candidate: NonConfigurationRunResult): string {
|
|
140
|
-
if (
|
|
141
|
-
|
|
154
|
+
if (candidate.kind === "output") return "OUTPUT";
|
|
155
|
+
if ("aggregate" in candidate) return candidate.aggregate.toUpperCase();
|
|
142
156
|
if (candidate.kind === "cancelled") return "CANCELLED";
|
|
143
157
|
return candidate.kind.toUpperCase();
|
|
144
158
|
}
|