@tiangong-lca/foundry 0.1.9 → 0.1.10

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.
Files changed (83) hide show
  1. package/README.md +10 -8
  2. package/docs/architecture.md +9 -7
  3. package/docs/foundry-task-contracts.md +10 -4
  4. package/docs/import-profiles/bafu/constraints.md +1 -1
  5. package/docs/import-profiles/bafu/profile.md +1 -1
  6. package/docs/import-profiles/worldsteel/constraints.md +3 -3
  7. package/docs/import-profiles/worldsteel/import-coverage.md +3 -3
  8. package/docs/import-profiles/worldsteel/import-plan.md +4 -4
  9. package/docs/import-profiles/worldsteel/profile.md +3 -3
  10. package/docs/package-distribution-contract.md +9 -9
  11. package/docs/public-runtime-contract.md +17 -7
  12. package/docs/runtime-context-contract.md +5 -5
  13. package/docs/task-authorization-contract.md +3 -3
  14. package/package-dist/assets/foundry-package-descriptor.json +218 -128
  15. package/package-dist/scripts/foundry-facade.js +71 -0
  16. package/package-dist/scripts/foundry-runtime.d.ts +12 -2
  17. package/package-dist/scripts/lib/finalize-owners/commit-handoff.js +3 -3
  18. package/package-dist/scripts/lib/finalize-owners/{native-insert-closeout.d.ts → native-draft-closeout.d.ts} +1 -1
  19. package/package-dist/scripts/lib/finalize-owners/{native-insert-closeout.js → native-draft-closeout.js} +10 -6
  20. package/package-dist/scripts/lib/finalize-owners/{native-insert-handoff.d.ts → native-draft-handoff.d.ts} +7 -5
  21. package/package-dist/scripts/lib/finalize-owners/{native-insert-handoff.js → native-draft-handoff.js} +30 -11
  22. package/package-dist/scripts/lib/finalize-owners/post-write-closeout.js +2 -2
  23. package/package-dist/scripts/lib/foundry-authorization-input.d.ts +10 -1
  24. package/package-dist/scripts/lib/foundry-authorization-input.js +27 -3
  25. package/package-dist/scripts/lib/foundry-command-metadata.js +25 -2
  26. package/package-dist/scripts/lib/foundry-command-registry.d.ts +4 -4
  27. package/package-dist/scripts/lib/foundry-command-registry.js +3 -0
  28. package/package-dist/scripts/lib/foundry-execution-admission.js +3 -3
  29. package/package-dist/scripts/lib/foundry-facade-store.js +56 -6
  30. package/package-dist/scripts/lib/foundry-owner-execution-store.d.ts +33 -16
  31. package/package-dist/scripts/lib/foundry-owner-execution-store.js +32 -3
  32. package/package-dist/scripts/lib/foundry-owner-readback.d.ts +3 -0
  33. package/package-dist/scripts/lib/foundry-owner-readback.js +101 -27
  34. package/package-dist/scripts/lib/foundry-package-contract.d.ts +2 -2
  35. package/package-dist/scripts/lib/foundry-package-contract.js +2 -2
  36. package/package-dist/scripts/lib/foundry-repair-execution.d.ts +11 -0
  37. package/package-dist/scripts/lib/foundry-repair-execution.js +70 -0
  38. package/package-dist/scripts/lib/foundry-repair-handoff.d.ts +16 -0
  39. package/package-dist/scripts/lib/foundry-repair-handoff.js +108 -0
  40. package/package-dist/scripts/lib/foundry-repair-preflight.d.ts +96 -0
  41. package/package-dist/scripts/lib/foundry-repair-preflight.js +313 -0
  42. package/package-dist/scripts/lib/foundry-repair-reference-binding.d.ts +26 -0
  43. package/package-dist/scripts/lib/foundry-repair-reference-binding.js +120 -0
  44. package/package-dist/scripts/lib/foundry-repair-reference-proof.d.ts +63 -0
  45. package/package-dist/scripts/lib/foundry-repair-reference-proof.js +329 -0
  46. package/package-dist/scripts/lib/foundry-repair-scope.d.ts +76 -0
  47. package/package-dist/scripts/lib/foundry-repair-scope.js +304 -0
  48. package/package-dist/scripts/lib/foundry-runtime-command-policy.js +1 -0
  49. package/package-dist/scripts/lib/foundry-runtime-qualification.js +2 -2
  50. package/package-dist/scripts/lib/foundry-runtime-utils.d.ts +3 -0
  51. package/package-dist/scripts/lib/foundry-runtime-utils.js +6 -1
  52. package/package-dist/scripts/lib/foundry-successor-predecessor.d.ts +36 -0
  53. package/package-dist/scripts/lib/foundry-successor-predecessor.js +399 -0
  54. package/package-dist/scripts/lib/foundry-task-registration.js +64 -3
  55. package/package-dist/scripts/lib/foundry-task-start-spec.d.ts +3 -0
  56. package/package-dist/scripts/lib/foundry-task-start-spec.js +24 -1
  57. package/package-dist/scripts/lib/foundry-task-store.d.ts +13 -1
  58. package/package-dist/scripts/lib/foundry-task-store.js +23 -12
  59. package/package-dist/scripts/lib/foundry-task-types.d.ts +22 -1
  60. package/package-dist/scripts/lib/foundry-tidas-source.d.ts +15 -0
  61. package/package-dist/scripts/lib/foundry-tidas-source.js +90 -0
  62. package/package-dist/scripts/lib/foundry-workflow-authorization.d.ts +2 -1
  63. package/package-dist/scripts/lib/foundry-workflow-authorization.js +194 -26
  64. package/package-dist/scripts/lib/foundry-workflow-context.js +4 -0
  65. package/package-dist/scripts/lib/foundry-workflow-execution.js +6 -1
  66. package/package-dist/scripts/lib/foundry-workflow-repair.d.ts +36 -0
  67. package/package-dist/scripts/lib/foundry-workflow-repair.js +580 -0
  68. package/package-dist/scripts/lib/foundry-workflow-state.js +66 -18
  69. package/package-dist/scripts/lib/import-curation/curation-cleanup.js +39 -8
  70. package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +1 -1
  71. package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.d.ts +13 -2
  72. package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.js +100 -29
  73. package/package-dist/scripts/lib/import-curation/internal/workflow-authoring-tasks.js +1 -2
  74. package/package-dist/scripts/lib/import-curation/internal/workflow-patch-collect.js +2 -3
  75. package/package-dist/scripts/lib/import-curation/internal/workflow-queue-context.js +8 -8
  76. package/package-dist/scripts/lib/import-curation/internal/workflow-semantic-actions.js +12 -2
  77. package/package.json +2 -2
  78. package/specs/import-profiles.json +1 -1
  79. package/specs/schemas/foundry-authorization-input.schema.json +45 -2
  80. package/specs/schemas/foundry-managed-runtime.schema.json +1 -1
  81. package/specs/schemas/foundry-package-descriptor.schema.json +2 -2
  82. package/specs/schemas/foundry-task-start.schema.json +200 -19
  83. package/specs/schemas/runtime-qualification.schema.json +1 -1
package/README.md CHANGED
@@ -151,15 +151,16 @@ checkPaths:
151
151
  - docs/foundry-task-contracts.md
152
152
  - docs/incremental-change-set-contract.md
153
153
  - docs/topology-convergence-contract.md
154
+ - docs/final-delivery-promotion-contract.md
154
155
  - specs/import-profiles.json
155
156
  - test/unit/foundry-entry-closure-migration.test.mts
156
157
  - test/unit/foundry-runtime-environment.test.mts
157
158
  - test/unit/lint-suppression-audit.test.mts
158
159
  - test/unit/zero-javascript-ratchet.test.mts
159
160
  - test/scenarios/foundry-package-consumer.test.mts
160
- lastReviewedAt: "2026-09-14"
161
- lastReviewedCommit: "2b80865083d1ca4dd095624090ddd1c741b5d2cd"
162
- lastReviewedNote: "Reviewed for Foundry #167: exact helper-generated version projection advances0.1.8 to0.1.9 for canonical publish.yml provenance. Runtime, ownership, environment, authorization, CLI0.1.14 dependency and all qualification gates remain unchanged. Registry/component publication and independent install proof are still pending."
161
+ lastReviewedAt: 2026-09-21
162
+ lastReviewedCommit: 5f848dab3c680c7ad5f5d768d9f1585e26f2427c
163
+ lastReviewedNote: "Reviewed for Foundry #185: release-only 0.1.10 identity projection from qualified main 5f848dab3c680c7ad5f5d768d9f1585e26f2427c changes no runtime behavior, dependency, permission or command contract. Signed publication and native/bootstrap qualification remain required release gates."
163
164
  ---
164
165
 
165
166
  # TianGong LCA Data Foundry
@@ -243,7 +244,7 @@ The runtime wave migrates `foundry-runtime-utils.ts`, the high-fan-in helper use
243
244
 
244
245
  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.
245
246
 
246
- 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.
247
+ 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 annual-supply/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.
247
248
 
248
249
  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.
249
250
 
@@ -267,7 +268,7 @@ Wave 22 follows the real dependency topology rather than treating connected modu
267
268
 
268
269
  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.
269
270
 
270
- 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.
271
+ 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-supply evidence 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.
271
272
 
272
273
  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.
273
274
 
