project-tiny-context-harness 0.8.16 → 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 +119 -41
- package/assets/README.md +184 -55
- package/assets/README.zh-CN.md +114 -40
- package/assets/agents/AGENTS_CORE.md +2 -2
- package/assets/context_templates/context.toml +6 -1
- package/assets/context_templates/screen-contract.md +16 -0
- 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/context_development_engineer/SKILL.md +16 -30
- package/assets/skills/context_development_engineer/references/engineering-design-reasoning.md +93 -0
- package/assets/skills/context_surface_contract/SKILL.md +13 -2
- package/assets/skills/context_uiux_design/SKILL.md +7 -3
- package/assets/skills/context_uiux_design/references/task-uiux-analysis.md +82 -0
- package/assets/skills/design-resource-authoring/SKILL.md +18 -9
- package/assets/skills/design-resource-authoring/references/authority-delta-assessment.md +52 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +22 -6
- package/assets/skills/design-resource-authoring/references/formal-selected-web-app-handoff.md +26 -8
- package/assets/skills/design-resource-authoring/references/implementation-feasibility.md +111 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +45 -7
- package/assets/skills/design-resource-authoring/references/recovery-and-writeback.md +7 -1
- package/assets/skills/design-resource-authoring/references/resource-selection.md +115 -3
- 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 +17 -3
- 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-bundle.js +5 -0
- package/dist/lib/design-resource-handoff-input-types.d.ts +1 -1
- package/dist/lib/design-resource-handoff-manifest-projection.js +4 -0
- package/dist/lib/design-resource-handoff-set-integrity.js +1 -0
- package/dist/lib/design-resource-handoff-shape.js +18 -2
- package/dist/lib/design-resource-handoff-types.d.ts +8 -0
- package/dist/lib/design-resource-handoff-validation.js +24 -0
- package/dist/lib/design-resource-implementation-feasibility-model.d.ts +35 -0
- package/dist/lib/design-resource-implementation-feasibility-model.js +62 -0
- package/dist/lib/design-resource-implementation-feasibility-shape-sections.d.ts +43 -0
- package/dist/lib/design-resource-implementation-feasibility-shape-sections.js +142 -0
- package/dist/lib/design-resource-implementation-feasibility-shape.d.ts +4 -0
- package/dist/lib/design-resource-implementation-feasibility-shape.js +154 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision-projection.d.ts +24 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision-projection.js +106 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision.d.ts +21 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision.js +75 -0
- package/dist/lib/design-resource-implementation-feasibility-types.d.ts +135 -0
- package/dist/lib/design-resource-implementation-feasibility-types.js +37 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-cells.d.ts +5 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-cells.js +125 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-document.d.ts +4 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-document.js +167 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-facts.d.ts +3 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-facts.js +76 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-realizations.d.ts +8 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-realizations.js +76 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-support.d.ts +10 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-support.js +75 -0
- package/dist/lib/design-resource-implementation-feasibility-validation.d.ts +3 -0
- package/dist/lib/design-resource-implementation-feasibility-validation.js +138 -0
- 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 +9 -1
- package/dist/lib/design-resource-symbolic-fact-types.d.ts +8 -0
- package/dist/lib/design-resource-symbolic-fact-validation.js +25 -0
- 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 +96 -23
- 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-runner.js +3 -296
- 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.d.ts +9 -0
- package/dist/lib/long-task-command-process.js +178 -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 +11 -3
- package/dist/lib/long-task-delivery-validation.js +23 -8
- package/dist/lib/long-task-design-feasibility-binding-owners.d.ts +6 -0
- package/dist/lib/long-task-design-feasibility-binding-owners.js +52 -0
- package/dist/lib/long-task-design-feasibility-binding.d.ts +14 -0
- package/dist/lib/long-task-design-feasibility-binding.js +114 -0
- package/dist/lib/long-task-design-feasibility-source-closure.d.ts +11 -0
- package/dist/lib/long-task-design-feasibility-source-closure.js +87 -0
- 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 +5 -3
- package/dist/lib/long-task-design-resource-handoff.js +64 -4
- package/dist/lib/long-task-design-resource-method-binding.js +20 -2
- 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 +129 -6
- 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 +9 -0
- package/dist/lib/long-task-process-table.js +87 -0
- package/dist/lib/long-task-process-tree.d.ts +8 -0
- package/dist/lib/long-task-process-tree.js +108 -0
- 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-protected-files.d.ts +1 -1
- package/dist/lib/long-task-protected-files.js +1 -1
- 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-ui-surface-policy.d.ts +2 -1
- package/dist/lib/long-task-ui-surface-policy.js +7 -4
- package/dist/lib/long-task-ui-surface-validation.d.ts +3 -1
- package/dist/lib/long-task-ui-surface-validation.js +2 -2
- 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 +3 -0
- package/dist/lib/repository-path-safety.js +39 -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 +6 -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
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { machineAuthorizedAssertionExists } from "./long-task-acceptance-reachability-helpers.js";
|
|
2
|
+
import { outcomePopulationSemanticProofFullyEffectivelyExternallyBlocked, outcomeResultFullyEffectivelyExternallyBlocked, } from "./long-task-effective-external-takeover.js";
|
|
3
|
+
import { outcomeUiProofFullyEffectivelyExternallyBlocked } from "./long-task-effective-external-ui-takeover.js";
|
|
2
4
|
const STRICT_FACTS = new Set([
|
|
3
5
|
"public_api_or_schema_change",
|
|
4
6
|
"persistent_data_change",
|
|
@@ -39,32 +41,44 @@ export function classifyLongTaskRisk(contract) {
|
|
|
39
41
|
reasons_by_outcome: reasonsByOutcome,
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
|
-
export function validateRiskProof(contract, decision) {
|
|
44
|
+
export function validateRiskProof(contract, decision, reachability, compiledOutcomes) {
|
|
43
45
|
const errors = [];
|
|
44
46
|
if (!contract.outcomes.length)
|
|
45
47
|
errors.push("outcome_required");
|
|
46
48
|
for (const check of contract.global.acceptance.checks)
|
|
47
49
|
validateCheck(check, "global", errors);
|
|
48
50
|
for (const outcome of contract.outcomes)
|
|
49
|
-
validateOutcome(contract, outcome, errors);
|
|
51
|
+
validateOutcome(contract, outcome, errors, reachability, compiledOutcomes?.find((candidate) => candidate.key === outcome.key), compiledOutcomes !== undefined);
|
|
50
52
|
if (decision.effective_level === "strict")
|
|
51
|
-
validateStrict(contract, decision, errors);
|
|
53
|
+
validateStrict(contract, decision, errors, reachability, compiledOutcomes);
|
|
52
54
|
if (errors.length)
|
|
53
55
|
throw new Error(`delivery_contract_preflight_failed:\n${errors.join("\n")}`);
|
|
54
56
|
}
|
|
55
|
-
function validateOutcome(contract, outcome, errors) {
|
|
56
|
-
const
|
|
57
|
-
const resultExternallyBlocked =
|
|
58
|
-
|
|
57
|
+
function validateOutcome(contract, outcome, errors, reachability, compiledOutcome, useCompiledAuthority = false) {
|
|
58
|
+
const declaredChecks = new Map(outcome.acceptance.checks.map((check) => [check.key, check]));
|
|
59
|
+
const resultExternallyBlocked = outcomeResultFullyEffectivelyExternallyBlocked(outcome, reachability);
|
|
60
|
+
const hasMachineProof = useCompiledAuthority
|
|
61
|
+
? machineAuthorizedAssertionExists(compiledOutcome?.acceptance.checks ?? [], { authority_scope: "ordinary_claim", outcome_key: outcome.key })
|
|
62
|
+
: declaredChecks.size > 0;
|
|
63
|
+
if (!hasMachineProof && !resultExternallyBlocked)
|
|
59
64
|
errors.push(`outcome_without_executable_check:${outcome.key}`);
|
|
60
65
|
if (!outcome.technical.expected_change_paths.length)
|
|
61
66
|
errors.push(`expected_change_paths_empty:${outcome.key}`);
|
|
62
|
-
for (const check of
|
|
67
|
+
for (const check of declaredChecks.values())
|
|
63
68
|
validateCheck(check, outcome.key, errors);
|
|
69
|
+
const hasMachineUiProof = useCompiledAuthority
|
|
70
|
+
? machineAuthorizedAssertionExists(compiledOutcome?.acceptance.checks ?? [], {
|
|
71
|
+
authority_scope: "ordinary_claim",
|
|
72
|
+
outcome_key: outcome.key,
|
|
73
|
+
proof_surface: "ui_browser",
|
|
74
|
+
})
|
|
75
|
+
: [...declaredChecks.values()].some((check) => check.proof_surface === "ui_browser");
|
|
76
|
+
const uiProofExternallyBlocked = useCompiledAuthority &&
|
|
77
|
+
outcomeUiProofFullyEffectivelyExternallyBlocked(contract, outcome, reachability);
|
|
64
78
|
if ((outcome.product.owner_surfaces.length ||
|
|
65
79
|
outcome.product.controls.length) &&
|
|
66
|
-
!
|
|
67
|
-
!
|
|
80
|
+
!hasMachineUiProof &&
|
|
81
|
+
!uiProofExternallyBlocked)
|
|
68
82
|
errors.push(`ui_outcome_requires_ui_browser_proof:${outcome.key}`);
|
|
69
83
|
const referenced = [
|
|
70
84
|
...(outcome.acceptance.population
|
|
@@ -75,18 +89,28 @@ function validateOutcome(contract, outcome, errors) {
|
|
|
75
89
|
...outcome.technical.bindings.flatMap((binding) => binding.verification_check_key ? [binding.verification_check_key] : []),
|
|
76
90
|
];
|
|
77
91
|
for (const checkKey of referenced)
|
|
78
|
-
if (!
|
|
92
|
+
if (!declaredChecks.has(checkKey))
|
|
79
93
|
errors.push(`outcome_check_reference_unknown:${outcome.key}:${checkKey}`);
|
|
80
94
|
}
|
|
81
|
-
function validateStrict(contract, decision, errors) {
|
|
95
|
+
function validateStrict(contract, decision, errors, reachability, compiledOutcomes) {
|
|
82
96
|
const explicitStrictWithoutFacts = contract.risk.requested_level === "strict" && decision.reasons.length === 0;
|
|
83
97
|
for (const outcome of contract.outcomes) {
|
|
84
|
-
if (
|
|
98
|
+
if (outcomeResultFullyEffectivelyExternallyBlocked(outcome, reachability))
|
|
85
99
|
continue;
|
|
100
|
+
const compiledOutcome = compiledOutcomes?.find((candidate) => candidate.key === outcome.key);
|
|
101
|
+
const useCompiledAuthority = compiledOutcomes !== undefined;
|
|
86
102
|
const facts = new Set(decision.reasons_by_outcome[outcome.key]);
|
|
87
103
|
const checks = outcome.acceptance.checks;
|
|
88
|
-
const hasNegative =
|
|
89
|
-
|
|
104
|
+
const hasNegative = useCompiledAuthority
|
|
105
|
+
? machineAuthorizedAssertionExists(compiledOutcome?.acceptance.checks ?? [], {
|
|
106
|
+
authority_scope: "ordinary_claim",
|
|
107
|
+
outcome_key: outcome.key,
|
|
108
|
+
polarity: "negative",
|
|
109
|
+
})
|
|
110
|
+
: checks.some((check) => check.negative_assertions.length > 0);
|
|
111
|
+
const hasCounterfactual = useCompiledAuthority
|
|
112
|
+
? hasMachineCounterfactual(compiledOutcome)
|
|
113
|
+
: outcome.acceptance.counterfactual_controls.length > 0;
|
|
90
114
|
if (explicitStrictWithoutFacts) {
|
|
91
115
|
if (!hasNegative)
|
|
92
116
|
errors.push(`strict_negative_assertion_required:${outcome.key}`);
|
|
@@ -95,11 +119,11 @@ function validateStrict(contract, decision, errors) {
|
|
|
95
119
|
}
|
|
96
120
|
if (facts.has("security_boundary_change") ||
|
|
97
121
|
facts.has("permission_boundary_change"))
|
|
98
|
-
requireStrictProof(outcome, "security_boundary", hasNegative, hasCounterfactual, errors);
|
|
122
|
+
requireStrictProof(outcome, "security_boundary", hasMachineSurfaceProof(outcome, compiledOutcome, "security_boundary", useCompiledAuthority), hasNegative, hasCounterfactual, errors);
|
|
99
123
|
if (facts.has("public_api_or_schema_change"))
|
|
100
|
-
requireStrictProof(outcome, "api_contract", hasNegative, hasCounterfactual, errors);
|
|
124
|
+
requireStrictProof(outcome, "api_contract", hasMachineSurfaceProof(outcome, compiledOutcome, "api_contract", useCompiledAuthority), hasNegative, hasCounterfactual, errors);
|
|
101
125
|
if (facts.has("persistent_data_change") || facts.has("data_migration")) {
|
|
102
|
-
requireStrictProof(outcome, "data_state", hasNegative, hasCounterfactual, errors);
|
|
126
|
+
requireStrictProof(outcome, "data_state", hasMachineSurfaceProof(outcome, compiledOutcome, "data_state", useCompiledAuthority), hasNegative, hasCounterfactual, errors);
|
|
103
127
|
if (!outcome.technical.rollback_and_recovery)
|
|
104
128
|
errors.push(`strict_rollback_and_recovery_required:${outcome.key}`);
|
|
105
129
|
}
|
|
@@ -107,20 +131,45 @@ function validateStrict(contract, decision, errors) {
|
|
|
107
131
|
!outcome.technical.rollback_and_recovery)
|
|
108
132
|
errors.push(`strict_rollback_and_recovery_required:${outcome.key}`);
|
|
109
133
|
if (facts.has("full_population_operation")) {
|
|
110
|
-
if (!
|
|
134
|
+
if (!strictPopulationCoverageProofSatisfied(outcome, compiledOutcome, reachability, useCompiledAuthority))
|
|
111
135
|
errors.push(`strict_population_coverage_proof_required:${outcome.key}`);
|
|
112
136
|
if (!outcome.acceptance.population)
|
|
113
137
|
errors.push(`strict_population_declaration_required:${outcome.key}`);
|
|
114
138
|
}
|
|
115
139
|
if (facts.has("critical_user_path") &&
|
|
116
140
|
facts.has("weak_observability") &&
|
|
117
|
-
!
|
|
118
|
-
|
|
141
|
+
!(hasMachineSurfaceProof(outcome, compiledOutcome, "ui_browser", useCompiledAuthority) ||
|
|
142
|
+
hasMachineSurfaceProof(outcome, compiledOutcome, "runtime_behavior", useCompiledAuthority)))
|
|
119
143
|
errors.push(`strict_critical_path_observable_proof_required:${outcome.key}`);
|
|
120
144
|
}
|
|
121
145
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
146
|
+
function strictPopulationCoverageProofSatisfied(outcome, compiledOutcome, reachability, useCompiledAuthority) {
|
|
147
|
+
return (hasMachineSurfaceProof(outcome, compiledOutcome, "population_coverage", useCompiledAuthority) ||
|
|
148
|
+
(useCompiledAuthority &&
|
|
149
|
+
outcomePopulationSemanticProofFullyEffectivelyExternallyBlocked(outcome, reachability)));
|
|
150
|
+
}
|
|
151
|
+
function hasMachineSurfaceProof(outcome, compiledOutcome, surface, useCompiledAuthority) {
|
|
152
|
+
return useCompiledAuthority
|
|
153
|
+
? machineAuthorizedAssertionExists(compiledOutcome?.acceptance.checks ?? [], {
|
|
154
|
+
authority_scope: "ordinary_claim",
|
|
155
|
+
outcome_key: outcome.key,
|
|
156
|
+
proof_surface: surface,
|
|
157
|
+
})
|
|
158
|
+
: outcome.acceptance.checks.some((check) => check.proof_surface === surface);
|
|
159
|
+
}
|
|
160
|
+
function hasMachineCounterfactual(outcome) {
|
|
161
|
+
if (!outcome)
|
|
162
|
+
return false;
|
|
163
|
+
return outcome.acceptance.counterfactual_controls.some((control) => control.claims.length > 0 &&
|
|
164
|
+
control.expected_assertion_failures.some((assertionRef) => machineAuthorizedAssertionExists(outcome.acceptance.checks, {
|
|
165
|
+
authority_scope: "ordinary_claim",
|
|
166
|
+
outcome_key: outcome.key,
|
|
167
|
+
check_key: control.check_key,
|
|
168
|
+
assertion_key: assertionRef,
|
|
169
|
+
})));
|
|
170
|
+
}
|
|
171
|
+
function requireStrictProof(outcome, surface, hasSurfaceProof, hasNegative, hasCounterfactual, errors) {
|
|
172
|
+
if (!hasSurfaceProof)
|
|
124
173
|
errors.push(`strict_${surface}_proof_required:${outcome.key}`);
|
|
125
174
|
if (!hasNegative)
|
|
126
175
|
errors.push(`strict_negative_assertion_required:${outcome.key}`);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseGlobalCounterfactuals } from "./long-task-acceptance-shape.js";
|
|
2
|
+
import { parseSemanticFactGlobalBindings } from "./long-task-semantic-fact-shape.js";
|
|
2
3
|
import { parseCheck } from "./long-task-check-shape.js";
|
|
3
|
-
import { array, boolean, key, literal, object, parseApplicableKeyedStatements, parseClaimApplicability, parseKeyedPaths, repositoryFiles, string, strings, } from "./long-task-delivery-shape.js";
|
|
4
|
+
import { array, boolean, EVIDENCE_CAPABILITIES, key, literal, object, parseApplicableKeyedStatements, parseClaimApplicability, parseKeyedPaths, repositoryFile, repositoryFiles, string, strings, } from "./long-task-delivery-shape.js";
|
|
4
5
|
import { EXECUTION_TARGET_CAPABILITIES } from "./execution-target-capabilities.js";
|
|
5
6
|
const RISK_FACTS = [
|
|
6
7
|
"public_api_or_schema_change",
|
|
@@ -24,12 +25,7 @@ export function parseTask(value) {
|
|
|
24
25
|
"source_paths",
|
|
25
26
|
"context_refs",
|
|
26
27
|
], ["context_snapshot_mode"]);
|
|
27
|
-
const targetProfile = object(row.target_profile, "task.target_profile", [
|
|
28
|
-
"key",
|
|
29
|
-
"description",
|
|
30
|
-
"required_state",
|
|
31
|
-
"required_target_refs",
|
|
32
|
-
]);
|
|
28
|
+
const targetProfile = object(row.target_profile, "task.target_profile", ["key", "description", "required_state", "required_target_refs"], ["completion_authority"]);
|
|
33
29
|
return {
|
|
34
30
|
id: key(row.id, "task.id"),
|
|
35
31
|
title: string(row.title, "task.title"),
|
|
@@ -43,6 +39,9 @@ export function parseTask(value) {
|
|
|
43
39
|
"production_release_ready",
|
|
44
40
|
], "task.target_profile.required_state"),
|
|
45
41
|
required_target_refs: strings(targetProfile.required_target_refs, "task.target_profile.required_target_refs").map((item, index) => key(item, `task.target_profile.required_target_refs[${index}]`)),
|
|
42
|
+
completion_authority: Object.hasOwn(targetProfile, "completion_authority")
|
|
43
|
+
? literal(targetProfile.completion_authority, ["machine_only", "declared_authorities"], "task.target_profile.completion_authority")
|
|
44
|
+
: "machine_only",
|
|
46
45
|
},
|
|
47
46
|
execution_targets: array(row.execution_targets, "task.execution_targets").map((item, index) => {
|
|
48
47
|
const label = `task.execution_targets[${index}]`;
|
|
@@ -119,7 +118,13 @@ export function parseRisk(value) {
|
|
|
119
118
|
};
|
|
120
119
|
}
|
|
121
120
|
export function parseGlobal(value) {
|
|
122
|
-
const row = object(value, "global", [], [
|
|
121
|
+
const row = object(value, "global", [], [
|
|
122
|
+
"applicability",
|
|
123
|
+
"semantic_fact_bindings",
|
|
124
|
+
"product",
|
|
125
|
+
"technical",
|
|
126
|
+
"acceptance",
|
|
127
|
+
]);
|
|
123
128
|
const product = object(Object.hasOwn(row, "product") ? row.product : {}, "global.product", [], ["non_goals"]);
|
|
124
129
|
const technical = object(Object.hasOwn(row, "technical") ? row.technical : {}, "global.technical", [], ["constraints", "forbidden_paths", "forbidden_shortcuts"]);
|
|
125
130
|
const acceptance = object(Object.hasOwn(row, "acceptance") ? row.acceptance : {}, "global.acceptance", [], ["checks", "counterfactual_controls", "external_confirmations"]);
|
|
@@ -127,6 +132,11 @@ export function parseGlobal(value) {
|
|
|
127
132
|
applicability: Object.hasOwn(row, "applicability")
|
|
128
133
|
? parseClaimApplicability(row.applicability, "global.applicability")
|
|
129
134
|
: [],
|
|
135
|
+
...(Object.hasOwn(row, "semantic_fact_bindings")
|
|
136
|
+
? {
|
|
137
|
+
semantic_fact_bindings: parseSemanticFactGlobalBindings(row.semantic_fact_bindings, "global.semantic_fact_bindings"),
|
|
138
|
+
}
|
|
139
|
+
: {}),
|
|
130
140
|
product: {
|
|
131
141
|
non_goals: Object.hasOwn(product, "non_goals")
|
|
132
142
|
? parseApplicableKeyedStatements(product.non_goals, "global.product.non_goals")
|
|
@@ -160,6 +170,13 @@ export function parseGlobal(value) {
|
|
|
160
170
|
"kind",
|
|
161
171
|
"impact_claims",
|
|
162
172
|
"blocks_target",
|
|
173
|
+
], [
|
|
174
|
+
"actor",
|
|
175
|
+
"target_ref",
|
|
176
|
+
"environment_identity",
|
|
177
|
+
"scenario",
|
|
178
|
+
"evidence_requirements",
|
|
179
|
+
"obligations",
|
|
163
180
|
]);
|
|
164
181
|
return {
|
|
165
182
|
key: key(entry.key, `${label}.key`),
|
|
@@ -174,9 +191,132 @@ export function parseGlobal(value) {
|
|
|
174
191
|
], `${label}.kind`),
|
|
175
192
|
impact_claims: strings(entry.impact_claims, `${label}.impact_claims`),
|
|
176
193
|
blocks_target: boolean(entry.blocks_target, `${label}.blocks_target`),
|
|
194
|
+
...(Object.hasOwn(entry, "actor")
|
|
195
|
+
? { actor: parseExternalActor(entry.actor, `${label}.actor`) }
|
|
196
|
+
: {}),
|
|
197
|
+
...(Object.hasOwn(entry, "target_ref")
|
|
198
|
+
? { target_ref: key(entry.target_ref, `${label}.target_ref`) }
|
|
199
|
+
: {}),
|
|
200
|
+
...(Object.hasOwn(entry, "environment_identity")
|
|
201
|
+
? {
|
|
202
|
+
environment_identity: string(entry.environment_identity, `${label}.environment_identity`),
|
|
203
|
+
}
|
|
204
|
+
: {}),
|
|
205
|
+
...(Object.hasOwn(entry, "scenario")
|
|
206
|
+
? {
|
|
207
|
+
scenario: parseExternalScenario(entry.scenario, `${label}.scenario`),
|
|
208
|
+
}
|
|
209
|
+
: {}),
|
|
210
|
+
...(Object.hasOwn(entry, "evidence_requirements")
|
|
211
|
+
? {
|
|
212
|
+
evidence_requirements: parseExternalStatements(entry.evidence_requirements, `${label}.evidence_requirements`),
|
|
213
|
+
}
|
|
214
|
+
: {}),
|
|
215
|
+
...(Object.hasOwn(entry, "obligations")
|
|
216
|
+
? {
|
|
217
|
+
obligations: parseExternalObligations(entry.obligations, `${label}.obligations`),
|
|
218
|
+
}
|
|
219
|
+
: {}),
|
|
177
220
|
};
|
|
178
221
|
})
|
|
179
222
|
: [],
|
|
180
223
|
},
|
|
181
224
|
};
|
|
182
225
|
}
|
|
226
|
+
function parseExternalActor(value, label) {
|
|
227
|
+
const row = object(value, label, ["id", "role", "authority_kind"], ["identity_assurance"]);
|
|
228
|
+
return {
|
|
229
|
+
id: string(row.id, `${label}.id`),
|
|
230
|
+
role: string(row.role, `${label}.role`),
|
|
231
|
+
authority_kind: literal(row.authority_kind, ["human", "expert", "external_system"], `${label}.authority_kind`),
|
|
232
|
+
...(Object.hasOwn(row, "identity_assurance")
|
|
233
|
+
? {
|
|
234
|
+
identity_assurance: parseExternalIdentityAssurance(row.identity_assurance, `${label}.identity_assurance`),
|
|
235
|
+
}
|
|
236
|
+
: {}),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function parseExternalIdentityAssurance(value, label) {
|
|
240
|
+
const tagged = object(value, label, ["scheme"], ["key_id", "public_key_ref"]);
|
|
241
|
+
const scheme = literal(tagged.scheme, ["ed25519", "declared_only"], `${label}.scheme`);
|
|
242
|
+
if (scheme === "declared_only") {
|
|
243
|
+
object(value, label, ["scheme"]);
|
|
244
|
+
return { scheme };
|
|
245
|
+
}
|
|
246
|
+
const row = object(value, label, ["scheme", "key_id", "public_key_ref"]);
|
|
247
|
+
return {
|
|
248
|
+
scheme,
|
|
249
|
+
key_id: key(row.key_id, `${label}.key_id`),
|
|
250
|
+
public_key_ref: repositoryFile(row.public_key_ref, `${label}.public_key_ref`),
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function parseExternalScenario(value, label) {
|
|
254
|
+
const row = object(value, label, ["given", "when"]);
|
|
255
|
+
return {
|
|
256
|
+
given: parseExternalStatements(row.given, `${label}.given`),
|
|
257
|
+
when: parseExternalStatements(row.when, `${label}.when`),
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function parseExternalStatements(value, label) {
|
|
261
|
+
return array(value, label).map((item, index) => {
|
|
262
|
+
const itemLabel = `${label}[${index}]`;
|
|
263
|
+
const row = object(item, itemLabel, ["key", "statement"]);
|
|
264
|
+
return {
|
|
265
|
+
key: key(row.key, `${itemLabel}.key`),
|
|
266
|
+
statement: string(row.statement, `${itemLabel}.statement`),
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function parseExternalObligations(value, label) {
|
|
271
|
+
return array(value, label).map((item, index) => {
|
|
272
|
+
const itemLabel = `${label}[${index}]`;
|
|
273
|
+
const row = object(item, itemLabel, [
|
|
274
|
+
"key",
|
|
275
|
+
"claim_ref",
|
|
276
|
+
"applicability_ref",
|
|
277
|
+
"fact_ref",
|
|
278
|
+
"proof_ref",
|
|
279
|
+
"method",
|
|
280
|
+
"proof_surface",
|
|
281
|
+
"evidence_capabilities",
|
|
282
|
+
"expected_authority_ref",
|
|
283
|
+
"result_kind",
|
|
284
|
+
], ["judgment_basis"]);
|
|
285
|
+
return {
|
|
286
|
+
key: key(row.key, `${itemLabel}.key`),
|
|
287
|
+
claim_ref: string(row.claim_ref, `${itemLabel}.claim_ref`),
|
|
288
|
+
applicability_ref: key(row.applicability_ref, `${itemLabel}.applicability_ref`),
|
|
289
|
+
fact_ref: row.fact_ref === null
|
|
290
|
+
? null
|
|
291
|
+
: string(row.fact_ref, `${itemLabel}.fact_ref`),
|
|
292
|
+
proof_ref: row.proof_ref === null
|
|
293
|
+
? null
|
|
294
|
+
: string(row.proof_ref, `${itemLabel}.proof_ref`),
|
|
295
|
+
method: string(row.method, `${itemLabel}.method`),
|
|
296
|
+
proof_surface: literal(row.proof_surface, [
|
|
297
|
+
"ui_browser",
|
|
298
|
+
"runtime_behavior",
|
|
299
|
+
"api_contract",
|
|
300
|
+
"data_state",
|
|
301
|
+
"security_boundary",
|
|
302
|
+
"population_coverage",
|
|
303
|
+
"implementation_structure",
|
|
304
|
+
], `${itemLabel}.proof_surface`),
|
|
305
|
+
evidence_capabilities: strings(row.evidence_capabilities, `${itemLabel}.evidence_capabilities`).map((capability, capabilityIndex) => literal(capability, EVIDENCE_CAPABILITIES, `${itemLabel}.evidence_capabilities[${capabilityIndex}]`)),
|
|
306
|
+
expected_authority_ref: string(row.expected_authority_ref, `${itemLabel}.expected_authority_ref`),
|
|
307
|
+
result_kind: literal(row.result_kind, ["actual", "judgment"], `${itemLabel}.result_kind`),
|
|
308
|
+
...(Object.hasOwn(row, "judgment_basis")
|
|
309
|
+
? {
|
|
310
|
+
judgment_basis: parseExternalJudgmentBasis(row.judgment_basis, `${itemLabel}.judgment_basis`),
|
|
311
|
+
}
|
|
312
|
+
: {}),
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function parseExternalJudgmentBasis(value, label) {
|
|
317
|
+
const row = object(value, label, ["kind", "source_ref"]);
|
|
318
|
+
return {
|
|
319
|
+
kind: literal(row.kind, ["subjective_preference", "expert_assessment", "authorization"], `${label}.kind`),
|
|
320
|
+
source_ref: key(row.source_ref, `${label}.source_ref`),
|
|
321
|
+
};
|
|
322
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CompiledCheckV2, CompiledDesignTargetV2, DeliveryCheckV2, ExecutionTargetV2, SemanticFactExpectationV2, SourceBackedExecutionTargetV2, WorkspaceManifestV2 } from "./long-task-delivery-types.js";
|
|
2
2
|
import type { ScopedDeliveryBindingV2 } from "./long-task-scoped-binding.js";
|
|
3
|
-
|
|
3
|
+
import type { CheckProofAdequacyV2 } from "./long-task-proof-adequacy.js";
|
|
4
|
+
export declare function freezeDeliveryCheck(check: DeliveryCheckV2, outcomeKey: string | null, repository: string, baseline: WorkspaceManifestV2, executionTarget: ExecutionTargetV2, knownExecutionTargets: ExecutionTargetV2[], designConformanceTargets: CompiledDesignTargetV2[], semanticFactExpectations: SemanticFactExpectationV2[], productionBindings: ScopedDeliveryBindingV2[], productionOwnerPaths: string[], sourceBackedExecutionTarget: SourceBackedExecutionTargetV2 | null, protectedAuthorityPaths?: readonly string[], proofAdequacy?: CheckProofAdequacyV2, externalDesignObligationRefs?: ReadonlySet<string>, externalClaimObligationRefsByAssertion?: ReadonlyMap<string, string>): Promise<CompiledCheckV2>;
|
|
4
5
|
export declare function playwrightConfigArgument(argv: readonly string[]): string | null;
|
|
@@ -8,12 +8,18 @@ import { canonicalValueJson, sha256Hex } from "./strict-codec.js";
|
|
|
8
8
|
import { repoRelative, resolveInsideRepository, } from "./long-task-workspace.js";
|
|
9
9
|
import { evidenceAdapterForRunner } from "./long-task-evidence-adapter-policy.js";
|
|
10
10
|
import { freezeLocalVerifierDependencyClosure, packageScriptVerifierRoots, } from "./long-task-verifier-dependency-closure.js";
|
|
11
|
-
import { compileObservationAuthorityPlan } from "./long-task-observation-authority.js";
|
|
11
|
+
import { compileObservationAuthorityPlan, projectExternallyOwnedClaimAssertions, projectExternallyOwnedDesignAssertions, } from "./long-task-observation-authority.js";
|
|
12
12
|
import { compileProcessRuntimeClosure } from "./long-task-process-runtime-closure.js";
|
|
13
|
-
export async function freezeDeliveryCheck(check, outcomeKey, repository, baseline, executionTarget, knownExecutionTargets, designConformanceTargets, semanticFactExpectations, productionBindings, productionOwnerPaths, sourceBackedExecutionTarget, protectedAuthorityPaths = []
|
|
13
|
+
export async function freezeDeliveryCheck(check, outcomeKey, repository, baseline, executionTarget, knownExecutionTargets, designConformanceTargets, semanticFactExpectations, productionBindings, productionOwnerPaths, sourceBackedExecutionTarget, protectedAuthorityPaths = [], proofAdequacy = {
|
|
14
|
+
completion_role: "diagnostic",
|
|
15
|
+
expected_authority_refs: {},
|
|
16
|
+
required_evidence_capabilities: {},
|
|
17
|
+
}, externalDesignObligationRefs = new Set(), externalClaimObligationRefsByAssertion = new Map()) {
|
|
14
18
|
const prefix = outcomeKey ? `CHECK.${outcomeKey}` : "CHECK.GLOBAL";
|
|
15
19
|
const expectedOutputs = check.expected_output_paths.map((pattern, index) => assertRepositoryPattern(repository, pattern, `${check.key}.expected_output_paths[${index}]`));
|
|
16
|
-
const protectedAuthorityFiles =
|
|
20
|
+
const protectedAuthorityFiles = [
|
|
21
|
+
...new Set(protectedAuthorityPaths.map((file, index) => normalizeRepositoryFile(file, `${check.key}.protected_authority_paths[${index}]`))),
|
|
22
|
+
].sort((left, right) => Buffer.from(left).compare(Buffer.from(right)));
|
|
17
23
|
for (const [index, pattern] of check.input_paths.entries()) {
|
|
18
24
|
const normalized = assertRepositoryPattern(repository, pattern, `${check.key}.input_paths[${index}]`);
|
|
19
25
|
if (!baseline.files.some((file) => matchesRepoPattern(file.path, normalized)) &&
|
|
@@ -42,23 +48,28 @@ export async function freezeDeliveryCheck(check, outcomeKey, repository, baselin
|
|
|
42
48
|
production_owner_paths: productionOwnerPaths,
|
|
43
49
|
source_backed_execution_target: sourceBackedExecutionTarget,
|
|
44
50
|
workspace_manifest: baseline,
|
|
45
|
-
protected_authority_paths:
|
|
51
|
+
protected_authority_paths: protectedAuthorityFiles,
|
|
52
|
+
external_design_obligation_refs: externalDesignObligationRefs,
|
|
53
|
+
external_claim_obligation_refs_by_assertion: externalClaimObligationRefsByAssertion,
|
|
46
54
|
});
|
|
55
|
+
const designProjection = projectExternallyOwnedDesignAssertions(check, designConformanceTargets, observationAuthorities, externalDesignObligationRefs);
|
|
56
|
+
const claimProjection = projectExternallyOwnedClaimAssertions(designProjection.check, observationAuthorities, externalClaimObligationRefsByAssertion);
|
|
57
|
+
const machineCheck = claimProjection.check;
|
|
47
58
|
const processRuntimeClosure = compileProcessRuntimeClosure({
|
|
48
|
-
check,
|
|
59
|
+
check: machineCheck,
|
|
49
60
|
runner,
|
|
50
61
|
execution_target: executionTarget,
|
|
51
62
|
observation_authorities: observationAuthorities,
|
|
52
63
|
production_bindings: productionBindings,
|
|
53
64
|
production_owner_paths: productionOwnerPaths,
|
|
54
65
|
source_backed_execution_target: sourceBackedExecutionTarget,
|
|
55
|
-
protected_authority_paths:
|
|
66
|
+
protected_authority_paths: protectedAuthorityFiles,
|
|
56
67
|
});
|
|
57
68
|
const compiled = {
|
|
58
|
-
...
|
|
69
|
+
...machineCheck,
|
|
59
70
|
internal_id: `${prefix}.${check.key}`,
|
|
60
71
|
outcome_key: outcomeKey,
|
|
61
|
-
evidence_adapter: evidenceAdapterForRunner(
|
|
72
|
+
evidence_adapter: evidenceAdapterForRunner(machineCheck.runner.type),
|
|
62
73
|
runner,
|
|
63
74
|
verification_input_hashes: verificationInputHashes,
|
|
64
75
|
execution_target_definition: executionTarget,
|
|
@@ -66,7 +77,11 @@ export async function freezeDeliveryCheck(check, outcomeKey, repository, baselin
|
|
|
66
77
|
design_conformance_targets: designConformanceTargets,
|
|
67
78
|
semantic_fact_expectations: semanticFactExpectations,
|
|
68
79
|
observation_authorities: observationAuthorities,
|
|
80
|
+
protected_authority_paths: protectedAuthorityFiles,
|
|
69
81
|
process_runtime_closure: processRuntimeClosure,
|
|
82
|
+
completion_role: proofAdequacy.completion_role,
|
|
83
|
+
expected_authority_refs: proofAdequacy.expected_authority_refs,
|
|
84
|
+
required_evidence_capabilities: proofAdequacy.required_evidence_capabilities,
|
|
70
85
|
};
|
|
71
86
|
return {
|
|
72
87
|
...compiled,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import type { DeliveryCheckV2, DeliveryContractV2, DeliveryOutcomeV2, DeliveryRunnerV2, ProofSurface } from "./long-task-contract-types.js";
|
|
1
|
+
import type { CompiledExternalConfirmationIdentityAssuranceV2, DeliveryCheckV2, DeliveryContractV2, DeliveryOutcomeV2, DeliveryRunnerV2, ProofSurface } from "./long-task-contract-types.js";
|
|
2
2
|
import type { EvidenceCapabilityV2, ExecutionTargetV2 } from "./long-task-semantic-contract-types.js";
|
|
3
3
|
import type { CompiledDesignTargetV2 } from "./long-task-ui-surface-types.js";
|
|
4
4
|
import type { AuthorityHashesV2, ContextAuthoritySnapshotV2, InitialTaskBaseV2, NextAuthorityMaterialsV2, VerifierIdentityV2 } from "./long-task-authority-types.js";
|
|
5
5
|
import type { EvidenceAdapter } from "./long-task-evidence-adapter-types.js";
|
|
6
6
|
import type { EvidenceCapabilityRecordV2 } from "./long-task-evidence-capability-types.js";
|
|
7
7
|
import type { EffectiveRiskLevel, RiskFactName } from "./long-task-risk-types.js";
|
|
8
|
+
import type { AcceptanceReachabilityV1 } from "./long-task-acceptance-reachability.js";
|
|
8
9
|
import type { SemanticFactExpectationV2 } from "./semantic-fact-types.js";
|
|
9
10
|
import type { CompiledSourceItemV2 } from "./long-task-source-authority-types.js";
|
|
10
11
|
import type { WorkspaceManifestV2 } from "./long-task-workspace-runtime-types.js";
|
|
11
12
|
import type { JsonPointerExactObservation } from "./long-task-json-pointer-observation.js";
|
|
13
|
+
import type { DesignAuthorityIdentityV1 } from "./design-authority-types.js";
|
|
12
14
|
export interface FrozenRunnerV2 extends DeliveryRunnerV2 {
|
|
13
15
|
executable: string;
|
|
14
16
|
executable_argv_prefix: string[];
|
|
@@ -33,6 +35,7 @@ export interface CompiledObservationAuthorityV2 {
|
|
|
33
35
|
authority: CompiledObservationAuthorityKindV2;
|
|
34
36
|
expected_identity: string;
|
|
35
37
|
expected_value_sha256: string;
|
|
38
|
+
expected_value?: unknown;
|
|
36
39
|
actual_projection: CompiledObservationActualProjectionV2;
|
|
37
40
|
observation_identity: string;
|
|
38
41
|
comparison: {
|
|
@@ -99,7 +102,11 @@ export interface CompiledCheckV2 extends Omit<DeliveryCheckV2, "runner"> {
|
|
|
99
102
|
design_conformance_targets: CompiledDesignTargetV2[];
|
|
100
103
|
semantic_fact_expectations: SemanticFactExpectationV2[];
|
|
101
104
|
observation_authorities: CompiledObservationAuthorityV2[];
|
|
105
|
+
protected_authority_paths?: string[];
|
|
102
106
|
process_runtime_closure: CompiledProcessRuntimeClosureV2 | null;
|
|
107
|
+
completion_role: "semantic" | "diagnostic";
|
|
108
|
+
expected_authority_refs: Record<string, string>;
|
|
109
|
+
required_evidence_capabilities: Record<string, EvidenceCapabilityV2[]>;
|
|
103
110
|
}
|
|
104
111
|
export interface ProductClaimV2 {
|
|
105
112
|
id: string;
|
|
@@ -163,6 +170,7 @@ export interface CompiledDeliveryContractV2 {
|
|
|
163
170
|
source_hashes: Record<string, string>;
|
|
164
171
|
source_items: CompiledSourceItemV2[];
|
|
165
172
|
context_snapshot: ContextAuthoritySnapshotV2;
|
|
173
|
+
project_design_authority?: DesignAuthorityIdentityV1 | null;
|
|
166
174
|
verifier_identity: VerifierIdentityV2;
|
|
167
175
|
effective_risk: EffectiveRiskLevel;
|
|
168
176
|
risk_reasons: string[];
|
|
@@ -172,6 +180,8 @@ export interface CompiledDeliveryContractV2 {
|
|
|
172
180
|
authority_materials: NextAuthorityMaterialsV2;
|
|
173
181
|
authority_revision: number;
|
|
174
182
|
claim_coverage: ClaimCoverageSummaryV2;
|
|
183
|
+
acceptance_reachability: AcceptanceReachabilityV1;
|
|
184
|
+
external_confirmation_identity_assurances: Record<string, CompiledExternalConfirmationIdentityAssuranceV2>;
|
|
175
185
|
semantic_fact_manifest: DeliveryContractV2["semantic_fact_manifest"];
|
|
176
186
|
task: DeliveryContractV2["task"];
|
|
177
187
|
risk: DeliveryContractV2["risk"];
|
|
@@ -199,6 +209,29 @@ export interface LongTaskFindingV2 {
|
|
|
199
209
|
criterion?: string;
|
|
200
210
|
observation?: string;
|
|
201
211
|
owner_paths?: string[];
|
|
212
|
+
source_fragment_refs?: string[];
|
|
213
|
+
fact_refs?: string[];
|
|
214
|
+
proof_obligation_refs?: string[];
|
|
215
|
+
expected_authority_refs?: string[];
|
|
216
|
+
actual_evidence_refs?: string[];
|
|
217
|
+
implementation_owner?: {
|
|
218
|
+
label: string;
|
|
219
|
+
path_globs: string[];
|
|
220
|
+
};
|
|
221
|
+
verification_owner?: {
|
|
222
|
+
kind: "machine_check";
|
|
223
|
+
outcome_key: string | null;
|
|
224
|
+
check_key: string;
|
|
225
|
+
runner_target: string;
|
|
226
|
+
input_paths: string[];
|
|
227
|
+
} | {
|
|
228
|
+
kind: "external_confirmation";
|
|
229
|
+
confirmation_ref: string;
|
|
230
|
+
owner: string;
|
|
231
|
+
target_ref: string;
|
|
232
|
+
};
|
|
233
|
+
invalidation_reasons?: string[];
|
|
234
|
+
rerun_obligation_refs?: string[];
|
|
202
235
|
message: string;
|
|
203
236
|
expected?: unknown;
|
|
204
237
|
actual?: unknown;
|
|
@@ -306,45 +339,6 @@ export interface ProgressRecordV2 {
|
|
|
306
339
|
findings: LongTaskFindingV2[];
|
|
307
340
|
completed_at: string;
|
|
308
341
|
}
|
|
309
|
-
export interface TargetedVerificationResultV2 {
|
|
310
|
-
schema_version: "long-task-targeted-progress-v2";
|
|
311
|
-
compiled_identity: string;
|
|
312
|
-
snapshot_sha256: string;
|
|
313
|
-
acceptance_authorized: false;
|
|
314
|
-
selected_outcome: string | null;
|
|
315
|
-
selected_check: string | null;
|
|
316
|
-
updated_progress_records: string[];
|
|
317
|
-
check_results: CheckExecutionResultV2[];
|
|
318
|
-
findings: LongTaskFindingV2[];
|
|
319
|
-
completed_at: string;
|
|
320
|
-
}
|
|
321
|
-
export type OutcomeStatusV2 = "unverified" | "progress_passing" | "progress_failing" | "progress_stale" | "blocked_external";
|
|
322
|
-
export type StageStatusV2 = "locked" | "ready" | "unverified" | "progress_passing" | "progress_failing" | "progress_stale" | "blocked_external";
|
|
323
|
-
export interface FinalReceiptV2 {
|
|
324
|
-
schema_version: "long-task-final-receipt-v2";
|
|
325
|
-
receipt_sha256: string;
|
|
326
|
-
authority_scope: "audit_only";
|
|
327
|
-
reusable_for_acceptance: false;
|
|
328
|
-
workflow_status: "machine_accepted" | "machine_accepted_external_pending" | "needs_work" | "blocked_external";
|
|
329
|
-
target_profile: DeliveryContractV2["task"]["target_profile"];
|
|
330
|
-
target_state: DeliveryContractV2["task"]["target_profile"]["required_state"] | "not_accepted" | "blocked_external";
|
|
331
|
-
stage_results: Record<string, "passed" | "failed" | "blocked_external" | "blocked_dependency">;
|
|
332
|
-
compiled_identity: string;
|
|
333
|
-
contract_sha256: string;
|
|
334
|
-
snapshot_sha256: string;
|
|
335
|
-
git_head: string;
|
|
336
|
-
git_tree: string;
|
|
337
|
-
source_hashes: Record<string, string>;
|
|
338
|
-
context_hashes: Record<string, string>;
|
|
339
|
-
verifier_identity: VerifierIdentityV2;
|
|
340
|
-
check_results: CheckExecutionResultV2[];
|
|
341
|
-
outcome_results: Record<string, "passed" | "failed" | "blocked_external">;
|
|
342
|
-
external_confirmations: DeliveryContractV2["global"]["acceptance"]["external_confirmations"];
|
|
343
|
-
findings: LongTaskFindingV2[];
|
|
344
|
-
snapshot_preparation_ms: number;
|
|
345
|
-
started_at: string;
|
|
346
|
-
completed_at: string;
|
|
347
|
-
}
|
|
348
342
|
export type StrictRiskObligationV2 = {
|
|
349
343
|
outcome_key: string;
|
|
350
344
|
risk_fact: RiskFactName;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { canonicalApplicabilityIdentity } from "./long-task-applicability-identity.js";
|
|
1
2
|
export function validateSemanticAssuranceShape(contract, report) {
|
|
2
3
|
if (contract.task.context_snapshot_mode !== "full")
|
|
3
4
|
issue(report, "long_task_full_context_required", contract.task.context_snapshot_mode);
|
|
@@ -21,17 +22,7 @@ function validateApplicabilityScope(scope, profiles, report) {
|
|
|
21
22
|
expectedDimensionKeys = sortedKeys;
|
|
22
23
|
else if (!same(expectedDimensionKeys, sortedKeys))
|
|
23
24
|
issue(report, "applicability_dimension_set_mismatch", `${scope}:${profile.key}:${expectedDimensionKeys.join(",")}:${sortedKeys.join(",")}`);
|
|
24
|
-
const
|
|
25
|
-
.sort((left, right) => left.key.localeCompare(right.key))
|
|
26
|
-
.map((dimension) => `${dimension.key}=${dimension.value}`)
|
|
27
|
-
.join(",");
|
|
28
|
-
const cell = [
|
|
29
|
-
profile.target_ref,
|
|
30
|
-
profile.journey_role,
|
|
31
|
-
dimensions,
|
|
32
|
-
[...profile.given_refs].sort().join(","),
|
|
33
|
-
profile.when_refs.join(","),
|
|
34
|
-
].join("|");
|
|
25
|
+
const cell = canonicalApplicabilityIdentity(profile);
|
|
35
26
|
const owner = cells.get(cell);
|
|
36
27
|
if (owner)
|
|
37
28
|
issue(report, "applicability_cell_duplicate", `${scope}:${profile.key}:${owner}`);
|
|
@@ -15,6 +15,7 @@ export interface TargetProfileV2 {
|
|
|
15
15
|
description: string;
|
|
16
16
|
required_state: TargetCompletionStateV2;
|
|
17
17
|
required_target_refs: string[];
|
|
18
|
+
completion_authority: "machine_only" | "declared_authorities";
|
|
18
19
|
}
|
|
19
20
|
export interface ExecutionTargetV2 {
|
|
20
21
|
key: string;
|
|
@@ -43,7 +44,7 @@ export interface ClaimApplicabilityV2 {
|
|
|
43
44
|
given_refs: string[];
|
|
44
45
|
when_refs: string[];
|
|
45
46
|
}
|
|
46
|
-
export type EvidenceCapabilityV2 = "presence" | "interaction_trace" | "state_delta" | "cross_surface_consistency" | "durable_readback" | "boundary_invocation" | "external_side_effect" | "failure_injection" | "visual_render" | "design_conformance" | "design_method" | "design_symbolic_certificate" | "semantic_fact" | "target_runtime" | "input_variation";
|
|
47
|
+
export type EvidenceCapabilityV2 = "presence" | "interaction_trace" | "state_delta" | "cross_surface_consistency" | "durable_readback" | "boundary_invocation" | "actual_provenance" | "external_side_effect" | "distinct_identity" | "data_state" | "population_coverage" | "failure_injection" | "recovery" | "visual_render" | "design_conformance" | "design_method" | "design_symbolic_certificate" | "semantic_fact" | "target_runtime" | "input_variation";
|
|
47
48
|
export interface CheckExecutionTargetV2 {
|
|
48
49
|
target_ref: string;
|
|
49
50
|
entrypoint: "root" | "internal";
|