@tiangong-lca/foundry 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +532 -0
- package/docs/architecture.md +450 -0
- package/docs/foundry-task-contracts.md +147 -0
- package/docs/import-profiles/bafu/constraints.md +343 -0
- package/docs/import-profiles/bafu/leaf-process-classification-authoring.md +153 -0
- package/docs/import-profiles/bafu/profile.md +183 -0
- package/docs/import-profiles/uslci/constraints.md +29 -0
- package/docs/import-profiles/uslci/profile.md +43 -0
- package/docs/import-profiles/worldsteel/constraints.md +77 -0
- package/docs/import-profiles/worldsteel/import-coverage.md +93 -0
- package/docs/import-profiles/worldsteel/import-plan.md +375 -0
- package/docs/import-profiles/worldsteel/profile.md +78 -0
- package/docs/package-distribution-contract.md +287 -0
- package/docs/public-runtime-contract.md +218 -0
- package/docs/runtime-context-contract.md +138 -0
- package/docs/safety-policy.md +164 -0
- package/docs/task-authorization-contract.md +131 -0
- package/docs/uslci-import-runbook.md +336 -0
- package/docs/workspace-migration-contract.md +127 -0
- package/package-dist/assets/foundry-package-descriptor.json +1661 -0
- package/package-dist/scripts/foundry-facade.d.ts +78 -0
- package/package-dist/scripts/foundry-facade.js +1317 -0
- package/package-dist/scripts/foundry-runtime.d.ts +180 -0
- package/package-dist/scripts/foundry-runtime.js +190 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-attempt-ledger.d.ts +27 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-attempt-ledger.js +85 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-resume-contract.d.ts +38 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-resume-contract.js +90 -0
- package/package-dist/scripts/lib/bundle-row-types.d.ts +44 -0
- package/package-dist/scripts/lib/bundle-row-types.js +46 -0
- package/package-dist/scripts/lib/bundle-sample-utils.d.ts +183 -0
- package/package-dist/scripts/lib/bundle-sample-utils.js +526 -0
- package/package-dist/scripts/lib/bundle-source-context.d.ts +31 -0
- package/package-dist/scripts/lib/bundle-source-context.js +142 -0
- package/package-dist/scripts/lib/canonical-description.d.ts +12 -0
- package/package-dist/scripts/lib/canonical-description.js +72 -0
- package/package-dist/scripts/lib/canonical-support-rewrites.d.ts +127 -0
- package/package-dist/scripts/lib/canonical-support-rewrites.js +527 -0
- package/package-dist/scripts/lib/decision-owners/classification.d.ts +245 -0
- package/package-dist/scripts/lib/decision-owners/classification.js +754 -0
- package/package-dist/scripts/lib/decision-owners/identity-preflight.d.ts +333 -0
- package/package-dist/scripts/lib/decision-owners/identity-preflight.js +1353 -0
- package/package-dist/scripts/lib/decision-owners/identity-task.d.ts +130 -0
- package/package-dist/scripts/lib/decision-owners/identity-task.js +494 -0
- package/package-dist/scripts/lib/decision-owners/identity.d.ts +74 -0
- package/package-dist/scripts/lib/decision-owners/identity.js +443 -0
- package/package-dist/scripts/lib/decision-owners/location.d.ts +239 -0
- package/package-dist/scripts/lib/decision-owners/location.js +704 -0
- package/package-dist/scripts/lib/decision-task-utils.d.ts +484 -0
- package/package-dist/scripts/lib/decision-task-utils.js +735 -0
- package/package-dist/scripts/lib/finalize-owners/cli-wrappers.d.ts +52 -0
- package/package-dist/scripts/lib/finalize-owners/cli-wrappers.js +146 -0
- package/package-dist/scripts/lib/finalize-owners/commit-handoff.d.ts +79 -0
- package/package-dist/scripts/lib/finalize-owners/commit-handoff.js +515 -0
- package/package-dist/scripts/lib/finalize-owners/post-authoring.d.ts +234 -0
- package/package-dist/scripts/lib/finalize-owners/post-authoring.js +1720 -0
- package/package-dist/scripts/lib/finalize-owners/post-write-closeout.d.ts +140 -0
- package/package-dist/scripts/lib/finalize-owners/post-write-closeout.js +656 -0
- package/package-dist/scripts/lib/foundry-args.d.ts +7 -0
- package/package-dist/scripts/lib/foundry-args.js +38 -0
- package/package-dist/scripts/lib/foundry-authentication-environment.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-authentication-environment.js +55 -0
- package/package-dist/scripts/lib/foundry-authorization-input.d.ts +31 -0
- package/package-dist/scripts/lib/foundry-authorization-input.js +151 -0
- package/package-dist/scripts/lib/foundry-command-metadata.d.ts +32 -0
- package/package-dist/scripts/lib/foundry-command-metadata.js +1012 -0
- package/package-dist/scripts/lib/foundry-command-registry.d.ts +34 -0
- package/package-dist/scripts/lib/foundry-command-registry.js +241 -0
- package/package-dist/scripts/lib/foundry-command-spec.d.ts +1 -0
- package/package-dist/scripts/lib/foundry-command-spec.js +1 -0
- package/package-dist/scripts/lib/foundry-decision-owners.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-decision-owners.js +68 -0
- package/package-dist/scripts/lib/foundry-decision-routing.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-decision-routing.js +38 -0
- package/package-dist/scripts/lib/foundry-execution-admission.d.ts +33 -0
- package/package-dist/scripts/lib/foundry-execution-admission.js +225 -0
- package/package-dist/scripts/lib/foundry-execution-attempt.d.ts +11 -0
- package/package-dist/scripts/lib/foundry-execution-attempt.js +33 -0
- package/package-dist/scripts/lib/foundry-execution-context-format.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-execution-context-format.js +83 -0
- package/package-dist/scripts/lib/foundry-facade-store.d.ts +25 -0
- package/package-dist/scripts/lib/foundry-facade-store.js +449 -0
- package/package-dist/scripts/lib/foundry-finalize-owners.d.ts +21 -0
- package/package-dist/scripts/lib/foundry-finalize-owners.js +203 -0
- package/package-dist/scripts/lib/foundry-identity-owners.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-identity-owners.js +58 -0
- package/package-dist/scripts/lib/foundry-managed-host.d.ts +7 -0
- package/package-dist/scripts/lib/foundry-managed-host.js +173 -0
- package/package-dist/scripts/lib/foundry-migration-adoption-plan.d.ts +39 -0
- package/package-dist/scripts/lib/foundry-migration-adoption-plan.js +467 -0
- package/package-dist/scripts/lib/foundry-migration-adoption.d.ts +31 -0
- package/package-dist/scripts/lib/foundry-migration-adoption.js +187 -0
- package/package-dist/scripts/lib/foundry-migration-authority.d.ts +42 -0
- package/package-dist/scripts/lib/foundry-migration-authority.js +280 -0
- package/package-dist/scripts/lib/foundry-migration-inventory.d.ts +31 -0
- package/package-dist/scripts/lib/foundry-migration-inventory.js +148 -0
- package/package-dist/scripts/lib/foundry-migration-plan.d.ts +48 -0
- package/package-dist/scripts/lib/foundry-migration-plan.js +234 -0
- package/package-dist/scripts/lib/foundry-migration-replay.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-migration-replay.js +134 -0
- package/package-dist/scripts/lib/foundry-migration-stage.d.ts +15 -0
- package/package-dist/scripts/lib/foundry-migration-stage.js +152 -0
- package/package-dist/scripts/lib/foundry-migration-transfer-io.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-migration-transfer-io.js +226 -0
- package/package-dist/scripts/lib/foundry-migration-transfer.d.ts +36 -0
- package/package-dist/scripts/lib/foundry-migration-transfer.js +350 -0
- package/package-dist/scripts/lib/foundry-operation-result.d.ts +71 -0
- package/package-dist/scripts/lib/foundry-operation-result.js +264 -0
- package/package-dist/scripts/lib/foundry-owner-execution-store.d.ts +319 -0
- package/package-dist/scripts/lib/foundry-owner-execution-store.js +293 -0
- package/package-dist/scripts/lib/foundry-owner-readback.d.ts +22 -0
- package/package-dist/scripts/lib/foundry-owner-readback.js +189 -0
- package/package-dist/scripts/lib/foundry-owner-trace-acceptance.d.ts +15 -0
- package/package-dist/scripts/lib/foundry-owner-trace-acceptance.js +68 -0
- package/package-dist/scripts/lib/foundry-package-contract.d.ts +56 -0
- package/package-dist/scripts/lib/foundry-package-contract.js +392 -0
- package/package-dist/scripts/lib/foundry-private-path.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-private-path.js +20 -0
- package/package-dist/scripts/lib/foundry-runtime-cache.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-runtime-cache.js +25 -0
- package/package-dist/scripts/lib/foundry-runtime-command-policy.d.ts +20 -0
- package/package-dist/scripts/lib/foundry-runtime-command-policy.js +173 -0
- package/package-dist/scripts/lib/foundry-runtime-context-types.d.ts +59 -0
- package/package-dist/scripts/lib/foundry-runtime-context-types.js +1 -0
- package/package-dist/scripts/lib/foundry-runtime-context.d.ts +27 -0
- package/package-dist/scripts/lib/foundry-runtime-context.js +668 -0
- package/package-dist/scripts/lib/foundry-runtime-environment.d.ts +9 -0
- package/package-dist/scripts/lib/foundry-runtime-environment.js +90 -0
- package/package-dist/scripts/lib/foundry-runtime-error.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-runtime-error.js +8 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.js +127 -0
- package/package-dist/scripts/lib/foundry-runtime-paths.d.ts +16 -0
- package/package-dist/scripts/lib/foundry-runtime-paths.js +159 -0
- package/package-dist/scripts/lib/foundry-runtime-qualification.d.ts +66 -0
- package/package-dist/scripts/lib/foundry-runtime-qualification.js +223 -0
- package/package-dist/scripts/lib/foundry-runtime-selection-record.d.ts +16 -0
- package/package-dist/scripts/lib/foundry-runtime-selection-record.js +32 -0
- package/package-dist/scripts/lib/foundry-runtime-selection.d.ts +14 -0
- package/package-dist/scripts/lib/foundry-runtime-selection.js +123 -0
- package/package-dist/scripts/lib/foundry-runtime-utils.d.ts +178 -0
- package/package-dist/scripts/lib/foundry-runtime-utils.js +603 -0
- package/package-dist/scripts/lib/foundry-semantic-input.d.ts +30 -0
- package/package-dist/scripts/lib/foundry-semantic-input.js +132 -0
- package/package-dist/scripts/lib/foundry-task-authorization.d.ts +68 -0
- package/package-dist/scripts/lib/foundry-task-authorization.js +350 -0
- package/package-dist/scripts/lib/foundry-task-io.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-task-io.js +92 -0
- package/package-dist/scripts/lib/foundry-task-registration.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-task-registration.js +384 -0
- package/package-dist/scripts/lib/foundry-task-start-spec.d.ts +34 -0
- package/package-dist/scripts/lib/foundry-task-start-spec.js +161 -0
- package/package-dist/scripts/lib/foundry-task-store.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-task-store.js +466 -0
- package/package-dist/scripts/lib/foundry-task-types.d.ts +99 -0
- package/package-dist/scripts/lib/foundry-task-types.js +1 -0
- package/package-dist/scripts/lib/foundry-workflow-approval-continuation.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-workflow-approval-continuation.js +136 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.js +231 -0
- package/package-dist/scripts/lib/foundry-workflow-authorization.d.ts +22 -0
- package/package-dist/scripts/lib/foundry-workflow-authorization.js +174 -0
- package/package-dist/scripts/lib/foundry-workflow-context.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-workflow-context.js +99 -0
- package/package-dist/scripts/lib/foundry-workflow-decisions.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-workflow-decisions.js +123 -0
- package/package-dist/scripts/lib/foundry-workflow-execution.d.ts +8 -0
- package/package-dist/scripts/lib/foundry-workflow-execution.js +248 -0
- package/package-dist/scripts/lib/foundry-workflow-finalize.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-workflow-finalize.js +264 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-apply.d.ts +14 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-apply.js +159 -0
- package/package-dist/scripts/lib/foundry-workflow-identity.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-workflow-identity.js +153 -0
- package/package-dist/scripts/lib/foundry-workflow-import.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-workflow-import.js +70 -0
- package/package-dist/scripts/lib/foundry-workflow-io.d.ts +11 -0
- package/package-dist/scripts/lib/foundry-workflow-io.js +77 -0
- package/package-dist/scripts/lib/foundry-workflow-reference-verify.d.ts +41 -0
- package/package-dist/scripts/lib/foundry-workflow-reference-verify.js +266 -0
- package/package-dist/scripts/lib/foundry-workflow-rows.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-workflow-rows.js +47 -0
- package/package-dist/scripts/lib/foundry-workflow-semantic.d.ts +5 -0
- package/package-dist/scripts/lib/foundry-workflow-semantic.js +367 -0
- package/package-dist/scripts/lib/foundry-workflow-state.d.ts +37 -0
- package/package-dist/scripts/lib/foundry-workflow-state.js +158 -0
- package/package-dist/scripts/lib/full-context-proof.d.ts +51 -0
- package/package-dist/scripts/lib/full-context-proof.js +932 -0
- package/package-dist/scripts/lib/identity-preflight-artifacts.d.ts +184 -0
- package/package-dist/scripts/lib/identity-preflight-artifacts.js +573 -0
- package/package-dist/scripts/lib/identity-preflight-proof.d.ts +117 -0
- package/package-dist/scripts/lib/identity-preflight-proof.js +341 -0
- package/package-dist/scripts/lib/identity-reference-rewrite-utils.d.ts +147 -0
- package/package-dist/scripts/lib/identity-reference-rewrite-utils.js +817 -0
- package/package-dist/scripts/lib/import-curation/authoring-packages.d.ts +28 -0
- package/package-dist/scripts/lib/import-curation/authoring-packages.js +92 -0
- package/package-dist/scripts/lib/import-curation/curation-cleanup.d.ts +32 -0
- package/package-dist/scripts/lib/import-curation/curation-cleanup.js +203 -0
- package/package-dist/scripts/lib/import-curation/curation-gate.d.ts +47 -0
- package/package-dist/scripts/lib/import-curation/curation-gate.js +528 -0
- package/package-dist/scripts/lib/import-curation/internal/artifact-inputs.d.ts +24 -0
- package/package-dist/scripts/lib/import-curation/internal/artifact-inputs.js +152 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-patch-workflow.d.ts +3 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-patch-workflow.js +3 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-task-workflow.d.ts +1 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-task-workflow.js +1 -0
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.d.ts +56 -0
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +206 -0
- package/package-dist/scripts/lib/import-curation/internal/curation-gate-workflow.d.ts +14 -0
- package/package-dist/scripts/lib/import-curation/internal/curation-gate-workflow.js +14 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-payload.d.ts +70 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-payload.js +141 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-types.d.ts +25 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-types.js +45 -0
- package/package-dist/scripts/lib/import-curation/internal/full-context-proof.d.ts +129 -0
- package/package-dist/scripts/lib/import-curation/internal/full-context-proof.js +552 -0
- package/package-dist/scripts/lib/import-curation/internal/hash-utils.d.ts +2 -0
- package/package-dist/scripts/lib/import-curation/internal/hash-utils.js +10 -0
- package/package-dist/scripts/lib/import-curation/internal/mutation-manifest-workflow.d.ts +15 -0
- package/package-dist/scripts/lib/import-curation/internal/mutation-manifest-workflow.js +15 -0
- package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.d.ts +31 -0
- package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.js +467 -0
- package/package-dist/scripts/lib/import-curation/internal/profiles-config.d.ts +47 -0
- package/package-dist/scripts/lib/import-curation/internal/profiles-config.js +88 -0
- package/package-dist/scripts/lib/import-curation/internal/runtime-io.d.ts +23 -0
- package/package-dist/scripts/lib/import-curation/internal/runtime-io.js +132 -0
- package/package-dist/scripts/lib/import-curation/internal/trace-summary.d.ts +53 -0
- package/package-dist/scripts/lib/import-curation/internal/trace-summary.js +114 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-authoring-tasks.d.ts +141 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-authoring-tasks.js +854 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-apply-context.d.ts +20 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-apply-context.js +46 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-full-context.d.ts +110 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-full-context.js +782 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-dry-run-context.d.ts +24 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-dry-run-context.js +191 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-evidence-scope.d.ts +80 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-evidence-scope.js +359 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-decision-context.d.ts +146 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-decision-context.js +381 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-preflight.d.ts +223 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-preflight.js +1079 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-collect.d.ts +41 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-collect.js +412 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence-context.d.ts +117 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence-context.js +278 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence.d.ts +59 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence.js +593 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-queue-context.d.ts +58 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-queue-context.js +263 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-reference-closure.d.ts +177 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-reference-closure.js +812 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-row-transform-context.d.ts +159 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-row-transform-context.js +466 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-semantic-actions.d.ts +152 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-semantic-actions.js +1377 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-source-reference-context.d.ts +38 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-source-reference-context.js +116 -0
- package/package-dist/scripts/lib/import-curation/mutation-manifest.d.ts +51 -0
- package/package-dist/scripts/lib/import-curation/mutation-manifest.js +542 -0
- package/package-dist/scripts/lib/import-curation/patch-collect.d.ts +18 -0
- package/package-dist/scripts/lib/import-curation/patch-collect.js +172 -0
- package/package-dist/scripts/lib/import-curation/profiles.d.ts +1 -0
- package/package-dist/scripts/lib/import-curation/profiles.js +1 -0
- package/package-dist/scripts/lib/import-curation/trace-summary.d.ts +1 -0
- package/package-dist/scripts/lib/import-curation/trace-summary.js +1 -0
- package/package-dist/scripts/lib/oauth-session-reference.d.ts +1 -0
- package/package-dist/scripts/lib/oauth-session-reference.js +20 -0
- package/package-dist/scripts/lib/post-authoring-finalize-utils.d.ts +95 -0
- package/package-dist/scripts/lib/post-authoring-finalize-utils.js +548 -0
- package/package-dist/scripts/lib/post-write-root-proof.d.ts +44 -0
- package/package-dist/scripts/lib/post-write-root-proof.js +169 -0
- package/package-dist/scripts/lib/reference-description-text.d.ts +2 -0
- package/package-dist/scripts/lib/reference-description-text.js +12 -0
- package/package-dist/scripts/lib/remote-verification-accepted-diff.d.ts +42 -0
- package/package-dist/scripts/lib/remote-verification-accepted-diff.js +424 -0
- package/package-dist/scripts/lib/same-identity-commit-recovery.d.ts +8 -0
- package/package-dist/scripts/lib/same-identity-commit-recovery.js +52 -0
- package/package-dist/scripts/lib/source-semantics.d.ts +255 -0
- package/package-dist/scripts/lib/source-semantics.js +888 -0
- package/package-dist/scripts/lib/stage-contract.d.ts +36 -0
- package/package-dist/scripts/lib/stage-contract.js +25 -0
- package/package-dist/scripts/lib/task-authorization.d.ts +84 -0
- package/package-dist/scripts/lib/task-authorization.js +210 -0
- package/package-dist/scripts/lib/tidas-adapter.d.ts +113 -0
- package/package-dist/scripts/lib/tidas-adapter.js +525 -0
- package/package-dist/scripts/lib/tidas-language-utils.d.ts +8 -0
- package/package-dist/scripts/lib/tidas-language-utils.js +206 -0
- package/package-dist/scripts/lib/tidas-row-utils.d.ts +70 -0
- package/package-dist/scripts/lib/tidas-row-utils.js +225 -0
- package/package-dist/scripts/lib/trace-coverage.d.ts +53 -0
- package/package-dist/scripts/lib/trace-coverage.js +178 -0
- package/package-dist/scripts/package-entry.d.ts +2 -0
- package/package-dist/scripts/package-entry.js +4 -0
- package/package-dist/scripts/public-api.d.ts +80 -0
- package/package-dist/scripts/public-api.js +28 -0
- package/package-dist/scripts/runtime-entry.d.ts +23 -0
- package/package-dist/scripts/runtime-entry.js +424 -0
- package/package.json +93 -0
- package/specs/canonical-support/flow-properties-unit-groups.json +2692 -0
- package/specs/import-profiles.json +118 -0
- package/specs/prewrite-content-policy.json +105 -0
- package/specs/schemas/authorization-derivation.schema.json +34 -0
- package/specs/schemas/execution-context.schema.json +68 -0
- package/specs/schemas/foundry-authorization-input.schema.json +120 -0
- package/specs/schemas/foundry-facade-request-index.schema.json +78 -0
- package/specs/schemas/foundry-managed-runtime.schema.json +122 -0
- package/specs/schemas/foundry-migration-activation.schema.json +213 -0
- package/specs/schemas/foundry-migration-adoption-plan.schema.json +548 -0
- package/specs/schemas/foundry-migration-transfer-receipt.schema.json +93 -0
- package/specs/schemas/foundry-operation-result.schema.json +147 -0
- package/specs/schemas/foundry-package-descriptor.schema.json +134 -0
- package/specs/schemas/foundry-runtime-selection.schema.json +59 -0
- package/specs/schemas/foundry-semantic-input.schema.json +36 -0
- package/specs/schemas/foundry-task-start.schema.json +123 -0
- package/specs/schemas/foundry-workspace-migration-pending.schema.json +17 -0
- package/specs/schemas/foundry-workspace-migration-plan.schema.json +59 -0
- package/specs/schemas/foundry-workspace-migration-transfer-plan.schema.json +357 -0
- package/specs/schemas/foundry-workspace-v2.schema.json +70 -0
- package/specs/schemas/runtime-qualification.schema.json +63 -0
- package/specs/schemas/task-authorization.schema.json +154 -0
- package/specs/schemas/tidas-runtime-expectation.schema.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 linancn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TianGong LCA Data Foundry
|
|
3
|
+
docType: guide
|
|
4
|
+
scope: repo
|
|
5
|
+
status: active
|
|
6
|
+
authoritative: false
|
|
7
|
+
owner: tiangong-lca-data-foundry
|
|
8
|
+
language: en
|
|
9
|
+
whenToUse:
|
|
10
|
+
- when checking Foundry lanes, public commands, runtime skill usage, or repository shape
|
|
11
|
+
- when looking for user-facing examples for route-task, profiles, and owner-routed CLI work
|
|
12
|
+
whenToUpdate:
|
|
13
|
+
- when Foundry public commands, lane names, runtime skill policy, or repository layout change
|
|
14
|
+
checkPaths:
|
|
15
|
+
- README.md
|
|
16
|
+
- .nvmrc
|
|
17
|
+
- .oxlintrc.json
|
|
18
|
+
- .prettierignore
|
|
19
|
+
- package.json
|
|
20
|
+
- pnpm-lock.yaml
|
|
21
|
+
- pnpm-workspace.yaml
|
|
22
|
+
- prettier.config.ts
|
|
23
|
+
- tsconfig*.json
|
|
24
|
+
- scripts/foundry.ts
|
|
25
|
+
- scripts/lib/import-curation.ts
|
|
26
|
+
- scripts/lib/import-curation/index.ts
|
|
27
|
+
- scripts/lib/import-curation/profiles.ts
|
|
28
|
+
- scripts/lib/import-curation/trace-summary.ts
|
|
29
|
+
- scripts/foundry-golden-diff.ts
|
|
30
|
+
- scripts/check-tidas-cutover.ts
|
|
31
|
+
- scripts/check-lint-suppressions.ts
|
|
32
|
+
- scripts/clean-build-output.ts
|
|
33
|
+
- scripts/build-foundry-package.ts
|
|
34
|
+
- scripts/pack-foundry-package.ts
|
|
35
|
+
- scripts/verify-foundry-package.ts
|
|
36
|
+
- scripts/package-entry.ts
|
|
37
|
+
- scripts/public-api.ts
|
|
38
|
+
- scripts/lib/foundry-package-contract.ts
|
|
39
|
+
- tsconfig.package.json
|
|
40
|
+
- docs/package-distribution-contract.md
|
|
41
|
+
- scripts/lib/tidas-adapter.ts
|
|
42
|
+
- scripts/lib/post-authoring-finalize-utils.ts
|
|
43
|
+
- scripts/commands/tasks.ts
|
|
44
|
+
- scripts/commands/import-completion.ts
|
|
45
|
+
- scripts/commands/commit-handoff.ts
|
|
46
|
+
- scripts/commands/identity-decision-task.ts
|
|
47
|
+
- scripts/commands/support-cache.ts
|
|
48
|
+
- scripts/commands/cli-wrappers.ts
|
|
49
|
+
- scripts/commands/execution-capsule.ts
|
|
50
|
+
- scripts/commands/post-write-closeout.ts
|
|
51
|
+
- scripts/commands/core.ts
|
|
52
|
+
- scripts/commands/identity-preflight-run.ts
|
|
53
|
+
- scripts/commands/post-authoring-finalize.ts
|
|
54
|
+
- scripts/commands/identity-decisions.ts
|
|
55
|
+
- scripts/commands/classification-decisions.ts
|
|
56
|
+
- scripts/commands/location-decisions.ts
|
|
57
|
+
- scripts/commands/library-scope-workflow.ts
|
|
58
|
+
- scripts/commands/bafu-leaf-classification-tasks.ts
|
|
59
|
+
- scripts/commands/bafu-auto-authoring.ts
|
|
60
|
+
- scripts/commands/bafu-process-scope-e2e.ts
|
|
61
|
+
- scripts/commands/bafu-batch-import-run.ts
|
|
62
|
+
- scripts/commands/authoring-plan.ts
|
|
63
|
+
- scripts/commands/bundle-sample-rows.ts
|
|
64
|
+
- scripts/commands/incremental-change-set.ts
|
|
65
|
+
- scripts/commands/topology-convergence.ts
|
|
66
|
+
- scripts/lib/foundry-args.ts
|
|
67
|
+
- scripts/lib/foundry-command-registry.ts
|
|
68
|
+
- scripts/lib/foundry-command-metadata.ts
|
|
69
|
+
- scripts/lib/surface-audit.ts
|
|
70
|
+
- scripts/lib/foundry-runtime-environment.ts
|
|
71
|
+
- scripts/lib/foundry-runtime-paths.ts
|
|
72
|
+
- scripts/lib/foundry-runtime-utils.ts
|
|
73
|
+
- scripts/lib/location-quality-utils.ts
|
|
74
|
+
- scripts/lib/bundle-row-types.ts
|
|
75
|
+
- scripts/lib/tidas-language-utils.ts
|
|
76
|
+
- scripts/lib/import-curation/internal/hash-utils.ts
|
|
77
|
+
- scripts/lib/import-curation/internal/dataset-types.ts
|
|
78
|
+
- scripts/lib/import-curation/internal/runtime-io.ts
|
|
79
|
+
- scripts/lib/import-curation/internal/prewrite-cleanup.ts
|
|
80
|
+
- scripts/lib/import-curation/internal/workflow-queue-context.ts
|
|
81
|
+
- scripts/lib/import-curation/internal/full-context-proof.ts
|
|
82
|
+
- scripts/lib/import-curation/internal/workflow-decision-apply-context.ts
|
|
83
|
+
- scripts/lib/import-curation/internal/profiles-config.ts
|
|
84
|
+
- scripts/lib/import-curation/internal/workflow-patch-collect.ts
|
|
85
|
+
- scripts/lib/import-curation/internal/workflow-identity-decision-context.ts
|
|
86
|
+
- scripts/lib/import-curation/internal/workflow-patch-evidence-context.ts
|
|
87
|
+
- scripts/lib/import-curation/internal/workflow-row-transform-context.ts
|
|
88
|
+
- scripts/lib/import-curation/internal/workflow-dry-run-context.ts
|
|
89
|
+
- scripts/lib/import-curation/internal/workflow-evidence-scope.ts
|
|
90
|
+
- scripts/lib/import-curation/internal/workflow-decision-full-context.ts
|
|
91
|
+
- scripts/lib/import-curation/internal/workflow-authoring-tasks.ts
|
|
92
|
+
- scripts/lib/import-curation/internal/workflow-semantic-actions.ts
|
|
93
|
+
- scripts/lib/import-curation/internal/workflow-patch-evidence.ts
|
|
94
|
+
- scripts/lib/import-curation/internal/workflow-identity-preflight.ts
|
|
95
|
+
- scripts/lib/import-curation/internal/authoring-task-workflow.ts
|
|
96
|
+
- scripts/lib/import-curation/internal/authoring-patch-workflow.ts
|
|
97
|
+
- scripts/lib/import-curation/internal/curation-gate-workflow.ts
|
|
98
|
+
- scripts/lib/import-curation/authoring-packages.ts
|
|
99
|
+
- scripts/lib/import-curation/patch-collect.ts
|
|
100
|
+
- scripts/lib/import-curation/curation-gate.ts
|
|
101
|
+
- scripts/lib/import-curation/curation-cleanup.ts
|
|
102
|
+
- scripts/lib/import-curation/internal/workflow-reference-closure.ts
|
|
103
|
+
- scripts/lib/import-curation/internal/workflow-source-reference-context.ts
|
|
104
|
+
- scripts/lib/import-curation/internal/mutation-manifest-workflow.ts
|
|
105
|
+
- scripts/lib/import-curation/mutation-manifest.ts
|
|
106
|
+
- scripts/lib/import-curation/internal/artifact-inputs.ts
|
|
107
|
+
- scripts/lib/import-curation/internal/context-inputs.ts
|
|
108
|
+
- scripts/lib/import-curation/internal/dataset-payload.ts
|
|
109
|
+
- scripts/lib/import-curation/internal/trace-summary.ts
|
|
110
|
+
- scripts/lib/canonical-support-mappings.ts
|
|
111
|
+
- scripts/lib/source-semantics.ts
|
|
112
|
+
- scripts/lib/trace-coverage.ts
|
|
113
|
+
- scripts/lib/tidas-row-utils.ts
|
|
114
|
+
- scripts/lib/decision-task-utils.ts
|
|
115
|
+
- scripts/lib/identity-reference-rewrite-utils.ts
|
|
116
|
+
- scripts/lib/full-context-proof.ts
|
|
117
|
+
- scripts/lib/identity-preflight-artifacts.ts
|
|
118
|
+
- scripts/lib/bafu-family-signatures.ts
|
|
119
|
+
- scripts/lib/import-ledger.ts
|
|
120
|
+
- scripts/lib/canonical-support-rewrites.ts
|
|
121
|
+
- scripts/lib/bundle-sample-utils.ts
|
|
122
|
+
- specs/prewrite-content-policy.json
|
|
123
|
+
- test/fixtures/fixture-roots.ts
|
|
124
|
+
- test/fixtures/finalize-fixtures.ts
|
|
125
|
+
- test/fixtures/fake-tidas.ts
|
|
126
|
+
- test/fixtures/foundry-core.ts
|
|
127
|
+
- test/fixtures/full-context-fixtures.ts
|
|
128
|
+
- test/fixtures/identity-fixtures.ts
|
|
129
|
+
- test/fixtures/incremental-change-set-fixtures.ts
|
|
130
|
+
- test/fixtures/mutation-fixtures.ts
|
|
131
|
+
- test/fixtures/row-builders.ts
|
|
132
|
+
- test/fixtures/topology-convergence-fixtures.ts
|
|
133
|
+
- test/unit/import-ledger-type-contract.test.mts
|
|
134
|
+
- test/unit/source-row-explicit-any-contract.test.mts
|
|
135
|
+
- test/unit/identity-rewrite-explicit-any-contract.test.mts
|
|
136
|
+
- test/unit/fixture-helpers-contract.test.mts
|
|
137
|
+
- test/commands/*.test.mts
|
|
138
|
+
- test/unit/core-command-factory.test.mts
|
|
139
|
+
- test/unit/identity-preflight-run-command-factory.test.mts
|
|
140
|
+
- test/unit/post-authoring-finalize-command-factory.test.mts
|
|
141
|
+
- test/unit/unit-source-ledger-test-migration.test.mts
|
|
142
|
+
- test/unit/unit-execution-library-test-migration.test.mts
|
|
143
|
+
- test/unit/unit-algorithm-adapter-test-migration.test.mts
|
|
144
|
+
- test/unit/unit-runtime-policy-test-migration.test.mts
|
|
145
|
+
- test/scenarios/scenario-authoring-curation-test-migration.test.mts
|
|
146
|
+
- test/scenarios/scenario-identity-reference-test-migration.test.mts
|
|
147
|
+
- test/scenarios/scenario-mutation-finalize-test-migration.test.mts
|
|
148
|
+
- test/scenarios/scenario-library-algorithm-test-migration.test.mts
|
|
149
|
+
- docs/architecture.md
|
|
150
|
+
- docs/runtime-skill-management.md
|
|
151
|
+
- docs/foundry-task-contracts.md
|
|
152
|
+
- docs/incremental-change-set-contract.md
|
|
153
|
+
- docs/topology-convergence-contract.md
|
|
154
|
+
- specs/import-profiles.json
|
|
155
|
+
- test/unit/foundry-entry-closure-migration.test.mts
|
|
156
|
+
- test/unit/foundry-runtime-environment.test.mts
|
|
157
|
+
- test/unit/lint-suppression-audit.test.mts
|
|
158
|
+
- test/unit/zero-javascript-ratchet.test.mts
|
|
159
|
+
- test/scenarios/foundry-package-consumer.test.mts
|
|
160
|
+
lastReviewedAt: 2026-09-09
|
|
161
|
+
lastReviewedCommit: 21f10ac1643798aade3bd930c99785a0e6eaf0d9
|
|
162
|
+
lastReviewedNote: "Reviewed for Foundry #128: exact version-only 0.1.2 follows qualified main21f10ac via a fresh release event after the prior GitHub run could not restart. Only package identity and review metadata change; CLI0.1.12, TIDAS0.3.0, full source/public qualification, signing, first-identity handoff and final F1 acceptance remain unchanged and required."
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
# TianGong LCA Data Foundry
|
|
166
|
+
|
|
167
|
+
The package candidate now supports CLI-managed execution with verified runtime components and separate read/write workspace access. F1 publication and complete production qualification remain in progress; see `docs/package-distribution-contract.md` for the current release boundary.
|
|
168
|
+
|
|
169
|
+
Migration transfer planning is governed by [the workspace migration contract](docs/workspace-migration-contract.md). W10 provides explicit source/queue/input staging, current-owner task adoption, audited v2 activation and separate runtime read/write selection. Preserved history blocks replay across requests and migrations; none of these records grants business permission. Operational qualification and release integration remain tracked in #108/#980.
|
|
170
|
+
|
|
171
|
+
The v2 task store persists registered job/source/profile identity, account intent, producer receipts and artifact lineage; deterministic local retries reuse verified results. Exact C1/TIDAS qualification, all-command disposition, derived authorization and child admission form the W04 authority boundary. The W05 hierarchical facade adds strict result/task schemas, deterministic request revisions, actor-bound status/resume, local preparation and read-only migration inventory. W06 packages that facade as a deterministic source-free candidate; `docs/package-distribution-contract.md` owns its files and integrity. F1 registry/component publication remains W08. See `docs/public-runtime-contract.md`, `docs/runtime-context-contract.md`, `docs/task-authorization-contract.md` and `docs/foundry-task-contracts.md`.
|
|
172
|
+
|
|
173
|
+
The explicit workspace runtime is defined by `docs/runtime-context-contract.md`: package layout comes from `package.json.foundryRuntime`, emitted execution needs no source TypeScript or Git, and selected inputs/task outputs are bound to an immutable runtime context. `scripts/runtime-entry.ts` now implements workspace init/migration, consumer doctor and task start/status/resume as the separate hierarchical facade. All 63 flat owner commands retain explicit public/internal/excluded, path, child, qualification and authorization dispositions; the facade reaches them only through registered task state and never falls back to the developer runner.
|
|
174
|
+
|
|
175
|
+
Import profiles distribute source rules only. Historical BAFU/USLCI/Worldsteel account overrides, QA waivers and the Worldsteel full-context relaxation grant no permission to a new task. `docs/task-authorization-contract.md` owns the separate workspace/task/actor/account/profile/input binding and exact action evidence. Local candidate preparation and checked public-reference proofs remain available; current final-row hashes, task permissions and all content/closure/no-replay gates are required before a restricted write handoff.
|
|
176
|
+
|
|
177
|
+
The source checkout can exercise the future package facade now:
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
node scripts/foundry.ts workspace init --workspace /absolute/project --json
|
|
181
|
+
node scripts/foundry.ts doctor --workspace /absolute/project --json
|
|
182
|
+
node scripts/foundry.ts task start --workspace /absolute/project --spec /absolute/task.json --json
|
|
183
|
+
node scripts/foundry.ts task status --workspace /absolute/project --task <task-id> --actor <actor-id> --json
|
|
184
|
+
node scripts/foundry.ts task resume --workspace /absolute/project --task <task-id> --actor <actor-id> --json
|
|
185
|
+
node scripts/foundry.ts workspace migrate --workspace /absolute/project --dry-run --json
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Each command emits one compact machine object. Use only structured next-action argv with its recorded CWD. Task start is local and does not log in. `pnpm package:build && pnpm package:check` qualifies the W06 candidate, and `pnpm package:pack` creates the local tarball from its sanitized staging tree. The candidate is not the public F1 release until W08.
|
|
189
|
+
|
|
190
|
+
Control plane for turning external source material into validated, import-ready TIDAS data.
|
|
191
|
+
|
|
192
|
+
Foundry is intentionally thin. It owns task routing, local workspaces, import profiles, curation packages, cleanup reports, stable owner-command adapters, and policy checks. Deterministic package import/conversion/schema validation belongs to unified Rust `tidas`; contract context, QA, curation, skills, and database behavior belongs in `tiangong-lca-cli`, `tidas-sdk`, `tiangong-lca-skills`, Edge Functions, or database projects.
|
|
193
|
+
|
|
194
|
+
Identity-preflight candidate requests use the current Hybrid Search contract: one `lexical_weight` for the database `extracted_md` branch and one `semantic_weight` for `embedding_ft`.
|
|
195
|
+
|
|
196
|
+
Remote verification is visibility-bound. A `missing_dataset` reference that is foreign or hidden by RLS remains a blocker and cannot be converted to passed from a trusted-key list or another account's observation. The only retained accepted-difference mechanism is exact root readback whose sole normalized difference is `tiangongfoundry:importTraceSummary.traceHash`; production-test account cases accept no difference at all.
|
|
197
|
+
|
|
198
|
+
The packaged task facade now continues sealed approvals through registered owner execution and independent readback. It uses the published CLI batch engine, persists a consumed marker before dispatch, and resumes uncertain attempts only through the original readback request. Indexed execution evidence is verified against producer receipts and current file hashes. Reference-only tasks independently verify the semantic decisions’ canonical targets before completion, with zero writes. See [public execution and recovery](docs/public-runtime-contract.md#owner-execution-and-recovery).
|
|
199
|
+
|
|
200
|
+
## OAuth account execution
|
|
201
|
+
|
|
202
|
+
Use the exact installed CLI's `auth login` to create a private OAuth session. An ignored account profile binds `TIANGONG_LCA_SESSION_FILE` (absolute private file), `FOUNDRY_EXPECTED_PROJECT_REF`, and `FOUNDRY_EXPECTED_USER_ID`. The wrapper executes only after a fresh server-verified, intent-bound identity receipt passes TTL, hash, account and OAuth-session checks:
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
pnpm account:run -- <profile> -- <trusted-executable> [args...]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Public project/client settings may be blank for the official Production profile; the CLI owns defaults. Custom projects need the complete public OAuth configuration. Do not copy username/password, legacy API keys or session contents into account profiles. Existing task authorization, thread guards and sealed attempts remain separate gates. `dataset-support-cache-refresh` delegates to the published CLI support export with the account intent. It accepts public state 100 only, preserves existing mappings and replaces the local cache only after validating complete export evidence. Use the qualified CLI release before running this path.
|
|
209
|
+
|
|
210
|
+
## Toolchain And Typed Spine
|
|
211
|
+
|
|
212
|
+
Foundry is a pnpm-only, non-JSX Node.js 24 project. The reproducible toolchain is `pnpm@11.24.0`, TypeScript `7.0.2` as the only compiler anywhere in the dependency graph, Oxlint for linting, and Prettier for formatting; tracked `.jsx`/`.tsx` are rejected. TypeScript enforces erasable-only runtime syntax; root lint ignores nested Oxlint configs, bans TypeScript error-suppression comments, runs a comment-aware tracked-source audit that rejects native disable directives without treating strings as directives, and reconciles every Git-enumerated `.ts`/`.mts`/`.cts` file against intentional first-party includes. The audit clears inherited repository-local Git bindings before inspecting its target, preventing pre-push hook state from redirecting temporary fixtures into the parent index. Builds use the Node-native safe cleaner to remove stale `dist` output before `tsc`; `noEmitOnError` guarantees that TypeScript diagnostics emit no replacement JavaScript, without claiming arbitrary I/O failure atomicity. Source and built commands resolve one trusted repository root and their active `.ts`/`.js` entry independently of CWD. The repository keeps one root `pnpm-workspace.yaml` and `pnpm-lock.yaml`; npm/Yarn lockfiles, TypeScript 5/6 aliases, `@typescript-eslint`, and TypeScript-compiler-backed formatting plugins are outside the supported graph.
|
|
213
|
+
|
|
214
|
+
Issue #82 updates only that exact package-manager contract to pnpm 11.24.0. A 11.24 lockfile-only reconciliation leaves the sole root lock byte-identical and preserves the resolved dependency graph; no runtime, profile, credential, production case, or remote-write behavior changes.
|
|
215
|
+
|
|
216
|
+
Issue #63 began with a historical baseline of 160 tracked JavaScript artifacts: 95 runtime `.mjs` files, 64 `.mjs` tests, and one Prettier `.cjs` config. That monotonic migration is complete. `test/unit/zero-javascript-ratchet.test.mts` now permanently enforces zero tracked first-party JavaScript, native TypeScript configuration, and TS-only compiler/test/lint globs; characterization and real-case TDD remain mandatory for later changes.
|
|
217
|
+
|
|
218
|
+
The first completed CLI-spine slice migrates `scripts/lib/foundry-args.ts` and `scripts/lib/foundry-command-registry.ts`. Its focused test fixes parser coercion, exact help JSON and command order, exit-code families, and all static consumer imports before later entrypoint and dispatcher slices proceed.
|
|
219
|
+
|
|
220
|
+
The next slice migrates `scripts/lib/foundry-command-metadata.ts` and `scripts/lib/surface-audit.ts`. Characterization fixes all 63 metadata owner/export/artifact contracts plus TS import discovery, portable report paths, test-only inbound exclusion, orphan docs, declared entrypoints, hidden handlers, report JSON, and static consumers.
|
|
221
|
+
|
|
222
|
+
The following low-level slice migrates bundle row/root mappings, the complete TIDAS language enumeration, exact `JSON.stringify`/text SHA-256 helpers, and dataset-type aliases/constants. Characterization preserves invalid-input failures, object insertion and array order, root detection, and every direct import before higher workflow modules migrate.
|
|
223
|
+
|
|
224
|
+
The runtime I/O slice migrates the shared `runtime-io.ts` leaf without changing its synchronous visible contract: parent creation, exact text/pretty-JSON/JSONL bytes, direct overwrite, JSONL prefix retention on mid-stream serialization failure, descriptor closure, native filesystem/parse errors, JSON row envelopes, and portable repository/artifact paths.
|
|
225
|
+
|
|
226
|
+
The next internal-contract slice migrates artifact/QA inputs, dataset payload identity, compact trace summaries, and full-context inputs. Characterization preserves path fallback, file/hash facts, dedupe and traversal order, installed CLI schema resolution, missing/duplicate/drift findings, exact trace hashes, and native JSON/filesystem errors.
|
|
227
|
+
|
|
228
|
+
The standalone-leaf slice migrates canonical FlowProperty mappings, profile-aware source semantics, trace queue coverage, and reusable TIDAS row helpers. Characterization preserves all scale factors and pending defaults, BAFU/USLCI/worldsteel source identities, canonical reference rewrites, trace evidence keys/blockers, multilingual/root/id/version helpers, and invalid-input behavior.
|
|
229
|
+
|
|
230
|
+
The evidence/decision slice migrates decision-task context and stable hashes, identity reference rewrites, full-context completion proof, and identity-preflight request artifacts. Characterization preserves exact paths/bytes/SHA/ordering, missing or ambiguous evidence blockers, artifact-bound CommandSpecs, source-index first binding, and positive-only cache/execution reuse boundaries. The strict follow-up gives `decision-task-utils.ts` and `identity-preflight-artifacts.ts` concrete dependency, queue, context, proof, payload, request and index contracts with `unknown` at external JSON boundaries; an Oxlint AST check and the existing cases prohibit explicit `any` without changing outputs or authority.
|
|
231
|
+
|
|
232
|
+
The explicit-any hardening slice removes all 197 explicit TypeScript `any` nodes from `source-semantics.ts`, `tidas-row-utils.ts`, `identity-reference-rewrite-utils.ts`, and their directly coupled contract tests. The decision/preflight and proof/signature/trace families remove the complementary debt through their own RED/GREEN cases. Focused contracts run the installed Oxlint TypeScript AST rule through `process.execPath`, while the established behavior cases preserve exact rows, report bytes, order, hashes, native errors, and remote-write fail-close behavior. The integrated repository now enables `typescript/no-explicit-any` once at the global Oxlint rule layer, with zero target-specific exceptions.
|
|
233
|
+
|
|
234
|
+
The family/ledger slice migrates BAFU family signatures and the append-only import ledger. Characterization preserves normalized family names, ordered exchange skeleton/template/amount hashes, scope-order master selection and summaries, verified/blocked/retry row schemas, payload identity hashes, duplicate suppression, human-review ordering, resume/skipped artifacts, relative paths, and native parse/filesystem errors.
|
|
235
|
+
|
|
236
|
+
The canonical/bundle slice migrates canonical FlowProperty reference rewrites and bundle sampling utilities. Characterization preserves normalized mapping lookup, scale/pending/proof/stale-version decisions, support/source/contact/profile fallbacks, source-trace field repair, reference-closure materialization, deterministic selection/dedupe, exact report ordering, and native errors. Bundle sampling also carries the existing scale contract end to end: under the explicit blocking flag, known non-1 factors and unresolved invalid factors use distinct blockers and remain visible in scaling/report/scope-ledger artifacts; scale 1 and no-flag defaults do not change.
|
|
237
|
+
|
|
238
|
+
The ledger hardening follow-up removes every explicit `any` from `import-ledger.ts` and publishes concrete JSON, dependency, blocker, manifest, report, row, write-option/result, and report-result types. A separate TypeScript compile fixture proves valid state unions and rejects invalid discriminators or numeric paths, while behavior tests preserve exact JSONL bytes, hashes, ordering, dedupe, paths, and errors. The first test-fixture slice also migrates shared fixture roots and ready-finalize builders with all direct consumers updated; inventory accounting therefore moves from 130 to 128 without changing production code.
|
|
239
|
+
|
|
240
|
+
The runtime wave migrates `foundry-runtime-utils.ts`, the high-fan-in helper used by the entrypoint, account wrapper, context discovery, BAFU commands, location/remote verification and shared tests. Characterization pins the installed CLI package contract, override command rendering, all 49 factory helpers, exact file/JSON/JSONL/frontmatter/env-file/stage behavior, portable paths, errors, hashes, UUIDs and local subprocess reports. The runtime source has no explicit `any`; migration inventory moves from 128 to 127 without reading `.env` or accessing production.
|
|
241
|
+
|
|
242
|
+
The location wave migrates `location-quality-utils.ts`, which feeds bundle sampling and location/finalize authoring through the Foundry entrypoint. Characterization pins classification/location command strings and artifacts, installed schema code loading, fallback and recursive location target discovery, depth-first/array order, valid/blocker counts, queue context, blocker envelopes and invalid-input errors. It remains fail-closed and zero-any; inventory moves from 127 to 126.
|
|
243
|
+
|
|
244
|
+
The prewrite wave migrated `prewrite-cleanup.ts` as a deterministic evidence boundary and initially froze the inherited `Date.parse` behavior. Issue #69 supersedes that rollover: eight runtime consumers now share one strict metadata contract. Full timezone-qualified timestamps keep prior UTC bytes for valid inputs; valid offsets that would cross outside the four-digit UTC year grammar keep exact source bytes. Impossible Gregorian dates, invalid clocks, partial/sentinel/non-string values, or invalid offsets block the entire cleanup before any sentinel/proof/trace/redaction transform or cleaned-row output. Bundle materialization preserves invalid and timezone-less values for that gate, the CLI exits nonzero, and post-authoring finalize completes parent cleanup before nested support finalization. On failure, cleanup/finalize never delete a pre-existing artifact: retained default/downstream paths become blockers, explicit outputs remain untouched and unreferenced, the blocked ledger is written, and no CommandSpec is emitted. A repaired rerun uses a new output path or deliberate operator-managed archival.
|
|
245
|
+
|
|
246
|
+
The queue-context wave migrates `import-curation/internal/workflow-queue-context.ts`, a five-consumer authoring-evidence boundary. Characterization pins annual-supply action envelopes, manifest task order and duplicate-map behavior, exact-identity then id-only selection, queue-relative paths, closure dependency/support order, JSONL filtering and last-row binding, identity-preflight path precedence, and native filesystem/parse/invalid-dependency errors. It remains zero-any and fail-closed; inventory moves from 125 to 124.
|
|
247
|
+
|
|
248
|
+
The internal full-context wave migrates `import-curation/internal/full-context-proof.ts`, a six-consumer evidence boundary. Characterization pins context aliases and UTF-8 presence, exact authoring-package/decision-task bytes and hashes, embedded-before-shared file order, manifest/task alias fallbacks, required-kind/file blocker order, classification schema-pattern selection, payload identity encounter order and last-write hashes, caught proof parse envelopes, and native row JSON errors. It remains zero-any and fail-closed; inventory moves from 124 to 123.
|
|
249
|
+
|
|
250
|
+
The decision-apply context wave migrates `import-curation/internal/workflow-decision-apply-context.ts`, the evidence adapter shared by curation, mutation and full-context gates. Characterization pins missing/empty envelopes, snake/camel decision and task aliases, decision/task/path order, flow-before-process fallback selection, exact input/output payload hashes with duplicate last-write behavior, applied-count coercion, and native JSON/path errors. It remains zero-any and read-only; inventory moves from 123 to 122.
|
|
251
|
+
|
|
252
|
+
The typed profile selector now applies the W03 task-authorization contract: rule/doc lookup remains deterministic, while legacy profile defaults and command waiver flags grant no permission. Task grants and their input/profile/actor/account binding are explicit; old locks are retained as evidence.
|
|
253
|
+
|
|
254
|
+
The patch-collect wave migrates `import-curation/internal/workflow-patch-collect.ts`, the admission/helper boundary shared by nine workflow modules. Characterization pins early invalid returns, deterministic blocker and operation order, action closure, annual-supply defer rejection, full-context/trace evidence, circular-input failure, JSON/JSONL delimiters and parse errors, artifact-option alias order and duplicates, source-rewrite discovery priority and normalized evidence envelopes. It remains zero-any and fail-closed; inventory moves from 121 to 120.
|
|
255
|
+
|
|
256
|
+
The identity-decision context wave migrates `import-curation/internal/workflow-identity-decision-context.ts`, the evidence adapter shared by curation, mutation, preflight, patch evidence and full-context gates. Characterization pins rewrite candidate priority, scoped/dual-index encounter order, decision/canonical/package aliases, normalized reuse/create/block values, file-versus-embedded fallback, authoring-package proof dedupe, payload hash last-write, merge/unique order, completion predicates, unresolved flow reference keys and native JSON/path errors. It remains zero-any and fail-closed; inventory moves from 120 to 119.
|
|
257
|
+
|
|
258
|
+
The patch-evidence context wave migrates `import-curation/internal/workflow-patch-evidence-context.ts`, the apply/trace evidence adapter shared by mutation and reference closure. Characterization pins compact aliases, identity/row indexes, exact-bare-row query/dedupe order, apply blockers, output path priority, payload hash last-write, closure codes, exact deterministic cleanup proof, unresolved-before-source trace blockers, safety/profile snapshot SHA/order, recursive import-only trace detection and native JSON/path/cycle failures. It remains zero-any and fail-closed; inventory moves from 119 to 118.
|
|
259
|
+
|
|
260
|
+
The row-transform context wave migrates `import-curation/internal/workflow-row-transform-context.ts`, the lineage boundary shared by seven workflow modules. Characterization pins unresolved/canonical/generic report aliases, trace/blocker/proof order, payload hash last-write, transform-entry cross products and fixed family order, allowed status matrices, exact/content-equivalent artifacts, unordered multi-pass/cycle-safe graph reachability, cleanup/decision aliases and every direct patch/identity/classification/externalization chain. It remains zero-any and read-only; inventory moves from 118 to 117.
|
|
261
|
+
|
|
262
|
+
Wave 21 batches two independent low-fan-in families. `workflow-dry-run-context.ts` preserves schema/curation map precedence, operation normalization, flow payload aliases, progress/failure overwrite order and planned-root blocker suppression; inventory moves 117→116. `workflow-evidence-scope.ts` preserves portable blocker envelopes, dry-run aliases, complete stage blocker order, QA parse envelopes and deterministic patch/rewrite chain acceptance; inventory moves 116→115. Both remain zero-any and fail-closed.
|
|
263
|
+
|
|
264
|
+
Wave 22 follows the real dependency topology rather than treating connected modules as independent leaves. `workflow-decision-full-context.ts` moves first; the mutually dependent `workflow-authoring-tasks.ts`, `workflow-semantic-actions.ts`, and `workflow-patch-evidence.ts` move as one cycle-safe atomic SCC; `workflow-identity-preflight.ts` follows only after that typed closure exists. Characterization preserves proof relevance and row chains, patch/action/trace ordering, full-context and shared-bundle hashes, identity result aliases, exact-version lookup, execution-receipt fail-close, payload freshness, source context, policy blockers and native JSON/filesystem errors. Inventory moves 115→110 without changing command help, Golden artifacts, profile defaults, or remote-write authority.
|
|
265
|
+
|
|
266
|
+
Wave 23 migrates the authoring facade and runner layer above that SCC. `authoring-task-workflow.ts` and `authoring-patch-workflow.ts` remain pure live-reference facades; `authoring-packages.ts` preserves gate-entry/task order, content-addressed snapshot names, original package bytes, task directories and exact manifest/JSONL output; `patch-collect.ts` preserves task/blocker classification, patch-file/set/operation order, exact ready batch bytes and native manifest errors. Only a blocker-free collection writes a fresh batch. Inventory moves 105→101 without changing help, profiles, Golden artifacts or remote-write authority.
|
|
267
|
+
|
|
268
|
+
Wave 24 B3 migrates the curation planning boundary in topology order. `curation-gate-workflow.ts` remains a pure live-reference aggregate; `curation-gate.ts` preserves blocked entity, schema/QA/context/action ordering, authoring-package hashes and report/process aliases; `curation-cleanup.ts` preserves deep-cloned row order, exact JSONL/report bytes, annual sentinel and trace transforms, source-only-output proof, redaction counts and native failures. Inventory moves 101→98 without changing profiles, command help, Golden artifacts, Worldsteel semantics or remote-write authority.
|
|
269
|
+
|
|
270
|
+
Wave 24 migrates five command factories in three RED/GREEN families. `tasks.ts` and `import-completion.ts` preserve queue/file order, full-context completion gates, task moves and exact Markdown/JSON bytes. `commit-handoff.ts` and `identity-decision-task.ts` preserve final-row artifact SHA/bytes, authoritative CommandSpec argv, package snapshots, action encounter/dedupe order and fail-closed blockers. `support-cache.ts` preserves auth-then-read request order, pagination, public cache row order, unit mapping/manual-block order and native errors; tests stub HTTP locally and read no credentials. Inventory moves 101→96 without changing help, remote-write mode, profiles, or production authority.
|
|
271
|
+
|
|
272
|
+
Together the parallel Wave 24 lanes reduce the inventory from 101 to 93 without changing public help, Golden artifacts, profiles, Worldsteel semantics, or remote-write authority.
|
|
273
|
+
|
|
274
|
+
Wave 25 migrates the mutation reference stack in dependency order. `workflow-reference-closure.ts` preserves DFS reference discovery and self/remote/proven/unresolved/foreign closure algebra; `workflow-source-reference-context.ts` preserves explicit/default source-rewrite precedence and public-canonical filtering; `mutation-manifest-workflow.ts` plus `mutation-manifest.ts` preserve ordered write/reference/blocked partitions, report/items JSON bytes and hashes, native failures and the rule that one blocked item leaves the executable write file empty. Inventory moves 93→89 without changing help, profiles, Worldsteel semantics, Date.parse behavior or remote-write authority.
|
|
275
|
+
|
|
276
|
+
Wave 25 migrates three runtime command owners. `cli-wrappers.ts` preserves installed-CLI executable prefixes, exact argv order, CWD/environment, JSON stdout, stderr, nonzero exits and native spawn errors without a shell-string path. `execution-capsule.ts` preserves exclusive immutable snapshots, predecessor receipts, raw/semantic hashes, reviewer and boundary checks, seal hashes, zero dispatch and no-replay attempt states. `post-write-closeout.ts` preserves artifact binding, exact unique-root readback, ordinary-only traceHash normalization, production-test fail-close and foreign/RLS-hidden `missing_dataset` rejection. Inventory moves 93→90 with no command-help, profile, Worldsteel or remote-authority change.
|
|
277
|
+
|
|
278
|
+
Wave 25 migrates the three decision command factories in dependency order: standalone `identity-decisions.ts` first, then the shared-dispatch `classification-decisions.ts` and `location-decisions.ts` family. Characterization preserves exact help/report bytes, input aliases and defaults, row/path/order semantics, decision-task and queue closure blockers, deterministic CLI argv/stage failure behavior, read-only identity splitting, artifact write boundaries, and native JSON/filesystem errors. Inventory moves 98→95 without changing command names, profile defaults, Worldsteel behavior, or remote-write authority.
|
|
279
|
+
|
|
280
|
+
Wave 25 migrates the import-curation re-export topology without wrappers. `profiles.ts` and `trace-summary.ts` retain their exact namespaces and owner function identity; `import-curation/index.ts` and the public `import-curation.ts` entry retain the complete eight-export namespace and direct references to the semantic owners. Node 24 loads both source and emitted entry layers, and command metadata continues to route each command to its semantic owner. Inventory moves 93→89 without changing runtime behavior, command help, profiles, Worldsteel semantics, or remote-write authority.
|
|
281
|
+
|
|
282
|
+
Wave 26 migrates five dataset-orchestration owners in dependency order: generic `library-scope-workflow.ts`, then BAFU leaf classification and auto-authoring, process-scope E2E, and the shared BAFU batch engine used by the USLCI and Worldsteel adapters. Characterization preserves profile-agnostic versus BAFU configuration, library/scope/identity/classification blocker and artifact order, resume/pause/parallel/preflight/commit delegation, authoritative executable-plus-argv and receipt/hash checks, exact help/report bytes, native errors, and explicit-commit-only authority. Inventory moves 79→74 without changing command names, profile defaults, Golden artifacts, Worldsteel semantics, Date.parse behavior, or production authority; every case is local and reads neither `.env` nor production.
|
|
283
|
+
|
|
284
|
+
Issue #70 decomposes that stable typed layer by semantic stage. `scripts/lib/batch-orchestration/post-write-handoff.ts` owns asynchronous commit/report discovery, same-id/version idempotent recovery followed by mandatory readback, bounded read-only verification retry, accepted-difference delegation, and post-write closeout. `scripts/lib/batch-orchestration/scope-finalize-commit.ts` owns exact finalize reports, serialized support reuse/invalidation/commit, post-finalize identity/patch recovery, and the final dataset handoff. `scripts/lib/batch-orchestration/cli-bounded-batch-runner.ts` owns the public run contract/lock, while `foundry-scope-batch-runner.ts` owns Foundry item projection, family keys, pause/stop, events, and recovery without absorbing LCA semantics. `scripts/commands/bafu-batch-import-run.ts` is a five-line public facade; `bafu-batch-command-runtime.ts` is the explicit 1,700-line composition root for adapter wiring and final report assembly, with its own shrink-only ceiling rather than being mislabeled as a small semantic stage. All behavior navigation should continue into the narrower modules.
|
|
285
|
+
|
|
286
|
+
Issue #74 removes the generic library scope runner's raw-argv and fake-parallel contracts. The retained `commit_command` and `verify_command` scope fields now contain published artifact-bound CommandSpecs; arrays, malformed specs, empty bindings, SHA/byte drift, and display drift cannot execute. The installed CLI package fingerprint, full scope bytes, spec SHAs, policy, exclusivity, and concurrency enter the public locked batch contract. Independent scopes execute concurrently, failed mutations run once, pause/stop remain CLI-engine policy, and checkpoint/report output stays in input order. `foundry-command-spec.ts` is now a one-line public CLI re-export, eliminating 367 duplicated lines.
|
|
287
|
+
|
|
288
|
+
Issue #75 makes every batch resume decision content-bound. Verified/blocked scope rows require matching bundle/shared bytes, options, stage/CommandSpec policy, and installed CLI identity; legacy or drifting rows are invalidated, and repaired blocker contracts re-enter pending selection. Consumed incomplete mutation attempts compact to one active row and can only run exact readback recovery. Process checkpoints also bind the current finalize report SHA, while shared Flow carry-forward requires the same canonical payload SHA. The sanitized USLCI-scale outage fixture uses 1,358 scopes and proves state/event growth remains bounded without reading production payloads.
|
|
289
|
+
|
|
290
|
+
Issue #76 makes verified-scope cleanup evidence-preserving. Before scratch removal, Foundry projects every scope-report control reference into an immutable SHA-256 store, deduplicates identical bytes through hardlink or verified copy fallback, writes a self-hashed receipt that separates artifact identity from original/store locators, and adds explicit fact-only dispositions for pruned payloads. It then verifies all required blobs, seals retained blobs read-only where supported, and writes a prune report. Missing control files, receipt/blob drift, path escape, or symlinks block deletion; failed/ambiguous scopes retain scratch. The replay fixture covers 34 Worldsteel pilots and six rounds of 1,358 USLCI references with one stored blob for identical control bytes.
|
|
291
|
+
|
|
292
|
+
Issue #77 closes the exact-name product-flow reuse bypass exposed during that move-only decomposition. `identity-equivalence.ts` may select an exact normalized name only after the ordered physical review produces zero non-equivalence reasons. A same-name candidate with conflicting flow property, reference unit, geography/market, category/route, technology, or physical meaning remains reviewed evidence for `create_new`; it is never emitted as `reuse_existing_reference`. Matching physical evidence, elementary land-use special cases, and process exact-name explicit review retain their existing branches.
|
|
293
|
+
|
|
294
|
+
Issue #78 removes lossy object coercion from library and identity rewrite evidence. `canonical-description.ts` validates and clones canonical description JSON before mutation; multilingual object/array order and values pass unchanged through the rewritten process reference, exchange-reference ledger, batch resolution decision, identity-apply ledger, process rewrite, and BAFU carry-forward report. Scalar strings retain their prior behavior, while functions, BigInt, cycles, sparse or otherwise non-JSON values fail before payload mutation. Canonical IDs, versions, preservation hashes, stage order, paths, and remote authority do not change.
|
|
295
|
+
|
|
296
|
+
Issue #79 makes BAFU category-map completion truthful even when a conflicting, invalid, context-unbound, or incomplete decision is unrelated to the current task set. `category-map-projection.ts` retains artifact semantics, while the bounded `category-map-report.ts` leaf derives top-level `completed_with_manual_review`, compact source/reason/artifact blockers, and a nonzero command exit from the complete emitted closure. Resolved-only inputs keep their previous JSON bytes and successful exit, while existing manual-review artifact bytes/order remain authoritative.
|
|
297
|
+
|
|
298
|
+
Issue #80 makes post-finalize recovery reports truthful to executed authority. All identity and semantic recovery stages now dispatch and project through one helper; `command.executable` plus `command.argv` are the exact shell-free execution array and `command.display` is derived diagnostic text. Success, nonzero, thrown, and missing-report paths retain every option, including shared-context cache binding. A projector that omits, changes, reorders, or adds authority fields fails before downstream recovery. Stage order, blocker behavior, report/artifact paths, and the prohibition on remote commit remain unchanged.
|
|
299
|
+
|
|
300
|
+
Issue #81 aligns process and batch lost-success recovery through `same-identity-commit-recovery.ts`. Recovery requires explicit database code `23505` plus exact same-id/version conflict semantics; text-only, mixed, malformed, or incomplete evidence fails closed. Neither orchestration path replays a commit. The outcome remains `readback_recovery_pending` until the existing content-bound verifier proves exact owner, state, identity, version, payload, and root closure; every mismatch, unexpected row, missing report, or exhausted readback blocks closeout.
|
|
301
|
+
|
|
302
|
+
Issue #83 removes the location queue TOCTOU inside batch scope preparation. The task-produced queue is resolved once and bound as `{ path, bytes, sha256 }`; both suggestion and apply use that path. A missing queue, length change, same-length content replacement, or relative-path drift after suggestion yields an expected/observed blocker before apply. Stable-input stage order, report/ledger/help/Golden bytes, classification/location outcomes, and remote authority remain unchanged.
|
|
303
|
+
|
|
304
|
+
Wave 26 migrates four adapter/tool boundaries. `tidas-adapter.ts` retains executable/config precedence, controlled script argv/env, operation/version/asset reports, batch document hashes and atomic rollback. `post-authoring-finalize-utils.ts` retains rewrite discovery, identity reuse, payload-freshness hashes, external-reference and finalize order. `check-tidas-cutover.ts` retains authoritative Git inventory and JSON/exit behavior; `foundry-golden-diff.ts` retains non-HEAD merge-base selection, cross-platform path/argv normalization and Node-native comparison. Inventory moves 89→85 without changing help, profiles, Worldsteel, Date.parse or remote-write authority.
|
|
305
|
+
|
|
306
|
+
Wave 26 migrates four algorithmic command owners as four RED/GREEN families. `authoring-plan.ts` preserves phase and row ordering, source/task lineage, content hashes, exact plan artifacts and native input failures. `bundle-sample-rows.ts` preserves seeded selection, row-type/location order and canonical scale fail-close. `incremental-change-set.ts` preserves three-way merge, dependency activation/hold isolation, terminal hash-chained receipts and CLI handoff candidates. `topology-convergence.ts` preserves occurrence-aware graph composition, F/P/D ordering, cycle-safe retry/hold behavior and separate no-authority handoffs. Exact command help remains unchanged, and inventory moves 89→85 without changing profiles, Worldsteel semantics, Date.parse behavior or remote-write authority.
|
|
307
|
+
|
|
308
|
+
Wave 26 migrates the three remaining non-entry command owners. `core.ts` preserves runtime-directory order, workflow/storage/environment diagnostics, surface aggregation, route artifacts and exact help. `identity-preflight-run.ts` preserves receipt-bound CLI argv, request/target/binding hashes, positive-only cache reuse, stale or mismatched disk/stdout failure, nonzero exits and only-pending semantics without shell authority. `post-authoring-finalize.ts` preserves identity, unresolved-exchange, source/contact and canonical-support rewrite order; cleanup, preflight, queue, schema, QA, location, curation and dry-run gates; mutation evidence and read-only handoff planning. Inventory moves 79→76 without changing profiles, Worldsteel or Date.parse behavior, or remote-write authority.
|
|
309
|
+
|
|
310
|
+
Wave 27 migrates all sixteen remaining `test/commands` JavaScript contracts in four RED/GREEN families: core/ledger/support, authoring/decisions, BAFU/library, and offline incremental/topology/capsule planners. The original suite passed 173/173 before renames; `pnpm test:commands` now exposes one `.mts` glob and includes the existing typed account-wrapper cases. Inventory moves 76→60 with no runtime owner, fixture, profile, Worldsteel, Date.parse, or authority change.
|
|
311
|
+
|
|
312
|
+
Wave 26 migrates the remaining eight shared fixtures in dependency order: the fake-tidas/core executable boundary, pure row builders, full-context/identity/mutation evidence fixtures, and incremental/topology algorithm packages. Characterization preserves exact runtime namespaces and live Node references, JSON/JSONL bytes and hashes, row/graph/dependency order, worktree-local temporary isolation and native filesystem/argument failures. `fake-tidas.ts` has no executable-bit contract and is always launched through `process.execPath` plus argv. Inventory moves 79→71 without reading `.env`, accessing production, or changing command help, profiles, Worldsteel/Date.parse behavior, or remote-write authority.
|
|
313
|
+
|
|
314
|
+
Wave 26 then migrates all 17 remaining `test/unit/*.test.mjs` suites in four behavior-aligned RED/GREEN families. The original suites pass before rename; migration contracts require native `.mts`, zero explicit escapes/suppressions, typed fixture imports and updated governed paths. Their 65 established cases retain exact source/language/ledger/support rules, capsule/finalize/library behavior, adapter/cutover/incremental/topology algebra, runtime-skill/stage/content policy and native errors. Inventory moves 71→54 without changing production modules, help, profiles, Worldsteel/Date.parse behavior or authority.
|
|
315
|
+
|
|
316
|
+
Wave 26 then migrates all 19 remaining `test/scenarios/*.test.mjs` suites in four multi-command RED/GREEN families. Their 86 original cases pass before rename; migration contracts require `.mts`, typed fixtures and zero explicit escapes/suppressions. Authoring/curation, identity/reference, mutation/finalize and library/incremental/topology packages retain exact artifacts, order, hashes, native failures, fail-close and no-remote-authority boundaries. Inventory moves 54→35 without changing production behavior, help, profiles, Worldsteel/Date.parse semantics or authority.
|
|
317
|
+
|
|
318
|
+
Every toolchain or migration change must also pass from a clean arbitrary Git worktree: install with `pnpm install --frozen-lockfile`, then run the canonical lint, typecheck, build, toolchain, and test gates without borrowing sibling checkouts, another worktree's `node_modules`, ignored `.foundry` artifacts, or credentials.
|
|
319
|
+
|
|
320
|
+
The Golden gate checks normalized command artifacts against a non-`HEAD` merge-base (normally `origin/main`) with a Node-native recursive comparator, so committed PR changes cannot degrade into a self-comparison and Windows runners do not depend on a Unix `diff` binary. Both sides receive the same explicit allowlisted environment and isolated HOME/temp/npm/git/corepack state; ambient credentials, `NODE_OPTIONS`, and the live checkout's `.env` cannot affect only the current side. Script-backed test executables such as fake TIDAS run through `process.execPath` on every platform, and `.gitattributes` keeps repository text at LF so Prettier observes the same bytes on every checkout. An intentional outward contract migration may normalize only an exact reviewed before/after hash-and-shape pair; a third value or crossed pair must continue to fail Golden.
|
|
321
|
+
|
|
322
|
+
Artifact paths recorded by fixtures must accept both platform separators. Durable JSON writers fsync the same writable descriptor they opened; POSIX permission-bit assertions apply only where the operating system implements those bits.
|
|
323
|
+
|
|
324
|
+
Remote handoff commands are machine contracts, not shell snippets. `dataset-commit-handoff-plan` emits `tiangong-foundry.command-spec.v1` objects whose `executable` and `argv` are authoritative. `display` is derived for readers and is excluded from the command hash. Both commit and post-write verify specs bind the exact final rows path, bytes, and SHA-256; batch runners verify the binding immediately before `shell=false` execution.
|
|
325
|
+
|
|
326
|
+
CI runs the full test inventory in isolated groups on all four supported platforms and verifies complete execution evidence before native qualification. Strict version-only PRs use bounded version/package checks; final releases always run the complete four-platform gate. A source-bound, digest-verified package artifact is reused for native assembly and signing, while fresh-install and cold-bootstrap tests remain. The local `pnpm prepush:gate` stays complete. Details are in `docs/package-distribution-contract.md`.
|
|
327
|
+
|
|
328
|
+
## Production Case TDD
|
|
329
|
+
|
|
330
|
+
Production-backed development is an explicit case lane, not an ordinary test or CI secret path. The guarded contact case performs offline TIDAS validation and save-draft dry-run before reading credentials, then runs two fresh intent-bound CLI identity receipts, one bounded public `state_code=100` flow read, one bounded current-owner `state_code=0` process read, one new contact root collision probe, exactly one owner-draft contact mutation, and one unique owner/state/payload readback. A transport-ambiguous mutation is never retried automatically.
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
pnpm case:production:contact-draft -- \
|
|
334
|
+
--env-file <ignored-foundry-.env> \
|
|
335
|
+
--expected-project-ref <project-ref> \
|
|
336
|
+
--expected-user-id <user-id> \
|
|
337
|
+
--out-dir .foundry/cases/<new-case-id>
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
The runner accepts no API key or alternate CLI path on argv. It reads only `TIANGONG_LCA_API_BASE_URL`, `TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY`, and `TIANGONG_LCA_TEST_API_KEY`; the test key exists only in the child environment. The env file must be a regular non-symlink file with POSIX mode `0600` or stricter and, when it is inside this repository, must be git-ignored. The new output directory must also be inside this repository, git-ignored, and reached without a symlinked parent.
|
|
341
|
+
|
|
342
|
+
This production lane is POSIX-only. Windows execution fails closed until the runner can verify a user-exclusive ACL; Windows CI covers that refusal rather than a live case. On POSIX, the runner snapshots the exact installed CLI 0.1.12 package inside its pnpm dependency island, hashes and rechecks the full pnpm installation plus Foundry source/build/lock facts before every child boundary, executes from a clean directory with `shell=false`, fsyncs create-only private evidence, and publishes a content-addressed case manifest only after the runtime snapshot is removed. Any detected secret in stdout, a report, or a sidecar artifact fails the case and leaves only redacted failure evidence. The created contact remains isolated, unreviewed, and unpublished under the authenticated test account for later case evidence; the lane never performs review/publish transitions or mutates foreign/public/shared rows.
|
|
343
|
+
|
|
344
|
+
Credential-scoped commands use `pnpm account:run -- <profile> -- <executable> [args...]`. The ignored profile supplies both the expected Supabase project ref and canonical user UUID. The wrapper resolves the installed CLI 0.1.12, obtains a fresh intent-bound `auth identity-receipt`, and then executes the requested argv without a shell and without inheriting unrelated parent environment variables. Authentication bypass flags are unsupported.
|
|
345
|
+
|
|
346
|
+
Issue #70 consumes CLI 0.1.3 through its supported `./batch` and `./auth-identity-receipt` subpaths. The production identity-preflight path uses the public strict parser; deterministic receipt construction exists only in a local test fixture, and the toolchain ratchet rejects every `@tiangong-lca/cli/dist/src/**` import. pnpm's 1,440-minute maturity gate remains enabled; the exact 0.1.3 exception is bound to the release already verified by tag, Sigstore/Rekor provenance, registry integrity, and clean public consumers.
|
|
347
|
+
|
|
348
|
+
## Import Lanes
|
|
349
|
+
|
|
350
|
+
- `external-dataset-curated-import`: packaged LCA datasets converted through the Foundry adapter over Rust `tidas import`, with default per-process dependency bundles under `process-bundles/`, then validated by Rust tidas, QA checked, curated, cleaned, dry-run, committed, and verified through queue/checkpoint-driven scopes.
|
|
351
|
+
- `source-evidence-dataset-development`: PDF, Excel, web exports, images, markdown, or free text extracted through CLI/skills, authored into candidate TIDAS rows with source evidence, then sent through the same validation and curation gates.
|
|
352
|
+
|
|
353
|
+
Raw rows may preserve source-language text, but final import/write-ready rows must include English for TIDAS-required multilingual fields while preserving non-English source-language variants.
|
|
354
|
+
|
|
355
|
+
For a newer release over an existing owner-draft import, use the incremental lane instead of rebuilding or rewriting every row. `dataset-incremental-change-set-compose` strictly validates a SHA-bound old/candidate/current request plus owner-snapshot receipt, then emits only INSERT/UPDATE candidates, explicit NOOP/HOLD ledgers, dependency order, a non-empty CLI execution contract when actions exist, and exactly one terminal JSONL log event per schema-valid conversion. Entity/path/value/evidence-bound rules preserve reviewed work without opening whole rows; unstable arrays and absent dependencies hold only their closure. The command is offline and non-authoritative; fresh reconciliation and capsule admission remain separate gates. See `docs/incremental-change-set-contract.md`.
|
|
356
|
+
|
|
357
|
+
When the release changes flow identities or ordered process exchanges, use `dataset-topology-convergence-compose` after a fresh SELECT-only census. It keys exchanges by process UUID, source exchange number, and occurrence; preserves owner non-exchange content plus approved German/Chinese nodes; emits separate F flow-create and P process-save contracts; and leaves D as zero-inbound delete candidates for the CLI maintenance barrier. See `docs/topology-convergence-contract.md`.
|
|
358
|
+
|
|
359
|
+
## Core Commands
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
pnpm init:runtime
|
|
363
|
+
pnpm doctor
|
|
364
|
+
pnpm workflow:check
|
|
365
|
+
pnpm storage:check
|
|
366
|
+
pnpm surface:audit
|
|
367
|
+
pnpm acceptance:check
|
|
368
|
+
pnpm lint
|
|
369
|
+
pnpm typecheck
|
|
370
|
+
pnpm build
|
|
371
|
+
pnpm test
|
|
372
|
+
pnpm test:toolchain
|
|
373
|
+
pnpm test:unit
|
|
374
|
+
pnpm test:commands
|
|
375
|
+
pnpm test:scenarios
|
|
376
|
+
pnpm skills:install:shared
|
|
377
|
+
pnpm skills:list
|
|
378
|
+
pnpm workspace:map
|
|
379
|
+
pnpm capabilities:list -- --class tidas-contract-context
|
|
380
|
+
pnpm profiles:list
|
|
381
|
+
node scripts/foundry.ts tidas-handshake
|
|
382
|
+
pnpm task:route -- --kind external-dataset-curated-import --dataset-type process --required-gates contract,schema,qa,curation
|
|
383
|
+
pnpm task:route -- --kind source-evidence-dataset-development --dataset-type process --required-gates context,schema,qa,curation
|
|
384
|
+
pnpm skills:source-evidence:use:document
|
|
385
|
+
pnpm skills:source-evidence:use:sci
|
|
386
|
+
node scripts/foundry.ts dataset-incremental-change-set-compose --request <request.json> --out-dir <fresh-output-dir>
|
|
387
|
+
node scripts/foundry.ts dataset-topology-convergence-compose --request <request.json> --out-dir <fresh-output-dir>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Tests are organized by behavior layer in `test/README.md`. Use `pnpm test` for the full suite and `pnpm test:unit|test:commands|test:scenarios` for targeted checks; `pnpm test:toolchain` protects the pnpm/TS7 contract. Old incident-numbered test aliases are not part of the maintained surface.
|
|
391
|
+
|
|
392
|
+
Use owner-routed execution commands for dataset work:
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
node scripts/foundry.ts dataset-tidas-import \
|
|
396
|
+
--input ./source-package \
|
|
397
|
+
--output ./.foundry/workspaces/<task-id>/conversion
|
|
398
|
+
|
|
399
|
+
node scripts/foundry.ts dataset-tidas-validate \
|
|
400
|
+
--rows-file ./rows/processes.jsonl \
|
|
401
|
+
--type process \
|
|
402
|
+
--out-dir ./schema
|
|
403
|
+
|
|
404
|
+
pnpm exec tiangong-lca dataset curation-queue build \
|
|
405
|
+
--processes ./rows/processes.jsonl \
|
|
406
|
+
--flows ./rows/flows.jsonl \
|
|
407
|
+
--support ./rows/sources.jsonl \
|
|
408
|
+
--out-dir ./curation-queue
|
|
409
|
+
|
|
410
|
+
pnpm exec tiangong-lca dataset curation-queue next \
|
|
411
|
+
--queue-dir ./curation-queue \
|
|
412
|
+
--json
|
|
413
|
+
|
|
414
|
+
pnpm exec tiangong-lca dataset curation-queue verify \
|
|
415
|
+
--queue-dir ./curation-queue \
|
|
416
|
+
--type process \
|
|
417
|
+
--json
|
|
418
|
+
|
|
419
|
+
node scripts/foundry.ts dataset-curation-gate \
|
|
420
|
+
--type process \
|
|
421
|
+
--rows-file ./rows/processes.jsonl \
|
|
422
|
+
--schema-report ./schema/report.json \
|
|
423
|
+
--qa-report ./qa/process-qa-report.json \
|
|
424
|
+
--schema-file ./context/process/schema.json \
|
|
425
|
+
--yaml-file ./context/process/methodology.yaml \
|
|
426
|
+
--ruleset-file ./context/process/runtime-ruleset.json \
|
|
427
|
+
--queue-dir ./curation-queue \
|
|
428
|
+
--classification-queue ./classification-authoring-queue.jsonl \
|
|
429
|
+
--location-queue ./location-authoring-queue.jsonl \
|
|
430
|
+
--identity-preflight-index ./identity-preflight-requests/identity-preflight-requests.jsonl \
|
|
431
|
+
--profile bafu
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Foundry does not expose dataset package-script aliases. Queue state belongs to the exact installed CLI via `pnpm exec tiangong-lca dataset curation-queue build/next/verify`; conversion, validation, QA, remote write/delete/redo, and readback verification belong to CLI-owned commands and checked-in skills. Foundry-local dataset commands are policy and artifact helpers only: curation packages, mutation manifests, commit handoff plans, closeout checks, and task completion reports.
|
|
435
|
+
|
|
436
|
+
`process-bundles/index.json` is a generic packaged-import contract, not a BAFU-only path. Bundle `manifest` and `tidas_dir` entries may be relative to the index directory; Foundry resolves them before scope projection. A batch runner may process independent bundle/entity tasks in parallel when the queue lock and dependency checks allow it. The configured parallelism belongs in the task workspace policy, and completed scopes should continue through commit and readback automatically when all hard gates pass. Missing public canonical unit groups, flow properties, or elementary flows are blocked by default; a frozen profile may instead authorize an account-local `state_code=0` candidate path that keeps private support outside the public cache and proves owner, unit-scale, closure, audit, and readback. Schema/QA blockers and unresolved reference closure always stay out of executable commit scopes. Each run that defers scopes writes both `blocked-scope-ledger.jsonl` for complete row-level blocker facts and `blocked-scope-report.json` for reason, affected-scope, dependency, human-action, and rerun summaries.
|
|
437
|
+
|
|
438
|
+
The operational entry point for the BAFU 2025 V2 full import — directory map, full command templates, blocker triage, and the current resume checklist — is `docs/bafu-import-runbook.md`.
|
|
439
|
+
|
|
440
|
+
For BAFU ready-scope resumes, `dataset-bafu-batch-import-run` supports `--pending-only` to filter already verified and active human-review scopes before `--limit`, `--selection-order estimated-weight-asc` to process lighter scopes first, `--pause-file` for graceful operator pauses, and `--stop-after-blocked <n>` to stop claiming new scopes once a blocker pattern is repeating. When starting a fresh batch directory, pass one or more `--ledger-source-dir <previous-batch-or-import-ledger-dir>` values so `--pending-only` can carry forward prior `ok.scopes.verified`, `ok.flows.verified`, active blocked scopes, and verified support identities while the new batch still writes its own independent ledgers. `--preflight-only` writes a read-only selected-scope plan without requiring `--commit` or starting remote writes. The runner also maintains `import-ledger/verified-support-identities.jsonl`; every profile caches verified contact/source support, and an adapter that explicitly enables unmatched FP/UG support additionally caches verified unitgroup/flowproperty identities. Later dependent scopes may reuse those identities only after support closeout/readback; a failed support scope is deferred while independent ready scopes may continue. Use `dataset-bafu-universe-coverage-report` with explicit `--ledger-source-dir` values to compare the full input `process-bundles/index.json` and `tidas/processes` universe against ready scopes, verified ledgers, retry ledgers, active blockers, and process-referenced product flow coverage. Retryable tool/network failures such as npm registry lookup failures are written to `failed.scopes.retry.jsonl` instead of active human-review.
|
|
441
|
+
|
|
442
|
+
Whole-library packaged imports should first deduplicate root TIDAS entities, then project the resulting decisions back to process scopes:
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
node scripts/foundry.ts dataset-library-index-build \
|
|
446
|
+
--source-dir <converted-library-root> \
|
|
447
|
+
--process-bundles-dir <converted-library-root>/process-bundles \
|
|
448
|
+
--out-dir <run-dir>/library-index
|
|
449
|
+
|
|
450
|
+
node scripts/foundry.ts dataset-library-authoring-plan \
|
|
451
|
+
--library-index <run-dir>/library-index \
|
|
452
|
+
--out-dir <run-dir>/authoring-plan
|
|
453
|
+
|
|
454
|
+
node scripts/foundry.ts dataset-library-decisions-apply \
|
|
455
|
+
--library-index <run-dir>/library-index \
|
|
456
|
+
--decisions-dir <run-dir>/decisions \
|
|
457
|
+
--out-dir <run-dir>/library-resolution
|
|
458
|
+
|
|
459
|
+
node scripts/foundry.ts dataset-process-scope-run \
|
|
460
|
+
--process-bundles-dir <converted-library-root>/process-bundles \
|
|
461
|
+
--library-resolution <run-dir>/library-resolution/library-resolution.json \
|
|
462
|
+
--scope-file <run-dir>/library-resolution/scope-checkpoints.jsonl \
|
|
463
|
+
--parallel 5 \
|
|
464
|
+
--dry-run
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
`dataset-library-decisions-apply` writes `<run-dir>/library-resolution/blocked-scope-report.json` every time it evaluates scope closure. `dataset-process-scope-run` writes `<run-dir>/process-scope-run/blocked-scope-report.json` for runner-level deferrals such as non-ready scopes.
|
|
468
|
+
|
|
469
|
+
`annualSupplyOrProductionVolume` remains a required process field. When source data does not provide it, Foundry uses the deterministic `9999 missing-data-sentinel/year` value rather than AI trace deferral. The sentinel is intentionally non-physical and easy to bulk search so later database-side curation can replace it; that replacement is outside Foundry's import task.
|
|
470
|
+
|
|
471
|
+
For process rows whose source exchange list is truly output-only, pass the original converted source rows to cleanup with `--source-rows-file`. Foundry may then write deterministic `sourceExchangeCompleteness` proof only when the source row is output-only and the final row preserves the non-flow-reference exchange signature; otherwise AI `source_trace_verified` evidence or exchange repair is still required.
|
|
472
|
+
|
|
473
|
+
`--profile generic` is the default. Dataset-specific behavior is configured in `specs/import-profiles.json`; BAFU is one profile, not a special code path.
|
|
474
|
+
|
|
475
|
+
## Runtime Skills
|
|
476
|
+
|
|
477
|
+
`.agents/skills` is the single project-visible skill root. Foundry-local skills are tracked there by git; shared/runtime skills are also installed there when needed, but their names are managed by `.agents/shared-skills.json` and their installed directories remain ignored unless a task explicitly chooses pinned reproducibility.
|
|
478
|
+
|
|
479
|
+
Use the `skills` registry package through pnpm before a task needs shared skills:
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
pnpm skills:install:shared
|
|
483
|
+
pnpm skills:update
|
|
484
|
+
pnpm skills:list
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
For deleting, retiring, repairing, or redoing rows from a bad import under current-user RLS, route to the checked-in `tiangong-lca-skills` `$dataset-rls-maintenance` workflow and the CLI-owned `pnpm exec tiangong-lca dataset maintenance plan/apply/verify` surface. Do not add Foundry-local Supabase delete or redo commands.
|
|
488
|
+
|
|
489
|
+
For document fulltext extraction and SCI literature evidence, use the latest remote skills from `https://github.com/tiangong-ai/skills`:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
pnpm dlx skills@latest use https://github.com/tiangong-ai/skills \
|
|
493
|
+
--skill document-granular-decompose \
|
|
494
|
+
--full-depth
|
|
495
|
+
|
|
496
|
+
pnpm dlx skills@latest use https://github.com/tiangong-ai/skills \
|
|
497
|
+
--skill tiangong-kb-sci-search \
|
|
498
|
+
--full-depth
|
|
499
|
+
|
|
500
|
+
git ls-remote https://github.com/tiangong-ai/skills.git refs/heads/main
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
Persistent local installs are optional operator state:
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
pnpm dlx skills@latest add https://github.com/tiangong-ai/skills \
|
|
507
|
+
--skill tiangong-kb-sci-search document-granular-decompose \
|
|
508
|
+
--agent '*' \
|
|
509
|
+
--yes \
|
|
510
|
+
--full-depth
|
|
511
|
+
pnpm skills:update
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Installed shared runtime skills such as `.agents/skills/tiangong-kb-sci-search/`, `.agents/skills/document-granular-decompose/`, `.agents/skills/external-dataset-curated-import/`, and `skills-lock.json` remain ignored by default. Source-evidence tasks should record the resolved upstream ref, `pnpm dlx skills` command, and evidence artifacts under `.foundry/workspaces/<task-id>/runtime-skills/`.
|
|
515
|
+
|
|
516
|
+
## Repository Shape
|
|
517
|
+
|
|
518
|
+
- `scripts/foundry.ts`: small Foundry command surface.
|
|
519
|
+
- `scripts/lib/import-curation.ts`: typed public barrel for generic dataset curation/cleanup owners.
|
|
520
|
+
- `.agents/shared-skills.json`: configured Foundry-local and shared runtime skills that may appear under `.agents/skills`.
|
|
521
|
+
- `specs/automated-lca-capability-registry.json`: capability routing registry.
|
|
522
|
+
- `specs/import-profiles.json`: data-driven import profiles.
|
|
523
|
+
- `docs/foundry-task-contracts.md`: minimal task, source, seed, checkpoint, and artifact ledger contracts.
|
|
524
|
+
- `docs/execution-capsule-contract.md`: reusable offline stage, exact predecessor lineage, content-addressed boundary admission, CAS evidence, and immutable seal contract.
|
|
525
|
+
- `docs/runtime-skill-management.md`: `pnpm dlx skills` runtime dependency contract.
|
|
526
|
+
- `docs/import-profiles/bafu/`: BAFU profile context and constraints.
|
|
527
|
+
- `tasks/`: lightweight task queue and task templates.
|
|
528
|
+
- `.foundry/`: ignored runtime state and generated workspaces.
|
|
529
|
+
|
|
530
|
+
Remote writes are never ungated. A task must pass schema, QA, curation, cleanup, dry-run, mutation-manifest/reference-closure, commit handoff, and post-write verification gates before any database mutation. When deterministic source/contact rewrites create a writable shared contact or source dependency, Foundry may prepare a separate support finalize/handoff artifact, but dependent process/flow/lifecyclemodel scopes remain blocked until that support row is committed through the published CLI and verified. When the task write policy permits automated batch commit, ready scopes may commit without per-row human approval; human input is reserved for policy changes, exceptional waivers, and support gaps not already covered by a frozen profile's explicit account-local policy.
|
|
531
|
+
|
|
532
|
+
Tasks may set `account_intent.account_mode` to `production-test` for strict payload verification. Ordinary tasks retain the narrowly proven import-trace `traceHash` normalization path. See [public verification policy](docs/public-runtime-contract.md#account-verification-mode).
|