@@ -341,9 +342,9 @@ pnpm case:production:contact-draft -- \
341
342
 
342
343
  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.
343
344
 
344
- 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.14 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.
345
+ 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.19 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.
345
346
 
346
- 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.14, 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.
347
+ 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.19, 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.
347
348
 
348
349
  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.
349
350
 
@@ -468,7 +469,7 @@ node scripts/foundry.ts dataset-process-scope-run \
468
469
 
469
470
  `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.
470
471
 
471
- `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.
472
+ `annualSupplyOrProductionVolume` remains a required process field. Foundry preserves real evidence — a single object or a language array — byte-semantically and in original element order, and never invents a quantity from a reference flow or a default unit. When source data does not provide it, deterministic cleanup normalizes the field to the supported empty array `[]` and records a row-level evidence gap in `annual_supply_evidence_gaps` rather than AI trace deferral; the historical `9999 missing-data-sentinel/year` value survives only as a read-only recognition marker for rows written by earlier rounds. Downstream schema, authoring, curation, and write gates own rejecting or repairing what cleanup leaves non-importable.
472
473
 
473
474
  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.
474
475
 
@@ -524,6 +525,7 @@ Installed shared runtime skills such as `.agents/skills/tiangong-kb-sci-search/`
524
525
  - `specs/import-profiles.json`: data-driven import profiles.
525
526
  - `docs/foundry-task-contracts.md`: minimal task, source, seed, checkpoint, and artifact ledger contracts.
526
527
  - `docs/execution-capsule-contract.md`: reusable offline stage, exact predecessor lineage, content-addressed boundary admission, CAS evidence, and immutable seal contract.
528
+ - `docs/final-delivery-promotion-contract.md`: reusable final-delivery content, algebra, workbook, redaction, independent-review, and detached-seal contract.
527
529
  - `docs/runtime-skill-management.md`: `pnpm dlx skills` runtime dependency contract.
528
530
  - `docs/import-profiles/bafu/`: BAFU profile context and constraints.
529
531
  - `tasks/`: lightweight task queue and task templates.
@@ -15,6 +15,7 @@ checkPaths:
15
15
  - docs/architecture.md
16
16
  - docs/foundry-ai-navigation.md
17
17
  - docs/foundry-command-surface.md
18
+ - docs/final-delivery-promotion-contract.md
18
19
  - AGENTS.md
19
20
  - README.md
20
21
  - WORKFLOW.md
@@ -151,9 +152,9 @@ checkPaths:
151
152
  - test/unit/foundry-runtime-environment.test.mts
152
153
  - test/unit/lint-suppression-audit.test.mts
153
154
  - docs/incremental-change-set-contract.md
154
- lastReviewedAt: "2026-09-14"
155
- lastReviewedCommit: "2b80865083d1ca4dd095624090ddd1c741b5d2cd"
156
- lastReviewedNote: "Reviewed for Foundry #167: exact helper-generated version projection advances0.1.8 to0.1.9 for canonical publish.yml provenance. Runtime, ownership, environment, authorization, CLI0.1.14 dependency and all qualification gates remain unchanged. Registry/component publication and independent install proof are still pending."
155
+ lastReviewedAt: 2026-09-21
156
+ lastReviewedCommit: 5f848dab3c680c7ad5f5d768d9f1585e26f2427c
157
+ lastReviewedNote: "Reviewed for Foundry #185: release-only 0.1.10 identity projection from qualified main 5f848dab3c680c7ad5f5d768d9f1585e26f2427c changes no runtime behavior, dependency, permission or command contract. Signed publication and native/bootstrap qualification remain required release gates."
157
158
  ---
158
159
 
159
160
  # Architecture
