@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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
canonicalJsonText,
|
|
4
4
|
type CanonicalJsonObject,
|
|
5
5
|
type CanonicalJsonValue
|
|
6
|
-
} from "
|
|
6
|
+
} from "../../data-boundary/canonical-data.ts";
|
|
7
7
|
|
|
8
8
|
/** 由采用方声明、用于匹配一个 finding 的语义身份与豁免理由。 */
|
|
9
9
|
export interface FindingWaiver<Identity> {
|
|
@@ -61,8 +61,8 @@ export interface ReconcileFindingWaiversOptions<Finding, Identity> {
|
|
|
61
61
|
readonly findings: readonly Finding[];
|
|
62
62
|
/** 从完整 finding 提取调用方选择的稳定语义身份。 */
|
|
63
63
|
readonly identify: (finding: Finding) => Identity;
|
|
64
|
-
/**
|
|
65
|
-
readonly waivers
|
|
64
|
+
/** 要对账的 waiver;省略或 undefined 等同于空数组,仍验证全部 finding identity。 */
|
|
65
|
+
readonly waivers?: readonly FindingWaiver<Identity>[] | undefined;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/** 独立 waiver reconciliation 的完整输出,保留 finding 处置和每项配置审计。 */
|
|
@@ -96,7 +96,13 @@ export function reconcileFindingWaivers<Finding, Identity>(
|
|
|
96
96
|
const matchedWaiverIndexes = options.findings.map((finding) => {
|
|
97
97
|
const identity = canonicalIdentity(options.identify(finding), "finding identity");
|
|
98
98
|
const waiverIndex = waiverIndexesByIdentity.get(identity);
|
|
99
|
-
if (waiverIndex !== undefined)
|
|
99
|
+
if (waiverIndex !== undefined) {
|
|
100
|
+
const matchCount = matchCounts[waiverIndex];
|
|
101
|
+
if (matchCount === undefined) {
|
|
102
|
+
throw new Error(`Finding waiver match index is out of range: ${waiverIndex}`);
|
|
103
|
+
}
|
|
104
|
+
matchCounts[waiverIndex] = matchCount + 1;
|
|
105
|
+
}
|
|
100
106
|
return waiverIndex;
|
|
101
107
|
});
|
|
102
108
|
const waiverAudits = Object.freeze(
|
|
@@ -118,9 +124,7 @@ export function reconcileFindingWaivers<Finding, Identity>(
|
|
|
118
124
|
return Object.freeze({ findings, waiverAudits });
|
|
119
125
|
}
|
|
120
126
|
|
|
121
|
-
function materializeWaivers
|
|
122
|
-
waivers: readonly FindingWaiver<Identity>[]
|
|
123
|
-
): readonly MaterializedFindingWaiver[] {
|
|
127
|
+
function materializeWaivers(waivers: unknown = []): readonly MaterializedFindingWaiver[] {
|
|
124
128
|
const canonicalWaivers = canonicalizeJsonValue(waivers);
|
|
125
129
|
if (canonicalWaivers === undefined || !isCanonicalArray(canonicalWaivers)) {
|
|
126
130
|
throw new TypeError("Finding waivers must be canonical JSON arrays");
|
|
@@ -140,7 +144,11 @@ function materializeWaiver(value: CanonicalJsonValue): MaterializedFindingWaiver
|
|
|
140
144
|
if (typeof reason !== "string" || reason.length === 0) {
|
|
141
145
|
throw new TypeError("Finding waiver reasons must be non-empty strings");
|
|
142
146
|
}
|
|
143
|
-
|
|
147
|
+
const identity = value.identity;
|
|
148
|
+
if (identity === undefined) {
|
|
149
|
+
throw new TypeError("Finding waiver identity must be present");
|
|
150
|
+
}
|
|
151
|
+
return Object.freeze({ identity, reason });
|
|
144
152
|
}
|
|
145
153
|
|
|
146
154
|
function isCanonicalObject(value: CanonicalJsonValue): value is CanonicalJsonObject {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
canonicalJsonBytes,
|
|
5
|
+
type CanonicalJsonValue
|
|
6
|
+
} from "../../../data-boundary/canonical-data.ts";
|
|
4
7
|
import {
|
|
5
8
|
SCHEDULER_HISTORY_MODEL_VERSION,
|
|
6
9
|
schedulerHistorySeries,
|
|
@@ -48,7 +51,7 @@ export function createSchedulerHistoryIdentity(input: {
|
|
|
48
51
|
});
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
/** Forms learned means first, then one project median prior, without invoking
|
|
54
|
+
/** Forms learned means first, then one project median prior, without invoking preparation. */
|
|
52
55
|
export function createSchedulerPredictionSnapshot(
|
|
53
56
|
history: SchedulerHistoryModel,
|
|
54
57
|
inputs: readonly SchedulerPredictionInput[],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SchedulerMeasurementContext } from "
|
|
1
|
+
import type { SchedulerMeasurementContext } from "../../../project-definition/project-definition.ts";
|
|
2
2
|
import { recordSchedulerHistory, type SchedulerHistoryRecordingObservation } from "./recording.ts";
|
|
3
3
|
import {
|
|
4
4
|
createSchedulerPredictionSnapshot,
|
|
@@ -54,8 +54,10 @@ export async function prepareSchedulerDurationModel(input: {
|
|
|
54
54
|
prediction,
|
|
55
55
|
rawMeasurement: terminalMeasurement.rawMeasurement,
|
|
56
56
|
settledTasks: terminalMeasurement.execution.settledTasks,
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
...(input.maxSamplesPerSeries === undefined
|
|
58
|
+
? {}
|
|
59
|
+
: { maxSamplesPerSeries: input.maxSamplesPerSeries }),
|
|
60
|
+
...(input.maxSeries === undefined ? {} : { maxSeries: input.maxSeries })
|
|
59
61
|
});
|
|
60
62
|
const writeObservation = await writeSchedulerHistory(
|
|
61
63
|
input.stateDirectory,
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
SchedulerMeasurementAdmission,
|
|
3
|
-
SchedulerRawMeasurement
|
|
4
|
-
} from "../../project-definition/project-definition.ts";
|
|
1
|
+
import type { SchedulerRawMeasurement } from "../../../project-definition/project-definition.ts";
|
|
5
2
|
import {
|
|
6
3
|
freezeSchedulerHistoryModel,
|
|
7
4
|
isBoundedDurationMs,
|
|
@@ -13,6 +10,10 @@ import {
|
|
|
13
10
|
} from "./bounded-history.ts";
|
|
14
11
|
import { predictionForTask, type SchedulerPredictionSnapshot } from "./prediction.ts";
|
|
15
12
|
|
|
13
|
+
type SchedulerMeasurementAdmission = NonNullable<
|
|
14
|
+
SchedulerRawMeasurement["timingFacts"]
|
|
15
|
+
>["admissions"][number];
|
|
16
|
+
|
|
16
17
|
export type SchedulerHistoryRecordingObservation =
|
|
17
18
|
| Readonly<{
|
|
18
19
|
readonly acceptedSampleCount: number;
|
package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts
RENAMED
|
@@ -2,12 +2,11 @@ import { promises as fs } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
|
|
5
|
-
import { canonicalJsonText } from "
|
|
5
|
+
import { canonicalJsonText } from "../../../data-boundary/canonical-data.ts";
|
|
6
6
|
import {
|
|
7
|
-
hasExactPlainRecordKeys,
|
|
8
7
|
snapshotClosedArray,
|
|
9
|
-
|
|
10
|
-
} from "
|
|
8
|
+
snapshotExactClosedRecord
|
|
9
|
+
} from "../../../data-boundary/closed-values.ts";
|
|
11
10
|
import {
|
|
12
11
|
emptySchedulerHistory,
|
|
13
12
|
freezeSchedulerHistoryModel,
|
|
@@ -126,8 +125,8 @@ type ParsedEnvelope =
|
|
|
126
125
|
| Readonly<{ readonly kind: "incompatible" }>;
|
|
127
126
|
|
|
128
127
|
function parseSchedulerHistoryEnvelope(value: unknown): ParsedEnvelope {
|
|
129
|
-
const envelope =
|
|
130
|
-
if (envelope === undefined
|
|
128
|
+
const envelope = snapshotExactClosedRecord(value, ENVELOPE_KEYS);
|
|
129
|
+
if (envelope === undefined) {
|
|
131
130
|
return Object.freeze({ kind: "invalid" });
|
|
132
131
|
}
|
|
133
132
|
if (
|
|
@@ -179,8 +178,8 @@ function parseSeries(value: unknown): readonly SchedulerHistorySeries[] | undefi
|
|
|
179
178
|
}
|
|
180
179
|
|
|
181
180
|
function parseSeriesEntry(value: unknown): SchedulerHistorySeries | undefined {
|
|
182
|
-
const record =
|
|
183
|
-
if (record === undefined
|
|
181
|
+
const record = snapshotExactClosedRecord(value, SERIES_KEYS);
|
|
182
|
+
if (record === undefined) return undefined;
|
|
184
183
|
if (
|
|
185
184
|
!isSchedulerHistoryIdentityDigest(record.identityDigest) ||
|
|
186
185
|
!isObservationSequence(record.latestObservationSequence)
|
|
@@ -223,8 +222,8 @@ function parseSamples(value: unknown): readonly SchedulerHistorySample[] | undef
|
|
|
223
222
|
}
|
|
224
223
|
|
|
225
224
|
function parseSample(value: unknown): SchedulerHistorySample | undefined {
|
|
226
|
-
const record =
|
|
227
|
-
if (record === undefined
|
|
225
|
+
const record = snapshotExactClosedRecord(value, SAMPLE_KEYS);
|
|
226
|
+
if (record === undefined) return undefined;
|
|
228
227
|
if (
|
|
229
228
|
!isBoundedDurationMs(record.durationMs) ||
|
|
230
229
|
!isPositiveObservationSequence(record.observationSequence) ||
|
package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AdmissionPolicyContext,
|
|
3
3
|
SchedulerGraphSnapshot
|
|
4
|
-
} from "
|
|
4
|
+
} from "../../project-definition/project-definition.ts";
|
|
5
5
|
|
|
6
6
|
type Candidate = AdmissionPolicyContext["candidates"][number];
|
|
7
7
|
type Task = SchedulerGraphSnapshot["tasks"][number];
|
|
@@ -44,8 +44,7 @@ function isTightening(
|
|
|
44
44
|
): boolean {
|
|
45
45
|
const scope = scopeForCandidate(candidate, taskById, scopeById);
|
|
46
46
|
return (
|
|
47
|
-
scope
|
|
48
|
-
scope.activationTaskIds.includes(candidate.taskId) &&
|
|
47
|
+
scope?.activationTaskIds.includes(candidate.taskId) === true &&
|
|
49
48
|
!activeScopeIds.has(scope.id) &&
|
|
50
49
|
scope.maxParallel < maxParallel
|
|
51
50
|
);
|
package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts
RENAMED
|
@@ -2,7 +2,7 @@ import type {
|
|
|
2
2
|
AdmissionPolicyContext,
|
|
3
3
|
AdmissionProposal,
|
|
4
4
|
SchedulerGraphSnapshot
|
|
5
|
-
} from "
|
|
5
|
+
} from "../../project-definition/project-definition.ts";
|
|
6
6
|
import { learnedSelectionLayers, scopeForCandidate } from "./selection-layers.ts";
|
|
7
7
|
|
|
8
8
|
type Candidate = AdmissionPolicyContext["candidates"][number];
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { isAbsolute } from "node:path";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
canonicalizeJsonValue,
|
|
5
|
+
type CanonicalJsonValue
|
|
6
|
+
} from "../../data-boundary/canonical-data.ts";
|
|
4
7
|
import type {
|
|
5
8
|
AdmissionPolicyContext,
|
|
6
9
|
AdmissionProposal,
|
|
7
10
|
CustomAdmissionStrategy,
|
|
8
11
|
SchedulerGraphSnapshot,
|
|
9
12
|
SchedulerMeasurementContext
|
|
10
|
-
} from "
|
|
13
|
+
} from "../../project-definition/project-definition.ts";
|
|
11
14
|
import { prepareSchedulerDurationModel } from "./duration-model/preparation.ts";
|
|
12
15
|
import { learnedSelectionLayers } from "./selection-layers.ts";
|
|
13
16
|
import { staticDecision } from "./static-decision.ts";
|
|
@@ -20,7 +23,7 @@ import {
|
|
|
20
23
|
createSchedulerCriticalPathSnapshot,
|
|
21
24
|
criticalPathScoreForTask,
|
|
22
25
|
type SchedulerCriticalPathSnapshot
|
|
23
|
-
} from "
|
|
26
|
+
} from "./critical-path-ranking.ts";
|
|
24
27
|
|
|
25
28
|
/** 公开 learned critical-path prepared strategy 的调用方配置。 */
|
|
26
29
|
export interface LearnedCriticalPathStrategyOptions {
|
|
@@ -94,7 +97,7 @@ export function createLearnedCriticalPathStrategy(
|
|
|
94
97
|
return Object.freeze({
|
|
95
98
|
decide: (context: AdmissionPolicyContext) =>
|
|
96
99
|
learnedDecision(context, durationModel.prediction, criticalPath, options),
|
|
97
|
-
|
|
100
|
+
terminalEffect: async (context: SchedulerMeasurementContext) => {
|
|
98
101
|
const recorded = await durationModel.record(context);
|
|
99
102
|
if (recorded.kind === "failed" || recorded.writeObservation === "failed") {
|
|
100
103
|
observe(options, { kind: "recording-unavailable" });
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { CheckDescriptor } from "../../check/descriptor.ts";
|
|
2
|
+
import {
|
|
3
|
+
getDefinedHandoffProviderIdentity,
|
|
4
|
+
type HandoffProviderIdentity
|
|
5
|
+
} from "../../check/handoff-provider-identity.ts";
|
|
2
6
|
import { snapshotClosedArray } from "../../data-boundary/closed-values.ts";
|
|
3
7
|
import {
|
|
4
8
|
parseCheckAuthoringData,
|
|
@@ -22,7 +26,8 @@ export interface ParsedCheck {
|
|
|
22
26
|
readonly dependsOn: ParsedCheckCollection | undefined;
|
|
23
27
|
readonly displayName: string;
|
|
24
28
|
readonly enabledByFlags: ParsedCheckFieldPrelude["enabledByFlags"];
|
|
25
|
-
readonly
|
|
29
|
+
readonly execute: ParsedCheckFieldPrelude["execute"];
|
|
30
|
+
readonly handoff: HandoffProviderIdentity | null;
|
|
26
31
|
readonly maxParallel: number | undefined;
|
|
27
32
|
readonly mutex: ParsedCheckCollection | undefined;
|
|
28
33
|
readonly observes: ParsedCheckCollection | undefined;
|
|
@@ -30,8 +35,8 @@ export interface ParsedCheck {
|
|
|
30
35
|
readonly options: object | null;
|
|
31
36
|
readonly path: string;
|
|
32
37
|
readonly parseData: TrustedDataParser | null;
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
38
|
+
readonly prepare: ParsedCheckFieldPrelude["prepare"];
|
|
39
|
+
readonly omitQuietPassedRow: ParsedCheckFields["omitQuietPassedRow"];
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
export interface ParsedCheckTree {
|
|
@@ -70,9 +75,10 @@ export function parseCheckTreeAuthoring(value: unknown): ParsedCheckTree | undef
|
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
function parseCheck(value: unknown, path: string, state: ParseState): ParsedCheck | undefined {
|
|
78
|
+
const handoffProviderIdentity = getDefinedHandoffProviderIdentity(value);
|
|
73
79
|
const data = parseCheckAuthoringData(value);
|
|
74
80
|
if (data === undefined) return undefined;
|
|
75
|
-
const prelude = parseCheckFieldPrelude(data);
|
|
81
|
+
const prelude = parseCheckFieldPrelude(data, handoffProviderIdentity);
|
|
76
82
|
if (prelude === undefined) return undefined;
|
|
77
83
|
const checks = parseChildren(data, path, state);
|
|
78
84
|
if (checks === undefined) return undefined;
|
|
@@ -89,7 +95,8 @@ function parseCheck(value: unknown, path: string, state: ParseState): ParsedChec
|
|
|
89
95
|
dependsOn: scheduling.dependsOn,
|
|
90
96
|
displayName: data.displayName,
|
|
91
97
|
enabledByFlags: fields.enabledByFlags,
|
|
92
|
-
|
|
98
|
+
execute: fields.execute,
|
|
99
|
+
handoff: fields.handoff,
|
|
93
100
|
maxParallel: scheduling.maxParallel,
|
|
94
101
|
mutex: scheduling.mutex,
|
|
95
102
|
observes: scheduling.observes,
|
|
@@ -97,8 +104,8 @@ function parseCheck(value: unknown, path: string, state: ParseState): ParsedChec
|
|
|
97
104
|
options: fields.options,
|
|
98
105
|
path,
|
|
99
106
|
parseData: fields.parseData,
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
prepare: fields.prepare,
|
|
108
|
+
omitQuietPassedRow: fields.omitQuietPassedRow
|
|
102
109
|
});
|
|
103
110
|
}
|
|
104
111
|
|
|
@@ -126,6 +133,6 @@ function warnForMeaninglessCheck(
|
|
|
126
133
|
path: string,
|
|
127
134
|
state: ParseState
|
|
128
135
|
): void {
|
|
129
|
-
if (fields.
|
|
136
|
+
if (fields.execute !== null || checks.length > 0) return;
|
|
130
137
|
state.warnings.push(Object.freeze({ code: "meaningless-check", path, checkId: data.checkId }));
|
|
131
138
|
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import type { CheckDescriptor } from "../../check/descriptor.ts";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type CheckFlagEnablement,
|
|
5
|
-
type CheckFlagEnablementMode,
|
|
6
|
-
type CheckExecution,
|
|
7
|
-
type CheckPreflight
|
|
8
|
-
} from "../../check/check.ts";
|
|
2
|
+
import { type Check, type CheckFlagEnablement, type CheckPreparation } from "../../check/check.ts";
|
|
3
|
+
import type { HandoffProviderIdentity } from "../../check/handoff-provider-identity.ts";
|
|
9
4
|
import { validateCheckDescriptor } from "../../check/descriptor-validation.ts";
|
|
10
5
|
import { snapshotJsonObject } from "../../check/options-snapshot.ts";
|
|
11
6
|
import { snapshotClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
12
|
-
import {
|
|
7
|
+
import { hasOnlyKeys, parseFlagCondition } from "./flag-conditions.ts";
|
|
13
8
|
|
|
14
9
|
export type TrustedDataParser = (this: void, ...parameters: never[]) => unknown;
|
|
15
10
|
|
|
@@ -21,24 +16,20 @@ export interface CheckAuthoringData extends Readonly<Record<string, unknown>> {
|
|
|
21
16
|
export interface ParsedCheckFields {
|
|
22
17
|
readonly definition: CheckDescriptor | null;
|
|
23
18
|
readonly enabledByFlags: CheckFlagEnablement | null;
|
|
24
|
-
readonly
|
|
19
|
+
readonly execute: NonNullable<Check["execute"]> | null;
|
|
20
|
+
readonly handoff: HandoffProviderIdentity | null;
|
|
25
21
|
readonly options: object | null;
|
|
26
22
|
readonly parseData: TrustedDataParser | null;
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
23
|
+
readonly prepare: CheckPreparation | null;
|
|
24
|
+
readonly omitQuietPassedRow: boolean | null;
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
export interface ParsedCheckFieldPrelude {
|
|
32
28
|
readonly enabledByFlags: CheckFlagEnablement | null;
|
|
33
|
-
readonly
|
|
29
|
+
readonly execute: NonNullable<Check["execute"]> | null;
|
|
30
|
+
readonly handoff: HandoffProviderIdentity | null;
|
|
34
31
|
readonly parseData: TrustedDataParser | null;
|
|
35
|
-
readonly
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface ParsedFlagEnablementControl extends Readonly<Record<string, unknown>> {
|
|
39
|
-
readonly flags: unknown;
|
|
40
|
-
readonly mode: CheckFlagEnablementMode;
|
|
41
|
-
readonly propagateDependsOn?: true;
|
|
32
|
+
readonly prepare: CheckPreparation | null;
|
|
42
33
|
}
|
|
43
34
|
|
|
44
35
|
const CHECK_KEYS = [
|
|
@@ -48,26 +39,28 @@ const CHECK_KEYS = [
|
|
|
48
39
|
"dependsOn",
|
|
49
40
|
"displayName",
|
|
50
41
|
"enabledByFlags",
|
|
51
|
-
"
|
|
42
|
+
"execute",
|
|
43
|
+
"handoff",
|
|
52
44
|
"maxParallel",
|
|
53
45
|
"mutex",
|
|
54
46
|
"options",
|
|
55
47
|
"observes",
|
|
56
48
|
"parseData",
|
|
57
|
-
"
|
|
49
|
+
"prepare",
|
|
58
50
|
"resourceClaims",
|
|
59
|
-
"
|
|
51
|
+
"omitQuietPassedRow"
|
|
60
52
|
] as const;
|
|
61
|
-
const
|
|
53
|
+
const FLAG_ENABLEMENT_EXPRESSION_KEYS = ["when", "propagateDependsOn"] as const;
|
|
62
54
|
|
|
63
55
|
const CONTAINER_CHECK_FIELDS: ParsedCheckFields = Object.freeze({
|
|
64
56
|
definition: null,
|
|
65
57
|
enabledByFlags: null,
|
|
66
|
-
|
|
58
|
+
execute: null,
|
|
59
|
+
handoff: null,
|
|
67
60
|
options: null,
|
|
68
61
|
parseData: null,
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
prepare: null,
|
|
63
|
+
omitQuietPassedRow: null
|
|
71
64
|
});
|
|
72
65
|
|
|
73
66
|
export function parseCheckAuthoringData(value: unknown): CheckAuthoringData | undefined {
|
|
@@ -88,47 +81,74 @@ function hasValidCheckIdentity(
|
|
|
88
81
|
}
|
|
89
82
|
|
|
90
83
|
export function parseCheckFieldPrelude(
|
|
91
|
-
data: CheckAuthoringData
|
|
84
|
+
data: CheckAuthoringData,
|
|
85
|
+
handoffProviderIdentity: HandoffProviderIdentity | undefined
|
|
92
86
|
): ParsedCheckFieldPrelude | undefined {
|
|
93
87
|
const execution = parseExecution(data);
|
|
94
88
|
if (execution === undefined) return undefined;
|
|
89
|
+
const handoff = parseHandoff(data, handoffProviderIdentity);
|
|
90
|
+
if (handoff === undefined) return undefined;
|
|
95
91
|
const parseData = parseDataParser(data);
|
|
96
92
|
if (parseData === undefined) return undefined;
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
93
|
+
const preparation = parsePreparation(data);
|
|
94
|
+
if (preparation === undefined) return undefined;
|
|
99
95
|
const enabledByFlags = parseEnabledByFlags(data);
|
|
100
96
|
return enabledByFlags === undefined
|
|
101
97
|
? undefined
|
|
102
|
-
: Object.freeze({
|
|
98
|
+
: Object.freeze({
|
|
99
|
+
enabledByFlags,
|
|
100
|
+
execute: execution,
|
|
101
|
+
handoff,
|
|
102
|
+
parseData,
|
|
103
|
+
prepare: preparation
|
|
104
|
+
});
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
export function parseCheckFields(
|
|
106
108
|
data: CheckAuthoringData,
|
|
107
109
|
prelude: ParsedCheckFieldPrelude
|
|
108
110
|
): ParsedCheckFields | undefined {
|
|
109
|
-
if (prelude.
|
|
110
|
-
return
|
|
111
|
-
Object.hasOwn(data, "enabledByFlags") ||
|
|
112
|
-
Object.hasOwn(data, "visibility") ||
|
|
113
|
-
prelude.parseData !== null ||
|
|
114
|
-
prelude.preflight !== null
|
|
115
|
-
? undefined
|
|
116
|
-
: CONTAINER_CHECK_FIELDS;
|
|
111
|
+
if (prelude.execute === null) {
|
|
112
|
+
return containerHasExecutableFields(data, prelude) ? undefined : CONTAINER_CHECK_FIELDS;
|
|
117
113
|
}
|
|
114
|
+
return parseExecutableCheckFields(data, prelude);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Container nodes cannot carry values that only an executable callback can consume. */
|
|
118
|
+
function containerHasExecutableFields(
|
|
119
|
+
data: CheckAuthoringData,
|
|
120
|
+
prelude: ParsedCheckFieldPrelude
|
|
121
|
+
): boolean {
|
|
122
|
+
return (
|
|
123
|
+
Object.hasOwn(data, "options") ||
|
|
124
|
+
Object.hasOwn(data, "enabledByFlags") ||
|
|
125
|
+
prelude.handoff !== null ||
|
|
126
|
+
Object.hasOwn(data, "omitQuietPassedRow") ||
|
|
127
|
+
prelude.parseData !== null ||
|
|
128
|
+
prelude.prepare !== null
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Parses the callback-owned fields that form one executable Check definition. */
|
|
133
|
+
function parseExecutableCheckFields(
|
|
134
|
+
data: CheckAuthoringData,
|
|
135
|
+
prelude: ParsedCheckFieldPrelude
|
|
136
|
+
): ParsedCheckFields | undefined {
|
|
118
137
|
const definition = parseDefinition(data);
|
|
119
138
|
if (definition === undefined) return undefined;
|
|
120
139
|
const options = parseOptions(data);
|
|
121
140
|
if (options === undefined) return undefined;
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
141
|
+
const omitQuietPassedRow = parseOmitQuietPassedRow(data);
|
|
142
|
+
if (omitQuietPassedRow === undefined) return undefined;
|
|
124
143
|
return Object.freeze({
|
|
125
144
|
definition,
|
|
126
145
|
enabledByFlags: prelude.enabledByFlags,
|
|
127
|
-
|
|
146
|
+
execute: prelude.execute,
|
|
147
|
+
handoff: prelude.handoff,
|
|
128
148
|
options,
|
|
129
149
|
parseData: prelude.parseData,
|
|
130
|
-
|
|
131
|
-
|
|
150
|
+
prepare: prelude.prepare,
|
|
151
|
+
omitQuietPassedRow
|
|
132
152
|
});
|
|
133
153
|
}
|
|
134
154
|
|
|
@@ -136,9 +156,21 @@ function hasOnlyCheckKeys(data: Readonly<Record<string, unknown>>): boolean {
|
|
|
136
156
|
return Object.keys(data).every((key) => CHECK_KEYS.some((checkKey) => checkKey === key));
|
|
137
157
|
}
|
|
138
158
|
|
|
139
|
-
function parseExecution(
|
|
140
|
-
|
|
141
|
-
|
|
159
|
+
function parseExecution(
|
|
160
|
+
data: CheckAuthoringData
|
|
161
|
+
): NonNullable<Check["execute"]> | null | undefined {
|
|
162
|
+
if (!Object.hasOwn(data, "execute")) return null;
|
|
163
|
+
return isTrustedFunction<NonNullable<Check["execute"]>>(data.execute) ? data.execute : undefined;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function parseHandoff(
|
|
167
|
+
data: CheckAuthoringData,
|
|
168
|
+
handoffProviderIdentity: HandoffProviderIdentity | undefined
|
|
169
|
+
): HandoffProviderIdentity | null | undefined {
|
|
170
|
+
if (!Object.hasOwn(data, "handoff")) return null;
|
|
171
|
+
return data.handoff === true && handoffProviderIdentity !== undefined
|
|
172
|
+
? handoffProviderIdentity
|
|
173
|
+
: undefined;
|
|
142
174
|
}
|
|
143
175
|
|
|
144
176
|
function parseDataParser(data: CheckAuthoringData): TrustedDataParser | null | undefined {
|
|
@@ -146,9 +178,9 @@ function parseDataParser(data: CheckAuthoringData): TrustedDataParser | null | u
|
|
|
146
178
|
return isTrustedFunction<TrustedDataParser>(data.parseData) ? data.parseData : undefined;
|
|
147
179
|
}
|
|
148
180
|
|
|
149
|
-
function
|
|
150
|
-
if (!Object.hasOwn(data, "
|
|
151
|
-
return isTrustedFunction<
|
|
181
|
+
function parsePreparation(data: CheckAuthoringData): CheckPreparation | null | undefined {
|
|
182
|
+
if (!Object.hasOwn(data, "prepare")) return null;
|
|
183
|
+
return isTrustedFunction<CheckPreparation>(data.prepare) ? data.prepare : undefined;
|
|
152
184
|
}
|
|
153
185
|
|
|
154
186
|
function isTrustedFunction<FunctionType extends (...parameters: never[]) => unknown>(
|
|
@@ -174,54 +206,37 @@ function parseOptions(data: CheckAuthoringData): object | undefined {
|
|
|
174
206
|
|
|
175
207
|
function parseEnabledByFlags(data: CheckAuthoringData): CheckFlagEnablement | null | undefined {
|
|
176
208
|
if (!Object.hasOwn(data, "enabledByFlags")) return null;
|
|
177
|
-
|
|
178
|
-
if (control === undefined) return undefined;
|
|
179
|
-
const flags = parseUniqueIdentifiers(control.flags);
|
|
180
|
-
return flags === undefined ? undefined : canonicalFlagEnablement(control, flags);
|
|
209
|
+
return parseFlagEnablementControl(data.enabledByFlags);
|
|
181
210
|
}
|
|
182
211
|
|
|
183
|
-
|
|
212
|
+
/** Parses one closed flag-enablement field without validating its Project flag references. */
|
|
213
|
+
export function parseFlagEnablementControl(value: unknown): CheckFlagEnablement | undefined {
|
|
184
214
|
const control = snapshotClosedRecord(value);
|
|
185
|
-
if (
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
): CheckFlagEnablement | undefined {
|
|
201
|
-
const [firstFlag, ...remainingFlags] = [...flags].sort();
|
|
202
|
-
if (firstFlag === undefined) return undefined;
|
|
203
|
-
const canonicalFlags: [string, ...string[]] = [firstFlag, ...remainingFlags];
|
|
204
|
-
return Object.freeze({
|
|
205
|
-
flags: Object.freeze(canonicalFlags),
|
|
206
|
-
mode: control.mode,
|
|
207
|
-
...(control.propagateDependsOn === true ? { propagateDependsOn: true as const } : {})
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function hasOnlyFlagEnablementKeys(control: Readonly<Record<string, unknown>>): boolean {
|
|
212
|
-
return Object.keys(control).every((key) =>
|
|
213
|
-
FLAG_ENABLEMENT_KEYS.some((allowed) => allowed === key)
|
|
214
|
-
);
|
|
215
|
+
if (
|
|
216
|
+
control === undefined ||
|
|
217
|
+
!hasOnlyKeys(control, FLAG_ENABLEMENT_EXPRESSION_KEYS) ||
|
|
218
|
+
!Object.hasOwn(control, "when")
|
|
219
|
+
) {
|
|
220
|
+
return undefined;
|
|
221
|
+
}
|
|
222
|
+
const when = parseFlagCondition(control.when);
|
|
223
|
+
const propagateDependsOn = parsePropagation(control);
|
|
224
|
+
return when === undefined || propagateDependsOn === undefined
|
|
225
|
+
? undefined
|
|
226
|
+
: Object.freeze({
|
|
227
|
+
when,
|
|
228
|
+
...(propagateDependsOn ? { propagateDependsOn: true as const } : {})
|
|
229
|
+
});
|
|
215
230
|
}
|
|
216
231
|
|
|
217
|
-
function
|
|
218
|
-
|
|
232
|
+
function parsePropagation(control: Readonly<Record<string, unknown>>): boolean | undefined {
|
|
233
|
+
if (!Object.hasOwn(control, "propagateDependsOn")) return false;
|
|
234
|
+
return control.propagateDependsOn === true ? true : undefined;
|
|
219
235
|
}
|
|
220
236
|
|
|
221
|
-
function
|
|
222
|
-
if (!Object.hasOwn(data, "
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
? (visibility ?? "always")
|
|
237
|
+
function parseOmitQuietPassedRow(data: CheckAuthoringData): boolean | undefined {
|
|
238
|
+
if (!Object.hasOwn(data, "omitQuietPassedRow")) return false;
|
|
239
|
+
return data.omitQuietPassedRow === undefined || data.omitQuietPassedRow === true
|
|
240
|
+
? (data.omitQuietPassedRow ?? false)
|
|
226
241
|
: undefined;
|
|
227
242
|
}
|