project-tiny-context-harness 0.8.17 → 0.11.0
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 +93 -30
- package/assets/README.md +158 -44
- package/assets/README.zh-CN.md +88 -29
- package/assets/agents/AGENTS_CORE.md +2 -2
- package/assets/context_templates/context.toml +6 -1
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_helpers.cs +301 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_run.cs +197 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_types.cs +215 -0
- package/assets/runtime/windows-job-supervisor/windows_job_process_supervisor.ps1 +117 -0
- package/assets/skills/design-resource-authoring/SKILL.md +6 -3
- package/assets/skills/design-resource-authoring/references/authority-delta-assessment.md +52 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +5 -1
- package/assets/skills/design-system-authoring/SKILL.md +23 -17
- package/assets/skills/design-system-authoring/references/authority-adoption.md +19 -9
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +4 -0
- package/assets/skills/long-task-workflow/SKILL.md +6 -6
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +10 -4
- package/assets/skills/long-task-workflow/references/contract-authoring.md +5 -5
- package/assets/skills/long-task-workflow/references/evidence-design.md +14 -3
- package/assets/skills/long-task-workflow/references/source-authoring.md +11 -8
- package/assets/tools/context_rules.json +53 -0
- package/assets/tools/validate_context.py +302 -77
- package/dist/cli.js +2 -1
- package/dist/commands/context-create.d.ts +1 -0
- package/dist/commands/context-create.js +90 -0
- package/dist/commands/context-inspect.d.ts +1 -0
- package/dist/commands/context-inspect.js +98 -0
- package/dist/commands/context-move.d.ts +1 -0
- package/dist/commands/context-move.js +78 -0
- package/dist/commands/context-register.d.ts +1 -0
- package/dist/commands/context-register.js +110 -0
- package/dist/commands/context-transaction.d.ts +1 -0
- package/dist/commands/context-transaction.js +84 -0
- package/dist/commands/context.d.ts +1 -0
- package/dist/commands/context.js +36 -0
- package/dist/commands/design-authority-delta.d.ts +1 -0
- package/dist/commands/design-authority-delta.js +53 -0
- package/dist/commands/design-authority.d.ts +1 -0
- package/dist/commands/design-authority.js +104 -0
- package/dist/commands/design-resource.js +8 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +61 -3
- package/dist/commands/index.js +19 -2
- package/dist/commands/long-task-authoring.js +20 -2
- package/dist/commands/long-task-workdir.d.ts +2 -0
- package/dist/commands/long-task-workdir.js +23 -0
- package/dist/commands/long-task.js +75 -6
- package/dist/commands/route.d.ts +15 -0
- package/dist/commands/route.js +142 -0
- package/dist/index.d.ts +3 -13
- package/dist/index.js +3 -12
- package/dist/lib/cli-exit.d.ts +14 -0
- package/dist/lib/cli-exit.js +19 -0
- package/dist/lib/context-catalog/catalog-default-footprint.d.ts +3 -0
- package/dist/lib/context-catalog/catalog-default-footprint.js +53 -0
- package/dist/lib/context-catalog/catalog-diagnostics.d.ts +9 -0
- package/dist/lib/context-catalog/catalog-diagnostics.js +34 -0
- package/dist/lib/context-catalog/catalog-discovery.d.ts +7 -0
- package/dist/lib/context-catalog/catalog-discovery.js +81 -0
- package/dist/lib/context-catalog/catalog-load.d.ts +8 -0
- package/dist/lib/context-catalog/catalog-load.js +187 -0
- package/dist/lib/context-catalog/catalog-path-validation.d.ts +7 -0
- package/dist/lib/context-catalog/catalog-path-validation.js +62 -0
- package/dist/lib/context-catalog/catalog-paths.d.ts +11 -0
- package/dist/lib/context-catalog/catalog-paths.js +41 -0
- package/dist/lib/context-catalog/catalog-portable-contract.d.ts +15 -0
- package/dist/lib/context-catalog/catalog-portable-contract.js +68 -0
- package/dist/lib/context-catalog/catalog-staged-path-safety.d.ts +1 -0
- package/dist/lib/context-catalog/catalog-staged-path-safety.js +36 -0
- package/dist/lib/context-catalog/catalog-types.d.ts +40 -0
- package/dist/lib/context-catalog/catalog-types.js +1 -0
- package/dist/lib/context-catalog/catalog-validation.d.ts +9 -0
- package/dist/lib/context-catalog/catalog-validation.js +148 -0
- package/dist/lib/context-create/context-create-path.d.ts +2 -0
- package/dist/lib/context-create/context-create-path.js +30 -0
- package/dist/lib/context-create/context-create-template.d.ts +2 -0
- package/dist/lib/context-create/context-create-template.js +95 -0
- package/dist/lib/context-create/context-create-types.d.ts +28 -0
- package/dist/lib/context-create/context-create-types.js +1 -0
- package/dist/lib/context-create/context-create-write.d.ts +1 -0
- package/dist/lib/context-create/context-create-write.js +85 -0
- package/dist/lib/context-create/context-create.d.ts +2 -0
- package/dist/lib/context-create/context-create.js +84 -0
- package/dist/lib/context-default-footprint.d.ts +2 -3
- package/dist/lib/context-default-footprint.js +49 -57
- package/dist/lib/context-doctor/context-doctor-types.d.ts +16 -0
- package/dist/lib/context-doctor/context-doctor-types.js +15 -0
- package/dist/lib/context-doctor/context-doctor.d.ts +2 -0
- package/dist/lib/context-doctor/context-doctor.js +130 -0
- package/dist/lib/context-graph-snapshot.d.ts +5 -0
- package/dist/lib/context-graph-snapshot.js +46 -25
- package/dist/lib/context-inspect/context-inspect-projection.d.ts +9 -0
- package/dist/lib/context-inspect/context-inspect-projection.js +49 -0
- package/dist/lib/context-inspect/context-inspect-render.d.ts +2 -0
- package/dist/lib/context-inspect/context-inspect-render.js +29 -0
- package/dist/lib/context-inspect/context-inspect-types.d.ts +43 -0
- package/dist/lib/context-inspect/context-inspect-types.js +1 -0
- package/dist/lib/context-inspect/context-inspect.d.ts +2 -0
- package/dist/lib/context-inspect/context-inspect.js +104 -0
- package/dist/lib/context-manifest-schema.d.ts +1 -1
- package/dist/lib/context-manifest-schema.js +4 -20
- package/dist/lib/context-markdown/context-markdown-analysis.d.ts +15 -0
- package/dist/lib/context-markdown/context-markdown-analysis.js +245 -0
- package/dist/lib/context-markdown/context-markdown-extract.d.ts +7 -0
- package/dist/lib/context-markdown/context-markdown-extract.js +114 -0
- package/dist/lib/context-markdown/context-markdown-types.d.ts +57 -0
- package/dist/lib/context-markdown/context-markdown-types.js +1 -0
- package/dist/lib/context-move/context-move-input.d.ts +8 -0
- package/dist/lib/context-move/context-move-input.js +17 -0
- package/dist/lib/context-move/context-move-literal-scan.d.ts +20 -0
- package/dist/lib/context-move/context-move-literal-scan.js +213 -0
- package/dist/lib/context-move/context-move-live-validation.d.ts +3 -0
- package/dist/lib/context-move/context-move-live-validation.js +56 -0
- package/dist/lib/context-move/context-move-markdown-plan.d.ts +22 -0
- package/dist/lib/context-move/context-move-markdown-plan.js +39 -0
- package/dist/lib/context-move/context-move-projection.d.ts +3 -0
- package/dist/lib/context-move/context-move-projection.js +11 -0
- package/dist/lib/context-move/context-move-reference-validation.d.ts +11 -0
- package/dist/lib/context-move/context-move-reference-validation.js +64 -0
- package/dist/lib/context-move/context-move-render.d.ts +2 -0
- package/dist/lib/context-move/context-move-render.js +24 -0
- package/dist/lib/context-move/context-move-support.d.ts +10 -0
- package/dist/lib/context-move/context-move-support.js +88 -0
- package/dist/lib/context-move/context-move-transaction-plan.d.ts +24 -0
- package/dist/lib/context-move/context-move-transaction-plan.js +108 -0
- package/dist/lib/context-move/context-move-types.d.ts +74 -0
- package/dist/lib/context-move/context-move-types.js +1 -0
- package/dist/lib/context-move/context-move.d.ts +8 -0
- package/dist/lib/context-move/context-move.js +180 -0
- package/dist/lib/context-mutation/manifest-lossless-patch.d.ts +28 -0
- package/dist/lib/context-mutation/manifest-lossless-patch.js +208 -0
- package/dist/lib/context-mutation/markdown-link-patch.d.ts +34 -0
- package/dist/lib/context-mutation/markdown-link-patch.js +143 -0
- package/dist/lib/context-mutation/markdown-link-spans.d.ts +10 -0
- package/dist/lib/context-mutation/markdown-link-spans.js +179 -0
- package/dist/lib/context-mutation/mutation-cas.d.ts +13 -0
- package/dist/lib/context-mutation/mutation-cas.js +365 -0
- package/dist/lib/context-mutation/mutation-command-support.d.ts +12 -0
- package/dist/lib/context-mutation/mutation-command-support.js +57 -0
- package/dist/lib/context-mutation/mutation-commit.d.ts +12 -0
- package/dist/lib/context-mutation/mutation-commit.js +89 -0
- package/dist/lib/context-mutation/mutation-directories.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-directories.js +56 -0
- package/dist/lib/context-mutation/mutation-file-state.d.ts +14 -0
- package/dist/lib/context-mutation/mutation-file-state.js +137 -0
- package/dist/lib/context-mutation/mutation-journal-file-validation.d.ts +1 -0
- package/dist/lib/context-mutation/mutation-journal-file-validation.js +106 -0
- package/dist/lib/context-mutation/mutation-journal-io.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-journal-io.js +55 -0
- package/dist/lib/context-mutation/mutation-journal-storage.d.ts +18 -0
- package/dist/lib/context-mutation/mutation-journal-storage.js +283 -0
- package/dist/lib/context-mutation/mutation-journal-validation-support.d.ts +16 -0
- package/dist/lib/context-mutation/mutation-journal-validation-support.js +140 -0
- package/dist/lib/context-mutation/mutation-journal-validation.d.ts +3 -0
- package/dist/lib/context-mutation/mutation-journal-validation.js +177 -0
- package/dist/lib/context-mutation/mutation-journal.d.ts +8 -0
- package/dist/lib/context-mutation/mutation-journal.js +111 -0
- package/dist/lib/context-mutation/mutation-live-validation.d.ts +3 -0
- package/dist/lib/context-mutation/mutation-live-validation.js +51 -0
- package/dist/lib/context-mutation/mutation-long-task-guard.d.ts +6 -0
- package/dist/lib/context-mutation/mutation-long-task-guard.js +57 -0
- package/dist/lib/context-mutation/mutation-recovery.d.ts +4 -0
- package/dist/lib/context-mutation/mutation-recovery.js +189 -0
- package/dist/lib/context-mutation/mutation-staged-fs.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-staged-fs.js +56 -0
- package/dist/lib/context-mutation/mutation-types.d.ts +103 -0
- package/dist/lib/context-mutation/mutation-types.js +1 -0
- package/dist/lib/context-register/context-register-input.d.ts +11 -0
- package/dist/lib/context-register/context-register-input.js +43 -0
- package/dist/lib/context-register/context-register-render.d.ts +2 -0
- package/dist/lib/context-register/context-register-render.js +21 -0
- package/dist/lib/context-register/context-register-support.d.ts +6 -0
- package/dist/lib/context-register/context-register-support.js +46 -0
- package/dist/lib/context-register/context-register-types.d.ts +46 -0
- package/dist/lib/context-register/context-register-types.js +1 -0
- package/dist/lib/context-register/context-register.d.ts +8 -0
- package/dist/lib/context-register/context-register.js +155 -0
- package/dist/lib/context-router/context-route-budget.d.ts +15 -0
- package/dist/lib/context-router/context-route-budget.js +14 -0
- package/dist/lib/context-router/context-route-candidates.d.ts +15 -0
- package/dist/lib/context-router/context-route-candidates.js +112 -0
- package/dist/lib/context-router/context-route-order.d.ts +6 -0
- package/dist/lib/context-router/context-route-order.js +53 -0
- package/dist/lib/context-router/context-route-paths.d.ts +16 -0
- package/dist/lib/context-router/context-route-paths.js +109 -0
- package/dist/lib/context-router/context-route-render.d.ts +2 -0
- package/dist/lib/context-router/context-route-render.js +32 -0
- package/dist/lib/context-router/context-route-scan.d.ts +18 -0
- package/dist/lib/context-router/context-route-scan.js +156 -0
- package/dist/lib/context-router/context-route-selection.d.ts +16 -0
- package/dist/lib/context-router/context-route-selection.js +72 -0
- package/dist/lib/context-router/context-route-terms.d.ts +13 -0
- package/dist/lib/context-router/context-route-terms.js +202 -0
- package/dist/lib/context-router/context-route-types.d.ts +101 -0
- package/dist/lib/context-router/context-route-types.js +1 -0
- package/dist/lib/context-router/context-route.d.ts +2 -0
- package/dist/lib/context-router/context-route.js +127 -0
- package/dist/lib/context-units-migration.d.ts +13 -0
- package/dist/lib/context-units-migration.js +217 -0
- package/dist/lib/design-authority-binding.d.ts +7 -0
- package/dist/lib/design-authority-binding.js +96 -0
- package/dist/lib/design-authority-closure.d.ts +3 -0
- package/dist/lib/design-authority-closure.js +201 -0
- package/dist/lib/design-authority-delta-codec-primitives.d.ts +10 -0
- package/dist/lib/design-authority-delta-codec-primitives.js +58 -0
- package/dist/lib/design-authority-delta-codec.d.ts +2 -0
- package/dist/lib/design-authority-delta-codec.js +193 -0
- package/dist/lib/design-authority-delta-types.d.ts +65 -0
- package/dist/lib/design-authority-delta-types.js +6 -0
- package/dist/lib/design-authority-delta-validation.d.ts +2 -0
- package/dist/lib/design-authority-delta-validation.js +16 -0
- package/dist/lib/design-authority-digest.d.ts +8 -0
- package/dist/lib/design-authority-digest.js +36 -0
- package/dist/lib/design-authority-files.d.ts +9 -0
- package/dist/lib/design-authority-files.js +62 -0
- package/dist/lib/design-authority-format.d.ts +2 -0
- package/dist/lib/design-authority-format.js +93 -0
- package/dist/lib/design-authority-links.d.ts +10 -0
- package/dist/lib/design-authority-links.js +137 -0
- package/dist/lib/design-authority-manifest.d.ts +4 -0
- package/dist/lib/design-authority-manifest.js +144 -0
- package/dist/lib/design-authority-tokens.d.ts +9 -0
- package/dist/lib/design-authority-tokens.js +45 -0
- package/dist/lib/design-authority-types.d.ts +80 -0
- package/dist/lib/design-authority-types.js +23 -0
- package/dist/lib/design-md-tool-adapter.d.ts +9 -0
- package/dist/lib/design-md-tool-adapter.js +152 -0
- package/dist/lib/design-md-tool-normalization.d.ts +7 -0
- package/dist/lib/design-md-tool-normalization.js +78 -0
- package/dist/lib/design-md-tool-types.d.ts +99 -0
- package/dist/lib/design-md-tool-types.js +8 -0
- package/dist/lib/design-resource-handoff-input-types.d.ts +1 -1
- package/dist/lib/design-resource-handoff-manifest-projection.js +3 -0
- package/dist/lib/design-resource-handoff-shape.js +14 -2
- package/dist/lib/design-resource-handoff-types.d.ts +3 -0
- package/dist/lib/design-resource-handoff-validation.js +16 -4
- package/dist/lib/design-resource-implementation-feasibility-validation-support.js +1 -1
- package/dist/lib/design-resource-recovery-current.js +22 -0
- package/dist/lib/design-resource-recovery-shape.js +64 -7
- package/dist/lib/design-resource-recovery-types.d.ts +4 -1
- package/dist/lib/design-resource-symbolic-fact-shape.js +7 -1
- package/dist/lib/design-resource-symbolic-fact-types.d.ts +3 -0
- package/dist/lib/design-resource-symbolic-fact-validation.js +15 -3
- package/dist/lib/doctor.d.ts +2 -1
- package/dist/lib/doctor.js +29 -1
- package/dist/lib/fs.js +1 -1
- package/dist/lib/long-task-acceptance-reachability-claims.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-claims.js +279 -0
- package/dist/lib/long-task-acceptance-reachability-design.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-design.js +96 -0
- package/dist/lib/long-task-acceptance-reachability-external.d.ts +9 -0
- package/dist/lib/long-task-acceptance-reachability-external.js +123 -0
- package/dist/lib/long-task-acceptance-reachability-helpers.d.ts +64 -0
- package/dist/lib/long-task-acceptance-reachability-helpers.js +473 -0
- package/dist/lib/long-task-acceptance-reachability-semantic.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-semantic.js +122 -0
- package/dist/lib/long-task-acceptance-reachability-types.d.ts +91 -0
- package/dist/lib/long-task-acceptance-reachability-types.js +1 -0
- package/dist/lib/long-task-acceptance-reachability.d.ts +4 -0
- package/dist/lib/long-task-acceptance-reachability.js +115 -0
- package/dist/lib/long-task-activation-validation.d.ts +6 -0
- package/dist/lib/long-task-activation-validation.js +72 -69
- package/dist/lib/long-task-active-authority-lock-context.d.ts +4 -0
- package/dist/lib/long-task-active-authority-lock-context.js +29 -0
- package/dist/lib/long-task-applicability-identity.d.ts +25 -0
- package/dist/lib/long-task-applicability-identity.js +60 -0
- package/dist/lib/long-task-authoring-preflight-diagnostics.js +8 -0
- package/dist/lib/long-task-authoring-preflight-types.d.ts +2 -0
- package/dist/lib/long-task-authoring-preflight-types.js +9 -0
- package/dist/lib/long-task-authoring-preflight.js +18 -2
- package/dist/lib/long-task-authority-material-diff.js +4 -0
- package/dist/lib/long-task-authority-materials.js +19 -0
- package/dist/lib/long-task-authority-policy.d.ts +3 -0
- package/dist/lib/long-task-authority-policy.js +3 -0
- package/dist/lib/long-task-authority-revision-details.js +2 -1
- package/dist/lib/long-task-authority-types.d.ts +2 -0
- package/dist/lib/long-task-authority.js +2 -0
- package/dist/lib/long-task-check-shape.js +6 -1
- package/dist/lib/long-task-claim-definitions.js +1 -3
- package/dist/lib/long-task-claim-semantic-proof-floor.d.ts +3 -0
- package/dist/lib/long-task-claim-semantic-proof-floor.js +78 -0
- package/dist/lib/long-task-claims.d.ts +0 -18
- package/dist/lib/long-task-claims.js +15 -14
- package/dist/lib/long-task-command-process.js +3 -0
- package/dist/lib/long-task-compact-authoring.js +3 -0
- package/dist/lib/long-task-compact-projections.js +10 -0
- package/dist/lib/long-task-complete-delivery-evidence-types.d.ts +38 -0
- package/dist/lib/long-task-complete-delivery-evidence-types.js +1 -0
- package/dist/lib/long-task-completion-types.d.ts +109 -0
- package/dist/lib/long-task-completion-types.js +1 -0
- package/dist/lib/long-task-conformance-policy.d.ts +2 -1
- package/dist/lib/long-task-conformance-policy.js +11 -4
- package/dist/lib/long-task-context-authority-topology.js +6 -4
- package/dist/lib/long-task-contract-types.d.ts +52 -1
- package/dist/lib/long-task-counterfactual-sandbox.d.ts +7 -1
- package/dist/lib/long-task-counterfactual-sandbox.js +86 -6
- package/dist/lib/long-task-delivery-compiler-preflight.d.ts +24 -0
- package/dist/lib/long-task-delivery-compiler-preflight.js +32 -0
- package/dist/lib/long-task-delivery-compiler.d.ts +1 -0
- package/dist/lib/long-task-delivery-compiler.js +59 -44
- package/dist/lib/long-task-delivery-parser.d.ts +3 -0
- package/dist/lib/long-task-delivery-parser.js +26 -8
- package/dist/lib/long-task-delivery-types.d.ts +2 -0
- package/dist/lib/long-task-delivery-types.js +2 -0
- package/dist/lib/long-task-delivery-validation.d.ts +6 -1
- package/dist/lib/long-task-delivery-validation.js +19 -4
- package/dist/lib/long-task-design-feasibility-binding.d.ts +1 -0
- package/dist/lib/long-task-design-feasibility-binding.js +3 -3
- package/dist/lib/long-task-design-feasibility-source-closure.js +11 -2
- package/dist/lib/long-task-design-obligation.d.ts +50 -0
- package/dist/lib/long-task-design-obligation.js +99 -0
- package/dist/lib/long-task-design-resource-handoff.d.ts +3 -1
- package/dist/lib/long-task-design-resource-handoff.js +36 -12
- package/dist/lib/long-task-design-resource-method-binding.js +12 -0
- package/dist/lib/long-task-effective-external-takeover.d.ts +15 -0
- package/dist/lib/long-task-effective-external-takeover.js +109 -0
- package/dist/lib/long-task-effective-external-ui-takeover.d.ts +5 -0
- package/dist/lib/long-task-effective-external-ui-takeover.js +117 -0
- package/dist/lib/long-task-evidence-capability-codec.js +91 -0
- package/dist/lib/long-task-evidence-capability-runtime.js +62 -14
- package/dist/lib/long-task-evidence-capability-types.d.ts +3 -2
- package/dist/lib/long-task-evidence-v2.d.ts +6 -1
- package/dist/lib/long-task-evidence-v2.js +253 -170
- package/dist/lib/long-task-execution-observation.d.ts +7 -0
- package/dist/lib/long-task-execution-observation.js +21 -4
- package/dist/lib/long-task-expected-authority.d.ts +4 -0
- package/dist/lib/long-task-expected-authority.js +126 -0
- package/dist/lib/long-task-external-confirmation-artifacts.d.ts +9 -0
- package/dist/lib/long-task-external-confirmation-artifacts.js +138 -0
- package/dist/lib/long-task-external-confirmation-attestation.d.ts +20 -0
- package/dist/lib/long-task-external-confirmation-attestation.js +115 -0
- package/dist/lib/long-task-external-confirmation-challenge.d.ts +23 -0
- package/dist/lib/long-task-external-confirmation-challenge.js +164 -0
- package/dist/lib/long-task-external-confirmation-context.d.ts +14 -0
- package/dist/lib/long-task-external-confirmation-context.js +53 -0
- package/dist/lib/long-task-external-confirmation-evaluation.d.ts +11 -0
- package/dist/lib/long-task-external-confirmation-evaluation.js +454 -0
- package/dist/lib/long-task-external-confirmation-expected.d.ts +8 -0
- package/dist/lib/long-task-external-confirmation-expected.js +200 -0
- package/dist/lib/long-task-external-confirmation-identity.d.ts +10 -0
- package/dist/lib/long-task-external-confirmation-identity.js +77 -0
- package/dist/lib/long-task-external-confirmation-plan.d.ts +25 -0
- package/dist/lib/long-task-external-confirmation-plan.js +148 -0
- package/dist/lib/long-task-external-confirmation-preparation.d.ts +4 -0
- package/dist/lib/long-task-external-confirmation-preparation.js +100 -0
- package/dist/lib/long-task-external-confirmation-shape.d.ts +8 -0
- package/dist/lib/long-task-external-confirmation-shape.js +387 -0
- package/dist/lib/long-task-external-confirmation-state.d.ts +10 -0
- package/dist/lib/long-task-external-confirmation-state.js +109 -0
- package/dist/lib/long-task-external-confirmation-types.d.ts +195 -0
- package/dist/lib/long-task-external-confirmation-types.js +1 -0
- package/dist/lib/long-task-final-integrity.d.ts +2 -0
- package/dist/lib/long-task-final-integrity.js +21 -10
- package/dist/lib/long-task-final-v2.d.ts +7 -2
- package/dist/lib/long-task-final-v2.js +179 -55
- package/dist/lib/long-task-finalization-identity.d.ts +27 -0
- package/dist/lib/long-task-finalization-identity.js +58 -0
- package/dist/lib/long-task-finding-context.d.ts +1 -1
- package/dist/lib/long-task-finding-context.js +139 -13
- package/dist/lib/long-task-freshness.d.ts +27 -0
- package/dist/lib/long-task-freshness.js +128 -5
- package/dist/lib/long-task-git.js +3 -3
- package/dist/lib/long-task-material-input-closure.d.ts +3 -0
- package/dist/lib/long-task-material-input-closure.js +92 -0
- package/dist/lib/long-task-obligation-authority-resolution.d.ts +12 -0
- package/dist/lib/long-task-obligation-authority-resolution.js +57 -0
- package/dist/lib/long-task-obligation-semantic-identity.d.ts +16 -0
- package/dist/lib/long-task-obligation-semantic-identity.js +116 -0
- package/dist/lib/long-task-observation-authority.d.ts +11 -0
- package/dist/lib/long-task-observation-authority.js +137 -6
- package/dist/lib/long-task-process-table.d.ts +2 -5
- package/dist/lib/long-task-process-table.js +21 -53
- package/dist/lib/long-task-process-tree.d.ts +0 -1
- package/dist/lib/long-task-process-tree.js +24 -54
- package/dist/lib/long-task-proof-adequacy.d.ts +12 -0
- package/dist/lib/long-task-proof-adequacy.js +57 -0
- package/dist/lib/long-task-proof-capability-floor.d.ts +6 -0
- package/dist/lib/long-task-proof-capability-floor.js +137 -0
- package/dist/lib/long-task-repair-frontier-checks.d.ts +8 -0
- package/dist/lib/long-task-repair-frontier-checks.js +93 -0
- package/dist/lib/long-task-repair-frontier-groups.d.ts +2 -0
- package/dist/lib/long-task-repair-frontier-groups.js +64 -0
- package/dist/lib/long-task-repair-frontier-utils.d.ts +6 -0
- package/dist/lib/long-task-repair-frontier-utils.js +27 -0
- package/dist/lib/long-task-repair-frontier.d.ts +14 -0
- package/dist/lib/long-task-repair-frontier.js +132 -0
- package/dist/lib/long-task-risk.d.ts +3 -2
- package/dist/lib/long-task-risk.js +73 -24
- package/dist/lib/long-task-root-shape.js +148 -8
- package/dist/lib/long-task-runner-freeze.d.ts +2 -1
- package/dist/lib/long-task-runner-freeze.js +23 -8
- package/dist/lib/long-task-runtime-types.d.ts +34 -40
- package/dist/lib/long-task-semantic-assurance-policy.js +2 -11
- package/dist/lib/long-task-semantic-contract-types.d.ts +2 -1
- package/dist/lib/long-task-semantic-drift-migration.js +48 -2
- package/dist/lib/long-task-semantic-fact-binding-types.d.ts +20 -0
- package/dist/lib/long-task-semantic-fact-closure.d.ts +5 -1
- package/dist/lib/long-task-semantic-fact-closure.js +33 -5
- package/dist/lib/long-task-semantic-fact-contract-closure.js +176 -1
- package/dist/lib/long-task-semantic-fact-contract-proofs.js +18 -1
- package/dist/lib/long-task-semantic-fact-input-closure.d.ts +16 -2
- package/dist/lib/long-task-semantic-fact-input-closure.js +138 -15
- package/dist/lib/long-task-semantic-fact-provenance-closure.js +1 -1
- package/dist/lib/long-task-semantic-fact-shape.d.ts +2 -1
- package/dist/lib/long-task-semantic-fact-shape.js +35 -1
- package/dist/lib/long-task-semantic-proof-adequacy.d.ts +2 -0
- package/dist/lib/long-task-semantic-proof-adequacy.js +19 -0
- package/dist/lib/long-task-semantic-proof-profile.d.ts +5 -0
- package/dist/lib/long-task-semantic-proof-profile.js +187 -0
- package/dist/lib/long-task-shape-primitives.d.ts +1 -1
- package/dist/lib/long-task-shape-primitives.js +5 -0
- package/dist/lib/long-task-source-anchors.d.ts +10 -0
- package/dist/lib/long-task-source-anchors.js +102 -0
- package/dist/lib/long-task-source-authority-types.d.ts +46 -0
- package/dist/lib/long-task-source-claim-validation.js +36 -0
- package/dist/lib/long-task-source-conservation-facts.d.ts +8 -0
- package/dist/lib/long-task-source-conservation-facts.js +57 -0
- package/dist/lib/long-task-source-conservation-types.d.ts +34 -0
- package/dist/lib/long-task-source-conservation-types.js +1 -0
- package/dist/lib/long-task-source-conservation.d.ts +7 -0
- package/dist/lib/long-task-source-conservation.js +110 -0
- package/dist/lib/long-task-source-fragments.d.ts +6 -0
- package/dist/lib/long-task-source-fragments.js +219 -0
- package/dist/lib/long-task-source-projection-resolution.d.ts +5 -0
- package/dist/lib/long-task-source-projection-resolution.js +57 -0
- package/dist/lib/long-task-source-projection-validation.d.ts +17 -0
- package/dist/lib/long-task-source-projection-validation.js +154 -0
- package/dist/lib/long-task-source-shape.js +14 -6
- package/dist/lib/long-task-source-supersession.d.ts +5 -0
- package/dist/lib/long-task-source-supersession.js +138 -0
- package/dist/lib/long-task-stage-policy.d.ts +7 -2
- package/dist/lib/long-task-stage-policy.js +67 -23
- package/dist/lib/long-task-state.d.ts +18 -4
- package/dist/lib/long-task-state.js +319 -33
- package/dist/lib/long-task-static-observation-freeze.js +4 -3
- package/dist/lib/long-task-status-projection.d.ts +3 -1
- package/dist/lib/long-task-status-projection.js +44 -13
- package/dist/lib/long-task-status-v2.d.ts +10 -6
- package/dist/lib/long-task-status-v2.js +70 -58
- package/dist/lib/long-task-target-policy.d.ts +8 -3
- package/dist/lib/long-task-target-policy.js +40 -9
- package/dist/lib/long-task-terminal-finalization.d.ts +12 -0
- package/dist/lib/long-task-terminal-finalization.js +190 -0
- package/dist/lib/long-task-ui-design-policy.js +15 -4
- package/dist/lib/long-task-verifier-counterfactuals.d.ts +11 -0
- package/dist/lib/long-task-verifier-counterfactuals.js +96 -0
- package/dist/lib/long-task-verifier-execution.d.ts +9 -0
- package/dist/lib/long-task-verifier-execution.js +67 -0
- package/dist/lib/long-task-verifier-identity.js +16 -5
- package/dist/lib/long-task-verifier-v2.js +52 -65
- package/dist/lib/long-task-windows-job-supervisor-helper.d.ts +1 -0
- package/dist/lib/long-task-windows-job-supervisor-helper.js +104 -0
- package/dist/lib/long-task-windows-job-supervisor-protocol.d.ts +28 -0
- package/dist/lib/long-task-windows-job-supervisor-protocol.js +124 -0
- package/dist/lib/long-task-windows-job-supervisor-result.d.ts +11 -0
- package/dist/lib/long-task-windows-job-supervisor-result.js +152 -0
- package/dist/lib/long-task-windows-job-supervisor.d.ts +2 -0
- package/dist/lib/long-task-windows-job-supervisor.js +126 -0
- package/dist/lib/long-task-workspace-scope.d.ts +1 -0
- package/dist/lib/long-task-workspace-scope.js +4 -1
- package/dist/lib/long-task-workspace.d.ts +1 -0
- package/dist/lib/long-task-workspace.js +10 -0
- package/dist/lib/migrations.js +43 -2
- package/dist/lib/repository-path-safety.d.ts +1 -0
- package/dist/lib/repository-path-safety.js +3 -3
- package/dist/lib/semantic-fact-input-shape.d.ts +7 -2
- package/dist/lib/semantic-fact-input-shape.js +25 -1
- package/dist/lib/semantic-fact-inventory-types.d.ts +8 -2
- package/dist/lib/semantic-fact-policy-census.d.ts +1 -1
- package/dist/lib/semantic-fact-policy-census.js +5 -2
- package/dist/lib/semantic-fact-policy.d.ts +1 -1
- package/dist/lib/semantic-fact-policy.js +2 -2
- package/dist/lib/semantic-fact-proof-shape.d.ts +1 -1
- package/dist/lib/semantic-fact-property-shape.d.ts +1 -1
- package/dist/lib/validators.d.ts +3 -0
- package/dist/lib/validators.js +45 -157
- package/dist/public-api-core.d.ts +12 -0
- package/dist/public-api-core.js +12 -0
- package/dist/public-api-long-task.d.ts +10 -0
- package/dist/public-api-long-task.js +10 -0
- package/dist/public-types.d.ts +5 -1
- package/dist/schemas/design-authority-delta-assessment-v1.schema.json +191 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +166 -2
- package/dist/schemas/long-task-external-confirmation-record-v1.schema.json +155 -0
- package/dist/schemas/long-task-external-confirmation-record-v2.schema.json +209 -0
- package/migrations/README.md +99 -0
- package/package.json +7 -5
- package/source-mappings.yaml +18 -0
|
@@ -4,12 +4,19 @@ import { addAuthoringDiagnostics, addDiagnosticError, normalizeAuthoringDiagnost
|
|
|
4
4
|
import { emptyClaimCoverage, emptyPreflightResult, } from "./long-task-authoring-preflight-types.js";
|
|
5
5
|
import { validateContractForActivation } from "./long-task-activation-validation.js";
|
|
6
6
|
import { parseDeliveryContractBundle } from "./long-task-delivery-parser.js";
|
|
7
|
-
import { changedWorkspacePaths, changedWorkspacePathsFromHead, repoRelative, repositoryRoot, } from "./long-task-workspace.js";
|
|
7
|
+
import { canonicalExistingLongTaskWorkdir, changedWorkspacePaths, changedWorkspacePathsFromHead, repoRelative, repositoryRoot, } from "./long-task-workspace.js";
|
|
8
8
|
import { classifyWorkspaceScope, firstLockManagedWorkspacePaths, protectedWorkspacePaths, workspaceScopeErrors, } from "./long-task-workspace-scope.js";
|
|
9
9
|
export async function preflightDeliveryContract(workdirInput, projectRootInput = process.cwd()) {
|
|
10
10
|
const diagnostics = [];
|
|
11
11
|
const repository = await repositoryRoot(projectRootInput);
|
|
12
|
-
|
|
12
|
+
let workdir;
|
|
13
|
+
try {
|
|
14
|
+
workdir = await canonicalExistingLongTaskWorkdir(repository, workdirInput);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
addDiagnosticError(diagnostics, error);
|
|
18
|
+
return emptyPreflightResult(normalizeAuthoringDiagnostics(diagnostics));
|
|
19
|
+
}
|
|
13
20
|
let parsed;
|
|
14
21
|
try {
|
|
15
22
|
parsed = await parseDeliveryContractBundle(workdir, repository, {
|
|
@@ -80,6 +87,15 @@ export async function preflightDeliveryContract(workdirInput, projectRootInput =
|
|
|
80
87
|
outcomes: contract.outcomes.map((outcome) => outcome.key),
|
|
81
88
|
source_coverage: sourceCoverage(contract),
|
|
82
89
|
claim_coverage: validation.claims?.summary ?? emptyClaimCoverage(),
|
|
90
|
+
acceptance_reachability: validation.acceptance_reachability ?? {
|
|
91
|
+
completion_authority: contract.task.target_profile.completion_authority,
|
|
92
|
+
total: 0,
|
|
93
|
+
machine_admitted: 0,
|
|
94
|
+
external_fulfillable: 0,
|
|
95
|
+
unreachable: 0,
|
|
96
|
+
obligations: [],
|
|
97
|
+
effective_external_routes: [],
|
|
98
|
+
},
|
|
83
99
|
revision_preview: authoringRevisionPreview(contract, validation.source_hashes, validation.source_items, validation.context_snapshot, active),
|
|
84
100
|
diagnostics: normalizedDiagnostics,
|
|
85
101
|
};
|
|
@@ -113,6 +113,10 @@ function flattenProductSemantics(projection) {
|
|
|
113
113
|
"task.target_profile.required_target_refs",
|
|
114
114
|
[...projection.target_profile.required_target_refs].sort(),
|
|
115
115
|
],
|
|
116
|
+
[
|
|
117
|
+
"task.target_profile.completion_authority",
|
|
118
|
+
projection.target_profile.completion_authority,
|
|
119
|
+
],
|
|
116
120
|
]);
|
|
117
121
|
for (const target of projection.execution_targets) {
|
|
118
122
|
const prefix = `task.execution_targets.${target.key}`;
|
|
@@ -137,10 +137,29 @@ export function projectGlobalSemantics(contract) {
|
|
|
137
137
|
given_refs: [...item.given_refs],
|
|
138
138
|
when_refs: [...item.when_refs],
|
|
139
139
|
})),
|
|
140
|
+
semantic_fact_bindings: contract.global.semantic_fact_bindings
|
|
141
|
+
? {
|
|
142
|
+
manifest_ref: contract.global.semantic_fact_bindings.manifest_ref,
|
|
143
|
+
obligations: [...contract.global.semantic_fact_bindings.obligations]
|
|
144
|
+
.sort((left, right) => globalSemanticObligationKey(left).localeCompare(globalSemanticObligationKey(right)))
|
|
145
|
+
.map((item) => ({ ...item })),
|
|
146
|
+
}
|
|
147
|
+
: null,
|
|
140
148
|
constraints: applicableStatements(contract.global.technical.constraints),
|
|
141
149
|
forbidden_shortcuts: applicableStatements(contract.global.technical.forbidden_shortcuts),
|
|
142
150
|
};
|
|
143
151
|
}
|
|
152
|
+
function globalSemanticObligationKey(item) {
|
|
153
|
+
return [
|
|
154
|
+
item.claim_ref,
|
|
155
|
+
item.applicability_ref,
|
|
156
|
+
item.target_ref,
|
|
157
|
+
item.outcome_ref,
|
|
158
|
+
item.fact_ref,
|
|
159
|
+
item.proof_ref,
|
|
160
|
+
item.method,
|
|
161
|
+
].join("\0");
|
|
162
|
+
}
|
|
144
163
|
function keyedStatements(values) {
|
|
145
164
|
return [...values]
|
|
146
165
|
.sort(keyOrder)
|
|
@@ -30,6 +30,7 @@ export declare const AUTHORITY_FIELD_POLICY_REGISTRIES: {
|
|
|
30
30
|
source_ref: "scope";
|
|
31
31
|
statement: "semantic_user_review";
|
|
32
32
|
disposition: "semantic_user_review";
|
|
33
|
+
judgment_basis: "semantic_user_review";
|
|
33
34
|
};
|
|
34
35
|
readonly risk: {
|
|
35
36
|
requested_level: "semantic_user_review";
|
|
@@ -37,6 +38,7 @@ export declare const AUTHORITY_FIELD_POLICY_REGISTRIES: {
|
|
|
37
38
|
};
|
|
38
39
|
readonly global: {
|
|
39
40
|
applicability: "semantic_user_review";
|
|
41
|
+
semantic_fact_bindings: "semantic_user_review";
|
|
40
42
|
product: "semantic_user_review";
|
|
41
43
|
technical: "semantic_user_review";
|
|
42
44
|
acceptance: "proof_additive";
|
|
@@ -243,6 +245,7 @@ export declare const AUTHORITY_FIELD_POLICY_REGISTRIES: {
|
|
|
243
245
|
applicability_ref: "proof_additive";
|
|
244
246
|
observation: "proof_additive";
|
|
245
247
|
evidence_capabilities: "proof_additive";
|
|
248
|
+
expected_authority_ref: "semantic_user_review";
|
|
246
249
|
operator: "proof_additive";
|
|
247
250
|
expected: "proof_additive";
|
|
248
251
|
};
|
|
@@ -13,6 +13,7 @@ const SOURCE_CLAIM_AUTHORITY_POLICY = {
|
|
|
13
13
|
source_ref: "scope",
|
|
14
14
|
statement: "semantic_user_review",
|
|
15
15
|
disposition: "semantic_user_review",
|
|
16
|
+
judgment_basis: "semantic_user_review",
|
|
16
17
|
};
|
|
17
18
|
const RISK_AUTHORITY_POLICY = {
|
|
18
19
|
requested_level: "semantic_user_review",
|
|
@@ -20,6 +21,7 @@ const RISK_AUTHORITY_POLICY = {
|
|
|
20
21
|
};
|
|
21
22
|
const GLOBAL_AUTHORITY_POLICY = {
|
|
22
23
|
applicability: "semantic_user_review",
|
|
24
|
+
semantic_fact_bindings: "semantic_user_review",
|
|
23
25
|
product: "semantic_user_review",
|
|
24
26
|
technical: "semantic_user_review",
|
|
25
27
|
acceptance: "proof_additive",
|
|
@@ -226,6 +228,7 @@ const ASSERTION_AUTHORITY_POLICY = {
|
|
|
226
228
|
applicability_ref: "proof_additive",
|
|
227
229
|
observation: "proof_additive",
|
|
228
230
|
evidence_capabilities: "proof_additive",
|
|
231
|
+
expected_authority_ref: "semantic_user_review",
|
|
229
232
|
operator: "proof_additive",
|
|
230
233
|
expected: "proof_additive",
|
|
231
234
|
};
|
|
@@ -58,7 +58,8 @@ export function sourceClaimReductions(beforeClaims, afterClaims) {
|
|
|
58
58
|
}
|
|
59
59
|
if (claim.statement !== candidate.statement ||
|
|
60
60
|
claim.source_ref !== candidate.source_ref ||
|
|
61
|
-
claim.disposition.type !== candidate.disposition.type
|
|
61
|
+
claim.disposition.type !== candidate.disposition.type ||
|
|
62
|
+
!same(claim.judgment_basis, candidate.judgment_basis)) {
|
|
62
63
|
changed.push(`${claim.key}:authority_changed`);
|
|
63
64
|
continue;
|
|
64
65
|
}
|
|
@@ -2,6 +2,7 @@ import type { DeliveryControlV2, DeliveryOutcomeV2, ProofSurface } from "./long-
|
|
|
2
2
|
import type { ClaimApplicabilityV2, DeliveryStageV2, ExecutionTargetV2, TargetProfileV2 } from "./long-task-semantic-contract-types.js";
|
|
3
3
|
import type { DeliverySurfaceBindingV2 } from "./long-task-ui-surface-types.js";
|
|
4
4
|
import type { CompiledSourceItemV2 } from "./long-task-source-authority-types.js";
|
|
5
|
+
import type { SemanticFactGlobalBindingsV2 } from "./long-task-semantic-fact-binding-types.js";
|
|
5
6
|
import type { WorkspaceManifestV2 } from "./long-task-workspace-runtime-types.js";
|
|
6
7
|
export interface AuthorityHashesV2 {
|
|
7
8
|
source_authority_hash: string;
|
|
@@ -76,6 +77,7 @@ export interface ProductSemanticProjectionV2 {
|
|
|
76
77
|
}
|
|
77
78
|
export interface GlobalSemanticProjectionV2 {
|
|
78
79
|
applicability: ClaimApplicabilityV2[];
|
|
80
|
+
semantic_fact_bindings: SemanticFactGlobalBindingsV2 | null;
|
|
79
81
|
constraints: Array<{
|
|
80
82
|
key: string;
|
|
81
83
|
statement: string;
|
|
@@ -26,6 +26,7 @@ export function computeAuthorityHashes(contract) {
|
|
|
26
26
|
stages: contract.stages,
|
|
27
27
|
global: {
|
|
28
28
|
applicability: contract.global.applicability,
|
|
29
|
+
semantic_fact_bindings: contract.global.semantic_fact_bindings ?? null,
|
|
29
30
|
product: contract.global.product,
|
|
30
31
|
},
|
|
31
32
|
outcomes: contract.outcomes.map((outcome) => ({
|
|
@@ -44,6 +45,7 @@ export function computeAuthorityHashes(contract) {
|
|
|
44
45
|
})),
|
|
45
46
|
}),
|
|
46
47
|
acceptance_authority_hash: hash({
|
|
48
|
+
global_semantic_fact_bindings: contract.global.semantic_fact_bindings ?? null,
|
|
47
49
|
external_confirmations: contract.global.acceptance.external_confirmations,
|
|
48
50
|
global_checks: contract.global.acceptance.checks.map(acceptanceCheck),
|
|
49
51
|
global_counterfactual_controls: contract.global.acceptance.counterfactual_controls,
|
|
@@ -89,7 +89,7 @@ function parseRunner(value, label) {
|
|
|
89
89
|
function parseAssertions(value, label) {
|
|
90
90
|
return array(value, label).map((item, index) => {
|
|
91
91
|
const itemLabel = `${label}[${index}]`;
|
|
92
|
-
const row = object(item, itemLabel, ["key", "claims", "observation", "operator", "evidence_capabilities"], ["criterion", "applicability_ref", "expected"]);
|
|
92
|
+
const row = object(item, itemLabel, ["key", "claims", "observation", "operator", "evidence_capabilities"], ["criterion", "applicability_ref", "expected", "expected_authority_ref"]);
|
|
93
93
|
const operator = literal(row.operator, [
|
|
94
94
|
"equals",
|
|
95
95
|
"not_equals",
|
|
@@ -128,6 +128,11 @@ function parseAssertions(value, label) {
|
|
|
128
128
|
: {}),
|
|
129
129
|
observation: string(row.observation, `${itemLabel}.observation`),
|
|
130
130
|
evidence_capabilities: array(row.evidence_capabilities, `${itemLabel}.evidence_capabilities`).map((capability, capabilityIndex) => literal(capability, EVIDENCE_CAPABILITIES, `${itemLabel}.evidence_capabilities[${capabilityIndex}]`)),
|
|
131
|
+
...(Object.hasOwn(row, "expected_authority_ref")
|
|
132
|
+
? {
|
|
133
|
+
expected_authority_ref: string(row.expected_authority_ref, `${itemLabel}.expected_authority_ref`),
|
|
134
|
+
}
|
|
135
|
+
: {}),
|
|
131
136
|
operator,
|
|
132
137
|
};
|
|
133
138
|
return isBinaryAssertionOperator(operator)
|
|
@@ -26,9 +26,7 @@ export function generateClaims(outcome) {
|
|
|
26
26
|
.filter((proof) => proof.fact_ref === binding.fact_ref)
|
|
27
27
|
.map((proof) => proof.proof_surface)),
|
|
28
28
|
];
|
|
29
|
-
claims.push(claim(outcome.key, binding.claim_ref, "semantic_fact", requiredSurfaces, [
|
|
30
|
-
binding.applicability_ref,
|
|
31
|
-
]));
|
|
29
|
+
claims.push(claim(outcome.key, binding.claim_ref, "semantic_fact", requiredSurfaces, [binding.applicability_ref], binding.required_polarity ?? "positive"));
|
|
32
30
|
}
|
|
33
31
|
for (const item of outcome.technical.forbidden_shortcuts)
|
|
34
32
|
claims.push(claim(outcome.key, `forbidden_shortcut.${item.key}`, "forbidden_shortcut", [], item.applicability_refs, "negative"));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DeliveryContractV2, EvidenceCapabilityV2, ProductClaimV2 } from "./long-task-delivery-types.js";
|
|
2
|
+
import type { SemanticFactManifestV1 } from "./semantic-fact-types.js";
|
|
3
|
+
export declare function claimSemanticCapabilityFloor(contract: DeliveryContractV2, manifest: SemanticFactManifestV1, outcomeKey: string | null, localClaim: string, applicabilityRef: string | null, claimKind?: ProductClaimV2["kind"] | string, requiredProofSurfaces?: readonly string[]): Set<EvidenceCapabilityV2>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { semanticFactClosureInvalid } from "./long-task-semantic-fact-closure-primitives.js";
|
|
2
|
+
import { semanticFactProofCapabilityFloor } from "./long-task-semantic-proof-profile.js";
|
|
3
|
+
const FACT_REQUIRED_CLAIM_KINDS = new Set([
|
|
4
|
+
"result",
|
|
5
|
+
"requirement",
|
|
6
|
+
"obligation",
|
|
7
|
+
"non_completing",
|
|
8
|
+
"forbidden_shortcut",
|
|
9
|
+
"global_non_goal",
|
|
10
|
+
"global_constraint",
|
|
11
|
+
"global_forbidden_shortcut",
|
|
12
|
+
]);
|
|
13
|
+
export function claimSemanticCapabilityFloor(contract, manifest, outcomeKey, localClaim, applicabilityRef, claimKind, requiredProofSurfaces = []) {
|
|
14
|
+
const selected = outcomeKey
|
|
15
|
+
? selectOutcomeFactRefs(contract, manifest, outcomeKey, localClaim, applicabilityRef)
|
|
16
|
+
: selectGlobalFactRefs(contract, localClaim, applicabilityRef);
|
|
17
|
+
const pureStructure = requiredProofSurfaces.length > 0 &&
|
|
18
|
+
requiredProofSurfaces.every((surface) => surface === "implementation_structure");
|
|
19
|
+
if (claimKind &&
|
|
20
|
+
FACT_REQUIRED_CLAIM_KINDS.has(claimKind) &&
|
|
21
|
+
!pureStructure &&
|
|
22
|
+
!selected.length)
|
|
23
|
+
semanticFactClosureInvalid("broad_claim_semantic_fact_required", `${outcomeKey ?? "GLOBAL"}:${localClaim}:${applicabilityRef ?? "none"}`);
|
|
24
|
+
const facts = new Map(manifest.facts.map((fact) => [fact.key, fact]));
|
|
25
|
+
const result = new Set();
|
|
26
|
+
for (const factRef of selected) {
|
|
27
|
+
const fact = facts.get(factRef);
|
|
28
|
+
for (const proof of manifest.proof_obligations.filter((row) => row.fact_ref === factRef))
|
|
29
|
+
for (const capability of semanticFactProofCapabilityFloor(manifest, fact, proof))
|
|
30
|
+
if (capability !== "semantic_fact")
|
|
31
|
+
result.add(capability);
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
function selectGlobalFactRefs(contract, localClaim, applicabilityRef) {
|
|
36
|
+
return [
|
|
37
|
+
...new Set((contract.global.semantic_fact_bindings?.obligations ?? [])
|
|
38
|
+
.filter((binding) => binding.claim_ref === localClaim &&
|
|
39
|
+
(!applicabilityRef ||
|
|
40
|
+
binding.applicability_ref === applicabilityRef))
|
|
41
|
+
.map((binding) => binding.fact_ref)),
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
function selectOutcomeFactRefs(contract, manifest, outcomeKey, localClaim, applicabilityRef) {
|
|
45
|
+
const outcome = contract.outcomes.find((row) => row.key === outcomeKey);
|
|
46
|
+
if (!outcome)
|
|
47
|
+
return [];
|
|
48
|
+
const applicableFactRefs = new Set(outcome.semantic_fact_bindings.facts
|
|
49
|
+
.filter((binding) => !applicabilityRef || binding.applicability_ref === applicabilityRef)
|
|
50
|
+
.map((binding) => binding.fact_ref));
|
|
51
|
+
const directBinding = outcome.semantic_fact_bindings.facts.find((binding) => binding.claim_ref === localClaim);
|
|
52
|
+
let selected = directBinding ? [directBinding.fact_ref] : [];
|
|
53
|
+
if (!selected.length) {
|
|
54
|
+
const fullClaim = `${outcomeKey}.${localClaim}`;
|
|
55
|
+
const sourceRefs = contract.source_claims
|
|
56
|
+
.filter((source) => sourceOwnsClaim(source.disposition, fullClaim))
|
|
57
|
+
.map((source) => source.key);
|
|
58
|
+
selected = manifest.facts
|
|
59
|
+
.filter((fact) => fact.outcome_ref === outcomeKey &&
|
|
60
|
+
applicableFactRefs.has(fact.key) &&
|
|
61
|
+
sourceRefs.some((sourceRef) => fact.source_item_refs.includes(sourceRef)))
|
|
62
|
+
.map((fact) => fact.key);
|
|
63
|
+
}
|
|
64
|
+
if (!selected.length)
|
|
65
|
+
selected = manifest.facts
|
|
66
|
+
.filter((fact) => fact.outcome_ref === outcomeKey && applicableFactRefs.has(fact.key))
|
|
67
|
+
.map((fact) => fact.key);
|
|
68
|
+
return selected;
|
|
69
|
+
}
|
|
70
|
+
function sourceOwnsClaim(disposition, fullClaim) {
|
|
71
|
+
if (disposition.type === "claim")
|
|
72
|
+
return disposition.refs.includes(fullClaim);
|
|
73
|
+
if (disposition.type === "global_constraint")
|
|
74
|
+
return disposition.refs.includes(fullClaim);
|
|
75
|
+
if (disposition.type === "outcome_result")
|
|
76
|
+
return disposition.ref === fullClaim;
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
@@ -4,25 +4,7 @@ export interface CompiledClaimsV2 {
|
|
|
4
4
|
by_outcome: Record<string, ProductClaimV2[]>;
|
|
5
5
|
summary: ClaimCoverageSummaryV2;
|
|
6
6
|
}
|
|
7
|
-
interface ExternalConfirmationProjectionInput {
|
|
8
|
-
global: {
|
|
9
|
-
acceptance: {
|
|
10
|
-
external_confirmations: readonly {
|
|
11
|
-
blocks_target: boolean;
|
|
12
|
-
impact_claims: readonly string[];
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
interface AllOutcomeExternalConfirmationProjectionInput extends ExternalConfirmationProjectionInput {
|
|
18
|
-
outcomes: readonly {
|
|
19
|
-
key: string;
|
|
20
|
-
}[];
|
|
21
|
-
}
|
|
22
|
-
export declare function outcomeResultExternallyBlocked(contract: ExternalConfirmationProjectionInput, outcomeKey: string): boolean;
|
|
23
|
-
export declare function allOutcomeResultsExternallyBlocked(contract: AllOutcomeExternalConfirmationProjectionInput): boolean;
|
|
24
7
|
export declare function compileProductClaimCoverage(contract: DeliveryContractV2, options?: {
|
|
25
8
|
allow_uncovered?: boolean;
|
|
26
9
|
}): CompiledClaimsV2;
|
|
27
10
|
export declare function assertCompiledClaimsCovered(compiled: CompiledClaimsV2): void;
|
|
28
|
-
export {};
|
|
@@ -2,15 +2,6 @@ import { assertAllClaimsCovered, assertAllGlobalClaimsCovered, generateClaims, g
|
|
|
2
2
|
import { fail } from "./long-task-delivery-shape.js";
|
|
3
3
|
import { validateClaimAssertionOperator, validateGlobalAssertionOperator, } from "./long-task-claim-proof-policy.js";
|
|
4
4
|
import { matchesRepoPattern } from "./long-task-paths.js";
|
|
5
|
-
export function outcomeResultExternallyBlocked(contract, outcomeKey) {
|
|
6
|
-
const resultClaim = `${outcomeKey}.result`;
|
|
7
|
-
return contract.global.acceptance.external_confirmations.some((confirmation) => confirmation.blocks_target &&
|
|
8
|
-
confirmation.impact_claims.includes(resultClaim));
|
|
9
|
-
}
|
|
10
|
-
export function allOutcomeResultsExternallyBlocked(contract) {
|
|
11
|
-
return (contract.outcomes.length > 0 &&
|
|
12
|
-
contract.outcomes.every((outcome) => outcomeResultExternallyBlocked(contract, outcome.key)));
|
|
13
|
-
}
|
|
14
5
|
export function compileProductClaimCoverage(contract, options = {}) {
|
|
15
6
|
const byGlobal = generateGlobalClaims(contract.global);
|
|
16
7
|
const byOutcome = Object.fromEntries(contract.outcomes.map((outcome) => [outcome.key, generateClaims(outcome)]));
|
|
@@ -326,13 +317,9 @@ function addBlockingExternalConfirmationProofs(contract, claim, proofs) {
|
|
|
326
317
|
confirmation.impact_claims.includes(claim.id));
|
|
327
318
|
if (!confirmations.length)
|
|
328
319
|
return;
|
|
329
|
-
const proofSurfaces = "required_proof_surfaces" in claim &&
|
|
330
|
-
claim.required_proof_surfaces.length > 0
|
|
331
|
-
? claim.required_proof_surfaces
|
|
332
|
-
: ["runtime_behavior"];
|
|
333
320
|
for (const confirmation of confirmations)
|
|
334
321
|
for (const applicabilityRef of claim.applicability_refs)
|
|
335
|
-
for (const proofSurface of
|
|
322
|
+
for (const proofSurface of externalClaimProofSurfaces(confirmation, claim, applicabilityRef))
|
|
336
323
|
addProof(proofs, claim.local_key, {
|
|
337
324
|
check_key: `EXTERNAL.${confirmation.key}`,
|
|
338
325
|
assertion_key: null,
|
|
@@ -341,6 +328,20 @@ function addBlockingExternalConfirmationProofs(contract, claim, proofs) {
|
|
|
341
328
|
applicability_ref: applicabilityRef,
|
|
342
329
|
});
|
|
343
330
|
}
|
|
331
|
+
function externalClaimProofSurfaces(confirmation, claim, applicabilityRef) {
|
|
332
|
+
const declared = [
|
|
333
|
+
...new Set((confirmation.obligations ?? [])
|
|
334
|
+
.filter((obligation) => obligation.claim_ref === claim.id &&
|
|
335
|
+
obligation.applicability_ref === applicabilityRef)
|
|
336
|
+
.map((obligation) => obligation.proof_surface)),
|
|
337
|
+
];
|
|
338
|
+
if (declared.length)
|
|
339
|
+
return declared;
|
|
340
|
+
return "required_proof_surfaces" in claim &&
|
|
341
|
+
claim.required_proof_surfaces.length
|
|
342
|
+
? claim.required_proof_surfaces
|
|
343
|
+
: ["runtime_behavior"];
|
|
344
|
+
}
|
|
344
345
|
function sameSet(left, right) {
|
|
345
346
|
return (left.length === right.length &&
|
|
346
347
|
new Set(left).size === left.length &&
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { createProcessTreeObserver, } from "./long-task-process-tree.js";
|
|
3
|
+
import { spawnWindowsJobCommandOnce } from "./long-task-windows-job-supervisor.js";
|
|
3
4
|
const OUTPUT_LIMIT = 2 * 1024 * 1024;
|
|
4
5
|
const PROCESS_TREE_GRACE_MS = 1_000;
|
|
5
6
|
export function spawnCommandOnce(executable, argv, cwd, timeoutMs, environment, containProcessTree) {
|
|
7
|
+
if (containProcessTree && process.platform === "win32")
|
|
8
|
+
return spawnWindowsJobCommandOnce(executable, argv, cwd, timeoutMs, environment, OUTPUT_LIMIT);
|
|
6
9
|
return new Promise((resolve, reject) => {
|
|
7
10
|
const child = spawn(executable, argv, {
|
|
8
11
|
cwd,
|
|
@@ -56,6 +56,9 @@ export function createLongTaskCompactContract(contractInput, factRevisions, obli
|
|
|
56
56
|
fact_revision_digest: revision,
|
|
57
57
|
claim_ref: binding.claim_ref,
|
|
58
58
|
applicability_ref: binding.applicability_ref,
|
|
59
|
+
...(binding.required_polarity
|
|
60
|
+
? { required_polarity: binding.required_polarity }
|
|
61
|
+
: {}),
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
for (const binding of outcome.semantic_fact_bindings.proofs) {
|
|
@@ -82,6 +82,11 @@ export function materializeLongTaskCompactFactBindings(facts, obligations, factB
|
|
|
82
82
|
fact_revision_digest: compactSha256(fact.fact_revision_digest, `${label}.fact_revision_digest`),
|
|
83
83
|
claim_ref: compactStableRef(fact.claim_ref, `${label}.claim_ref`),
|
|
84
84
|
applicability_ref: compactStableRef(fact.applicability_ref, `${label}.applicability_ref`),
|
|
85
|
+
...(Object.hasOwn(fact, "required_polarity")
|
|
86
|
+
? {
|
|
87
|
+
required_polarity: compactPolarity(fact.required_polarity, `${label}.required_polarity`),
|
|
88
|
+
}
|
|
89
|
+
: {}),
|
|
85
90
|
});
|
|
86
91
|
}
|
|
87
92
|
for (const [index, obligation] of obligations.entries()) {
|
|
@@ -107,6 +112,11 @@ export function materializeLongTaskCompactFactBindings(facts, obligations, factB
|
|
|
107
112
|
});
|
|
108
113
|
}
|
|
109
114
|
}
|
|
115
|
+
function compactPolarity(value, label) {
|
|
116
|
+
if (value !== "positive" && value !== "negative")
|
|
117
|
+
compactFail(label, "must be positive or negative");
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
110
120
|
export function materializeLongTaskCompactAssertions(assertions, claims, facts, outcomes) {
|
|
111
121
|
for (const [index, projection] of assertions.entries()) {
|
|
112
122
|
const label = `compact_semantic_carrier.assertion_projections.rows[${index}]`;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { EvidenceCapabilityV2 } from "./long-task-semantic-contract-types.js";
|
|
2
|
+
interface CompleteDeliveryEvidenceBaseV2 {
|
|
3
|
+
assertion_key: string;
|
|
4
|
+
capability: EvidenceCapabilityV2;
|
|
5
|
+
}
|
|
6
|
+
export interface ActualProvenanceEvidenceV2 extends CompleteDeliveryEvidenceBaseV2 {
|
|
7
|
+
capability: "actual_provenance";
|
|
8
|
+
source_kind: "product_runtime" | "observer_runtime" | "durable_store";
|
|
9
|
+
source_ref: string;
|
|
10
|
+
actual_sha256: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DistinctIdentityEvidenceV2 extends CompleteDeliveryEvidenceBaseV2 {
|
|
13
|
+
capability: "distinct_identity";
|
|
14
|
+
identities: Array<{
|
|
15
|
+
identity_ref: string;
|
|
16
|
+
data_state_sha256: string;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface DataStateEvidenceV2 extends CompleteDeliveryEvidenceBaseV2 {
|
|
20
|
+
capability: "data_state";
|
|
21
|
+
state_ref: string;
|
|
22
|
+
state_sha256: string;
|
|
23
|
+
read_session_id: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PopulationCoverageEvidenceV2 extends CompleteDeliveryEvidenceBaseV2 {
|
|
26
|
+
capability: "population_coverage";
|
|
27
|
+
universe_sha256: string;
|
|
28
|
+
observed_sha256: string;
|
|
29
|
+
excluded_sha256: string;
|
|
30
|
+
set_equality: true;
|
|
31
|
+
}
|
|
32
|
+
export interface RecoveryEvidenceV2 extends CompleteDeliveryEvidenceBaseV2 {
|
|
33
|
+
capability: "recovery";
|
|
34
|
+
failure_session_id: string;
|
|
35
|
+
recovery_session_id: string;
|
|
36
|
+
recovered_state_sha256: string;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { DeliveryContractV2 } from "./long-task-contract-types.js";
|
|
2
|
+
import type { VerifierIdentityV2 } from "./long-task-authority-types.js";
|
|
3
|
+
import type { CheckExecutionResultV2, LongTaskFindingV2 } from "./long-task-runtime-types.js";
|
|
4
|
+
import type { ExternalConfirmationEvaluationV1 } from "./long-task-external-confirmation-types.js";
|
|
5
|
+
export interface TargetedVerificationResultV2 {
|
|
6
|
+
schema_version: "long-task-targeted-progress-v2";
|
|
7
|
+
compiled_identity: string;
|
|
8
|
+
snapshot_sha256: string;
|
|
9
|
+
acceptance_authorized: false;
|
|
10
|
+
selected_outcome: string | null;
|
|
11
|
+
selected_check: string | null;
|
|
12
|
+
updated_progress_records: string[];
|
|
13
|
+
check_results: CheckExecutionResultV2[];
|
|
14
|
+
findings: LongTaskFindingV2[];
|
|
15
|
+
repair_frontier?: RepairFrontierV1;
|
|
16
|
+
completed_at: string;
|
|
17
|
+
}
|
|
18
|
+
export interface RepairFrontierCheckV1 {
|
|
19
|
+
check_ref: string;
|
|
20
|
+
outcome_key: string | null;
|
|
21
|
+
check_key: string;
|
|
22
|
+
raw_execution_identity: string;
|
|
23
|
+
obligation_refs: string[];
|
|
24
|
+
reasons: string[];
|
|
25
|
+
}
|
|
26
|
+
export interface RepairFrontierGroupV1 {
|
|
27
|
+
root_cause_key: string;
|
|
28
|
+
finding_codes: string[];
|
|
29
|
+
source_fragment_refs: string[];
|
|
30
|
+
affected_fact_refs: string[];
|
|
31
|
+
affected_proof_obligation_refs: string[];
|
|
32
|
+
affected_claim_refs: string[];
|
|
33
|
+
expected_authority_refs: string[];
|
|
34
|
+
actual_evidence_refs: string[];
|
|
35
|
+
suggested_implementation_owners: string[];
|
|
36
|
+
suggested_owner_paths: string[];
|
|
37
|
+
verification_owners: string[];
|
|
38
|
+
invalidation_reasons: string[];
|
|
39
|
+
rerun_obligation_refs: string[];
|
|
40
|
+
minimum_diagnostic_reverify: string[];
|
|
41
|
+
still_valid_diagnostic_evidence: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface RepairFrontierSessionV1 {
|
|
44
|
+
raw_execution_identity: string;
|
|
45
|
+
check_refs: string[];
|
|
46
|
+
obligation_refs: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface RepairFrontierV1 {
|
|
49
|
+
schema_version: "long-task-repair-frontier-v1";
|
|
50
|
+
authority_scope: "derived_diagnostic_only";
|
|
51
|
+
acceptance_authorized: false;
|
|
52
|
+
persisted: false;
|
|
53
|
+
compiled_identity: string;
|
|
54
|
+
authority_revision: number;
|
|
55
|
+
candidate_snapshot_sha256: string;
|
|
56
|
+
changed_paths: string[];
|
|
57
|
+
summary: {
|
|
58
|
+
finding_groups: number;
|
|
59
|
+
affected_facts: number;
|
|
60
|
+
affected_proof_obligations: number;
|
|
61
|
+
minimum_checks: number;
|
|
62
|
+
still_valid_progress_records: number;
|
|
63
|
+
};
|
|
64
|
+
groups: RepairFrontierGroupV1[];
|
|
65
|
+
minimum_diagnostic_reverify: RepairFrontierCheckV1[];
|
|
66
|
+
rerun_sessions: RepairFrontierSessionV1[];
|
|
67
|
+
still_valid_diagnostic_evidence: string[];
|
|
68
|
+
forbidden_authority_changes_without_revision: {
|
|
69
|
+
fields: string[];
|
|
70
|
+
protected_paths: string[];
|
|
71
|
+
};
|
|
72
|
+
final_gate_requirement: "complete_one_snapshot_rerun_still_required";
|
|
73
|
+
generated_at: string;
|
|
74
|
+
}
|
|
75
|
+
export type OutcomeStatusV2 = "unverified" | "progress_passing" | "progress_failing" | "progress_stale" | "blocked_external";
|
|
76
|
+
export type StageStatusV2 = "locked" | "ready" | "unverified" | "progress_passing" | "progress_failing" | "progress_stale" | "blocked_external";
|
|
77
|
+
export interface FinalReceiptV2 {
|
|
78
|
+
schema_version: "long-task-final-receipt-v2" | "long-task-final-receipt-v3";
|
|
79
|
+
receipt_sha256: string;
|
|
80
|
+
authority_scope: "audit_only";
|
|
81
|
+
reusable_for_acceptance: false;
|
|
82
|
+
workflow_status: "machine_accepted" | "delivery_accepted" | "machine_accepted_external_pending" | "needs_work" | "blocked_external";
|
|
83
|
+
target_profile: DeliveryContractV2["task"]["target_profile"];
|
|
84
|
+
target_state: DeliveryContractV2["task"]["target_profile"]["required_state"] | "not_accepted" | "blocked_external";
|
|
85
|
+
stage_results: Record<string, "passed" | "failed" | "blocked_external" | "blocked_dependency">;
|
|
86
|
+
compiled_identity: string;
|
|
87
|
+
contract_sha256: string;
|
|
88
|
+
snapshot_sha256: string;
|
|
89
|
+
git_head: string;
|
|
90
|
+
git_tree: string;
|
|
91
|
+
source_hashes: Record<string, string>;
|
|
92
|
+
context_hashes: Record<string, string>;
|
|
93
|
+
verifier_identity: VerifierIdentityV2;
|
|
94
|
+
check_results: CheckExecutionResultV2[];
|
|
95
|
+
outcome_results: Record<string, "passed" | "failed" | "blocked_external">;
|
|
96
|
+
external_confirmations: DeliveryContractV2["global"]["acceptance"]["external_confirmations"];
|
|
97
|
+
external_confirmation_results?: ExternalConfirmationEvaluationV1[];
|
|
98
|
+
findings: LongTaskFindingV2[];
|
|
99
|
+
snapshot_preparation_ms: number;
|
|
100
|
+
started_at: string;
|
|
101
|
+
completed_at: string;
|
|
102
|
+
/** Present on newly finalized v3 Receipts; historical Receipts remain audit-only. */
|
|
103
|
+
finalization_identity_sha256?: string;
|
|
104
|
+
}
|
|
105
|
+
export type FinalReceiptV3 = Omit<FinalReceiptV2, "schema_version"> & {
|
|
106
|
+
schema_version: "long-task-final-receipt-v3";
|
|
107
|
+
external_confirmation_results: ExternalConfirmationEvaluationV1[];
|
|
108
|
+
finalization_identity_sha256: string;
|
|
109
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CompiledCheckV2, DeliveryContractV2, EffectiveRiskLevel } from "./long-task-delivery-types.js";
|
|
2
|
+
import type { AcceptanceReachabilityV1 } from "./long-task-acceptance-reachability-types.js";
|
|
2
3
|
type Reporter = (message: string) => void;
|
|
3
4
|
export declare function semanticConformanceRequired(contract: DeliveryContractV2, _effectiveRisk?: EffectiveRiskLevel): boolean;
|
|
4
|
-
export declare function validateSemanticConformance(contract: DeliveryContractV2, effectiveRisk: EffectiveRiskLevel, compiledChecks: CompiledCheckV2[], report?: Reporter): void;
|
|
5
|
+
export declare function validateSemanticConformance(contract: DeliveryContractV2, effectiveRisk: EffectiveRiskLevel, compiledChecks: CompiledCheckV2[], report?: Reporter, reachability?: AcceptanceReachabilityV1 | null): void;
|
|
5
6
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { machineAuthorizedAssertionExists } from "./long-task-acceptance-reachability-helpers.js";
|
|
2
|
+
import { allOutcomeResultsFullyEffectivelyExternallyBlocked } from "./long-task-effective-external-takeover.js";
|
|
2
3
|
export function semanticConformanceRequired(contract, _effectiveRisk) {
|
|
3
4
|
const productFamilies = new Set(contract.task.execution_targets
|
|
4
5
|
.filter((target) => contract.task.target_profile.required_target_refs.includes(target.key))
|
|
@@ -6,18 +7,24 @@ export function semanticConformanceRequired(contract, _effectiveRisk) {
|
|
|
6
7
|
return (contract.risk.facts.weak_observability.length > 0 &&
|
|
7
8
|
(productFamilies.size > 1 || contract.stages.length > 1));
|
|
8
9
|
}
|
|
9
|
-
export function validateSemanticConformance(contract, effectiveRisk, compiledChecks, report) {
|
|
10
|
+
export function validateSemanticConformance(contract, effectiveRisk, compiledChecks, report, reachability) {
|
|
10
11
|
const declared = contract.global.acceptance.checks.filter((check) => check.journey_roles.includes("conformance"));
|
|
11
12
|
if (semanticConformanceRequired(contract, effectiveRisk) &&
|
|
12
13
|
!declared.length &&
|
|
13
|
-
!
|
|
14
|
+
!allOutcomeResultsFullyEffectivelyExternallyBlocked(contract, reachability)) {
|
|
14
15
|
issue(report, "semantic_conformance_check_required", contract.task.id);
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
18
|
for (const check of declared) {
|
|
18
19
|
if (check.runner.effect !== "read_only")
|
|
19
20
|
issue(report, "conformance_check_must_be_read_only", check.key);
|
|
20
|
-
if (!
|
|
21
|
+
if (!machineAuthorizedAssertionExists(compiledChecks, {
|
|
22
|
+
authority_scope: "ordinary_claim",
|
|
23
|
+
outcome_key: null,
|
|
24
|
+
check_key: check.key,
|
|
25
|
+
check_journey_role: "conformance",
|
|
26
|
+
required_evidence_capability: "target_runtime",
|
|
27
|
+
}))
|
|
21
28
|
issue(report, "conformance_target_runtime_evidence_required", check.key);
|
|
22
29
|
const compiled = compiledChecks.find((candidate) => candidate.outcome_key === null && candidate.key === check.key);
|
|
23
30
|
if (!compiled)
|