@@ -176,7 +177,7 @@ The public task facade delegates sealed owner execution to `foundry-workflow-exe
176
177
 
177
178
  ## OAuth identity boundary
178
179
 
179
- Foundry selects a private session reference and exact project/user intent, then calls the published CLI for a fresh server-verified identity receipt. It validates TTL, canonical hash, expected identity and current OAuth session metadata without owning login, password decoding, token exchange or refresh. Candidate Golden execution uses an isolated Git-visible source snapshot so ignored operator state cannot change qualification. Support-cache transport is owned by the public CLI export. Foundry validates the fresh identity, project, public-state scope, completion marker, artifact paths and hashes, then summarizes rows and atomically replaces only the requested local cache. The CLI runs in a private temporary cwd with an allowlisted OAuth environment; the operator checkout .env and unrelated secrets cannot enter that child. Exact public CLI 0.1.14 and reviewed TIDAS 0.2.x/0.3.x expectations are independently selected and re-observed through the W04 qualification boundary. F1 component provenance and package qualification remain W06/W08 gates.
180
+ Foundry selects a private session reference and exact project/user intent, then calls the published CLI for a fresh server-verified identity receipt. It validates TTL, canonical hash, expected identity and current OAuth session metadata without owning login, password decoding, token exchange or refresh. Candidate Golden execution uses an isolated Git-visible source snapshot so ignored operator state cannot change qualification. Support-cache transport is owned by the public CLI export. Foundry validates the fresh identity, project, public-state scope, completion marker, artifact paths and hashes, then summarizes rows and atomically replaces only the requested local cache. The CLI runs in a private temporary cwd with an allowlisted OAuth environment; the operator checkout .env and unrelated secrets cannot enter that child. Exact public CLI 0.1.19 and reviewed TIDAS 0.2.x/0.3.x expectations are independently selected and re-observed through the W04 qualification boundary. F1 component provenance and package qualification remain W06/W08 gates.
180
181
 
181
182
  ## Qualified execution boundary
182
183
 
@@ -269,7 +270,7 @@ The high-fan-in runtime utility boundary is native TypeScript and owns only Foun
269
270
 
270
271
  The typed location-quality boundary reads the installed CLI location vocabulary and discovers only schema/fallback-declared location fields. It creates local authoring commands, queue context and blockers; the CLI owns classification lookup/apply and the schema package owns valid codes. Missing schema evidence yields an empty valid-code map rather than approving unknown values, and invalid targets remain blocking before finalize.
271
272
 
272
- The typed prewrite-cleanup boundary performs deterministic transformations only after authoring evidence exists. It first plans datetime handling across the complete batch: full timezone-qualified syntax, Gregorian calendar, clock, and offset components must validate before any update is applied. A single invalid value returns ordered blockers, no cleaned rows, and zero sentinel/proof/trace/namespace/redaction counts. Only a blocker-free plan may proceed to required-field sentinel completion, UTC normalization, source/final exchange proof, import-only trace externalization, namespace repair and local locator redaction; four-digit year-boundary offset values remain byte-preserved when a UTC projection would require an extended year. Source and final exchange signatures exclude only permitted flow-reference rewrites; their array and object order remains content-addressed. It cannot invent source evidence or grant write authority.
273
+ The typed prewrite-cleanup boundary performs deterministic transformations only after authoring evidence exists. It first plans datetime handling across the complete batch: full timezone-qualified syntax, Gregorian calendar, clock, and offset components must validate before any update is applied. A single invalid value returns ordered blockers, no cleaned rows, and zero sentinel/proof/trace/namespace/redaction counts. Only a blocker-free plan may proceed to required-field annual-supply evidence preservation and unknown-evidence normalization, UTC normalization, source/final exchange proof, import-only trace externalization, namespace repair and local locator redaction; four-digit year-boundary offset values remain byte-preserved when a UTC projection would require an extended year. Source and final exchange signatures exclude only permitted flow-reference rewrites; their array and object order remains content-addressed. It cannot invent source evidence or grant write authority.
273
274
 
274
275
  The typed workflow-queue-context boundary reads local queue manifests, task rows, closure dependencies and optional authoring JSONL indexes without changing their encounter order or evidence bytes. It attaches that evidence to curation packages using exact-version then id-only lookup and retains native missing, malformed and invalid-dependency failures; it does not execute queue work or expand remote-write authority.
275
276
 
@@ -293,7 +294,7 @@ The typed decision-full-context boundary evaluates existing classification, loca
293
294
 
294
295
  The typed authoring facades expose that SCC without wrapping or duplicating it. The package runner copies immutable content-addressed authoring snapshots and writes ordered local task manifests; the patch runner classifies local task outputs and writes an ordered batch only after every blocker check passes. Both are filesystem-only Foundry adapters and neither applies patches, invokes the CLI, or grants mutation authority.
295
296
 
296
- The typed curation planning boundary follows those authoring layers. `curation-gate-workflow.ts` is a live-reference aggregate; `curation-gate.ts` reads local rows and evidence into ordered blockers, authoring packages and reports; `curation-cleanup.ts` deep-clones rows, runs the batch-wide strict datetime plan, and only then performs deterministic sentinel, trace, proof and redaction transforms. Its blocked report carries a null cleaned path and never deletes pre-existing bytes; retained default output becomes an explicit blocker, while explicit output remains untouched and unreferenced. Their byte/order contracts are local Foundry evidence only and do not execute or authorize a database mutation.
297
+ The typed curation planning boundary follows those authoring layers. `curation-gate-workflow.ts` is a live-reference aggregate; `curation-gate.ts` reads local rows and evidence into ordered blockers, authoring packages and reports; `curation-cleanup.ts` deep-clones rows, runs the batch-wide strict datetime plan, and only then performs deterministic annual-supply, trace, proof and redaction transforms. Its blocked report carries a null cleaned path and never deletes pre-existing bytes; retained default output becomes an explicit blocker, while explicit output remains untouched and unreferenced. Their byte/order contracts are local Foundry evidence only and do not execute or authorize a database mutation.
297
298
 
298
299
  The typed command-owner layer now includes filesystem task/completion aggregation, commit handoff and identity task preparation, and canonical support-cache refresh/autofill. These factories keep their injected/local orchestration boundaries: task/report bytes and order remain content-stable, handoff only emits artifact-bound CommandSpecs, identity tasks only snapshot and package local evidence, and support refresh performs authenticated read-only queries. No factory implements CLI mutation, database semantics, review, or publication.
299
300
 
@@ -343,7 +344,7 @@ Build and test resolution must be worktree-local. A clean arbitrary Git worktree
343
344
 
344
345
  Cross-platform characterization is also explicit: the Golden harness compares normalized outputs to a non-`HEAD` merge-base, performs recursive comparison in Node rather than calling an external Unix utility, and uses full Git history in CI. Script-backed executable overrides are represented as an executable plus argv prefix and run through Node on macOS, Linux, and Windows. The root `.gitattributes` fixes text files to LF while allowing Windows launcher exceptions, preventing checkout policy from masquerading as format drift.
345
346
 
346
- The first credential-bearing entrypoint on that spine is `scripts/with-lca-account.ts`. It does not authenticate against Supabase itself. It resolves the exact installed CLI 0.1.14, requests `auth identity-receipt` with both expected project and user assertions, accepts only a fresh intent-bound forced signin, and then launches the requested executable plus argv with `shell:false` and a restricted environment. The CLI owns session and live identity behavior; Foundry owns the profile/thread intent checks and safe process boundary.
347
+ The first credential-bearing entrypoint on that spine is `scripts/with-lca-account.ts`. It does not authenticate against Supabase itself. It resolves the exact installed CLI 0.1.19, requests `auth identity-receipt` with both expected project and user assertions, accepts only a fresh intent-bound forced signin, and then launches the requested executable plus argv with `shell:false` and a restricted environment. The CLI owns session and live identity behavior; Foundry owns the profile/thread intent checks and safe process boundary.
347
348
 
348
349
  `scripts/lib/identity-preflight-proof.ts` imports the strict parser from the public `@tiangong-lca/cli/auth-identity-receipt` subpath. `test/fixtures/auth-identity-receipt.ts` is the sole test-only wire-fixture owner and produces bytes that must pass that public parser. No production module or fixture may load CLI `dist/src/**`; the installed-package contract also exercises public batch scheduling/run-lock behavior and proves the private path remains closed.
349
350
 
@@ -377,6 +378,7 @@ The handoff execution boundary is typed and content-addressed. `scripts/lib/foun
377
378
  - verify artifacts point to the same rows scope
378
379
  - accept identity/classification/location evidence across deterministic row transforms such as source/contact rewrites, canonical support rewrites, identity reference rewrites, unresolved-exchange externalization, and cleanup
379
380
  - reconcile deterministic source-only-output exchange proofs from cleanup against final-row `sourceExchangeCompleteness` traces
381
+ - validate completed delivery packages against manifest-bound content, row algebra, workbook, redaction, and independent-review contracts, then emit an offline detached seal only when every finding is zero
380
382
  - generate completion reports
381
383
 
382
384
  6. Whole-library scope orchestration
@@ -28,9 +28,9 @@ checkPaths:
28
28
  - specs/schemas/execution-context.schema.json
29
29
  - specs/import-profiles.json
30
30
  - tasks/**
31
- lastReviewedAt: 2026-09-11
32
- lastReviewedCommit: fd348f2c0d4391974f2fd894e2939f677cae618d
33
- lastReviewedNote: "Reviewed for Foundry #119: explicit native insert selection, indexed control snapshot, exact command/report bindings and no-replay recovery. CLI retains native execution ownership; existing authorization and environment boundaries remain mandatory."
31
+ lastReviewedAt: 2026-09-21
32
+ lastReviewedCommit: f059e4703438d661aa823d33c7cff0a9582645bc
33
+ lastReviewedNote: "Reviewed for Foundry #171: metadata repair preserves exact historical references only with payload-derived occurrence and owner/state/content proof, retains raw CLI freshness blockers and false publication readiness, and changes no ordinary authoring, credential or publication authority. Producer-verified zero-dispatch successors require fresh scope and grant."
34
34
  related:
35
35
  - AGENTS.md
36
36
  - WORKFLOW.md
@@ -132,12 +132,18 @@ Account registration optionally stores `account_mode` from explicit task/host in
132
132
 
133
133
  An expected account may be selected after local preparation. The first selection is registered as project/user intent; subsequent disagreement is rejected. A missing task-local account file may only be restored from its existing workspace registration. This is intent, not proof of authentication.
134
134
 
135
- `verifyFoundryRuntimeIdentity` invokes the exact installed CLI through executable/argv in a fresh private CWD with a restricted environment. The CLI owns OAuth/session refresh and server identity verification. Returned proof is immutable, process-local and bound to workspace/task/actor/runtime, with a 60-second freshness check at permission admission. Serialized proof is not reusable authority. Headless mode uses the CLI's existing explicit target and process-only access token, with cache disabled and no token persistence. CLI 0.1.14 reports no token-expiry timestamp for that mode; Foundry does not invent one or claim a separately verified token lifetime.
135
+ `verifyFoundryRuntimeIdentity` invokes the exact installed CLI through executable/argv in a fresh private CWD with a restricted environment. The CLI owns OAuth/session refresh and server identity verification. Returned proof is immutable, process-local and bound to workspace/task/actor/runtime, with a 60-second freshness check at permission admission. Serialized proof is not reusable authority. Headless mode uses the CLI's existing explicit target and process-only access token, with cache disabled and no token persistence. CLI 0.1.17 reports no token-expiry timestamp for that mode; Foundry does not invent one or claim a separately verified token lifetime.
136
136
 
137
137
  `registerFoundryTaskAuthorization` is an explicit host approval operation. It requires fresh identity, current task/input lineage, a valid W03 grant, and independently selected evidence facts supplied by the trusted caller. The grant cannot select its own evidence paths. Each original evidence file is rechecked and copied into an immutable task snapshot; the grant and selection are registered in workspace state. Updating `authorization.json` uses compare-and-swap against its prior digest and preserves historical grants. Unknown legacy authorization files are not overwritten.
138
138
 
139
139
  `loadFoundryTaskAuthorization` rechecks live identity, task registration, input lineage, active pointer/registration, grant expiry/scope and both evidence snapshots and originals. A previous grant cannot be relabeled for changed or derived inputs. Reusing its approval requires a qualified, process-local derivation that proves ancestry, changes only the input digest, retains authority bounds and records `authorization-derivation.v1` evidence. The active parent pointer is checked around preparation and captured for later compare-and-swap. A separately reviewed approval may instead register the exact derived bytes directly. Login, task creation, local preparation and an empty grant never grant publication, deletion or restricted write actions.
140
140
 
141
+ A repair scope (`input_kind: repair_rows`) has no finalization: its authority is the registered preparation report. The approval descriptor names that report digest, carries the selected native execution contract, and is admitted only for Process rows of the locked `generic` profile. Activation re-reads the exact registered report entry, requires one prepared dispatching-write-free scope (`status: prepared`, zero remote writes, not publication ready), re-derives the native contract's canonical digest over the unchanged candidate rows, matches every reported action against the signed contract, and binds the grant to the candidate bytes as the approved input scope. The sealed stage writes a repair handoff plan whose commit and post-write-verify CommandSpecs bind the candidate rows and that contract, then seals the execution capsule for the reviewed commit-handoff command. State projection keeps such an approval current only while the same preparation entry, active pointer and expiry hold, and a no-change or blocked preparation never reaches authorization. Owner execution request preparation, dispatch and closeout remain separate stages. Repair execution re-admits the registered preparation before dispatch and readback. Its verified result binds the same preparation, the consumed native contract receipt and exact root/reference proof, preserving false publication readiness. The source candidate may remain an independently captured selected input; only that exact input fact can use the source-input verification path, while receipt, readback and all other result files remain task-contained outputs.
142
+
143
+ Repair reference proofs bind complete before/candidate payload hashes and every reference occurrence to the CLI JSONL checks. Exact existing historical references may be retained with their raw freshness blockers and a separately indexed integrity proof; a newer version never authorizes reference retargeting. Both preflight and closeout preserve false publication readiness, exact input-path binding and strict root owner/state/content checks. Normal authoring reference-quality policy is unchanged.
144
+
145
+ A repair revision may follow an attempted predecessor only through the bounded no-dispatch successor rule: the successor names the predecessor task and the exact digest of that predecessor's producer-registered terminal CLI report, and the predecessor's own hash-chained evidence must prove an unresolved definite failure with zero executed actions, zero consumed CLI attempts, no unknown outcome, only definite failed or blocked rows, one consumed scope bound to that report, and the same request, actor, account, lane, generic profile and entity identities/versions. The successor must submit genuinely different candidate bytes on new immutable paths, inherits no grant, and is re-derived on every start, status and resume read, so a descendant can never be admitted by one path and refused by another. Every other predecessor state keeps the original readback-required refusal.
146
+
141
147
  Before a restricted child handoff, the runtime stores a content-addressed `execution-context.v1` under task evidence. A new process must reconstruct the context, qualification and identity, then recheck source ancestry, final bytes, current authorization/QA exceptions, owner CLI path and CommandSpec operation semantics. Only the verified spec is returned to the existing no-replay executor. The execution context never carries credentials and never clears or retries an attempt.
142
148
 
143
149
  The public facade projects preparation, sealed approval, owner execution and independent readback through the result envelope. Before dispatch, the dedicated execution-consume operation registers an immutable `attempts/owner-v1/<scope>/consumed.json` output with producer evidence; other local operations cannot write task-control paths. Recognized consumed requests resume readback only, while unknown attempts remain blocked. Completion requires a current producer-backed completion report or verified current write scopes plus independent verification of all current canonical reference partitions. Inspect revalidates completion, execution requests, consumed markers, observations, owner results and canonical reference verification results against their exact producer plans, receipts and current bytes. A forged index entry borrowing another operation receipt cannot prove completion. No child command is inferred from a directory name.
@@ -228,7 +228,7 @@ related:
228
228
  - 可见业务字段不得保留导入占位或源系统噪声:`xx`、`{GLO}` 这类未拆分 name token、`Not declared in source package`、`Not specified by the BAFU ecoSpold1 source.`、`No ... BAFU ecoSpold1 source.`、本地路径、zip 内路径等必须进入 Foundry AI authoring action item。若字段确实未知,用户可见文本只写 `Not specified` 或按 schema 省略;BAFU/ecoSpold 只作为 provenance/evidence,不作为业务字段 filler。
229
229
  - BAFU 的 full-context AI completion 要求写入规划前完成内容字段饱和。`tidasimport:sourceTrace`、TIDAS schema/YAML、分类/location schema 或 profile context 能证明正式字段值时,必须在同一次 AI authoring package 中尽量补全,不能先写库再靠人工巡检补。典型字段包括 process `common:synonyms`、`percentageSupplyOrProductionCovered`、`uncertaintyAdjustments`,flow `locationOfSupply`、`name.flowProperties`、source-backed `common:generalComment`,source `sourceDescriptionOrComment` 中的作者/年份/标题/出版地/出版社/卷号,以及 FOEN/BAFU contact 的官网、邮箱、电话、地址和 central contact point。无法证明或候选冲突时才 block/review;可证明字段缺失时 curation gate 必须阻断。
230
230
  - Flow `locationOfSupply` 的证据不只来自 flow 自身已有 geography 字段。`name.mixAndLocationTypes` 中的明确 location code、引用该 flow 的 process `locationOfOperationSupplyOrProduction.@location`、exchange `location` 以及 source trace 中的地理字段都必须进入 flow authoring context;能证明为 TIDAS/ILCD location code 时必须补齐,候选冲突或非 code 描述才进入 location authoring/review。
231
- - `common:other` 只能保存不能安全推断的 provenance/trace,不得替代 schema 必填字段或正式名称、functional unit、classification、reference flow 等业务字段。只有 action item 的 `allowed_resolution_modes` 明确包含 `deferred_to_common_other` 时,才允许延期;functional unit / classification / reference flow 这类正式字段必须补 evidence-backed 真值或保持阻塞。`annualSupplyOrProductionVolume` 是 schema 必填项,不得转入 `common:other`;若原始数据缺少年供应量,Foundry deterministic cleanup 写入 `9999 missing-data-sentinel/year`,这是有意无物理意义、便于批量查询定位的占位值,后续由数据库侧 curation 替换为真实值。允许 `resolution.mode=deferred_to_common_other` 的 action item 必须写入 `common:other.tiangongfoundry:unresolvedTrace`,且包含 `status`、`action_item_code`、`blocked_path`、`reason`、结构化 `evidence` 和 `next_action`;`evidence` 必须包含 source 以及 quote / trace / path / citation 等可追踪指针。
231
+ - `common:other` 只能保存不能安全推断的 provenance/trace,不得替代 schema 必填字段或正式名称、functional unit、classification、reference flow 等业务字段。只有 action item 的 `allowed_resolution_modes` 明确包含 `deferred_to_common_other` 时,才允许延期;functional unit / classification / reference flow 这类正式字段必须补 evidence-backed 真值或保持阻塞。`annualSupplyOrProductionVolume` 是 schema 必填项,不得转入 `common:other`;真实值(单对象或语言数组)按字节语义与原始顺序保留,不得因数值与历史标记相同而改写,也不得从 reference flow 或默认 unit 造量;若原始数据确实缺少年供应量,Foundry deterministic cleanup 将其规范为受支持的未知表示 `[]`,并在 `annual_supply_evidence_gaps` 中写入绑定了行身份、字段与前后 payload SHA 的证据缺口,绝不再写入伪造数量。历史值 `9999 missing-data-sentinel/year` 仅作为只读历史识别标记,用于规范化早期写入的行。允许 `resolution.mode=deferred_to_common_other` 的 action item 必须写入 `common:other.tiangongfoundry:unresolvedTrace`,且包含 `status`、`action_item_code`、`blocked_path`、`reason`、结构化 `evidence` 和 `next_action`;`evidence` 必须包含 source 以及 quote / trace / path / citation 等可追踪指针。
232
232
  - 最终 rows 中的 `common:other.tiangongfoundry:unresolvedTrace` 和 `common:other.tiangongfoundry:sourceExchangeCompleteness` 必须由同一行的 AI patch evidence,或由 cleanup report 为同一 final row 生成的确定性 proof 放行;手工预置或 identity/classification/location 决策不能替代该证据。其中 unresolved trace 使用 `resolution.mode=deferred_to_common_other` 并关闭匹配 action item;source-only-output 接受使用 `resolution.mode=source_trace_verified`,或由 `dataset-curation-cleanup --source-rows-file <source rows>` 证明源 process row 本身 Output-only 且最终 row 保留非 `referenceToFlowDataSet` exchange signature。Commit handoff 必须先从最终 rows 推导这些 trace,并逐条匹配 mutation/finalize 保留的 trace queue JSONL;stale/extra/missing trace 都不能生成可执行 commit 命令。Post-write closeout 必须在读回验证后复核同一覆盖关系。
233
233
  - process / flow / lifecycle model 的 `name` 子字段是名称片段,不是 provenance 或字段缺失说明,不得写入 `源数据未声明...`、`no separate ... was declared...` 这类句子。若源数据未单独给出某个 name 子字段,应从源全名、分类、地理代码、技术描述和来源字段中做可辩护拆分;仍无法确定时形成 review blocker,或在非 name 的 provenance 字段说明,不得用说明句占位。
234
234
  - 所有 `name.*` LangText 中不得出现 `xx` / `xxx` / `XX` 等源数据标记或导入标记,不得出现 `TIDAS_IMPORT_PLACEHOLDER`、trace-only 文本、本地路径,也不得出现中文分号 `;` 或英文分号 `;`。TIDAS/ILCD name 子字段应使用逗号分隔的技术短语,不能使用分号连接说明句。
@@ -160,7 +160,7 @@ Flow curation must include identity matching, classification, source-language na
160
160
 
161
161
  ### 6. Process Curation
162
162
 
163
- Process curation must consume finalized flow and support records. It must refresh global references before validation instead of failing late on stale refs. Required process fields such as reference year and annual supply/production must be filled from traceable source evidence or an explicitly documented package-level fallback rule. For `annualSupplyOrProductionVolume`, missing source evidence uses Foundry's deterministic `9999 missing-data-sentinel/year` placeholder rather than `common:other` deferral; the value is intentionally non-physical and searchable so database-side curation can replace it later.
163
+ Process curation must consume finalized flow and support records. It must refresh global references before validation instead of failing late on stale refs. Required process fields such as reference year and annual supply/production must be filled from traceable source evidence or an explicitly documented package-level fallback rule. For `annualSupplyOrProductionVolume`, real source evidence — a single object or a language array — is preserved byte-semantically and in original element order, and no quantity is ever invented from a reference flow or a default unit. Genuinely missing source evidence is normalized by Foundry's deterministic cleanup to the supported empty array `[]` with a bound row-level evidence gap rather than `common:other` deferral or a fabricated placeholder; the historical `9999 missing-data-sentinel/year` value remains only as a read-only recognition marker for rows written by earlier rounds.
164
164
 
165
165
  CLI process/flow/lifecyclemodel QA is a deterministic QA report, not the profile policy decision point. Foundry owns dataset curation, AI authoring packages, deterministic prewrite cleanup, waiver decisions, and final prewrite status. The BAFU full-context gate applies to flow/process/lifecyclemodel scopes; contact and true-source rows remain governed by source/contact policy, while task-authorized account-local FP/UG require a separate candidate registry with exact owner/state, unit-scale, closure, immutable-plan, audit, and readback proof. Curation must still use SDK schema/YAML, classification/location tasks, exact-payload identity preflight, and deterministic patch/cleanup lineage. Before commit, the mutation manifest must prove the exact reference closure: public support resolves through the public canonical cache; account-local FP/UG resolve through the same-owner `state_code=0` candidate registry and remote verify; mixed visibility or cross-owner closure blocks. Data-format, compliance, or placeholder sources remain invalid as true source rows. Profile-specific QA waivers are allowed only when named in `docs/import-profiles/bafu/constraints.md`; `process_material_balance_deviation` remains an account-level observation and all other schema/content issues remain action items unless explicitly updated.
166
166
 
@@ -1,7 +1,7 @@
1
1
  ---
2
- lastReviewedAt: 2026-09-11
3
- lastReviewedCommit: abc7672f3b3a806caa4219ab5b797f1d92421926
4
- lastReviewedNote: "Reviewed for #122: explicit task reference snapshots, CLI 0.1.14 QA/intent transport, sealed admission/readback evidence and no-replay recovery. Existing profile, permission, environment and historical delivery boundaries remain enforced."
2
+ lastReviewedAt: 2026-09-21
3
+ lastReviewedCommit: 208f520f0771f2aacdde9422133255a76f0cc2fb
4
+ lastReviewedNote: "Reviewed for Foundry #171: CLI 0.1.19 consumer adoption does not change Worldsteel profile constraints, permissions or source evidence."
5
5
  title: worldsteel Import Constraints
6
6
  docType: constraints
7
7
  scope: import-profile
@@ -1,7 +1,7 @@
1
1
  ---
2
- lastReviewedAt: 2026-09-11
3
- lastReviewedCommit: abc7672f3b3a806caa4219ab5b797f1d92421926
4
- lastReviewedNote: "Reviewed for #122: explicit task reference snapshots, CLI 0.1.14 QA/intent transport, sealed admission/readback evidence and no-replay recovery. Existing profile, permission, environment and historical delivery boundaries remain enforced."
2
+ lastReviewedAt: 2026-09-21
3
+ lastReviewedCommit: 208f520f0771f2aacdde9422133255a76f0cc2fb
4
+ lastReviewedNote: "Reviewed for Foundry #171: CLI 0.1.19 adoption does not change retained Worldsteel coverage or account-local support policy."
5
5
  title: worldsteel EF3.1 Import Coverage Evidence
6
6
  docType: report
7
7
  scope: import-profile/worldsteel
@@ -1,7 +1,7 @@
1
1
  ---
2
- lastReviewedAt: 2026-09-09
3
- lastReviewedCommit: fa219ecc833c0aad9bb6a3661265a57f8f24a814
4
- lastReviewedNote: "Reviewed for Foundry #147: adopt independently verified CLI 0.1.13 at b5e2092 with original permission-preserving bootstrap scripts. Exact runtime/schema/package/release expectations advance together; other dependencies, TIDAS, profile rules, task authorization and private no-replay evidence remain unchanged."
2
+ lastReviewedAt: 2026-09-21
3
+ lastReviewedCommit: 208f520f0771f2aacdde9422133255a76f0cc2fb
4
+ lastReviewedNote: "Reviewed for Foundry #171: CLI 0.1.19 the operator instruction advances to exact CLI 0.1.19; Worldsteel profile, authorization and private no-replay rules remain unchanged."
5
5
  title: worldsteel EF3.1 ILCD Import Plan
6
6
  docType: plan
7
7
  scope: import-profile/worldsteel
@@ -331,7 +331,7 @@ The vast majority of those exchanges point at EF3.1 reference flows that will re
331
331
 
332
332
  ## 9. Risk register (consolidated gotchas)
333
333
 
334
- - **Use the project-installed CLI** — leave `TIANGONG_LCA_CLI_BIN` blank so Foundry resolves exact `@tiangong-lca/cli@0.1.14`; an override is only for an explicit local test binary. Credential-scoped execution still goes through the receipt-gated `pnpm account:run` wrapper.
334
+ - **Use the project-installed CLI** — leave `TIANGONG_LCA_CLI_BIN` blank so Foundry resolves exact `@tiangong-lca/cli@0.1.19`; an override is only for an explicit local test binary. Credential-scoped execution still goes through the receipt-gated `pnpm account:run` wrapper.
335
335
  - **Don't copy BAFU/USLCI profile wholesale** — Worldsteel reuses every canonical row by UUID, caps the R3 elementary tail, and enables R5 only for materialized FP/UG canonical-cache misses behind the full account-local support gates.
336
336
  - **`databaseFallbackSourceConfig` silently inherits BAFU** for any unknown profile → ✅ worldsteel branch added.
337
337
  - **`source_contact_rewrites` gated to bafu/uslci** → ✅ widened to include `worldsteel`.
@@ -1,7 +1,7 @@
1
1
  ---
2
- lastReviewedAt: 2026-09-11
3
- lastReviewedCommit: abc7672f3b3a806caa4219ab5b797f1d92421926
4
- lastReviewedNote: "Reviewed for #122: explicit task reference snapshots, CLI 0.1.14 QA/intent transport, sealed admission/readback evidence and no-replay recovery. Existing profile, permission, environment and historical delivery boundaries remain enforced."
2
+ lastReviewedAt: 2026-09-21
3
+ lastReviewedCommit: 208f520f0771f2aacdde9422133255a76f0cc2fb
4
+ lastReviewedNote: "Reviewed for Foundry #171: CLI 0.1.19 leaves Worldsteel selection, authorization and write gates unchanged."
5
5
  title: worldsteel Import Profile
6
6
  docType: profile
7
7
  scope: import-profile
@@ -34,9 +34,9 @@ checkPaths:
34
34
  - test/commands/foundry-release-*.test.mts
35
35
  - test/unit/runtime-layout.test.mts
36
36
  - test/scenarios/foundry-package-consumer.test.mts
37
- lastReviewedAt: "2026-09-14"
38
- lastReviewedCommit: "2b80865083d1ca4dd095624090ddd1c741b5d2cd"
39
- lastReviewedNote: "Reviewed for Foundry #167: exact helper-generated version projection advances0.1.8 to0.1.9 for canonical publish.yml provenance. Runtime, ownership, environment, authorization, CLI0.1.14 dependency and all qualification gates remain unchanged. Registry/component publication and independent install proof are still pending."
37
+ lastReviewedAt: 2026-09-21
38
+ lastReviewedCommit: 5f848dab3c680c7ad5f5d768d9f1585e26f2427c
39
+ lastReviewedNote: "Reviewed for Foundry #185: release-only 0.1.10 identity projection from qualified main 5f848dab3c680c7ad5f5d768d9f1585e26f2427c changes no runtime behavior, dependency, permission or command contract. Signed publication and native/bootstrap qualification remain required release gates."
40
40
  related:
41
41
  - docs/public-runtime-contract.md
42
42
  - docs/runtime-context-contract.md
@@ -48,9 +48,9 @@ related:
48
48
 
49
49
  The npm identity is `@tiangong-lca/foundry`; the public bin is `tiangong-foundry`. W06 establishes the installable `0.1.0` candidate and its production dependency closure. It does not publish a registry version or call this candidate F1. W08 owns the release-only workflow, Trusted Publishing/provenance, immutable tag, platform components, SBOM/license bundle and product compatibility manifest.
50
50
 
51
- CLI 0.1.14 is independently verified at source/tag `b5e209259d3bb06205b9af131b1c0edc3fba6da2`. Its original POSIX bootstrap preserves verified archive modes under the private umask; its PowerShell bytes are unchanged. The exact source/script digests in `specs/release/runtime-inputs.json` and runtime descriptor/schema expectations advance with the single CLI lock entry. All other 134 locked packages and the sixteen-package production closure remain unchanged.
51
+ CLI 0.1.19 is independently verified at source/tag `7f7b313cebc30c96154860df30f5d666963bc0b7` with signed provenance and an immutable npm integrity. Its POSIX bootstrap preserves verified archive modes under the private umask; both its POSIX and PowerShell bytes are unchanged from 0.1.18 and were re-hashed at the new tag. The exact source/script digests in `specs/release/runtime-inputs.json` and runtime descriptor/schema expectations advance with the CLI lock entry while its transitive SDK 0.3.0 entry and native Toolkit 0.3.2 inputs stay unchanged. The sixteen-package production closure retains its shape; its CLI identity and hashes advance.
52
52
 
53
- The package depends exactly on public `@tiangong-lca/cli@0.1.14`. Ajv remains a development dependency for internal commands and release-side SPDX validation. Sigstore 5.0.0, YAML 2.9.0, tar 7.5.22 and fflate 0.8.3 are also development-only release tools for signing/verification, lock parsing and bounded upstream archive selection. None enters the public compiler/dependency closure. TIDAS is an independently verified native component selected later by the CLI manager, not an npm dependency or bundled binary.
53
+ The package depends exactly on public `@tiangong-lca/cli@0.1.19`. Ajv remains a development dependency for internal commands and release-side SPDX validation; Saxes 6.0.0 is a development dependency used only by the offline final-delivery workbook reader for namespace-aware OOXML parsing. Sigstore 5.0.0, YAML 2.9.0, tar 7.5.22 and fflate 0.8.3 are also development-only release tools for signing/verification, lock parsing and bounded upstream archive selection. None enters the public compiler/dependency closure. TIDAS is an independently verified native component selected later by the CLI manager, not an npm dependency or bundled binary.
54
54
 
55
55
  ## Public surface
56
56
 
@@ -88,7 +88,7 @@ Minimum-host data is frozen in `specs/release/runtime-inputs.json`. [The pinned
88
88
 
89
89
  The source-side qualifier receives the in-process prepared authority. It executes the actual packaged Node/Foundry/TIDAS combination with an empty tool PATH, no supplied credentials, an empty component cache seeded from the verified local archives, and then a warm cache with no manager downloads. It checks public init/doctor/task lifecycle, read selection/restoration and rejection of developer commands. Diagnostic timings and results live outside hashed component payloads. This proves native execution from the prepared archives; published URL download/copy-bootstrap and final four-platform publication remain distinct gates.
90
90
 
91
- The qualified TIDAS0.3.0 archive includes distribution manifest v2 and a complete executable/source-bound native notice inventory. Preparation verifies the nested manifest digest, every retained file and Cargo/native/Rust evidence before reporting `owner-inventory-verified`. The assembler still refuses published mode when this verified coverage is absent. All original notice texts and source evidence remain in the TIDAS component, and its SPDX license references include every retained notice text. The component manifest points to the existing project LICENSE, upstream notice README and notice-manifest.json. These three entrypoints stay within the published CLI limit of64, while the nested inventory identifies every original text and its package/source role. No additional concatenated copy is generated. Candidate component URLs are intended release locations and are not advertised as already downloadable. The source CI performs candidate assembly/qualification but does not publish its binaries.
91
+ The qualified TIDAS0.3.2 archive includes distribution manifest v2 and a complete executable/source-bound native notice inventory. Preparation verifies the nested manifest digest, every retained file and Cargo/native/Rust evidence before reporting `owner-inventory-verified`. The assembler still refuses published mode when this verified coverage is absent. All original notice texts and source evidence remain in the TIDAS component, and its SPDX license references include every retained notice text. The component manifest points to the existing project LICENSE, upstream notice README and notice-manifest.json. These three entrypoints stay within the published CLI limit of64, while the nested inventory identifies every original text and its package/source role. No additional concatenated copy is generated. The four Toolkit 0.3.2 component URLs are published release locations verified by archive digest and source-bound attestation. The source CI performs candidate assembly/qualification but does not publish its binaries.
92
92
 
93
93
  ## Build and staging roots
94
94
 
@@ -304,15 +304,15 @@ The production dependency payload is an input to complete runtime-component asse
304
304
 
305
305
  `pnpm release:prepare-native --output <new-absolute-directory>` binds its clean source and current supported host to the reviewed Node/TIDAS entries in `specs/release/runtime-inputs.json`. It offers no platform, version, source or registry override. Native downloads use a bounded HTTPS transfer through official artifact hosts, verify the pinned SHA-256 before parsing, and select the declared Node files or the complete TIDAS v2 inventory. The TIDAS reader checks the exact release version/target/source, binary and nested notice hashes, complete file inventory, Cargo-lock/package evidence, native XML notice coverage and Rust compiler/source notice bindings. Missing, extra, changed, linked, duplicated, unsafe or oversized files fail before output creation. The tar reader only streams regular selected entries; complete ZIP inputs additionally check ordinary single-disk central records for file types before development-only fflate decompression. Output paths come from the verified bounded inventory, and all files are written as regular files.
306
306
 
307
- The current Node input is24.19.0 at source `cdc1b38d40cb567b7ad0b39c86addf830a0af0ae`; its official SHASUMS256 entries pin the four targets. The source LICENSE is byte-identical to the selected macOS release LICENSE. Windows uses the official `win-x64/node.exe` plus that checksum-bound source license. TIDAS 0.3.0 is pinned to actual release target `bbccee6a7e3c10ce1184e06fd7b621862ad6ce07`, as recorded by the immutable release request and source-bound SLSA/SPDX attestations for all four public archives. Eligible main `e237a6cf1d4c55ba490719a8fcee0f659d1f840c` includes the request; the tag target owns the binary source identity. The command checks the TIDAS distribution manifest, executes the downloaded Node to verify version/architecture, and uses the existing TIDAS version/validation handshake in an isolated home. It records native observations, selected file hashes, upstream sources, licenses and SPDX data as assembly inputs.
307
+ The current Node input is24.19.0 at source `cdc1b38d40cb567b7ad0b39c86addf830a0af0ae`; its official SHASUMS256 entries pin the four targets. The source LICENSE is byte-identical to the selected macOS release LICENSE. Windows uses the official `win-x64/node.exe` plus that checksum-bound source license. TIDAS 0.3.2 is pinned to actual release target `d38448e7372baa84c50b20a8dbd501656b764d63`, as recorded by the immutable release request and source-bound SLSA/SPDX attestations for all four public archives. The tag target owns the binary source identity. The command checks the TIDAS distribution manifest, executes the downloaded Node to verify version/architecture, and uses the existing TIDAS version/validation handshake in an isolated home. It records native observations, selected file hashes, upstream sources, licenses and SPDX data as assembly inputs.
308
308
 
309
- Native handshake success is not minimum-host or clean-machine qualification. Current binary inspection finds Node macOS minimum13.5 and TIDAS minimum11.0; both TIDAS GNU Linux targets require GLIBC2.38. The public Windows TIDAS 0.3.0 executable uses static CRT linkage: independent LLVM PE inspection finds only Windows OS imports, and the exact-tag native workflow passed packaged smoke. The reviewed input profile records an empty external-runtime DLL list and the actual public executable hash. [TIDAS #181](https://github.com/tiangong-lca/tidas-tools/issues/181) and [release #187](https://github.com/tiangong-lca/tidas-tools/issues/187) retain the correction and publication evidence. Complete Node/CLI/Foundry/TIDAS cold-start qualification remains a further F1 gate.
309
+ Native handshake success is not minimum-host or clean-machine qualification. Current binary inspection finds Node macOS minimum13.5 and TIDAS minimum11.0; both TIDAS GNU Linux targets require GLIBC2.38. The public Windows TIDAS 0.3.2 executable uses static CRT linkage: independent LLVM PE inspection finds only Windows OS imports, and the exact-tag native workflow passed packaged smoke. The reviewed input profile records an empty external-runtime DLL list and the actual public executable hash. [TIDAS #181](https://github.com/tiangong-lca/tidas-toolkit/issues/181) and [release #187](https://github.com/tiangong-lca/tidas-toolkit/issues/187) retain the correction and publication evidence. Complete Node/CLI/Foundry/TIDAS cold-start qualification remains a further F1 gate.
310
310
 
311
311
  ## Qualification
312
312
 
313
313
  `pnpm package:build` rebuilds both output roots from scratch and verifies the staged package. `pnpm package:check` compares the stage with the descriptor, runs a pack dry-run, and verifies the installed C1 descriptor. `pnpm package:pack` packs only `package-stage/` into an owned temporary directory, derives the versioned archive name from the verified staged descriptor, then installs it with an exclusive hardlink. The repository manifest, compiled verifier version and descriptor JSON Schema version remain coherent release projections; the verifier never takes its expected identity from the installed manifest it is checking. An identical existing archive is reused; a link, invalid file or different existing bytes are preserved and rejected rather than overwritten.
314
314
 
315
- The package scenario rebuilds twice, packs twice byte-identically, and installs the same tarball into two clean consumers; the second install is offline from the first consumer's isolated public cache. The scenario first verifies the source-pinned pnpm version. Corepack, when used, stores that tool in a fresh scenario-local cache shared across the isolated tool homes; later packing runs with Corepack networking disabled and latest-version lookup disabled. Tool bootstrap and the first public-registry install have bounded five-minute deadlines for cold network downloads; the offline install and local commands retain their two-minute deadlines. It verifies the exact import surface and declarations, public CLI 0.1.14 runtime identity, shebang/bin, source/installed operation equivalence, arbitrary Unicode CWD, read-only package bytes, isolated workspace writes and all six facade operations. It also proves that internal commands, modified/extra/linked files, a lifecycle-bearing manifest, a `darwin-x64` descriptor and a package copied without C1 fail closed.
315
+ The package scenario rebuilds twice, packs twice byte-identically, and installs the same tarball into two clean consumers; the second install is offline from the first consumer's isolated public cache. The scenario first verifies the source-pinned pnpm version. Corepack, when used, stores that tool in a fresh scenario-local cache shared across the isolated tool homes; later packing runs with Corepack networking disabled and latest-version lookup disabled. Tool bootstrap and the first public-registry install have bounded five-minute deadlines for cold network downloads; the offline install and local commands retain their two-minute deadlines. It verifies the exact import surface and declarations, public CLI 0.1.19 runtime identity, shebang/bin, source/installed operation equivalence, arbitrary Unicode CWD, read-only package bytes, isolated workspace writes and all six facade operations. It also proves that internal commands, modified/extra/linked files, a lifecycle-bearing manifest, a `darwin-x64` descriptor and a package copied without C1 fail closed.
316
316
 
317
317
  These checks qualify a local candidate tarball. They do not prove registry provenance, public component download, native TIDAS availability on every host or a complete Node+CLI+Foundry+TIDAS component. Those are W08 release gates.
318
318
 
@@ -32,9 +32,9 @@ checkPaths:
32
32
  - test/scenarios/foundry-facade-request-store.test.mts
33
33
  - test/scenarios/foundry-package-consumer.test.mts
34
34
  - docs/public-runtime-contract.md
35
- lastReviewedAt: "2026-09-14"
36
- lastReviewedCommit: "2b80865083d1ca4dd095624090ddd1c741b5d2cd"
37
- lastReviewedNote: "Reviewed for Foundry #167: exact helper-generated version projection advances0.1.8 to0.1.9 for canonical publish.yml provenance. Runtime, ownership, environment, authorization, CLI0.1.14 dependency and all qualification gates remain unchanged. Registry/component publication and independent install proof are still pending."
35
+ lastReviewedAt: 2026-09-21
36
+ lastReviewedCommit: 5f848dab3c680c7ad5f5d768d9f1585e26f2427c
37
+ lastReviewedNote: "Reviewed for Foundry #185: release-only 0.1.10 identity projection from qualified main 5f848dab3c680c7ad5f5d768d9f1585e26f2427c changes no runtime behavior, dependency, permission or command contract. Signed publication and native/bootstrap qualification remain required release gates."
38
38
  related:
39
39
  - docs/runtime-context-contract.md
40
40
  - docs/task-authorization-contract.md
@@ -66,7 +66,7 @@ Input changes create an explicit new revision with retained history. A new revis
66
66
 
67
67
  ## Task start and request revisions
68
68
 
69
- `tiangong-foundry.task-start.v1` contains exact request and actor ids, one of the two lanes, profile, ordered target entity types, selected source paths, optional account intent, an optional selected JSON seed and at most one current local preparation (`dataset-curation-cleanup`). The source-evidence lane requires its seed to be one of the selected sources. Task start performs no authentication and stores no identity receipt.
69
+ `tiangong-foundry.task-start.v1` contains exact request and actor ids, one of the three lanes, profile, ordered target entity types, selected source paths, optional account intent, an optional selected JSON seed and at most one current local preparation (`dataset-curation-cleanup`). The source-evidence lane requires its seed to be one of the selected sources. Task start performs no authentication and stores no identity receipt.
70
70
 
71
71
  The workspace request index key is the SHA-256 of workspace id plus request id. Task ids are deterministic `task-<complete-request-sha256>-rNNNN` values. A revision fingerprint binds the normalized spec and ordered canonical input path/bytes/SHA facts. Same request plus latest fingerprint is byte-idempotent, including concurrent starts. Any selected path, content, actor/account, lane/profile/entity or preparation change creates a predecessor-bound revision and preserves every earlier task directory and attempt. Interrupted creation recovers the same deterministic task before the index is published; a different spec returns an actionable recovery conflict until the original spec completes that index record.
72
72
 
@@ -100,10 +100,20 @@ Before the first dispatch, the batch attempt-start event durably registers an im
100
100
 
101
101
  Each owner command is dispatched once as executable plus argv with explicit authentication and `shell=false`. Commit stdout must match its contained report. A confirmed success requires the existing closeout checks and fresh independent root, owner, state, payload and reference verification. Lost or unknown responses and narrowly recognized same-identity conflicts use independent readback; known business failures remain unresolved. Recovery does not require the old write grant to remain unexpired and cannot change the original request. The CLI batch item's verified/recovered result determines success; aggregate batch completion alone is insufficient.
102
102
 
103
- Explicit native insert handoffs additionally require a matching CLI v2 execution report: exact contract canonical digest, execution id, ordered action/row identities and desired payload digests, consumed insert attempts, and successful exact readback for every action. Failed, unknown, blocked, replayed or incomplete rows cannot close the scope. After a lost response, recovery may read the original bound output's `outputs/dataset-save-draft/summary.json`; absent or invalid native evidence remains unresolved even when roots match. Recovery never dispatches another mutation or retrofits a legacy report into native consumption.
103
+ Explicit native draft handoffs additionally require a matching CLI v2 execution report: exact contract canonical digest, execution id, ordered action/row identities, per-action operation/before binding and desired payload digests, consumed attempts, and successful exact readback for every action. A row recovered from an ambiguous dispatch may close only with that same consumed-attempt, non-replayed, desired-exact evidence. Failed, forged, unknown, blocked, replayed or incomplete rows cannot close the scope. After a lost response, recovery may read the original bound output's `outputs/dataset-save-draft/summary.json`; absent or invalid native evidence remains unresolved even when roots match. Recovery never dispatches another mutation or retrofits a legacy report into native consumption.
104
104
 
105
105
  Every readback gets a fresh output directory. A verified result binds the exact input, report and JSONL check hashes, plus the native execution report when selected; later status checks rehash each fact. Completed scopes preserve their final rows while dependent scopes are finalized again after new verified progress. Reference-only partitions use the separate canonical verification stage below; semantic changes cannot replace consumed scope rows.
106
106
 
107
+ ## Existing owner-draft metadata repair
108
+
109
+ The `existing-owner-draft-repair` lane selects exactly three distinct source files: a native execution contract, complete before rows and candidate rows. It currently accepts Process rows, stable identity/version and existing ownership/source-reference description text only. Scientific values, references, language structure and annual-volume content cannot change. Registration and status are offline. Resume uses the qualified installed CLI for contract dry-run and exact current-owner/state-0 before readback; producer-indexed raw owner reports and per-root JSONL proofs must agree with the complete selected content. Summaries alone do not prove readback. A no-change scope completes only after validation and exact readback of both selections, without an execution request or mutation attempt.
110
+
111
+ For this metadata-only lane, reference integrity is distinct from reference freshness. Expectations are derived from the complete selected before/candidate payloads and every unchanged reference occurrence. An exact historical reference may remain only when the CLI proves that requested version exists, its sole finding is a newer version, all blocker/count/check records agree, and every root has exact current owner/state/content readback. The raw blocked CLI report and freshness findings remain unchanged; the preparation and closeout retain a separate proof and `publication_ready: false`. A missing exact version, changed reference, mismatched input path, unexpected failure or incomplete check set blocks repair. Ordinary authoring and canonical-reference quality gates keep their existing latest-version requirements.
112
+
113
+ A changed scope requires `input_kind: repair_rows` authorization, an explicit `repair_preparation` reference and the matching native contract. The existing descriptor's `finalization_sha256` binds that preparation digest for this explicit kind; no generic finalization report is manufactured. Only the locked generic profile is currently admitted for repair writes. The grant/capsule/owner-request stores are shared with ordinary execution. Dispatch rechecks the immutable preparation, account, candidate and native contract, then uses the same CLI-owned attempt ledger and guarded save path. Unknown annual volume retains its failed authoring-evidence layer and false publication readiness.
114
+
115
+ Repair closeout requires the matching consumed native execution receipt plus independent exact owner/state/payload and reference-closure readback. It binds the same preparation report, never claims generic authoring/QA/location checks ran, and never accepts trace-normalized equality. A missing receipt or wrong readback remains unresolved; resume performs readback only and cannot repeat the mutation. Status rehashes retained proof and may complete a verified repair without a generic row-authoring finalization. An explicitly linked successor may proceed only when the predecessor has a producer-verified terminal CLI failure proving zero executed actions and zero consumed CLI attempts. It preserves the same request/account/identities, uses new immutable input paths and a genuinely changed desired payload, and requires a fresh preflight and grant. A fresh before image is permitted; old evidence remains immutable. Unknown or dispatched predecessors remain blocked.
116
+
107
117
  ## Canonical reference verification
108
118
 
109
119
  Identity reuse retains original source rows in the reference partition and selects different canonical targets in its rewrite evidence. After current finalization, resume verifies those selected table/id/version targets through the qualified CLI `dataset verify-remote --root-policy existing`. Its generated query contains only reference descriptors. It does not compare the source payload with the reused dataset or construct a write candidate.
@@ -120,7 +130,7 @@ Status performs local evidence verification only. Failed verification exposes `r
120
130
 
121
131
  The existing task artifact transaction records a fresh immutable generation. QA and review bytes are copied exactly; the original descriptor/intent bytes are retained. The derived intent rewrites only review file locators to the independently checked task snapshots. That derived file has its own raw SHA-256 and is the file the qualified CLI verifies. It grants no permission. Identical submissions reuse the current selection. Concurrent replacement is checked under the task lock; prepared, consumed and completed owner scopes cannot replace their reference evidence. Removing the original selected files does not remove the snapshots needed for execution/recovery.
122
132
 
123
- Selection invalidates prior finalization/approval projection through the recorded reference-selection digest. Finalization uses only current indexed snapshots and requires the selected dataset's current row bytes to match its original control binding; changed rows require fresh selection. Process QA receives explicit repeated `--reference-rows-file` arguments. Precommit verification receives exactly the derived `--reference-intent-file`; default canonical-reference and root policies remain owned by the CLI. Its [exact-reference protocol](https://github.com/tiangong-lca/tiangong-cli/blob/main/docs/agents/exact-reference-intent-contract.md) owns consumer/actor/content/review eligibility. Foundry does not infer units, discover sibling files or create a reference exception itself.
133
+ Selection invalidates prior finalization/approval projection through the recorded reference-selection digest. Finalization uses only current indexed snapshots and requires the selected dataset's current row bytes to match its original control binding; changed rows require fresh selection. Process QA receives explicit repeated `--reference-rows-file` arguments. Precommit verification receives exactly the derived `--reference-intent-file`; default canonical-reference and root policies remain owned by the CLI. Its [exact-reference protocol](https://github.com/tiangong-lca/cli/blob/main/docs/agents/exact-reference-intent-contract.md) owns consumer/actor/content/review eligibility. Foundry does not infer units, discover sibling files or create a reference exception itself.
124
134
 
125
135
  Sealing obtains a fresh qualified CLI identity after local handoff preparation and performs complete capsule admission against the current grant and evidence. Before an unconsumed write, the workflow obtains a new current identity between initial rehydration and the final complete admission pass, so prior local work does not age that receipt. Both passes and the existing 60-second identity bound remain enforced before the attempt is consumed.
126
136
 
@@ -193,7 +203,7 @@ Every facade revision also rechecks all retained predecessors in its request cha
193
203
 
194
204
  ## Runtime selection and migration seam
195
205
 
196
- The public facade accepts CLI/TIDAS expectations only through its process-local host interface. Ordinary argv, task specs, `.env` and ambient `TIDAS_BIN`/expectation variables cannot select trust anchors. Without a host selection, doctor, start, status and local resume work and report `qualification.required`; child-required work must return the runtime qualification action. The managed bin now obtains this selection from the CLI IPC context and its verified component metadata. The final immutable production product manifest remains a W08 deliverable. The current exact CLI 0.1.14 constraint remains explicit rather than silently accepting a future version.
206
+ The public facade accepts CLI/TIDAS expectations only through its process-local host interface. Ordinary argv, task specs, `.env` and ambient `TIDAS_BIN`/expectation variables cannot select trust anchors. Without a host selection, doctor, start, status and local resume work and report `qualification.required`; child-required work must return the runtime qualification action. The managed bin now obtains this selection from the CLI IPC context and its verified component metadata. The final immutable production product manifest remains a W08 deliverable. The current exact CLI 0.1.19 constraint remains explicit rather than silently accepting a future version.
197
207
 
198
208
  `workspace migrate --dry-run` recursively inventories only regular files/directories, rejects links and returns `tiangong-foundry.workspace-migration-plan.v1` as an inline content-bound artifact. It classifies control, local-preparation, terminal-success, attempted/unknown, authorization/account and unclassified paths. The public envelope is bounded to 10,000 entries and 64 directory levels. The total hashed inventory is bounded to 256 MiB. Files larger than 64 MiB and recognized credential/session files retain path/size/classification facts with `sha256=null`; their contents are not read by this inventory. The tree digest binds this observational inventory, not an atomic filesystem snapshot, so W10 must re-read and verify every selected source immediately before apply. It writes nothing. W10 owns application, rollback and detailed old-schema mapping.
199
209
 
@@ -40,9 +40,9 @@ checkPaths:
40
40
  - test/scenarios/runtime-workspace.test.mts
41
41
  - test/scenarios/foundry-execution-admission.test.mts
42
42
  - test/scenarios/foundry-package-consumer.test.mts
43
- lastReviewedAt: "2026-09-14"
44
- lastReviewedCommit: "2b80865083d1ca4dd095624090ddd1c741b5d2cd"
45
- lastReviewedNote: "Reviewed for Foundry #167: exact helper-generated version projection advances0.1.8 to0.1.9 for canonical publish.yml provenance. Runtime, ownership, environment, authorization, CLI0.1.14 dependency and all qualification gates remain unchanged. Registry/component publication and independent install proof are still pending."
43
+ lastReviewedAt: 2026-09-21
44
+ lastReviewedCommit: 5f848dab3c680c7ad5f5d768d9f1585e26f2427c
45
+ lastReviewedNote: "Reviewed for Foundry #185: release-only 0.1.10 identity projection from qualified main 5f848dab3c680c7ad5f5d768d9f1585e26f2427c changes no runtime behavior, dependency, permission or command contract. Signed publication and native/bootstrap qualification remain required release gates."
46
46
  related:
47
47
  - docs/architecture.md
48
48
  - docs/task-authorization-contract.md
@@ -64,11 +64,11 @@ The public task facade delegates sealed owner execution to `foundry-workflow-exe
64
64
 
65
65
  The public workflow selects derived row/context facts from the current verified task index before assessment. `runFoundryTaskOperation` rechecks their producer ancestry and original sources. Native validation and the exact CLI's local QA/queue commands use the qualified runtime and isolated environment; curation and authoring write only to a fresh task-owned generation. Runtime assets and source-owner reference bases remain separate from user workspace paths.
66
66
 
67
- `qualifyFoundryRuntime` compares an independently selected CLI expectation with the exact installed `@tiangong-lca/cli@0.1.14` runtime descriptor. It also compares a strict TIDAS expectation with the selected platform, executable bytes, compatible 0.2.x or 0.3.x version, validation protocols, event schemas and asset fingerprint. The selected TIDAS executable is copied into a private temporary directory, rehashed there and invoked with the credential-free child environment; both handshake calls must be silent. Qualification uses a process-local brand. The portable identity described by `runtime-qualification.schema.json` is diagnostic evidence and cannot be deserialized into authority.
67
+ `qualifyFoundryRuntime` compares an independently selected CLI expectation with the exact installed `@tiangong-lca/cli@0.1.19` runtime descriptor. It also compares a strict TIDAS expectation with the selected platform, executable bytes, compatible 0.2.x or 0.3.x version, validation protocols, event schemas and asset fingerprint. The selected TIDAS executable is copied into a private temporary directory, rehashed there and invoked with the credential-free child environment; both handshake calls must be silent. Qualification uses a process-local brand. The portable identity described by `runtime-qualification.schema.json` is diagnostic evidence and cannot be deserialized into authority.
68
68
 
69
69
  The TIDAS expectation admits only `linux-x64`, `linux-arm64`, `darwin-arm64` and `win32-x64`; `darwin-x64` cannot enter the schema or runtime context. `tidas-runtime-expectation.schema.json` is the reviewed machine shape. Qualification creation performs the isolated version/protocol/assets handshake once. Every later assertion reopens and hashes the selected executable and rejects any byte drift before child admission; identical immutable bytes do not replay the handshake. This keeps the original observed behavior bound to exact content while avoiding repeated child-process creation inside one admission call.
70
70
 
71
- `execution-context.schema.json` describes the content-addressed child handoff stored under `evidence/executions/`. It is distinct from the older offline `foundry-execution-capsule-stage.v1` admission ledger: the older contract proves immutable staged evidence and attempt state, while `tiangong-foundry.execution-context.v1` binds a current task invocation. Rehydration requires a fresh process-local context, qualification and identity; exact workspace/task/actor, approved source ancestry, current final-row bytes, active authorization and QA waivers, installed owner CLI, owner-draft argv semantics, task-contained output root and CommandSpec digest are rechecked. The action list must match the CLI operation. A native insert selection admits exactly the final-row and execution-contract artifacts, with the contract independently selected from the current task index. The internal `dataset-workflow-native-contract` operation records the control snapshot without changing source-row ancestry. Native Flow/Process/Source admission revalidates the contract against the current owner, project, state 0 and ordered rows before invoking the public CLI `dataset save-draft --execution-contract`; arbitrary extra artifacts remain invalid. An explicit reference selection additionally binds exactly one intent, its passing precommit report and the complete review artifact set. Each must be independently selected by the current host and retain its indexed bytes; admission rechecks current consumer content, actor/project and evidence correspondence through the existing handoff adapter. This transport adds no eligibility policy or write authority. Serialized admissions, unrelated CLI commands and changed capsule/spec/input bytes fail closed.
71
+ `execution-context.schema.json` describes the content-addressed child handoff stored under `evidence/executions/`. It is distinct from the older offline `foundry-execution-capsule-stage.v1` admission ledger: the older contract proves immutable staged evidence and attempt state, while `tiangong-foundry.execution-context.v1` binds a current task invocation. Rehydration requires a fresh process-local context, qualification and identity; exact workspace/task/actor, approved source ancestry, current final-row bytes, active authorization and QA waivers, installed owner CLI, owner-draft argv semantics, task-contained output root and CommandSpec digest are rechecked. The action list must match the CLI operation. A native draft selection admits exactly the final-row and execution-contract artifacts, with the contract independently selected from the current task index. The internal `dataset-workflow-native-contract` operation records the control snapshot without changing source-row ancestry. Native Flow/Process/Source admission revalidates every action's operation and before binding against the current owner, project, state 0 and ordered rows before invoking the public CLI `dataset save-draft --execution-contract`: insert requires an absent before state, save_draft requires the exact lowercase before hash, and arbitrary extra artifacts remain invalid. An explicit reference selection additionally binds exactly one intent, its passing precommit report and the complete review artifact set. Each must be independently selected by the current host and retain its indexed bytes; admission rechecks current consumer content, actor/project and evidence correspondence through the existing handoff adapter. This transport adds no eligibility policy or write authority. Serialized admissions, unrelated CLI commands and changed capsule/spec/input bytes fail closed.
72
72
 
73
73
  ## Root ownership
74
74
 
@@ -29,9 +29,9 @@ checkPaths:
29
29
  - test/unit/task-authorization.test.mts
30
30
  - test/unit/task-profile-authority.test.mts
31
31
  - test/scenarios/foundry-execution-admission.test.mts
32
- lastReviewedAt: 2026-09-11
33
- lastReviewedCommit: abc7672f3b3a806caa4219ab5b797f1d92421926
34
- lastReviewedNote: "Reviewed for #122: explicit task reference snapshots, CLI 0.1.14 QA/intent transport, sealed admission/readback evidence and no-replay recovery. Existing profile, permission, environment and historical delivery boundaries remain enforced."
32
+ lastReviewedAt: 2026-09-21
33
+ lastReviewedCommit: bc41ba12a0fd9d6499c6ee992df891cf15e5303b
34
+ lastReviewedNote: "Reviewed for Foundry #171 Windows CI correction: repair handoff and readback artifact paths reuse the existing canonical relative-path owner, matching strict native closeout on every platform. Payload, contract, authorization, exact readback and no-replay requirements are preserved."
35
35
  related:
36
36
  - docs/architecture.md
37
37
  - docs/safety-policy.md