@zxyycom/vibe-check 0.0.1
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/LICENSE +21 -0
- package/README.md +154 -0
- package/dist/esm/check/check.mjs +5 -0
- package/dist/esm/check/check.mjs.map +1 -0
- package/dist/esm/check/descriptor-validation.mjs +37 -0
- package/dist/esm/check/descriptor-validation.mjs.map +1 -0
- package/dist/esm/check/descriptor.mjs +2 -0
- package/dist/esm/check/descriptor.mjs.map +1 -0
- package/dist/esm/check/inherited-collection.mjs +62 -0
- package/dist/esm/check/inherited-collection.mjs.map +1 -0
- package/dist/esm/check/options-snapshot.mjs +75 -0
- package/dist/esm/check/options-snapshot.mjs.map +1 -0
- package/dist/esm/check-settlement/fact-validation.mjs +216 -0
- package/dist/esm/check-settlement/fact-validation.mjs.map +1 -0
- package/dist/esm/check-settlement/facts.mjs +2 -0
- package/dist/esm/check-settlement/facts.mjs.map +1 -0
- package/dist/esm/check-settlement/outcome-normalization.mjs +80 -0
- package/dist/esm/check-settlement/outcome-normalization.mjs.map +1 -0
- package/dist/esm/check-settlement/record-store.mjs +59 -0
- package/dist/esm/check-settlement/record-store.mjs.map +1 -0
- package/dist/esm/check-settlement/session.mjs +179 -0
- package/dist/esm/check-settlement/session.mjs.map +1 -0
- package/dist/esm/data-boundary/canonical-data.mjs +159 -0
- package/dist/esm/data-boundary/canonical-data.mjs.map +1 -0
- package/dist/esm/data-boundary/canonical-json.mjs +2 -0
- package/dist/esm/data-boundary/canonical-json.mjs.map +1 -0
- package/dist/esm/data-boundary/closed-values.mjs +98 -0
- package/dist/esm/data-boundary/closed-values.mjs.map +1 -0
- package/dist/esm/data-boundary/value-shapes.mjs +13 -0
- package/dist/esm/data-boundary/value-shapes.mjs.map +1 -0
- package/dist/esm/finding-waivers/reconciliation.mjs +84 -0
- package/dist/esm/finding-waivers/reconciliation.mjs.map +1 -0
- package/dist/esm/index.mjs +26 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs +102 -0
- package/dist/esm/machine-output/v4/atomic-publication.mjs.map +1 -0
- package/dist/esm/machine-output/v4/freeze-publication-value.mjs +14 -0
- package/dist/esm/machine-output/v4/freeze-publication-value.mjs.map +1 -0
- package/dist/esm/machine-output/v4/projection.mjs +23 -0
- package/dist/esm/machine-output/v4/projection.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publication-invariants.mjs +59 -0
- package/dist/esm/machine-output/v4/publication-invariants.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publication-model.mjs +19 -0
- package/dist/esm/machine-output/v4/publication-model.mjs.map +1 -0
- package/dist/esm/machine-output/v4/publish.mjs +20 -0
- package/dist/esm/machine-output/v4/publish.mjs.map +1 -0
- package/dist/esm/machine-output/v4/records-fingerprint.mjs +9 -0
- package/dist/esm/machine-output/v4/records-fingerprint.mjs.map +1 -0
- package/dist/esm/machine-output/v4/schema-identities.mjs +8 -0
- package/dist/esm/machine-output/v4/schema-identities.mjs.map +1 -0
- package/dist/esm/machine-output/v4/schema.mjs +50 -0
- package/dist/esm/machine-output/v4/schema.mjs.map +1 -0
- package/dist/esm/machine-output/v4/serializers.mjs +9 -0
- package/dist/esm/machine-output/v4/serializers.mjs.map +1 -0
- package/dist/esm/machine-output/v4/validation-result.mjs +16 -0
- package/dist/esm/machine-output/v4/validation-result.mjs.map +1 -0
- package/dist/esm/machine-output/v4/validation.mjs +131 -0
- package/dist/esm/machine-output/v4/validation.mjs.map +1 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs +49 -0
- package/dist/esm/package-checks/code-quality-findings/policy.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs +71 -0
- package/dist/esm/package-checks/duplicate-detection/area-policy.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/cache-contract.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/cache/cache-contract.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs +37 -0
- package/dist/esm/package-checks/duplicate-detection/cache/identity.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/key.mjs +38 -0
- package/dist/esm/package-checks/duplicate-detection/cache/key.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/payload.mjs +47 -0
- package/dist/esm/package-checks/duplicate-detection/cache/payload.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/cache/store.mjs +44 -0
- package/dist/esm/package-checks/duplicate-detection/cache/store.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs +39 -0
- package/dist/esm/package-checks/duplicate-detection/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/execution.mjs +124 -0
- package/dist/esm/package-checks/duplicate-detection/execution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/final-data.mjs +6 -0
- package/dist/esm/package-checks/duplicate-detection/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs +77 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/availability.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-path.mjs +6 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-path.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs +87 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/command-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs +94 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/json-report.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner-contract.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner-contract.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs +180 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scoped-fragments.mjs +10 -0
- package/dist/esm/package-checks/duplicate-detection/jscpd/scoped-fragments.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/measurement.mjs +151 -0
- package/dist/esm/package-checks/duplicate-detection/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs +126 -0
- package/dist/esm/package-checks/duplicate-detection/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs +60 -0
- package/dist/esm/package-checks/duplicate-detection/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/options.mjs +2 -0
- package/dist/esm/package-checks/duplicate-detection/options.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/project-revision.mjs +5 -0
- package/dist/esm/package-checks/duplicate-detection/project-revision.mjs.map +1 -0
- package/dist/esm/package-checks/duplicate-detection/records.mjs +119 -0
- package/dist/esm/package-checks/duplicate-detection/records.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/constructor.mjs +39 -0
- package/dist/esm/package-checks/file-metrics/constructor.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/execution.mjs +170 -0
- package/dist/esm/package-checks/file-metrics/execution.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/final-data.mjs +6 -0
- package/dist/esm/package-checks/file-metrics/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/file-metrics/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/measurement.mjs +33 -0
- package/dist/esm/package-checks/file-metrics/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs +171 -0
- package/dist/esm/package-checks/file-metrics/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options-validation.mjs +82 -0
- package/dist/esm/package-checks/file-metrics/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/options.mjs +2 -0
- package/dist/esm/package-checks/file-metrics/options.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/records.mjs +109 -0
- package/dist/esm/package-checks/file-metrics/records.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs +59 -0
- package/dist/esm/package-checks/file-metrics/scc/availability.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs +17 -0
- package/dist/esm/package-checks/file-metrics/scc/csv.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs +145 -0
- package/dist/esm/package-checks/file-metrics/scc/parser.mjs.map +1 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs +54 -0
- package/dist/esm/package-checks/file-metrics/scc/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/final-data-parsing.mjs +35 -0
- package/dist/esm/package-checks/final-data-parsing.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/analysis.mjs +96 -0
- package/dist/esm/package-checks/function-metrics/analysis.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs +43 -0
- package/dist/esm/package-checks/function-metrics/constructor.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/execution.mjs +178 -0
- package/dist/esm/package-checks/function-metrics/execution.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/final-data.mjs +6 -0
- package/dist/esm/package-checks/function-metrics/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs +64 -0
- package/dist/esm/package-checks/function-metrics/lizard/availability.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs +17 -0
- package/dist/esm/package-checks/function-metrics/lizard/csv.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs +138 -0
- package/dist/esm/package-checks/function-metrics/lizard/parser.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs +35 -0
- package/dist/esm/package-checks/function-metrics/lizard/scanner.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/measurement-model.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/measurement.mjs +35 -0
- package/dist/esm/package-checks/function-metrics/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs +171 -0
- package/dist/esm/package-checks/function-metrics/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options-validation.mjs +71 -0
- package/dist/esm/package-checks/function-metrics/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/options.mjs +2 -0
- package/dist/esm/package-checks/function-metrics/options.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/records.mjs +133 -0
- package/dist/esm/package-checks/function-metrics/records.mjs.map +1 -0
- package/dist/esm/package-checks/function-metrics/target-files.mjs +75 -0
- package/dist/esm/package-checks/function-metrics/target-files.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/error-message.mjs +4 -0
- package/dist/esm/package-checks/host-environment/error-message.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/filesystem.mjs +81 -0
- package/dist/esm/package-checks/host-environment/filesystem.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/git.mjs +51 -0
- package/dist/esm/package-checks/host-environment/git.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/path.mjs +18 -0
- package/dist/esm/package-checks/host-environment/path.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/command.mjs +13 -0
- package/dist/esm/package-checks/host-environment/process/command.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/contract.mjs +2 -0
- package/dist/esm/package-checks/host-environment/process/contract.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/env.mjs +19 -0
- package/dist/esm/package-checks/host-environment/process/env.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/failure.mjs +34 -0
- package/dist/esm/package-checks/host-environment/process/failure.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/result.mjs +33 -0
- package/dist/esm/package-checks/host-environment/process/result.mjs.map +1 -0
- package/dist/esm/package-checks/host-environment/process/runner.mjs +30 -0
- package/dist/esm/package-checks/host-environment/process/runner.mjs.map +1 -0
- package/dist/esm/package-checks/json-document/strict-document.mjs +163 -0
- package/dist/esm/package-checks/json-document/strict-document.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs +39 -0
- package/dist/esm/package-checks/json-schema-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/execution-stages.mjs +141 -0
- package/dist/esm/package-checks/json-schema-validation/execution-stages.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs +64 -0
- package/dist/esm/package-checks/json-schema-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/issue-collector.mjs +35 -0
- package/dist/esm/package-checks/json-schema-validation/issue-collector.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/json-schema-validation.mjs +118 -0
- package/dist/esm/package-checks/json-schema-validation/json-schema-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options-resolution.mjs +45 -0
- package/dist/esm/package-checks/json-schema-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs +212 -0
- package/dist/esm/package-checks/json-schema-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/options.mjs +2 -0
- package/dist/esm/package-checks/json-schema-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs +128 -0
- package/dist/esm/package-checks/json-schema-validation/reference-resolver.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/remote-response.mjs +71 -0
- package/dist/esm/package-checks/json-schema-validation/remote-response.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/schema-engine.mjs +190 -0
- package/dist/esm/package-checks/json-schema-validation/schema-engine.mjs.map +1 -0
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs +234 -0
- package/dist/esm/package-checks/json-schema-validation/schema-policy.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/default-check.mjs +39 -0
- package/dist/esm/package-checks/json-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/final-data.mjs +27 -0
- package/dist/esm/package-checks/json-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/json-validation.mjs +138 -0
- package/dist/esm/package-checks/json-validation/json-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options-resolution.mjs +33 -0
- package/dist/esm/package-checks/json-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options-validation.mjs +16 -0
- package/dist/esm/package-checks/json-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/json-validation/options.mjs +2 -0
- package/dist/esm/package-checks/json-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/assessment-results.mjs +73 -0
- package/dist/esm/package-checks/maintenance-reminders/assessment-results.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs +153 -0
- package/dist/esm/package-checks/maintenance-reminders/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs +155 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-reminders.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs +58 -0
- package/dist/esm/package-checks/maintenance-reminders/maintenance-support.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/measurement.mjs +125 -0
- package/dist/esm/package-checks/maintenance-reminders/measurement.mjs.map +1 -0
- package/dist/esm/package-checks/maintenance-reminders/options-validation.mjs +72 -0
- package/dist/esm/package-checks/maintenance-reminders/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs +55 -0
- package/dist/esm/package-checks/markdown-link-validation/default-check.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs +199 -0
- package/dist/esm/package-checks/markdown-link-validation/execution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs +109 -0
- package/dist/esm/package-checks/markdown-link-validation/filesystem-probes.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs +28 -0
- package/dist/esm/package-checks/markdown-link-validation/final-data.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs +158 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs +17 -0
- package/dist/esm/package-checks/markdown-link-validation/local-resolver.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs +191 -0
- package/dist/esm/package-checks/markdown-link-validation/markdown-parser.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs +83 -0
- package/dist/esm/package-checks/markdown-link-validation/options-resolution.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs +50 -0
- package/dist/esm/package-checks/markdown-link-validation/options-validation.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/options.mjs +2 -0
- package/dist/esm/package-checks/markdown-link-validation/options.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/records.mjs +32 -0
- package/dist/esm/package-checks/markdown-link-validation/records.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs +196 -0
- package/dist/esm/package-checks/markdown-link-validation/resolver-engine.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/target-descriptor.mjs +23 -0
- package/dist/esm/package-checks/markdown-link-validation/target-descriptor.mjs.map +1 -0
- package/dist/esm/package-checks/markdown-link-validation/traversal-result.mjs +41 -0
- package/dist/esm/package-checks/markdown-link-validation/traversal-result.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/collection.mjs +142 -0
- package/dist/esm/package-checks/project-files/collection.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/config-glob.mjs +11 -0
- package/dist/esm/package-checks/project-files/config-glob.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/configuration.mjs +104 -0
- package/dist/esm/package-checks/project-files/configuration.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/exact-input-measurement.mjs +24 -0
- package/dist/esm/package-checks/project-files/exact-input-measurement.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/file-fingerprint.mjs +36 -0
- package/dist/esm/package-checks/project-files/file-fingerprint.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs +57 -0
- package/dist/esm/package-checks/project-files/gitlink-revision.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs +72 -0
- package/dist/esm/package-checks/project-files/gitlink-worktree.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/input-eligibility.mjs +13 -0
- package/dist/esm/package-checks/project-files/input-eligibility.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/reported-path.mjs +30 -0
- package/dist/esm/package-checks/project-files/reported-path.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-paths.mjs +19 -0
- package/dist/esm/package-checks/project-files/revision-paths.mjs.map +1 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs +102 -0
- package/dist/esm/package-checks/project-files/revision-worktree-files.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs +242 -0
- package/dist/esm/project-definition/check-tree/authoring.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs +50 -0
- package/dist/esm/project-definition/check-tree/materialization.mjs.map +1 -0
- package/dist/esm/project-definition/check-tree/resolution.mjs +60 -0
- package/dist/esm/project-definition/check-tree/resolution.mjs.map +1 -0
- package/dist/esm/project-definition/output-defaults.mjs +7 -0
- package/dist/esm/project-definition/output-defaults.mjs.map +1 -0
- package/dist/esm/project-definition/output-validation.mjs +44 -0
- package/dist/esm/project-definition/output-validation.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition-validation.mjs +95 -0
- package/dist/esm/project-definition/project-definition-validation.mjs.map +1 -0
- package/dist/esm/project-definition/project-definition.mjs +92 -0
- package/dist/esm/project-definition/project-definition.mjs.map +1 -0
- package/dist/esm/project-run/aggregation.mjs +66 -0
- package/dist/esm/project-run/aggregation.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/callback.mjs +70 -0
- package/dist/esm/project-run/check-execution/callback.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs +50 -0
- package/dist/esm/project-run/check-execution/dependencies.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/execution-finalization.mjs +103 -0
- package/dist/esm/project-run/check-execution/execution-finalization.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/execution-settlement.mjs +90 -0
- package/dist/esm/project-run/check-execution/execution-settlement.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/messages.mjs +38 -0
- package/dist/esm/project-run/check-execution/messages.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/plan.mjs +35 -0
- package/dist/esm/project-run/check-execution/plan.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/preflight-result.mjs +83 -0
- package/dist/esm/project-run/check-execution/preflight-result.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/preflight.mjs +186 -0
- package/dist/esm/project-run/check-execution/preflight.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs +168 -0
- package/dist/esm/project-run/check-execution/resolved-checks.mjs.map +1 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs +49 -0
- package/dist/esm/project-run/check-execution/terminal-result.mjs.map +1 -0
- package/dist/esm/project-run/completion.mjs +173 -0
- package/dist/esm/project-run/completion.mjs.map +1 -0
- package/dist/esm/project-run/controls/contract.mjs +2 -0
- package/dist/esm/project-run/controls/contract.mjs.map +1 -0
- package/dist/esm/project-run/controls/outputs-override-validation.mjs +61 -0
- package/dist/esm/project-run/controls/outputs-override-validation.mjs.map +1 -0
- package/dist/esm/project-run/controls/validation-result.mjs +2 -0
- package/dist/esm/project-run/controls/validation-result.mjs.map +1 -0
- package/dist/esm/project-run/controls/validation.mjs +156 -0
- package/dist/esm/project-run/controls/validation.mjs.map +1 -0
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs +182 -0
- package/dist/esm/project-run/diagnostic-logging/diagnostic-detail-rendering.mjs.map +1 -0
- package/dist/esm/project-run/diagnostic-logging/logger.mjs +242 -0
- package/dist/esm/project-run/diagnostic-logging/logger.mjs.map +1 -0
- package/dist/esm/project-run/invocation-creation.mjs +111 -0
- package/dist/esm/project-run/invocation-creation.mjs.map +1 -0
- package/dist/esm/project-run/invocation.mjs +195 -0
- package/dist/esm/project-run/invocation.mjs.map +1 -0
- package/dist/esm/project-run/machine-publication.mjs +16 -0
- package/dist/esm/project-run/machine-publication.mjs.map +1 -0
- package/dist/esm/project-run/output-configuration.mjs +17 -0
- package/dist/esm/project-run/output-configuration.mjs.map +1 -0
- package/dist/esm/project-run/output-status.mjs +43 -0
- package/dist/esm/project-run/output-status.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs +135 -0
- package/dist/esm/project-run/progress-rendering/presentation.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs +100 -0
- package/dist/esm/project-run/progress-rendering/renderer-formatting.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs +123 -0
- package/dist/esm/project-run/progress-rendering/renderer-lifecycle.mjs.map +1 -0
- package/dist/esm/project-run/progress-rendering/renderer.mjs +12 -0
- package/dist/esm/project-run/progress-rendering/renderer.mjs.map +1 -0
- package/dist/esm/project-run/project-context.mjs +8 -0
- package/dist/esm/project-run/project-context.mjs.map +1 -0
- package/dist/esm/project-run/result.mjs +54 -0
- package/dist/esm/project-run/result.mjs.map +1 -0
- package/dist/esm/project-run/run.mjs +23 -0
- package/dist/esm/project-run/run.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs +66 -0
- package/dist/esm/project-run/task-scheduler/execution-state.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs +119 -0
- package/dist/esm/project-run/task-scheduler/graph-validation.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/graph.mjs +116 -0
- package/dist/esm/project-run/task-scheduler/graph.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs +82 -0
- package/dist/esm/project-run/task-scheduler/scheduler-admission-decision.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs +27 -0
- package/dist/esm/project-run/task-scheduler/scheduler-blocker-summary.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs +125 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-inspection.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs +45 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision-model.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs +74 -0
- package/dist/esm/project-run/task-scheduler/scheduler-decision.mjs.map +1 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs +147 -0
- package/dist/esm/project-run/task-scheduler/scheduler.mjs.map +1 -0
- package/docs/api-mechanics.md +205 -0
- package/docs/checks/duplicate-detection.md +195 -0
- package/docs/checks/file-metrics.md +229 -0
- package/docs/checks/function-metrics.md +222 -0
- package/docs/checks/json-schema-validation.md +190 -0
- package/docs/checks/json-validation.md +133 -0
- package/docs/checks/maintenance-reminders.md +158 -0
- package/docs/checks/markdown-link-validation.md +192 -0
- package/docs/examples/artifacts/mixed-outcomes/definition.ts +195 -0
- package/docs/examples/artifacts/mixed-outcomes/records.ndjson +2 -0
- package/docs/examples/artifacts/mixed-outcomes/run.json +70 -0
- package/docs/output.md +97 -0
- package/docs/schemas/vibe-check-record.schema.json +33 -0
- package/docs/schemas/vibe-check-run.schema.json +173 -0
- package/index.mjs +1 -0
- package/package.json +49 -0
- package/src/check/check.ts +497 -0
- package/src/check/descriptor-validation.ts +60 -0
- package/src/check/descriptor.ts +5 -0
- package/src/check/inherited-collection.ts +101 -0
- package/src/check/options-snapshot.ts +80 -0
- package/src/check-settlement/fact-validation.ts +289 -0
- package/src/check-settlement/facts.ts +27 -0
- package/src/check-settlement/outcome-normalization.ts +118 -0
- package/src/check-settlement/record-store.ts +73 -0
- package/src/check-settlement/session.ts +257 -0
- package/src/data-boundary/canonical-data.ts +188 -0
- package/src/data-boundary/canonical-json.ts +11 -0
- package/src/data-boundary/closed-values.ts +126 -0
- package/src/data-boundary/value-shapes.ts +15 -0
- package/src/finding-waivers/reconciliation.ts +176 -0
- package/src/index.ts +123 -0
- package/src/machine-output/v4/atomic-publication.ts +123 -0
- package/src/machine-output/v4/freeze-publication-value.ts +12 -0
- package/src/machine-output/v4/projection.ts +36 -0
- package/src/machine-output/v4/publication-invariants.ts +89 -0
- package/src/machine-output/v4/publication-model.ts +38 -0
- package/src/machine-output/v4/publish.ts +23 -0
- package/src/machine-output/v4/records-fingerprint.ts +12 -0
- package/src/machine-output/v4/schema-identities.ts +8 -0
- package/src/machine-output/v4/schema.ts +97 -0
- package/src/machine-output/v4/serializers.ts +18 -0
- package/src/machine-output/v4/validation-result.ts +59 -0
- package/src/machine-output/v4/validation.ts +166 -0
- package/src/package-checks/code-quality-findings/policy.ts +85 -0
- package/src/package-checks/duplicate-detection/area-policy.ts +103 -0
- package/src/package-checks/duplicate-detection/cache/cache-contract.ts +49 -0
- package/src/package-checks/duplicate-detection/cache/identity.ts +61 -0
- package/src/package-checks/duplicate-detection/cache/key.ts +46 -0
- package/src/package-checks/duplicate-detection/cache/payload.ts +78 -0
- package/src/package-checks/duplicate-detection/cache/store.ts +77 -0
- package/src/package-checks/duplicate-detection/default-check.ts +50 -0
- package/src/package-checks/duplicate-detection/execution.ts +168 -0
- package/src/package-checks/duplicate-detection/final-data.ts +10 -0
- package/src/package-checks/duplicate-detection/jscpd/availability.ts +137 -0
- package/src/package-checks/duplicate-detection/jscpd/command-path.ts +8 -0
- package/src/package-checks/duplicate-detection/jscpd/command-resolution.ts +112 -0
- package/src/package-checks/duplicate-detection/jscpd/json-report.ts +137 -0
- package/src/package-checks/duplicate-detection/jscpd/scanner-contract.ts +18 -0
- package/src/package-checks/duplicate-detection/jscpd/scanner.ts +257 -0
- package/src/package-checks/duplicate-detection/jscpd/scoped-fragments.ts +17 -0
- package/src/package-checks/duplicate-detection/measurement-model.ts +44 -0
- package/src/package-checks/duplicate-detection/measurement.ts +223 -0
- package/src/package-checks/duplicate-detection/options-resolution.ts +162 -0
- package/src/package-checks/duplicate-detection/options-validation.ts +75 -0
- package/src/package-checks/duplicate-detection/options.ts +72 -0
- package/src/package-checks/duplicate-detection/project-revision.ts +5 -0
- package/src/package-checks/duplicate-detection/records.ts +171 -0
- package/src/package-checks/file-metrics/constructor.ts +46 -0
- package/src/package-checks/file-metrics/execution.ts +233 -0
- package/src/package-checks/file-metrics/final-data.ts +10 -0
- package/src/package-checks/file-metrics/measurement-model.ts +10 -0
- package/src/package-checks/file-metrics/measurement.ts +52 -0
- package/src/package-checks/file-metrics/options-resolution.ts +213 -0
- package/src/package-checks/file-metrics/options-validation.ts +104 -0
- package/src/package-checks/file-metrics/options.ts +91 -0
- package/src/package-checks/file-metrics/records.ts +182 -0
- package/src/package-checks/file-metrics/scc/availability.ts +100 -0
- package/src/package-checks/file-metrics/scc/csv.ts +20 -0
- package/src/package-checks/file-metrics/scc/parser.ts +223 -0
- package/src/package-checks/file-metrics/scc/scanner.ts +68 -0
- package/src/package-checks/final-data-parsing.ts +49 -0
- package/src/package-checks/function-metrics/analysis.ts +138 -0
- package/src/package-checks/function-metrics/constructor.ts +55 -0
- package/src/package-checks/function-metrics/execution.ts +263 -0
- package/src/package-checks/function-metrics/final-data.ts +10 -0
- package/src/package-checks/function-metrics/lizard/availability.ts +90 -0
- package/src/package-checks/function-metrics/lizard/csv.ts +20 -0
- package/src/package-checks/function-metrics/lizard/parser.ts +179 -0
- package/src/package-checks/function-metrics/lizard/scanner.ts +62 -0
- package/src/package-checks/function-metrics/measurement-model.ts +30 -0
- package/src/package-checks/function-metrics/measurement.ts +57 -0
- package/src/package-checks/function-metrics/options-resolution.ts +215 -0
- package/src/package-checks/function-metrics/options-validation.ts +89 -0
- package/src/package-checks/function-metrics/options.ts +84 -0
- package/src/package-checks/function-metrics/records.ts +254 -0
- package/src/package-checks/function-metrics/target-files.ts +85 -0
- package/src/package-checks/host-environment/error-message.ts +3 -0
- package/src/package-checks/host-environment/filesystem.ts +110 -0
- package/src/package-checks/host-environment/git.ts +68 -0
- package/src/package-checks/host-environment/path.ts +20 -0
- package/src/package-checks/host-environment/process/command.ts +21 -0
- package/src/package-checks/host-environment/process/contract.ts +56 -0
- package/src/package-checks/host-environment/process/env.ts +25 -0
- package/src/package-checks/host-environment/process/failure.ts +40 -0
- package/src/package-checks/host-environment/process/result.ts +39 -0
- package/src/package-checks/host-environment/process/runner.ts +47 -0
- package/src/package-checks/json-document/strict-document.ts +209 -0
- package/src/package-checks/json-schema-validation/default-check.ts +54 -0
- package/src/package-checks/json-schema-validation/execution-stages.ts +230 -0
- package/src/package-checks/json-schema-validation/final-data.ts +115 -0
- package/src/package-checks/json-schema-validation/issue-collector.ts +43 -0
- package/src/package-checks/json-schema-validation/json-schema-validation.ts +191 -0
- package/src/package-checks/json-schema-validation/options-resolution.ts +61 -0
- package/src/package-checks/json-schema-validation/options-validation.ts +256 -0
- package/src/package-checks/json-schema-validation/options.ts +66 -0
- package/src/package-checks/json-schema-validation/reference-resolver.ts +165 -0
- package/src/package-checks/json-schema-validation/remote-response.ts +84 -0
- package/src/package-checks/json-schema-validation/schema-engine.ts +263 -0
- package/src/package-checks/json-schema-validation/schema-policy.ts +275 -0
- package/src/package-checks/json-validation/default-check.ts +48 -0
- package/src/package-checks/json-validation/final-data.ts +46 -0
- package/src/package-checks/json-validation/json-validation.ts +212 -0
- package/src/package-checks/json-validation/options-resolution.ts +50 -0
- package/src/package-checks/json-validation/options-validation.ts +27 -0
- package/src/package-checks/json-validation/options.ts +18 -0
- package/src/package-checks/maintenance-reminders/assessment-results.ts +117 -0
- package/src/package-checks/maintenance-reminders/final-data.ts +239 -0
- package/src/package-checks/maintenance-reminders/maintenance-reminders.ts +264 -0
- package/src/package-checks/maintenance-reminders/maintenance-support.ts +67 -0
- package/src/package-checks/maintenance-reminders/measurement.ts +183 -0
- package/src/package-checks/maintenance-reminders/options-validation.ts +88 -0
- package/src/package-checks/markdown-link-validation/default-check.ts +70 -0
- package/src/package-checks/markdown-link-validation/execution.ts +325 -0
- package/src/package-checks/markdown-link-validation/filesystem-probes.ts +127 -0
- package/src/package-checks/markdown-link-validation/final-data.ts +47 -0
- package/src/package-checks/markdown-link-validation/local-resolution.ts +306 -0
- package/src/package-checks/markdown-link-validation/local-resolver.ts +51 -0
- package/src/package-checks/markdown-link-validation/markdown-parser.ts +302 -0
- package/src/package-checks/markdown-link-validation/options-resolution.ts +114 -0
- package/src/package-checks/markdown-link-validation/options-validation.ts +72 -0
- package/src/package-checks/markdown-link-validation/options.ts +50 -0
- package/src/package-checks/markdown-link-validation/records.ts +77 -0
- package/src/package-checks/markdown-link-validation/resolver-engine.ts +276 -0
- package/src/package-checks/markdown-link-validation/target-descriptor.ts +34 -0
- package/src/package-checks/markdown-link-validation/traversal-result.ts +58 -0
- package/src/package-checks/project-files/collection.ts +199 -0
- package/src/package-checks/project-files/config-glob.ts +17 -0
- package/src/package-checks/project-files/configuration.ts +152 -0
- package/src/package-checks/project-files/exact-input-measurement.ts +38 -0
- package/src/package-checks/project-files/file-fingerprint.ts +46 -0
- package/src/package-checks/project-files/gitlink-revision.ts +82 -0
- package/src/package-checks/project-files/gitlink-worktree.ts +106 -0
- package/src/package-checks/project-files/input-eligibility.ts +21 -0
- package/src/package-checks/project-files/reported-path.ts +35 -0
- package/src/package-checks/project-files/revision-paths.ts +34 -0
- package/src/package-checks/project-files/revision-worktree-files.ts +148 -0
- package/src/project-definition/check-tree/authoring.ts +332 -0
- package/src/project-definition/check-tree/materialization.ts +56 -0
- package/src/project-definition/check-tree/resolution.ts +108 -0
- package/src/project-definition/output-defaults.ts +6 -0
- package/src/project-definition/output-validation.ts +54 -0
- package/src/project-definition/project-definition-validation.ts +123 -0
- package/src/project-definition/project-definition.ts +184 -0
- package/src/project-run/aggregation.ts +90 -0
- package/src/project-run/check-execution/callback.ts +106 -0
- package/src/project-run/check-execution/dependencies.ts +70 -0
- package/src/project-run/check-execution/execution-finalization.ts +177 -0
- package/src/project-run/check-execution/execution-settlement.ts +147 -0
- package/src/project-run/check-execution/messages.ts +46 -0
- package/src/project-run/check-execution/plan.ts +46 -0
- package/src/project-run/check-execution/preflight-result.ts +131 -0
- package/src/project-run/check-execution/preflight.ts +321 -0
- package/src/project-run/check-execution/resolved-checks.ts +285 -0
- package/src/project-run/check-execution/terminal-result.ts +74 -0
- package/src/project-run/completion.ts +263 -0
- package/src/project-run/controls/contract.ts +24 -0
- package/src/project-run/controls/outputs-override-validation.ts +86 -0
- package/src/project-run/controls/validation-result.ts +12 -0
- package/src/project-run/controls/validation.ts +176 -0
- package/src/project-run/diagnostic-logging/diagnostic-detail-rendering.ts +223 -0
- package/src/project-run/diagnostic-logging/logger.ts +325 -0
- package/src/project-run/invocation-creation.ts +160 -0
- package/src/project-run/invocation.ts +303 -0
- package/src/project-run/machine-publication.ts +23 -0
- package/src/project-run/output-configuration.ts +24 -0
- package/src/project-run/output-status.ts +69 -0
- package/src/project-run/progress-rendering/presentation.ts +189 -0
- package/src/project-run/progress-rendering/renderer-formatting.ts +141 -0
- package/src/project-run/progress-rendering/renderer-lifecycle.ts +152 -0
- package/src/project-run/progress-rendering/renderer.ts +68 -0
- package/src/project-run/project-context.ts +11 -0
- package/src/project-run/result.ts +175 -0
- package/src/project-run/run.ts +50 -0
- package/src/project-run/task-scheduler/execution-state.ts +153 -0
- package/src/project-run/task-scheduler/graph-validation.ts +176 -0
- package/src/project-run/task-scheduler/graph.ts +185 -0
- package/src/project-run/task-scheduler/scheduler-admission-decision.ts +177 -0
- package/src/project-run/task-scheduler/scheduler-blocker-summary.ts +42 -0
- package/src/project-run/task-scheduler/scheduler-decision-inspection.ts +199 -0
- package/src/project-run/task-scheduler/scheduler-decision-model.ts +158 -0
- package/src/project-run/task-scheduler/scheduler-decision.ts +103 -0
- package/src/project-run/task-scheduler/scheduler.ts +228 -0
- package/third-party-licenses/momoa-3.3.12-LICENSE +201 -0
- package/types/check/check.d.ts +350 -0
- package/types/check/descriptor-validation.d.ts +18 -0
- package/types/check/descriptor.d.ts +5 -0
- package/types/check/inherited-collection.d.ts +35 -0
- package/types/check/options-snapshot.d.ts +2 -0
- package/types/check-settlement/fact-validation.d.ts +14 -0
- package/types/check-settlement/facts.d.ts +19 -0
- package/types/check-settlement/outcome-normalization.d.ts +9 -0
- package/types/check-settlement/record-store.d.ts +14 -0
- package/types/check-settlement/session.d.ts +41 -0
- package/types/data-boundary/canonical-data.d.ts +13 -0
- package/types/data-boundary/canonical-json.d.ts +6 -0
- package/types/data-boundary/closed-values.d.ts +8 -0
- package/types/data-boundary/value-shapes.d.ts +4 -0
- package/types/finding-waivers/reconciliation.d.ts +66 -0
- package/types/index.d.ts +57 -0
- package/types/machine-output/v4/atomic-publication.d.ts +9 -0
- package/types/machine-output/v4/freeze-publication-value.d.ts +6 -0
- package/types/machine-output/v4/projection.d.ts +7 -0
- package/types/machine-output/v4/publication-invariants.d.ts +3 -0
- package/types/machine-output/v4/publication-model.d.ts +15 -0
- package/types/machine-output/v4/publish.d.ts +7 -0
- package/types/machine-output/v4/records-fingerprint.d.ts +4 -0
- package/types/machine-output/v4/schema-identities.d.ts +7 -0
- package/types/machine-output/v4/schema.d.ts +44 -0
- package/types/machine-output/v4/serializers.d.ts +6 -0
- package/types/machine-output/v4/validation-result.d.ts +26 -0
- package/types/machine-output/v4/validation.d.ts +6 -0
- package/types/package-checks/code-quality-findings/policy.d.ts +20 -0
- package/types/package-checks/duplicate-detection/area-policy.d.ts +3 -0
- package/types/package-checks/duplicate-detection/cache/cache-contract.d.ts +48 -0
- package/types/package-checks/duplicate-detection/cache/identity.d.ts +17 -0
- package/types/package-checks/duplicate-detection/cache/key.d.ts +4 -0
- package/types/package-checks/duplicate-detection/cache/payload.d.ts +4 -0
- package/types/package-checks/duplicate-detection/cache/store.d.ts +18 -0
- package/types/package-checks/duplicate-detection/default-check.d.ts +11 -0
- package/types/package-checks/duplicate-detection/execution.d.ts +11 -0
- package/types/package-checks/duplicate-detection/final-data.d.ts +5 -0
- package/types/package-checks/duplicate-detection/jscpd/availability.d.ts +19 -0
- package/types/package-checks/duplicate-detection/jscpd/command-path.d.ts +1 -0
- package/types/package-checks/duplicate-detection/jscpd/command-resolution.d.ts +23 -0
- package/types/package-checks/duplicate-detection/jscpd/json-report.d.ts +2 -0
- package/types/package-checks/duplicate-detection/jscpd/scanner-contract.d.ts +11 -0
- package/types/package-checks/duplicate-detection/jscpd/scanner.d.ts +21 -0
- package/types/package-checks/duplicate-detection/jscpd/scoped-fragments.d.ts +4 -0
- package/types/package-checks/duplicate-detection/measurement-model.d.ts +36 -0
- package/types/package-checks/duplicate-detection/measurement.d.ts +14 -0
- package/types/package-checks/duplicate-detection/options-resolution.d.ts +3 -0
- package/types/package-checks/duplicate-detection/options-validation.d.ts +1 -0
- package/types/package-checks/duplicate-detection/options.d.ts +65 -0
- package/types/package-checks/duplicate-detection/project-revision.d.ts +1 -0
- package/types/package-checks/duplicate-detection/records.d.ts +22 -0
- package/types/package-checks/file-metrics/constructor.d.ts +11 -0
- package/types/package-checks/file-metrics/execution.d.ts +11 -0
- package/types/package-checks/file-metrics/final-data.d.ts +5 -0
- package/types/package-checks/file-metrics/measurement-model.d.ts +12 -0
- package/types/package-checks/file-metrics/measurement.d.ts +13 -0
- package/types/package-checks/file-metrics/options-resolution.d.ts +3 -0
- package/types/package-checks/file-metrics/options-validation.d.ts +3 -0
- package/types/package-checks/file-metrics/options.d.ts +75 -0
- package/types/package-checks/file-metrics/records.d.ts +43 -0
- package/types/package-checks/file-metrics/scc/availability.d.ts +18 -0
- package/types/package-checks/file-metrics/scc/csv.d.ts +1 -0
- package/types/package-checks/file-metrics/scc/parser.d.ts +25 -0
- package/types/package-checks/file-metrics/scc/scanner.d.ts +14 -0
- package/types/package-checks/final-data-parsing.d.ts +9 -0
- package/types/package-checks/function-metrics/analysis.d.ts +10 -0
- package/types/package-checks/function-metrics/constructor.d.ts +11 -0
- package/types/package-checks/function-metrics/execution.d.ts +7 -0
- package/types/package-checks/function-metrics/final-data.d.ts +5 -0
- package/types/package-checks/function-metrics/lizard/availability.d.ts +11 -0
- package/types/package-checks/function-metrics/lizard/csv.d.ts +1 -0
- package/types/package-checks/function-metrics/lizard/parser.d.ts +17 -0
- package/types/package-checks/function-metrics/lizard/scanner.d.ts +15 -0
- package/types/package-checks/function-metrics/measurement-model.d.ts +26 -0
- package/types/package-checks/function-metrics/measurement.d.ts +21 -0
- package/types/package-checks/function-metrics/options-resolution.d.ts +3 -0
- package/types/package-checks/function-metrics/options-validation.d.ts +3 -0
- package/types/package-checks/function-metrics/options.d.ts +76 -0
- package/types/package-checks/function-metrics/records.d.ts +37 -0
- package/types/package-checks/function-metrics/target-files.d.ts +3 -0
- package/types/package-checks/host-environment/error-message.d.ts +1 -0
- package/types/package-checks/host-environment/filesystem.d.ts +19 -0
- package/types/package-checks/host-environment/git.d.ts +13 -0
- package/types/package-checks/host-environment/path.d.ts +3 -0
- package/types/package-checks/host-environment/process/command.d.ts +7 -0
- package/types/package-checks/host-environment/process/contract.d.ts +50 -0
- package/types/package-checks/host-environment/process/env.d.ts +16 -0
- package/types/package-checks/host-environment/process/failure.d.ts +4 -0
- package/types/package-checks/host-environment/process/result.d.ts +2 -0
- package/types/package-checks/host-environment/process/runner.d.ts +3 -0
- package/types/package-checks/json-document/strict-document.d.ts +35 -0
- package/types/package-checks/json-schema-validation/default-check.d.ts +11 -0
- package/types/package-checks/json-schema-validation/execution-stages.d.ts +27 -0
- package/types/package-checks/json-schema-validation/final-data.d.ts +15 -0
- package/types/package-checks/json-schema-validation/issue-collector.d.ts +12 -0
- package/types/package-checks/json-schema-validation/json-schema-validation.d.ts +42 -0
- package/types/package-checks/json-schema-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/json-schema-validation/options-validation.d.ts +2 -0
- package/types/package-checks/json-schema-validation/options.d.ts +53 -0
- package/types/package-checks/json-schema-validation/reference-resolver.d.ts +23 -0
- package/types/package-checks/json-schema-validation/remote-response.d.ts +2 -0
- package/types/package-checks/json-schema-validation/schema-engine.d.ts +33 -0
- package/types/package-checks/json-schema-validation/schema-policy.d.ts +17 -0
- package/types/package-checks/json-validation/default-check.d.ts +11 -0
- package/types/package-checks/json-validation/final-data.d.ts +10 -0
- package/types/package-checks/json-validation/json-validation.d.ts +28 -0
- package/types/package-checks/json-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/json-validation/options-validation.d.ts +2 -0
- package/types/package-checks/json-validation/options.d.ts +13 -0
- package/types/package-checks/maintenance-reminders/assessment-results.d.ts +10 -0
- package/types/package-checks/maintenance-reminders/final-data.d.ts +47 -0
- package/types/package-checks/maintenance-reminders/maintenance-reminders.d.ts +111 -0
- package/types/package-checks/maintenance-reminders/maintenance-support.d.ts +7 -0
- package/types/package-checks/maintenance-reminders/measurement.d.ts +10 -0
- package/types/package-checks/maintenance-reminders/options-validation.d.ts +3 -0
- package/types/package-checks/markdown-link-validation/default-check.d.ts +27 -0
- package/types/package-checks/markdown-link-validation/execution.d.ts +12 -0
- package/types/package-checks/markdown-link-validation/filesystem-probes.d.ts +10 -0
- package/types/package-checks/markdown-link-validation/final-data.d.ts +10 -0
- package/types/package-checks/markdown-link-validation/local-resolution.d.ts +92 -0
- package/types/package-checks/markdown-link-validation/local-resolver.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/markdown-parser.d.ts +37 -0
- package/types/package-checks/markdown-link-validation/options-resolution.d.ts +3 -0
- package/types/package-checks/markdown-link-validation/options-validation.d.ts +2 -0
- package/types/package-checks/markdown-link-validation/options.d.ts +43 -0
- package/types/package-checks/markdown-link-validation/records.d.ts +37 -0
- package/types/package-checks/markdown-link-validation/resolver-engine.d.ts +15 -0
- package/types/package-checks/markdown-link-validation/target-descriptor.d.ts +5 -0
- package/types/package-checks/markdown-link-validation/traversal-result.d.ts +12 -0
- package/types/package-checks/project-files/collection.d.ts +9 -0
- package/types/package-checks/project-files/config-glob.d.ts +5 -0
- package/types/package-checks/project-files/configuration.d.ts +31 -0
- package/types/package-checks/project-files/exact-input-measurement.d.ts +12 -0
- package/types/package-checks/project-files/file-fingerprint.d.ts +7 -0
- package/types/package-checks/project-files/gitlink-revision.d.ts +9 -0
- package/types/package-checks/project-files/gitlink-worktree.d.ts +26 -0
- package/types/package-checks/project-files/input-eligibility.d.ts +7 -0
- package/types/package-checks/project-files/reported-path.d.ts +1 -0
- package/types/package-checks/project-files/revision-paths.d.ts +12 -0
- package/types/package-checks/project-files/revision-worktree-files.d.ts +5 -0
- package/types/project-definition/check-tree/authoring.d.ts +41 -0
- package/types/project-definition/check-tree/materialization.d.ts +4 -0
- package/types/project-definition/check-tree/resolution.d.ts +25 -0
- package/types/project-definition/output-defaults.d.ts +14 -0
- package/types/project-definition/output-validation.d.ts +3 -0
- package/types/project-definition/project-definition-validation.d.ts +6 -0
- package/types/project-definition/project-definition.d.ts +88 -0
- package/types/project-run/aggregation.d.ts +7 -0
- package/types/project-run/check-execution/callback.d.ts +24 -0
- package/types/project-run/check-execution/dependencies.d.ts +9 -0
- package/types/project-run/check-execution/execution-finalization.d.ts +18 -0
- package/types/project-run/check-execution/execution-settlement.d.ts +41 -0
- package/types/project-run/check-execution/messages.d.ts +3 -0
- package/types/project-run/check-execution/plan.d.ts +10 -0
- package/types/project-run/check-execution/preflight-result.d.ts +23 -0
- package/types/project-run/check-execution/preflight.d.ts +27 -0
- package/types/project-run/check-execution/resolved-checks.d.ts +51 -0
- package/types/project-run/check-execution/terminal-result.d.ts +27 -0
- package/types/project-run/completion.d.ts +14 -0
- package/types/project-run/controls/contract.d.ts +24 -0
- package/types/project-run/controls/outputs-override-validation.d.ts +3 -0
- package/types/project-run/controls/validation-result.d.ts +14 -0
- package/types/project-run/controls/validation.d.ts +3 -0
- package/types/project-run/diagnostic-logging/diagnostic-detail-rendering.d.ts +11 -0
- package/types/project-run/diagnostic-logging/logger.d.ts +33 -0
- package/types/project-run/invocation-creation.d.ts +12 -0
- package/types/project-run/invocation.d.ts +34 -0
- package/types/project-run/machine-publication.d.ts +10 -0
- package/types/project-run/output-configuration.d.ts +3 -0
- package/types/project-run/output-status.d.ts +21 -0
- package/types/project-run/progress-rendering/presentation.d.ts +28 -0
- package/types/project-run/progress-rendering/renderer-formatting.d.ts +23 -0
- package/types/project-run/progress-rendering/renderer-lifecycle.d.ts +24 -0
- package/types/project-run/progress-rendering/renderer.d.ts +44 -0
- package/types/project-run/project-context.d.ts +7 -0
- package/types/project-run/result.d.ts +99 -0
- package/types/project-run/run.d.ts +18 -0
- package/types/project-run/task-scheduler/execution-state.d.ts +67 -0
- package/types/project-run/task-scheduler/graph-validation.d.ts +11 -0
- package/types/project-run/task-scheduler/graph.d.ts +40 -0
- package/types/project-run/task-scheduler/scheduler-admission-decision.d.ts +8 -0
- package/types/project-run/task-scheduler/scheduler-blocker-summary.d.ts +4 -0
- package/types/project-run/task-scheduler/scheduler-decision-inspection.d.ts +24 -0
- package/types/project-run/task-scheduler/scheduler-decision-model.d.ts +94 -0
- package/types/project-run/task-scheduler/scheduler-decision.d.ts +8 -0
- package/types/project-run/task-scheduler/scheduler.d.ts +3 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import Type from "typebox";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
MACHINE_RECORD_V4_IDENTITY,
|
|
5
|
+
MACHINE_RECORD_V4_SCHEMA_ID,
|
|
6
|
+
MACHINE_RUN_V4_IDENTITY,
|
|
7
|
+
MACHINE_RUN_V4_SCHEMA_ID,
|
|
8
|
+
MACHINE_V4_TIMESTAMP_PATTERN
|
|
9
|
+
} from "./schema-identities.ts";
|
|
10
|
+
|
|
11
|
+
const NonEmptyString = Type.String({ minLength: 1 });
|
|
12
|
+
const NonEmptyCheckId = Type.String({ minLength: 1 });
|
|
13
|
+
const CanonicalJsonObject = Type.Record(Type.String(), Type.Any());
|
|
14
|
+
const NotApplicableReason = Type.Object({ code: NonEmptyString }, { additionalProperties: false });
|
|
15
|
+
const UnavailableReason = Type.Object(
|
|
16
|
+
{
|
|
17
|
+
checkIds: Type.Optional(Type.Array(NonEmptyCheckId, { minItems: 1 })),
|
|
18
|
+
code: NonEmptyString
|
|
19
|
+
},
|
|
20
|
+
{ additionalProperties: false }
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const CheckOutcomeSchema = Type.Union([
|
|
24
|
+
Type.Object(
|
|
25
|
+
{ data: CanonicalJsonObject, status: Type.Literal("passed") },
|
|
26
|
+
{ additionalProperties: false }
|
|
27
|
+
),
|
|
28
|
+
Type.Object(
|
|
29
|
+
{ data: CanonicalJsonObject, status: Type.Literal("failed") },
|
|
30
|
+
{ additionalProperties: false }
|
|
31
|
+
),
|
|
32
|
+
Type.Object(
|
|
33
|
+
{ reason: Type.Optional(NotApplicableReason), status: Type.Literal("not-applicable") },
|
|
34
|
+
{ additionalProperties: false }
|
|
35
|
+
),
|
|
36
|
+
Type.Object(
|
|
37
|
+
{ reason: UnavailableReason, status: Type.Literal("unavailable") },
|
|
38
|
+
{ additionalProperties: false }
|
|
39
|
+
)
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
const PublishedCheckSchema = Type.Object(
|
|
43
|
+
{
|
|
44
|
+
checkId: NonEmptyCheckId,
|
|
45
|
+
displayName: NonEmptyString,
|
|
46
|
+
outcome: CheckOutcomeSchema
|
|
47
|
+
},
|
|
48
|
+
{ additionalProperties: false }
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export const MACHINE_RECORD_V4_SCHEMA = Type.Object(
|
|
52
|
+
{
|
|
53
|
+
checkId: NonEmptyCheckId,
|
|
54
|
+
data: CanonicalJsonObject,
|
|
55
|
+
id: NonEmptyString,
|
|
56
|
+
schemaVersion: Type.Literal(MACHINE_RECORD_V4_IDENTITY)
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
$id: MACHINE_RECORD_V4_SCHEMA_ID,
|
|
60
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
61
|
+
additionalProperties: false,
|
|
62
|
+
title: "Vibe Check machine record v4"
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export const MACHINE_RUN_V4_SCHEMA = Type.Object(
|
|
67
|
+
{
|
|
68
|
+
checks: Type.Array(PublishedCheckSchema),
|
|
69
|
+
invocation: Type.Object(
|
|
70
|
+
{
|
|
71
|
+
invocationId: NonEmptyString,
|
|
72
|
+
projectRoot: Type.Literal("."),
|
|
73
|
+
timestamp: Type.String({ pattern: MACHINE_V4_TIMESTAMP_PATTERN })
|
|
74
|
+
},
|
|
75
|
+
{ additionalProperties: false }
|
|
76
|
+
),
|
|
77
|
+
recordsFingerprint: Type.String({
|
|
78
|
+
pattern: "^check-record/v2/records/sha256:[a-f0-9]{64}$"
|
|
79
|
+
}),
|
|
80
|
+
schemaVersion: Type.Literal(MACHINE_RUN_V4_IDENTITY)
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
$id: MACHINE_RUN_V4_SCHEMA_ID,
|
|
84
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
title: "Vibe Check machine run v4"
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
type DeepReadonly<Value> = Value extends readonly (infer Item)[]
|
|
91
|
+
? readonly DeepReadonly<Item>[]
|
|
92
|
+
: Value extends object
|
|
93
|
+
? { readonly [Key in keyof Value]: DeepReadonly<Value[Key]> }
|
|
94
|
+
: Value;
|
|
95
|
+
|
|
96
|
+
export type MachineRecordV4 = DeepReadonly<Type.Static<typeof MACHINE_RECORD_V4_SCHEMA>>;
|
|
97
|
+
export type MachineRunV4 = DeepReadonly<Type.Static<typeof MACHINE_RUN_V4_SCHEMA>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { MachinePublicationV4 } from "./projection.ts";
|
|
2
|
+
|
|
3
|
+
export interface MachinePublicationCandidatesV4 {
|
|
4
|
+
readonly recordsNdjson: string;
|
|
5
|
+
readonly runJson: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function serializeMachinePublicationV4(
|
|
9
|
+
publication: MachinePublicationV4
|
|
10
|
+
): MachinePublicationCandidatesV4 {
|
|
11
|
+
return Object.freeze({
|
|
12
|
+
runJson: JSON.stringify(publication.run, null, 2),
|
|
13
|
+
recordsNdjson:
|
|
14
|
+
publication.records.length === 0
|
|
15
|
+
? ""
|
|
16
|
+
: `${publication.records.map((record) => JSON.stringify(record)).join("\n")}\n`
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { MachinePublicationV4 } from "./projection.ts";
|
|
2
|
+
|
|
3
|
+
export type MachinePublicationValidationCategory =
|
|
4
|
+
| "decoding"
|
|
5
|
+
| "framing"
|
|
6
|
+
| "schema"
|
|
7
|
+
| "set-invariant"
|
|
8
|
+
| "syntax";
|
|
9
|
+
|
|
10
|
+
export type MachinePublicationSetRelationship =
|
|
11
|
+
| "check-canonical-order"
|
|
12
|
+
| "core-snapshot"
|
|
13
|
+
| "record-canonical-order"
|
|
14
|
+
| "record-check-ownership"
|
|
15
|
+
| "records-fingerprint";
|
|
16
|
+
|
|
17
|
+
export interface MachinePublicationValidationDiagnostic {
|
|
18
|
+
readonly category: MachinePublicationValidationCategory;
|
|
19
|
+
readonly index?: number;
|
|
20
|
+
readonly line?: number;
|
|
21
|
+
readonly logicalArtifact: "records.ndjson" | "run.json";
|
|
22
|
+
readonly message: string;
|
|
23
|
+
readonly pointer?: string;
|
|
24
|
+
readonly relationship?: MachinePublicationSetRelationship;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type MachinePublicationValidationResult = Readonly<
|
|
28
|
+
ValidationFailure | { ok: true; value: MachinePublicationV4 }
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export interface ValidationFailure {
|
|
32
|
+
readonly ok: false;
|
|
33
|
+
readonly diagnostic: MachinePublicationValidationDiagnostic;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function validationSuccess<Value>(value: Value): { ok: true; value: Value } {
|
|
37
|
+
return { ok: true, value };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function validationFailure(
|
|
41
|
+
diagnostic: MachinePublicationValidationDiagnostic
|
|
42
|
+
): ValidationFailure {
|
|
43
|
+
return { ok: false, diagnostic };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function setInvariantFailure(
|
|
47
|
+
relationship: MachinePublicationSetRelationship,
|
|
48
|
+
logicalArtifact: MachinePublicationValidationDiagnostic["logicalArtifact"],
|
|
49
|
+
message: string,
|
|
50
|
+
index?: number
|
|
51
|
+
): ValidationFailure {
|
|
52
|
+
return validationFailure({
|
|
53
|
+
category: "set-invariant",
|
|
54
|
+
...(index === undefined ? {} : { index, line: index + 1 }),
|
|
55
|
+
logicalArtifact,
|
|
56
|
+
message,
|
|
57
|
+
relationship
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import Value from "typebox/value";
|
|
2
|
+
|
|
3
|
+
import type { MachinePublicationV4 } from "./projection.ts";
|
|
4
|
+
import { freezePublicationValue } from "./freeze-publication-value.ts";
|
|
5
|
+
import { validatePublicationInvariants } from "./publication-invariants.ts";
|
|
6
|
+
import {
|
|
7
|
+
MACHINE_RECORD_V4_SCHEMA,
|
|
8
|
+
MACHINE_RUN_V4_SCHEMA,
|
|
9
|
+
type MachineRecordV4,
|
|
10
|
+
type MachineRunV4
|
|
11
|
+
} from "./schema.ts";
|
|
12
|
+
import {
|
|
13
|
+
validationFailure,
|
|
14
|
+
validationSuccess,
|
|
15
|
+
type MachinePublicationValidationDiagnostic,
|
|
16
|
+
type MachinePublicationValidationResult
|
|
17
|
+
} from "./validation-result.ts";
|
|
18
|
+
|
|
19
|
+
export type {
|
|
20
|
+
MachinePublicationSetRelationship,
|
|
21
|
+
MachinePublicationValidationCategory,
|
|
22
|
+
MachinePublicationValidationDiagnostic,
|
|
23
|
+
MachinePublicationValidationResult
|
|
24
|
+
} from "./validation-result.ts";
|
|
25
|
+
|
|
26
|
+
type Parsed<Value> = Readonly<
|
|
27
|
+
{ ok: false; diagnostic: MachinePublicationValidationDiagnostic } | { ok: true; value: Value }
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export function validateMachinePublicationSetV4(
|
|
31
|
+
input: Readonly<{
|
|
32
|
+
recordsNdjson: Uint8Array;
|
|
33
|
+
runJson: Uint8Array;
|
|
34
|
+
}>
|
|
35
|
+
): MachinePublicationValidationResult {
|
|
36
|
+
const runResult = parseRun(input.runJson);
|
|
37
|
+
if (!runResult.ok) return runResult;
|
|
38
|
+
const recordsResult = parseRecords(input.recordsNdjson);
|
|
39
|
+
if (!recordsResult.ok) return recordsResult;
|
|
40
|
+
const invariant = validatePublicationInvariants(runResult.value, recordsResult.value);
|
|
41
|
+
return (
|
|
42
|
+
invariant ??
|
|
43
|
+
validationSuccess(
|
|
44
|
+
Object.freeze({
|
|
45
|
+
run: freezePublicationValue(runResult.value),
|
|
46
|
+
records: freezePublicationValue(recordsResult.value)
|
|
47
|
+
}) satisfies MachinePublicationV4
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function parseRun(bytes: Uint8Array): Parsed<MachineRunV4> {
|
|
53
|
+
const decoded = decode(bytes, "run.json");
|
|
54
|
+
if (!decoded.ok) return decoded;
|
|
55
|
+
const parsed = parseJson(decoded.value, {
|
|
56
|
+
logicalArtifact: "run.json",
|
|
57
|
+
message: "Run artifact must contain exactly one JSON value."
|
|
58
|
+
});
|
|
59
|
+
if (!parsed.ok) return parsed;
|
|
60
|
+
if (!Value.Check(MACHINE_RUN_V4_SCHEMA, parsed.value)) {
|
|
61
|
+
const error = Value.Errors(MACHINE_RUN_V4_SCHEMA, parsed.value)[0];
|
|
62
|
+
return validationFailure({
|
|
63
|
+
category: "schema",
|
|
64
|
+
logicalArtifact: "run.json",
|
|
65
|
+
message: "Run artifact does not match the machine run v4 schema.",
|
|
66
|
+
pointer: error?.instancePath ?? ""
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return validationSuccess(parsed.value);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function parseRecords(bytes: Uint8Array): Parsed<MachineRecordV4[]> {
|
|
73
|
+
if (bytes.byteLength === 0) return validationSuccess([]);
|
|
74
|
+
if (bytes[bytes.byteLength - 1] !== 0x0a) {
|
|
75
|
+
return validationFailure({
|
|
76
|
+
category: "framing",
|
|
77
|
+
line: countLf(bytes) + 1,
|
|
78
|
+
logicalArtifact: "records.ndjson",
|
|
79
|
+
message: "Non-empty record stream must end with exactly one LF."
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
const decoded = decode(bytes, "records.ndjson");
|
|
83
|
+
if (!decoded.ok) return decoded;
|
|
84
|
+
return parseRecordSegments(decoded.value.slice(0, -1).split("\n"));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function parseRecordSegments(segments: readonly string[]): Parsed<MachineRecordV4[]> {
|
|
88
|
+
const records: MachineRecordV4[] = [];
|
|
89
|
+
for (const [index, segment] of segments.entries()) {
|
|
90
|
+
const framingFailure = validateRecordSegment(segment, index);
|
|
91
|
+
if (framingFailure !== null) return framingFailure;
|
|
92
|
+
const parsed = parseJson(segment, {
|
|
93
|
+
index,
|
|
94
|
+
line: index + 1,
|
|
95
|
+
logicalArtifact: "records.ndjson",
|
|
96
|
+
message: "Record segment must contain exactly one JSON value."
|
|
97
|
+
});
|
|
98
|
+
if (!parsed.ok) return parsed;
|
|
99
|
+
if (!Value.Check(MACHINE_RECORD_V4_SCHEMA, parsed.value)) {
|
|
100
|
+
const error = Value.Errors(MACHINE_RECORD_V4_SCHEMA, parsed.value)[0];
|
|
101
|
+
return validationFailure({
|
|
102
|
+
category: "schema",
|
|
103
|
+
index,
|
|
104
|
+
line: index + 1,
|
|
105
|
+
logicalArtifact: "records.ndjson",
|
|
106
|
+
message: "Record does not match the machine record v4 schema.",
|
|
107
|
+
pointer: error?.instancePath ?? ""
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
records.push(parsed.value);
|
|
111
|
+
}
|
|
112
|
+
return validationSuccess(records);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function validateRecordSegment(
|
|
116
|
+
segment: string,
|
|
117
|
+
index: number
|
|
118
|
+
): Extract<Parsed<never>, { ok: false }> | null {
|
|
119
|
+
if (segment.length > 0 && !/^[\t\r ]+$/.test(segment)) return null;
|
|
120
|
+
return validationFailure({
|
|
121
|
+
category: "framing",
|
|
122
|
+
index,
|
|
123
|
+
line: index + 1,
|
|
124
|
+
logicalArtifact: "records.ndjson",
|
|
125
|
+
message: "Record segment must not be empty or whitespace-only."
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function parseJson(
|
|
130
|
+
text: string,
|
|
131
|
+
diagnostic: Omit<MachinePublicationValidationDiagnostic, "category">
|
|
132
|
+
): Parsed<unknown> {
|
|
133
|
+
try {
|
|
134
|
+
return validationSuccess(JSON.parse(text) as unknown);
|
|
135
|
+
} catch {
|
|
136
|
+
return validationFailure({ category: "syntax", ...diagnostic });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function decode(
|
|
141
|
+
bytes: Uint8Array,
|
|
142
|
+
logicalArtifact: MachinePublicationValidationDiagnostic["logicalArtifact"]
|
|
143
|
+
): Parsed<string> {
|
|
144
|
+
if (bytes[0] === 0xef && bytes[1] === 0xbb && bytes[2] === 0xbf) {
|
|
145
|
+
return validationFailure({
|
|
146
|
+
category: "decoding",
|
|
147
|
+
logicalArtifact,
|
|
148
|
+
message: "Leading UTF-8 BOM is not allowed."
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
return validationSuccess(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
153
|
+
} catch {
|
|
154
|
+
return validationFailure({
|
|
155
|
+
category: "decoding",
|
|
156
|
+
logicalArtifact,
|
|
157
|
+
message: "Input is not valid UTF-8."
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function countLf(bytes: Uint8Array): number {
|
|
163
|
+
let count = 0;
|
|
164
|
+
for (const byte of bytes) if (byte === 0x0a) count += 1;
|
|
165
|
+
return count;
|
|
166
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { CheckMessage, CheckResult } from "../../check/check.ts";
|
|
2
|
+
|
|
3
|
+
export const FINDING_POLICIES = Object.freeze(["blocking", "non-blocking"] as const);
|
|
4
|
+
|
|
5
|
+
/** package-provided Check 用于结算 normal finding 的阻断策略。 */
|
|
6
|
+
export type FindingPolicy = (typeof FINDING_POLICIES)[number];
|
|
7
|
+
|
|
8
|
+
export const DEFAULT_FINDING_POLICY: FindingPolicy = "non-blocking";
|
|
9
|
+
|
|
10
|
+
/** 三个代码质量 Check 正常完成时返回的精确 finding 计数。 */
|
|
11
|
+
export interface FindingSummary {
|
|
12
|
+
readonly blockingFindingCount: number;
|
|
13
|
+
readonly findingCount: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** 一项 finding 在 Check 自己结算前的领域中性处置。 */
|
|
17
|
+
export interface FindingSettlement {
|
|
18
|
+
/** 该 finding 是否仍需要进入该 Check 的正常 finding 结算。 */
|
|
19
|
+
readonly actionable: boolean;
|
|
20
|
+
readonly blocking: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function resolveFindingPolicy(
|
|
24
|
+
value: unknown,
|
|
25
|
+
fallback: FindingPolicy = DEFAULT_FINDING_POLICY
|
|
26
|
+
): FindingPolicy | undefined {
|
|
27
|
+
if (value === undefined) return fallback;
|
|
28
|
+
return FINDING_POLICIES.find((policy) => policy === value);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function validFindingPolicy(value: unknown): value is FindingPolicy {
|
|
32
|
+
return FINDING_POLICIES.some((policy) => policy === value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function isBlockingFinding(policies: readonly FindingPolicy[]): boolean {
|
|
36
|
+
return policies.some((policy) => policy === "blocking");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function settleFindings(
|
|
40
|
+
findings: readonly FindingSettlement[]
|
|
41
|
+
): CheckResult<FindingSummary> {
|
|
42
|
+
const blockingFindingCount = findings.filter(
|
|
43
|
+
(finding) => finding.actionable && finding.blocking
|
|
44
|
+
).length;
|
|
45
|
+
const findingCount = findings.length;
|
|
46
|
+
const actionableNonBlockingFindingCount = findings.filter(
|
|
47
|
+
(finding) => finding.actionable && !finding.blocking
|
|
48
|
+
).length;
|
|
49
|
+
const messages = findingMessages({ actionableNonBlockingFindingCount, blockingFindingCount });
|
|
50
|
+
return Object.freeze({
|
|
51
|
+
status: blockingFindingCount > 0 ? "failed" : "passed",
|
|
52
|
+
data: Object.freeze({
|
|
53
|
+
blockingFindingCount,
|
|
54
|
+
findingCount
|
|
55
|
+
}),
|
|
56
|
+
...(messages.length === 0 ? {} : { messages })
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function findingMessages(
|
|
61
|
+
summary: Readonly<{
|
|
62
|
+
readonly actionableNonBlockingFindingCount: number;
|
|
63
|
+
readonly blockingFindingCount: number;
|
|
64
|
+
}>
|
|
65
|
+
): readonly CheckMessage[] {
|
|
66
|
+
if (summary.blockingFindingCount > 0) {
|
|
67
|
+
return Object.freeze([
|
|
68
|
+
Object.freeze({
|
|
69
|
+
code: "blocking-findings",
|
|
70
|
+
level: "error",
|
|
71
|
+
message: `${summary.blockingFindingCount} blocking finding(s) require attention; inspect this Check's Records for affected paths and measurements, then update the code or policy.`
|
|
72
|
+
})
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
if (summary.actionableNonBlockingFindingCount > 0) {
|
|
76
|
+
return Object.freeze([
|
|
77
|
+
Object.freeze({
|
|
78
|
+
code: "non-blocking-findings",
|
|
79
|
+
level: "warning",
|
|
80
|
+
message: `${summary.actionableNonBlockingFindingCount} non-blocking finding(s) were recorded; inspect this Check's Records for affected paths and measurements, then update the code or policy.`
|
|
81
|
+
})
|
|
82
|
+
]);
|
|
83
|
+
}
|
|
84
|
+
return Object.freeze([]);
|
|
85
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
DuplicateCodeFragment,
|
|
3
|
+
DuplicateCodeLocation,
|
|
4
|
+
DuplicateDetectionAreaInput
|
|
5
|
+
} from "./measurement-model.ts";
|
|
6
|
+
import { isValidDuplicateFragment } from "./records.ts";
|
|
7
|
+
|
|
8
|
+
type PathPolicy = Readonly<{
|
|
9
|
+
codeArea: string;
|
|
10
|
+
minimumLines: number;
|
|
11
|
+
minimumTokens: number;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
type AnnotatedFragment = Readonly<{
|
|
15
|
+
fragment: DuplicateCodeFragment;
|
|
16
|
+
requiredMinimumLines: number;
|
|
17
|
+
requiredMinimumTokens: number;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
/** Restores every matching code area and applies the strictest involved policy. */
|
|
21
|
+
export function applyDuplicateAreaPolicy(
|
|
22
|
+
fragments: readonly DuplicateCodeFragment[],
|
|
23
|
+
areas: readonly DuplicateDetectionAreaInput[]
|
|
24
|
+
): readonly DuplicateCodeFragment[] | undefined {
|
|
25
|
+
const policiesByPath = buildPathPolicies(areas);
|
|
26
|
+
const accepted: DuplicateCodeFragment[] = [];
|
|
27
|
+
for (const fragment of fragments) {
|
|
28
|
+
if (!isValidDuplicateFragment(fragment)) return undefined;
|
|
29
|
+
const annotated = annotateFragment(fragment, policiesByPath);
|
|
30
|
+
if (annotated === undefined) return undefined;
|
|
31
|
+
if (
|
|
32
|
+
annotated.fragment.lineCount >= annotated.requiredMinimumLines &&
|
|
33
|
+
annotated.fragment.tokenCount >= annotated.requiredMinimumTokens
|
|
34
|
+
) {
|
|
35
|
+
accepted.push(annotated.fragment);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return Object.freeze(accepted);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function buildPathPolicies(
|
|
42
|
+
areas: readonly DuplicateDetectionAreaInput[]
|
|
43
|
+
): ReadonlyMap<string, readonly PathPolicy[]> {
|
|
44
|
+
const mutablePolicies = new Map<string, PathPolicy[]>();
|
|
45
|
+
for (const area of areas) {
|
|
46
|
+
for (const path of area.approvedExactPaths) {
|
|
47
|
+
const policies = mutablePolicies.get(path) ?? [];
|
|
48
|
+
policies.push(
|
|
49
|
+
Object.freeze({
|
|
50
|
+
codeArea: area.codeArea,
|
|
51
|
+
minimumLines: area.minimumLines,
|
|
52
|
+
minimumTokens: area.minimumTokens
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
mutablePolicies.set(path, policies);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return new Map(
|
|
59
|
+
Array.from(mutablePolicies, ([path, policies]) => [path, Object.freeze(policies)] as const)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function annotateFragment(
|
|
64
|
+
fragment: DuplicateCodeFragment,
|
|
65
|
+
policiesByPath: ReadonlyMap<string, readonly PathPolicy[]>
|
|
66
|
+
): AnnotatedFragment | undefined {
|
|
67
|
+
const locations: DuplicateCodeLocation[] = [];
|
|
68
|
+
const involvedPolicies: PathPolicy[] = [];
|
|
69
|
+
for (const location of fragment.locations) {
|
|
70
|
+
const pathPolicies = policiesByPath.get(location.path);
|
|
71
|
+
if (pathPolicies === undefined || pathPolicies.length === 0) return undefined;
|
|
72
|
+
locations.push(
|
|
73
|
+
Object.freeze({
|
|
74
|
+
endLine: location.endLine,
|
|
75
|
+
path: location.path,
|
|
76
|
+
startLine: location.startLine
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
involvedPolicies.push(...pathPolicies);
|
|
80
|
+
}
|
|
81
|
+
if (involvedPolicies.length === 0) return undefined;
|
|
82
|
+
|
|
83
|
+
const annotatedFragment = Object.freeze({
|
|
84
|
+
...fragment,
|
|
85
|
+
codeAreas: Object.freeze(uniqueSorted(involvedPolicies.map((policy) => policy.codeArea))),
|
|
86
|
+
locations: Object.freeze(locations)
|
|
87
|
+
});
|
|
88
|
+
return Object.freeze({
|
|
89
|
+
fragment: annotatedFragment,
|
|
90
|
+
requiredMinimumLines: Math.max(...involvedPolicies.map((policy) => policy.minimumLines)),
|
|
91
|
+
requiredMinimumTokens: Math.max(...involvedPolicies.map((policy) => policy.minimumTokens))
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function uniqueSorted(values: readonly string[]): string[] {
|
|
96
|
+
return [...new Set(values)].sort(compareText);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function compareText(left: string, right: string): number {
|
|
100
|
+
if (left < right) return -1;
|
|
101
|
+
if (left > right) return 1;
|
|
102
|
+
return 0;
|
|
103
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { FileInputFingerprint } from "../../project-files/file-fingerprint.ts";
|
|
2
|
+
import type { DuplicateCodeFragment } from "../measurement-model.ts";
|
|
3
|
+
|
|
4
|
+
export const SCAN_CACHE_VERSION = "quality-scan-cache-v3";
|
|
5
|
+
|
|
6
|
+
export type DuplicateScannerCacheConfiguration = Readonly<{
|
|
7
|
+
backend: Readonly<{ kind: "package" } | { executable: string; kind: "custom" }>;
|
|
8
|
+
minimumLines: number;
|
|
9
|
+
minimumTokens: number;
|
|
10
|
+
reportedPathMode: "absolute";
|
|
11
|
+
reporter: "json";
|
|
12
|
+
workerPolicy: "tool-default";
|
|
13
|
+
}>;
|
|
14
|
+
|
|
15
|
+
export type DuplicateCodeCacheIdentity = Readonly<{
|
|
16
|
+
commitSha: string;
|
|
17
|
+
configVersion: string;
|
|
18
|
+
inputFingerprint: FileInputFingerprint;
|
|
19
|
+
scannerConfiguration: DuplicateScannerCacheConfiguration;
|
|
20
|
+
toolName: "jscpd";
|
|
21
|
+
toolVersion: string;
|
|
22
|
+
}>;
|
|
23
|
+
|
|
24
|
+
export type DuplicateCodeCacheHit = Readonly<{
|
|
25
|
+
cacheKey: string;
|
|
26
|
+
cachePath: string;
|
|
27
|
+
hit: true;
|
|
28
|
+
metrics: readonly DuplicateCodeFragment[];
|
|
29
|
+
}>;
|
|
30
|
+
|
|
31
|
+
export type DuplicateCodeCacheMiss = Readonly<{
|
|
32
|
+
cacheKey: string;
|
|
33
|
+
cachePath: string;
|
|
34
|
+
hit: false;
|
|
35
|
+
reason: "cache-miss" | "cache-payload-invalid" | "cache-payload-mismatch";
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
export type ScanCachePayload = Readonly<{
|
|
39
|
+
cacheKey: string;
|
|
40
|
+
commitSha: string;
|
|
41
|
+
configVersion: string;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
inputFingerprint: FileInputFingerprint;
|
|
44
|
+
metrics: unknown;
|
|
45
|
+
scannerConfiguration: DuplicateScannerCacheConfiguration;
|
|
46
|
+
scanCacheVersion: string;
|
|
47
|
+
toolName: "jscpd";
|
|
48
|
+
toolVersion: string;
|
|
49
|
+
}>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { DuplicateDetectionExactInputSet } from "../measurement-model.ts";
|
|
2
|
+
import type { ResolvedDuplicateDetectionScannerOptions } from "../options.ts";
|
|
3
|
+
import { isPackageJscpdCommand } from "../jscpd/command-resolution.ts";
|
|
4
|
+
import type {
|
|
5
|
+
DuplicateCodeCacheIdentity,
|
|
6
|
+
DuplicateScannerCacheConfiguration
|
|
7
|
+
} from "./cache-contract.ts";
|
|
8
|
+
|
|
9
|
+
const RAW_SCAN_CONFIGURATION_VERSION = "3";
|
|
10
|
+
|
|
11
|
+
interface DuplicateScanCacheIdentityInput {
|
|
12
|
+
readonly dependency: ResolvedDuplicateDetectionScannerOptions;
|
|
13
|
+
readonly exactInput: DuplicateDetectionExactInputSet;
|
|
14
|
+
readonly minimumLines: number;
|
|
15
|
+
readonly minimumTokens: number;
|
|
16
|
+
readonly toolVersion: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function createDuplicateScanCacheIdentity(
|
|
20
|
+
input: DuplicateScanCacheIdentityInput
|
|
21
|
+
): DuplicateCodeCacheIdentity {
|
|
22
|
+
return Object.freeze({
|
|
23
|
+
toolName: "jscpd",
|
|
24
|
+
toolVersion: input.toolVersion,
|
|
25
|
+
scannerConfiguration: jscpdCacheConfiguration({
|
|
26
|
+
dependency: input.dependency,
|
|
27
|
+
minimumLines: input.minimumLines,
|
|
28
|
+
minimumTokens: input.minimumTokens
|
|
29
|
+
}),
|
|
30
|
+
configVersion: RAW_SCAN_CONFIGURATION_VERSION,
|
|
31
|
+
commitSha: input.exactInput.commitSha,
|
|
32
|
+
inputFingerprint: {
|
|
33
|
+
fileCount: input.exactInput.inputFingerprint.fileCount,
|
|
34
|
+
fileList: [...input.exactInput.inputFingerprint.fileList],
|
|
35
|
+
fingerprint: input.exactInput.inputFingerprint.fingerprint
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function jscpdCacheConfiguration(input: {
|
|
41
|
+
readonly dependency: ResolvedDuplicateDetectionScannerOptions;
|
|
42
|
+
readonly minimumLines: number;
|
|
43
|
+
readonly minimumTokens: number;
|
|
44
|
+
}): DuplicateScannerCacheConfiguration {
|
|
45
|
+
const backend: DuplicateScannerCacheConfiguration["backend"] = isPackageJscpdCommand(
|
|
46
|
+
input.dependency.command
|
|
47
|
+
)
|
|
48
|
+
? Object.freeze({ kind: "package" })
|
|
49
|
+
: Object.freeze({
|
|
50
|
+
executable: input.dependency.command.executable,
|
|
51
|
+
kind: "custom"
|
|
52
|
+
});
|
|
53
|
+
return Object.freeze({
|
|
54
|
+
backend,
|
|
55
|
+
minimumLines: input.minimumLines,
|
|
56
|
+
minimumTokens: input.minimumTokens,
|
|
57
|
+
reportedPathMode: "absolute",
|
|
58
|
+
reporter: "json",
|
|
59
|
+
workerPolicy: "tool-default"
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
import { isNonArrayRecord } from "../../../data-boundary/value-shapes.ts";
|
|
5
|
+
import { SCAN_CACHE_VERSION, type DuplicateCodeCacheIdentity } from "./cache-contract.ts";
|
|
6
|
+
|
|
7
|
+
export function buildScanCacheKey(identity: DuplicateCodeCacheIdentity): string {
|
|
8
|
+
const keyInput = {
|
|
9
|
+
scan_cache_version: SCAN_CACHE_VERSION,
|
|
10
|
+
tool_name: identity.toolName,
|
|
11
|
+
tool_version: identity.toolVersion,
|
|
12
|
+
scanner_configuration: identity.scannerConfiguration,
|
|
13
|
+
config_version: identity.configVersion,
|
|
14
|
+
commit_sha: identity.commitSha,
|
|
15
|
+
input_fingerprint: identity.inputFingerprint
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return hashStable(keyInput);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function getScanCachePath(rootDir: string, cacheKey: string): string {
|
|
22
|
+
return join(getQualityCacheRoot(rootDir), `${cacheKey}.json`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function getQualityCacheRoot(rootDir: string): string {
|
|
26
|
+
return join(rootDir, SCAN_CACHE_VERSION);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function hashStable(value: unknown): string {
|
|
30
|
+
return createHash("sha256").update(stableStringify(value)).digest("hex");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function stableStringify(value: unknown): string {
|
|
34
|
+
if (Array.isArray(value)) {
|
|
35
|
+
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (isNonArrayRecord(value)) {
|
|
39
|
+
return `{${Object.keys(value)
|
|
40
|
+
.sort()
|
|
41
|
+
.map((key) => `${JSON.stringify(key)}:${stableStringify(value[key])}`)
|
|
42
|
+
.join(",")}}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return JSON.stringify(value);
|
|
46
|
+
}
|