@zxyycom/vibe-check 0.0.1 → 0.0.2
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 +47 -74
- package/dist/esm/cache/cache-json-by-key.mjs +189 -0
- package/dist/esm/cache/cache-json-by-key.mjs.map +1 -0
- package/dist/esm/check/check.mjs.map +1 -1
- package/dist/esm/check/finding-presentation.mjs +40 -0
- package/dist/esm/check/finding-presentation.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-settlement/fact-validation.mjs +17 -23
- package/dist/esm/check-settlement/fact-validation.mjs.map +1 -1
- package/dist/esm/check-settlement/outcome-normalization.mjs +9 -19
- package/dist/esm/check-settlement/outcome-normalization.mjs.map +1 -1
- package/dist/esm/check-settlement/reason-shape.mjs +12 -0
- package/dist/esm/check-settlement/reason-shape.mjs.map +1 -0
- package/dist/esm/check-settlement/record-store.mjs +14 -17
- package/dist/esm/check-settlement/record-store.mjs.map +1 -1
- package/dist/esm/check-settlement/session.mjs +8 -2
- package/dist/esm/check-settlement/session.mjs.map +1 -1
- package/dist/esm/data-boundary/closed-values.mjs +16 -0
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -1
- package/dist/esm/data-boundary/value-shapes.mjs +9 -0
- package/dist/esm/data-boundary/value-shapes.mjs.map +1 -1
- package/dist/esm/index.mjs +9 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs +56 -0
- package/dist/esm/learned-critical-path/duration-model/bounded-history.mjs.map +1 -0
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs +122 -0
- package/dist/esm/learned-critical-path/duration-model/prediction.mjs.map +1 -0
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs +41 -0
- package/dist/esm/learned-critical-path/duration-model/preparation.mjs.map +1 -0
- package/dist/esm/learned-critical-path/duration-model/recording.mjs +109 -0
- package/dist/esm/learned-critical-path/duration-model/recording.mjs.map +1 -0
- package/dist/esm/learned-critical-path/duration-model/storage.mjs +187 -0
- package/dist/esm/learned-critical-path/duration-model/storage.mjs.map +1 -0
- package/dist/esm/learned-critical-path/selection-layers.mjs +28 -0
- package/dist/esm/learned-critical-path/selection-layers.mjs.map +1 -0
- package/dist/esm/learned-critical-path/static-decision.mjs +55 -0
- package/dist/esm/learned-critical-path/static-decision.mjs.map +1 -0
- package/dist/esm/learned-critical-path/strategy.mjs +179 -0
- package/dist/esm/learned-critical-path/strategy.mjs.map +1 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs +1 -15
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -1
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs +40 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-authoring.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs +48 -0
- package/dist/esm/package-checks/code-quality-findings/finding-waiver-evidence.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs +20 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs +15 -7
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +44 -18
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs +59 -0
- package/dist/esm/package-checks/duplicate-detection/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/finding-waiver-identity.mjs +55 -0
- package/dist/esm/package-checks/duplicate-detection/finding-waiver-identity.mjs.map +1 -0
- 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/jscpd/command-resolution.mjs +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs +15 -5
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs +5 -4
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs +22 -47
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs +20 -25
- package/dist/esm/package-checks/duplicate-detection/options-validation.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 +27 -6
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/execution.mjs +10 -17
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs +22 -0
- package/dist/esm/package-checks/file-metrics/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs +11 -43
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/options-validation.mjs +15 -25
- package/dist/esm/package-checks/file-metrics/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/records.mjs +2 -9
- 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/parser.mjs +4 -4
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs.map +1 -1
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +2 -2
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analysis.mjs +56 -15
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-context.mjs +550 -0
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-context.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs +332 -0
- package/dist/esm/package-checks/function-metrics/analyzer/analysis-model.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/contracts.mjs +7 -0
- package/dist/esm/package-checks/function-metrics/analyzer/contracts.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs +24 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardnd.mjs +113 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/lizardnd.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs +180 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/protocol.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/registry.mjs +121 -0
- package/dist/esm/package-checks/function-metrics/analyzer/extensions/registry.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs +217 -0
- package/dist/esm/package-checks/function-metrics/analyzer/pipeline.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/port-facade.mjs +96 -0
- package/dist/esm/package-checks/function-metrics/analyzer/port-facade.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/reader-registry.mjs +76 -0
- package/dist/esm/package-checks/function-metrics/analyzer/reader-registry.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/csharp.mjs +88 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/csharp.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs +466 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/erlang.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs +289 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/fortran.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/gdscript.mjs +38 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/gdscript.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/go.mjs +44 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/go.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/java-body-states.mjs +113 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/java-body-states.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/java.mjs +247 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/java.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/javascript.mjs +16 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/javascript.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/kotlin.mjs +103 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/kotlin.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/lua.mjs +55 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/lua.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs +100 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/objc.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/perl.mjs +367 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/perl.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs +260 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php-states.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php.mjs +53 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/php.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs +306 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/plsql.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs +402 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/python.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs +214 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/r.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ruby.mjs +75 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ruby.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/rust.mjs +32 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/rust.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/scala.mjs +47 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/scala.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/solidity.mjs +22 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/solidity.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/st.mjs +142 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/st.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/swift.mjs +94 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/swift.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/tsx.mjs +149 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/tsx.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs +79 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/ttcn.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs +606 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/typescript.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/vue.mjs +31 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/vue.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs +23 -0
- package/dist/esm/package-checks/function-metrics/analyzer/readers/zig.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/clike.mjs +492 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/clike.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs +542 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/code-reader.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/golike.mjs +141 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/golike.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs +62 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/js-style-regex.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/rubylike.mjs +154 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/rubylike.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/script-language.mjs +36 -0
- package/dist/esm/package-checks/function-metrics/analyzer/shared/script-language.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer-adapter.mjs +56 -0
- package/dist/esm/package-checks/function-metrics/analyzer-adapter.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer-worker-contract.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/analyzer-worker-contract.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs +108 -0
- package/dist/esm/package-checks/function-metrics/analyzer-worker-port.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analyzer-worker.mjs +24 -0
- package/dist/esm/package-checks/function-metrics/analyzer-worker.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs +2 -2
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/execution.mjs +51 -33
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs +75 -0
- package/dist/esm/package-checks/function-metrics/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/finding-waiver-identity.mjs +28 -0
- package/dist/esm/package-checks/function-metrics/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/measurement.mjs +161 -26
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs +30 -63
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/options-validation.mjs +27 -32
- package/dist/esm/package-checks/function-metrics/options-validation.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 +31 -1
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -1
- package/dist/esm/package-checks/function-metrics/target-files.mjs +6 -67
- package/dist/esm/package-checks/function-metrics/target-files.mjs.map +1 -1
- package/dist/esm/package-checks/{file-metrics/scc → host-environment}/csv.mjs +1 -0
- package/dist/esm/package-checks/host-environment/csv.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/git.mjs +1 -1
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -1
- package/dist/esm/package-checks/host-environment/process.mjs +5 -0
- package/dist/esm/package-checks/host-environment/process.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs +15 -17
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/final-data.mjs.map +1 -1
- package/dist/esm/package-checks/json-validation/options-validation.mjs +4 -10
- package/dist/esm/package-checks/json-validation/options-validation.mjs.map +1 -1
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +9 -3
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +27 -24
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs +82 -53
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs +36 -0
- package/dist/esm/package-checks/markdown-link-validation/finding-messages.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs +2 -2
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +26 -4
- 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 +24 -11
- 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 +185 -0
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache-payload.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache.mjs +131 -0
- package/dist/esm/package-checks/markdown-link-validation/parse-facts-cache.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs +58 -57
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs.map +1 -1
- package/dist/esm/package-checks/markdown-link-validation/source-reader.mjs +54 -0
- package/dist/esm/package-checks/markdown-link-validation/source-reader.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/unavailable-reasons.mjs +16 -0
- package/dist/esm/package-checks/markdown-link-validation/unavailable-reasons.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +1 -1
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/configuration.mjs +2 -10
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +1 -1
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +1 -1
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -1
- package/dist/esm/package-checks/project-files/public-collection.mjs +56 -0
- package/dist/esm/package-checks/project-files/public-collection.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +1 -1
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -1
- package/dist/esm/package-checks/secret-detection/classification.mjs +15 -0
- package/dist/esm/package-checks/secret-detection/classification.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/default-check.mjs +39 -0
- package/dist/esm/package-checks/secret-detection/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/execution.mjs +172 -0
- package/dist/esm/package-checks/secret-detection/execution.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/final-data.mjs +33 -0
- package/dist/esm/package-checks/secret-detection/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/finding-waiver-identity.mjs +30 -0
- package/dist/esm/package-checks/secret-detection/finding-waiver-identity.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs +153 -0
- package/dist/esm/package-checks/secret-detection/input-preparation.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/options-resolution.mjs +40 -0
- package/dist/esm/package-checks/secret-detection/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/options-validation.mjs +22 -0
- package/dist/esm/package-checks/secret-detection/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/options.mjs +2 -0
- package/dist/esm/package-checks/secret-detection/options.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/records.mjs +31 -0
- package/dist/esm/package-checks/secret-detection/records.mjs.map +1 -0
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs +85 -0
- package/dist/esm/package-checks/secret-detection/secretlint/adapter.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +12 -172
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs +171 -0
- package/dist/esm/project-definition/check-tree/check-fields-authoring.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/collection-authoring.mjs +16 -0
- package/dist/esm/project-definition/check-tree/collection-authoring.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +9 -1
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/resolution.mjs +45 -13
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -1
- package/dist/esm/project-definition/check-tree/scheduling-authoring.mjs +73 -0
- package/dist/esm/project-definition/check-tree/scheduling-authoring.mjs.map +1 -0
- package/dist/esm/project-definition/declarative-snapshot.mjs +73 -0
- package/dist/esm/project-definition/declarative-snapshot.mjs.map +1 -0
- package/dist/esm/project-definition/output-defaults.mjs +18 -1
- package/dist/esm/project-definition/output-defaults.mjs.map +1 -1
- package/dist/esm/project-definition/output-validation.mjs +15 -15
- package/dist/esm/project-definition/output-validation.mjs.map +1 -1
- package/dist/esm/project-definition/progress-rendering-output.mjs +52 -0
- package/dist/esm/project-definition/progress-rendering-output.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +100 -16
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -1
- package/dist/esm/project-definition/project-definition.mjs +52 -47
- package/dist/esm/project-definition/project-definition.mjs.map +1 -1
- package/dist/esm/project-definition/resource-unit-mapping.mjs +21 -0
- package/dist/esm/project-definition/resource-unit-mapping.mjs.map +1 -0
- package/dist/esm/project-definition/scheduler-policy.mjs +2 -0
- package/dist/esm/project-definition/scheduler-policy.mjs.map +1 -0
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs +54 -0
- package/dist/esm/project-run/admission-strategy-provider/custom-strategy-preparation.mjs.map +1 -0
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs +2 -0
- package/dist/esm/project-run/admission-strategy-provider/prepared-admission-strategy.mjs.map +1 -0
- package/dist/esm/project-run/admission-strategy-provider/provider.mjs +23 -0
- package/dist/esm/project-run/admission-strategy-provider/provider.mjs.map +1 -0
- package/dist/esm/project-run/aggregation.mjs +7 -5
- package/dist/esm/project-run/aggregation.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/callback.mjs +35 -8
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/console-capture.mjs +220 -0
- package/dist/esm/project-run/check-execution/console-capture.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs +21 -3
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +54 -13
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +13 -9
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/flag-controls.mjs +87 -0
- package/dist/esm/project-run/check-execution/flag-controls.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/lifecycle.mjs +2 -0
- package/dist/esm/project-run/check-execution/lifecycle.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/messages.mjs +5 -0
- package/dist/esm/project-run/check-execution/messages.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/plan.mjs +9 -5
- package/dist/esm/project-run/check-execution/plan.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/preflight.mjs +18 -32
- package/dist/esm/project-run/check-execution/preflight.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +100 -58
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -1
- package/dist/esm/project-run/check-execution/resolved-execution-result.mjs +2 -0
- package/dist/esm/project-run/check-execution/resolved-execution-result.mjs.map +1 -0
- package/dist/esm/project-run/{completion.mjs → completion/completion.mjs} +16 -38
- package/dist/esm/project-run/completion/completion.mjs.map +1 -0
- package/dist/esm/project-run/{machine-publication.mjs → completion/machine-publication.mjs} +1 -1
- package/dist/esm/project-run/completion/machine-publication.mjs.map +1 -0
- package/dist/esm/project-run/completion/result-resolver.mjs +36 -0
- package/dist/esm/project-run/completion/result-resolver.mjs.map +1 -0
- package/dist/esm/project-run/controls/contract.mjs.map +1 -1
- package/dist/esm/project-run/controls/outputs-override-validation.mjs +67 -47
- package/dist/esm/project-run/controls/outputs-override-validation.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation-result.mjs.map +1 -1
- package/dist/esm/project-run/controls/validation.mjs +75 -11
- package/dist/esm/project-run/controls/validation.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/logger.mjs +100 -161
- package/dist/esm/project-run/diagnostic-logging/logger.mjs.map +1 -1
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs +159 -0
- package/dist/esm/project-run/diagnostic-logging/observation-rendering.mjs.map +1 -0
- package/dist/esm/project-run/invocation/candidate.mjs +61 -0
- package/dist/esm/project-run/invocation/candidate.mjs.map +1 -0
- package/dist/esm/project-run/invocation/creation.mjs +79 -0
- package/dist/esm/project-run/invocation/creation.mjs.map +1 -0
- package/dist/esm/project-run/invocation/paths.mjs +77 -0
- package/dist/esm/project-run/invocation/paths.mjs.map +1 -0
- package/dist/esm/project-run/invocation/progress.mjs +30 -0
- package/dist/esm/project-run/invocation/progress.mjs.map +1 -0
- package/dist/esm/project-run/{invocation.mjs → invocation/run.mjs} +78 -92
- package/dist/esm/project-run/invocation/run.mjs.map +1 -0
- package/dist/esm/project-run/invocation/scheduler.mjs +57 -0
- package/dist/esm/project-run/invocation/scheduler.mjs.map +1 -0
- package/dist/esm/project-run/{output-configuration.mjs → outputs/configuration.mjs} +3 -2
- package/dist/esm/project-run/outputs/configuration.mjs.map +1 -0
- package/dist/esm/project-run/outputs/status.mjs +105 -0
- package/dist/esm/project-run/outputs/status.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs +112 -18
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +108 -19
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +30 -4
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -1
- package/dist/esm/project-run/progress-rendering/renderer.mjs +5 -2
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -1
- package/dist/esm/project-run/project-context.mjs +1 -1
- package/dist/esm/project-run/project-context.mjs.map +1 -1
- package/dist/esm/project-run/result.mjs +2 -0
- package/dist/esm/project-run/result.mjs.map +1 -1
- package/dist/esm/project-run/run.mjs +1 -1
- package/dist/esm/project-run/run.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs +166 -0
- package/dist/esm/project-run/task-scheduler/admission-core/compiled-graph.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/core.mjs +163 -0
- package/dist/esm/project-run/task-scheduler/admission-core/core.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/input.mjs +119 -0
- package/dist/esm/project-run/task-scheduler/admission-core/input.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/projection.mjs +124 -0
- package/dist/esm/project-run/task-scheduler/admission-core/projection.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-index.mjs +99 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-index.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs +198 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-query.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs +151 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-seed.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs +121 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection-transition.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection.mjs +65 -0
- package/dist/esm/project-run/task-scheduler/admission-core/selection.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-scope-layers.mjs +25 -0
- package/dist/esm/project-run/task-scheduler/admission-scope-layers.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/admission-selection-policy.mjs +55 -0
- package/dist/esm/project-run/task-scheduler/admission-selection-policy.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs +46 -0
- package/dist/esm/project-run/task-scheduler/critical-path-ranking.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/custom-admission-policy.mjs +110 -0
- package/dist/esm/project-run/task-scheduler/custom-admission-policy.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs +34 -5
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/forced-block-effect-replay.mjs +46 -0
- package/dist/esm/project-run/task-scheduler/forced-block-effect-replay.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs +54 -26
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/graph.mjs +79 -3
- package/dist/esm/project-run/task-scheduler/graph.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs +207 -0
- package/dist/esm/project-run/task-scheduler/measurement/diagnostics.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/measurement/integrals.mjs +116 -0
- package/dist/esm/project-run/task-scheduler/measurement/integrals.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/measurement/policy.mjs +67 -0
- package/dist/esm/project-run/task-scheduler/measurement/policy.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/measurement/summary.mjs +123 -0
- package/dist/esm/project-run/task-scheduler/measurement/summary.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs +158 -0
- package/dist/esm/project-run/task-scheduler/measurement/timing.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs +90 -62
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs +20 -6
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs +5 -105
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs +0 -9
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs +48 -28
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs.map +1 -1
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs +89 -0
- package/dist/esm/project-run/task-scheduler/scheduler-observation.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-task-lifecycle.mjs +94 -0
- package/dist/esm/project-run/task-scheduler/scheduler-task-lifecycle.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs +66 -0
- package/dist/esm/project-run/task-scheduler/scheduler-terminal-measurement.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +171 -114
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -1
- package/docs/api-mechanics.md +64 -137
- package/docs/changelog.md +157 -0
- package/docs/checks/duplicate-detection.md +111 -59
- package/docs/checks/file-metrics.md +46 -43
- package/docs/checks/function-metrics.md +100 -163
- package/docs/checks/json-schema-validation.md +43 -36
- package/docs/checks/json-validation.md +38 -25
- package/docs/checks/maintenance-reminders.md +41 -29
- package/docs/checks/markdown-link-validation.md +82 -54
- package/docs/checks/secret-detection.md +129 -0
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +5 -5
- package/docs/guides/cache-results.md +63 -0
- package/docs/guides/callbacks.md +34 -0
- package/docs/guides/check-dependencies.md +121 -0
- package/docs/guides/collecting-project-files.md +59 -0
- package/docs/guides/extending-check-lifecycle.md +112 -0
- package/docs/guides/finding-waivers.md +45 -0
- package/docs/guides/learned-scheduling.md +83 -0
- package/docs/guides/presenting-findings.md +54 -0
- package/docs/guides/run-outputs.md +145 -0
- package/docs/guides/scheduling.md +208 -0
- package/docs/guides/simulating-admission.md +55 -0
- package/docs/output.md +11 -20
- package/licenses/Lizard-1.24.0-MIT.txt +30 -0
- package/{third-party-licenses/momoa-3.3.12-LICENSE → licenses/Lizard-1.24.0-lizard.py-Apache-2.0.txt} +1 -0
- package/licenses/Pygments-2.18.0-BSD-2-Clause.txt +25 -0
- package/licenses/analyzer-translations-NOTICE.md +24 -0
- package/licenses/lizard-1.24.0-provenance.json +957 -0
- package/package.json +18 -6
- package/src/cache/cache-json-by-key.ts +304 -0
- package/src/check/check.ts +67 -17
- package/src/check/finding-presentation.ts +67 -0
- package/src/check/inherited-collection.ts +1 -1
- package/src/check-settlement/fact-validation.ts +29 -39
- package/src/check-settlement/outcome-normalization.ts +17 -35
- package/src/check-settlement/reason-shape.ts +20 -0
- package/src/check-settlement/record-store.ts +18 -15
- package/src/check-settlement/session.ts +12 -3
- package/src/data-boundary/closed-values.ts +29 -0
- package/src/data-boundary/value-shapes.ts +12 -0
- package/src/index.ts +70 -2
- package/src/learned-critical-path/duration-model/bounded-history.ts +108 -0
- package/src/learned-critical-path/duration-model/prediction.ts +181 -0
- package/src/learned-critical-path/duration-model/preparation.ts +77 -0
- package/src/learned-critical-path/duration-model/recording.ts +208 -0
- package/src/learned-critical-path/duration-model/storage.ts +252 -0
- package/src/learned-critical-path/selection-layers.ts +72 -0
- package/src/learned-critical-path/static-decision.ts +105 -0
- package/src/learned-critical-path/strategy.ts +299 -0
- package/src/machine-output/v4/atomic-publication.ts +1 -16
- package/src/package-checks/code-quality-findings/finding-waiver-authoring.ts +46 -0
- package/src/package-checks/code-quality-findings/finding-waiver-evidence.ts +95 -0
- package/src/package-checks/code-quality-findings/policy.ts +23 -0
- package/src/package-checks/duplicate-detection/area-policy.ts +24 -13
- package/src/package-checks/duplicate-detection/cache/identity.ts +1 -1
- package/src/package-checks/duplicate-detection/default-check.ts +1 -1
- package/src/package-checks/duplicate-detection/execution.ts +82 -22
- package/src/package-checks/duplicate-detection/finding-messages.ts +75 -0
- package/src/package-checks/duplicate-detection/finding-waiver-identity.ts +68 -0
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +1 -1
- package/src/package-checks/duplicate-detection/jscpd/command-resolution.ts +1 -1
- package/src/package-checks/duplicate-detection/jscpd/json-report.ts +24 -5
- package/src/package-checks/duplicate-detection/jscpd/scanner.ts +6 -7
- package/src/package-checks/duplicate-detection/options-resolution.ts +32 -57
- package/src/package-checks/duplicate-detection/options-validation.ts +23 -31
- package/src/package-checks/duplicate-detection/options.ts +21 -1
- package/src/package-checks/duplicate-detection/records.ts +65 -12
- package/src/package-checks/file-metrics/execution.ts +16 -17
- package/src/package-checks/file-metrics/finding-messages.ts +29 -0
- package/src/package-checks/file-metrics/options-resolution.ts +19 -52
- package/src/package-checks/file-metrics/options-validation.ts +23 -32
- package/src/package-checks/file-metrics/records.ts +11 -23
- package/src/package-checks/file-metrics/scc/availability.ts +1 -1
- package/src/package-checks/file-metrics/scc/parser.ts +4 -4
- package/src/package-checks/file-metrics/scc/scanner.ts +2 -2
- package/src/package-checks/function-metrics/analysis.ts +76 -21
- package/src/package-checks/function-metrics/analyzer/analysis-context.ts +749 -0
- package/src/package-checks/function-metrics/analyzer/analysis-model.ts +421 -0
- package/src/package-checks/function-metrics/analyzer/contracts.ts +54 -0
- package/src/package-checks/function-metrics/analyzer/extension-output.ts +261 -0
- package/src/package-checks/function-metrics/analyzer/extensions/extension-base.ts +33 -0
- package/src/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.ts +27 -0
- package/src/package-checks/function-metrics/analyzer/extensions/lizardnd.ts +144 -0
- package/src/package-checks/function-metrics/analyzer/extensions/protocol.ts +345 -0
- package/src/package-checks/function-metrics/analyzer/extensions/registry.ts +157 -0
- package/src/package-checks/function-metrics/analyzer/pipeline.ts +311 -0
- package/src/package-checks/function-metrics/analyzer/port-facade.ts +142 -0
- package/src/package-checks/function-metrics/analyzer/reader-registry.ts +84 -0
- package/src/package-checks/function-metrics/analyzer/readers/csharp.ts +110 -0
- package/src/package-checks/function-metrics/analyzer/readers/erlang.ts +501 -0
- package/src/package-checks/function-metrics/analyzer/readers/fortran.ts +294 -0
- package/src/package-checks/function-metrics/analyzer/readers/gdscript.ts +42 -0
- package/src/package-checks/function-metrics/analyzer/readers/go.ts +53 -0
- package/src/package-checks/function-metrics/analyzer/readers/java-body-states.ts +141 -0
- package/src/package-checks/function-metrics/analyzer/readers/java.ts +270 -0
- package/src/package-checks/function-metrics/analyzer/readers/javascript.ts +19 -0
- package/src/package-checks/function-metrics/analyzer/readers/kotlin.ts +120 -0
- package/src/package-checks/function-metrics/analyzer/readers/lua.ts +68 -0
- package/src/package-checks/function-metrics/analyzer/readers/objc.ts +107 -0
- package/src/package-checks/function-metrics/analyzer/readers/perl.ts +340 -0
- package/src/package-checks/function-metrics/analyzer/readers/php-states.ts +246 -0
- package/src/package-checks/function-metrics/analyzer/readers/php.ts +63 -0
- package/src/package-checks/function-metrics/analyzer/readers/plsql.ts +306 -0
- package/src/package-checks/function-metrics/analyzer/readers/python.ts +431 -0
- package/src/package-checks/function-metrics/analyzer/readers/r.ts +234 -0
- package/src/package-checks/function-metrics/analyzer/readers/ruby.ts +88 -0
- package/src/package-checks/function-metrics/analyzer/readers/rust.ts +47 -0
- package/src/package-checks/function-metrics/analyzer/readers/scala.ts +60 -0
- package/src/package-checks/function-metrics/analyzer/readers/solidity.ts +32 -0
- package/src/package-checks/function-metrics/analyzer/readers/st.ts +161 -0
- package/src/package-checks/function-metrics/analyzer/readers/swift.ts +116 -0
- package/src/package-checks/function-metrics/analyzer/readers/tsx.ts +165 -0
- package/src/package-checks/function-metrics/analyzer/readers/ttcn.ts +90 -0
- package/src/package-checks/function-metrics/analyzer/readers/typescript.ts +593 -0
- package/src/package-checks/function-metrics/analyzer/readers/vue.ts +43 -0
- package/src/package-checks/function-metrics/analyzer/readers/zig.ts +35 -0
- package/src/package-checks/function-metrics/analyzer/shared/clike.ts +541 -0
- package/src/package-checks/function-metrics/analyzer/shared/code-reader.ts +682 -0
- package/src/package-checks/function-metrics/analyzer/shared/golike.ts +143 -0
- package/src/package-checks/function-metrics/analyzer/shared/js-style-regex.ts +75 -0
- package/src/package-checks/function-metrics/analyzer/shared/rubylike.ts +161 -0
- package/src/package-checks/function-metrics/analyzer/shared/script-language.ts +50 -0
- package/src/package-checks/function-metrics/analyzer-adapter.ts +84 -0
- package/src/package-checks/function-metrics/analyzer-worker-contract.ts +10 -0
- package/src/package-checks/function-metrics/analyzer-worker-port.ts +150 -0
- package/src/package-checks/function-metrics/analyzer-worker.ts +31 -0
- package/src/package-checks/function-metrics/constructor.ts +2 -2
- package/src/package-checks/function-metrics/execution.ts +94 -39
- package/src/package-checks/function-metrics/finding-messages.ts +95 -0
- package/src/package-checks/function-metrics/finding-waiver-identity.ts +36 -0
- package/src/package-checks/function-metrics/measurement-model.ts +15 -1
- package/src/package-checks/function-metrics/measurement.ts +221 -36
- package/src/package-checks/function-metrics/options-resolution.ts +39 -75
- package/src/package-checks/function-metrics/options-validation.ts +30 -39
- package/src/package-checks/function-metrics/options.ts +27 -11
- package/src/package-checks/function-metrics/records.ts +73 -7
- package/src/package-checks/function-metrics/target-files.ts +10 -70
- package/src/package-checks/{file-metrics/scc → host-environment}/csv.ts +1 -2
- package/src/package-checks/host-environment/git.ts +2 -2
- package/src/package-checks/host-environment/process.ts +10 -0
- package/src/package-checks/json-schema-validation/final-data.ts +8 -0
- package/src/package-checks/json-schema-validation/options-validation.ts +16 -23
- package/src/package-checks/json-schema-validation/options.ts +23 -0
- package/src/package-checks/json-validation/final-data.ts +5 -0
- package/src/package-checks/json-validation/options-validation.ts +4 -18
- package/src/package-checks/maintenance-reminders/final-data.ts +18 -0
- package/src/package-checks/markdown-link-validation/default-check.ts +9 -3
- package/src/package-checks/markdown-link-validation/execution.ts +51 -57
- package/src/package-checks/markdown-link-validation/filesystem-probes.ts +108 -51
- package/src/package-checks/markdown-link-validation/final-data.ts +5 -0
- package/src/package-checks/markdown-link-validation/finding-messages.ts +48 -0
- package/src/package-checks/markdown-link-validation/local-resolution.ts +17 -9
- package/src/package-checks/markdown-link-validation/local-resolver.ts +5 -2
- package/src/package-checks/markdown-link-validation/options-resolution.ts +31 -3
- package/src/package-checks/markdown-link-validation/options-validation.ts +27 -19
- package/src/package-checks/markdown-link-validation/options.ts +15 -0
- package/src/package-checks/markdown-link-validation/parse-facts-cache-payload.ts +246 -0
- package/src/package-checks/markdown-link-validation/parse-facts-cache.ts +154 -0
- package/src/package-checks/markdown-link-validation/resolver-engine.ts +75 -65
- package/src/package-checks/markdown-link-validation/source-reader.ts +86 -0
- package/src/package-checks/markdown-link-validation/unavailable-reasons.ts +42 -0
- package/src/package-checks/project-files/collection.ts +1 -1
- package/src/package-checks/project-files/configuration.ts +3 -14
- package/src/package-checks/project-files/gitlink-revision.ts +1 -1
- package/src/package-checks/project-files/gitlink-worktree.ts +1 -1
- package/src/package-checks/project-files/public-collection.ts +92 -0
- package/src/package-checks/project-files/revision-worktree-files.ts +1 -1
- package/src/package-checks/secret-detection/classification.ts +30 -0
- package/src/package-checks/secret-detection/default-check.ts +50 -0
- package/src/package-checks/secret-detection/execution.ts +247 -0
- package/src/package-checks/secret-detection/final-data.ts +57 -0
- package/src/package-checks/secret-detection/finding-waiver-identity.ts +37 -0
- package/src/package-checks/secret-detection/input-preparation.ts +233 -0
- package/src/package-checks/secret-detection/options-resolution.ts +65 -0
- package/src/package-checks/secret-detection/options-validation.ts +27 -0
- package/src/package-checks/secret-detection/options.ts +36 -0
- package/src/package-checks/secret-detection/records.ts +77 -0
- package/src/package-checks/secret-detection/secretlint/adapter.ts +123 -0
- package/src/project-definition/check-tree/authoring.ts +29 -230
- package/src/project-definition/check-tree/check-fields-authoring.ts +227 -0
- package/src/project-definition/check-tree/collection-authoring.ts +13 -0
- package/src/project-definition/check-tree/materialization.ts +9 -1
- package/src/project-definition/check-tree/resolution.ts +80 -22
- package/src/project-definition/check-tree/scheduling-authoring.ts +114 -0
- package/src/project-definition/declarative-snapshot.ts +87 -0
- package/src/project-definition/output-defaults.ts +32 -1
- package/src/project-definition/output-validation.ts +15 -15
- package/src/project-definition/progress-rendering-output.ts +121 -0
- package/src/project-definition/project-definition-validation.ts +117 -18
- package/src/project-definition/project-definition.ts +198 -61
- package/src/project-definition/resource-unit-mapping.ts +25 -0
- package/src/project-definition/scheduler-policy.ts +553 -0
- package/src/project-run/admission-strategy-provider/custom-strategy-preparation.ts +80 -0
- package/src/project-run/admission-strategy-provider/prepared-admission-strategy.ts +27 -0
- package/src/project-run/admission-strategy-provider/provider.ts +45 -0
- package/src/project-run/aggregation.ts +10 -5
- package/src/project-run/check-execution/callback.ts +50 -8
- package/src/project-run/check-execution/console-capture.ts +262 -0
- package/src/project-run/check-execution/dependencies.ts +43 -6
- package/src/project-run/check-execution/execution-finalization.ts +99 -25
- package/src/project-run/check-execution/execution-settlement.ts +19 -11
- package/src/project-run/check-execution/flag-controls.ts +132 -0
- package/src/project-run/check-execution/lifecycle.ts +21 -0
- package/src/project-run/check-execution/messages.ts +8 -0
- package/src/project-run/check-execution/plan.ts +12 -8
- package/src/project-run/check-execution/preflight.ts +23 -43
- package/src/project-run/check-execution/resolved-checks.ts +165 -126
- package/src/project-run/check-execution/resolved-execution-result.ts +22 -0
- package/src/project-run/{completion.ts → completion/completion.ts} +17 -57
- package/src/project-run/{machine-publication.ts → completion/machine-publication.ts} +4 -4
- package/src/project-run/completion/result-resolver.ts +60 -0
- package/src/project-run/controls/contract.ts +25 -2
- package/src/project-run/controls/outputs-override-validation.ts +83 -60
- package/src/project-run/controls/validation-result.ts +17 -6
- package/src/project-run/controls/validation.ts +107 -12
- package/src/project-run/diagnostic-logging/logger.ts +132 -207
- package/src/project-run/diagnostic-logging/observation-rendering.ts +203 -0
- package/src/project-run/invocation/candidate.ts +86 -0
- package/src/project-run/invocation/creation.ts +116 -0
- package/src/project-run/invocation/paths.ts +154 -0
- package/src/project-run/invocation/progress.ts +38 -0
- package/src/project-run/{invocation.ts → invocation/run.ts} +125 -120
- package/src/project-run/invocation/scheduler.ts +75 -0
- package/src/project-run/{output-configuration.ts → outputs/configuration.ts} +6 -5
- package/src/project-run/outputs/status.ts +161 -0
- package/src/project-run/progress-rendering/presentation.ts +118 -26
- package/src/project-run/progress-rendering/renderer-formatting.ts +166 -19
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +38 -3
- package/src/project-run/progress-rendering/renderer.ts +13 -2
- package/src/project-run/project-context.ts +3 -2
- package/src/project-run/result.ts +49 -3
- package/src/project-run/run.ts +7 -6
- package/src/project-run/task-scheduler/admission-core/compiled-graph.ts +316 -0
- package/src/project-run/task-scheduler/admission-core/core.ts +278 -0
- package/src/project-run/task-scheduler/admission-core/input.ts +138 -0
- package/src/project-run/task-scheduler/admission-core/projection.ts +164 -0
- package/src/project-run/task-scheduler/admission-core/selection-index.ts +165 -0
- package/src/project-run/task-scheduler/admission-core/selection-query.ts +295 -0
- package/src/project-run/task-scheduler/admission-core/selection-seed.ts +252 -0
- package/src/project-run/task-scheduler/admission-core/selection-transition.ts +236 -0
- package/src/project-run/task-scheduler/admission-core/selection.ts +140 -0
- package/src/project-run/task-scheduler/admission-core/trace.ts +177 -0
- package/src/project-run/task-scheduler/admission-scope-layers.ts +44 -0
- package/src/project-run/task-scheduler/admission-selection-policy.ts +116 -0
- package/src/project-run/task-scheduler/critical-path-ranking.ts +76 -0
- package/src/project-run/task-scheduler/custom-admission-policy.ts +128 -0
- package/src/project-run/task-scheduler/execution-state.ts +97 -6
- package/src/project-run/task-scheduler/forced-block-effect-replay.ts +68 -0
- package/src/project-run/task-scheduler/graph-validation.ts +77 -31
- package/src/project-run/task-scheduler/graph.ts +111 -3
- package/src/project-run/task-scheduler/measurement/diagnostics.ts +261 -0
- package/src/project-run/task-scheduler/measurement/integrals.ts +177 -0
- package/src/project-run/task-scheduler/measurement/policy.ts +105 -0
- package/src/project-run/task-scheduler/measurement/summary.ts +175 -0
- package/src/project-run/task-scheduler/measurement/timing.ts +190 -0
- package/src/project-run/task-scheduler/scheduler-admission-decision.ts +143 -134
- package/src/project-run/task-scheduler/scheduler-blocker-summary.ts +34 -9
- package/src/project-run/task-scheduler/scheduler-decision-inspection.ts +28 -170
- package/src/project-run/task-scheduler/scheduler-decision-model.ts +36 -40
- package/src/project-run/task-scheduler/scheduler-decision.ts +68 -36
- package/src/project-run/task-scheduler/scheduler-observation.ts +124 -0
- package/src/project-run/task-scheduler/scheduler-task-lifecycle.ts +150 -0
- package/src/project-run/task-scheduler/scheduler-terminal-measurement.ts +95 -0
- package/src/project-run/task-scheduler/scheduler.ts +216 -171
- package/types/cache/cache-json-by-key.d.ts +53 -0
- package/types/check/check.d.ts +62 -17
- package/types/check/finding-presentation.d.ts +25 -0
- package/types/check/inherited-collection.d.ts +1 -1
- package/types/check-settlement/reason-shape.d.ts +5 -0
- package/types/check-settlement/record-store.d.ts +2 -2
- package/types/check-settlement/session.d.ts +3 -1
- package/types/data-boundary/closed-values.d.ts +8 -0
- package/types/data-boundary/value-shapes.d.ts +3 -0
- package/types/index.d.ts +22 -7
- package/types/learned-critical-path/duration-model/bounded-history.d.ts +34 -0
- package/types/learned-critical-path/duration-model/prediction.d.ts +32 -0
- package/types/learned-critical-path/duration-model/preparation.d.ts +28 -0
- package/types/learned-critical-path/duration-model/recording.d.ts +28 -0
- package/types/learned-critical-path/duration-model/storage.d.ts +12 -0
- package/types/learned-critical-path/selection-layers.d.ts +14 -0
- package/types/learned-critical-path/static-decision.d.ts +3 -0
- package/types/learned-critical-path/strategy.d.ts +35 -0
- package/types/package-checks/code-quality-findings/finding-waiver-authoring.d.ts +7 -0
- package/types/package-checks/code-quality-findings/finding-waiver-evidence.d.ts +34 -0
- package/types/package-checks/code-quality-findings/policy.d.ts +4 -0
- package/types/package-checks/duplicate-detection/area-policy.d.ts +1 -1
- package/types/package-checks/duplicate-detection/finding-messages.d.ts +7 -0
- package/types/package-checks/duplicate-detection/finding-waiver-identity.d.ts +3 -0
- package/types/package-checks/duplicate-detection/jscpd/command-resolution.d.ts +1 -1
- package/types/package-checks/duplicate-detection/options.d.ts +18 -1
- package/types/package-checks/duplicate-detection/records.d.ts +20 -3
- package/types/package-checks/file-metrics/finding-messages.d.ts +4 -0
- package/types/package-checks/file-metrics/records.d.ts +5 -10
- package/types/package-checks/file-metrics/scc/parser.d.ts +4 -4
- package/types/package-checks/function-metrics/analysis.d.ts +1 -1
- package/types/package-checks/function-metrics/analyzer/analysis-context.d.ts +174 -0
- package/types/package-checks/function-metrics/analyzer/analysis-model.d.ts +135 -0
- package/types/package-checks/function-metrics/analyzer/contracts.d.ts +48 -0
- package/types/package-checks/function-metrics/analyzer/extensions/lizardcomplextags.d.ts +13 -0
- package/types/package-checks/function-metrics/analyzer/extensions/lizardnd.d.ts +28 -0
- package/types/package-checks/function-metrics/analyzer/extensions/protocol.d.ts +99 -0
- package/types/package-checks/function-metrics/analyzer/extensions/registry.d.ts +34 -0
- package/types/package-checks/function-metrics/analyzer/pipeline.d.ts +67 -0
- package/types/package-checks/function-metrics/analyzer/port-facade.d.ts +38 -0
- package/types/package-checks/function-metrics/analyzer/reader-registry.d.ts +18 -0
- package/types/package-checks/function-metrics/analyzer/readers/csharp.d.ts +22 -0
- package/types/package-checks/function-metrics/analyzer/readers/erlang.d.ts +22 -0
- package/types/package-checks/function-metrics/analyzer/readers/fortran.d.ts +29 -0
- package/types/package-checks/function-metrics/analyzer/readers/gdscript.d.ts +18 -0
- package/types/package-checks/function-metrics/analyzer/readers/go.d.ts +18 -0
- package/types/package-checks/function-metrics/analyzer/readers/java-body-states.d.ts +18 -0
- package/types/package-checks/function-metrics/analyzer/readers/java.d.ts +44 -0
- package/types/package-checks/function-metrics/analyzer/readers/javascript.d.ts +14 -0
- package/types/package-checks/function-metrics/analyzer/readers/kotlin.d.ts +23 -0
- package/types/package-checks/function-metrics/analyzer/readers/lua.d.ts +16 -0
- package/types/package-checks/function-metrics/analyzer/readers/objc.d.ts +18 -0
- package/types/package-checks/function-metrics/analyzer/readers/perl.d.ts +28 -0
- package/types/package-checks/function-metrics/analyzer/readers/php-states.d.ts +41 -0
- package/types/package-checks/function-metrics/analyzer/readers/php.d.ts +22 -0
- package/types/package-checks/function-metrics/analyzer/readers/plsql.d.ts +24 -0
- package/types/package-checks/function-metrics/analyzer/readers/python.d.ts +50 -0
- package/types/package-checks/function-metrics/analyzer/readers/r.d.ts +22 -0
- package/types/package-checks/function-metrics/analyzer/readers/ruby.d.ts +16 -0
- package/types/package-checks/function-metrics/analyzer/readers/rust.d.ts +20 -0
- package/types/package-checks/function-metrics/analyzer/readers/scala.d.ts +20 -0
- package/types/package-checks/function-metrics/analyzer/readers/solidity.d.ts +19 -0
- package/types/package-checks/function-metrics/analyzer/readers/st.d.ts +37 -0
- package/types/package-checks/function-metrics/analyzer/readers/swift.d.ts +30 -0
- package/types/package-checks/function-metrics/analyzer/readers/tsx.d.ts +15 -0
- package/types/package-checks/function-metrics/analyzer/readers/ttcn.d.ts +22 -0
- package/types/package-checks/function-metrics/analyzer/readers/typescript.d.ts +35 -0
- package/types/package-checks/function-metrics/analyzer/readers/vue.d.ts +18 -0
- package/types/package-checks/function-metrics/analyzer/readers/zig.d.ts +19 -0
- package/types/package-checks/function-metrics/analyzer/shared/clike.d.ts +101 -0
- package/types/package-checks/function-metrics/analyzer/shared/code-reader.d.ts +176 -0
- package/types/package-checks/function-metrics/analyzer/shared/golike.d.ts +39 -0
- package/types/package-checks/function-metrics/analyzer/shared/js-style-regex.d.ts +16 -0
- package/types/package-checks/function-metrics/analyzer/shared/rubylike.d.ts +40 -0
- package/types/package-checks/function-metrics/analyzer/shared/script-language.d.ts +17 -0
- package/types/package-checks/function-metrics/analyzer-adapter.d.ts +26 -0
- package/types/package-checks/function-metrics/analyzer-worker-contract.d.ts +5 -0
- package/types/package-checks/function-metrics/analyzer-worker-port.d.ts +24 -0
- package/types/package-checks/function-metrics/analyzer-worker.d.ts +1 -0
- package/types/package-checks/function-metrics/constructor.d.ts +1 -1
- package/types/package-checks/function-metrics/execution.d.ts +5 -2
- package/types/package-checks/function-metrics/finding-messages.d.ts +9 -0
- package/types/package-checks/function-metrics/finding-waiver-identity.d.ts +2 -0
- package/types/package-checks/function-metrics/measurement-model.d.ts +13 -1
- package/types/package-checks/function-metrics/measurement.d.ts +22 -7
- package/types/package-checks/function-metrics/options.d.ts +23 -10
- package/types/package-checks/function-metrics/records.d.ts +24 -5
- package/types/package-checks/function-metrics/target-files.d.ts +4 -3
- package/types/package-checks/host-environment/csv.d.ts +2 -0
- package/types/package-checks/host-environment/git.d.ts +1 -1
- package/types/package-checks/host-environment/process.d.ts +5 -0
- package/types/package-checks/json-schema-validation/final-data.d.ts +8 -0
- package/types/package-checks/json-schema-validation/options.d.ts +31 -3
- package/types/package-checks/json-validation/final-data.d.ts +5 -0
- package/types/package-checks/maintenance-reminders/final-data.d.ts +18 -0
- package/types/package-checks/markdown-link-validation/default-check.d.ts +9 -3
- package/types/package-checks/markdown-link-validation/execution.d.ts +1 -3
- package/types/package-checks/markdown-link-validation/final-data.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/finding-messages.d.ts +4 -0
- package/types/package-checks/markdown-link-validation/local-resolution.d.ts +12 -6
- package/types/package-checks/markdown-link-validation/local-resolver.d.ts +2 -1
- package/types/package-checks/markdown-link-validation/options.d.ts +15 -0
- package/types/package-checks/markdown-link-validation/parse-facts-cache-payload.d.ts +24 -0
- package/types/package-checks/markdown-link-validation/parse-facts-cache.d.ts +13 -0
- package/types/package-checks/markdown-link-validation/resolver-engine.d.ts +6 -4
- package/types/package-checks/markdown-link-validation/source-reader.d.ts +11 -0
- package/types/package-checks/markdown-link-validation/unavailable-reasons.d.ts +4 -0
- package/types/package-checks/project-files/public-collection.d.ts +16 -0
- package/types/package-checks/secret-detection/classification.d.ts +12 -0
- package/types/package-checks/secret-detection/default-check.d.ts +11 -0
- package/types/package-checks/secret-detection/execution.d.ts +14 -0
- package/types/package-checks/secret-detection/final-data.d.ts +15 -0
- package/types/package-checks/secret-detection/finding-waiver-identity.d.ts +5 -0
- package/types/package-checks/secret-detection/input-preparation.d.ts +24 -0
- package/types/package-checks/secret-detection/options-resolution.d.ts +6 -0
- package/types/package-checks/secret-detection/options-validation.d.ts +3 -0
- package/types/package-checks/secret-detection/options.d.ts +32 -0
- package/types/package-checks/secret-detection/records.d.ts +35 -0
- package/types/package-checks/secret-detection/secretlint/adapter.d.ts +28 -0
- package/types/project-definition/check-tree/authoring.d.ts +11 -14
- package/types/project-definition/check-tree/check-fields-authoring.d.ts +25 -0
- package/types/project-definition/check-tree/collection-authoring.d.ts +2 -0
- package/types/project-definition/check-tree/resolution.d.ts +8 -3
- package/types/project-definition/check-tree/scheduling-authoring.d.ts +19 -0
- package/types/project-definition/declarative-snapshot.d.ts +7 -0
- package/types/project-definition/output-defaults.d.ts +7 -0
- package/types/project-definition/output-validation.d.ts +2 -1
- package/types/project-definition/progress-rendering-output.d.ts +41 -0
- package/types/project-definition/project-definition.d.ts +61 -16
- package/types/project-definition/resource-unit-mapping.d.ts +4 -0
- package/types/project-definition/scheduler-policy.d.ts +497 -0
- package/types/project-run/admission-strategy-provider/custom-strategy-preparation.d.ts +9 -0
- package/types/project-run/admission-strategy-provider/prepared-admission-strategy.d.ts +23 -0
- package/types/project-run/admission-strategy-provider/provider.d.ts +13 -0
- package/types/project-run/aggregation.d.ts +1 -1
- package/types/project-run/check-execution/callback.d.ts +5 -1
- package/types/project-run/check-execution/console-capture.d.ts +18 -0
- package/types/project-run/check-execution/dependencies.d.ts +1 -1
- package/types/project-run/check-execution/execution-finalization.d.ts +17 -7
- package/types/project-run/check-execution/execution-settlement.d.ts +5 -2
- package/types/project-run/check-execution/flag-controls.d.ts +27 -0
- package/types/project-run/check-execution/lifecycle.d.ts +20 -0
- package/types/project-run/check-execution/messages.d.ts +2 -0
- package/types/project-run/check-execution/plan.d.ts +2 -3
- package/types/project-run/check-execution/preflight.d.ts +6 -5
- package/types/project-run/check-execution/resolved-checks.d.ts +32 -38
- package/types/project-run/check-execution/resolved-execution-result.d.ts +21 -0
- package/types/project-run/{completion.d.ts → completion/completion.d.ts} +4 -4
- package/types/project-run/{machine-publication.d.ts → completion/machine-publication.d.ts} +3 -3
- package/types/project-run/completion/result-resolver.d.ts +4 -0
- package/types/project-run/controls/contract.d.ts +25 -2
- package/types/project-run/controls/outputs-override-validation.d.ts +2 -1
- package/types/project-run/controls/validation-result.d.ts +12 -4
- package/types/project-run/diagnostic-logging/logger.d.ts +34 -4
- package/types/project-run/diagnostic-logging/observation-rendering.d.ts +7 -0
- package/types/project-run/invocation/candidate.d.ts +12 -0
- package/types/project-run/{invocation-creation.d.ts → invocation/creation.d.ts} +3 -3
- package/types/project-run/invocation/paths.d.ts +40 -0
- package/types/project-run/invocation/progress.d.ts +11 -0
- package/types/project-run/invocation/run.d.ts +43 -0
- package/types/project-run/invocation/scheduler.d.ts +16 -0
- package/types/project-run/outputs/configuration.d.ts +3 -0
- package/types/project-run/outputs/status.d.ts +48 -0
- package/types/project-run/progress-rendering/presentation.d.ts +9 -5
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +8 -0
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +6 -1
- package/types/project-run/progress-rendering/renderer.d.ts +7 -1
- package/types/project-run/project-context.d.ts +2 -1
- package/types/project-run/result.d.ts +37 -3
- package/types/project-run/run.d.ts +6 -5
- package/types/project-run/task-scheduler/admission-core/compiled-graph.d.ts +31 -0
- package/types/project-run/task-scheduler/admission-core/core.d.ts +57 -0
- package/types/project-run/task-scheduler/admission-core/input.d.ts +4 -0
- package/types/project-run/task-scheduler/admission-core/projection.d.ts +22 -0
- package/types/project-run/task-scheduler/admission-core/selection-index.d.ts +61 -0
- package/types/project-run/task-scheduler/admission-core/selection-query.d.ts +28 -0
- package/types/project-run/task-scheduler/admission-core/selection-seed.d.ts +9 -0
- package/types/project-run/task-scheduler/admission-core/selection-transition.d.ts +4 -0
- package/types/project-run/task-scheduler/admission-core/selection.d.ts +20 -0
- package/types/project-run/task-scheduler/admission-scope-layers.d.ts +8 -0
- package/types/project-run/task-scheduler/admission-selection-policy.d.ts +31 -0
- package/types/project-run/task-scheduler/critical-path-ranking.d.ts +19 -0
- package/types/project-run/task-scheduler/custom-admission-policy.d.ts +6 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +43 -1
- package/types/project-run/task-scheduler/forced-block-effect-replay.d.ts +9 -0
- package/types/project-run/task-scheduler/graph-validation.d.ts +3 -2
- package/types/project-run/task-scheduler/graph.d.ts +15 -0
- package/types/project-run/task-scheduler/measurement/diagnostics.d.ts +47 -0
- package/types/project-run/task-scheduler/measurement/integrals.d.ts +27 -0
- package/types/project-run/task-scheduler/measurement/policy.d.ts +10 -0
- package/types/project-run/task-scheduler/measurement/summary.d.ts +3 -0
- package/types/project-run/task-scheduler/measurement/timing.d.ts +33 -0
- package/types/project-run/task-scheduler/scheduler-admission-decision.d.ts +13 -1
- package/types/project-run/task-scheduler/scheduler-decision-inspection.d.ts +20 -19
- package/types/project-run/task-scheduler/scheduler-decision-model.d.ts +38 -22
- package/types/project-run/task-scheduler/scheduler-decision.d.ts +4 -1
- package/types/project-run/task-scheduler/scheduler-observation.d.ts +14 -0
- package/types/project-run/task-scheduler/scheduler-task-lifecycle.d.ts +18 -0
- package/types/project-run/task-scheduler/scheduler-terminal-measurement.d.ts +9 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs.map +0 -1
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs +0 -64
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs.map +0 -1
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs +0 -17
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs.map +0 -1
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs +0 -138
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs.map +0 -1
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs +0 -35
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs.map +0 -1
- package/dist/esm/package-checks/host-environment/process/command.mjs +0 -13
- package/dist/esm/package-checks/host-environment/process/command.mjs.map +0 -1
- package/dist/esm/project-run/completion.mjs.map +0 -1
- package/dist/esm/project-run/invocation-creation.mjs +0 -111
- package/dist/esm/project-run/invocation-creation.mjs.map +0 -1
- package/dist/esm/project-run/invocation.mjs.map +0 -1
- package/dist/esm/project-run/machine-publication.mjs.map +0 -1
- package/dist/esm/project-run/output-configuration.mjs.map +0 -1
- package/dist/esm/project-run/output-status.mjs +0 -43
- package/dist/esm/project-run/output-status.mjs.map +0 -1
- package/src/package-checks/function-metrics/lizard/availability.ts +0 -90
- package/src/package-checks/function-metrics/lizard/csv.ts +0 -20
- package/src/package-checks/function-metrics/lizard/parser.ts +0 -179
- package/src/package-checks/function-metrics/lizard/scanner.ts +0 -62
- package/src/package-checks/host-environment/process/command.ts +0 -21
- package/src/project-run/invocation-creation.ts +0 -160
- package/src/project-run/output-status.ts +0 -69
- package/types/package-checks/file-metrics/scc/csv.d.ts +0 -1
- package/types/package-checks/function-metrics/lizard/availability.d.ts +0 -11
- package/types/package-checks/function-metrics/lizard/csv.d.ts +0 -1
- package/types/package-checks/function-metrics/lizard/parser.d.ts +0 -17
- package/types/package-checks/function-metrics/lizard/scanner.d.ts +0 -15
- package/types/package-checks/host-environment/process/command.d.ts +0 -7
- package/types/project-run/invocation.d.ts +0 -34
- package/types/project-run/output-configuration.d.ts +0 -3
- package/types/project-run/output-status.d.ts +0 -21
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { CheckExecutionContext, CheckMessage, CheckResult } from "../../check/check.ts";
|
|
2
|
+
import { appendCheckMessages } from "../../check/finding-presentation.ts";
|
|
3
|
+
import { reconcileFindingWaivers } from "../../finding-waivers/reconciliation.ts";
|
|
4
|
+
import { reportFindingWaiverAudits } from "../code-quality-findings/finding-waiver-evidence.ts";
|
|
5
|
+
import { collectProjectFiles } from "../project-files/collection.ts";
|
|
6
|
+
import type { SecretDetectionFinalData } from "./final-data.ts";
|
|
7
|
+
import {
|
|
8
|
+
prepareSecretDetectionInputs,
|
|
9
|
+
type ApprovedTextInput,
|
|
10
|
+
type SecretCoverageGap
|
|
11
|
+
} from "./input-preparation.ts";
|
|
12
|
+
import type { ResolvedSecretDetectionOptions } from "./options.ts";
|
|
13
|
+
import {
|
|
14
|
+
secretCoverageGapRecordId,
|
|
15
|
+
secretDetectionWaiverAuditRecord,
|
|
16
|
+
secretFindingIdentity,
|
|
17
|
+
secretFindingRecordId,
|
|
18
|
+
type SecretDetectionCoverageGapRecordData,
|
|
19
|
+
type SecretDetectionFindingRecordData
|
|
20
|
+
} from "./records.ts";
|
|
21
|
+
import { detectSecretlintIssues, type SecretDetectionIssue } from "./secretlint/adapter.ts";
|
|
22
|
+
import { validSecretDetectionOptions } from "./options-validation.ts";
|
|
23
|
+
|
|
24
|
+
export const SECRET_DETECTION_CHECK_DEFINITION = {
|
|
25
|
+
checkId: "secret-detection",
|
|
26
|
+
displayName: "Secret detection"
|
|
27
|
+
} as const;
|
|
28
|
+
|
|
29
|
+
/** `secretDetection` 的 whole-Check unavailable reason;不携带 detector 或 file-system 原始详情。 */
|
|
30
|
+
export type SecretDetectionUnavailableReasonCode =
|
|
31
|
+
| "detector-protocol-failed"
|
|
32
|
+
| "detector-unavailable"
|
|
33
|
+
| "execution-cancelled"
|
|
34
|
+
| "invalid-options"
|
|
35
|
+
| "scan-input-unavailable"
|
|
36
|
+
| "source-unavailable";
|
|
37
|
+
|
|
38
|
+
/** Executes the fixed in-process detector only for this Check's exact explicit input selection. */
|
|
39
|
+
export async function executeSecretDetection(
|
|
40
|
+
context: CheckExecutionContext<ResolvedSecretDetectionOptions>
|
|
41
|
+
): Promise<CheckResult<SecretDetectionFinalData>> {
|
|
42
|
+
if (!validSecretDetectionOptions(context.options)) return unavailable("invalid-options");
|
|
43
|
+
if (context.signal.aborted) return unavailable("execution-cancelled");
|
|
44
|
+
|
|
45
|
+
let selectedPaths: readonly string[];
|
|
46
|
+
try {
|
|
47
|
+
selectedPaths = collectProjectFiles(context.project.root, context.options.files);
|
|
48
|
+
} catch {
|
|
49
|
+
return unavailable("scan-input-unavailable");
|
|
50
|
+
}
|
|
51
|
+
if (context.signal.aborted) return unavailable("execution-cancelled");
|
|
52
|
+
if (selectedPaths.length === 0)
|
|
53
|
+
return settleSecretDetectionFindings(context, selectedPaths.length, [], []);
|
|
54
|
+
|
|
55
|
+
const prepared = prepareSecretDetectionInputs(context, selectedPaths);
|
|
56
|
+
if (prepared.kind === "unavailable") return unavailable("source-unavailable");
|
|
57
|
+
if (prepared.kind === "cancelled") return unavailable("execution-cancelled");
|
|
58
|
+
|
|
59
|
+
const detected = await detectApprovedInputs(context, prepared.inputs);
|
|
60
|
+
if (detected.kind === "unavailable") return unavailable(detected.code);
|
|
61
|
+
return settleSecretDetectionFindings(
|
|
62
|
+
context,
|
|
63
|
+
selectedPaths.length,
|
|
64
|
+
detected.issues,
|
|
65
|
+
prepared.coverageGaps
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
type DetectedIssues = Readonly<
|
|
70
|
+
| { readonly code: SecretDetectionUnavailableReasonCode; readonly kind: "unavailable" }
|
|
71
|
+
| { readonly issues: readonly SecretDetectionIssue[]; readonly kind: "complete" }
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
async function detectApprovedInputs(
|
|
75
|
+
context: CheckExecutionContext<ResolvedSecretDetectionOptions>,
|
|
76
|
+
inputs: readonly ApprovedTextInput[]
|
|
77
|
+
): Promise<DetectedIssues> {
|
|
78
|
+
const issues: SecretDetectionIssue[] = [];
|
|
79
|
+
for (const input of inputs) {
|
|
80
|
+
if (context.signal.aborted)
|
|
81
|
+
return Object.freeze({ code: "execution-cancelled", kind: "unavailable" });
|
|
82
|
+
const detected = await detectSecretlintIssues(input.content, input.path);
|
|
83
|
+
if (context.signal.aborted)
|
|
84
|
+
return Object.freeze({ code: "execution-cancelled", kind: "unavailable" });
|
|
85
|
+
if (detected.kind === "unavailable") {
|
|
86
|
+
return Object.freeze({ code: "detector-unavailable", kind: "unavailable" });
|
|
87
|
+
}
|
|
88
|
+
if (detected.kind === "protocol-failed") {
|
|
89
|
+
return Object.freeze({ code: "detector-protocol-failed", kind: "unavailable" });
|
|
90
|
+
}
|
|
91
|
+
issues.push(...detected.issues);
|
|
92
|
+
}
|
|
93
|
+
return Object.freeze({ issues: Object.freeze(issues), kind: "complete" });
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function settleSecretDetectionFindings(
|
|
97
|
+
context: CheckExecutionContext<ResolvedSecretDetectionOptions>,
|
|
98
|
+
selectedFileCount: number,
|
|
99
|
+
issues: readonly SecretDetectionIssue[],
|
|
100
|
+
coverageGaps: readonly SecretCoverageGap[]
|
|
101
|
+
): CheckResult<SecretDetectionFinalData> {
|
|
102
|
+
const reconciliation = reconcileFindingWaivers({
|
|
103
|
+
findings: issues,
|
|
104
|
+
identify: secretFindingIdentity,
|
|
105
|
+
waivers: context.options.findingWaivers
|
|
106
|
+
});
|
|
107
|
+
const waivedFindingCount = reconciliation.findings.filter(
|
|
108
|
+
(finding) => finding.disposition === "waived"
|
|
109
|
+
).length;
|
|
110
|
+
for (const finding of reconciliation.findings) {
|
|
111
|
+
const identity = secretFindingIdentity(finding.finding);
|
|
112
|
+
const data: SecretDetectionFindingRecordData = Object.freeze({
|
|
113
|
+
blocking: finding.disposition !== "waived",
|
|
114
|
+
kind: "secret-finding",
|
|
115
|
+
location: finding.finding.location,
|
|
116
|
+
ordinal: identity.ordinal,
|
|
117
|
+
path: identity.path,
|
|
118
|
+
ruleId: identity.ruleId,
|
|
119
|
+
structuralClass: identity.structuralClass,
|
|
120
|
+
...(finding.disposition === "waived"
|
|
121
|
+
? { waiver: Object.freeze({ reason: finding.waiver.reason }) }
|
|
122
|
+
: {})
|
|
123
|
+
});
|
|
124
|
+
context.records.report({ id: secretFindingRecordId(identity) }, data);
|
|
125
|
+
}
|
|
126
|
+
for (const coverageGap of coverageGaps) {
|
|
127
|
+
const data: SecretDetectionCoverageGapRecordData = Object.freeze({
|
|
128
|
+
blocking: true,
|
|
129
|
+
kind: "coverage-gap",
|
|
130
|
+
path: coverageGap.path,
|
|
131
|
+
reason: coverageGap.reason
|
|
132
|
+
});
|
|
133
|
+
context.records.report({ id: secretCoverageGapRecordId(coverageGap.path) }, data);
|
|
134
|
+
}
|
|
135
|
+
reportFindingWaiverAudits(context, reconciliation, secretDetectionWaiverAuditRecord);
|
|
136
|
+
|
|
137
|
+
const data = Object.freeze({
|
|
138
|
+
coverageGapCount: coverageGaps.length,
|
|
139
|
+
findingCount: issues.length,
|
|
140
|
+
scannedFileCount: selectedFileCount - coverageGaps.length,
|
|
141
|
+
selectedFileCount,
|
|
142
|
+
waivedFindingCount
|
|
143
|
+
});
|
|
144
|
+
if (selectedFileCount === 0) {
|
|
145
|
+
return appendCheckMessages(
|
|
146
|
+
Object.freeze({ status: "not-applicable", reason: { code: "no-eligible-input" } }),
|
|
147
|
+
waiverMessages(reconciliation.waiverAudits)
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
const actionableFindingCount = issues.length - waivedFindingCount;
|
|
151
|
+
const result: CheckResult<SecretDetectionFinalData> = Object.freeze({
|
|
152
|
+
data,
|
|
153
|
+
status: coverageGaps.length > 0 || actionableFindingCount > 0 ? "failed" : "passed"
|
|
154
|
+
});
|
|
155
|
+
return appendCheckMessages(
|
|
156
|
+
appendCheckMessages(result, findingMessages(actionableFindingCount, coverageGaps.length)),
|
|
157
|
+
waiverMessages(reconciliation.waiverAudits)
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function findingMessages(
|
|
162
|
+
actionableFindingCount: number,
|
|
163
|
+
coverageGapCount: number
|
|
164
|
+
): readonly CheckMessage[] {
|
|
165
|
+
const messages: CheckMessage[] = [];
|
|
166
|
+
if (actionableFindingCount > 0) {
|
|
167
|
+
messages.push(
|
|
168
|
+
Object.freeze({
|
|
169
|
+
code: "secret-findings",
|
|
170
|
+
level: "error",
|
|
171
|
+
message: `${actionableFindingCount} high-confidence secret finding(s) require attention; inspect this Check's safe Records, remove the material, or author an exact finding waiver.`
|
|
172
|
+
})
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
if (coverageGapCount > 0) {
|
|
176
|
+
messages.push(
|
|
177
|
+
Object.freeze({
|
|
178
|
+
code: "incomplete-coverage",
|
|
179
|
+
level: "error",
|
|
180
|
+
message: `${coverageGapCount} selected input(s) could not receive bounded secret detection coverage; narrow files or increase this Check's explicit resource limits.`
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
return Object.freeze(messages);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function waiverMessages(
|
|
188
|
+
audits: readonly Readonly<{
|
|
189
|
+
readonly matchCount: number;
|
|
190
|
+
readonly status: "applied" | "overmatched" | "unused";
|
|
191
|
+
readonly waiver: Readonly<{ readonly reason: string }>;
|
|
192
|
+
}>[]
|
|
193
|
+
): readonly CheckMessage[] {
|
|
194
|
+
const messages: CheckMessage[] = [];
|
|
195
|
+
for (const audit of audits) {
|
|
196
|
+
if (audit.status === "applied") {
|
|
197
|
+
messages.push(
|
|
198
|
+
Object.freeze({
|
|
199
|
+
code: "finding-waived",
|
|
200
|
+
level: "info",
|
|
201
|
+
message: `A secret finding was waived: ${audit.waiver.reason}`
|
|
202
|
+
})
|
|
203
|
+
);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
messages.push(
|
|
207
|
+
Object.freeze({
|
|
208
|
+
code: audit.status === "unused" ? "unused-finding-waiver" : "overmatched-finding-waiver",
|
|
209
|
+
level: "warning",
|
|
210
|
+
message:
|
|
211
|
+
audit.status === "unused"
|
|
212
|
+
? `A configured secret finding waiver matched no finding; remove or update it. Reason: ${audit.waiver.reason}`
|
|
213
|
+
: `A configured secret finding waiver matched ${audit.matchCount} findings and was not applied; narrow it. Reason: ${audit.waiver.reason}`
|
|
214
|
+
})
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
return Object.freeze(messages);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function unavailable(
|
|
221
|
+
code: SecretDetectionUnavailableReasonCode
|
|
222
|
+
): CheckResult<SecretDetectionFinalData> {
|
|
223
|
+
return Object.freeze({
|
|
224
|
+
messages: Object.freeze([
|
|
225
|
+
Object.freeze({ code, level: "error" as const, message: unavailableMessage(code) })
|
|
226
|
+
]),
|
|
227
|
+
reason: { code },
|
|
228
|
+
status: "unavailable"
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function unavailableMessage(code: SecretDetectionUnavailableReasonCode): string {
|
|
233
|
+
switch (code) {
|
|
234
|
+
case "invalid-options":
|
|
235
|
+
return "secretDetection options are invalid; recreate the Check with its documented explicit files policy.";
|
|
236
|
+
case "scan-input-unavailable":
|
|
237
|
+
return "Secret detection could not collect its configured project files; check the project root, permissions, and selected file source.";
|
|
238
|
+
case "source-unavailable":
|
|
239
|
+
return "A selected secret detection input could not be read safely; check that it still exists, is readable, and was not replaced during the Run.";
|
|
240
|
+
case "detector-unavailable":
|
|
241
|
+
return "The private secret detector did not complete; retry after restoring the package runtime without treating this Run as clean.";
|
|
242
|
+
case "detector-protocol-failed":
|
|
243
|
+
return "The private secret detector returned an unsupported result shape; update the package dependency only with a reviewed adapter change.";
|
|
244
|
+
case "execution-cancelled":
|
|
245
|
+
return "Secret detection was cancelled before it could form a complete result; inspect the caller's cancellation reason and retry if appropriate.";
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exactFinalDataRecord,
|
|
3
|
+
invalidFinalData,
|
|
4
|
+
nonNegativeSafeInteger
|
|
5
|
+
} from "../final-data-parsing.ts";
|
|
6
|
+
|
|
7
|
+
/** `secretDetection` 正常完成时发布的安全计数。 */
|
|
8
|
+
export interface SecretDetectionFinalData {
|
|
9
|
+
/** 已选择但未获得 bounded detector coverage 的文件数。 */
|
|
10
|
+
readonly coverageGapCount: number;
|
|
11
|
+
/** 所有安全投影后的 detector finding 数,包括已 waived 的 finding。 */
|
|
12
|
+
readonly findingCount: number;
|
|
13
|
+
/** 已获得 bounded text detector coverage 的文件数。 */
|
|
14
|
+
readonly scannedFileCount: number;
|
|
15
|
+
/** files policy 的 exact selection 数,恒等于 scannedFileCount 与 coverageGapCount 之和。 */
|
|
16
|
+
readonly selectedFileCount: number;
|
|
17
|
+
/** 安全 identity 被唯一 waiver 匹配的 finding 数。 */
|
|
18
|
+
readonly waivedFindingCount: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** 验证并脱离一份 `secretDetection` canonical final-data object。 */
|
|
22
|
+
export function parseSecretDetectionData(data: unknown): SecretDetectionFinalData {
|
|
23
|
+
const value = exactFinalDataRecord(
|
|
24
|
+
data,
|
|
25
|
+
[
|
|
26
|
+
"coverageGapCount",
|
|
27
|
+
"findingCount",
|
|
28
|
+
"scannedFileCount",
|
|
29
|
+
"selectedFileCount",
|
|
30
|
+
"waivedFindingCount"
|
|
31
|
+
],
|
|
32
|
+
"secretDetection"
|
|
33
|
+
);
|
|
34
|
+
const coverageGapCount = nonNegativeSafeInteger(value.coverageGapCount);
|
|
35
|
+
const findingCount = nonNegativeSafeInteger(value.findingCount);
|
|
36
|
+
const scannedFileCount = nonNegativeSafeInteger(value.scannedFileCount);
|
|
37
|
+
const selectedFileCount = nonNegativeSafeInteger(value.selectedFileCount);
|
|
38
|
+
const waivedFindingCount = nonNegativeSafeInteger(value.waivedFindingCount);
|
|
39
|
+
if (
|
|
40
|
+
coverageGapCount === undefined ||
|
|
41
|
+
findingCount === undefined ||
|
|
42
|
+
scannedFileCount === undefined ||
|
|
43
|
+
selectedFileCount === undefined ||
|
|
44
|
+
waivedFindingCount === undefined ||
|
|
45
|
+
scannedFileCount + coverageGapCount !== selectedFileCount ||
|
|
46
|
+
waivedFindingCount > findingCount
|
|
47
|
+
) {
|
|
48
|
+
throw invalidFinalData("secretDetection");
|
|
49
|
+
}
|
|
50
|
+
return Object.freeze({
|
|
51
|
+
coverageGapCount,
|
|
52
|
+
findingCount,
|
|
53
|
+
scannedFileCount,
|
|
54
|
+
selectedFileCount,
|
|
55
|
+
waivedFindingCount
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { snapshotExactClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
2
|
+
import { isPositiveSafeInteger } from "../../data-boundary/value-shapes.ts";
|
|
3
|
+
import { isNormalizedProjectRelativePath } from "../host-environment/path.ts";
|
|
4
|
+
import type { SecretDetectionFindingIdentity } from "./options.ts";
|
|
5
|
+
|
|
6
|
+
const PRIVATE_KEY_RULE_ID = "@secretlint/secretlint-rule-privatekey" as const;
|
|
7
|
+
const TEXT_DOCUMENT_STRUCTURAL_CLASS = "text-document" as const;
|
|
8
|
+
|
|
9
|
+
/** 解析只含安全路径、规则、结构标记和 occurrence ordinal 的 waiver identity。 */
|
|
10
|
+
export function resolveSecretDetectionFindingIdentity(
|
|
11
|
+
value: unknown
|
|
12
|
+
): SecretDetectionFindingIdentity | undefined {
|
|
13
|
+
const identity = snapshotExactClosedRecord(value, [
|
|
14
|
+
"ordinal",
|
|
15
|
+
"path",
|
|
16
|
+
"ruleId",
|
|
17
|
+
"structuralClass"
|
|
18
|
+
]);
|
|
19
|
+
if (
|
|
20
|
+
identity === undefined ||
|
|
21
|
+
!isPositiveSafeInteger(identity.ordinal) ||
|
|
22
|
+
!isNormalizedProjectRelativePath(identity.path) ||
|
|
23
|
+
identity.ruleId !== PRIVATE_KEY_RULE_ID ||
|
|
24
|
+
identity.structuralClass !== TEXT_DOCUMENT_STRUCTURAL_CLASS
|
|
25
|
+
) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
return Object.freeze({
|
|
29
|
+
ordinal: identity.ordinal,
|
|
30
|
+
path: identity.path,
|
|
31
|
+
ruleId: PRIVATE_KEY_RULE_ID,
|
|
32
|
+
structuralClass: TEXT_DOCUMENT_STRUCTURAL_CLASS
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const secretDetectionPrivateKeyRuleId = PRIVATE_KEY_RULE_ID;
|
|
37
|
+
export const secretDetectionTextDocumentStructuralClass = TEXT_DOCUMENT_STRUCTURAL_CLASS;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { closeSync, constants, fstatSync, openSync, readSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
|
|
4
|
+
import type { CheckExecutionContext } from "../../check/check.ts";
|
|
5
|
+
import {
|
|
6
|
+
classifySecretDetectionBytes,
|
|
7
|
+
type SecretDetectionCoverageGapReason
|
|
8
|
+
} from "./classification.ts";
|
|
9
|
+
import type { ResolvedSecretDetectionOptions } from "./options.ts";
|
|
10
|
+
|
|
11
|
+
/** Private, already-classified text passed to this Check's private detector adapter. */
|
|
12
|
+
export interface ApprovedTextInput {
|
|
13
|
+
readonly content: string;
|
|
14
|
+
readonly path: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A safe explanation for an exact selected input that did not receive detector coverage. */
|
|
18
|
+
export interface SecretCoverageGap {
|
|
19
|
+
readonly path: string;
|
|
20
|
+
readonly reason: SecretDetectionCoverageGapReason;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type PreparedSecretDetectionInputs = Readonly<
|
|
24
|
+
| { readonly kind: "cancelled" }
|
|
25
|
+
| { readonly kind: "unavailable" }
|
|
26
|
+
| {
|
|
27
|
+
readonly coverageGaps: readonly SecretCoverageGap[];
|
|
28
|
+
readonly inputs: readonly ApprovedTextInput[];
|
|
29
|
+
readonly kind: "complete";
|
|
30
|
+
}
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
/** Reads and classifies the already-selected paths before the detector can receive text. */
|
|
34
|
+
export function prepareSecretDetectionInputs(
|
|
35
|
+
context: CheckExecutionContext<ResolvedSecretDetectionOptions>,
|
|
36
|
+
selectedPaths: readonly string[]
|
|
37
|
+
): PreparedSecretDetectionInputs {
|
|
38
|
+
const coverageGaps: SecretCoverageGap[] = [];
|
|
39
|
+
const inputs: ApprovedTextInput[] = [];
|
|
40
|
+
let consumedBytes = 0;
|
|
41
|
+
|
|
42
|
+
for (const [index, path] of selectedPaths.entries()) {
|
|
43
|
+
if (context.signal.aborted) return Object.freeze({ kind: "cancelled" });
|
|
44
|
+
const selectionLimit = selectionLimitGaps(
|
|
45
|
+
context.options.maximumFileCount,
|
|
46
|
+
selectedPaths,
|
|
47
|
+
index
|
|
48
|
+
);
|
|
49
|
+
if (selectionLimit !== undefined) {
|
|
50
|
+
coverageGaps.push(...selectionLimit);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
const prepared = prepareSelectedInput(context, path, consumedBytes);
|
|
54
|
+
if (prepared.kind === "cancelled" || prepared.kind === "unavailable") return prepared;
|
|
55
|
+
if (prepared.kind === "coverage-gap") {
|
|
56
|
+
consumedBytes += prepared.consumedBytes;
|
|
57
|
+
coverageGaps.push(Object.freeze({ path, reason: prepared.reason }));
|
|
58
|
+
if (prepared.stop) {
|
|
59
|
+
coverageGaps.push(...coverageGapsFor(selectedPaths.slice(index + 1), "total-byte-limit"));
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
consumedBytes += prepared.byteLength;
|
|
65
|
+
inputs.push(prepared.input);
|
|
66
|
+
}
|
|
67
|
+
return Object.freeze({
|
|
68
|
+
coverageGaps: Object.freeze(coverageGaps),
|
|
69
|
+
inputs: Object.freeze(inputs),
|
|
70
|
+
kind: "complete"
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type PreparedSelectedInput = Readonly<
|
|
75
|
+
| { readonly kind: "cancelled" }
|
|
76
|
+
| { readonly kind: "unavailable" }
|
|
77
|
+
| {
|
|
78
|
+
readonly consumedBytes: number;
|
|
79
|
+
readonly kind: "coverage-gap";
|
|
80
|
+
readonly reason: SecretDetectionCoverageGapReason;
|
|
81
|
+
readonly stop: boolean;
|
|
82
|
+
}
|
|
83
|
+
| { readonly byteLength: number; readonly input: ApprovedTextInput; readonly kind: "approved" }
|
|
84
|
+
>;
|
|
85
|
+
|
|
86
|
+
type BoundedRegularFileRead = Readonly<
|
|
87
|
+
| { readonly kind: "unavailable" }
|
|
88
|
+
| {
|
|
89
|
+
readonly kind: "coverage-gap";
|
|
90
|
+
readonly reason: Extract<
|
|
91
|
+
SecretDetectionCoverageGapReason,
|
|
92
|
+
"file-byte-limit" | "total-byte-limit"
|
|
93
|
+
>;
|
|
94
|
+
}
|
|
95
|
+
| { readonly bytes: Uint8Array; readonly kind: "complete" }
|
|
96
|
+
>;
|
|
97
|
+
|
|
98
|
+
function selectionLimitGaps(
|
|
99
|
+
maximumFileCount: number,
|
|
100
|
+
selectedPaths: readonly string[],
|
|
101
|
+
index: number
|
|
102
|
+
): readonly SecretCoverageGap[] | undefined {
|
|
103
|
+
if (index < maximumFileCount) return undefined;
|
|
104
|
+
return coverageGapsFor(selectedPaths.slice(index), "file-count-limit");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function prepareSelectedInput(
|
|
108
|
+
context: CheckExecutionContext<ResolvedSecretDetectionOptions>,
|
|
109
|
+
path: string,
|
|
110
|
+
consumedBytes: number
|
|
111
|
+
): PreparedSelectedInput {
|
|
112
|
+
if (context.signal.aborted) return Object.freeze({ kind: "cancelled" });
|
|
113
|
+
const read = readBoundedRegularFile({
|
|
114
|
+
consumedBytes,
|
|
115
|
+
filePath: resolve(context.project.root, path),
|
|
116
|
+
options: context.options
|
|
117
|
+
});
|
|
118
|
+
if (read.kind === "unavailable") return read;
|
|
119
|
+
if (read.kind === "coverage-gap") {
|
|
120
|
+
return Object.freeze({
|
|
121
|
+
consumedBytes: 0,
|
|
122
|
+
kind: "coverage-gap",
|
|
123
|
+
reason: read.reason,
|
|
124
|
+
stop: read.reason === "total-byte-limit"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
if (context.signal.aborted) return Object.freeze({ kind: "cancelled" });
|
|
128
|
+
|
|
129
|
+
const classification = classifySecretDetectionBytes(read.bytes, context.options.maximumFileBytes);
|
|
130
|
+
if (classification.kind === "coverage-gap") {
|
|
131
|
+
return Object.freeze({
|
|
132
|
+
consumedBytes: read.bytes.byteLength,
|
|
133
|
+
kind: "coverage-gap",
|
|
134
|
+
reason: classification.reason,
|
|
135
|
+
stop: false
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return Object.freeze({
|
|
139
|
+
byteLength: read.bytes.byteLength,
|
|
140
|
+
input: Object.freeze({ content: classification.content, path }),
|
|
141
|
+
kind: "approved"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function readBoundedRegularFile(input: {
|
|
146
|
+
readonly consumedBytes: number;
|
|
147
|
+
readonly filePath: string;
|
|
148
|
+
readonly options: ResolvedSecretDetectionOptions;
|
|
149
|
+
}): BoundedRegularFileRead {
|
|
150
|
+
const descriptor = openRegularFileWithoutFollowingSymlink(input.filePath);
|
|
151
|
+
if (descriptor === undefined) return Object.freeze({ kind: "unavailable" });
|
|
152
|
+
try {
|
|
153
|
+
const byteLength = regularFileByteLength(descriptor);
|
|
154
|
+
if (byteLength === undefined) return Object.freeze({ kind: "unavailable" });
|
|
155
|
+
const limit = resourceLimitReason(input.options, byteLength, input.consumedBytes);
|
|
156
|
+
if (limit !== undefined) return Object.freeze({ kind: "coverage-gap", reason: limit });
|
|
157
|
+
|
|
158
|
+
const bytes = readExactBoundedBytes(descriptor, byteLength);
|
|
159
|
+
if (bytes === undefined || regularFileByteLength(descriptor) !== byteLength) {
|
|
160
|
+
return Object.freeze({ kind: "unavailable" });
|
|
161
|
+
}
|
|
162
|
+
return Object.freeze({ bytes, kind: "complete" });
|
|
163
|
+
} catch {
|
|
164
|
+
return Object.freeze({ kind: "unavailable" });
|
|
165
|
+
} finally {
|
|
166
|
+
closeDescriptor(descriptor);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function closeDescriptor(descriptor: number): void {
|
|
171
|
+
try {
|
|
172
|
+
closeSync(descriptor);
|
|
173
|
+
} catch {
|
|
174
|
+
// The descriptor cannot carry source bytes into a public result; preserve the completed read fact.
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function openRegularFileWithoutFollowingSymlink(filePath: string): number | undefined {
|
|
179
|
+
if (!supportsNoFollowDescriptorOpen()) return undefined;
|
|
180
|
+
try {
|
|
181
|
+
return openSync(filePath, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
182
|
+
} catch {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function supportsNoFollowDescriptorOpen(): boolean {
|
|
188
|
+
return process.platform !== "win32" && constants.O_NOFOLLOW !== 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function regularFileByteLength(descriptor: number): number | undefined {
|
|
192
|
+
try {
|
|
193
|
+
const details = fstatSync(descriptor);
|
|
194
|
+
return details.isFile() && Number.isSafeInteger(details.size) && details.size >= 0
|
|
195
|
+
? details.size
|
|
196
|
+
: undefined;
|
|
197
|
+
} catch {
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function readExactBoundedBytes(descriptor: number, byteLength: number): Uint8Array | undefined {
|
|
203
|
+
const bytes = new Uint8Array(byteLength);
|
|
204
|
+
let offset = 0;
|
|
205
|
+
while (offset < bytes.byteLength) {
|
|
206
|
+
const read = readSync(
|
|
207
|
+
descriptor,
|
|
208
|
+
bytes,
|
|
209
|
+
offset,
|
|
210
|
+
Math.min(65_536, bytes.byteLength - offset),
|
|
211
|
+
null
|
|
212
|
+
);
|
|
213
|
+
if (read <= 0) return undefined;
|
|
214
|
+
offset += read;
|
|
215
|
+
}
|
|
216
|
+
return bytes;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function resourceLimitReason(
|
|
220
|
+
options: ResolvedSecretDetectionOptions,
|
|
221
|
+
byteLength: number,
|
|
222
|
+
consumedBytes: number
|
|
223
|
+
): Extract<SecretDetectionCoverageGapReason, "file-byte-limit" | "total-byte-limit"> | undefined {
|
|
224
|
+
if (byteLength > options.maximumFileBytes) return "file-byte-limit";
|
|
225
|
+
return consumedBytes + byteLength > options.maximumTotalBytes ? "total-byte-limit" : undefined;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function coverageGapsFor(
|
|
229
|
+
paths: readonly string[],
|
|
230
|
+
reason: SecretDetectionCoverageGapReason
|
|
231
|
+
): readonly SecretCoverageGap[] {
|
|
232
|
+
return Object.freeze(paths.map((path) => Object.freeze({ path, reason })));
|
|
233
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { snapshotClosedPolicyRecord } from "../../data-boundary/closed-values.ts";
|
|
2
|
+
import { isPositiveSafeInteger } from "../../data-boundary/value-shapes.ts";
|
|
3
|
+
import { resolveFindingWaiverAuthoring } from "../code-quality-findings/finding-waiver-authoring.ts";
|
|
4
|
+
import {
|
|
5
|
+
snapshotProjectFileSelection,
|
|
6
|
+
validProjectFileSelection
|
|
7
|
+
} from "../project-files/configuration.ts";
|
|
8
|
+
import { resolveSecretDetectionFindingIdentity } from "./finding-waiver-identity.ts";
|
|
9
|
+
import type { ResolvedSecretDetectionOptions } from "./options.ts";
|
|
10
|
+
import { validSecretDetectionOptions } from "./options-validation.ts";
|
|
11
|
+
|
|
12
|
+
export const DEFAULT_SECRET_DETECTION_MAXIMUM_FILE_BYTES = 1_048_576;
|
|
13
|
+
export const DEFAULT_SECRET_DETECTION_MAXIMUM_TOTAL_BYTES = 8_388_608;
|
|
14
|
+
export const DEFAULT_SECRET_DETECTION_MAXIMUM_FILE_COUNT = 2_048;
|
|
15
|
+
|
|
16
|
+
/** 将 required exact file policy 和有限资源策略物化为完整、冻结 options。 */
|
|
17
|
+
export function resolveSecretDetectionOptions(
|
|
18
|
+
value: unknown
|
|
19
|
+
): ResolvedSecretDetectionOptions | undefined {
|
|
20
|
+
const input = snapshotClosedPolicyRecord(value, {
|
|
21
|
+
optional: ["findingWaivers", "maximumFileBytes", "maximumFileCount", "maximumTotalBytes"],
|
|
22
|
+
required: ["files"]
|
|
23
|
+
});
|
|
24
|
+
if (input === undefined || !validProjectFileSelection(input.files)) return undefined;
|
|
25
|
+
|
|
26
|
+
const limits = resolveSecretDetectionResourceLimits(input);
|
|
27
|
+
const findingWaivers = resolveFindingWaiverAuthoring(
|
|
28
|
+
input.findingWaivers,
|
|
29
|
+
resolveSecretDetectionFindingIdentity
|
|
30
|
+
);
|
|
31
|
+
if (limits === undefined || findingWaivers === undefined) return undefined;
|
|
32
|
+
|
|
33
|
+
const options = Object.freeze({
|
|
34
|
+
files: snapshotProjectFileSelection(input.files),
|
|
35
|
+
findingWaivers,
|
|
36
|
+
...limits
|
|
37
|
+
});
|
|
38
|
+
return validSecretDetectionOptions(options) ? options : undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function resolveSecretDetectionResourceLimits(
|
|
42
|
+
input: Readonly<{
|
|
43
|
+
readonly maximumFileBytes?: unknown;
|
|
44
|
+
readonly maximumFileCount?: unknown;
|
|
45
|
+
readonly maximumTotalBytes?: unknown;
|
|
46
|
+
}>
|
|
47
|
+
):
|
|
48
|
+
| Readonly<{
|
|
49
|
+
readonly maximumFileBytes: number;
|
|
50
|
+
readonly maximumFileCount: number;
|
|
51
|
+
readonly maximumTotalBytes: number;
|
|
52
|
+
}>
|
|
53
|
+
| undefined {
|
|
54
|
+
const maximumFileBytes = input.maximumFileBytes ?? DEFAULT_SECRET_DETECTION_MAXIMUM_FILE_BYTES;
|
|
55
|
+
const maximumFileCount = input.maximumFileCount ?? DEFAULT_SECRET_DETECTION_MAXIMUM_FILE_COUNT;
|
|
56
|
+
const maximumTotalBytes = input.maximumTotalBytes ?? DEFAULT_SECRET_DETECTION_MAXIMUM_TOTAL_BYTES;
|
|
57
|
+
if (
|
|
58
|
+
!isPositiveSafeInteger(maximumFileBytes) ||
|
|
59
|
+
!isPositiveSafeInteger(maximumFileCount) ||
|
|
60
|
+
!isPositiveSafeInteger(maximumTotalBytes)
|
|
61
|
+
) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return Object.freeze({ maximumFileBytes, maximumFileCount, maximumTotalBytes });
|
|
65
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { snapshotExactClosedRecord } from "../../data-boundary/closed-values.ts";
|
|
2
|
+
import { isPositiveSafeInteger } from "../../data-boundary/value-shapes.ts";
|
|
3
|
+
import { validResolvedFindingWaivers } from "../code-quality-findings/finding-waiver-authoring.ts";
|
|
4
|
+
import { validProjectFileSelection } from "../project-files/configuration.ts";
|
|
5
|
+
import { resolveSecretDetectionFindingIdentity } from "./finding-waiver-identity.ts";
|
|
6
|
+
import type { ResolvedSecretDetectionOptions } from "./options.ts";
|
|
7
|
+
|
|
8
|
+
/** Guards prepared options before a Run invokes a detector. */
|
|
9
|
+
export function validSecretDetectionOptions(
|
|
10
|
+
value: unknown
|
|
11
|
+
): value is ResolvedSecretDetectionOptions {
|
|
12
|
+
const options = snapshotExactClosedRecord(value, [
|
|
13
|
+
"files",
|
|
14
|
+
"findingWaivers",
|
|
15
|
+
"maximumFileBytes",
|
|
16
|
+
"maximumFileCount",
|
|
17
|
+
"maximumTotalBytes"
|
|
18
|
+
]);
|
|
19
|
+
return (
|
|
20
|
+
options !== undefined &&
|
|
21
|
+
validProjectFileSelection(options.files) &&
|
|
22
|
+
validResolvedFindingWaivers(options.findingWaivers, resolveSecretDetectionFindingIdentity) &&
|
|
23
|
+
isPositiveSafeInteger(options.maximumFileBytes) &&
|
|
24
|
+
isPositiveSafeInteger(options.maximumFileCount) &&
|
|
25
|
+
isPositiveSafeInteger(options.maximumTotalBytes)
|
|
26
|
+
);
|
|
27
|
+
}
|