@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,62 @@
|
|
|
1
|
+
/** Handles one admitted Check's preparation boundary and ready callback handoff. */
|
|
2
|
+
|
|
3
|
+
import type { CheckProjectContext } from "../../check/check.ts";
|
|
4
|
+
import type { NormalizedCheck } from "../../project-definition/project-definition.ts";
|
|
5
|
+
import type { ResolvedInvocationPaths } from "../invocation/paths.ts";
|
|
6
|
+
import { checkIdentity } from "./execution-finalization.ts";
|
|
7
|
+
import { recordSettledCheck, type CheckExecutionState } from "./execution-settlement.ts";
|
|
8
|
+
import { prepareCheck, type CheckPreparationResolution } from "./preparation.ts";
|
|
9
|
+
import { executeReadyCheck } from "./ready-check-execution.ts";
|
|
10
|
+
|
|
11
|
+
export type CheckExecutionClock = Readonly<{ now(): number }>;
|
|
12
|
+
|
|
13
|
+
export type AdmittedCheckExecutionInput = CheckExecutionState &
|
|
14
|
+
Readonly<{
|
|
15
|
+
readonly check: NormalizedCheck;
|
|
16
|
+
readonly clock: CheckExecutionClock;
|
|
17
|
+
readonly onAdmittedCheck: ((check: NormalizedCheck) => void) | undefined;
|
|
18
|
+
readonly invocationId: string;
|
|
19
|
+
readonly paths: ResolvedInvocationPaths | undefined;
|
|
20
|
+
readonly project: CheckProjectContext;
|
|
21
|
+
readonly signal: AbortSignal;
|
|
22
|
+
}>;
|
|
23
|
+
|
|
24
|
+
export async function executeAdmittedCheck(input: AdmittedCheckExecutionInput): Promise<boolean> {
|
|
25
|
+
observeAdmittedCheck(input);
|
|
26
|
+
const preparation = await prepareCheck({
|
|
27
|
+
check: input.check,
|
|
28
|
+
diagnosticLogger: input.diagnosticLogger,
|
|
29
|
+
project: input.project,
|
|
30
|
+
signal: input.signal
|
|
31
|
+
});
|
|
32
|
+
if (preparation.kind === "blocked") {
|
|
33
|
+
settleBlockedPreparation(input, preparation);
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return executeReadyCheck({ ...input, prepare: preparation });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function settleBlockedPreparation(
|
|
40
|
+
state: CheckExecutionState,
|
|
41
|
+
prepare: Extract<CheckPreparationResolution, { readonly kind: "blocked" }>
|
|
42
|
+
): void {
|
|
43
|
+
const scope = state.session.openCheckScope(prepare.check.definition.checkId);
|
|
44
|
+
const outcome = scope.settleProduct(prepare.outcome);
|
|
45
|
+
recordSettledCheck({
|
|
46
|
+
check: checkIdentity(prepare.check),
|
|
47
|
+
durationMs: null,
|
|
48
|
+
messages: prepare.check.preparationMessages,
|
|
49
|
+
outcome,
|
|
50
|
+
phase: "preparation",
|
|
51
|
+
state
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Diagnostic observation belongs to the invocation; it cannot revise admitted Task facts. */
|
|
56
|
+
function observeAdmittedCheck(input: AdmittedCheckExecutionInput): void {
|
|
57
|
+
try {
|
|
58
|
+
input.onAdmittedCheck?.(input.check);
|
|
59
|
+
} catch {
|
|
60
|
+
// Learned diagnostic output is best-effort and has no execution consequence.
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -10,6 +10,7 @@ import { CoreInvariantFailure, type TrustedCheckScope } from "../../check-settle
|
|
|
10
10
|
import { diagnosticTags, type DiagnosticLogger } from "../diagnostic-logging/logger.ts";
|
|
11
11
|
import { snapshotClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
12
12
|
import { invokeWithCapturedConsole } from "./console-capture.ts";
|
|
13
|
+
import { diagnosticCallbackResult } from "./terminal-result.ts";
|
|
13
14
|
|
|
14
15
|
const EMPTY_MESSAGES: readonly CheckMessage[] = Object.freeze([]);
|
|
15
16
|
|
|
@@ -61,7 +62,7 @@ export async function executeCheckCallback(input: CheckCallbackInput): Promise<C
|
|
|
61
62
|
records: reporter.records,
|
|
62
63
|
signal: input.signal
|
|
63
64
|
});
|
|
64
|
-
const invocation = await invokeWithCapturedConsole(() => input.check.
|
|
65
|
+
const invocation = await invokeWithCapturedConsole(() => input.check.execute(context));
|
|
65
66
|
consoleMessages = invocation.messages;
|
|
66
67
|
if (invocation.kind === "threw") throw invocation.error;
|
|
67
68
|
const callbackResult = invocation.output;
|
|
@@ -69,7 +70,7 @@ export async function executeCheckCallback(input: CheckCallbackInput): Promise<C
|
|
|
69
70
|
input.diagnosticLogger?.observe({
|
|
70
71
|
event: "callback.cancelled",
|
|
71
72
|
tags: diagnosticTags(...checkTags, "CANCELLED"),
|
|
72
|
-
details: { result: callbackResult }
|
|
73
|
+
details: { result: diagnosticCallbackResult(callbackResult, input.check.handoff) }
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
result = input.signal.aborted
|
|
@@ -1,30 +1,57 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
CheckHandoffProvider,
|
|
2
3
|
CheckDependencies,
|
|
3
4
|
CheckOutcome,
|
|
5
|
+
DependencyHandoffReadResult,
|
|
4
6
|
DependencyObservation,
|
|
5
7
|
DependencyReadResult
|
|
6
8
|
} from "../../check/check.ts";
|
|
9
|
+
import {
|
|
10
|
+
getDefinedHandoffProviderIdentity,
|
|
11
|
+
type HandoffProviderIdentity
|
|
12
|
+
} from "../../check/handoff-provider-identity.ts";
|
|
7
13
|
import type { CoreCheckSession } from "../../check-settlement/session.ts";
|
|
14
|
+
import { snapshotClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
8
15
|
import { diagnosticTags, type DiagnosticLogger } from "../diagnostic-logging/logger.ts";
|
|
16
|
+
import type { ParsedCheckTerminalHandoff } from "./terminal-result.ts";
|
|
17
|
+
|
|
18
|
+
type RuntimeDependencyHandoffReadResult = DependencyHandoffReadResult<string, object>;
|
|
9
19
|
|
|
10
20
|
export function createCheckDependencies(
|
|
11
21
|
input: Readonly<{
|
|
12
22
|
readonly checkId: string;
|
|
23
|
+
readonly directDependsOnCheckIds: readonly string[];
|
|
13
24
|
readonly diagnosticLogger: DiagnosticLogger | undefined;
|
|
14
25
|
readonly directRelationCheckIds: readonly string[];
|
|
26
|
+
readonly handoffsByCheckId: ReadonlyMap<string, ParsedCheckTerminalHandoff>;
|
|
15
27
|
readonly session: CoreCheckSession;
|
|
16
28
|
}>
|
|
17
29
|
): CheckDependencies {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
function get<Id extends string, Handoff extends object>(
|
|
31
|
+
dependency: CheckHandoffProvider<Id, Handoff>
|
|
32
|
+
): DependencyHandoffReadResult<Id, Handoff>;
|
|
33
|
+
function get(dependency: string): DependencyReadResult;
|
|
34
|
+
function get(dependency: unknown): DependencyReadResult | RuntimeDependencyHandoffReadResult;
|
|
35
|
+
function get(dependency: unknown): DependencyReadResult | RuntimeDependencyHandoffReadResult {
|
|
36
|
+
if (dependency === null || typeof dependency !== "object") {
|
|
37
|
+
const result = readDirectRelation(input.session, input.directRelationCheckIds, dependency);
|
|
21
38
|
input.diagnosticLogger?.observe({
|
|
22
39
|
event: "dependency.read",
|
|
23
40
|
tags: diagnosticTags(`CHECK:${input.checkId}`, "EXECUTION", "DEPENDENCY-READ"),
|
|
24
|
-
details: dependencyReadDetails(
|
|
41
|
+
details: dependencyReadDetails(dependency, result)
|
|
25
42
|
});
|
|
26
43
|
return result;
|
|
27
|
-
}
|
|
44
|
+
}
|
|
45
|
+
const result = readDirectDependencyHandoff(input, dependency);
|
|
46
|
+
input.diagnosticLogger?.observe({
|
|
47
|
+
event: "dependency.read",
|
|
48
|
+
tags: diagnosticTags(`CHECK:${input.checkId}`, "EXECUTION", "DEPENDENCY-READ"),
|
|
49
|
+
details: handoffDependencyReadDetails(dependency, result)
|
|
50
|
+
});
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
return Object.freeze({
|
|
54
|
+
get,
|
|
28
55
|
list: (): readonly DependencyObservation[] => {
|
|
29
56
|
const observations = listDirectRelationObservations(
|
|
30
57
|
input.session,
|
|
@@ -40,6 +67,74 @@ export function createCheckDependencies(
|
|
|
40
67
|
});
|
|
41
68
|
}
|
|
42
69
|
|
|
70
|
+
function readDirectDependencyHandoff(
|
|
71
|
+
input: Readonly<{
|
|
72
|
+
readonly directDependsOnCheckIds: readonly string[];
|
|
73
|
+
readonly handoffsByCheckId: ReadonlyMap<string, ParsedCheckTerminalHandoff>;
|
|
74
|
+
readonly session: CoreCheckSession;
|
|
75
|
+
}>,
|
|
76
|
+
provider: unknown
|
|
77
|
+
): RuntimeDependencyHandoffReadResult {
|
|
78
|
+
const providerIdentity = handoffProviderIdentity(provider);
|
|
79
|
+
if (
|
|
80
|
+
providerIdentity === undefined ||
|
|
81
|
+
!input.directDependsOnCheckIds.includes(providerIdentity.checkId)
|
|
82
|
+
) {
|
|
83
|
+
return handoffDependencyNotDeclared(providerIdentity?.checkId ?? handoffCheckId(provider));
|
|
84
|
+
}
|
|
85
|
+
const settledHandoff = input.handoffsByCheckId.get(providerIdentity.checkId);
|
|
86
|
+
const outcome = input.session.readSettledCheckOutcome(providerIdentity.checkId);
|
|
87
|
+
if (
|
|
88
|
+
settledHandoff === undefined ||
|
|
89
|
+
settledHandoff.identity !== providerIdentity.identity ||
|
|
90
|
+
outcome.status !== "passed"
|
|
91
|
+
) {
|
|
92
|
+
return handoffUnavailable(providerIdentity.checkId);
|
|
93
|
+
}
|
|
94
|
+
return Object.freeze({
|
|
95
|
+
ok: true,
|
|
96
|
+
checkId: providerIdentity.checkId,
|
|
97
|
+
status: "passed",
|
|
98
|
+
data: outcome.data,
|
|
99
|
+
handoff: settledHandoff.value
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function handoffProviderIdentity(
|
|
104
|
+
provider: unknown
|
|
105
|
+
): Readonly<{ readonly checkId: string; readonly identity: HandoffProviderIdentity }> | undefined {
|
|
106
|
+
const identity = getDefinedHandoffProviderIdentity(provider);
|
|
107
|
+
const record = snapshotClosedRecord(provider);
|
|
108
|
+
if (
|
|
109
|
+
identity === undefined ||
|
|
110
|
+
record === undefined ||
|
|
111
|
+
typeof record.checkId !== "string" ||
|
|
112
|
+
record.handoff !== true
|
|
113
|
+
) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
return Object.freeze({ checkId: record.checkId, identity });
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function handoffCheckId(provider: unknown): string {
|
|
120
|
+
const record = snapshotClosedRecord(provider);
|
|
121
|
+
return record !== undefined && typeof record.checkId === "string" ? record.checkId : "";
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function handoffDependencyNotDeclared(checkId: string): RuntimeDependencyHandoffReadResult {
|
|
125
|
+
return Object.freeze({
|
|
126
|
+
ok: false,
|
|
127
|
+
error: Object.freeze({ code: "dependency-not-declared", checkId })
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function handoffUnavailable(checkId: string): RuntimeDependencyHandoffReadResult {
|
|
132
|
+
return Object.freeze({
|
|
133
|
+
ok: false,
|
|
134
|
+
error: Object.freeze({ code: "upstream-handoff-unavailable", checkId })
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
43
138
|
function listDirectRelationObservations(
|
|
44
139
|
session: CoreCheckSession,
|
|
45
140
|
directRelationCheckIds: readonly string[]
|
|
@@ -75,10 +170,29 @@ function dependencyReadDetails(
|
|
|
75
170
|
});
|
|
76
171
|
}
|
|
77
172
|
|
|
173
|
+
function handoffDependencyReadDetails(
|
|
174
|
+
requestedProvider: unknown,
|
|
175
|
+
result: RuntimeDependencyHandoffReadResult
|
|
176
|
+
): Readonly<Record<string, unknown>> {
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
return Object.freeze({
|
|
179
|
+
error: result.error,
|
|
180
|
+
ok: false,
|
|
181
|
+
requestedCheckId: handoffCheckId(requestedProvider)
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
return Object.freeze({
|
|
185
|
+
hasData: true,
|
|
186
|
+
ok: true,
|
|
187
|
+
producer: result.checkId,
|
|
188
|
+
status: result.status
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
78
192
|
function readDirectRelation(
|
|
79
193
|
session: CoreCheckSession,
|
|
80
194
|
directRelationCheckIds: readonly string[],
|
|
81
|
-
checkId:
|
|
195
|
+
checkId: unknown
|
|
82
196
|
): DependencyReadResult {
|
|
83
197
|
if (typeof checkId !== "string" || !directRelationCheckIds.includes(checkId)) {
|
|
84
198
|
return dependencyNotDeclared(checkId);
|
|
@@ -31,17 +31,19 @@ export function closeResolvedChecks(
|
|
|
31
31
|
try {
|
|
32
32
|
assertNoTaskEngineFailures(input.graphRun.settlements);
|
|
33
33
|
if (input.graphRun.admissionPolicyFault !== undefined) {
|
|
34
|
+
const terminalSchedulerMeasurement = input.graphRun.terminalMeasurement;
|
|
34
35
|
return closeAdmissionPolicyFailed({
|
|
35
36
|
normalizedChecks: input.allChecks,
|
|
36
37
|
state: input.state,
|
|
37
|
-
terminalSchedulerMeasurement:
|
|
38
|
+
...(terminalSchedulerMeasurement === undefined ? {} : { terminalSchedulerMeasurement })
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
if (input.graphRun.cancelled) {
|
|
42
|
+
const terminalSchedulerMeasurement = input.graphRun.terminalMeasurement;
|
|
41
43
|
return closeCancelledExecution({
|
|
42
44
|
normalizedChecks: input.allChecks,
|
|
43
45
|
state: input.state,
|
|
44
|
-
terminalSchedulerMeasurement:
|
|
46
|
+
...(terminalSchedulerMeasurement === undefined ? {} : { terminalSchedulerMeasurement })
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
assertEveryCheckClosed(input.allChecks, input.graphRun.settlements);
|
|
@@ -88,12 +90,12 @@ export function closeCancelledExecution(
|
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
export function checkIdentity(
|
|
91
|
-
check: Pick<NormalizedCheck, "definition" | "
|
|
93
|
+
check: Pick<NormalizedCheck, "definition" | "omitQuietPassedRow">
|
|
92
94
|
): CheckIdentity {
|
|
93
95
|
return Object.freeze({
|
|
94
96
|
checkId: check.definition.checkId,
|
|
95
97
|
displayName: check.definition.displayName,
|
|
96
|
-
|
|
98
|
+
omitQuietPassedRow: check.omitQuietPassedRow
|
|
97
99
|
});
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import type { CheckMessage, CheckOutcome
|
|
1
|
+
import type { CheckMessage, CheckOutcome } from "../../check/check.ts";
|
|
2
|
+
import type { HandoffProviderIdentity } from "../../check/handoff-provider-identity.ts";
|
|
2
3
|
import type { CoreCheckSession } from "../../check-settlement/session.ts";
|
|
3
4
|
import {
|
|
4
5
|
diagnosticTags,
|
|
5
6
|
summarizeDiagnosticValue,
|
|
6
7
|
type DiagnosticLogger
|
|
7
8
|
} from "../diagnostic-logging/logger.ts";
|
|
8
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
diagnosticCallbackResult,
|
|
11
|
+
parseCheckTerminalResult,
|
|
12
|
+
type ParsedCheckTerminalHandoff
|
|
13
|
+
} from "./terminal-result.ts";
|
|
9
14
|
import { combineCheckMessages } from "./messages.ts";
|
|
10
15
|
import type { CheckExecutionLifecycle } from "./lifecycle.ts";
|
|
11
16
|
import type { executeCheckCallback } from "./callback.ts";
|
|
@@ -13,7 +18,7 @@ import type { executeCheckCallback } from "./callback.ts";
|
|
|
13
18
|
export type CheckIdentity = Readonly<{
|
|
14
19
|
readonly checkId: string;
|
|
15
20
|
readonly displayName: string;
|
|
16
|
-
readonly
|
|
21
|
+
readonly omitQuietPassedRow: boolean;
|
|
17
22
|
}>;
|
|
18
23
|
|
|
19
24
|
export interface SettledCheckFacts {
|
|
@@ -22,9 +27,10 @@ export interface SettledCheckFacts {
|
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
export type CheckExecutionSettlementState = Readonly<{
|
|
25
|
-
readonly session: CoreCheckSession;
|
|
26
30
|
readonly diagnosticLogger: DiagnosticLogger | undefined;
|
|
31
|
+
readonly handoffsByCheckId: Map<string, ParsedCheckTerminalHandoff>;
|
|
27
32
|
readonly lifecycle: CheckExecutionLifecycle | undefined;
|
|
33
|
+
readonly session: CoreCheckSession;
|
|
28
34
|
readonly settledFactsByCheckId: Map<string, SettledCheckFacts>;
|
|
29
35
|
}>;
|
|
30
36
|
|
|
@@ -38,49 +44,102 @@ export class CheckExecutionInvariantFailure extends Error {
|
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
type SettleCallbackInput = Readonly<{
|
|
48
|
+
readonly callback: Awaited<ReturnType<typeof executeCheckCallback>>;
|
|
49
|
+
readonly checkId: string;
|
|
50
|
+
readonly diagnosticLogger: DiagnosticLogger | undefined;
|
|
51
|
+
readonly handoff: HandoffProviderIdentity | undefined;
|
|
52
|
+
readonly preparationMessages: readonly CheckMessage[];
|
|
53
|
+
readonly scope: ReturnType<CoreCheckSession["openCheckScope"]>;
|
|
54
|
+
readonly state: CheckExecutionSettlementState;
|
|
55
|
+
}>;
|
|
56
|
+
|
|
57
|
+
type SettledCallback = Readonly<{
|
|
58
|
+
readonly messages: readonly CheckMessage[];
|
|
59
|
+
readonly outcome: CheckOutcome;
|
|
60
|
+
}>;
|
|
61
|
+
type ProductCallback = Extract<SettleCallbackInput["callback"], { readonly source: "product" }>;
|
|
62
|
+
type AuthorCallback = Extract<SettleCallbackInput["callback"], { readonly source: "author" }>;
|
|
63
|
+
|
|
64
|
+
export function settleCallback(input: SettleCallbackInput): SettledCallback {
|
|
65
|
+
return input.callback.source === "product"
|
|
66
|
+
? settleProductCallback(input, input.callback)
|
|
67
|
+
: settleAuthorCallback(input, input.callback);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Product-controlled callback failures settle without author-result parsing or handoff publication. */
|
|
71
|
+
function settleProductCallback(
|
|
72
|
+
input: SettleCallbackInput,
|
|
73
|
+
callback: ProductCallback
|
|
74
|
+
): SettledCallback {
|
|
75
|
+
const outcome = input.scope.settleProduct(callback.result);
|
|
76
|
+
return Object.freeze({
|
|
77
|
+
messages: combineCheckMessages(input.preparationMessages, callback.consoleMessages),
|
|
78
|
+
outcome
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Parses an author result, settles it in Core, then commits its reference only after acceptance. */
|
|
83
|
+
function settleAuthorCallback(
|
|
84
|
+
input: SettleCallbackInput,
|
|
85
|
+
callback: AuthorCallback
|
|
86
|
+
): SettledCallback {
|
|
50
87
|
const executionTags = diagnosticTags(`CHECK:${input.checkId}`, "EXECUTION");
|
|
51
|
-
const
|
|
52
|
-
if (callback.source === "product") {
|
|
53
|
-
const outcome = input.scope.settleProduct(callback.result);
|
|
54
|
-
return Object.freeze({
|
|
55
|
-
messages: combineCheckMessages(input.preflightMessages, callback.consoleMessages),
|
|
56
|
-
outcome
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
const terminal = parseCheckTerminalResult(callback.result);
|
|
88
|
+
const terminal = parseCheckTerminalResult(callback.result, input.handoff);
|
|
60
89
|
if (terminal === undefined) {
|
|
61
90
|
input.diagnosticLogger?.observe({
|
|
62
91
|
event: "callback.malformed",
|
|
63
92
|
tags: diagnosticTags(...executionTags, "MALFORMED"),
|
|
64
|
-
details: { result: callback.result }
|
|
93
|
+
details: { result: diagnosticCallbackResult(callback.result, input.handoff) }
|
|
65
94
|
});
|
|
66
95
|
}
|
|
67
|
-
const settlement = input.scope.settle(
|
|
96
|
+
const settlement = input.scope.settle(
|
|
97
|
+
callbackSettlementCandidate(terminal, input.handoff, callback.result)
|
|
98
|
+
);
|
|
68
99
|
if (terminal !== undefined && !settlement.authorResultAccepted) {
|
|
69
100
|
input.diagnosticLogger?.observe({
|
|
70
101
|
event: "check.contained",
|
|
71
102
|
tags: diagnosticTags(...executionTags, "CONTAINED"),
|
|
72
|
-
details: { outcome: diagnosticOutcome(settlement.outcome), raw:
|
|
103
|
+
details: { outcome: diagnosticOutcome(settlement.outcome), raw: terminal.result }
|
|
73
104
|
});
|
|
74
105
|
}
|
|
106
|
+
if (terminal?.handoff !== undefined && settlement.authorResultAccepted) {
|
|
107
|
+
commitAcceptedHandoff(input.checkId, terminal.handoff, input.state);
|
|
108
|
+
}
|
|
75
109
|
return Object.freeze({
|
|
76
110
|
messages:
|
|
77
111
|
terminal !== undefined && settlement.authorResultAccepted
|
|
78
|
-
? combineCheckMessages(
|
|
79
|
-
|
|
112
|
+
? combineCheckMessages(
|
|
113
|
+
input.preparationMessages,
|
|
114
|
+
callback.consoleMessages,
|
|
115
|
+
terminal.messages
|
|
116
|
+
)
|
|
117
|
+
: combineCheckMessages(input.preparationMessages, callback.consoleMessages),
|
|
80
118
|
outcome: settlement.outcome
|
|
81
119
|
});
|
|
82
120
|
}
|
|
83
121
|
|
|
122
|
+
/** A declared callback never sends its raw result to Core when terminal parsing rejects the handoff. */
|
|
123
|
+
function callbackSettlementCandidate(
|
|
124
|
+
terminal: ReturnType<typeof parseCheckTerminalResult>,
|
|
125
|
+
handoff: HandoffProviderIdentity | undefined,
|
|
126
|
+
rawResult: unknown
|
|
127
|
+
): unknown {
|
|
128
|
+
if (terminal !== undefined) return terminal.result;
|
|
129
|
+
return handoff === undefined ? rawResult : undefined;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function commitAcceptedHandoff(
|
|
133
|
+
checkId: string,
|
|
134
|
+
handoff: ParsedCheckTerminalHandoff,
|
|
135
|
+
state: CheckExecutionSettlementState
|
|
136
|
+
): void {
|
|
137
|
+
if (state.handoffsByCheckId.has(checkId)) {
|
|
138
|
+
throw new CheckExecutionInvariantFailure("Check handoff published more than once");
|
|
139
|
+
}
|
|
140
|
+
state.handoffsByCheckId.set(checkId, handoff);
|
|
141
|
+
}
|
|
142
|
+
|
|
84
143
|
/** Records one terminal Check lifecycle fact after its owning Core scope has closed. */
|
|
85
144
|
export function recordSettledCheck(
|
|
86
145
|
input: Readonly<{
|
|
@@ -88,7 +147,7 @@ export function recordSettledCheck(
|
|
|
88
147
|
readonly durationMs: number | null;
|
|
89
148
|
readonly messages: readonly CheckMessage[];
|
|
90
149
|
readonly outcome: CheckOutcome;
|
|
91
|
-
readonly phase: "control" | "dependency" | "execution" | "
|
|
150
|
+
readonly phase: "control" | "dependency" | "execution" | "preparation";
|
|
92
151
|
readonly state: CheckExecutionSettlementState;
|
|
93
152
|
}>
|
|
94
153
|
): void {
|
|
@@ -122,7 +181,7 @@ export function recordSettledCheck(
|
|
|
122
181
|
durationMs: input.durationMs,
|
|
123
182
|
messages: input.messages,
|
|
124
183
|
records: input.state.session.readSettledCheckRecords(input.check.checkId),
|
|
125
|
-
|
|
184
|
+
omitQuietPassedRow: input.check.omitQuietPassedRow
|
|
126
185
|
})
|
|
127
186
|
);
|
|
128
187
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { CheckFlagCondition } from "../../check/check.ts";
|
|
1
2
|
import type { NormalizedCheck } from "../../project-definition/project-definition.ts";
|
|
2
3
|
import { diagnosticTags, type DiagnosticLogger } from "../diagnostic-logging/logger.ts";
|
|
3
4
|
|
|
4
5
|
export const FLAG_CONDITION_NOT_MATCHED_CODE = "flag-condition-not-matched";
|
|
5
6
|
|
|
6
|
-
type FlagControlledCheck = Pick<NormalizedCheck, "definition" | "
|
|
7
|
+
type FlagControlledCheck = Pick<NormalizedCheck, "definition" | "omitQuietPassedRow">;
|
|
7
8
|
type FlagControlOutcome = Readonly<{
|
|
8
9
|
readonly status: "not-applicable";
|
|
9
10
|
readonly reason: Readonly<{ readonly code: typeof FLAG_CONDITION_NOT_MATCHED_CODE }>;
|
|
@@ -85,7 +86,7 @@ function resolveFlagControl(
|
|
|
85
86
|
return Object.freeze({
|
|
86
87
|
check: Object.freeze({
|
|
87
88
|
definition: check.definition,
|
|
88
|
-
|
|
89
|
+
omitQuietPassedRow: check.omitQuietPassedRow
|
|
89
90
|
}),
|
|
90
91
|
outcome: Object.freeze({
|
|
91
92
|
status: "not-applicable",
|
|
@@ -118,15 +119,28 @@ function matchesFlagEnablement(
|
|
|
118
119
|
enablement: NonNullable<NormalizedCheck["enabledByFlags"]>,
|
|
119
120
|
runFlags: readonly string[]
|
|
120
121
|
): boolean {
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
return matchesFlagCondition(enablement.when, new Set(runFlags));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function matchesFlagCondition(
|
|
126
|
+
condition: CheckFlagCondition,
|
|
127
|
+
runFlags: ReadonlySet<string>
|
|
128
|
+
): boolean {
|
|
129
|
+
if (typeof condition === "string") return runFlags.has(condition);
|
|
130
|
+
switch (condition.kind) {
|
|
123
131
|
case "all":
|
|
124
|
-
return
|
|
132
|
+
return condition.conditions.every((child) => matchesFlagCondition(child, runFlags));
|
|
125
133
|
case "any":
|
|
126
|
-
return
|
|
134
|
+
return condition.conditions.some((child) => matchesFlagCondition(child, runFlags));
|
|
127
135
|
case "none":
|
|
128
|
-
return !
|
|
136
|
+
return !condition.conditions.some((child) => matchesFlagCondition(child, runFlags));
|
|
129
137
|
case "not-all":
|
|
130
|
-
return !
|
|
138
|
+
return !condition.conditions.every((child) => matchesFlagCondition(child, runFlags));
|
|
139
|
+
case "exactly-one":
|
|
140
|
+
return (
|
|
141
|
+
condition.conditions.filter((child) => matchesFlagCondition(child, runFlags)).length === 1
|
|
142
|
+
);
|
|
143
|
+
case "not":
|
|
144
|
+
return !matchesFlagCondition(condition.condition, runFlags);
|
|
131
145
|
}
|
|
132
146
|
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import type { CheckMessage, CheckOutcome
|
|
1
|
+
import type { CheckMessage, CheckOutcome } from "../../check/check.ts";
|
|
2
2
|
import type { CoreRecord } from "../../check-settlement/facts.ts";
|
|
3
3
|
|
|
4
|
-
/** Private
|
|
4
|
+
/** Private invocation-wide barrier that is independent from per-Check lifecycle facts. */
|
|
5
|
+
export type InvocationLifecycle = Readonly<{
|
|
6
|
+
/** Fires once after Product accepts every flag-control settlement and before Scheduler work. */
|
|
7
|
+
readonly selectionSettled: () => void;
|
|
8
|
+
}>;
|
|
9
|
+
|
|
10
|
+
/** Private per-Check lifecycle presentation and accounting channel. */
|
|
5
11
|
export type CheckExecutionLifecycle = Readonly<{
|
|
6
|
-
/** Fires after the invocation-wide flag-control phase and before Scheduler execution starts. */
|
|
7
|
-
readonly flagControlCompleted: () => void;
|
|
8
12
|
readonly started: (fact: CheckStartedFact) => void;
|
|
9
13
|
readonly settled: (fact: CheckSettledFact) => void;
|
|
10
14
|
}>;
|
|
11
15
|
|
|
12
|
-
export type CheckStartedFact = Readonly<{
|
|
16
|
+
export type CheckStartedFact = Readonly<{
|
|
17
|
+
checkId: string;
|
|
18
|
+
displayName: string;
|
|
19
|
+
omitQuietPassedRow: boolean;
|
|
20
|
+
}>;
|
|
13
21
|
|
|
14
22
|
export type CheckSettledFact = CheckStartedFact &
|
|
15
23
|
Readonly<{
|
|
@@ -17,5 +25,5 @@ export type CheckSettledFact = CheckStartedFact &
|
|
|
17
25
|
messages: readonly CheckMessage[];
|
|
18
26
|
records: readonly CoreRecord[];
|
|
19
27
|
outcome: CheckOutcome;
|
|
20
|
-
|
|
28
|
+
omitQuietPassedRow: boolean;
|
|
21
29
|
}>;
|