@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
package/docs/api-mechanics.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 深入理解 Vibe Check API 机制
|
|
2
2
|
|
|
3
|
-
本文说明 package 的通用 invocation lifecycle:自定义 Check 如何经过 Definition validation、options
|
|
3
|
+
本文说明 package 的通用 invocation lifecycle:自定义 Check 如何经过 Definition validation、options preparation、execution 与 settlement,以及一次 Run 如何形成 dependency data、aggregation、outputs 和可判别结果。首次集成先阅读[package README](../README.md);随包 Check 的 options、业务效果和安全边界由各自指南说明;单个 public 字段与函数签名以 installed declarations 为准。
|
|
4
4
|
|
|
5
5
|
## 一次 Run 的生命周期
|
|
6
6
|
|
|
@@ -12,37 +12,40 @@
|
|
|
12
12
|
Project Definition
|
|
13
13
|
│ run: validate Definition + RunControls, then normalize the Check tree
|
|
14
14
|
▼
|
|
15
|
-
validated Definition +
|
|
16
|
-
│ before
|
|
17
|
-
|
|
15
|
+
validated Definition + normalized Check tree
|
|
16
|
+
│ before work: stop if cancelled; otherwise validate the complete static graph
|
|
17
|
+
▼
|
|
18
|
+
complete static graph
|
|
19
|
+
│ when configured: prepare one Git change snapshot and derived flags
|
|
20
|
+
│ recheck cancellation, prepare the admission strategy, then form effective flag selection
|
|
18
21
|
▼
|
|
19
22
|
initial control settlements + complete static Task graph
|
|
20
23
|
│ Scheduler applies direct relations, mutex and parallel scheduling
|
|
21
24
|
▼
|
|
22
|
-
task-local
|
|
25
|
+
task-local preparation / Product-owned blocked unavailable outcomes
|
|
23
26
|
│ admitted Checks continue to author callback
|
|
24
27
|
▼
|
|
25
28
|
author execution + terminal settlement
|
|
26
29
|
▼
|
|
27
30
|
snapshot + messages + durations
|
|
28
|
-
│ terminal
|
|
29
|
-
│
|
|
31
|
+
│ terminal effects settle; if terminal context exists, prepared strategy delivers terminalEffect once
|
|
32
|
+
│ default or caller-local aggregation + enabled output completion
|
|
30
33
|
▼
|
|
31
34
|
RunResult
|
|
32
35
|
|
|
33
36
|
### Selection 与 Scheduler readiness
|
|
34
37
|
|
|
35
|
-
Run
|
|
38
|
+
Run 先验证 Definition 与 Controls 并规范化 Check tree;若 signal 已取消,会在静态 graph validation 和获取 Git 前结束调用。否则 Product 验证包含全部可执行 Check 的静态 graph。Definition 配置 `changes` 时,Product 随后只取得一次 Git changed-path snapshot,按声明 region 生成受保护的 `vibe-check:change:<id>` flags;可信零命中保留空 evidence,获取失败保留 unavailable evidence 并保守提供所有已声明 change flags。再次检查 cancellation 后,caller/derived flags 共同形成一次 private effective selection。[flag 规则](guides/extending-check-lifecycle.md#按-flag-选择-check)定义其条件;未被选择项先结算为 `not-applicable / flag-condition-not-matched`,不会再次 admission。它们仍属于同一张 graph:`dependsOn` dependent 在 preparation 前结算为 `unavailable / dependency-not-passed`,`observes` consumer 则可等待并读取该终态。
|
|
36
39
|
|
|
37
|
-
### Task-local
|
|
40
|
+
### Task-local preparation 与 execution
|
|
38
41
|
|
|
39
|
-
其余 Check 被 Scheduler 在 direct relation、mutex 与 capacity 允许后 admission,并在自己的 task 中执行
|
|
42
|
+
其余 Check 被 Scheduler 在 direct relation、mutex 与 capacity 允许后 admission,并在自己的 task 中执行 preparation,随后才执行 author callback。没有互相约束的 preparation 可以并行;它们不构成 Definition 顺序的全局 barrier。
|
|
40
43
|
|
|
41
44
|
### Terminal snapshot、aggregation 与 outputs
|
|
42
45
|
|
|
43
|
-
Run snapshot
|
|
46
|
+
Run snapshot 保存所有 Check facts;progress rendering 呈现 execution lifecycle;machine publication 在 terminal snapshot 形成后写入 machine files。aggregation 在完整 terminal facts 结算后、正常 final progress 和 machine publication 前,读取本次有效 Check 列表;默认或 caller-local 函数都不改写 snapshot。
|
|
44
47
|
|
|
45
|
-
prepared strategy 的 `prepare / decide /
|
|
48
|
+
prepared strategy 的 `prepare / decide / terminalEffect` 顺序、失败与取消边界由[调度专题](guides/scheduling.md#已准备的-custom-strategy)定义;这些回调不能回写已结算 Check facts。
|
|
46
49
|
|
|
47
50
|
## Definition 与 invocation 的责任
|
|
48
51
|
|
|
@@ -53,12 +56,13 @@ prepared strategy 的 `prepare / decide / complete` 顺序、失败与取消边
|
|
|
53
56
|
| 想设置什么 | 参数位置 | 与另一份输入的关系 |
|
|
54
57
|
| --- | --- | --- |
|
|
55
58
|
| 检查内容、领域 options、依赖与 Check 约束 | Definition 的 `checks` 中各项 Check | Controls 不能替换 Checks 或覆盖 Check options;领域输入继续由 owning Check 或显式 provider 承接。 |
|
|
56
|
-
|
|
|
59
|
+
| Git comparison 与 change-flag regions | Definition 的 `changes` | 每次 Run 在 selection 前获取一次 Git evidence;Controls 不能伪造或直接提供 `vibe-check:change:` flag。 |
|
|
60
|
+
| 调度并行预算、资源总量、策略与终态观察回调 | Definition 的 `scheduler` | Controls 没有 scheduler override,也不能注入 `terminalEffects`。 |
|
|
57
61
|
| 默认 machine、diagnostic 与 progress 输出方式 | Definition 的 `outputs` | 建立可重复使用的默认值;默认目录、预览数量和 formatter 都可在这里配置。 |
|
|
58
62
|
| 本次根目录、选择 flags 与协作取消 | Controls 的 `projectRoot`、`flags`、`signal` | 只属于本次调用,不是 `defineConfig` 字段。 |
|
|
59
63
|
| 本次 Check 产物与 progress 日志目标、diagnostic 文件命名 | Controls 的 `checkArtifactBaseDirectory`、`progressLogFile`、`diagnosticLogFileNaming` | 只属于本次调用;它们本身不是 Definition outputs 的默认值或 override。 |
|
|
60
64
|
| 本次开关输出、更换 machine / diagnostic 目录、调整 progress 预览 | Controls 的 `outputs` | 只覆盖当前调用明确提供的字段,其余继承 Definition 默认值。 |
|
|
61
|
-
|
|
|
65
|
+
| 本次怎样解释有效 Check facts | Controls 的 `checkAggregation` | 可选同步函数;省略时使用严格默认折叠,不改写各项 Check outcome。 |
|
|
62
66
|
|
|
63
67
|
**两处 `outputs` 是默认值和逐字段覆盖值。** 只关闭本次 machine publication 不影响 progress、diagnostics 或下次调用;省略/`undefined` 不覆盖,`false`、预览数量 `0` 和清除 formatter 的 `null` 有效。字段默认值和示例见[输出指南](guides/run-outputs.md)。
|
|
64
68
|
|
|
@@ -66,21 +70,124 @@ prepared strategy 的 `prepare / decide / complete` 顺序、失败与取消边
|
|
|
66
70
|
|
|
67
71
|
### 定义与调用如何处理输入
|
|
68
72
|
|
|
69
|
-
- `defineCheck(value)` 保留 literal `checkId`、options
|
|
70
|
-
- `defineConfig(value)` 形成带默认 `apiVersion`、outputs 和 scheduler policy 的 Project Definition。
|
|
73
|
+
- `defineCheck(value)` 保留 literal `checkId`、options、typed-provider parser 和 `handoff: true` 的 TypeScript inference。它与同 shape 普通 Check object 具有相同 runtime 语义。
|
|
74
|
+
- `defineConfig(value)` 形成带默认 `apiVersion`、outputs 和 scheduler policy 的 Project Definition;可选 `changes` 声明 Git comparison 与 change-flag regions。
|
|
71
75
|
- `defineAdmissionPolicy(value)` 只保留 closed admission policy literal、特别是 custom strategy 的 inference;它与同形 inline policy value 等价。
|
|
72
76
|
- `run(definition, controls?)` 拥有 invocation validation 与 normalization:它关闭递归 Check grammar,detach / canonicalize authored options,并形成 declarative snapshot 与 fingerprint。
|
|
73
77
|
|
|
74
|
-
fingerprint 使用 normalized declarative fields;
|
|
78
|
+
fingerprint 使用 normalized declarative fields;preparation、execution 与 custom admission callbacks 都保持为执行行为。scheduler fingerprint 区分 `static` 与 `custom`,且不包含 callback identity、source 或 closure。同一份 Definition 可以重复调用,每次 Run 都从 authored input 派生自己的 project context、prepared options、terminal facts 和 output statuses。
|
|
79
|
+
|
|
80
|
+
## 随包 Check 的构造器项目声明
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
九个固定身份的随包构造器在现有顶层 options 同时接收领域 policy 与项目 Check 声明:
|
|
83
|
+
`duplicateDetection`、`fileMetrics`、`functionMetrics`、`jsonValidation`、`jsonSchemaValidation`、
|
|
84
|
+
`markdownLinkValidation`、`markdownLint`、`secretDetection` 与 `maintenanceReminders`。前八项使用原有
|
|
85
|
+
object input;`maintenanceReminders(entries)` 保持可用,并增加含 `entries` 的 object input。`commandCheck`
|
|
86
|
+
保持自己的既有 contract。
|
|
77
87
|
|
|
78
|
-
|
|
88
|
+
`PackageCheckAuthoringOptions<Id extends string = string>` 是从 package root 导出的可复用项目声明类型。它的全部字段如下;
|
|
89
|
+
每个字段与 ordinary Check 上的同名字段具有相同含义:
|
|
90
|
+
|
|
91
|
+
| 字段 | 作用 | 详细规则 owner |
|
|
92
|
+
| --- | --- | --- |
|
|
93
|
+
| `checkId?` | 为实例声明 identity;省略时使用该构造器的默认 literal ID。 | Project Definition 的 validation |
|
|
94
|
+
| `displayName?` | 覆盖该构造器的默认显示名。自定义 `checkId` 不会派生新名称。 | 同上 |
|
|
95
|
+
| `enabledByFlags?` | 声明 selection condition。 | [按 flag 选择 Check](guides/extending-check-lifecycle.md#按-flag-选择-check) |
|
|
96
|
+
| `checks?` | 声明 children,使可执行 Check 同时承担 containment scope。 | [递归组合与继承](#递归组合与继承) |
|
|
97
|
+
| `dependsOn?`、`observes?` | 声明 direct relation;可使用 `inherit(...)`。 | [Check 依赖与类型化数据](guides/check-dependencies.md) |
|
|
98
|
+
| `maxParallel?`、`admissionPriority?`、`mutex?`、`resourceClaims?` | 声明 scheduling 与资源需求。 | [调度 Check](guides/scheduling.md) |
|
|
99
|
+
| `omitQuietPassedRow?` | 控制 progress 中 quiet passed row 的呈现。 | [递归组合与继承](#递归组合与继承) |
|
|
100
|
+
|
|
101
|
+
构造器 input 是 closed top-level object:它只接受所属 Check 的领域字段和这组项目字段。构造器负责安全快照、
|
|
102
|
+
默认 identity/display name、可在本地判断的字段 shape,以及两类字段的分流。默认 overload 返回该 Check 的默认 literal;
|
|
103
|
+
custom overload 要求 input 的静态类型含必填 `{ checkId: Id }`,并返回同一 `Id`;已宽化为通用 options 类型的变量使用
|
|
104
|
+
broad overload,返回 `string` identity。各 Check guide 给出本 Check 的三个签名、默认 identity/display name 与领域字段。
|
|
105
|
+
|
|
106
|
+
项目字段投影到最终 Check 声明;它们不进入 resolved `.options`、`prepare`、`execute` 或 execution
|
|
107
|
+
`context.options`。随包构造器仍拥有 `prepare`、`execute`、`parseData` 与 handoff 行为,不能通过这些 options 覆盖。
|
|
108
|
+
`defineConfig`/`run` 随后负责完整 tree 的语义校验、normalization 与运行。
|
|
109
|
+
|
|
110
|
+
## 按文件变化选择 Check
|
|
111
|
+
|
|
112
|
+
`changes` 让 Definition 从一次 Git comparison 派生选择用的 change flags。`source` 的完整形状是
|
|
113
|
+
`{ compareWith: string }`;`compareWith` 是 Git revision。`flags` 把非空 region ID 映射到 project-root-relative、
|
|
114
|
+
exclude-first glob region。region 的 `include` 必填,`exclude` 可省略且省略等同 `[]`;显式 `undefined`、`null` 或非数组值不合法。
|
|
115
|
+
有效 `projectRoot` 可以嵌套在 repository 内;Git paths 与 region matching 都相对这个 root。
|
|
116
|
+
|
|
117
|
+
一次 invocation 的数据流固定如下:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
caller flags ─────────────────────────────┐
|
|
121
|
+
Git snapshot → matched change flags ──────┼→ canonical effective flags → selection and project.flags
|
|
122
|
+
Git snapshot ─────────────────────────────└→ project.changes (files or unavailable reason)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
可信 snapshot 只发布命中至少一个 region 的稳定 `{ path, flags }` records;一个 path 可命中多个 regions。可信零命中为
|
|
126
|
+
`{ ok: true, files: [] }`,因此不派生 change flag。Git revision、repository 或 path evidence 不可信时为
|
|
127
|
+
`{ ok: false, reason }`,不带 `files`,但会把全部声明的 change flags 加入 effective flags,以保守选择可能依赖它们的 Check。
|
|
128
|
+
Controls 只能传普通 caller flags,不能传入 `vibe-check:change:` prefix。
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import { changeFlag, defineCheck, defineConfig, run } from "@zxyycom/vibe-check";
|
|
132
|
+
|
|
133
|
+
const sourceChanged = defineCheck({
|
|
134
|
+
checkId: "source-changed",
|
|
135
|
+
displayName: "Source changed",
|
|
136
|
+
enabledByFlags: { when: changeFlag("source") },
|
|
137
|
+
execute: ({ project }) => {
|
|
138
|
+
const changes = project.changes;
|
|
139
|
+
if (changes === undefined) {
|
|
140
|
+
return { status: "unavailable", reason: { code: "changes-not-configured" } };
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
status: "passed",
|
|
144
|
+
data: {
|
|
145
|
+
evidence: changes.ok ? "matched" : "unavailable-conservative",
|
|
146
|
+
effectiveFlags: project.flags,
|
|
147
|
+
matchedPaths: changes.ok ? changes.files.map(({ path }) => path) : []
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const definition = defineConfig({
|
|
154
|
+
changes: {
|
|
155
|
+
source: { compareWith: "origin/main" },
|
|
156
|
+
flags: {
|
|
157
|
+
source: { include: ["src/**"], exclude: ["src/generated/**"] }
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
checks: [sourceChanged],
|
|
161
|
+
outputs: {
|
|
162
|
+
diagnosticLogging: { enabled: false },
|
|
163
|
+
machinePublication: { enabled: false },
|
|
164
|
+
progressRendering: { enabled: false }
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
const result = await run(definition);
|
|
169
|
+
if (result.kind !== "completed") throw new Error(`Run did not complete: ${result.kind}`);
|
|
170
|
+
const outcome = result.snapshot.checks.find(({ checkId }) => checkId === sourceChanged.checkId)
|
|
171
|
+
?.outcome;
|
|
172
|
+
if (outcome?.status !== "passed" && outcome?.status !== "not-applicable") {
|
|
173
|
+
throw new Error("Change-aware Check did not settle successfully");
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
这个示例的 Check 由 `changeFlag("source")` 选择:命中时读取可信 paths,可信零命中时结算为
|
|
178
|
+
`not-applicable`,unavailable evidence 时仍运行但以 `changes.ok === false` 区分结果。`project.flags` 始终是上图的 canonical effective set;`project.changes` 才是 files 或 unavailable reason 的
|
|
179
|
+
evidence channel。要编写 condition、`prepare` 或 `execute`,继续阅读[Check lifecycle](guides/extending-check-lifecycle.md)。
|
|
180
|
+
|
|
181
|
+
## options preparation 与 execution
|
|
182
|
+
|
|
183
|
+
Check 在获准入后执行自己的 `prepare(options, signal, project?)`,再以 prepared options 或 fallback 进入 `execute`;block 或非法准备结果使本项 `unavailable`。不同 prepared shape 的类型要求、三种返回形式、冻结与取消边界见[自定义 Check 的 `prepare`](guides/extending-check-lifecycle.md#prepare准备阻止或带-fallback-继续)。
|
|
79
184
|
|
|
80
185
|
## terminal result、Records 与 messages
|
|
81
186
|
|
|
82
187
|
每个可执行 Check 返回一个 terminal result:`passed` / `failed` 带 Check-owned object final data;`not-applicable` 表示本次无适用工作,可省略 reason;`unavailable` 表示无法形成可信结论,必须带非空 `reason.code`。两者都没有 final data;无领域 data 的成功/失败结果可返回 `{}`。settlement 会 detach、canonicalize 并关闭 final data;callback throw、malformed result 或 noncanonical data 对应 `unavailable` outcome。
|
|
83
188
|
|
|
189
|
+
需要在同一 Run 的 direct prerequisite 间保留引用 identity 时,provider 在 `defineCheck({ handoff: true, ... })` 作最小声明,并只在 accepted `passed` result 返回 non-null object/function reference。handoff 类型由该 result 自动推断;direct `dependsOn` consumer 以 `dependencies.get(provider)` 一次取得 canonical data 和 typed reference。provider 的 `parseData` 仍只处理 canonical data。`handoff: true` 背后的 WeakMap identity 是 Product 内部细节;handoff 是 invocation-private capability,不属于 terminal Check facts。
|
|
190
|
+
|
|
84
191
|
final data 与 Record data 使用 canonical JSON object:root 不能是数组,拒绝不支持的 prototype/descriptor、getter、cycles、sparse arrays 和 non-finite numbers,不调用 `toJSON`。接受后形成 detached、deep-frozen 的 null-prototype facts;不要依赖 JavaScript own-key enumeration 推断 canonical 文本顺序。
|
|
85
192
|
|
|
86
193
|
`records.report({ id }, data)` 在 owning Check namespace 内追加 supplemental Record。每个 `id` 非空且在该 Check 内唯一,Record data 使用 canonical JSON object;无效或重复 Record 把 owning Check 结算为 `unavailable`。settlement 保留此前已经接受的 Records;Record 数量不决定 status。结算后 reporter 关闭,late write 抛错且不能更改事实。
|
|
@@ -93,11 +200,11 @@ progress 只呈现这些事实,不修改它们。预览默认值、formatter
|
|
|
93
200
|
|
|
94
201
|
## 递归组合与继承
|
|
95
202
|
|
|
96
|
-
每个节点使用唯一 `checkId` 和非空 `displayName`;可执行节点也可以包含子节点,containment 只贡献 scheduling scope,不额外产生 snapshot 层级。带 `
|
|
203
|
+
每个节点使用唯一 `checkId` 和非空 `displayName`;可执行节点也可以包含子节点,containment 只贡献 scheduling scope,不额外产生 snapshot 层级。带 `execute` 的节点形成自己的 outcome;没有 `execute` 的节点只组织子 Check 和 scheduling scope。普通对象字段表示显式 replacement;`inherit({ add, remove })` 只用于在父 `dependsOn`、`observes` 或 `mutex` collection 上增删。解析后,每个可执行节点拥有自己的 effective options、passed prerequisites、terminal observations、mutexes、normalized `omitQuietPassedRow` 人读呈现策略、parallel budget 与 admission priority。该策略不继承给 children,也不属于 terminal facts;它只供 progress renderer 决定 quiet-pass row 的保留与编号格式。
|
|
97
204
|
|
|
98
205
|
## 类型化依赖数据
|
|
99
206
|
|
|
100
|
-
使用 direct `dependsOn` 取得成功 prerequisite,使用 direct `observes` 等待并审计任意终态;从 `dependencies.get` / `list` 读取冻结事实,再由 producing Check 的 `parseData`
|
|
207
|
+
使用 direct `dependsOn` 取得成功 prerequisite,使用 direct `observes` 等待并审计任意终态;从 string `dependencies.get` / `list` 读取冻结事实,再由 producing Check 的 `parseData` 恢复业务类型。以 `handoff: true` 声明的 provider object 可用于 `dependencies.get(provider)`,向 direct prerequisite consumer 同时交付 frozen canonical data 与 same-Run reference。完整的[依赖数据指南](guides/check-dependencies.md)说明读取授权、继承、parser、identity 与 cleanup 边界,并给出运行示例。
|
|
101
208
|
|
|
102
209
|
## RunControls 与 Check aggregation
|
|
103
210
|
|
|
@@ -107,11 +214,23 @@ progress 只呈现这些事实,不修改它们。预览默认值、formatter
|
|
|
107
214
|
- `flags` 是可省略的 dense 非空 string-token 数组,省略、`undefined` 或 `[]` 得到冻结空数组;合法 tokens 被复制、去重并稳定排序,完整集合进入 callback project context。
|
|
108
215
|
- `checkArtifactBaseDirectory` 是可选、invocation-only 的 Check artifact base;它使用非空且无 U+0000 的受信任 directory grammar,relative text 从 effective `projectRoot` 解析,absolute text 直接作为 target。它不进入 Definition fingerprint,不创建 output status,也不授予 Check 读取 base、sibling directory、machine/diagnostic output 或 cross-Run state 的能力;没有配置时 callback 的 `artifactDirectory` 为 `null`。
|
|
109
216
|
- `progressLogFile` 是可选、invocation-only 的 terminal-progress tee target,使用同一非空且无 U+0000 target grammar;它不会改变 Definition outputs、Definition fingerprint 或 Check callback capability。
|
|
110
|
-
- `signal` 供
|
|
217
|
+
- `signal` 供 preparation 与 execution 协作取消;取消结果记录对应 phase。
|
|
111
218
|
- `diagnosticLogFileNaming` 可选 `"unique"`(默认)或 `"channel"`,只控制本次 core/scheduler 日志 basename,不启用 diagnostics、不进入 Definition fingerprint。
|
|
112
|
-
- `checkAggregation`
|
|
219
|
+
- `checkAggregation` 可选为同步 `CheckAggregation` 函数:`(checks: readonly CoreCheck[]) => CheckAggregate`。Product 只在完整结算后按 canonical Check order 传入本次有效列表;它不传入未选 Check、完整 snapshot、Records、messages、输出状态或控制对象。`CoreCheck` 提供 `checkId`、四态 `outcome`,以及 passed/failed outcome 的既有 final data。
|
|
220
|
+
|
|
221
|
+
aggregation 是 terminal outcomes 之外的 invocation-level fact。省略函数时,非空有效列表且所有 Check 都为 `passed` 得到 `passed`;空列表或任一 `failed`、`unavailable`、`not-applicable` 得到 `failed`。提供函数时,它可以同步返回闭合四态 `passed`、`failed`、`not-applicable` 或 `unavailable`,以调用方的领域规则解释同一列表。函数不能等待、选择 Check、修改 facts 或进入 Definition fingerprint。
|
|
222
|
+
|
|
223
|
+
例如,下面的调用方只把有效列表中的 `failed` 视为本次领域失败;函数直接返回字面量,不能标记为 `async`:
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
const result = await run(definition, {
|
|
227
|
+
checkAggregation(checks) {
|
|
228
|
+
return checks.some((check) => check.outcome.status === "failed") ? "failed" : "passed";
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
```
|
|
113
232
|
|
|
114
|
-
|
|
233
|
+
函数抛错、抛出非 `Error` 值、返回 Promise/thenable 或其它值会使 `run(...)` 的 Promise 直接拒绝;这不是 `RunResult` 的 configuration、execution 或 output branch。Product 关闭本次 diagnostic/progress writer,不呈现正常成功 summary,也不发布正常 machine result。调用方应在 `await run(...)` 周围按自己的错误边界处理这类 authoring fault;普通 Definition、Controls、planning、Check execution 和 output 故障仍按既有 `RunResult` 分支结算。
|
|
115
234
|
|
|
116
235
|
## RunResult 分支
|
|
117
236
|
|
|
@@ -121,11 +240,11 @@ aggregation 是 terminal outcomes 之外的 invocation-level fact。它在完整
|
|
|
121
240
|
|
|
122
241
|
| 分支 | 可用 facts 与处理方式 |
|
|
123
242
|
| --- | --- |
|
|
124
|
-
| `completed` | 完整 `snapshot`、`checkDurations`、`checkMessages`、`outputs`
|
|
125
|
-
| `output` | 完整
|
|
126
|
-
| `cancelled` / `phase: "execution"` | 取消时关闭的 snapshot、durations 与 messages
|
|
243
|
+
| `completed` | 完整 `snapshot`、`checkDurations`、`checkMessages`、`outputs` 与非空四态 `aggregate`;继续读取单项 Check outcome。handoff 已在 execution graph 关闭时清除,不在此结果中。 |
|
|
244
|
+
| `output` | 完整 `snapshot`、`checkDurations`、`checkMessages` 与四态 `aggregate`,另有 output failure diagnostic;消费 facts 并处理失败的 output。 |
|
|
245
|
+
| `cancelled` / `phase: "execution"` | 取消时关闭的 snapshot、durations 与 messages;没有 aggregate,按 cancellation result 处理。 |
|
|
127
246
|
| `cancelled` / `phase: "pre-work"` 或 `"planning"` | invocation metadata 与 cancellation phase;按 phase 结束调用。 |
|
|
128
|
-
| `configuration` | Definition
|
|
247
|
+
| `configuration` | Definition 或 Controls diagnostic;project callback 执行数为零。 |
|
|
129
248
|
| `planning` | task-graph diagnostic 与 invocation metadata。 |
|
|
130
249
|
| `execution` | Product execution-settlement diagnostic 与 invocation metadata。`diagnostic.code === "admission-policy-failed"` 表示 custom policy 已停止 admission、取消 pending 并 drain started work;它不是 Check terminal status,也不携带 partial snapshot。 |
|
|
131
250
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,13 +1,156 @@
|
|
|
1
1
|
# 变更日志
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本页随包提供版本变化与升级影响,按版本组织;具体行为规范由链接的用户指南拥有。
|
|
4
|
+
|
|
5
|
+
## 0.0.3
|
|
6
|
+
|
|
7
|
+
本节记录 `0.0.3` 相对 `v0.0.2` 的净变化。Node `>=24.18` 的宿主要求与包根程序化入口保持不变。
|
|
8
|
+
|
|
9
|
+
### 从 0.0.2 升级
|
|
10
|
+
|
|
11
|
+
按项目实际使用的能力完成以下调整,再运行项目类型检查与代表性 Run,复核有效选择、单项终态、
|
|
12
|
+
`aggregate`、Records 与输出失败处理。`RunResult.kind === "completed"` 仍不表示质量检查通过。
|
|
13
|
+
|
|
14
|
+
1. **调整自定义 Check 的回调与类型名称。**
|
|
15
|
+
`preflight` → `prepare`,`execution` → `execute`;
|
|
16
|
+
`CheckPreflight` / `CheckPreflightResult` → `CheckPreparation` / `CheckPreparationResult`,旧字段不保留兼容别名。
|
|
17
|
+
按原因码分类时,将 `preflight-threw`、`invalid-preflight-result` 改为
|
|
18
|
+
`preparation-threw`、`invalid-preparation-result`。
|
|
19
|
+
`prepare(options, signal, project?)` 每次 Run 都取得与 `execute` 一致的冻结项目上下文,
|
|
20
|
+
但公开类型的第三参数可省略,读取前须处理该分支;同时复核 options 深度只读类型推导。
|
|
21
|
+
见[自定义 Check](./guides/extending-check-lifecycle.md)。
|
|
22
|
+
2. **调整调度终态回调与状态读取。**
|
|
23
|
+
`scheduler.measurementHooks`、`SchedulerMeasurementHook` 与已准备策略的 `complete` 分别改为
|
|
24
|
+
`scheduler.terminalEffects`、`SchedulerTerminalEffect` 与 `terminalEffect`。
|
|
25
|
+
状态改读 `RunResult.outputs.terminalEffects`,诊断码改为 `scheduler-terminal-effects-failed`。
|
|
26
|
+
没有终态测量时不保证调用,资源释放不能依赖它。
|
|
27
|
+
见[调度扩展](./guides/scheduling.md#已准备的-custom-strategy)。
|
|
28
|
+
3. **复核聚合结果与定制函数的失败处理。**
|
|
29
|
+
`completed` / `output` 默认带 `aggregate`:有效 Check 非空且全部 `passed` 才为 `passed`,
|
|
30
|
+
空列表或任一其它终态均为 `failed`;取消分支不新增聚合结果。
|
|
31
|
+
旧 `checkAggregation` 策略对象改为同步 `(checks: readonly CoreCheck[]) => CheckAggregate`,
|
|
32
|
+
读取规范顺序的只读有效列表,返回四态之一,不修改 Check 事实。
|
|
33
|
+
函数抛错、返回 Promise/thenable 或非法值会直接拒绝 Run Promise,而非形成 `RunResult` 分支;
|
|
34
|
+
此时不发布正常完成摘要或机器结果,调用方须处理 `await run(...)` 的拒绝。
|
|
35
|
+
见[聚合契约](./api-mechanics.md#runcontrols-与-check-aggregation)。
|
|
36
|
+
4. **把 flag 选择改为组合条件。**
|
|
37
|
+
`enabledByFlags: { flags, mode }` 改为 `{ when, propagateDependsOn? }`。
|
|
38
|
+
`when` 使用 `CheckFlagCondition`:字符串表示单个 token,组合使用
|
|
39
|
+
`all`、`any`、`none`、`notAll`、`exactlyOne`、`not` 或对应递归 AST。
|
|
40
|
+
`dependsOn` 传播仍须显式启用,`observes` 不参与扩展。
|
|
41
|
+
见[flag 条件](./guides/extending-check-lifecycle.md#按-flag-选择-check);新增 Git 选择见下节。
|
|
42
|
+
5. **替换进度呈现的 `visibility`。**
|
|
43
|
+
删除旧字段;需要省略安静通过行时,在普通可执行 Check 上声明 `omitQuietPassedRow: true`。
|
|
44
|
+
它只接受字面量 `true`,容器不能声明,也不继承给子项。
|
|
45
|
+
安静通过指 `passed` 且已接受 Records/messages 均为空;只改变人读行,完整快照、时长和机器事实保持不变。
|
|
46
|
+
进度新增配置数与实际省略数,启用策略的行不编号,普通行仍按全局完成数编号。
|
|
47
|
+
`maintenanceReminders` 保持默认省略安静通过行;随包构造器接受 boolean,可用 `false` 撤销默认。
|
|
48
|
+
见[进度呈现](./guides/run-outputs.md#progress-rendering)。
|
|
49
|
+
|
|
50
|
+
### 新能力与现有 Check 修复
|
|
51
|
+
|
|
52
|
+
#### 项目声明与 Git 变化选择
|
|
53
|
+
|
|
54
|
+
- **九个随包构造器接受项目声明**:领域 options 同一顶层可声明标识、flags、关系、调度与呈现策略,
|
|
55
|
+
公开 `PackageCheckAuthoringOptions`;既有领域配置无需迁移。项目字段与执行 options 分离,构造器仍拥有回调、
|
|
56
|
+
解析函数与 handoff。`maintenanceReminders(entries)` 保持可用,并增加对象输入;`commandCheck` 使用自己的契约。
|
|
57
|
+
字段清单、字面量类型推导与校验见[构造器项目声明](./api-mechanics.md#随包-check-的构造器项目声明)。
|
|
58
|
+
- **Definition 新增 `changes`**:以 `source: { compareWith }` 声明 Git revision,以路径区域派生
|
|
59
|
+
`changeFlag(id)`。每次 Run 在选择前获取一次证据;可信零命中为 `{ ok: true, files: [] }`,
|
|
60
|
+
证据不可用时不伪造 files,而保守派生全部已声明 change flags。
|
|
61
|
+
回调的 `project.flags` 包含调用方与派生 tokens,路径或不可用原因从 `project.changes` 读取;
|
|
62
|
+
Controls 拒绝 `vibe-check:change:` 前缀。`include` 必填,`exclude` 省略等同 `[]`,非法输入仍拒绝。
|
|
63
|
+
见[文件变化选择](./api-mechanics.md#按文件变化选择-check)。
|
|
64
|
+
|
|
65
|
+
#### 外部命令与 Markdown 检查
|
|
66
|
+
|
|
67
|
+
- **新增 [`commandCheck`](./guides/command-check.md)**:以无 shell 的单个可执行程序与独立参数接入 Check,
|
|
68
|
+
必填超时与 stdout/stderr 各自的字节上限。完整数字退出码默认 `0` 为 `passed`、非零为 `failed`;
|
|
69
|
+
启动失败、超时、输出超限、信号终止、transcript 失败与取消保留不可用结算。
|
|
70
|
+
默认调用方基础环境为空、输出丢弃,Product 最后注入固定纯文本/禁用颜色变量。
|
|
71
|
+
可显式选择环境继承、调用时解析或 transcript 产物。
|
|
72
|
+
完整且未中断的数字退出(如启用 transcript,其写入也须成功)才调用 `afterCommand.execute`,用领域结果替代默认结算;
|
|
73
|
+
可选 `afterCommand.parseData` 建立类型化提供方。stdout/stderr 不自动发布,凭据、原始输出及派生数据的
|
|
74
|
+
访问控制、保留与清理由调用方负责。
|
|
75
|
+
- **新增 [`markdownLint`](./checks/markdown-lint.md) 与 `parseMarkdownLintData`**:
|
|
76
|
+
新增固定运行依赖 `markdownlint@0.41.1`,提供八项默认规则;`link-fragments` 须显式启用,
|
|
77
|
+
本地目标/锚点完整性仍由 `markdownLinkValidation` 检查。默认 Finding 为 `non-blocking`,可设为 `blocking`。
|
|
78
|
+
可选逐文件 findings 缓存默认关闭,使用调用方拥有的绝对目录;仍读取源码并重新结算策略与终态,
|
|
79
|
+
损坏/不可用时重新计算,容量与清理由调用方管理。
|
|
80
|
+
精确 `findingWaivers` 按 `path`、`rule`、完整 `range` 与 reason 对账,保留全部 Finding,
|
|
81
|
+
未命中/过宽发布 audit。`findingCount` 包含已豁免项;消费 `MarkdownLintRecordData` 时须覆盖 audit 分支。
|
|
82
|
+
|
|
83
|
+
#### 依赖交接与数据工具
|
|
84
|
+
|
|
85
|
+
- **新增同一次 Run 内的私有 handoff**:提供方以 `defineCheck({ handoff: true, ... })` 声明,
|
|
86
|
+
在已接受的 `passed` 结果交付对象/函数引用;直接 `dependsOn` 消费方用 `dependencies.get(provider)`
|
|
87
|
+
同时读取规范化 data 与类型化引用,不扩大 `observes` 或传递依赖的权限。
|
|
88
|
+
引用不进入 fingerprint、快照、RunResult、输出、聚合或缓存;执行图结束只清除 Product 自己的引用。
|
|
89
|
+
提供方/消费方须保持只读观察,资源创建者/调用方负责释放。见[依赖交接](./guides/check-dependencies.md)。
|
|
90
|
+
- **公开六项 [Core 数据工具](./guides/data-boundaries.md)**:
|
|
91
|
+
`canonicalizeJsonObject` / `canonicalizeJsonValue`、`canonicalJsonText` / `canonicalJsonBytes` 与
|
|
92
|
+
`snapshotExactClosedRecord` / `snapshotClosedArray` 从包根导出。
|
|
93
|
+
JSON 工具生成独立规范化副本或确定性文本/字节;结构工具只快照并冻结外层,保留嵌套与回调引用。
|
|
94
|
+
- **`reconcileFindingWaivers` 的 `waivers` 可省略**:省略或显式 `undefined` 等同 `[]`;
|
|
95
|
+
仍验证全部 Finding 标识,保留顺序与引用,非法配置仍拒绝。已传数组无需修改;
|
|
96
|
+
`ReconcileFindingWaiversOptions["waivers"]` 类型消费者须处理新增 `undefined` 分支。
|
|
97
|
+
见[Finding waiver](./guides/finding-waivers.md#输入与默认值)。
|
|
98
|
+
|
|
99
|
+
#### 兼容修复与指南
|
|
100
|
+
|
|
101
|
+
- **[`fileMetrics`](./checks/file-metrics.md) 支持大量精确路径分批传输 SCC**:
|
|
102
|
+
全部批次验收成功才发布一份统一测量,任一失败拒绝整次扫描,不发布部分结果;无新增公共配置。
|
|
103
|
+
- **修复 [`secretDetection`](./checks/secret-detection.md) 的 Windows 读取分支**:
|
|
104
|
+
用路径/文件描述符的设备与 inode 身份握手,避免仅因缺少 `O_NOFOLLOW` 提前拒绝普通文件;
|
|
105
|
+
POSIX 仍要求 `O_NOFOLLOW`,软链接、非普通文件或不可靠身份仍拒绝。
|
|
106
|
+
此可移植性修复不扩展受支持平台承诺,也不提供恶意文件系统沙箱。
|
|
107
|
+
- **新增[从质量目标构建项目 Gate](./guides/building-project-gate.md)指南**:
|
|
108
|
+
可执行场景覆盖命令接入、共享准备、依赖与观察、选择、自建缓存、资源约束和诊断转换。
|
|
109
|
+
|
|
110
|
+
`run.json` / `records.ndjson` 继续使用 [v4 machine schema](./output.md);
|
|
111
|
+
RunResult API 与各 Check 的 Record 变化须分别复核,不能仅以 schema 版本判断兼容性。
|
|
112
|
+
|
|
113
|
+
### 实现与仓库维护
|
|
114
|
+
|
|
115
|
+
本节面向仓库维护者,不增加包消费者的运行入口。
|
|
116
|
+
|
|
117
|
+
- 随包工具迁入 `package-tools` 责任层,保持既有包根导入;收紧 TypeScript/Oxlint 与公开依赖边界检查。
|
|
118
|
+
- Project Gate 复用 `commandCheck`,`afterGate` 改为 `resultContributor`;按材料责任重组验收,
|
|
119
|
+
用 change flags 收窄增量选择,显式启用 Markdown lint/cache;性能预算按总耗时与 Check 分布告警。
|
|
120
|
+
- 候选包复用原始编译产物并收窄缓存失效;重整材料验证、投影与治理验证入口。
|
|
121
|
+
|
|
122
|
+
### 0.0.3 相关提交
|
|
123
|
+
|
|
124
|
+
提交用于追溯实现;具体行为规范见以上指南,精确签名见安装包声明。
|
|
125
|
+
|
|
126
|
+
| 变更主题 | 提交 |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| 扩展生命周期与只读 options 类型 | `502dd799`、`155b781d` |
|
|
129
|
+
| 默认与同步定制聚合 | `454a00ed` |
|
|
130
|
+
| Git change flags、组合条件与可省略 exclude | `4a9426d7`、`f619f5c5`、`8638ed77`、`f6af3a53` |
|
|
131
|
+
| 随包构造器项目声明 | `09113635` |
|
|
132
|
+
| `commandCheck` 与完成阶段 | `a4f761ac`、`2229e2ca` |
|
|
133
|
+
| Markdown lint、缓存与精确 waiver | `ae3e05e1`、`5206ae78`、`c2054034` |
|
|
134
|
+
| 安静通过行呈现 | `2d2c532a`、`66bfce61` |
|
|
135
|
+
| 私有 handoff 与公开数据工具 | `9d09b785`、`0c6608ff` |
|
|
136
|
+
| SCC 分批与秘密检测文件读取 | `693a89be`、`2c991d6d` |
|
|
137
|
+
| 可省略 Finding waiver | `8d522ebf` |
|
|
138
|
+
| 项目 Gate 构建指南 | `3d4c97cb` |
|
|
139
|
+
| Gate 命令、材料与增量接线 | `a41e4b96`、`54f7da1b`、`a508fc48`、`9cd1238d`、`ddc60c31` |
|
|
140
|
+
| candidate 编译复用与文档材料校验 | `106929d8`、`fb6944df`、`bdbe685d`、`abda82a6` |
|
|
141
|
+
|
|
142
|
+
**历史说明更正**:下方 `0.0.2` 按真实 `v0.0.2` tag 恢复 `preflight`、`measurementHooks` 与 `afterGate`;
|
|
143
|
+
后续改名归于 `0.0.3` 的 `502dd799`,handoff 归于 tag 后的 `9d09b785`。
|
|
144
|
+
此更正仅修订发布说明,不改变 `0.0.2` 已发布产物或发布日期。
|
|
4
145
|
|
|
5
146
|
## 0.0.2
|
|
6
147
|
|
|
148
|
+
发布日期:2026-09-09。
|
|
149
|
+
|
|
7
150
|
本节按主题记录 `@zxyycom/vibe-check` 的 `0.0.2` 相对 `0.0.1` 的净变化。
|
|
8
151
|
升级影响随对应变更列出,提交记录集中在[相关提交](#相关提交)。
|
|
9
152
|
|
|
10
|
-
|
|
153
|
+
在 Node `>=24.18` 环境安装精确版本并更新 lockfile;按所用能力完成调整后,
|
|
11
154
|
运行项目 typecheck 和代表性 Run,复核 Check 终态、Finding/Records、aggregation 与诊断。
|
|
12
155
|
|
|
13
156
|
### 产品变化
|
|
@@ -7,6 +7,26 @@
|
|
|
7
7
|
|
|
8
8
|
默认使用随 package 安装的 jscpd v5(manifest 范围 `^5.1.1`),无需另配 executable。
|
|
9
9
|
|
|
10
|
+
## 构造器项目声明
|
|
11
|
+
|
|
12
|
+
`duplicateDetection` 有三类 overload:`duplicateDetection(options?: DuplicateDetectionOptions<"duplicate-detection">)`
|
|
13
|
+
保留默认 literal;`duplicateDetection<Id>(options: DuplicateDetectionOptions<Id> & { checkId: Id })` 保留 custom literal;
|
|
14
|
+
已宽化为 `DuplicateDetectionOptions` 的变量返回 `string` identity。默认 `checkId` 是 `duplicate-detection`,默认 `displayName` 是 `Duplicate detection`;`codeAreas`、
|
|
15
|
+
`findingPolicy`、`findingWaivers`、`cache` 与 `scanner` 仍是本 Check 的领域 options。
|
|
16
|
+
|
|
17
|
+
例如,为较昂贵的扫描声明较低并行度和独立 identity:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
const duplicateScan = duplicateDetection({
|
|
21
|
+
checkId: "source-duplicate-scan",
|
|
22
|
+
maxParallel: 1,
|
|
23
|
+
codeAreas: { source: { files: { include: ["src/**/*.ts"] } } }
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
返回值仍是原生 typed Check。项目声明字段不会进入 `.options` 或执行时的 `context.options`;
|
|
28
|
+
完整字段集合、投影和校验边界见[API 机制](../api-mechanics.md#随包-check-的构造器项目声明)。
|
|
29
|
+
|
|
10
30
|
## 最小用法
|
|
11
31
|
|
|
12
32
|
示例保留终端进度,不写 machine files。
|
|
@@ -30,8 +50,7 @@ if (result.kind !== "completed" || outcome?.status !== "passed") {
|
|
|
30
50
|
|
|
31
51
|
示例显式使用 `findingPolicy: "blocking"`,让未豁免的普通 Finding 导致失败;默认 `non-blocking` 只警告,不因 Finding 退出非零。
|
|
32
52
|
|
|
33
|
-
本例只接受 `completed` Run 中的 `passed` Check
|
|
34
|
-
显式配置并读取 [`checkAggregation`](../api-mechanics.md#runcontrols-与-check-aggregation);`run(...)` 返回本身不表示通过。
|
|
53
|
+
本例只接受 `completed` Run 中的 `passed` Check,否则退出非零。多个有效 Check 的调用级结论可读取默认严格 `aggregate`;需要不同领域解释时,提供同步 [`checkAggregation`](../api-mechanics.md#runcontrols-与-check-aggregation) 函数。`run(...)` 返回本身不表示通过。
|
|
35
54
|
|
|
36
55
|
## 参数与默认配置
|
|
37
56
|
|
|
@@ -234,7 +253,7 @@ Run progress 预览边界见 [呈现 Check Finding](../guides/presenting-finding
|
|
|
234
253
|
|
|
235
254
|
上述 `unavailable` 都发生在完整 Finding 集合形成前,因此不发布 applied/unused/overmatched waiver audit。
|
|
236
255
|
|
|
237
|
-
通用
|
|
256
|
+
通用 preparation 机制见 [options preparation 与 execution](../api-mechanics.md#options-preparation-与-execution)。
|
|
238
257
|
|
|
239
258
|
## I/O 与安全边界
|
|
240
259
|
|
|
@@ -8,6 +8,26 @@ waiver 在完整 Finding 集合上对账,不从 SCC 输入排除路径。
|
|
|
8
8
|
运行环境须提供默认 `scc` command,或配置已授权的 `scanner.executable`;两者均须支持精确 SCC 4.0.0 version output
|
|
9
9
|
与 CSV contract。安装与协议见[定制 SCC executable](#定制-scc-executable)。
|
|
10
10
|
|
|
11
|
+
## 构造器项目声明
|
|
12
|
+
|
|
13
|
+
`fileMetrics` 有三类 overload:`fileMetrics(options?: FileMetricsOptions<"file-metrics">)` 保留默认 literal;
|
|
14
|
+
`fileMetrics<Id>(options: FileMetricsOptions<Id> & { checkId: Id })` 保留 custom literal;已宽化为
|
|
15
|
+
`FileMetricsOptions` 的变量返回 `string` identity。默认 `checkId` 是 `file-metrics`,默认 `displayName` 是 `File metrics`;`codeAreas`、`findingPolicy`、
|
|
16
|
+
`findingWaivers` 与 `scanner` 仍是本 Check 的领域 options。
|
|
17
|
+
|
|
18
|
+
例如,可在同一 Definition 中用独立 identity 选择 source 指标,并保留默认展示名:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
const sourceMetrics = fileMetrics({
|
|
22
|
+
checkId: "source-file-metrics",
|
|
23
|
+
enabledByFlags: { when: "source-changed" },
|
|
24
|
+
codeAreas: { source: { files: { include: ["src/**/*.ts"] } } }
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
返回值仍是原生 typed Check。项目声明字段不会进入 `sourceMetrics.options` 或执行时的
|
|
29
|
+
`context.options`;完整字段集合、投影和校验边界见[API 机制](../api-mechanics.md#随包-check-的构造器项目声明)。
|
|
30
|
+
|
|
11
31
|
## 最小用法
|
|
12
32
|
|
|
13
33
|
示例保留终端进度,不写 machine files。
|
|
@@ -31,8 +51,7 @@ if (result.kind !== "completed" || outcome?.status !== "passed") {
|
|
|
31
51
|
|
|
32
52
|
示例显式使用 `findingPolicy: "blocking"`,让未豁免的普通 Finding 导致失败;默认 `non-blocking` 只警告,不因 Finding 退出非零。
|
|
33
53
|
|
|
34
|
-
本例只接受 `completed` Run 中的 `passed` Check
|
|
35
|
-
显式配置并读取 [`checkAggregation`](../api-mechanics.md#runcontrols-与-check-aggregation);`run(...)` 返回本身不表示通过。
|
|
54
|
+
本例只接受 `completed` Run 中的 `passed` Check,否则退出非零。多个有效 Check 的调用级结论可读取默认严格 `aggregate`;需要不同领域解释时,提供同步 [`checkAggregation`](../api-mechanics.md#runcontrols-与-check-aggregation) 函数。`run(...)` 返回本身不表示通过。
|
|
36
55
|
|
|
37
56
|
## 参数与默认配置
|
|
38
57
|
|
|
@@ -126,8 +145,8 @@ SCC CSV 的 `Complexity` 字段是 file-metrics 使用的 decision-token measure
|
|
|
126
145
|
|
|
127
146
|
1. Check 先按文件 `source` 分组;每种不同来源只枚举一次候选文件,再为每个 area 应用自己的 `include` / `exclude`,
|
|
128
147
|
并保存 path 到全部实际 area IDs 的 membership。
|
|
129
|
-
2. Check
|
|
130
|
-
3.
|
|
148
|
+
2. Check 对全部路径稳定排序、去重,并把这个 union 作为一次 logical SCC scan。adapter 按私有的 Windows UTF-16 argv 上界传输:安全的小输入仍由一个 process 承载;较大输入按原顺序分成一个或多个非空 exact-path batches。分批不会让 SCC 重新发现路径,也不形成新的 options、Records 或公开结果。
|
|
149
|
+
3. 每个 process batch 都必须先完成 CSV 与该 batch 的 exact-scope 验收;全部 batch 成功后 adapter 才拒绝重复 measurement path、稳定排序并交回统一结果。任一 process、CSV、scope 或汇合失败都会拒绝整个 logical scan,不发布已完成 batch 的部分 measurement。
|
|
131
150
|
4. 对属于多个区域的文件,Check 分别计算各区域的有效代码行上限,并使用其中最小的严格上限:
|
|
132
151
|
|
|
133
152
|
```text
|
|
@@ -150,8 +169,8 @@ const customFileMetrics = fileMetrics({
|
|
|
150
169
|
custom executable 必须直接接受 SCC CLI 参数。public scanner policy 只选择 executable;owning adapter 固定执行以下协议:
|
|
151
170
|
|
|
152
171
|
- availability probe:`--version`
|
|
153
|
-
- measurement
|
|
154
|
-
- process timeout:由 adapter
|
|
172
|
+
- measurement:每个私有 batch 都执行 `--no-config --by-file --format csv <approved exact paths...>`;全部 batch 仍是一份 logical measurement
|
|
173
|
+
- process timeout 与 stdout/stderr output budget:由 adapter 固定并覆盖完整 logical scan,不属于项目策略
|
|
155
174
|
|
|
156
175
|
需要 prefix arguments 的通用 runtime(例如 `node path/to/tool.js`)不是受支持的直接 command;项目应提供一个已授权的
|
|
157
176
|
专用 wrapper executable。当前 adapter 只接受 SCC `4.0.0` 的 version output 与对应 CSV header contract。
|
|
@@ -5,6 +5,26 @@
|
|
|
5
5
|
`functionMetrics` 是普通 Check,评估每个函数的 NLOC、cyclomatic complexity(CCN)、最大 nesting depth 与 parameter count。
|
|
6
6
|
它使用随包 TypeScript analyzer 分析所选的受支持源文件。
|
|
7
7
|
|
|
8
|
+
## 构造器项目声明
|
|
9
|
+
|
|
10
|
+
`functionMetrics` 有三类 overload:`functionMetrics(options?: FunctionMetricsOptions<"function-metrics">)`
|
|
11
|
+
保留默认 literal;`functionMetrics<Id>(options: FunctionMetricsOptions<Id> & { checkId: Id })` 保留 custom literal;
|
|
12
|
+
已宽化为 `FunctionMetricsOptions` 的变量返回 `string` identity。默认 `checkId` 是 `function-metrics`,默认 `displayName` 是 `Function metrics`;`codeAreas`、
|
|
13
|
+
`findingPolicy` 与 `findingWaivers` 仍是本 Check 的领域 options。
|
|
14
|
+
|
|
15
|
+
例如,按关系等待生成步骤后执行一个独立的函数指标实例:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const generatedFunctionMetrics = functionMetrics({
|
|
19
|
+
checkId: "generated-function-metrics",
|
|
20
|
+
dependsOn: ["generate-sources"],
|
|
21
|
+
codeAreas: { generated: { files: { include: ["generated/**/*.ts"] } } }
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
返回值仍是原生 typed Check。项目声明字段不会进入 `.options` 或执行时的 `context.options`;
|
|
26
|
+
完整字段集合、投影和校验边界见[API 机制](../api-mechanics.md#随包-check-的构造器项目声明)。
|
|
27
|
+
|
|
8
28
|
## 最小用法
|
|
9
29
|
|
|
10
30
|
示例保留终端进度,不写 machine files。
|
|
@@ -28,8 +48,7 @@ if (result.kind !== "completed" || outcome?.status !== "passed") {
|
|
|
28
48
|
|
|
29
49
|
示例显式使用 `findingPolicy: "blocking"`,让未豁免的普通 Finding 导致失败;默认 `non-blocking` 只警告,不因 Finding 退出非零。
|
|
30
50
|
|
|
31
|
-
本例只接受 `completed` Run 中的 `passed` Check
|
|
32
|
-
显式配置并读取 [`checkAggregation`](../api-mechanics.md#runcontrols-与-check-aggregation);`run(...)` 返回本身不表示通过。
|
|
51
|
+
本例只接受 `completed` Run 中的 `passed` Check,否则退出非零。多个有效 Check 的调用级结论可读取默认严格 `aggregate`;需要不同领域解释时,提供同步 [`checkAggregation`](../api-mechanics.md#runcontrols-与-check-aggregation) 函数。`run(...)` 返回本身不表示通过。
|
|
33
52
|
|
|
34
53
|
## 参数与默认配置
|
|
35
54
|
|