@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,54 @@
|
|
|
1
|
+
import { snapshotExactClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
2
|
+
import { isPositiveSafeInteger } from "../../data-boundary/value-shapes.ts";
|
|
3
|
+
import { isNormalizedProjectRelativePath } from "../host-environment/path.ts";
|
|
4
|
+
import {
|
|
5
|
+
MARKDOWN_LINT_RULE_NAMES,
|
|
6
|
+
type MarkdownLintFindingIdentity,
|
|
7
|
+
type MarkdownLintRuleName
|
|
8
|
+
} from "./options.ts";
|
|
9
|
+
|
|
10
|
+
/** Validates and detaches the complete public location used for exact waiver matching. */
|
|
11
|
+
export function resolveMarkdownLintFindingIdentity(
|
|
12
|
+
value: unknown
|
|
13
|
+
): MarkdownLintFindingIdentity | undefined {
|
|
14
|
+
const identity = snapshotExactClosedRecord(value, ["path", "rule", "range"]);
|
|
15
|
+
if (
|
|
16
|
+
identity === undefined ||
|
|
17
|
+
!isNormalizedProjectRelativePath(identity.path) ||
|
|
18
|
+
!isMarkdownLintRuleName(identity.rule)
|
|
19
|
+
) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const range = snapshotExactClosedRecord(identity.range, ["start", "end"]);
|
|
23
|
+
if (range === undefined) return undefined;
|
|
24
|
+
const start = resolvePosition(range.start);
|
|
25
|
+
const end = resolvePosition(range.end);
|
|
26
|
+
if (
|
|
27
|
+
start === undefined ||
|
|
28
|
+
end === undefined ||
|
|
29
|
+
start.line !== end.line ||
|
|
30
|
+
end.column < start.column
|
|
31
|
+
) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return Object.freeze({
|
|
35
|
+
path: identity.path,
|
|
36
|
+
rule: identity.rule,
|
|
37
|
+
range: Object.freeze({ start, end })
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function resolvePosition(
|
|
42
|
+
value: unknown
|
|
43
|
+
): MarkdownLintFindingIdentity["range"]["start"] | undefined {
|
|
44
|
+
const position = snapshotExactClosedRecord(value, ["line", "column"]);
|
|
45
|
+
return position !== undefined &&
|
|
46
|
+
isPositiveSafeInteger(position.line) &&
|
|
47
|
+
isPositiveSafeInteger(position.column)
|
|
48
|
+
? Object.freeze({ line: position.line, column: position.column })
|
|
49
|
+
: undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function isMarkdownLintRuleName(value: unknown): value is MarkdownLintRuleName {
|
|
53
|
+
return typeof value === "string" && MARKDOWN_LINT_RULE_NAMES.some((rule) => rule === value);
|
|
54
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
snapshotClosedRecord,
|
|
6
|
+
snapshotExactClosedRecord
|
|
7
|
+
} from "../../data-boundary/closed-values.ts";
|
|
8
|
+
import { cacheJsonByKey } from "../../package-tools/cache/cache-json-by-key.ts";
|
|
9
|
+
import {
|
|
10
|
+
lintMarkdownString,
|
|
11
|
+
parseMarkdownLintRange,
|
|
12
|
+
type MarkdownLintBackendFinding
|
|
13
|
+
} from "./adapter.ts";
|
|
14
|
+
import {
|
|
15
|
+
MARKDOWN_LINT_RULE_NAMES,
|
|
16
|
+
type MarkdownLintCacheOptions,
|
|
17
|
+
type MarkdownLintRuleName
|
|
18
|
+
} from "./options.ts";
|
|
19
|
+
import type { MarkdownLintUnavailableReason } from "./unavailable-reasons.ts";
|
|
20
|
+
|
|
21
|
+
type LintFacts = Readonly<{ readonly findings: readonly MarkdownLintBackendFinding[] }>;
|
|
22
|
+
type MarkdownLintCacheInput = Readonly<{
|
|
23
|
+
readonly sourcePath: string;
|
|
24
|
+
readonly sourceText: string;
|
|
25
|
+
readonly rules: readonly MarkdownLintRuleName[];
|
|
26
|
+
readonly cache: MarkdownLintCacheOptions;
|
|
27
|
+
readonly signal: AbortSignal;
|
|
28
|
+
}>;
|
|
29
|
+
export type MarkdownLintFactsResult =
|
|
30
|
+
| Readonly<{
|
|
31
|
+
readonly findings: readonly MarkdownLintBackendFinding[];
|
|
32
|
+
readonly source: "cache" | "computed" | "uncached";
|
|
33
|
+
}>
|
|
34
|
+
| MarkdownLintUnavailableReason;
|
|
35
|
+
|
|
36
|
+
/** Bump when adapter configuration or finding interpretation changes without a backend version change. */
|
|
37
|
+
const CACHE_FORMAT_VERSION = "markdown-lint-findings-v1";
|
|
38
|
+
const backendVersion = installedMarkdownlintVersion();
|
|
39
|
+
|
|
40
|
+
class LintComputationUnavailable extends Error {
|
|
41
|
+
readonly reason: MarkdownLintUnavailableReason;
|
|
42
|
+
|
|
43
|
+
constructor(reason: MarkdownLintUnavailableReason) {
|
|
44
|
+
super(`Markdown lint unavailable: ${reason}`);
|
|
45
|
+
this.reason = reason;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Reuses only validated per-source findings; all source reads and Check settlement remain live. */
|
|
50
|
+
export async function lintMarkdownWithCache(
|
|
51
|
+
input: MarkdownLintCacheInput
|
|
52
|
+
): Promise<MarkdownLintFactsResult> {
|
|
53
|
+
const { sourcePath, sourceText, rules, cache, signal } = input;
|
|
54
|
+
if (signal.aborted) return "cancelled";
|
|
55
|
+
if (!cache.enabled || backendVersion === undefined) return lintFresh(input);
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
const result = await cacheJsonByKey({
|
|
59
|
+
directory: cache.directory,
|
|
60
|
+
key: JSON.stringify({
|
|
61
|
+
path: sourcePath,
|
|
62
|
+
sourceDigest: createHash("sha256").update(sourceText, "utf8").digest("hex"),
|
|
63
|
+
rules
|
|
64
|
+
}),
|
|
65
|
+
namespace: "markdown-lint-findings",
|
|
66
|
+
version: `${CACHE_FORMAT_VERSION}:${backendVersion}`,
|
|
67
|
+
compute: async () => {
|
|
68
|
+
if (signal.aborted) throw new LintComputationUnavailable("cancelled");
|
|
69
|
+
const findings = await lintMarkdownString(sourcePath, sourceText, rules);
|
|
70
|
+
if (typeof findings === "string") throw new LintComputationUnavailable(findings);
|
|
71
|
+
if (signal.aborted) throw new LintComputationUnavailable("cancelled");
|
|
72
|
+
return { findings };
|
|
73
|
+
},
|
|
74
|
+
parse: (value) => parseLintFacts(value, sourceText, rules)
|
|
75
|
+
});
|
|
76
|
+
if (signal.aborted) return "cancelled";
|
|
77
|
+
return Object.freeze({ findings: result.value.findings, source: result.source });
|
|
78
|
+
} catch (error: unknown) {
|
|
79
|
+
if (signal.aborted) return "cancelled";
|
|
80
|
+
if (error instanceof LintComputationUnavailable) return error.reason;
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function lintFresh(input: MarkdownLintCacheInput): Promise<MarkdownLintFactsResult> {
|
|
86
|
+
const findings = await lintMarkdownString(input.sourcePath, input.sourceText, input.rules);
|
|
87
|
+
if (input.signal.aborted) return "cancelled";
|
|
88
|
+
return typeof findings === "string"
|
|
89
|
+
? findings
|
|
90
|
+
: Object.freeze({ findings, source: "uncached" as const });
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function parseLintFacts(
|
|
94
|
+
value: unknown,
|
|
95
|
+
sourceText: string,
|
|
96
|
+
rules: readonly MarkdownLintRuleName[]
|
|
97
|
+
): LintFacts {
|
|
98
|
+
const payload = snapshotExactClosedRecord(value, ["findings"]);
|
|
99
|
+
if (payload === undefined || !Array.isArray(payload.findings))
|
|
100
|
+
throw new TypeError("Invalid Markdown lint cache payload");
|
|
101
|
+
const lines = sourceText.split(/\r\n|\r|\n/u);
|
|
102
|
+
const findings = payload.findings.map((rawFinding: unknown) => {
|
|
103
|
+
const finding = snapshotExactClosedRecord(rawFinding, ["lineNumber", "range", "rule"]);
|
|
104
|
+
if (
|
|
105
|
+
finding === undefined ||
|
|
106
|
+
!isMarkdownLintRuleName(finding.rule) ||
|
|
107
|
+
!rules.includes(finding.rule) ||
|
|
108
|
+
typeof finding.lineNumber !== "number" ||
|
|
109
|
+
!Number.isSafeInteger(finding.lineNumber) ||
|
|
110
|
+
finding.lineNumber < 1 ||
|
|
111
|
+
finding.lineNumber > lines.length
|
|
112
|
+
)
|
|
113
|
+
throw new TypeError("Invalid Markdown lint cached finding");
|
|
114
|
+
const line = lines[finding.lineNumber - 1];
|
|
115
|
+
if (line === undefined) throw new TypeError("Invalid Markdown lint cached line");
|
|
116
|
+
const range = parseMarkdownLintRange(finding.range, line);
|
|
117
|
+
if (range === undefined) throw new TypeError("Invalid Markdown lint cached range");
|
|
118
|
+
return Object.freeze({
|
|
119
|
+
lineNumber: finding.lineNumber,
|
|
120
|
+
range,
|
|
121
|
+
rule: finding.rule
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
return Object.freeze({ findings: Object.freeze(findings) });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function isMarkdownLintRuleName(value: unknown): value is MarkdownLintRuleName {
|
|
128
|
+
return typeof value === "string" && MARKDOWN_LINT_RULE_NAMES.some((rule) => rule === value);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function installedMarkdownlintVersion(): string | undefined {
|
|
132
|
+
try {
|
|
133
|
+
const packageJson: unknown = createRequire(import.meta.url)("markdownlint/package.json");
|
|
134
|
+
const metadata = snapshotClosedRecord(packageJson);
|
|
135
|
+
return typeof metadata?.version === "string" && metadata.version.length > 0
|
|
136
|
+
? metadata.version
|
|
137
|
+
: undefined;
|
|
138
|
+
} catch {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
hasRequiredAndOptionalRecordKeys,
|
|
3
|
+
snapshotClosedArray,
|
|
4
|
+
snapshotClosedRecord
|
|
5
|
+
} from "../../data-boundary/closed-values.ts";
|
|
6
|
+
import {
|
|
7
|
+
defaultProjectFileSelection,
|
|
8
|
+
resolveProjectFileSelection,
|
|
9
|
+
snapshotProjectFileSelection
|
|
10
|
+
} from "../project-files/configuration.ts";
|
|
11
|
+
import { DEFAULT_FINDING_POLICY, resolveFindingPolicy } from "../code-quality-findings/policy.ts";
|
|
12
|
+
import { resolveFindingWaiverAuthoring } from "../code-quality-findings/finding-waiver-authoring.ts";
|
|
13
|
+
import { resolveOptionalLocalCacheOptions } from "../local-cache-options.ts";
|
|
14
|
+
import { resolveMarkdownLintFindingIdentity } from "./finding-waiver-identity.ts";
|
|
15
|
+
import {
|
|
16
|
+
MARKDOWN_LINT_RULE_NAMES,
|
|
17
|
+
type MarkdownLintRuleName,
|
|
18
|
+
type ResolvedMarkdownLintOptions
|
|
19
|
+
} from "./options.ts";
|
|
20
|
+
import { validMarkdownLintOptions } from "./options-validation.ts";
|
|
21
|
+
|
|
22
|
+
const DEFAULT_FILES = Object.freeze({
|
|
23
|
+
exclude: defaultProjectFileSelection.exclude,
|
|
24
|
+
include: Object.freeze(["**/*.[mM][dD]", "**/*.[mM][aA][rR][kK][dD][oO][wW][nN]"]),
|
|
25
|
+
source: defaultProjectFileSelection.source
|
|
26
|
+
});
|
|
27
|
+
const DEFAULT_LIMITS = Object.freeze({ maxMarkdownBytes: 1_048_576, maxFindings: 10_000 });
|
|
28
|
+
const DEFAULT_RULES = Object.freeze(
|
|
29
|
+
MARKDOWN_LINT_RULE_NAMES.filter((rule) => rule !== "link-fragments")
|
|
30
|
+
);
|
|
31
|
+
const KNOWN_RULES = new Set<string>(MARKDOWN_LINT_RULE_NAMES);
|
|
32
|
+
|
|
33
|
+
/** Resolves closed partial authoring options into an immutable complete policy. */
|
|
34
|
+
export function resolveMarkdownLintOptions(
|
|
35
|
+
value: unknown
|
|
36
|
+
): ResolvedMarkdownLintOptions | undefined {
|
|
37
|
+
const input = snapshotClosedRecord(value);
|
|
38
|
+
if (
|
|
39
|
+
input === undefined ||
|
|
40
|
+
!hasRequiredAndOptionalRecordKeys(input, {
|
|
41
|
+
optional: ["files", "findingPolicy", "findingWaivers", "rules", "limits", "cache"],
|
|
42
|
+
required: []
|
|
43
|
+
})
|
|
44
|
+
) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
const files =
|
|
48
|
+
input.files === undefined
|
|
49
|
+
? snapshotProjectFileSelection(DEFAULT_FILES)
|
|
50
|
+
: resolveProjectFileSelection(input.files, DEFAULT_FILES);
|
|
51
|
+
const findingPolicy = resolveFindingPolicy(input.findingPolicy, DEFAULT_FINDING_POLICY);
|
|
52
|
+
const findingWaivers = resolveFindingWaiverAuthoring(
|
|
53
|
+
input.findingWaivers,
|
|
54
|
+
resolveMarkdownLintFindingIdentity
|
|
55
|
+
);
|
|
56
|
+
const rules = resolveRules(input.rules);
|
|
57
|
+
const limits = resolveLimits(input.limits);
|
|
58
|
+
const cache = resolveOptionalLocalCacheOptions(input.cache);
|
|
59
|
+
const candidate = Object.freeze({
|
|
60
|
+
files,
|
|
61
|
+
findingPolicy,
|
|
62
|
+
findingWaivers,
|
|
63
|
+
rules,
|
|
64
|
+
limits,
|
|
65
|
+
cache
|
|
66
|
+
});
|
|
67
|
+
return validMarkdownLintOptions(candidate) ? candidate : undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function resolveRules(value: unknown): readonly MarkdownLintRuleName[] | undefined {
|
|
71
|
+
if (value === undefined) return DEFAULT_RULES;
|
|
72
|
+
const rules = snapshotClosedArray(value);
|
|
73
|
+
if (
|
|
74
|
+
rules === undefined ||
|
|
75
|
+
rules.length === 0 ||
|
|
76
|
+
!rules.every((rule) => typeof rule === "string" && KNOWN_RULES.has(rule)) ||
|
|
77
|
+
new Set(rules).size !== rules.length
|
|
78
|
+
) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
return Object.freeze(
|
|
82
|
+
MARKDOWN_LINT_RULE_NAMES.filter((catalogRule) => rules.includes(catalogRule))
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function resolveLimits(value: unknown): ResolvedMarkdownLintOptions["limits"] | undefined {
|
|
87
|
+
if (value === undefined) return DEFAULT_LIMITS;
|
|
88
|
+
const limits = snapshotClosedRecord(value);
|
|
89
|
+
if (
|
|
90
|
+
limits === undefined ||
|
|
91
|
+
!hasRequiredAndOptionalRecordKeys(limits, {
|
|
92
|
+
optional: ["maxMarkdownBytes", "maxFindings"],
|
|
93
|
+
required: []
|
|
94
|
+
})
|
|
95
|
+
) {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const maxMarkdownBytes = limits.maxMarkdownBytes ?? DEFAULT_LIMITS.maxMarkdownBytes;
|
|
99
|
+
const maxFindings = limits.maxFindings ?? DEFAULT_LIMITS.maxFindings;
|
|
100
|
+
if (typeof maxMarkdownBytes !== "number" || typeof maxFindings !== "number") return undefined;
|
|
101
|
+
return Object.freeze({ maxMarkdownBytes, maxFindings });
|
|
102
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { snapshotExactClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
2
|
+
import { isPositiveSafeInteger } from "../../data-boundary/value-shapes.ts";
|
|
3
|
+
import { validFindingPolicy } from "../code-quality-findings/policy.ts";
|
|
4
|
+
import { validResolvedFindingWaivers } from "../code-quality-findings/finding-waiver-authoring.ts";
|
|
5
|
+
import { validLocalCacheOptions } from "../local-cache-options.ts";
|
|
6
|
+
import { validProjectFileSelection } from "../project-files/configuration.ts";
|
|
7
|
+
import { MARKDOWN_LINT_RULE_NAMES, type ResolvedMarkdownLintOptions } from "./options.ts";
|
|
8
|
+
import { resolveMarkdownLintFindingIdentity } from "./finding-waiver-identity.ts";
|
|
9
|
+
|
|
10
|
+
const KNOWN_RULES = new Set<string>(MARKDOWN_LINT_RULE_NAMES);
|
|
11
|
+
|
|
12
|
+
export function validMarkdownLintOptions(value: unknown): value is ResolvedMarkdownLintOptions {
|
|
13
|
+
const options = snapshotExactClosedRecord(value, [
|
|
14
|
+
"files",
|
|
15
|
+
"findingPolicy",
|
|
16
|
+
"findingWaivers",
|
|
17
|
+
"rules",
|
|
18
|
+
"limits",
|
|
19
|
+
"cache"
|
|
20
|
+
]);
|
|
21
|
+
if (
|
|
22
|
+
options === undefined ||
|
|
23
|
+
!validProjectFileSelection(options.files) ||
|
|
24
|
+
!validFindingPolicy(options.findingPolicy) ||
|
|
25
|
+
!validResolvedFindingWaivers(options.findingWaivers, resolveMarkdownLintFindingIdentity) ||
|
|
26
|
+
!validRules(options.rules) ||
|
|
27
|
+
!validLocalCacheOptions(options.cache)
|
|
28
|
+
) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
const limits = snapshotExactClosedRecord(options.limits, ["maxMarkdownBytes", "maxFindings"]);
|
|
32
|
+
return (
|
|
33
|
+
limits !== undefined &&
|
|
34
|
+
isBoundedPositiveInteger(limits.maxMarkdownBytes, 16_777_216) &&
|
|
35
|
+
isBoundedPositiveInteger(limits.maxFindings, 100_000)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function validRules(value: unknown): value is readonly string[] {
|
|
40
|
+
return (
|
|
41
|
+
Array.isArray(value) &&
|
|
42
|
+
value.length > 0 &&
|
|
43
|
+
value.every((rule) => typeof rule === "string" && KNOWN_RULES.has(rule)) &&
|
|
44
|
+
new Set(value).size === value.length
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isBoundedPositiveInteger(value: unknown, maximum: number): value is number {
|
|
49
|
+
return isPositiveSafeInteger(value) && value <= maximum;
|
|
50
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { PackageCheckAuthoringOptions } from "../check-authoring.ts";
|
|
2
|
+
import type { LocalCacheOptions } from "../local-cache-options.ts";
|
|
3
|
+
import type { FindingPolicy } from "../code-quality-findings/policy.ts";
|
|
4
|
+
import type { FindingWaiver } from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
5
|
+
import type {
|
|
6
|
+
ProjectFileSelection,
|
|
7
|
+
ProjectFileSelectionOptions
|
|
8
|
+
} from "../project-files/configuration.ts";
|
|
9
|
+
|
|
10
|
+
/** 由 Product 拥有且独立于 backend 名称的闭合 Markdown lint 规则目录。 */
|
|
11
|
+
export const MARKDOWN_LINT_RULE_NAMES = Object.freeze([
|
|
12
|
+
"heading-increment",
|
|
13
|
+
"no-reversed-links",
|
|
14
|
+
"no-missing-space-atx",
|
|
15
|
+
"fenced-code-language",
|
|
16
|
+
"no-empty-links",
|
|
17
|
+
"no-alt-text",
|
|
18
|
+
"link-fragments",
|
|
19
|
+
"reference-links-images",
|
|
20
|
+
"table-column-count"
|
|
21
|
+
] as const);
|
|
22
|
+
|
|
23
|
+
/** `markdownLint` 支持的稳定 Product-owned 规则名称。 */
|
|
24
|
+
export type MarkdownLintRuleName = (typeof MARKDOWN_LINT_RULE_NAMES)[number];
|
|
25
|
+
|
|
26
|
+
/** 可直接从 lint Record 复制的精确身份;完整 range 相同的多个 Finding 不可唯一豁免。 */
|
|
27
|
+
export interface MarkdownLintFindingIdentity {
|
|
28
|
+
/** 规范化的 project-root-relative `/` 路径。 */
|
|
29
|
+
readonly path: string;
|
|
30
|
+
/** 闭合 Product catalog 中的规则名称。 */
|
|
31
|
+
readonly rule: MarkdownLintRuleName;
|
|
32
|
+
/** 一基 UTF-16 正安全整数位置;必须同行,end-exclusive column 不小于 start column。 */
|
|
33
|
+
readonly range: Readonly<{
|
|
34
|
+
readonly start: Readonly<{ readonly line: number; readonly column: number }>;
|
|
35
|
+
readonly end: Readonly<{ readonly line: number; readonly column: number }>;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** 完整 traversal 后唯一匹配才应用的精确豁免;reason 会公开发布,不得包含秘密。 */
|
|
40
|
+
export type MarkdownLintFindingWaiver = FindingWaiver<MarkdownLintFindingIdentity>;
|
|
41
|
+
|
|
42
|
+
/** `markdownLint(options?)` 可接受的可省略 work limits。 */
|
|
43
|
+
export interface MarkdownLintLimitOptions {
|
|
44
|
+
/** 单个 accepted Markdown source 的 UTF-8 字节上限。 */
|
|
45
|
+
readonly maxMarkdownBytes?: number;
|
|
46
|
+
/** 一次完整 traversal 中可积累的 lint finding 上限。 */
|
|
47
|
+
readonly maxFindings?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** 调用方拥有的逐文件 lint findings 本地缓存;省略时关闭。 */
|
|
51
|
+
export type MarkdownLintCacheOptions = LocalCacheOptions;
|
|
52
|
+
|
|
53
|
+
/** `markdownLint(options?)` 可接受的闭合 authoring policy。 */
|
|
54
|
+
export interface MarkdownLintOptions<
|
|
55
|
+
Id extends string = string
|
|
56
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
57
|
+
/** 参与本 Check 的 source selection;省略时使用 package defaults。 */
|
|
58
|
+
readonly files?: ProjectFileSelectionOptions;
|
|
59
|
+
/** 未豁免 lint finding 是否使本 Check failed;省略时为 non-blocking。 */
|
|
60
|
+
readonly findingPolicy?: FindingPolicy;
|
|
61
|
+
/** 闭合的精确 Finding 豁免;保留原始证据,不改变输入、limits 或缓存 facts。 */
|
|
62
|
+
readonly findingWaivers?: readonly MarkdownLintFindingWaiver[];
|
|
63
|
+
/** 非空数组完整替换 recommended rule set。 */
|
|
64
|
+
readonly rules?: readonly MarkdownLintRuleName[];
|
|
65
|
+
/** 每次 execution 的 Markdown 内容与 finding work 上限。 */
|
|
66
|
+
readonly limits?: MarkdownLintLimitOptions;
|
|
67
|
+
/** 可删除、可信 absolute directory;只缓存由当前 bytes 和规则计算的逐文件 findings。 */
|
|
68
|
+
readonly cache?: MarkdownLintCacheOptions;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** `markdown-lint` execution 消费的完整冻结 policy。 */
|
|
72
|
+
export interface ResolvedMarkdownLintOptions {
|
|
73
|
+
readonly files: ProjectFileSelection;
|
|
74
|
+
readonly findingPolicy: FindingPolicy;
|
|
75
|
+
readonly findingWaivers: readonly MarkdownLintFindingWaiver[];
|
|
76
|
+
readonly rules: readonly MarkdownLintRuleName[];
|
|
77
|
+
readonly cache: MarkdownLintCacheOptions;
|
|
78
|
+
readonly limits: Readonly<{
|
|
79
|
+
readonly maxMarkdownBytes: number;
|
|
80
|
+
readonly maxFindings: number;
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { MaterializedFindingWaiver } from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
2
|
+
import {
|
|
3
|
+
buildHashedFindingWaiverAuditRecord,
|
|
4
|
+
type FindingWaiverAuditRecordData,
|
|
5
|
+
type FindingWaiverRecordAudit
|
|
6
|
+
} from "../code-quality-findings/finding-waiver-evidence.ts";
|
|
7
|
+
import type { MarkdownLintBackendFinding } from "./adapter.ts";
|
|
8
|
+
import { resolveMarkdownLintFindingIdentity } from "./finding-waiver-identity.ts";
|
|
9
|
+
import type { MarkdownLintFindingIdentity, MarkdownLintRuleName } from "./options.ts";
|
|
10
|
+
|
|
11
|
+
/** 一条保留原位置的 lint Finding;唯一命中 waiver 时仅附加公开理由。 */
|
|
12
|
+
export type MarkdownLintFindingRecordData = Readonly<
|
|
13
|
+
MarkdownLintFindingIdentity & {
|
|
14
|
+
readonly kind: "lint-finding";
|
|
15
|
+
readonly waiver?: Readonly<{ readonly reason: string }>;
|
|
16
|
+
}
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
/** 未使用或匹配多个 Markdown lint Findings 的精确 waiver audit Record data。 */
|
|
20
|
+
export type MarkdownLintFindingWaiverAuditRecordData =
|
|
21
|
+
FindingWaiverAuditRecordData<MarkdownLintFindingIdentity>;
|
|
22
|
+
|
|
23
|
+
export type MarkdownLintInputRejectedRecordData = Readonly<{
|
|
24
|
+
readonly kind: "input-rejected";
|
|
25
|
+
readonly blocking: false;
|
|
26
|
+
readonly path: string;
|
|
27
|
+
readonly reason: "unsupported-file-type";
|
|
28
|
+
}>;
|
|
29
|
+
|
|
30
|
+
/** Markdown lint 发布的 Finding、input-rejection 或 finding-waiver audit Record data。 */
|
|
31
|
+
export type MarkdownLintRecordData =
|
|
32
|
+
| MarkdownLintFindingRecordData
|
|
33
|
+
| MarkdownLintInputRejectedRecordData
|
|
34
|
+
| MarkdownLintFindingWaiverAuditRecordData;
|
|
35
|
+
|
|
36
|
+
export interface MarkdownLintRecordCandidate {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly data: MarkdownLintFindingRecordData;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function markdownLintFindingIdentity(
|
|
42
|
+
candidate: MarkdownLintRecordCandidate
|
|
43
|
+
): MarkdownLintFindingIdentity {
|
|
44
|
+
const { path, rule, range } = candidate.data;
|
|
45
|
+
return Object.freeze({ path, rule, range });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function markdownLintWaiverIdentity(
|
|
49
|
+
waiver: MaterializedFindingWaiver
|
|
50
|
+
): MarkdownLintFindingIdentity {
|
|
51
|
+
const identity = resolveMarkdownLintFindingIdentity(waiver.identity);
|
|
52
|
+
if (identity === undefined) {
|
|
53
|
+
throw new TypeError("markdownLint waiver identity must retain a valid public finding location");
|
|
54
|
+
}
|
|
55
|
+
return identity;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function markdownLintWaiverAuditRecord(audit: FindingWaiverRecordAudit): Readonly<{
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly data: MarkdownLintFindingWaiverAuditRecordData;
|
|
61
|
+
}> {
|
|
62
|
+
return buildHashedFindingWaiverAuditRecord(markdownLintWaiverIdentity(audit.waiver), audit);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function orderedMarkdownLintCandidates(
|
|
66
|
+
values: readonly Readonly<{
|
|
67
|
+
readonly path: string;
|
|
68
|
+
readonly finding: MarkdownLintBackendFinding;
|
|
69
|
+
}>[],
|
|
70
|
+
catalog: readonly MarkdownLintRuleName[]
|
|
71
|
+
): readonly MarkdownLintRecordCandidate[] {
|
|
72
|
+
const rank = new Map(catalog.map((rule, index) => [rule, index]));
|
|
73
|
+
const sorted = [...values].sort((left, right) => compareFindings(left, right, rank));
|
|
74
|
+
const occurrences = new Map<string, number>();
|
|
75
|
+
return Object.freeze(
|
|
76
|
+
sorted.map(({ path, finding }) => {
|
|
77
|
+
const range = publicRange(finding);
|
|
78
|
+
const key = `${path}\u0000${finding.rule}\u0000${range.start.line}\u0000${range.start.column}`;
|
|
79
|
+
const ordinal = (occurrences.get(key) ?? 0) + 1;
|
|
80
|
+
occurrences.set(key, ordinal);
|
|
81
|
+
const data = Object.freeze({
|
|
82
|
+
kind: "lint-finding" as const,
|
|
83
|
+
path,
|
|
84
|
+
rule: finding.rule,
|
|
85
|
+
range
|
|
86
|
+
});
|
|
87
|
+
return Object.freeze({
|
|
88
|
+
id: `path:${encodeURIComponent(path)}:rule:${finding.rule}:line:${range.start.line}:column:${range.start.column}:ordinal:${ordinal}`,
|
|
89
|
+
data
|
|
90
|
+
});
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function buildMarkdownLintInputRejectedRecord(path: string): Readonly<{
|
|
96
|
+
readonly id: string;
|
|
97
|
+
readonly data: MarkdownLintInputRejectedRecordData;
|
|
98
|
+
}> {
|
|
99
|
+
return Object.freeze({
|
|
100
|
+
id: `/input-rejected/${path}`,
|
|
101
|
+
data: Object.freeze({
|
|
102
|
+
kind: "input-rejected",
|
|
103
|
+
blocking: false,
|
|
104
|
+
path,
|
|
105
|
+
reason: "unsupported-file-type"
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function compareFindings(
|
|
111
|
+
left: Readonly<{ readonly path: string; readonly finding: MarkdownLintBackendFinding }>,
|
|
112
|
+
right: Readonly<{ readonly path: string; readonly finding: MarkdownLintBackendFinding }>,
|
|
113
|
+
rank: ReadonlyMap<MarkdownLintRuleName, number>
|
|
114
|
+
): number {
|
|
115
|
+
const leftRange = publicRange(left.finding);
|
|
116
|
+
const rightRange = publicRange(right.finding);
|
|
117
|
+
return (
|
|
118
|
+
left.path.localeCompare(right.path) ||
|
|
119
|
+
leftRange.start.line - rightRange.start.line ||
|
|
120
|
+
leftRange.start.column - rightRange.start.column ||
|
|
121
|
+
(rank.get(left.finding.rule) ?? 0) - (rank.get(right.finding.rule) ?? 0)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function publicRange(finding: MarkdownLintBackendFinding): MarkdownLintFindingRecordData["range"] {
|
|
126
|
+
const column = finding.range?.[0] ?? 1;
|
|
127
|
+
const endColumn = finding.range === null ? column : column + finding.range[1];
|
|
128
|
+
return Object.freeze({
|
|
129
|
+
start: Object.freeze({ line: finding.lineNumber, column }),
|
|
130
|
+
end: Object.freeze({ line: finding.lineNumber, column: endColumn })
|
|
131
|
+
});
|
|
132
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Markdown lint complete Check 的稳定 unavailable 原因。 */
|
|
2
|
+
export type MarkdownLintUnavailableReason =
|
|
3
|
+
| "backend-failed"
|
|
4
|
+
| "backend-protocol-invalid"
|
|
5
|
+
| "cancelled"
|
|
6
|
+
| "finding-limit-exceeded"
|
|
7
|
+
| "invalid-options"
|
|
8
|
+
| "project-root-unavailable"
|
|
9
|
+
| "source-too-large"
|
|
10
|
+
| "source-unavailable";
|
|
11
|
+
|
|
12
|
+
const MESSAGES: Readonly<Record<MarkdownLintUnavailableReason, string>> = {
|
|
13
|
+
"backend-failed":
|
|
14
|
+
"Markdown lint could not complete its private backend operation; retry after checking the installed package.",
|
|
15
|
+
"backend-protocol-invalid":
|
|
16
|
+
"Markdown lint received an invalid private backend response and did not publish partial findings.",
|
|
17
|
+
cancelled:
|
|
18
|
+
"Markdown lint was cancelled before it could form a complete result; retry after cancellation is resolved.",
|
|
19
|
+
"finding-limit-exceeded":
|
|
20
|
+
"Markdown lint exceeded maxFindings; narrow the file selection or raise the bounded limit.",
|
|
21
|
+
"invalid-options":
|
|
22
|
+
"markdownLint options are invalid; recreate the Check with markdownLint(options) or restore its complete resolved options.",
|
|
23
|
+
"project-root-unavailable":
|
|
24
|
+
"Markdown lint could not resolve the project root; check that the path exists and is accessible.",
|
|
25
|
+
"source-too-large":
|
|
26
|
+
"A selected Markdown source exceeds maxMarkdownBytes; narrow the file selection or raise the bounded limit.",
|
|
27
|
+
"source-unavailable":
|
|
28
|
+
"A selected Markdown source could not be read, decoded, or contained safely; check the file source and permissions."
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export function markdownLintUnavailableMessage(reason: MarkdownLintUnavailableReason): string {
|
|
32
|
+
return MESSAGES[reason];
|
|
33
|
+
}
|