@zxyycom/vibe-check 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -5
- package/dist/esm/check/check.mjs +4 -0
- package/dist/esm/check/check.mjs.map +1 -1
- package/dist/esm/check/flag-enablement.mjs +32 -0
- package/dist/esm/check/flag-enablement.mjs.map +1 -0
- package/dist/esm/check/handoff-provider-identity.mjs +18 -0
- package/dist/esm/check/handoff-provider-identity.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +1 -1
- package/dist/esm/check/inherited-collection.mjs.map +1 -1
- package/dist/esm/check/project-changes.mjs +2 -0
- package/dist/esm/check/project-changes.mjs.map +1 -0
- package/dist/esm/check/project-context.mjs +2 -0
- package/dist/esm/check/project-context.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -1
- package/dist/esm/check-settlement/record-store.mjs +1 -1
- package/dist/esm/check-settlement/record-store.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-data.mjs +36 -7
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -1
- package/dist/esm/data-boundary/closed-values.mjs +28 -4
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
- package/dist/esm/{package-checks/project-files → data-boundary}/config-glob.mjs +3 -3
- package/dist/esm/data-boundary/config-glob.mjs.map +1 -0
- package/dist/esm/data-boundary/project-path.mjs +19 -0
- package/dist/esm/data-boundary/project-path.mjs.map +1 -0
- package/dist/esm/index.mjs +12 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs +4 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
- package/dist/esm/package-checks/check-authoring.mjs +69 -0
- package/dist/esm/package-checks/check-authoring.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -1
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -1
- package/dist/esm/package-checks/command-check/command-check.mjs +55 -0
- package/dist/esm/package-checks/command-check/command-check.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/contract.mjs +2 -0
- package/dist/esm/package-checks/command-check/contract.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/execution.mjs +134 -0
- package/dist/esm/package-checks/command-check/execution.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/options.mjs +284 -0
- package/dist/esm/package-checks/command-check/options.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/transcript.mjs +26 -0
- package/dist/esm/package-checks/command-check/transcript.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +2 -4
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs +38 -0
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs +35 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +102 -29
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analysis.mjs +7 -2
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +1 -3
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +3 -2
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +12 -7
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +5 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +12 -5
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +20 -8
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/git.mjs +11 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/path.mjs +1 -17
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/result.mjs +43 -17
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/runner.mjs +7 -5
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +6 -2
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +11 -3
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/local-cache-options.mjs +28 -0
- package/dist/esm/package-checks/local-cache-options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +37 -45
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +3 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +19 -33
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +1 -3
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +3 -18
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +2 -14
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +4 -5
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-lint/adapter.mjs +125 -0
- package/dist/esm/package-checks/markdown-lint/adapter.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs +37 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs +202 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs +16 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs +72 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs +110 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs +74 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs +13 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs +65 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs +14 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +23 -19
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +2 -5
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +22 -6
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-paths.mjs +3 -3
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +11 -15
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/execution.mjs +2 -2
- package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs +46 -7
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +3 -4
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -1
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs +10 -0
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs.map +1 -0
- package/dist/esm/{cache → package-tools/cache}/cache-json-by-key.mjs +13 -14
- package/dist/esm/package-tools/cache/cache-json-by-key.mjs.map +1 -0
- package/dist/esm/package-tools/finding-presentation/finding-presentation.mjs.map +1 -0
- package/dist/esm/{finding-waivers → package-tools/finding-waivers}/reconciliation.mjs +14 -5
- package/dist/esm/package-tools/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/critical-path-ranking.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.mjs +2 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/prediction.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.mjs +4 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/preparation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/recording.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.mjs +8 -8
- package/dist/esm/package-tools/learned-critical-path/duration-model/storage.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.mjs +1 -2
- package/dist/esm/package-tools/learned-critical-path/selection-layers.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/static-decision.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/strategy.mjs +3 -3
- package/dist/esm/package-tools/learned-critical-path/strategy.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +8 -5
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +79 -66
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs +71 -0
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +13 -8
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/resolution.mjs +7 -6
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs +2 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -1
- package/dist/esm/project-definition/project-changes.mjs +70 -0
- package/dist/esm/project-definition/project-changes.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +40 -8
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
- package/dist/esm/project-definition/project-definition.mjs +22 -15
- package/dist/esm/project-definition/project-definition.mjs.map +1 -1
- package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +9 -6
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -1
- package/dist/esm/project-run/aggregation.mjs +42 -59
- package/dist/esm/project-run/aggregation.mjs.map +1 -1
- package/dist/esm/project-run/changes/git.mjs +161 -0
- package/dist/esm/project-run/changes/git.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs +41 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +3 -2
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/dependencies.mjs +80 -5
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +5 -3
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +37 -16
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/flag-controls.mjs +15 -7
- package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/{preflight-result.mjs → preparation-result.mjs} +24 -24
- package/dist/esm/project-run/check-execution/preparation-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/{preflight.mjs → preparation.mjs} +52 -52
- package/dist/esm/project-run/check-execution/preparation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs +71 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +27 -164
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs +79 -0
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +70 -25
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -1
- package/dist/esm/project-run/completion/completion.mjs +18 -1
- package/dist/esm/project-run/completion/completion.mjs.map +1 -1
- package/dist/esm/project-run/controls/contract.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation.mjs +7 -54
- package/dist/esm/project-run/controls/validation.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +3 -3
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidate.mjs +17 -13
- package/dist/esm/project-run/invocation/candidate.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidates.mjs +26 -0
- package/dist/esm/project-run/invocation/candidates.mjs.map +1 -0
- package/dist/esm/project-run/invocation/creation.mjs +7 -3
- package/dist/esm/project-run/invocation/creation.mjs.map +1 -1
- package/dist/esm/project-run/invocation/execution.mjs +98 -0
- package/dist/esm/project-run/invocation/execution.mjs.map +1 -0
- package/dist/esm/project-run/invocation/run.mjs +13 -112
- package/dist/esm/project-run/invocation/run.mjs.map +1 -1
- package/dist/esm/project-run/invocation/scheduler.mjs +13 -6
- package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -1
- package/dist/esm/project-run/outputs/status.mjs +12 -12
- package/dist/esm/project-run/outputs/status.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/presentation.mjs +31 -11
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +11 -4
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +20 -6
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer.mjs +6 -2
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
- package/dist/esm/project-run/project-context.mjs +2 -1
- package/dist/esm/project-run/project-context.mjs.map +1 -1
- package/dist/esm/project-run/result.mjs +2 -2
- package/dist/esm/project-run/result.mjs.map +1 -1
- package/dist/esm/project-run/run.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +9 -4
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +3 -5
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +25 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +8 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +8 -4
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +12 -6
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +3 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +17 -17
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +18 -6
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
- package/docs/api-mechanics.md +147 -28
- package/docs/changelog.md +145 -2
- package/docs/checks/duplicate-detection.md +22 -3
- package/docs/checks/file-metrics.md +25 -6
- package/docs/checks/function-metrics.md +21 -2
- package/docs/checks/json-schema-validation.md +25 -4
- package/docs/checks/json-validation.md +24 -5
- package/docs/checks/maintenance-reminders.md +30 -6
- package/docs/checks/markdown-link-validation.md +24 -4
- package/docs/checks/markdown-lint.md +167 -0
- package/docs/checks/secret-detection.md +31 -7
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +10 -10
- package/docs/guides/building-project-gate.md +706 -0
- package/docs/guides/callbacks.md +81 -22
- package/docs/guides/check-dependencies.md +41 -10
- package/docs/guides/collecting-project-files.md +7 -7
- package/docs/guides/command-check.md +155 -0
- package/docs/guides/data-boundaries.md +140 -0
- package/docs/guides/extending-check-lifecycle.md +77 -25
- package/docs/guides/finding-waivers.md +43 -1
- package/docs/guides/learned-scheduling.md +1 -1
- package/docs/guides/run-outputs.md +35 -9
- package/docs/guides/scheduling.md +15 -15
- package/docs/output.md +6 -5
- package/package.json +2 -1
- package/src/check/check.ts +332 -92
- package/src/check/flag-enablement.ts +76 -0
- package/src/check/handoff-provider-identity.ts +34 -0
- package/src/check/inherited-collection.ts +1 -1
- package/src/check/project-changes.ts +14 -0
- package/src/check/project-context.ts +11 -0
- package/src/check-settlement/facts.ts +1 -1
- package/src/check-settlement/record-store.ts +1 -1
- package/src/data-boundary/canonical-data.ts +36 -9
- package/src/data-boundary/canonical-json.ts +18 -1
- package/src/data-boundary/closed-values.ts +26 -6
- package/src/data-boundary/config-glob.ts +17 -0
- package/src/data-boundary/project-path.ts +21 -0
- package/src/index.ts +72 -11
- package/src/machine-output/v4/atomic-publication.ts +3 -1
- package/src/package-checks/check-authoring.ts +136 -0
- package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +1 -1
- package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +1 -1
- package/src/package-checks/command-check/command-check.ts +152 -0
- package/src/package-checks/command-check/contract.ts +168 -0
- package/src/package-checks/command-check/execution.ts +211 -0
- package/src/package-checks/command-check/options.ts +331 -0
- package/src/package-checks/command-check/transcript.ts +35 -0
- package/src/package-checks/duplicate-detection/default-check.ts +37 -6
- package/src/package-checks/duplicate-detection/execution.ts +2 -4
- package/src/package-checks/duplicate-detection/finding-messages.ts +2 -2
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
- package/src/package-checks/duplicate-detection/options.ts +6 -3
- package/src/package-checks/duplicate-detection/records.ts +1 -1
- package/src/package-checks/file-metrics/constructor.ts +29 -6
- package/src/package-checks/file-metrics/execution.ts +2 -4
- package/src/package-checks/file-metrics/finding-messages.ts +1 -1
- package/src/package-checks/file-metrics/options.ts +6 -3
- package/src/package-checks/file-metrics/records.ts +1 -1
- package/src/package-checks/file-metrics/scc/availability.ts +1 -1
- package/src/package-checks/file-metrics/scc/batch-planner.ts +56 -0
- package/src/package-checks/file-metrics/scc/logical-scan-resources.ts +59 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +134 -32
- package/src/package-checks/function-metrics/analysis.ts +7 -2
- package/src/package-checks/function-metrics/analyzer/analysis-model.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/extension-output.ts +14 -6
- package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +1 -3
- package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +3 -3
- package/src/package-checks/function-metrics/analyzer/pipeline.ts +4 -2
- package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +6 -6
- package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/readers/objc.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +14 -7
- package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +8 -4
- package/src/package-checks/function-metrics/analyzer/readers/python.ts +4 -3
- package/src/package-checks/function-metrics/analyzer/readers/r.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/zig.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +3 -1
- package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +10 -5
- package/src/package-checks/function-metrics/analyzer-worker-port.ts +20 -6
- package/src/package-checks/function-metrics/constructor.ts +30 -7
- package/src/package-checks/function-metrics/execution.ts +2 -4
- package/src/package-checks/function-metrics/finding-messages.ts +2 -2
- package/src/package-checks/function-metrics/measurement.ts +3 -1
- package/src/package-checks/function-metrics/options.ts +6 -3
- package/src/package-checks/function-metrics/records.ts +1 -1
- package/src/package-checks/host-environment/git.ts +11 -0
- package/src/package-checks/host-environment/path.ts +1 -20
- package/src/package-checks/host-environment/process/contract.ts +17 -9
- package/src/package-checks/host-environment/process/result.ts +48 -20
- package/src/package-checks/host-environment/process/runner.ts +8 -4
- package/src/package-checks/json-schema-validation/default-check.ts +38 -5
- package/src/package-checks/json-schema-validation/options.ts +4 -1
- package/src/package-checks/json-schema-validation/reference-resolver.ts +6 -2
- package/src/package-checks/json-schema-validation/schema-policy.ts +10 -5
- package/src/package-checks/json-validation/default-check.ts +27 -6
- package/src/package-checks/json-validation/options.ts +4 -1
- package/src/package-checks/local-cache-options.ts +40 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +89 -9
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +3 -3
- package/src/package-checks/markdown-link-validation/default-check.ts +48 -5
- package/src/package-checks/markdown-link-validation/execution.ts +1 -1
- package/src/package-checks/markdown-link-validation/finding-messages.ts +1 -1
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +1 -5
- package/src/package-checks/markdown-link-validation/options-resolution.ts +2 -19
- package/src/package-checks/markdown-link-validation/options-validation.ts +2 -17
- package/src/package-checks/markdown-link-validation/options.ts +6 -7
- package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +4 -5
- package/src/package-checks/markdown-lint/adapter.ts +167 -0
- package/src/package-checks/markdown-lint/default-check.ts +92 -0
- package/src/package-checks/markdown-lint/execution.ts +266 -0
- package/src/package-checks/markdown-lint/final-data.ts +33 -0
- package/src/package-checks/markdown-lint/finding-messages.ts +87 -0
- package/src/package-checks/markdown-lint/finding-waiver-identity.ts +54 -0
- package/src/package-checks/markdown-lint/findings-cache.ts +141 -0
- package/src/package-checks/markdown-lint/options-resolution.ts +102 -0
- package/src/package-checks/markdown-lint/options-validation.ts +50 -0
- package/src/package-checks/markdown-lint/options.ts +82 -0
- package/src/package-checks/markdown-lint/records.ts +132 -0
- package/src/package-checks/markdown-lint/unavailable-reasons.ts +33 -0
- package/src/package-checks/project-files/collection.ts +38 -22
- package/src/package-checks/project-files/config-glob.ts +1 -17
- package/src/package-checks/project-files/configuration.ts +1 -1
- package/src/package-checks/project-files/gitlink-revision.ts +4 -6
- package/src/package-checks/project-files/gitlink-worktree.ts +35 -7
- package/src/package-checks/project-files/public-collection.ts +1 -1
- package/src/package-checks/project-files/revision-paths.ts +3 -3
- package/src/package-checks/project-files/revision-worktree-files.ts +16 -16
- package/src/package-checks/secret-detection/default-check.ts +29 -6
- package/src/package-checks/secret-detection/execution.ts +2 -2
- package/src/package-checks/secret-detection/input-preparation.ts +64 -7
- package/src/package-checks/secret-detection/options.ts +5 -2
- package/src/package-checks/secret-detection/records.ts +1 -1
- package/src/package-checks/secret-detection/secretlint/adapter.ts +3 -4
- package/src/package-tools/admission-policy/define-admission-policy.ts +54 -0
- package/src/{cache → package-tools/cache}/cache-json-by-key.ts +13 -17
- package/src/{check → package-tools/finding-presentation}/finding-presentation.ts +3 -1
- package/src/{finding-waivers → package-tools/finding-waivers}/reconciliation.ts +16 -8
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.ts +5 -2
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.ts +5 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.ts +5 -4
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts +9 -10
- package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts +2 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts +1 -1
- package/src/{learned-critical-path → package-tools/learned-critical-path}/strategy.ts +7 -4
- package/src/project-definition/check-tree/authoring.ts +15 -8
- package/src/project-definition/check-tree/check-fields-authoring.ts +106 -91
- package/src/project-definition/check-tree/flag-conditions.ts +99 -0
- package/src/project-definition/check-tree/materialization.ts +12 -8
- package/src/project-definition/check-tree/resolution.ts +13 -15
- package/src/project-definition/declarative-snapshot.ts +9 -2
- package/src/project-definition/project-changes.ts +112 -0
- package/src/project-definition/project-definition-validation.ts +58 -10
- package/src/project-definition/project-definition.ts +41 -68
- package/src/project-definition/scheduler-policy.ts +6 -3
- package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +11 -8
- package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +2 -2
- package/src/project-run/aggregation.ts +51 -74
- package/src/project-run/changes/git.ts +206 -0
- package/src/project-run/check-execution/admitted-check-execution.ts +62 -0
- package/src/project-run/check-execution/callback.ts +3 -2
- package/src/project-run/check-execution/dependencies.ts +120 -6
- package/src/project-run/check-execution/execution-finalization.ts +6 -4
- package/src/project-run/check-execution/execution-settlement.ts +88 -29
- package/src/project-run/check-execution/flag-controls.ts +22 -8
- package/src/project-run/check-execution/lifecycle.ts +14 -6
- package/src/project-run/check-execution/{preflight-result.ts → preparation-result.ts} +34 -32
- package/src/project-run/check-execution/{preflight.ts → preparation.ts} +92 -84
- package/src/project-run/check-execution/ready-check-execution.ts +97 -0
- package/src/project-run/check-execution/resolved-checks.ts +40 -219
- package/src/project-run/check-execution/scheduled-check-run.ts +119 -0
- package/src/project-run/check-execution/terminal-result.ts +108 -29
- package/src/project-run/completion/completion.ts +17 -3
- package/src/project-run/controls/contract.ts +6 -16
- package/src/project-run/controls/validation.ts +7 -60
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +1 -2
- package/src/project-run/diagnostic-logging/observation-rendering.ts +1 -1
- package/src/project-run/invocation/candidate.ts +28 -15
- package/src/project-run/invocation/candidates.ts +56 -0
- package/src/project-run/invocation/creation.ts +7 -3
- package/src/project-run/invocation/execution.ts +136 -0
- package/src/project-run/invocation/run.ts +15 -179
- package/src/project-run/invocation/scheduler.ts +13 -6
- package/src/project-run/outputs/status.ts +15 -15
- package/src/project-run/progress-rendering/presentation.ts +35 -13
- package/src/project-run/progress-rendering/renderer-formatting.ts +20 -7
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +23 -6
- package/src/project-run/progress-rendering/renderer.ts +10 -4
- package/src/project-run/project-context.ts +8 -4
- package/src/project-run/result.ts +5 -5
- package/src/project-run/run.ts +1 -1
- package/src/project-run/task-scheduler/admission-core/compiled-graph-lookup.ts +71 -0
- package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +9 -4
- package/src/project-run/task-scheduler/admission-core/selection-query.ts +6 -4
- package/src/project-run/task-scheduler/admission-core/selection-seed.ts +36 -6
- package/src/project-run/task-scheduler/admission-core/selection-transition.ts +17 -8
- package/src/project-run/task-scheduler/execution-state.ts +4 -4
- package/src/project-run/task-scheduler/measurement/diagnostics.ts +10 -4
- package/src/project-run/task-scheduler/measurement/timing.ts +13 -5
- package/src/project-run/task-scheduler/scheduler-observation.ts +3 -1
- package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +24 -22
- package/src/project-run/task-scheduler/scheduler.ts +23 -6
- package/types/check/check.d.ts +178 -67
- package/types/check/flag-enablement.d.ts +42 -0
- package/types/check/handoff-provider-identity.d.ts +12 -0
- package/types/check/project-changes.d.ts +13 -0
- package/types/check/project-context.d.ts +10 -0
- package/types/check-settlement/facts.d.ts +1 -1
- package/types/data-boundary/canonical-data.d.ts +28 -5
- package/types/data-boundary/canonical-json.d.ts +18 -1
- package/types/data-boundary/closed-values.d.ts +17 -1
- package/types/data-boundary/config-glob.d.ts +5 -0
- package/types/data-boundary/project-path.d.ts +4 -0
- package/types/index.d.ts +27 -11
- package/types/package-checks/check-authoring.d.ts +45 -0
- package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +1 -1
- package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +1 -1
- package/types/package-checks/command-check/command-check.d.ts +48 -0
- package/types/package-checks/command-check/contract.d.ts +108 -0
- package/types/package-checks/command-check/execution.d.ts +7 -0
- package/types/package-checks/command-check/options.d.ts +11 -0
- package/types/package-checks/command-check/transcript.d.ts +8 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +5 -2
- package/types/package-checks/duplicate-detection/finding-messages.d.ts +1 -1
- package/types/package-checks/duplicate-detection/options.d.ts +4 -3
- package/types/package-checks/duplicate-detection/records.d.ts +1 -1
- package/types/package-checks/file-metrics/constructor.d.ts +5 -2
- package/types/package-checks/file-metrics/options.d.ts +4 -3
- package/types/package-checks/file-metrics/records.d.ts +1 -1
- package/types/package-checks/file-metrics/scc/batch-planner.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/logical-scan-resources.d.ts +14 -0
- package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +3 -3
- package/types/package-checks/function-metrics/constructor.d.ts +5 -2
- package/types/package-checks/function-metrics/finding-messages.d.ts +1 -1
- package/types/package-checks/function-metrics/options.d.ts +4 -3
- package/types/package-checks/function-metrics/records.d.ts +1 -1
- package/types/package-checks/host-environment/git.d.ts +2 -0
- package/types/package-checks/host-environment/path.d.ts +1 -3
- package/types/package-checks/host-environment/process/contract.d.ts +17 -9
- package/types/package-checks/json-schema-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-schema-validation/options.d.ts +2 -1
- package/types/package-checks/json-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-validation/options.d.ts +2 -1
- package/types/package-checks/local-cache-options.d.ts +9 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +11 -2
- package/types/package-checks/markdown-link-validation/default-check.d.ts +4 -1
- package/types/package-checks/markdown-link-validation/options.d.ts +4 -7
- package/types/package-checks/markdown-lint/adapter.d.ts +10 -0
- package/types/package-checks/markdown-lint/default-check.d.ts +37 -0
- package/types/package-checks/markdown-lint/execution.d.ts +24 -0
- package/types/package-checks/markdown-lint/final-data.d.ts +8 -0
- package/types/package-checks/markdown-lint/finding-messages.d.ts +6 -0
- package/types/package-checks/markdown-lint/finding-waiver-identity.d.ts +3 -0
- package/types/package-checks/markdown-lint/findings-cache.d.ts +17 -0
- package/types/package-checks/markdown-lint/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-lint/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-lint/options.d.ts +65 -0
- package/types/package-checks/markdown-lint/records.d.ts +39 -0
- package/types/package-checks/markdown-lint/unavailable-reasons.d.ts +3 -0
- package/types/package-checks/secret-detection/default-check.d.ts +4 -1
- package/types/package-checks/secret-detection/options.d.ts +3 -2
- package/types/package-tools/admission-policy/define-admission-policy.d.ts +26 -0
- package/types/{check → package-tools/finding-presentation}/finding-presentation.d.ts +3 -1
- package/types/{finding-waivers → package-tools/finding-waivers}/reconciliation.d.ts +3 -3
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.d.ts +2 -2
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/static-decision.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/strategy.d.ts +1 -1
- package/types/project-definition/check-tree/authoring.d.ts +5 -3
- package/types/project-definition/check-tree/check-fields-authoring.d.ts +12 -7
- package/types/project-definition/check-tree/flag-conditions.d.ts +5 -0
- package/types/project-definition/check-tree/resolution.d.ts +6 -4
- package/types/project-definition/declarative-snapshot.d.ts +4 -1
- package/types/project-definition/project-changes.d.ts +30 -0
- package/types/project-definition/project-definition.d.ts +15 -30
- package/types/project-definition/scheduler-policy.d.ts +3 -3
- package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +2 -2
- package/types/project-run/aggregation.d.ts +8 -6
- package/types/project-run/changes/git.d.ts +14 -0
- package/types/project-run/check-execution/admitted-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/dependencies.d.ts +3 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +1 -1
- package/types/project-run/check-execution/execution-settlement.d.ts +15 -7
- package/types/project-run/check-execution/flag-controls.d.ts +1 -1
- package/types/project-run/check-execution/lifecycle.d.ts +9 -5
- package/types/project-run/check-execution/{preflight-result.d.ts → preparation-result.d.ts} +3 -3
- package/types/project-run/check-execution/{preflight.d.ts → preparation.d.ts} +10 -9
- package/types/project-run/check-execution/ready-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +12 -13
- package/types/project-run/check-execution/scheduled-check-run.d.ts +10 -0
- package/types/project-run/check-execution/terminal-result.d.ts +13 -1
- package/types/project-run/completion/completion.d.ts +3 -1
- package/types/project-run/controls/contract.d.ts +6 -16
- package/types/project-run/invocation/candidates.d.ts +8 -0
- package/types/project-run/invocation/execution.d.ts +5 -0
- package/types/project-run/invocation/run.d.ts +2 -2
- package/types/project-run/outputs/status.d.ts +4 -4
- package/types/project-run/progress-rendering/presentation.d.ts +4 -3
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +5 -2
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +2 -0
- package/types/project-run/progress-rendering/renderer.d.ts +4 -2
- package/types/project-run/project-context.d.ts +3 -3
- package/types/project-run/result.d.ts +3 -3
- package/types/project-run/run.d.ts +1 -1
- package/types/project-run/task-scheduler/admission-core/compiled-graph-lookup.d.ts +10 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +4 -4
- package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +2 -2
- package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +1 -1
- package/dist/esm/cache/cache-json-by-key.mjs.map +0 -1
- package/dist/esm/check/finding-presentation.mjs.map +0 -1
- package/dist/esm/finding-waivers/reconciliation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +0 -1
- package/dist/esm/learned-critical-path/selection-layers.mjs.map +0 -1
- package/dist/esm/learned-critical-path/static-decision.mjs.map +0 -1
- package/dist/esm/learned-critical-path/strategy.mjs.map +0 -1
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight.mjs.map +0 -1
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +0 -1
- package/types/package-checks/project-files/config-glob.d.ts +0 -5
- /package/dist/esm/{check → package-tools/finding-presentation}/finding-presentation.mjs +0 -0
- /package/dist/esm/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/static-decision.mjs +0 -0
- /package/src/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.ts +0 -0
- /package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.ts +0 -0
- /package/types/{cache → package-tools/cache}/cache-json-by-key.d.ts +0 -0
- /package/types/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
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
|
import type { ResolvedProgressRenderingOutput } from "../../project-definition/project-definition.ts";
|
|
4
4
|
import { resolveProgressRenderingOutput } from "../../project-definition/output-defaults.ts";
|
|
@@ -15,6 +15,7 @@ export interface ProgressWriter {
|
|
|
15
15
|
export type ProgressFeedback = Readonly<
|
|
16
16
|
| {
|
|
17
17
|
readonly kind: "prepared";
|
|
18
|
+
readonly quietPassOmissionConfiguredCount: number;
|
|
18
19
|
readonly totalChecks: number;
|
|
19
20
|
}
|
|
20
21
|
| {
|
|
@@ -24,6 +25,7 @@ export type ProgressFeedback = Readonly<
|
|
|
24
25
|
readonly kind: "started";
|
|
25
26
|
readonly checkId: string;
|
|
26
27
|
readonly displayName: string;
|
|
28
|
+
readonly omitQuietPassedRow: boolean;
|
|
27
29
|
}
|
|
28
30
|
| {
|
|
29
31
|
readonly kind: "settled";
|
|
@@ -31,7 +33,7 @@ export type ProgressFeedback = Readonly<
|
|
|
31
33
|
readonly displayName: string;
|
|
32
34
|
readonly outcome: CheckOutcome;
|
|
33
35
|
readonly durationMs: number | null;
|
|
34
|
-
readonly
|
|
36
|
+
readonly omitQuietPassedRow: boolean;
|
|
35
37
|
readonly messages: readonly CheckMessage[];
|
|
36
38
|
readonly records: readonly CoreRecord[];
|
|
37
39
|
}
|
|
@@ -73,7 +75,11 @@ export function createProgressRenderer(
|
|
|
73
75
|
const controller = new ProgressRendererController(writer, clock, progressRendering);
|
|
74
76
|
return Object.freeze({
|
|
75
77
|
refreshesRunningRegion: controller.refreshesRunningRegion,
|
|
76
|
-
refresh: (): void =>
|
|
77
|
-
|
|
78
|
+
refresh: (): void => {
|
|
79
|
+
controller.refresh();
|
|
80
|
+
},
|
|
81
|
+
render: (feedback: ProgressFeedback): void => {
|
|
82
|
+
controller.render(feedback);
|
|
83
|
+
}
|
|
78
84
|
});
|
|
79
85
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import type { CheckProjectContext } from "../check/check.ts";
|
|
2
|
-
import type { RunControls } from "./controls/contract.ts";
|
|
1
|
+
import type { CheckProjectContext, ProjectChanges } from "../check/check.ts";
|
|
3
2
|
import type { ResolvedInvocationPaths } from "./invocation/paths.ts";
|
|
4
3
|
/** Materializes only invocation-wide callback input; Check-local options own domain configuration. */
|
|
5
4
|
export function createProjectContext(
|
|
6
|
-
input: Readonly<{
|
|
5
|
+
input: Readonly<{
|
|
6
|
+
readonly changes?: ProjectChanges;
|
|
7
|
+
readonly flags: readonly string[];
|
|
8
|
+
readonly paths: ResolvedInvocationPaths;
|
|
9
|
+
}>
|
|
7
10
|
): CheckProjectContext {
|
|
8
11
|
return Object.freeze({
|
|
9
|
-
|
|
12
|
+
...(input.changes === undefined ? {} : { changes: input.changes }),
|
|
13
|
+
flags: input.flags,
|
|
10
14
|
root: input.paths.projectRoot
|
|
11
15
|
});
|
|
12
16
|
}
|
|
@@ -41,8 +41,8 @@ export interface CheckRunMessage {
|
|
|
41
41
|
|
|
42
42
|
/** 只有已形成 terminal Check facts 的 Run branch 才具备的完整结果 readback。 */
|
|
43
43
|
export interface RunResultFacts {
|
|
44
|
-
/**
|
|
45
|
-
readonly aggregate: CheckAggregate
|
|
44
|
+
/** 有完整 terminal Check facts 时,由有效 Check 列表形成的 invocation-level conclusion。 */
|
|
45
|
+
readonly aggregate: CheckAggregate;
|
|
46
46
|
/** 按 canonical Check order 的 duration facts;未执行 Check 仍以 `null` 保留。 */
|
|
47
47
|
readonly checkDurations: readonly CheckDuration[];
|
|
48
48
|
/** 已接受的 author 与 console-capture messages,不决定 Check outcome。 */
|
|
@@ -122,7 +122,7 @@ export type RunResult = Readonly<
|
|
|
122
122
|
| "machine-publication-failed"
|
|
123
123
|
| "progress-rendering-failed"
|
|
124
124
|
| "diagnostic-logging-failed"
|
|
125
|
-
| "scheduler-
|
|
125
|
+
| "scheduler-terminal-effects-failed";
|
|
126
126
|
}>;
|
|
127
127
|
readonly outputs: RunOutputStatuses;
|
|
128
128
|
} & RunResultFacts)
|
|
@@ -159,8 +159,8 @@ function outputDiagnosticCode(
|
|
|
159
159
|
return "progress-rendering-failed";
|
|
160
160
|
case "diagnosticLogging":
|
|
161
161
|
return "diagnostic-logging-failed";
|
|
162
|
-
case "
|
|
163
|
-
return "scheduler-
|
|
162
|
+
case "terminalEffects":
|
|
163
|
+
return "scheduler-terminal-effects-failed";
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
package/src/project-run/run.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type { RunDiagnostic, RunResult } from "./result.ts";
|
|
|
15
15
|
* @param controls - 本次 invocation context 与 outputs 使用的闭合控制值。
|
|
16
16
|
* @returns ordinary configuration、planning、execution、cancellation 与 output failures 通过 `RunResult`
|
|
17
17
|
* 返回;调用方先按 `kind` narrow。
|
|
18
|
-
* @remarks Definition validation 关闭 authoring grammar;可选 Check
|
|
18
|
+
* @remarks Definition validation 关闭 authoring grammar;可选 Check preparation 在其 Task 通过直接 relation
|
|
19
19
|
* readiness 后被 Scheduler admission 时运行,并先于该 Check 自己的 execution callback。它受该 Task 的
|
|
20
20
|
* mutex、capacity、priority 与 cancellation 约束,而不是 invocation-wide barrier。`output` branch 同时提供
|
|
21
21
|
* 完整 final snapshot 与 output failure diagnostic。
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** Required accessors for compiler-owned dense slot indexes. */
|
|
2
|
+
|
|
3
|
+
import type { PlannedTask } from "../graph.ts";
|
|
4
|
+
import type { CompiledAdmissionGraph } from "./compiled-graph.ts";
|
|
5
|
+
|
|
6
|
+
export function requiredTaskForCompiled(
|
|
7
|
+
compiled: CompiledAdmissionGraph,
|
|
8
|
+
taskSlot: number
|
|
9
|
+
): PlannedTask {
|
|
10
|
+
const task = compiled.graph.tasks[taskSlot];
|
|
11
|
+
if (task === undefined) throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
12
|
+
return task;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function requiredTaskMutexSlotsForCompiled(
|
|
16
|
+
compiled: CompiledAdmissionGraph,
|
|
17
|
+
taskSlot: number
|
|
18
|
+
): CompiledAdmissionGraph["taskMutexSlots"][number] {
|
|
19
|
+
const slots = compiled.taskMutexSlots[taskSlot];
|
|
20
|
+
if (slots === undefined) throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
21
|
+
return slots;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function requiredTaskResourceClaimsForCompiled(
|
|
25
|
+
compiled: CompiledAdmissionGraph,
|
|
26
|
+
taskSlot: number
|
|
27
|
+
): CompiledAdmissionGraph["taskResourceClaims"][number] {
|
|
28
|
+
const claims = compiled.taskResourceClaims[taskSlot];
|
|
29
|
+
if (claims === undefined) throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
30
|
+
return claims;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function requiredReverseDependenciesForCompiled(
|
|
34
|
+
compiled: CompiledAdmissionGraph,
|
|
35
|
+
taskSlot: number
|
|
36
|
+
): CompiledAdmissionGraph["relationIndexes"]["reverseDependencies"][number] {
|
|
37
|
+
const dependencies = compiled.relationIndexes.reverseDependencies[taskSlot];
|
|
38
|
+
if (dependencies === undefined)
|
|
39
|
+
throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
40
|
+
return dependencies;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function requiredReverseObservationsForCompiled(
|
|
44
|
+
compiled: CompiledAdmissionGraph,
|
|
45
|
+
taskSlot: number
|
|
46
|
+
): CompiledAdmissionGraph["relationIndexes"]["reverseObservations"][number] {
|
|
47
|
+
const observations = compiled.relationIndexes.reverseObservations[taskSlot];
|
|
48
|
+
if (observations === undefined)
|
|
49
|
+
throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
50
|
+
return observations;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function requiredReverseMutexOccurrencesForCompiled(
|
|
54
|
+
compiled: CompiledAdmissionGraph,
|
|
55
|
+
mutexSlot: number
|
|
56
|
+
): CompiledAdmissionGraph["relationIndexes"]["reverseMutexOccurrences"][number] {
|
|
57
|
+
const occurrences = compiled.relationIndexes.reverseMutexOccurrences[mutexSlot];
|
|
58
|
+
if (occurrences === undefined) {
|
|
59
|
+
throw new Error(`admission core mutex slot is unknown: ${mutexSlot}`);
|
|
60
|
+
}
|
|
61
|
+
return occurrences;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function requiredScopeTerminalSlotsForCompiled(
|
|
65
|
+
compiled: CompiledAdmissionGraph,
|
|
66
|
+
taskSlot: number
|
|
67
|
+
): CompiledAdmissionGraph["scopeSlotsByTerminalTaskSlot"][number] {
|
|
68
|
+
const scopeSlots = compiled.scopeSlotsByTerminalTaskSlot[taskSlot];
|
|
69
|
+
if (scopeSlots === undefined) throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
70
|
+
return scopeSlots;
|
|
71
|
+
}
|
|
@@ -252,12 +252,17 @@ function compilePublicTaskOrder(
|
|
|
252
252
|
graph: PlannedTaskGraph,
|
|
253
253
|
taskSlotsById: ReadonlyMap<string, number>
|
|
254
254
|
): PublicTaskOrder {
|
|
255
|
+
const taskIdsInPublicOrder = Object.freeze(graph.tasks.map((task) => task.id).sort(compareText));
|
|
255
256
|
return {
|
|
256
|
-
taskIdsInPublicOrder
|
|
257
|
+
taskIdsInPublicOrder,
|
|
257
258
|
taskSlotsInPublicOrder: Object.freeze(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
taskIdsInPublicOrder.map((taskId) => {
|
|
260
|
+
const taskSlot = taskSlotsById.get(taskId);
|
|
261
|
+
if (taskSlot === undefined) {
|
|
262
|
+
throw new Error(`admission core task is missing from public order: ${taskId}`);
|
|
263
|
+
}
|
|
264
|
+
return taskSlot;
|
|
265
|
+
})
|
|
261
266
|
)
|
|
262
267
|
};
|
|
263
268
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { AdmissionSelectionRejectionReason } from "../../../project-definition/scheduler-policy.ts";
|
|
2
2
|
import type { CompiledAdmissionGraph } from "./compiled-graph.ts";
|
|
3
|
+
import {
|
|
4
|
+
requiredTaskForCompiled,
|
|
5
|
+
requiredTaskResourceClaimsForCompiled
|
|
6
|
+
} from "./compiled-graph-lookup.ts";
|
|
3
7
|
import {
|
|
4
8
|
numberFor,
|
|
5
9
|
statusForSelection,
|
|
@@ -32,9 +36,7 @@ export function isCoreComplete(state: SelectionCoreState): boolean {
|
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
export function requiredTaskForCore(state: SelectionCoreState, taskSlot: number): PlannedTask {
|
|
35
|
-
|
|
36
|
-
if (task === undefined) throw new Error(`admission core task slot is unknown: ${taskSlot}`);
|
|
37
|
-
return task;
|
|
39
|
+
return requiredTaskForCompiled(state.compiled, taskSlot);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
export function requiredTaskSlotForCore(state: SelectionCoreState, taskId: string): number {
|
|
@@ -165,7 +167,7 @@ function resourceCapacityRejectionFor(
|
|
|
165
167
|
AdmissionSelectionRejectionReason,
|
|
166
168
|
{ readonly kind: "resource-capacity-insufficient" }
|
|
167
169
|
>["resources"][number][] = [];
|
|
168
|
-
for (const claim of state.compiled
|
|
170
|
+
for (const claim of requiredTaskResourceClaimsForCompiled(state.compiled, taskSlot)) {
|
|
169
171
|
const capacity = state.compiled.resourceCapacityBySlot[claim.resourceSlot];
|
|
170
172
|
const inUse = numberFor(state.selection.resourceInUse, claim.resourceSlot);
|
|
171
173
|
if (capacity === undefined) {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { CompiledAdmissionGraph } from "./compiled-graph.ts";
|
|
2
|
+
import {
|
|
3
|
+
requiredTaskMutexSlotsForCompiled,
|
|
4
|
+
requiredTaskResourceClaimsForCompiled
|
|
5
|
+
} from "./compiled-graph-lookup.ts";
|
|
2
6
|
import {
|
|
3
7
|
forcedQueueFromTaskSlots,
|
|
4
8
|
freezeSelectionIndex,
|
|
@@ -68,9 +72,11 @@ function seedTaskCounters(
|
|
|
68
72
|
if (status.kind === "pending" || status.kind === "running") remainingTaskCount += 1;
|
|
69
73
|
if (status.kind === "running") {
|
|
70
74
|
runningTotal += 1;
|
|
71
|
-
for (const mutexSlot of compiled
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
for (const mutexSlot of requiredTaskMutexSlotsForCompiled(compiled, taskSlot)) {
|
|
76
|
+
incrementCounter(mutexHolders, mutexSlot, 1, "mutex holder");
|
|
77
|
+
}
|
|
78
|
+
for (const claim of requiredTaskResourceClaimsForCompiled(compiled, taskSlot)) {
|
|
79
|
+
incrementCounter(resourceInUse, claim.resourceSlot, claim.units, "resource usage");
|
|
74
80
|
}
|
|
75
81
|
}
|
|
76
82
|
appendDependencyCountsForSeed(
|
|
@@ -140,14 +146,38 @@ function heldMutexBlockersForSeed(
|
|
|
140
146
|
const blockers = compiled.graph.tasks.map(() => 0);
|
|
141
147
|
const legacyHeldMutexes = new Set(legacyRunningMutexes);
|
|
142
148
|
for (const [taskSlot, task] of compiled.graph.tasks.entries()) {
|
|
143
|
-
for (const [mutexOccurrence, mutexSlot] of
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
for (const [mutexOccurrence, mutexSlot] of requiredTaskMutexSlotsForCompiled(
|
|
150
|
+
compiled,
|
|
151
|
+
taskSlot
|
|
152
|
+
).entries()) {
|
|
153
|
+
const holderCount = mutexHolders[mutexSlot];
|
|
154
|
+
if (holderCount === undefined) {
|
|
155
|
+
throw new Error(`admission core mutex slot is unknown: ${mutexSlot}`);
|
|
156
|
+
}
|
|
157
|
+
incrementCounter(blockers, taskSlot, holderCount, "mutex blocker");
|
|
158
|
+
const mutexId = task.mutex[mutexOccurrence];
|
|
159
|
+
if (mutexId === undefined) {
|
|
160
|
+
throw new Error(`admission core mutex occurrence is unknown: ${mutexOccurrence}`);
|
|
161
|
+
}
|
|
162
|
+
if (legacyHeldMutexes.has(mutexId)) incrementCounter(blockers, taskSlot, 1, "mutex blocker");
|
|
146
163
|
}
|
|
147
164
|
}
|
|
148
165
|
return blockers;
|
|
149
166
|
}
|
|
150
167
|
|
|
168
|
+
function incrementCounter(
|
|
169
|
+
values: number[],
|
|
170
|
+
slot: number,
|
|
171
|
+
amount: number,
|
|
172
|
+
counterName: string
|
|
173
|
+
): void {
|
|
174
|
+
const current = values[slot];
|
|
175
|
+
if (current === undefined) {
|
|
176
|
+
throw new Error(`admission core ${counterName} slot is unknown: ${slot}`);
|
|
177
|
+
}
|
|
178
|
+
values[slot] = current + amount;
|
|
179
|
+
}
|
|
180
|
+
|
|
151
181
|
function seedActiveScopes(
|
|
152
182
|
compiled: CompiledAdmissionGraph,
|
|
153
183
|
activeScopeIds: readonly string[] | undefined
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { CompiledAdmissionGraph } from "./compiled-graph.ts";
|
|
2
|
+
import {
|
|
3
|
+
requiredReverseDependenciesForCompiled,
|
|
4
|
+
requiredReverseMutexOccurrencesForCompiled,
|
|
5
|
+
requiredReverseObservationsForCompiled,
|
|
6
|
+
requiredScopeTerminalSlotsForCompiled,
|
|
7
|
+
requiredTaskMutexSlotsForCompiled,
|
|
8
|
+
requiredTaskResourceClaimsForCompiled
|
|
9
|
+
} from "./compiled-graph-lookup.ts";
|
|
2
10
|
import {
|
|
3
11
|
enqueueForcedTaskSlots,
|
|
4
12
|
freezeSelectionIndex,
|
|
@@ -124,7 +132,7 @@ function withResourceClaimDelta(
|
|
|
124
132
|
): NumberStore {
|
|
125
133
|
return withNumberDeltas(
|
|
126
134
|
resourceInUse,
|
|
127
|
-
compiled
|
|
135
|
+
requiredTaskResourceClaimsForCompiled(compiled, taskSlot).map(
|
|
128
136
|
({ resourceSlot, units }) => [resourceSlot, direction * units] as const
|
|
129
137
|
)
|
|
130
138
|
);
|
|
@@ -138,7 +146,9 @@ function withMutexHolderDelta(
|
|
|
138
146
|
): NumberStore {
|
|
139
147
|
return withNumberDeltas(
|
|
140
148
|
mutexHolders,
|
|
141
|
-
compiled
|
|
149
|
+
requiredTaskMutexSlotsForCompiled(compiled, taskSlot).map(
|
|
150
|
+
(mutexSlot) => [mutexSlot, delta] as const
|
|
151
|
+
)
|
|
142
152
|
);
|
|
143
153
|
}
|
|
144
154
|
|
|
@@ -157,9 +167,8 @@ function mutexBlockerDeltasFor(
|
|
|
157
167
|
delta: 1 | -1
|
|
158
168
|
): readonly (readonly [number, number])[] {
|
|
159
169
|
const deltas: [number, number][] = [];
|
|
160
|
-
for (const mutexSlot of compiled
|
|
161
|
-
for (const blockedTaskSlot of compiled
|
|
162
|
-
[]) {
|
|
170
|
+
for (const mutexSlot of requiredTaskMutexSlotsForCompiled(compiled, taskSlot)) {
|
|
171
|
+
for (const blockedTaskSlot of requiredReverseMutexOccurrencesForCompiled(compiled, mutexSlot)) {
|
|
163
172
|
deltas.push([blockedTaskSlot, delta]);
|
|
164
173
|
}
|
|
165
174
|
}
|
|
@@ -173,7 +182,7 @@ function applySettlementRelationDelta(
|
|
|
173
182
|
): void {
|
|
174
183
|
const { previous, status, taskSlot } = facts;
|
|
175
184
|
if (previous.kind === "settled" || status.kind !== "settled") return;
|
|
176
|
-
const reverseDependencies = compiled
|
|
185
|
+
const reverseDependencies = requiredReverseDependenciesForCompiled(compiled, taskSlot);
|
|
177
186
|
facts.pendingDependencies = withNumberDeltas(
|
|
178
187
|
facts.pendingDependencies,
|
|
179
188
|
reverseDependencies.map((dependentSlot) => [dependentSlot, -1] as const)
|
|
@@ -186,7 +195,7 @@ function applySettlementRelationDelta(
|
|
|
186
195
|
}
|
|
187
196
|
facts.pendingObservations = withNumberDeltas(
|
|
188
197
|
facts.pendingObservations,
|
|
189
|
-
compiled
|
|
198
|
+
requiredReverseObservationsForCompiled(compiled, taskSlot).map(
|
|
190
199
|
(observerSlot) => [observerSlot, -1] as const
|
|
191
200
|
)
|
|
192
201
|
);
|
|
@@ -228,7 +237,7 @@ function applyScopeLifecycleDelta(
|
|
|
228
237
|
);
|
|
229
238
|
}
|
|
230
239
|
if (previous.kind === "settled" || status.kind !== "settled") return;
|
|
231
|
-
for (const scopeSlot of compiled
|
|
240
|
+
for (const scopeSlot of requiredScopeTerminalSlotsForCompiled(compiled, taskSlot)) {
|
|
232
241
|
facts.activeScopeSlots = Object.freeze(
|
|
233
242
|
facts.activeScopeSlots.filter((candidate) => candidate !== scopeSlot)
|
|
234
243
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
SchedulerMeasurementContext,
|
|
3
|
-
|
|
3
|
+
SchedulerTerminalEffect
|
|
4
4
|
} from "../../project-definition/project-definition.ts";
|
|
5
5
|
import type { PlannedTask, PlannedTaskGraph, PlannedTaskScope, TaskGraph } from "./graph.ts";
|
|
6
6
|
import {
|
|
@@ -63,9 +63,9 @@ export interface RunTaskGraphOptions<TResult> {
|
|
|
63
63
|
/** Explicit enabled-only handoff; no Scheduler behavior is inferred from a logger shape. */
|
|
64
64
|
readonly performanceDiagnostics?: SchedulerPerformanceDiagnosticsInput;
|
|
65
65
|
/** Runtime-only terminal consumers; their context is formed after Scheduler drain. */
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
66
|
+
readonly terminalEffects?: readonly SchedulerTerminalEffect[];
|
|
67
|
+
readonly onTerminalEffectFailure?: () => void;
|
|
68
|
+
readonly onTerminalEffectsSettled?: () => void;
|
|
69
69
|
/** Product-private test observer; no package consumer can supply this through `run`. */
|
|
70
70
|
readonly onAdmissionCoreEffect?: (effect: SchedulerAdmissionCoreEffect) => void;
|
|
71
71
|
readonly graph: TaskGraph;
|
|
@@ -3,7 +3,7 @@ import type {
|
|
|
3
3
|
SchedulerDecisionMeasurementCumulative,
|
|
4
4
|
SchedulerMeasurementAdmission,
|
|
5
5
|
SchedulerMeasurementEffect,
|
|
6
|
-
|
|
6
|
+
SchedulerTerminalEffect,
|
|
7
7
|
SchedulerRawMeasurement
|
|
8
8
|
} from "../../../project-definition/project-definition.ts";
|
|
9
9
|
import { diagnosticTags, type DiagnosticLogger } from "../../diagnostic-logging/logger.ts";
|
|
@@ -75,7 +75,10 @@ export class SchedulerPerformanceDiagnostics {
|
|
|
75
75
|
const boundary = this.#timing.boundary();
|
|
76
76
|
if (boundary === undefined) return;
|
|
77
77
|
const admissionDelay = this.#timing.takeAdmissionDelay(taskId);
|
|
78
|
-
if (admissionDelay === undefined)
|
|
78
|
+
if (admissionDelay === undefined) {
|
|
79
|
+
this.#timing.invalidate("integral-invalid");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
79
82
|
this.#chronologyByTaskId.set(taskId, {
|
|
80
83
|
admissionDelay,
|
|
81
84
|
admittedAt: boundary,
|
|
@@ -97,7 +100,10 @@ export class SchedulerPerformanceDiagnostics {
|
|
|
97
100
|
if (boundary === undefined) return;
|
|
98
101
|
this.#timing.closeAcceptedWait(boundary);
|
|
99
102
|
const chronology = this.#chronologyByTaskId.get(taskId);
|
|
100
|
-
if (chronology === undefined)
|
|
103
|
+
if (chronology === undefined) {
|
|
104
|
+
this.#timing.invalidate("integral-invalid");
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
101
107
|
chronology.settledAt = boundary;
|
|
102
108
|
}
|
|
103
109
|
|
|
@@ -141,7 +147,7 @@ export class SchedulerPerformanceDiagnostics {
|
|
|
141
147
|
}
|
|
142
148
|
|
|
143
149
|
/** Internal default terminal hook; it contains writer failure without runner special-casing. */
|
|
144
|
-
public defaultSummaryHook():
|
|
150
|
+
public defaultSummaryHook(): SchedulerTerminalEffect | undefined {
|
|
145
151
|
if (this.#logger === undefined) return undefined;
|
|
146
152
|
const logger = this.#logger;
|
|
147
153
|
return (context) => {
|
|
@@ -27,7 +27,7 @@ export class SchedulerPerformanceTiming {
|
|
|
27
27
|
readonly #clock: Readonly<{ now(): number }>;
|
|
28
28
|
readonly #integrals = new SchedulerPerformanceIntegrals();
|
|
29
29
|
#lastBoundaryAt: number | undefined;
|
|
30
|
-
#startedAt: number | undefined;
|
|
30
|
+
readonly #startedAt: number | undefined;
|
|
31
31
|
#lastState: SchedulerPerformanceState;
|
|
32
32
|
#timing: SchedulerMeasurementTiming = Object.freeze({ availability: "available" });
|
|
33
33
|
#controlPathMs = 0;
|
|
@@ -137,13 +137,18 @@ export class SchedulerPerformanceTiming {
|
|
|
137
137
|
if (this.#timing.availability === "unavailable") return undefined;
|
|
138
138
|
try {
|
|
139
139
|
const now = this.#clock.now();
|
|
140
|
-
if (!Number.isFinite(now))
|
|
140
|
+
if (!Number.isFinite(now)) {
|
|
141
|
+
this.#unavailable("clock-non-finite");
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
141
144
|
if (this.#lastBoundaryAt !== undefined && now < this.#lastBoundaryAt) {
|
|
142
|
-
|
|
145
|
+
this.#unavailable("clock-backward");
|
|
146
|
+
return undefined;
|
|
143
147
|
}
|
|
144
148
|
return now;
|
|
145
149
|
} catch {
|
|
146
|
-
|
|
150
|
+
this.#unavailable("clock-threw");
|
|
151
|
+
return undefined;
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
154
|
|
|
@@ -154,7 +159,10 @@ export class SchedulerPerformanceTiming {
|
|
|
154
159
|
): void {
|
|
155
160
|
if (startedAt === undefined || endedAt === undefined) return;
|
|
156
161
|
const elapsedMs = endedAt - startedAt;
|
|
157
|
-
if (!validElapsed(elapsedMs))
|
|
162
|
+
if (!validElapsed(elapsedMs)) {
|
|
163
|
+
this.#markUnavailable("interval-invalid");
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
158
166
|
if (kind === "control") this.#controlPathMs += elapsedMs;
|
|
159
167
|
else this.#decisionObservationMs += elapsedMs;
|
|
160
168
|
if (!Number.isFinite(this.#controlPathMs) || !Number.isFinite(this.#decisionObservationMs)) {
|
|
@@ -36,7 +36,9 @@ export function observeSchedulerDecision<TResult>(
|
|
|
36
36
|
tags: schedulerDecisionTags(decision),
|
|
37
37
|
details: schedulerDecisionDetails(decision)
|
|
38
38
|
};
|
|
39
|
-
const observe = () =>
|
|
39
|
+
const observe = () => {
|
|
40
|
+
observeSchedulerDiagnostic(state, observation);
|
|
41
|
+
};
|
|
40
42
|
if (diagnostics === undefined) observe();
|
|
41
43
|
else diagnostics.observeDecision(observe);
|
|
42
44
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
SchedulerMeasurementContext,
|
|
3
|
-
|
|
3
|
+
SchedulerTerminalEffect,
|
|
4
4
|
SchedulerRawMeasurement
|
|
5
5
|
} from "../../project-definition/project-definition.ts";
|
|
6
6
|
import { diagnosticTags } from "../diagnostic-logging/logger.ts";
|
|
@@ -8,7 +8,7 @@ import type { RunTaskGraphOptions, SchedulerState } from "./execution-state.ts";
|
|
|
8
8
|
import type { SchedulerPerformanceDiagnostics } from "./measurement/diagnostics.ts";
|
|
9
9
|
import { observeSchedulerDiagnostic } from "./scheduler-observation.ts";
|
|
10
10
|
|
|
11
|
-
/** Delivers the terminal measurement to the internal summary and caller
|
|
11
|
+
/** Delivers the terminal measurement to the internal summary and caller effects exactly once. */
|
|
12
12
|
export async function observeTerminalMeasurement<TResult>(
|
|
13
13
|
input: Readonly<{
|
|
14
14
|
readonly diagnostics: SchedulerPerformanceDiagnostics;
|
|
@@ -22,32 +22,34 @@ export async function observeTerminalMeasurement<TResult>(
|
|
|
22
22
|
input.diagnostics.admittedTaskIds(),
|
|
23
23
|
input.diagnostics.rawMeasurement()
|
|
24
24
|
);
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
const
|
|
28
|
-
|
|
25
|
+
const callerEffects = input.options.terminalEffects ?? [];
|
|
26
|
+
let callerEffectFailed = false;
|
|
27
|
+
const reportCallerEffectFailure = () => {
|
|
28
|
+
callerEffectFailed = true;
|
|
29
29
|
observeSchedulerDiagnostic(input.state, {
|
|
30
|
-
event: "scheduler.
|
|
31
|
-
tags: diagnosticTags("
|
|
30
|
+
event: "scheduler.terminal-effect-failed",
|
|
31
|
+
tags: diagnosticTags("TERMINAL_EFFECT_FAILED"),
|
|
32
32
|
details: Object.freeze({})
|
|
33
33
|
});
|
|
34
34
|
try {
|
|
35
|
-
input.options.
|
|
35
|
+
input.options.onTerminalEffectFailure?.();
|
|
36
36
|
} catch {
|
|
37
37
|
// A failure-reporting seam cannot revise terminal Scheduler facts either.
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
const
|
|
41
|
-
const deliveries: readonly
|
|
42
|
-
...(
|
|
40
|
+
const defaultSummaryEffect = input.diagnostics.defaultSummaryHook();
|
|
41
|
+
const deliveries: readonly TerminalEffectDelivery[] = Object.freeze([
|
|
42
|
+
...(defaultSummaryEffect === undefined
|
|
43
43
|
? []
|
|
44
|
-
: [Object.freeze({
|
|
45
|
-
...
|
|
44
|
+
: [Object.freeze({ effect: defaultSummaryEffect, onFailure: () => undefined })]),
|
|
45
|
+
...callerEffects.map((effect) =>
|
|
46
|
+
Object.freeze({ effect, onFailure: reportCallerEffectFailure })
|
|
47
|
+
)
|
|
46
48
|
]);
|
|
47
|
-
await
|
|
48
|
-
if (
|
|
49
|
+
await deliverTerminalEffects(deliveries, context);
|
|
50
|
+
if (callerEffects.length > 0 && !callerEffectFailed) {
|
|
49
51
|
try {
|
|
50
|
-
input.options.
|
|
52
|
+
input.options.onTerminalEffectsSettled?.();
|
|
51
53
|
} catch {
|
|
52
54
|
// A success-reporting seam cannot revise terminal Scheduler facts either.
|
|
53
55
|
}
|
|
@@ -55,18 +57,18 @@ export async function observeTerminalMeasurement<TResult>(
|
|
|
55
57
|
return context;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
type
|
|
59
|
-
readonly
|
|
60
|
+
type TerminalEffectDelivery = Readonly<{
|
|
61
|
+
readonly effect: SchedulerTerminalEffect;
|
|
60
62
|
readonly onFailure: () => void;
|
|
61
63
|
}>;
|
|
62
64
|
|
|
63
|
-
async function
|
|
64
|
-
deliveries: readonly
|
|
65
|
+
async function deliverTerminalEffects(
|
|
66
|
+
deliveries: readonly TerminalEffectDelivery[],
|
|
65
67
|
context: SchedulerMeasurementContext
|
|
66
68
|
): Promise<void> {
|
|
67
69
|
for (const delivery of deliveries) {
|
|
68
70
|
try {
|
|
69
|
-
await delivery.
|
|
71
|
+
await delivery.effect(context);
|
|
70
72
|
} catch {
|
|
71
73
|
delivery.onFailure();
|
|
72
74
|
}
|
|
@@ -99,7 +99,10 @@ export async function runTaskGraph<TResult>(
|
|
|
99
99
|
state.admissionCore = cancellation.state;
|
|
100
100
|
diagnostics?.beforePendingSettlement(state.pending.map((task) => task.id));
|
|
101
101
|
if (diagnostics === undefined) applyAdmissionPolicyFault(state, error);
|
|
102
|
-
else
|
|
102
|
+
else
|
|
103
|
+
diagnostics.measureControlPath(() => {
|
|
104
|
+
applyAdmissionPolicyFault(state, error);
|
|
105
|
+
});
|
|
103
106
|
diagnostics?.captureState(performanceState(state));
|
|
104
107
|
observeAdmissionPolicyFault(state, error);
|
|
105
108
|
trigger = Object.freeze({ kind: "cancellation-applied" });
|
|
@@ -116,7 +119,9 @@ export async function runTaskGraph<TResult>(
|
|
|
116
119
|
const lifecycleFault = new AdmissionPolicyFault("lifecycle-invalid-select");
|
|
117
120
|
if (diagnostics === undefined) applyAdmissionPolicyFault(state, lifecycleFault);
|
|
118
121
|
else
|
|
119
|
-
diagnostics.measureControlPath(() =>
|
|
122
|
+
diagnostics.measureControlPath(() => {
|
|
123
|
+
applyAdmissionPolicyFault(state, lifecycleFault);
|
|
124
|
+
});
|
|
120
125
|
diagnostics?.captureState(performanceState(state));
|
|
121
126
|
observeAdmissionPolicyFault(state, lifecycleFault);
|
|
122
127
|
trigger = Object.freeze({ kind: "cancellation-applied" });
|
|
@@ -133,7 +138,10 @@ export async function runTaskGraph<TResult>(
|
|
|
133
138
|
state.admissionCore = selection.transition.state;
|
|
134
139
|
diagnostics?.beforeAdmission(decision.taskId, [...state.runningById.keys()]);
|
|
135
140
|
if (diagnostics === undefined) applyAdmission(state, decision);
|
|
136
|
-
else
|
|
141
|
+
else
|
|
142
|
+
diagnostics.measureControlPath(() => {
|
|
143
|
+
applyAdmission(state, decision);
|
|
144
|
+
});
|
|
137
145
|
diagnostics?.captureState(performanceState(state));
|
|
138
146
|
if (state.admissionPolicy.requiresMeasurement === true) {
|
|
139
147
|
diagnostics?.beginSelectedPolicyAction(decision.taskId);
|
|
@@ -146,7 +154,10 @@ export async function runTaskGraph<TResult>(
|
|
|
146
154
|
case "settle-blocked":
|
|
147
155
|
diagnostics?.beforePendingSettlement([decision.taskId]);
|
|
148
156
|
if (diagnostics === undefined) applyBlockedSettlement(state, decision);
|
|
149
|
-
else
|
|
157
|
+
else
|
|
158
|
+
diagnostics.measureControlPath(() => {
|
|
159
|
+
applyBlockedSettlement(state, decision);
|
|
160
|
+
});
|
|
150
161
|
diagnostics?.captureState(performanceState(state));
|
|
151
162
|
diagnostics?.recordEffect(
|
|
152
163
|
Object.freeze({
|
|
@@ -164,7 +175,10 @@ export async function runTaskGraph<TResult>(
|
|
|
164
175
|
state.admissionCore = cancelPendingAdmissionCore(state.admissionCore).state;
|
|
165
176
|
diagnostics?.beforePendingSettlement(decision.taskIds);
|
|
166
177
|
if (diagnostics === undefined) applyCancellation(state, decision);
|
|
167
|
-
else
|
|
178
|
+
else
|
|
179
|
+
diagnostics.measureControlPath(() => {
|
|
180
|
+
applyCancellation(state, decision);
|
|
181
|
+
});
|
|
168
182
|
diagnostics?.captureState(performanceState(state));
|
|
169
183
|
for (const taskId of decision.taskIds) {
|
|
170
184
|
diagnostics?.recordEffect(
|
|
@@ -187,7 +201,10 @@ export async function runTaskGraph<TResult>(
|
|
|
187
201
|
const completion = await nextRunningSettlement(state);
|
|
188
202
|
diagnostics?.beforeRunningSettlement(completion.taskId);
|
|
189
203
|
if (diagnostics === undefined) settleRunningTask(state, completion);
|
|
190
|
-
else
|
|
204
|
+
else
|
|
205
|
+
diagnostics.measureControlPath(() => {
|
|
206
|
+
settleRunningTask(state, completion);
|
|
207
|
+
});
|
|
191
208
|
const settlementKind = completion.settlement.kind;
|
|
192
209
|
if (
|
|
193
210
|
settlementKind !== "completed" &&
|