@zxyycom/vibe-check 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -5
- package/dist/esm/check/check.mjs +4 -0
- package/dist/esm/check/check.mjs.map +1 -1
- package/dist/esm/check/flag-enablement.mjs +32 -0
- package/dist/esm/check/flag-enablement.mjs.map +1 -0
- package/dist/esm/check/handoff-provider-identity.mjs +18 -0
- package/dist/esm/check/handoff-provider-identity.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +1 -1
- package/dist/esm/check/inherited-collection.mjs.map +1 -1
- package/dist/esm/check/project-changes.mjs +2 -0
- package/dist/esm/check/project-changes.mjs.map +1 -0
- package/dist/esm/check/project-context.mjs +2 -0
- package/dist/esm/check/project-context.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -1
- package/dist/esm/check-settlement/record-store.mjs +1 -1
- package/dist/esm/check-settlement/record-store.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-data.mjs +36 -7
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -1
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -1
- package/dist/esm/data-boundary/closed-values.mjs +28 -4
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
- package/dist/esm/{package-checks/project-files → data-boundary}/config-glob.mjs +3 -3
- package/dist/esm/data-boundary/config-glob.mjs.map +1 -0
- package/dist/esm/data-boundary/project-path.mjs +19 -0
- package/dist/esm/data-boundary/project-path.mjs.map +1 -0
- package/dist/esm/index.mjs +12 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs +4 -1
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
- package/dist/esm/package-checks/check-authoring.mjs +69 -0
- package/dist/esm/package-checks/check-authoring.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -1
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -1
- package/dist/esm/package-checks/command-check/command-check.mjs +55 -0
- package/dist/esm/package-checks/command-check/command-check.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/contract.mjs +2 -0
- package/dist/esm/package-checks/command-check/contract.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/execution.mjs +134 -0
- package/dist/esm/package-checks/command-check/execution.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/options.mjs +284 -0
- package/dist/esm/package-checks/command-check/options.mjs.map +1 -0
- package/dist/esm/package-checks/command-check/transcript.mjs +26 -0
- package/dist/esm/package-checks/command-check/transcript.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +2 -4
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +1 -1
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs +38 -0
- package/dist/esm/package-checks/file-metrics/scc/batch-planner.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs +35 -0
- package/dist/esm/package-checks/file-metrics/scc/logical-scan-resources.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +102 -29
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analysis.mjs +7 -2
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +1 -3
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +3 -2
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +12 -7
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +6 -6
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +5 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +9 -3
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +12 -5
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +20 -8
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/constructor.mjs +9 -11
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/execution.mjs +2 -4
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs +3 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/git.mjs +11 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/path.mjs +1 -17
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/result.mjs +43 -17
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process/runner.mjs +7 -5
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +6 -2
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +11 -3
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/default-check.mjs +9 -11
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/local-cache-options.mjs +28 -0
- package/dist/esm/package-checks/local-cache-options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +37 -45
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +3 -1
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +19 -33
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +1 -3
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +3 -18
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +2 -14
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs +4 -5
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-lint/adapter.mjs +125 -0
- package/dist/esm/package-checks/markdown-lint/adapter.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs +37 -0
- package/dist/esm/package-checks/markdown-lint/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs +202 -0
- package/dist/esm/package-checks/markdown-lint/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs +16 -0
- package/dist/esm/package-checks/markdown-lint/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs +72 -0
- package/dist/esm/package-checks/markdown-lint/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs +110 -0
- package/dist/esm/package-checks/markdown-lint/findings-cache.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs +74 -0
- package/dist/esm/package-checks/markdown-lint/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs +41 -0
- package/dist/esm/package-checks/markdown-lint/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs +13 -0
- package/dist/esm/package-checks/markdown-lint/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs +65 -0
- package/dist/esm/package-checks/markdown-lint/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs +14 -0
- package/dist/esm/package-checks/markdown-lint/unavailable-reasons.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +23 -19
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +2 -5
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +22 -6
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-paths.mjs +3 -3
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +11 -15
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/default-check.mjs +9 -11
- package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/execution.mjs +2 -2
- package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs +46 -7
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +3 -4
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -1
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs +10 -0
- package/dist/esm/package-tools/admission-policy/define-admission-policy.mjs.map +1 -0
- package/dist/esm/{cache → package-tools/cache}/cache-json-by-key.mjs +13 -14
- package/dist/esm/package-tools/cache/cache-json-by-key.mjs.map +1 -0
- package/dist/esm/package-tools/finding-presentation/finding-presentation.mjs.map +1 -0
- package/dist/esm/{finding-waivers → package-tools/finding-waivers}/reconciliation.mjs +14 -5
- package/dist/esm/package-tools/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/critical-path-ranking.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.mjs +2 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/prediction.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.mjs +4 -2
- package/dist/esm/package-tools/learned-critical-path/duration-model/preparation.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/duration-model/recording.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.mjs +8 -8
- package/dist/esm/package-tools/learned-critical-path/duration-model/storage.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.mjs +1 -2
- package/dist/esm/package-tools/learned-critical-path/selection-layers.mjs.map +1 -0
- package/dist/esm/package-tools/learned-critical-path/static-decision.mjs.map +1 -0
- package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/strategy.mjs +3 -3
- package/dist/esm/package-tools/learned-critical-path/strategy.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +8 -5
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +79 -66
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs +71 -0
- package/dist/esm/project-definition/check-tree/flag-conditions.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +13 -8
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/resolution.mjs +7 -6
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs +2 -1
- package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -1
- package/dist/esm/project-definition/project-changes.mjs +70 -0
- package/dist/esm/project-definition/project-changes.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +40 -8
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
- package/dist/esm/project-definition/project-definition.mjs +22 -15
- package/dist/esm/project-definition/project-definition.mjs.map +1 -1
- package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +9 -6
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -1
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -1
- package/dist/esm/project-run/aggregation.mjs +42 -59
- package/dist/esm/project-run/aggregation.mjs.map +1 -1
- package/dist/esm/project-run/changes/git.mjs +161 -0
- package/dist/esm/project-run/changes/git.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs +41 -0
- package/dist/esm/project-run/check-execution/admitted-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +3 -2
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/dependencies.mjs +80 -5
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +5 -3
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +37 -16
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/flag-controls.mjs +15 -7
- package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/{preflight-result.mjs → preparation-result.mjs} +24 -24
- package/dist/esm/project-run/check-execution/preparation-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/{preflight.mjs → preparation.mjs} +52 -52
- package/dist/esm/project-run/check-execution/preparation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs +71 -0
- package/dist/esm/project-run/check-execution/ready-check-execution.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +27 -164
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs +79 -0
- package/dist/esm/project-run/check-execution/scheduled-check-run.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +70 -25
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -1
- package/dist/esm/project-run/completion/completion.mjs +18 -1
- package/dist/esm/project-run/completion/completion.mjs.map +1 -1
- package/dist/esm/project-run/controls/contract.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation.mjs +7 -54
- package/dist/esm/project-run/controls/validation.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +3 -3
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidate.mjs +17 -13
- package/dist/esm/project-run/invocation/candidate.mjs.map +1 -1
- package/dist/esm/project-run/invocation/candidates.mjs +26 -0
- package/dist/esm/project-run/invocation/candidates.mjs.map +1 -0
- package/dist/esm/project-run/invocation/creation.mjs +7 -3
- package/dist/esm/project-run/invocation/creation.mjs.map +1 -1
- package/dist/esm/project-run/invocation/execution.mjs +98 -0
- package/dist/esm/project-run/invocation/execution.mjs.map +1 -0
- package/dist/esm/project-run/invocation/run.mjs +13 -112
- package/dist/esm/project-run/invocation/run.mjs.map +1 -1
- package/dist/esm/project-run/invocation/scheduler.mjs +13 -6
- package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -1
- package/dist/esm/project-run/outputs/status.mjs +12 -12
- package/dist/esm/project-run/outputs/status.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/presentation.mjs +31 -11
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +11 -4
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +20 -6
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer.mjs +6 -2
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
- package/dist/esm/project-run/project-context.mjs +2 -1
- package/dist/esm/project-run/project-context.mjs.map +1 -1
- package/dist/esm/project-run/result.mjs +2 -2
- package/dist/esm/project-run/result.mjs.map +1 -1
- package/dist/esm/project-run/run.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph-lookup.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +9 -4
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +3 -5
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +25 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +8 -8
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +8 -4
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +12 -6
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +3 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +17 -17
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +18 -6
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
- package/docs/api-mechanics.md +147 -28
- package/docs/changelog.md +145 -2
- package/docs/checks/duplicate-detection.md +22 -3
- package/docs/checks/file-metrics.md +25 -6
- package/docs/checks/function-metrics.md +21 -2
- package/docs/checks/json-schema-validation.md +25 -4
- package/docs/checks/json-validation.md +24 -5
- package/docs/checks/maintenance-reminders.md +30 -6
- package/docs/checks/markdown-link-validation.md +24 -4
- package/docs/checks/markdown-lint.md +167 -0
- package/docs/checks/secret-detection.md +31 -7
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +10 -10
- package/docs/guides/building-project-gate.md +706 -0
- package/docs/guides/callbacks.md +81 -22
- package/docs/guides/check-dependencies.md +41 -10
- package/docs/guides/collecting-project-files.md +7 -7
- package/docs/guides/command-check.md +155 -0
- package/docs/guides/data-boundaries.md +140 -0
- package/docs/guides/extending-check-lifecycle.md +77 -25
- package/docs/guides/finding-waivers.md +43 -1
- package/docs/guides/learned-scheduling.md +1 -1
- package/docs/guides/run-outputs.md +35 -9
- package/docs/guides/scheduling.md +15 -15
- package/docs/output.md +6 -5
- package/package.json +2 -1
- package/src/check/check.ts +332 -92
- package/src/check/flag-enablement.ts +76 -0
- package/src/check/handoff-provider-identity.ts +34 -0
- package/src/check/inherited-collection.ts +1 -1
- package/src/check/project-changes.ts +14 -0
- package/src/check/project-context.ts +11 -0
- package/src/check-settlement/facts.ts +1 -1
- package/src/check-settlement/record-store.ts +1 -1
- package/src/data-boundary/canonical-data.ts +36 -9
- package/src/data-boundary/canonical-json.ts +18 -1
- package/src/data-boundary/closed-values.ts +26 -6
- package/src/data-boundary/config-glob.ts +17 -0
- package/src/data-boundary/project-path.ts +21 -0
- package/src/index.ts +72 -11
- package/src/machine-output/v4/atomic-publication.ts +3 -1
- package/src/package-checks/check-authoring.ts +136 -0
- package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +1 -1
- package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +1 -1
- package/src/package-checks/command-check/command-check.ts +152 -0
- package/src/package-checks/command-check/contract.ts +168 -0
- package/src/package-checks/command-check/execution.ts +211 -0
- package/src/package-checks/command-check/options.ts +331 -0
- package/src/package-checks/command-check/transcript.ts +35 -0
- package/src/package-checks/duplicate-detection/default-check.ts +37 -6
- package/src/package-checks/duplicate-detection/execution.ts +2 -4
- package/src/package-checks/duplicate-detection/finding-messages.ts +2 -2
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
- package/src/package-checks/duplicate-detection/options.ts +6 -3
- package/src/package-checks/duplicate-detection/records.ts +1 -1
- package/src/package-checks/file-metrics/constructor.ts +29 -6
- package/src/package-checks/file-metrics/execution.ts +2 -4
- package/src/package-checks/file-metrics/finding-messages.ts +1 -1
- package/src/package-checks/file-metrics/options.ts +6 -3
- package/src/package-checks/file-metrics/records.ts +1 -1
- package/src/package-checks/file-metrics/scc/availability.ts +1 -1
- package/src/package-checks/file-metrics/scc/batch-planner.ts +56 -0
- package/src/package-checks/file-metrics/scc/logical-scan-resources.ts +59 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +134 -32
- package/src/package-checks/function-metrics/analysis.ts +7 -2
- package/src/package-checks/function-metrics/analyzer/analysis-model.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/extension-output.ts +14 -6
- package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +1 -3
- package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +3 -3
- package/src/package-checks/function-metrics/analyzer/pipeline.ts +4 -2
- package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +6 -6
- package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +1 -1
- package/src/package-checks/function-metrics/analyzer/readers/objc.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +14 -7
- package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +8 -4
- package/src/package-checks/function-metrics/analyzer/readers/python.ts +4 -3
- package/src/package-checks/function-metrics/analyzer/readers/r.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +9 -3
- package/src/package-checks/function-metrics/analyzer/readers/zig.ts +2 -1
- package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +3 -1
- package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +10 -5
- package/src/package-checks/function-metrics/analyzer-worker-port.ts +20 -6
- package/src/package-checks/function-metrics/constructor.ts +30 -7
- package/src/package-checks/function-metrics/execution.ts +2 -4
- package/src/package-checks/function-metrics/finding-messages.ts +2 -2
- package/src/package-checks/function-metrics/measurement.ts +3 -1
- package/src/package-checks/function-metrics/options.ts +6 -3
- package/src/package-checks/function-metrics/records.ts +1 -1
- package/src/package-checks/host-environment/git.ts +11 -0
- package/src/package-checks/host-environment/path.ts +1 -20
- package/src/package-checks/host-environment/process/contract.ts +17 -9
- package/src/package-checks/host-environment/process/result.ts +48 -20
- package/src/package-checks/host-environment/process/runner.ts +8 -4
- package/src/package-checks/json-schema-validation/default-check.ts +38 -5
- package/src/package-checks/json-schema-validation/options.ts +4 -1
- package/src/package-checks/json-schema-validation/reference-resolver.ts +6 -2
- package/src/package-checks/json-schema-validation/schema-policy.ts +10 -5
- package/src/package-checks/json-validation/default-check.ts +27 -6
- package/src/package-checks/json-validation/options.ts +4 -1
- package/src/package-checks/local-cache-options.ts +40 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +89 -9
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +3 -3
- package/src/package-checks/markdown-link-validation/default-check.ts +48 -5
- package/src/package-checks/markdown-link-validation/execution.ts +1 -1
- package/src/package-checks/markdown-link-validation/finding-messages.ts +1 -1
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +1 -5
- package/src/package-checks/markdown-link-validation/options-resolution.ts +2 -19
- package/src/package-checks/markdown-link-validation/options-validation.ts +2 -17
- package/src/package-checks/markdown-link-validation/options.ts +6 -7
- package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +4 -5
- package/src/package-checks/markdown-lint/adapter.ts +167 -0
- package/src/package-checks/markdown-lint/default-check.ts +92 -0
- package/src/package-checks/markdown-lint/execution.ts +266 -0
- package/src/package-checks/markdown-lint/final-data.ts +33 -0
- package/src/package-checks/markdown-lint/finding-messages.ts +87 -0
- package/src/package-checks/markdown-lint/finding-waiver-identity.ts +54 -0
- package/src/package-checks/markdown-lint/findings-cache.ts +141 -0
- package/src/package-checks/markdown-lint/options-resolution.ts +102 -0
- package/src/package-checks/markdown-lint/options-validation.ts +50 -0
- package/src/package-checks/markdown-lint/options.ts +82 -0
- package/src/package-checks/markdown-lint/records.ts +132 -0
- package/src/package-checks/markdown-lint/unavailable-reasons.ts +33 -0
- package/src/package-checks/project-files/collection.ts +38 -22
- package/src/package-checks/project-files/config-glob.ts +1 -17
- package/src/package-checks/project-files/configuration.ts +1 -1
- package/src/package-checks/project-files/gitlink-revision.ts +4 -6
- package/src/package-checks/project-files/gitlink-worktree.ts +35 -7
- package/src/package-checks/project-files/public-collection.ts +1 -1
- package/src/package-checks/project-files/revision-paths.ts +3 -3
- package/src/package-checks/project-files/revision-worktree-files.ts +16 -16
- package/src/package-checks/secret-detection/default-check.ts +29 -6
- package/src/package-checks/secret-detection/execution.ts +2 -2
- package/src/package-checks/secret-detection/input-preparation.ts +64 -7
- package/src/package-checks/secret-detection/options.ts +5 -2
- package/src/package-checks/secret-detection/records.ts +1 -1
- package/src/package-checks/secret-detection/secretlint/adapter.ts +3 -4
- package/src/package-tools/admission-policy/define-admission-policy.ts +54 -0
- package/src/{cache → package-tools/cache}/cache-json-by-key.ts +13 -17
- package/src/{check → package-tools/finding-presentation}/finding-presentation.ts +3 -1
- package/src/{finding-waivers → package-tools/finding-waivers}/reconciliation.ts +16 -8
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.ts +5 -2
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.ts +5 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.ts +5 -4
- package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.ts +9 -10
- package/src/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.ts +2 -3
- package/src/{learned-critical-path → package-tools/learned-critical-path}/static-decision.ts +1 -1
- package/src/{learned-critical-path → package-tools/learned-critical-path}/strategy.ts +7 -4
- package/src/project-definition/check-tree/authoring.ts +15 -8
- package/src/project-definition/check-tree/check-fields-authoring.ts +106 -91
- package/src/project-definition/check-tree/flag-conditions.ts +99 -0
- package/src/project-definition/check-tree/materialization.ts +12 -8
- package/src/project-definition/check-tree/resolution.ts +13 -15
- package/src/project-definition/declarative-snapshot.ts +9 -2
- package/src/project-definition/project-changes.ts +112 -0
- package/src/project-definition/project-definition-validation.ts +58 -10
- package/src/project-definition/project-definition.ts +41 -68
- package/src/project-definition/scheduler-policy.ts +6 -3
- package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +11 -8
- package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +2 -2
- package/src/project-run/aggregation.ts +51 -74
- package/src/project-run/changes/git.ts +206 -0
- package/src/project-run/check-execution/admitted-check-execution.ts +62 -0
- package/src/project-run/check-execution/callback.ts +3 -2
- package/src/project-run/check-execution/dependencies.ts +120 -6
- package/src/project-run/check-execution/execution-finalization.ts +6 -4
- package/src/project-run/check-execution/execution-settlement.ts +88 -29
- package/src/project-run/check-execution/flag-controls.ts +22 -8
- package/src/project-run/check-execution/lifecycle.ts +14 -6
- package/src/project-run/check-execution/{preflight-result.ts → preparation-result.ts} +34 -32
- package/src/project-run/check-execution/{preflight.ts → preparation.ts} +92 -84
- package/src/project-run/check-execution/ready-check-execution.ts +97 -0
- package/src/project-run/check-execution/resolved-checks.ts +40 -219
- package/src/project-run/check-execution/scheduled-check-run.ts +119 -0
- package/src/project-run/check-execution/terminal-result.ts +108 -29
- package/src/project-run/completion/completion.ts +17 -3
- package/src/project-run/controls/contract.ts +6 -16
- package/src/project-run/controls/validation.ts +7 -60
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +1 -2
- package/src/project-run/diagnostic-logging/observation-rendering.ts +1 -1
- package/src/project-run/invocation/candidate.ts +28 -15
- package/src/project-run/invocation/candidates.ts +56 -0
- package/src/project-run/invocation/creation.ts +7 -3
- package/src/project-run/invocation/execution.ts +136 -0
- package/src/project-run/invocation/run.ts +15 -179
- package/src/project-run/invocation/scheduler.ts +13 -6
- package/src/project-run/outputs/status.ts +15 -15
- package/src/project-run/progress-rendering/presentation.ts +35 -13
- package/src/project-run/progress-rendering/renderer-formatting.ts +20 -7
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +23 -6
- package/src/project-run/progress-rendering/renderer.ts +10 -4
- package/src/project-run/project-context.ts +8 -4
- package/src/project-run/result.ts +5 -5
- package/src/project-run/run.ts +1 -1
- package/src/project-run/task-scheduler/admission-core/compiled-graph-lookup.ts +71 -0
- package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +9 -4
- package/src/project-run/task-scheduler/admission-core/selection-query.ts +6 -4
- package/src/project-run/task-scheduler/admission-core/selection-seed.ts +36 -6
- package/src/project-run/task-scheduler/admission-core/selection-transition.ts +17 -8
- package/src/project-run/task-scheduler/execution-state.ts +4 -4
- package/src/project-run/task-scheduler/measurement/diagnostics.ts +10 -4
- package/src/project-run/task-scheduler/measurement/timing.ts +13 -5
- package/src/project-run/task-scheduler/scheduler-observation.ts +3 -1
- package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +24 -22
- package/src/project-run/task-scheduler/scheduler.ts +23 -6
- package/types/check/check.d.ts +178 -67
- package/types/check/flag-enablement.d.ts +42 -0
- package/types/check/handoff-provider-identity.d.ts +12 -0
- package/types/check/project-changes.d.ts +13 -0
- package/types/check/project-context.d.ts +10 -0
- package/types/check-settlement/facts.d.ts +1 -1
- package/types/data-boundary/canonical-data.d.ts +28 -5
- package/types/data-boundary/canonical-json.d.ts +18 -1
- package/types/data-boundary/closed-values.d.ts +17 -1
- package/types/data-boundary/config-glob.d.ts +5 -0
- package/types/data-boundary/project-path.d.ts +4 -0
- package/types/index.d.ts +27 -11
- package/types/package-checks/check-authoring.d.ts +45 -0
- package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +1 -1
- package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +1 -1
- package/types/package-checks/command-check/command-check.d.ts +48 -0
- package/types/package-checks/command-check/contract.d.ts +108 -0
- package/types/package-checks/command-check/execution.d.ts +7 -0
- package/types/package-checks/command-check/options.d.ts +11 -0
- package/types/package-checks/command-check/transcript.d.ts +8 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +5 -2
- package/types/package-checks/duplicate-detection/finding-messages.d.ts +1 -1
- package/types/package-checks/duplicate-detection/options.d.ts +4 -3
- package/types/package-checks/duplicate-detection/records.d.ts +1 -1
- package/types/package-checks/file-metrics/constructor.d.ts +5 -2
- package/types/package-checks/file-metrics/options.d.ts +4 -3
- package/types/package-checks/file-metrics/records.d.ts +1 -1
- package/types/package-checks/file-metrics/scc/batch-planner.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/logical-scan-resources.d.ts +14 -0
- package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +3 -3
- package/types/package-checks/function-metrics/constructor.d.ts +5 -2
- package/types/package-checks/function-metrics/finding-messages.d.ts +1 -1
- package/types/package-checks/function-metrics/options.d.ts +4 -3
- package/types/package-checks/function-metrics/records.d.ts +1 -1
- package/types/package-checks/host-environment/git.d.ts +2 -0
- package/types/package-checks/host-environment/path.d.ts +1 -3
- package/types/package-checks/host-environment/process/contract.d.ts +17 -9
- package/types/package-checks/json-schema-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-schema-validation/options.d.ts +2 -1
- package/types/package-checks/json-validation/default-check.d.ts +4 -1
- package/types/package-checks/json-validation/options.d.ts +2 -1
- package/types/package-checks/local-cache-options.d.ts +9 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +11 -2
- package/types/package-checks/markdown-link-validation/default-check.d.ts +4 -1
- package/types/package-checks/markdown-link-validation/options.d.ts +4 -7
- package/types/package-checks/markdown-lint/adapter.d.ts +10 -0
- package/types/package-checks/markdown-lint/default-check.d.ts +37 -0
- package/types/package-checks/markdown-lint/execution.d.ts +24 -0
- package/types/package-checks/markdown-lint/final-data.d.ts +8 -0
- package/types/package-checks/markdown-lint/finding-messages.d.ts +6 -0
- package/types/package-checks/markdown-lint/finding-waiver-identity.d.ts +3 -0
- package/types/package-checks/markdown-lint/findings-cache.d.ts +17 -0
- package/types/package-checks/markdown-lint/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-lint/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-lint/options.d.ts +65 -0
- package/types/package-checks/markdown-lint/records.d.ts +39 -0
- package/types/package-checks/markdown-lint/unavailable-reasons.d.ts +3 -0
- package/types/package-checks/secret-detection/default-check.d.ts +4 -1
- package/types/package-checks/secret-detection/options.d.ts +3 -2
- package/types/package-tools/admission-policy/define-admission-policy.d.ts +26 -0
- package/types/{check → package-tools/finding-presentation}/finding-presentation.d.ts +3 -1
- package/types/{finding-waivers → package-tools/finding-waivers}/reconciliation.d.ts +3 -3
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/prediction.d.ts +2 -2
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/preparation.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/selection-layers.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/static-decision.d.ts +1 -1
- package/types/{learned-critical-path → package-tools/learned-critical-path}/strategy.d.ts +1 -1
- package/types/project-definition/check-tree/authoring.d.ts +5 -3
- package/types/project-definition/check-tree/check-fields-authoring.d.ts +12 -7
- package/types/project-definition/check-tree/flag-conditions.d.ts +5 -0
- package/types/project-definition/check-tree/resolution.d.ts +6 -4
- package/types/project-definition/declarative-snapshot.d.ts +4 -1
- package/types/project-definition/project-changes.d.ts +30 -0
- package/types/project-definition/project-definition.d.ts +15 -30
- package/types/project-definition/scheduler-policy.d.ts +3 -3
- package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +2 -2
- package/types/project-run/aggregation.d.ts +8 -6
- package/types/project-run/changes/git.d.ts +14 -0
- package/types/project-run/check-execution/admitted-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/dependencies.d.ts +3 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +1 -1
- package/types/project-run/check-execution/execution-settlement.d.ts +15 -7
- package/types/project-run/check-execution/flag-controls.d.ts +1 -1
- package/types/project-run/check-execution/lifecycle.d.ts +9 -5
- package/types/project-run/check-execution/{preflight-result.d.ts → preparation-result.d.ts} +3 -3
- package/types/project-run/check-execution/{preflight.d.ts → preparation.d.ts} +10 -9
- package/types/project-run/check-execution/ready-check-execution.d.ts +18 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +12 -13
- package/types/project-run/check-execution/scheduled-check-run.d.ts +10 -0
- package/types/project-run/check-execution/terminal-result.d.ts +13 -1
- package/types/project-run/completion/completion.d.ts +3 -1
- package/types/project-run/controls/contract.d.ts +6 -16
- package/types/project-run/invocation/candidates.d.ts +8 -0
- package/types/project-run/invocation/execution.d.ts +5 -0
- package/types/project-run/invocation/run.d.ts +2 -2
- package/types/project-run/outputs/status.d.ts +4 -4
- package/types/project-run/progress-rendering/presentation.d.ts +4 -3
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +5 -2
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +2 -0
- package/types/project-run/progress-rendering/renderer.d.ts +4 -2
- package/types/project-run/project-context.d.ts +3 -3
- package/types/project-run/result.d.ts +3 -3
- package/types/project-run/run.d.ts +1 -1
- package/types/project-run/task-scheduler/admission-core/compiled-graph-lookup.d.ts +10 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +4 -4
- package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +2 -2
- package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +1 -1
- package/dist/esm/cache/cache-json-by-key.mjs.map +0 -1
- package/dist/esm/check/finding-presentation.mjs.map +0 -1
- package/dist/esm/finding-waivers/reconciliation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +0 -1
- package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +0 -1
- package/dist/esm/learned-critical-path/selection-layers.mjs.map +0 -1
- package/dist/esm/learned-critical-path/static-decision.mjs.map +0 -1
- package/dist/esm/learned-critical-path/strategy.mjs.map +0 -1
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +0 -1
- package/dist/esm/project-run/check-execution/preflight.mjs.map +0 -1
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +0 -1
- package/types/package-checks/project-files/config-glob.d.ts +0 -5
- /package/dist/esm/{check → package-tools/finding-presentation}/finding-presentation.mjs +0 -0
- /package/dist/esm/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/duration-model/recording.mjs +0 -0
- /package/dist/esm/{learned-critical-path → package-tools/learned-critical-path}/static-decision.mjs +0 -0
- /package/src/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.ts +0 -0
- /package/src/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.ts +0 -0
- /package/types/{cache → package-tools/cache}/cache-json-by-key.d.ts +0 -0
- /package/types/{project-run/task-scheduler → package-tools/learned-critical-path}/critical-path-ranking.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/bounded-history.d.ts +0 -0
- /package/types/{learned-critical-path → package-tools/learned-critical-path}/duration-model/storage.d.ts +0 -0
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { lstatSync } from "node:fs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
|
|
6
|
-
import { matchesAnyConfigGlob } from "
|
|
6
|
+
import { matchesAnyConfigGlob } from "../../data-boundary/config-glob.ts";
|
|
7
7
|
import { collectSubmoduleWorktreeFiles } from "./revision-worktree-files.ts";
|
|
8
8
|
import { errorMessage } from "../host-environment/error-message.ts";
|
|
9
9
|
import { processFailed } from "../host-environment/process.ts";
|
|
10
|
-
import { runGit, splitNulDelimitedGitFileList } from "../host-environment/git.ts";
|
|
10
|
+
import { gitFailureDetail, runGit, splitNulDelimitedGitFileList } from "../host-environment/git.ts";
|
|
11
11
|
import { toSlashPath } from "../host-environment/path.ts";
|
|
12
12
|
import { walkFiles } from "../host-environment/filesystem.ts";
|
|
13
13
|
import type { ProjectFileSelection, ProjectFileSource } from "./configuration.ts";
|
|
@@ -17,6 +17,16 @@ type NamedProjectFileSelection = Readonly<{
|
|
|
17
17
|
readonly selection: ProjectFileSelection;
|
|
18
18
|
}>;
|
|
19
19
|
|
|
20
|
+
type SourceCandidateCollector = (
|
|
21
|
+
rootDir: string,
|
|
22
|
+
selections: readonly NamedProjectFileSelection[]
|
|
23
|
+
) => readonly string[];
|
|
24
|
+
|
|
25
|
+
const sourceCandidateCollectors = Object.freeze({
|
|
26
|
+
filesystem: collectFilesystemCandidates,
|
|
27
|
+
"git-worktree": collectGitWorktreeCandidates
|
|
28
|
+
}) satisfies Readonly<Partial<Record<ProjectFileSource, SourceCandidateCollector>>>;
|
|
29
|
+
|
|
20
30
|
const CONFIG_GLOB_MAGIC = /[\\*?[\]{}()!+@]/u;
|
|
21
31
|
|
|
22
32
|
/**
|
|
@@ -77,21 +87,29 @@ function collectSourceCandidates(
|
|
|
77
87
|
source: ProjectFileSource,
|
|
78
88
|
selections: readonly NamedProjectFileSelection[]
|
|
79
89
|
): readonly string[] {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
return sourceCandidateCollectorFor(source)(rootDir, selections);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function sourceCandidateCollectorFor(source: ProjectFileSource): SourceCandidateCollector {
|
|
94
|
+
const collector = sourceCandidateCollectors[source];
|
|
95
|
+
if (collector === undefined) return unsupportedProjectFileSource(source);
|
|
96
|
+
return collector;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function unsupportedProjectFileSource(source: ProjectFileSource): never {
|
|
100
|
+
throw new TypeError(`unsupported project file source: ${source}`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function collectFilesystemCandidates(
|
|
104
|
+
rootDir: string,
|
|
105
|
+
selections: readonly NamedProjectFileSelection[]
|
|
106
|
+
): readonly string[] {
|
|
107
|
+
return uniqueSorted(
|
|
108
|
+
walkFiles({
|
|
109
|
+
ignoredDirs: commonExcludedDirectoryNames(selections),
|
|
110
|
+
rootDir
|
|
111
|
+
}).map(toSlashPath)
|
|
112
|
+
);
|
|
95
113
|
}
|
|
96
114
|
|
|
97
115
|
function collectGitWorktreeCandidates(
|
|
@@ -103,11 +121,9 @@ function collectGitWorktreeCandidates(
|
|
|
103
121
|
cwd: rootDir
|
|
104
122
|
});
|
|
105
123
|
if (processFailed(result)) {
|
|
106
|
-
|
|
107
|
-
result
|
|
108
|
-
|
|
109
|
-
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
110
|
-
throw new Error(`could not enumerate git-worktree files in ${rootDir}: ${detail}`);
|
|
124
|
+
throw new Error(
|
|
125
|
+
`could not enumerate git-worktree files in ${rootDir}: ${gitFailureDetail(result)}`
|
|
126
|
+
);
|
|
111
127
|
}
|
|
112
128
|
|
|
113
129
|
const include = uniqueSorted(selections.flatMap(({ selection }) => [...selection.include]));
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { toSlashPath } from "../host-environment/path.ts";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Product config glob 的唯一 matcher boundary。
|
|
7
|
-
* Candidate 使用 slash form;dot path 只由显式 glob 决定,不附加隐式忽略规则。
|
|
8
|
-
*/
|
|
9
|
-
export function matchesAnyConfigGlob(
|
|
10
|
-
candidatePath: string,
|
|
11
|
-
configGlobs: readonly string[]
|
|
12
|
-
): boolean {
|
|
13
|
-
const normalizedCandidatePath = toSlashPath(candidatePath);
|
|
14
|
-
return configGlobs.some((configGlob) =>
|
|
15
|
-
minimatch(normalizedCandidatePath, configGlob, { dot: true })
|
|
16
|
-
);
|
|
17
|
-
}
|
|
1
|
+
export { matchesAnyConfigGlob } from "../../data-boundary/config-glob.ts";
|
|
@@ -127,7 +127,7 @@ function resolveStringArray(
|
|
|
127
127
|
|
|
128
128
|
function validStringArray(value: unknown): boolean {
|
|
129
129
|
const items = snapshotClosedArray(value);
|
|
130
|
-
return items
|
|
130
|
+
return items?.every(isString) === true;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
function isString(value: unknown): value is string {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Reads canonical gitlink entries from a named Git tree revision. */
|
|
2
2
|
|
|
3
3
|
import { processFailed } from "../host-environment/process.ts";
|
|
4
|
-
import { runGit } from "../host-environment/git.ts";
|
|
4
|
+
import { gitFailureDetail, runGit } from "../host-environment/git.ts";
|
|
5
5
|
import { toSlashPath } from "../host-environment/path.ts";
|
|
6
6
|
|
|
7
7
|
export type Gitlink = Readonly<{
|
|
@@ -21,11 +21,9 @@ export function gitlinksAtRevision({
|
|
|
21
21
|
cwd: repository
|
|
22
22
|
});
|
|
23
23
|
if (processFailed(result)) {
|
|
24
|
-
|
|
25
|
-
result
|
|
26
|
-
|
|
27
|
-
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
28
|
-
throw new Error(`could not inspect gitlinks at ${revision} in ${repository}: ${detail}`);
|
|
24
|
+
throw new Error(
|
|
25
|
+
`could not inspect gitlinks at ${revision} in ${repository}: ${gitFailureDetail(result)}`
|
|
26
|
+
);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
const gitlinks: Gitlink[] = [];
|
|
@@ -24,26 +24,54 @@ export function inspectGitlinkWorktree({
|
|
|
24
24
|
readonly gitlinkPath: string;
|
|
25
25
|
readonly repository: string;
|
|
26
26
|
}>): GitlinkWorktreeInspection {
|
|
27
|
+
const localWorktree = inspectLocalGitlinkWorktree({ gitlinkPath, repository });
|
|
28
|
+
if (localWorktree.kind !== "found") return localWorktree;
|
|
29
|
+
return inspectGitRepositoryRoot({
|
|
30
|
+
gitlinkPath,
|
|
31
|
+
canonicalSubmoduleRepository: localWorktree.repository
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type LocalGitlinkWorktree = Readonly<{ readonly kind: "found"; readonly repository: string }>;
|
|
36
|
+
|
|
37
|
+
function inspectLocalGitlinkWorktree({
|
|
38
|
+
gitlinkPath,
|
|
39
|
+
repository
|
|
40
|
+
}: Readonly<{
|
|
41
|
+
readonly gitlinkPath: string;
|
|
42
|
+
readonly repository: string;
|
|
43
|
+
}>): GitlinkWorktreeInspection | LocalGitlinkWorktree {
|
|
27
44
|
const submoduleRepository = resolve(repository, gitlinkPath);
|
|
28
|
-
let canonicalSubmoduleRepository: string;
|
|
29
45
|
try {
|
|
30
46
|
if (!statSync(submoduleRepository).isDirectory()) return { kind: "missing" };
|
|
31
|
-
|
|
47
|
+
return { kind: "found", repository: canonicalRepositoryPath(submoduleRepository) };
|
|
32
48
|
} catch (error: unknown) {
|
|
33
49
|
return missingPath(error)
|
|
34
50
|
? { kind: "missing" }
|
|
35
51
|
: inspectionFailure(`could not inspect submodule worktree ${gitlinkPath}`, error);
|
|
36
52
|
}
|
|
53
|
+
}
|
|
37
54
|
|
|
55
|
+
function inspectGitRepositoryRoot({
|
|
56
|
+
gitlinkPath,
|
|
57
|
+
canonicalSubmoduleRepository
|
|
58
|
+
}: Readonly<{
|
|
59
|
+
readonly gitlinkPath: string;
|
|
60
|
+
readonly canonicalSubmoduleRepository: string;
|
|
61
|
+
}>): GitlinkWorktreeInspection {
|
|
38
62
|
const topLevelResult = runGit({
|
|
39
63
|
args: ["rev-parse", "--show-toplevel"],
|
|
40
64
|
cwd: canonicalSubmoduleRepository
|
|
41
65
|
});
|
|
42
66
|
if (processFailed(topLevelResult)) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
const processErrorMessage = topLevelResult.error?.message;
|
|
68
|
+
const stderr = topLevelResult.stderr.trim();
|
|
69
|
+
let topLevelFailureDetail = `exit ${topLevelResult.status}`;
|
|
70
|
+
if (processErrorMessage !== undefined && processErrorMessage.length > 0) {
|
|
71
|
+
topLevelFailureDetail = processErrorMessage;
|
|
72
|
+
} else if (stderr.length > 0) {
|
|
73
|
+
topLevelFailureDetail = stderr;
|
|
74
|
+
}
|
|
47
75
|
return {
|
|
48
76
|
kind: "inspection-failed",
|
|
49
77
|
error: `git rev-parse --show-toplevel failed while inspecting submodule ${gitlinkPath}: ${topLevelFailureDetail}`
|
|
@@ -51,7 +79,7 @@ export function inspectGitlinkWorktree({
|
|
|
51
79
|
}
|
|
52
80
|
|
|
53
81
|
const topLevel = topLevelResult.stdout.trim();
|
|
54
|
-
if (
|
|
82
|
+
if (topLevel.length === 0) {
|
|
55
83
|
return {
|
|
56
84
|
kind: "inspection-failed",
|
|
57
85
|
error: `git rev-parse --show-toplevel returned no repository path for submodule ${gitlinkPath}`
|
|
@@ -82,7 +82,7 @@ function parseSelection(value: unknown): ProjectFileSelection | undefined {
|
|
|
82
82
|
|
|
83
83
|
function snapshotStringArray(value: unknown): readonly string[] | undefined {
|
|
84
84
|
const items = snapshotClosedArray(value);
|
|
85
|
-
return items
|
|
85
|
+
return items?.every((item): item is string => typeof item === "string") === true
|
|
86
86
|
? Object.freeze([...items])
|
|
87
87
|
: undefined;
|
|
88
88
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Path and Git-output projections shared by revision traversal helpers. */
|
|
2
2
|
|
|
3
3
|
import { toSlashPath } from "../host-environment/path.ts";
|
|
4
|
-
import { matchesAnyConfigGlob } from "
|
|
4
|
+
import { matchesAnyConfigGlob } from "../../data-boundary/config-glob.ts";
|
|
5
5
|
|
|
6
6
|
export function uniqueSortedPaths(files: readonly string[]): string[] {
|
|
7
7
|
return [...new Set(files.map(toSlashPath))].sort();
|
|
@@ -29,6 +29,6 @@ export function joinSlash({
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export function nonEmptyGitOutput(stdout: string | null | undefined): string | null {
|
|
32
|
-
const value = (stdout
|
|
33
|
-
return value
|
|
32
|
+
const value = (stdout ?? "").trim();
|
|
33
|
+
return value.length > 0 ? value : null;
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Enumerates files from initialized, non-cyclic submodule working trees. */
|
|
2
2
|
|
|
3
3
|
import { processFailed } from "../host-environment/process.ts";
|
|
4
|
-
import { runGit, splitNulDelimitedGitFileList } from "../host-environment/git.ts";
|
|
4
|
+
import { gitFailureDetail, runGit, splitNulDelimitedGitFileList } from "../host-environment/git.ts";
|
|
5
5
|
import {
|
|
6
6
|
canonicalRepositoryPath,
|
|
7
7
|
resolveDescendableGitlinkRepository,
|
|
@@ -33,7 +33,7 @@ export function collectSubmoduleWorktreeFiles({
|
|
|
33
33
|
repository,
|
|
34
34
|
visitedRepositories
|
|
35
35
|
});
|
|
36
|
-
if (
|
|
36
|
+
if (submoduleRepository === null) continue;
|
|
37
37
|
files.push(
|
|
38
38
|
...collectWorktreeFiles({
|
|
39
39
|
prefix: gitlink.path,
|
|
@@ -65,11 +65,9 @@ function collectWorktreeFiles({
|
|
|
65
65
|
cwd: repository
|
|
66
66
|
});
|
|
67
67
|
if (processFailed(result)) {
|
|
68
|
-
|
|
69
|
-
result
|
|
70
|
-
|
|
71
|
-
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
72
|
-
throw new Error(`could not enumerate git-worktree files in ${repository}: ${detail}`);
|
|
68
|
+
throw new Error(
|
|
69
|
+
`could not enumerate git-worktree files in ${repository}: ${gitFailureDetail(result)}`
|
|
70
|
+
);
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
const files = prefixAndFilter({
|
|
@@ -111,7 +109,7 @@ function collectNestedWorktreeFiles({
|
|
|
111
109
|
repository,
|
|
112
110
|
visitedRepositories
|
|
113
111
|
});
|
|
114
|
-
if (
|
|
112
|
+
if (submoduleRepository === null) continue;
|
|
115
113
|
files.push(
|
|
116
114
|
...collectWorktreeFiles({
|
|
117
115
|
prefix: joinSlash({ path: gitlink.path, prefix }),
|
|
@@ -134,15 +132,17 @@ function worktreeRevision(repository: string): string | null {
|
|
|
134
132
|
if (revision !== null) return revision;
|
|
135
133
|
throw new Error(`git-worktree revision inspection returned no revision in ${repository}`);
|
|
136
134
|
}
|
|
137
|
-
|
|
135
|
+
if (headDoesNotExist(result)) return null;
|
|
136
|
+
throw new Error(
|
|
137
|
+
`could not inspect git-worktree revision in ${repository}: ${gitFailureDetail(result)}`
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function headDoesNotExist(result: ReturnType<typeof runGit>): boolean {
|
|
142
|
+
return (
|
|
138
143
|
result.error === undefined &&
|
|
139
144
|
result.signal === null &&
|
|
140
145
|
result.status === 1 &&
|
|
141
|
-
result.stderr.trim() === ""
|
|
142
|
-
|
|
143
|
-
const detail =
|
|
144
|
-
result.stderr.trim() ||
|
|
145
|
-
result.error?.message ||
|
|
146
|
-
(result.signal === null ? `exit status ${result.status}` : `signal ${result.signal}`);
|
|
147
|
-
throw new Error(`could not inspect git-worktree revision in ${repository}: ${detail}`);
|
|
146
|
+
result.stderr.trim() === ""
|
|
147
|
+
);
|
|
148
148
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { defineCheck, type TypedCheckWithOptions } from "../../check/check.ts";
|
|
2
|
+
import {
|
|
3
|
+
resolvePackageCheckAuthoringInput,
|
|
4
|
+
type PackageCheckIdentityInput
|
|
5
|
+
} from "../check-authoring.ts";
|
|
2
6
|
import { executeSecretDetection, SECRET_DETECTION_CHECK_DEFINITION } from "./execution.ts";
|
|
3
7
|
import { parseSecretDetectionData } from "./final-data.ts";
|
|
4
8
|
import type { ResolvedSecretDetectionOptions, SecretDetectionOptions } from "./options.ts";
|
|
@@ -13,23 +17,42 @@ import { validSecretDetectionOptions } from "./options-validation.ts";
|
|
|
13
17
|
* @throws {TypeError} files 缺失、策略不完整或输入含未知字段时抛出。
|
|
14
18
|
*/
|
|
15
19
|
export function secretDetection(
|
|
16
|
-
options: SecretDetectionOptions
|
|
20
|
+
options: SecretDetectionOptions<"secret-detection">
|
|
17
21
|
): TypedCheckWithOptions<
|
|
18
22
|
"secret-detection",
|
|
19
23
|
ResolvedSecretDetectionOptions,
|
|
20
24
|
typeof parseSecretDetectionData
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
>;
|
|
26
|
+
export function secretDetection<const Id extends string>(
|
|
27
|
+
options: SecretDetectionOptions<Id> & PackageCheckIdentityInput<Id>
|
|
28
|
+
): TypedCheckWithOptions<Id, ResolvedSecretDetectionOptions, typeof parseSecretDetectionData>;
|
|
29
|
+
export function secretDetection(
|
|
30
|
+
options: SecretDetectionOptions
|
|
31
|
+
): TypedCheckWithOptions<string, ResolvedSecretDetectionOptions, typeof parseSecretDetectionData>;
|
|
32
|
+
export function secretDetection(
|
|
33
|
+
options: SecretDetectionOptions
|
|
34
|
+
): TypedCheckWithOptions<string, ResolvedSecretDetectionOptions, typeof parseSecretDetectionData> {
|
|
35
|
+
const input = resolvePackageCheckAuthoringInput(
|
|
36
|
+
options,
|
|
37
|
+
["files", "maximumFileBytes", "maximumTotalBytes", "maximumFileCount", "findingWaivers"],
|
|
38
|
+
SECRET_DETECTION_CHECK_DEFINITION
|
|
39
|
+
);
|
|
40
|
+
if (input === undefined) {
|
|
41
|
+
throw new TypeError(
|
|
42
|
+
"secretDetection options must declare the documented closed explicit file policy"
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
const resolvedOptions = resolveSecretDetectionOptions(input.domainOptions);
|
|
23
46
|
if (resolvedOptions === undefined) {
|
|
24
47
|
throw new TypeError(
|
|
25
48
|
"secretDetection options must declare the documented closed explicit file policy"
|
|
26
49
|
);
|
|
27
50
|
}
|
|
28
51
|
return defineCheck({
|
|
29
|
-
...
|
|
30
|
-
|
|
52
|
+
...input.definition,
|
|
53
|
+
execute: executeSecretDetection,
|
|
31
54
|
parseData: parseSecretDetectionData,
|
|
32
|
-
|
|
55
|
+
prepare: (preparedOptions) =>
|
|
33
56
|
validSecretDetectionOptions(preparedOptions)
|
|
34
57
|
? { status: "success", preparedOptions }
|
|
35
58
|
: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CheckExecutionContext, CheckMessage, CheckResult } from "../../check/check.ts";
|
|
2
|
-
import { appendCheckMessages } from "../../
|
|
3
|
-
import { reconcileFindingWaivers } from "../../finding-waivers/reconciliation.ts";
|
|
2
|
+
import { appendCheckMessages } from "../../package-tools/finding-presentation/finding-presentation.ts";
|
|
3
|
+
import { reconcileFindingWaivers } from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
4
4
|
import { reportFindingWaiverAudits } from "../code-quality-findings/finding-waiver-evidence.ts";
|
|
5
5
|
import { collectProjectFiles } from "../project-files/collection.ts";
|
|
6
6
|
import type { SecretDetectionFinalData } from "./final-data.ts";
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
closeSync,
|
|
3
|
+
constants,
|
|
4
|
+
fstatSync,
|
|
5
|
+
lstatSync,
|
|
6
|
+
openSync,
|
|
7
|
+
readSync,
|
|
8
|
+
type BigIntStats
|
|
9
|
+
} from "node:fs";
|
|
2
10
|
import { resolve } from "node:path";
|
|
3
11
|
|
|
4
12
|
import type { CheckExecutionContext } from "../../check/check.ts";
|
|
@@ -147,7 +155,7 @@ function readBoundedRegularFile(input: {
|
|
|
147
155
|
readonly filePath: string;
|
|
148
156
|
readonly options: ResolvedSecretDetectionOptions;
|
|
149
157
|
}): BoundedRegularFileRead {
|
|
150
|
-
const descriptor =
|
|
158
|
+
const descriptor = openIdentityCheckedRegularFile(input.filePath);
|
|
151
159
|
if (descriptor === undefined) return Object.freeze({ kind: "unavailable" });
|
|
152
160
|
try {
|
|
153
161
|
const byteLength = regularFileByteLength(descriptor);
|
|
@@ -175,17 +183,66 @@ function closeDescriptor(descriptor: number): void {
|
|
|
175
183
|
}
|
|
176
184
|
}
|
|
177
185
|
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
interface RegularFileIdentity {
|
|
187
|
+
readonly device: bigint;
|
|
188
|
+
readonly inode: bigint;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function openIdentityCheckedRegularFile(filePath: string): number | undefined {
|
|
192
|
+
const expectedIdentity = regularFileIdentityAtPath(filePath);
|
|
193
|
+
if (expectedIdentity === undefined) return undefined;
|
|
194
|
+
const openFlags = finalLeafOpenFlags();
|
|
195
|
+
if (openFlags === undefined) return undefined;
|
|
196
|
+
|
|
197
|
+
let descriptor: number;
|
|
198
|
+
try {
|
|
199
|
+
descriptor = openSync(filePath, openFlags);
|
|
200
|
+
} catch {
|
|
201
|
+
return undefined;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const openedIdentity = regularFileIdentityOnDescriptor(descriptor);
|
|
205
|
+
if (openedIdentity !== undefined && sameRegularFileIdentity(expectedIdentity, openedIdentity)) {
|
|
206
|
+
return descriptor;
|
|
207
|
+
}
|
|
208
|
+
closeDescriptor(descriptor);
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function finalLeafOpenFlags(): number | undefined {
|
|
213
|
+
if (process.platform === "win32") return constants.O_RDONLY;
|
|
214
|
+
return typeof constants.O_NOFOLLOW === "number" && constants.O_NOFOLLOW !== 0
|
|
215
|
+
? constants.O_RDONLY | constants.O_NOFOLLOW
|
|
216
|
+
: undefined;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function regularFileIdentityAtPath(filePath: string): RegularFileIdentity | undefined {
|
|
180
220
|
try {
|
|
181
|
-
return
|
|
221
|
+
return regularFileIdentity(lstatSync(filePath, { bigint: true }));
|
|
182
222
|
} catch {
|
|
183
223
|
return undefined;
|
|
184
224
|
}
|
|
185
225
|
}
|
|
186
226
|
|
|
187
|
-
function
|
|
188
|
-
|
|
227
|
+
function regularFileIdentityOnDescriptor(descriptor: number): RegularFileIdentity | undefined {
|
|
228
|
+
try {
|
|
229
|
+
return regularFileIdentity(fstatSync(descriptor, { bigint: true }));
|
|
230
|
+
} catch {
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function regularFileIdentity(details: BigIntStats): RegularFileIdentity | undefined {
|
|
236
|
+
return details.isFile() && details.dev > 0n && details.ino > 0n
|
|
237
|
+
? Object.freeze({ device: details.dev, inode: details.ino })
|
|
238
|
+
: undefined;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function sameRegularFileIdentity(
|
|
242
|
+
expected: RegularFileIdentity,
|
|
243
|
+
opened: RegularFileIdentity
|
|
244
|
+
): boolean {
|
|
245
|
+
return expected.device === opened.device && expected.inode === opened.inode;
|
|
189
246
|
}
|
|
190
247
|
|
|
191
248
|
function regularFileByteLength(descriptor: number): number | undefined {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PackageCheckAuthoringOptions } from "../check-authoring.ts";
|
|
2
|
+
import type { FindingWaiver } from "../../package-tools/finding-waivers/reconciliation.ts";
|
|
2
3
|
import type { ProjectFileSelection } from "../project-files/configuration.ts";
|
|
3
4
|
|
|
4
5
|
/** `secretDetection(options)` 的明确 authoring policy。 */
|
|
5
|
-
export interface SecretDetectionOptions
|
|
6
|
+
export interface SecretDetectionOptions<
|
|
7
|
+
Id extends string = string
|
|
8
|
+
> extends PackageCheckAuthoringOptions<Id> {
|
|
6
9
|
/** 必填的完整 project-file policy;只有它选中的 path 可以被读取或传给 detector。 */
|
|
7
10
|
readonly files: ProjectFileSelection;
|
|
8
11
|
/** 单个输入允许的最大 raw byte 数;超过时形成不可豁免的 coverage gap。 */
|
|
@@ -81,10 +81,9 @@ export function adaptSecretlintMessages(
|
|
|
81
81
|
function isPrivateKeyMessage(value: unknown): boolean {
|
|
82
82
|
const message = snapshotClosedRecord(value);
|
|
83
83
|
return (
|
|
84
|
-
message
|
|
85
|
-
message
|
|
86
|
-
message
|
|
87
|
-
message.severity === "error"
|
|
84
|
+
message?.type === "message" &&
|
|
85
|
+
message?.ruleId === secretDetectionPrivateKeyRuleId &&
|
|
86
|
+
message?.severity === "error"
|
|
88
87
|
);
|
|
89
88
|
}
|
|
90
89
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AdmissionPolicy,
|
|
3
|
+
CustomAdmissionPreparationContext,
|
|
4
|
+
CustomAdmissionStrategy,
|
|
5
|
+
PreparedCustomAdmissionStrategy
|
|
6
|
+
} from "../../project-definition/scheduler-policy.ts";
|
|
7
|
+
|
|
8
|
+
type ExactAdmissionPolicy<T extends AdmissionPolicy> =
|
|
9
|
+
T extends Readonly<{ readonly kind: "static" }>
|
|
10
|
+
? T & Record<Exclude<keyof T, "kind">, never>
|
|
11
|
+
: T extends Readonly<{ readonly kind: "custom" }>
|
|
12
|
+
? T &
|
|
13
|
+
Record<Exclude<keyof T, "kind" | "strategy">, never> &
|
|
14
|
+
Readonly<{
|
|
15
|
+
readonly strategy: ExactCustomAdmissionStrategy<T["strategy"]>;
|
|
16
|
+
}>
|
|
17
|
+
: never;
|
|
18
|
+
|
|
19
|
+
type ExactCustomAdmissionStrategy<T extends CustomAdmissionStrategy> =
|
|
20
|
+
T extends Readonly<{ readonly kind: "simple" }>
|
|
21
|
+
? T & Record<Exclude<keyof T, "kind" | "decide">, never>
|
|
22
|
+
: T extends Readonly<{ readonly kind: "prepared" }>
|
|
23
|
+
? T &
|
|
24
|
+
Record<Exclude<keyof T, "kind" | "prepare">, never> &
|
|
25
|
+
Readonly<{ readonly prepare: ExactCustomPreparation<T["prepare"]> }>
|
|
26
|
+
: never;
|
|
27
|
+
|
|
28
|
+
type ExactCustomPreparation<T> = T extends (
|
|
29
|
+
this: void,
|
|
30
|
+
context: CustomAdmissionPreparationContext
|
|
31
|
+
) => infer Result
|
|
32
|
+
? (this: void, context: CustomAdmissionPreparationContext) => ExactCustomPreparationResult<Result>
|
|
33
|
+
: never;
|
|
34
|
+
|
|
35
|
+
type ExactCustomPreparationResult<T> =
|
|
36
|
+
T extends Promise<unknown>
|
|
37
|
+
? Promise<ExactPreparedCustomAdmissionStrategy<Awaited<T>>>
|
|
38
|
+
: ExactPreparedCustomAdmissionStrategy<T>;
|
|
39
|
+
|
|
40
|
+
type ExactPreparedCustomAdmissionStrategy<T> = T extends PreparedCustomAdmissionStrategy
|
|
41
|
+
? T & Record<Exclude<keyof T, "decide" | "terminalEffect">, never>
|
|
42
|
+
: never;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 保留 closed admission policy literal 的 TypeScript inference,不创建额外运行语义。
|
|
46
|
+
*
|
|
47
|
+
* @remarks inline policy 与此 helper 的结果完全等价。custom simple `decide` 同步运行;prepared
|
|
48
|
+
* strategy 为每个 graph-ready Run 解析独立 closure,调用方负责其 trusted host callback 的可重入性。
|
|
49
|
+
*/
|
|
50
|
+
export function defineAdmissionPolicy<const T extends AdmissionPolicy>(
|
|
51
|
+
policy: ExactAdmissionPolicy<T>
|
|
52
|
+
): T {
|
|
53
|
+
return policy;
|
|
54
|
+
}
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
canonicalizeJsonObject,
|
|
8
8
|
canonicalJsonBytes,
|
|
9
9
|
type CanonicalJsonObject
|
|
10
|
-
} from "
|
|
11
|
-
import {
|
|
10
|
+
} from "../../data-boundary/canonical-data.ts";
|
|
11
|
+
import { snapshotExactClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
12
12
|
|
|
13
13
|
const CACHE_API_VERSION = "caller-keyed-json-v1";
|
|
14
14
|
const CACHE_ENVELOPE_KEYS = ["cacheFormatVersion", "identityDigest", "payload"] as const;
|
|
@@ -113,18 +113,15 @@ type ParsedOptions<T extends object> = Readonly<{
|
|
|
113
113
|
}>;
|
|
114
114
|
|
|
115
115
|
function parseOptions<T extends object>(value: CacheJsonByKeyOptions<T>): ParsedOptions<T> {
|
|
116
|
-
const record =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"version"
|
|
126
|
-
])
|
|
127
|
-
) {
|
|
116
|
+
const record = snapshotExactClosedRecord(value, [
|
|
117
|
+
"compute",
|
|
118
|
+
"directory",
|
|
119
|
+
"key",
|
|
120
|
+
"namespace",
|
|
121
|
+
"parse",
|
|
122
|
+
"version"
|
|
123
|
+
]);
|
|
124
|
+
if (record === undefined) {
|
|
128
125
|
throw new TypeError("cacheJsonByKey options must be a closed object");
|
|
129
126
|
}
|
|
130
127
|
const { compute, directory, key, namespace, parse, version } = record;
|
|
@@ -219,9 +216,8 @@ function parseEnvelope(
|
|
|
219
216
|
value: unknown,
|
|
220
217
|
identityDigest: string
|
|
221
218
|
): Readonly<{ readonly payload: CanonicalJsonObject }> | undefined {
|
|
222
|
-
const record =
|
|
223
|
-
if (record === undefined
|
|
224
|
-
return undefined;
|
|
219
|
+
const record = snapshotExactClosedRecord(value, CACHE_ENVELOPE_KEYS);
|
|
220
|
+
if (record === undefined) return undefined;
|
|
225
221
|
if (record.cacheFormatVersion !== CACHE_API_VERSION || record.identityDigest !== identityDigest) {
|
|
226
222
|
return undefined;
|
|
227
223
|
}
|