@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
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { CheckFlagCondition } from "../../check/check.ts";
|
|
2
|
+
import { snapshotClosedArray, snapshotClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
3
|
+
|
|
4
|
+
const FLAG_CONDITION_MAX_DEPTH = 16;
|
|
5
|
+
const FLAG_CONDITION_MAX_NODES = 256;
|
|
6
|
+
|
|
7
|
+
/** Parses and snapshots one bounded recursive flag condition while retaining child order and multiplicity. */
|
|
8
|
+
export function parseFlagCondition(value: unknown): CheckFlagCondition | undefined {
|
|
9
|
+
return parseBoundedFlagCondition(value, 1, { nodes: 0 });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Checks that a closed record has no author-supplied keys outside this grammar fragment. */
|
|
13
|
+
export function hasOnlyKeys(
|
|
14
|
+
value: Readonly<Record<string, unknown>>,
|
|
15
|
+
keys: readonly string[]
|
|
16
|
+
): boolean {
|
|
17
|
+
return Object.keys(value).every((key) => keys.includes(key));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function parseBoundedFlagCondition(
|
|
21
|
+
value: unknown,
|
|
22
|
+
depth: number,
|
|
23
|
+
state: { nodes: number }
|
|
24
|
+
): CheckFlagCondition | undefined {
|
|
25
|
+
if (exceedsFlagConditionBounds(depth, state)) return undefined;
|
|
26
|
+
if (isNonEmptyIdentifier(value)) return value;
|
|
27
|
+
const condition = snapshotClosedRecord(value);
|
|
28
|
+
const kind = condition?.kind;
|
|
29
|
+
if (condition === undefined || typeof kind !== "string") return undefined;
|
|
30
|
+
return kind === "not"
|
|
31
|
+
? parseFlagNegationCondition(condition, depth, state)
|
|
32
|
+
: parseFlagConditionSet(condition, kind, depth, state);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function exceedsFlagConditionBounds(depth: number, state: { nodes: number }): boolean {
|
|
36
|
+
state.nodes += 1;
|
|
37
|
+
return depth > FLAG_CONDITION_MAX_DEPTH || state.nodes > FLAG_CONDITION_MAX_NODES;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function parseFlagNegationCondition(
|
|
41
|
+
condition: Readonly<Record<string, unknown>>,
|
|
42
|
+
depth: number,
|
|
43
|
+
state: { nodes: number }
|
|
44
|
+
): CheckFlagCondition | undefined {
|
|
45
|
+
if (!hasOnlyKeys(condition, ["condition", "kind"]) || !Object.hasOwn(condition, "condition")) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const child = parseBoundedFlagCondition(condition.condition, depth + 1, state);
|
|
49
|
+
return child === undefined ? undefined : Object.freeze({ condition: child, kind: "not" });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function parseFlagConditionSet(
|
|
53
|
+
condition: Readonly<Record<string, unknown>>,
|
|
54
|
+
kind: string,
|
|
55
|
+
depth: number,
|
|
56
|
+
state: { nodes: number }
|
|
57
|
+
): CheckFlagCondition | undefined {
|
|
58
|
+
if (!isFlagConditionSetKind(kind)) return undefined;
|
|
59
|
+
const conditions = parseFlagConditionChildren(condition, depth, state);
|
|
60
|
+
return conditions === undefined ? undefined : Object.freeze({ kind, conditions });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function parseFlagConditionChildren(
|
|
64
|
+
condition: Readonly<Record<string, unknown>>,
|
|
65
|
+
depth: number,
|
|
66
|
+
state: { nodes: number }
|
|
67
|
+
): readonly [CheckFlagCondition, ...CheckFlagCondition[]] | undefined {
|
|
68
|
+
if (!hasOnlyKeys(condition, ["conditions", "kind"]) || !Object.hasOwn(condition, "conditions")) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
const children = snapshotClosedArray(condition.conditions);
|
|
72
|
+
if (children === undefined || children.length === 0) return undefined;
|
|
73
|
+
const normalized: CheckFlagCondition[] = [];
|
|
74
|
+
for (const child of children) {
|
|
75
|
+
const parsed = parseBoundedFlagCondition(child, depth + 1, state);
|
|
76
|
+
if (parsed === undefined) return undefined;
|
|
77
|
+
normalized.push(parsed);
|
|
78
|
+
}
|
|
79
|
+
const [firstCondition, ...remainingConditions] = normalized;
|
|
80
|
+
return firstCondition === undefined
|
|
81
|
+
? undefined
|
|
82
|
+
: Object.freeze([firstCondition, ...remainingConditions]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function isNonEmptyIdentifier(value: unknown): value is string {
|
|
86
|
+
return typeof value === "string" && value.length > 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function isFlagConditionSetKind(
|
|
90
|
+
value: string
|
|
91
|
+
): value is "all" | "any" | "none" | "not-all" | "exactly-one" {
|
|
92
|
+
return (
|
|
93
|
+
value === "all" ||
|
|
94
|
+
value === "any" ||
|
|
95
|
+
value === "none" ||
|
|
96
|
+
value === "not-all" ||
|
|
97
|
+
value === "exactly-one"
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { inherit, type Check, type InheritableCheckCollection } from "../../check/check.ts";
|
|
2
|
+
import { bindHandoffProviderIdentity } from "../../check/handoff-provider-identity.ts";
|
|
2
3
|
import type { ParsedCheck, ParsedCheckCollection, ParsedCheckTree } from "./authoring.ts";
|
|
3
4
|
|
|
4
5
|
/** Rebuilds the validated public authoring shape without retaining untyped input. */
|
|
@@ -16,8 +17,8 @@ function materializeCheck(check: ParsedCheck): Check {
|
|
|
16
17
|
const enabledByFlags = check.enabledByFlags;
|
|
17
18
|
const mutex = materializeCollection(check.mutex);
|
|
18
19
|
const observes = materializeCollection(check.observes);
|
|
19
|
-
const
|
|
20
|
-
const
|
|
20
|
+
const omitQuietPassedRow = check.omitQuietPassedRow;
|
|
21
|
+
const preparation = check.prepare;
|
|
21
22
|
const scheduling = {
|
|
22
23
|
...(check.admissionPriority === undefined
|
|
23
24
|
? {}
|
|
@@ -30,9 +31,9 @@ function materializeCheck(check: ParsedCheck): Check {
|
|
|
30
31
|
};
|
|
31
32
|
if (
|
|
32
33
|
check.definition === null ||
|
|
33
|
-
check.
|
|
34
|
+
check.execute === null ||
|
|
34
35
|
check.options === null ||
|
|
35
|
-
|
|
36
|
+
omitQuietPassedRow === null
|
|
36
37
|
) {
|
|
37
38
|
return Object.freeze({
|
|
38
39
|
checkId: check.checkId,
|
|
@@ -41,18 +42,21 @@ function materializeCheck(check: ParsedCheck): Check {
|
|
|
41
42
|
...scheduling
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
+
const materialized = Object.freeze({
|
|
45
46
|
checkId: check.checkId,
|
|
46
47
|
checks,
|
|
47
48
|
displayName: check.displayName,
|
|
48
49
|
...(enabledByFlags === null ? {} : { enabledByFlags }),
|
|
49
|
-
|
|
50
|
+
execute: check.execute,
|
|
51
|
+
...(check.handoff === null ? {} : { handoff: true }),
|
|
50
52
|
...(check.parseData === null ? {} : { parseData: check.parseData }),
|
|
51
53
|
options: check.options,
|
|
52
|
-
...(
|
|
54
|
+
...(preparation === null ? {} : { prepare: preparation }),
|
|
53
55
|
...scheduling,
|
|
54
|
-
|
|
56
|
+
...(omitQuietPassedRow ? { omitQuietPassedRow: true as const } : {})
|
|
55
57
|
});
|
|
58
|
+
if (check.handoff !== null) bindHandoffProviderIdentity(materialized, check.handoff);
|
|
59
|
+
return materialized;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
function materializeCollection(
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { CheckDescriptor } from "../../check/descriptor.ts";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
CheckFlagEnablement,
|
|
5
|
-
CheckPreflight,
|
|
6
|
-
CheckVisibility
|
|
7
|
-
} from "../../check/check.ts";
|
|
2
|
+
import type { Check, CheckPreparation, CheckFlagEnablement } from "../../check/check.ts";
|
|
3
|
+
import type { HandoffProviderIdentity } from "../../check/handoff-provider-identity.ts";
|
|
8
4
|
import {
|
|
9
5
|
parseCheckTreeAuthoring,
|
|
10
6
|
type MeaninglessCheckWarning,
|
|
@@ -21,14 +17,15 @@ export interface ResolvedCheckTreeLeaf {
|
|
|
21
17
|
readonly definition: CheckDescriptor;
|
|
22
18
|
readonly dependsOn: readonly string[];
|
|
23
19
|
readonly enabledByFlags?: CheckFlagEnablement;
|
|
24
|
-
readonly
|
|
20
|
+
readonly execute: NonNullable<Check["execute"]>;
|
|
21
|
+
readonly handoff?: HandoffProviderIdentity;
|
|
25
22
|
readonly maxParallel: number;
|
|
26
23
|
readonly mutex: readonly string[];
|
|
27
24
|
readonly observes: readonly string[];
|
|
28
25
|
readonly options: object;
|
|
29
|
-
readonly
|
|
26
|
+
readonly prepare?: CheckPreparation;
|
|
30
27
|
readonly resourceClaims: ResourceUnitMapping;
|
|
31
|
-
readonly
|
|
28
|
+
readonly omitQuietPassedRow: boolean;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
export interface ResolvedCheckTree {
|
|
@@ -116,26 +113,27 @@ function resolvedLeafFor(
|
|
|
116
113
|
check: ParsedCheck,
|
|
117
114
|
scheduling: InheritedScheduling
|
|
118
115
|
): ResolvedCheckTreeLeaf | undefined {
|
|
119
|
-
const
|
|
116
|
+
const omitQuietPassedRow = check.omitQuietPassedRow;
|
|
120
117
|
if (
|
|
121
|
-
check.
|
|
118
|
+
check.execute !== null &&
|
|
122
119
|
check.definition !== null &&
|
|
123
120
|
check.options !== null &&
|
|
124
|
-
|
|
121
|
+
omitQuietPassedRow !== null
|
|
125
122
|
) {
|
|
126
123
|
return Object.freeze({
|
|
127
124
|
admissionPriority: scheduling.admissionPriority,
|
|
128
125
|
definition: check.definition,
|
|
129
126
|
dependsOn: scheduling.dependsOn,
|
|
130
127
|
...(check.enabledByFlags === null ? {} : { enabledByFlags: check.enabledByFlags }),
|
|
131
|
-
|
|
128
|
+
execute: check.execute,
|
|
129
|
+
...(check.handoff === null ? {} : { handoff: check.handoff }),
|
|
132
130
|
maxParallel: scheduling.maxParallel,
|
|
133
131
|
mutex: scheduling.mutex,
|
|
134
132
|
observes: scheduling.observes,
|
|
135
133
|
options: check.options,
|
|
136
|
-
...(check.
|
|
134
|
+
...(check.prepare === null ? {} : { prepare: check.prepare }),
|
|
137
135
|
resourceClaims: scheduling.resourceClaims,
|
|
138
|
-
|
|
136
|
+
omitQuietPassedRow
|
|
139
137
|
});
|
|
140
138
|
}
|
|
141
139
|
return undefined;
|
|
@@ -9,20 +9,27 @@ import type {
|
|
|
9
9
|
} from "./project-definition.ts";
|
|
10
10
|
import { resolveProgressRenderingOutput } from "./output-defaults.ts";
|
|
11
11
|
import { isNonArrayRecord } from "../data-boundary/value-shapes.ts";
|
|
12
|
+
import type { NormalizedProjectChangesConfiguration } from "./project-changes.ts";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Produces the immutable, callback-free Definition identity consumed by fingerprinting.
|
|
15
16
|
*/
|
|
16
17
|
export function createDeclarativeProjectSnapshot(
|
|
17
|
-
definition: ProjectDefinition,
|
|
18
|
+
definition: Omit<ProjectDefinition, "changes"> & {
|
|
19
|
+
readonly changes?: NormalizedProjectChangesConfiguration;
|
|
20
|
+
},
|
|
18
21
|
checks: readonly NormalizedCheck[]
|
|
19
22
|
): DeclarativeProjectSnapshot {
|
|
20
23
|
const declarations = checks
|
|
21
|
-
.map(
|
|
24
|
+
.map(
|
|
25
|
+
({ execute: _execution, handoff: _handoff, prepare: _preparation, ...declaration }) =>
|
|
26
|
+
declaration
|
|
27
|
+
)
|
|
22
28
|
.sort((left, right) => compareText(left.definition.checkId, right.definition.checkId));
|
|
23
29
|
return deepFreeze({
|
|
24
30
|
apiVersion: definition.apiVersion,
|
|
25
31
|
checks: declarations,
|
|
32
|
+
...(definition.changes === undefined ? {} : { changes: definition.changes }),
|
|
26
33
|
outputs: declarativeOutputs(definition),
|
|
27
34
|
scheduler: Object.freeze({
|
|
28
35
|
admissionPolicy: declarativeAdmissionPolicy(definition.scheduler.admissionPolicy),
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import {
|
|
2
|
+
hasExactPlainRecordKeys,
|
|
3
|
+
snapshotClosedArray,
|
|
4
|
+
snapshotClosedPolicyRecord,
|
|
5
|
+
snapshotClosedRecord
|
|
6
|
+
} from "../data-boundary/closed-values.ts";
|
|
7
|
+
|
|
8
|
+
/** Project 自有的 Git comparison,用于为一次 Run 推导 change flags。 */
|
|
9
|
+
export interface ProjectChangeSource {
|
|
10
|
+
/** 作为 comparison base 的 Git revision。 */
|
|
11
|
+
readonly compareWith: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** 一个 change flag 的 project-root-relative、exclude-first glob region。 */
|
|
15
|
+
export interface ProjectChangeFlagRegion {
|
|
16
|
+
/** 可省略的排除 glob;省略等同空数组,显式 undefined 不是合法数组。 */
|
|
17
|
+
readonly exclude?: readonly string[];
|
|
18
|
+
readonly include: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** 由 Project Definition 拥有的静态 change preparation 配置。 */
|
|
22
|
+
export interface ProjectChangesConfiguration {
|
|
23
|
+
readonly source: ProjectChangeSource;
|
|
24
|
+
/** 至少一个非空 author ID 到其匹配 region 的映射。 */
|
|
25
|
+
readonly flags: Readonly<Record<string, ProjectChangeFlagRegion>>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Definition 已验证、补齐并冻结的 region;Run 不再解释 authoring defaults。 */
|
|
29
|
+
export interface NormalizedProjectChangeFlagRegion extends ProjectChangeFlagRegion {
|
|
30
|
+
readonly exclude: readonly string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 仅供 Definition snapshot 与 Run 消费的完整 change 配置。 */
|
|
34
|
+
export interface NormalizedProjectChangesConfiguration extends ProjectChangesConfiguration {
|
|
35
|
+
readonly flags: Readonly<Record<string, NormalizedProjectChangeFlagRegion>>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 解析并冻结 change preparation 的 closed Definition grammar。
|
|
40
|
+
* Runtime Git acquisition 与 region matching 有各自的 Run owner,不在此边界执行。
|
|
41
|
+
*/
|
|
42
|
+
export function parseProjectChangesConfiguration(
|
|
43
|
+
value: unknown
|
|
44
|
+
): NormalizedProjectChangesConfiguration | undefined {
|
|
45
|
+
const data = snapshotClosedRecord(value);
|
|
46
|
+
if (data === undefined || !hasExactPlainRecordKeys(data, ["flags", "source"])) return undefined;
|
|
47
|
+
const source = parseSource(data.source);
|
|
48
|
+
const flags = parseFlags(data.flags);
|
|
49
|
+
return source === undefined || flags === undefined ? undefined : Object.freeze({ flags, source });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function parseSource(value: unknown): ProjectChangeSource | undefined {
|
|
53
|
+
const source = snapshotClosedRecord(value);
|
|
54
|
+
if (
|
|
55
|
+
source === undefined ||
|
|
56
|
+
!hasExactPlainRecordKeys(source, ["compareWith"]) ||
|
|
57
|
+
!isGitComparisonRevision(source.compareWith)
|
|
58
|
+
) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
return Object.freeze({ compareWith: source.compareWith });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function parseFlags(
|
|
65
|
+
value: unknown
|
|
66
|
+
): Readonly<Record<string, NormalizedProjectChangeFlagRegion>> | undefined {
|
|
67
|
+
const flags = snapshotClosedRecord(value);
|
|
68
|
+
if (flags === undefined || Object.keys(flags).length === 0) return undefined;
|
|
69
|
+
const parsed: Record<string, NormalizedProjectChangeFlagRegion> = {};
|
|
70
|
+
for (const [flagId, region] of Object.entries(flags)) {
|
|
71
|
+
if (!isNonEmptyString(flagId)) return undefined;
|
|
72
|
+
const normalizedRegion = parseRegion(region);
|
|
73
|
+
if (normalizedRegion === undefined) return undefined;
|
|
74
|
+
Object.defineProperty(parsed, flagId, {
|
|
75
|
+
configurable: false,
|
|
76
|
+
enumerable: true,
|
|
77
|
+
value: normalizedRegion,
|
|
78
|
+
writable: false
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return Object.freeze(parsed);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function parseRegion(value: unknown): NormalizedProjectChangeFlagRegion | undefined {
|
|
85
|
+
const region = snapshotClosedPolicyRecord(value, {
|
|
86
|
+
optional: ["exclude"],
|
|
87
|
+
required: ["include"]
|
|
88
|
+
});
|
|
89
|
+
if (region === undefined) return undefined;
|
|
90
|
+
const exclude = Object.hasOwn(region, "exclude")
|
|
91
|
+
? parseStringArray(region.exclude)
|
|
92
|
+
: Object.freeze([]);
|
|
93
|
+
const include = parseStringArray(region.include);
|
|
94
|
+
return exclude === undefined || include === undefined
|
|
95
|
+
? undefined
|
|
96
|
+
: Object.freeze({ exclude, include });
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function parseStringArray(value: unknown): readonly string[] | undefined {
|
|
100
|
+
const values = snapshotClosedArray(value);
|
|
101
|
+
return values === undefined || !values.every(isNonEmptyString)
|
|
102
|
+
? undefined
|
|
103
|
+
: Object.freeze([...values]);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function isGitComparisonRevision(value: unknown): value is string {
|
|
107
|
+
return isNonEmptyString(value) && !value.startsWith("-") && !value.includes("\0");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function isNonEmptyString(value: unknown): value is string {
|
|
111
|
+
return typeof value === "string" && value.length > 0;
|
|
112
|
+
}
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
type ProjectDefinitionValidationResult,
|
|
8
8
|
type AdmissionPolicy,
|
|
9
9
|
type CustomAdmissionStrategy,
|
|
10
|
-
type
|
|
10
|
+
type NormalizedCheck,
|
|
11
|
+
type SchedulerTerminalEffect,
|
|
11
12
|
type SchedulerPolicy
|
|
12
13
|
} from "./project-definition.ts";
|
|
13
14
|
import {
|
|
@@ -16,13 +17,20 @@ import {
|
|
|
16
17
|
snapshotClosedRecord
|
|
17
18
|
} from "../data-boundary/closed-values.ts";
|
|
18
19
|
import { snapshotResourceUnitMapping } from "./resource-unit-mapping.ts";
|
|
20
|
+
import { parseProjectChangesConfiguration } from "./project-changes.ts";
|
|
19
21
|
|
|
20
22
|
type DefinitionValidationResult<T> = Readonly<
|
|
21
23
|
| { readonly ok: true; readonly value: T }
|
|
22
24
|
| { readonly ok: false; readonly error: ProjectDefinitionDiagnostic }
|
|
23
25
|
>;
|
|
24
26
|
|
|
25
|
-
const PROJECT_DEFINITION_KEYS = [
|
|
27
|
+
const PROJECT_DEFINITION_KEYS = [
|
|
28
|
+
"apiVersion",
|
|
29
|
+
"changes",
|
|
30
|
+
"checks",
|
|
31
|
+
"outputs",
|
|
32
|
+
"scheduler"
|
|
33
|
+
] as const;
|
|
26
34
|
|
|
27
35
|
/**
|
|
28
36
|
* Validates one closed Definition before Run can invoke any project callback.
|
|
@@ -47,6 +55,12 @@ function parseProjectDefinitionFields(
|
|
|
47
55
|
): ProjectDefinitionValidationResult {
|
|
48
56
|
const scheduler = parseScheduler(data.scheduler);
|
|
49
57
|
if (scheduler === undefined) return invalidDefinition("definition.scheduler");
|
|
58
|
+
const changes = Object.hasOwn(data, "changes")
|
|
59
|
+
? parseProjectChangesConfiguration(data.changes)
|
|
60
|
+
: undefined;
|
|
61
|
+
if (Object.hasOwn(data, "changes") && changes === undefined) {
|
|
62
|
+
return invalidDefinition("definition.changes");
|
|
63
|
+
}
|
|
50
64
|
const checks = snapshotClosedArray(data.checks);
|
|
51
65
|
if (checks === undefined) return invalidDefinition("definition.checks");
|
|
52
66
|
const parsedChecks = parseCheckTreeAuthoring(checks);
|
|
@@ -57,6 +71,9 @@ function parseProjectDefinitionFields(
|
|
|
57
71
|
scheduler.resourceCapacities
|
|
58
72
|
);
|
|
59
73
|
if (tree === undefined) return invalidDefinition("definition.checks");
|
|
74
|
+
if (!hasOnlyKnownChangeFlagReferences(tree.leaves, changes)) {
|
|
75
|
+
return invalidDefinition("definition.checks");
|
|
76
|
+
}
|
|
60
77
|
const outputs = parseOutputs(data.outputs);
|
|
61
78
|
if (outputs === undefined) return invalidDefinition("definition.outputs");
|
|
62
79
|
return Object.freeze({
|
|
@@ -64,6 +81,7 @@ function parseProjectDefinitionFields(
|
|
|
64
81
|
value: {
|
|
65
82
|
apiVersion: "1" as const,
|
|
66
83
|
checks: materializeCheckTreeAuthoring(parsedChecks),
|
|
84
|
+
...(changes === undefined ? {} : { changes }),
|
|
67
85
|
outputs,
|
|
68
86
|
scheduler
|
|
69
87
|
},
|
|
@@ -71,6 +89,36 @@ function parseProjectDefinitionFields(
|
|
|
71
89
|
});
|
|
72
90
|
}
|
|
73
91
|
|
|
92
|
+
function hasOnlyKnownChangeFlagReferences(
|
|
93
|
+
checks: readonly NormalizedCheck[],
|
|
94
|
+
changes: ReturnType<typeof parseProjectChangesConfiguration>
|
|
95
|
+
): boolean {
|
|
96
|
+
return checks.every(
|
|
97
|
+
(check) =>
|
|
98
|
+
check.enabledByFlags === undefined ||
|
|
99
|
+
hasOnlyKnownChangeFlagConditionReferences(check.enabledByFlags.when, changes)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function hasOnlyKnownChangeFlagConditionReferences(
|
|
104
|
+
condition: import("../check/check.ts").CheckFlagCondition,
|
|
105
|
+
changes: ReturnType<typeof parseProjectChangesConfiguration>
|
|
106
|
+
): boolean {
|
|
107
|
+
if (typeof condition === "string") {
|
|
108
|
+
const prefix = "vibe-check:change:";
|
|
109
|
+
return (
|
|
110
|
+
!condition.startsWith(prefix) ||
|
|
111
|
+
(changes !== undefined && Object.hasOwn(changes.flags, condition.slice(prefix.length)))
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
if (condition.kind === "not") {
|
|
115
|
+
return hasOnlyKnownChangeFlagConditionReferences(condition.condition, changes);
|
|
116
|
+
}
|
|
117
|
+
return condition.conditions.every((child) =>
|
|
118
|
+
hasOnlyKnownChangeFlagConditionReferences(child, changes)
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
74
122
|
function exactProjectDefinition(
|
|
75
123
|
value: unknown
|
|
76
124
|
): DefinitionValidationResult<Readonly<Record<string, unknown>>> {
|
|
@@ -101,7 +149,7 @@ function exactRecord(
|
|
|
101
149
|
|
|
102
150
|
function parseScheduler(value: unknown): SchedulerPolicy | undefined {
|
|
103
151
|
const data = snapshotClosedPolicyRecord(value, {
|
|
104
|
-
optional: ["admissionPolicy", "
|
|
152
|
+
optional: ["admissionPolicy", "terminalEffects", "resourceCapacities"],
|
|
105
153
|
required: ["maxParallel"]
|
|
106
154
|
});
|
|
107
155
|
if (data === undefined) return undefined;
|
|
@@ -109,33 +157,33 @@ function parseScheduler(value: unknown): SchedulerPolicy | undefined {
|
|
|
109
157
|
? parseAdmissionPolicy(data.admissionPolicy)
|
|
110
158
|
: Object.freeze({ kind: "static" as const });
|
|
111
159
|
if (admissionPolicy === undefined) return undefined;
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
160
|
+
const terminalEffects = parseTerminalEffects(data.terminalEffects);
|
|
161
|
+
if (terminalEffects === undefined) return undefined;
|
|
114
162
|
const resourceCapacities = snapshotResourceUnitMapping(
|
|
115
163
|
Object.hasOwn(data, "resourceCapacities") ? data.resourceCapacities : {}
|
|
116
164
|
);
|
|
117
165
|
if (resourceCapacities === undefined) return undefined;
|
|
118
166
|
const maxParallel = positiveSafeInteger(data.maxParallel);
|
|
119
167
|
if (maxParallel === undefined) return undefined;
|
|
120
|
-
return Object.freeze({ admissionPolicy, maxParallel,
|
|
168
|
+
return Object.freeze({ admissionPolicy, maxParallel, terminalEffects, resourceCapacities });
|
|
121
169
|
}
|
|
122
170
|
|
|
123
171
|
function positiveSafeInteger(value: unknown): number | undefined {
|
|
124
172
|
return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : undefined;
|
|
125
173
|
}
|
|
126
174
|
|
|
127
|
-
function
|
|
175
|
+
function parseTerminalEffects(value: unknown): readonly SchedulerTerminalEffect[] | undefined {
|
|
128
176
|
if (value === undefined) return Object.freeze([]);
|
|
129
177
|
if (!Array.isArray(value)) return undefined;
|
|
130
|
-
const hooks:
|
|
178
|
+
const hooks: SchedulerTerminalEffect[] = [];
|
|
131
179
|
for (const hook of value) {
|
|
132
|
-
if (!
|
|
180
|
+
if (!isTerminalEffect(hook)) return undefined;
|
|
133
181
|
hooks.push(hook);
|
|
134
182
|
}
|
|
135
183
|
return Object.freeze(hooks);
|
|
136
184
|
}
|
|
137
185
|
|
|
138
|
-
function
|
|
186
|
+
function isTerminalEffect(value: unknown): value is SchedulerTerminalEffect {
|
|
139
187
|
return typeof value === "function";
|
|
140
188
|
}
|
|
141
189
|
|