@tiangong-lca/foundry 0.1.12 → 0.1.13

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 (45) hide show
  1. package/README.md +5 -5
  2. package/docs/architecture.md +7 -5
  3. package/docs/foundry-task-contracts.md +4 -4
  4. package/docs/import-profiles/worldsteel/constraints.md +3 -3
  5. package/docs/import-profiles/worldsteel/import-coverage.md +3 -3
  6. package/docs/import-profiles/worldsteel/import-plan.md +4 -4
  7. package/docs/import-profiles/worldsteel/profile.md +3 -3
  8. package/docs/package-distribution-contract.md +9 -9
  9. package/docs/public-runtime-contract.md +8 -6
  10. package/docs/runtime-context-contract.md +3 -3
  11. package/docs/task-authorization-contract.md +3 -3
  12. package/package-dist/assets/foundry-package-descriptor.json +97 -67
  13. package/package-dist/scripts/foundry-facade.js +217 -9
  14. package/package-dist/scripts/lib/foundry-interaction-input.d.ts +4 -3
  15. package/package-dist/scripts/lib/foundry-interaction-input.js +40 -7
  16. package/package-dist/scripts/lib/foundry-interaction-projection.d.ts +21 -2
  17. package/package-dist/scripts/lib/foundry-interaction-projection.js +49 -8
  18. package/package-dist/scripts/lib/foundry-interaction-scope.d.ts +7 -0
  19. package/package-dist/scripts/lib/foundry-interaction-scope.js +40 -0
  20. package/package-dist/scripts/lib/foundry-interaction-types.d.ts +5 -0
  21. package/package-dist/scripts/lib/foundry-native-validation-failure.d.ts +36 -0
  22. package/package-dist/scripts/lib/foundry-native-validation-failure.js +142 -0
  23. package/package-dist/scripts/lib/foundry-owner-execution-store.js +6 -13
  24. package/package-dist/scripts/lib/foundry-package-contract.d.ts +2 -2
  25. package/package-dist/scripts/lib/foundry-package-contract.js +2 -2
  26. package/package-dist/scripts/lib/foundry-runtime-qualification.js +2 -2
  27. package/package-dist/scripts/lib/foundry-runtime-utils.js +1 -1
  28. package/package-dist/scripts/lib/foundry-semantic-interaction.d.ts +11 -1
  29. package/package-dist/scripts/lib/foundry-semantic-interaction.js +64 -14
  30. package/package-dist/scripts/lib/foundry-tidas-source.js +4 -4
  31. package/package-dist/scripts/lib/foundry-workflow-approval-continuation.js +3 -0
  32. package/package-dist/scripts/lib/foundry-workflow-assessment.js +27 -2
  33. package/package-dist/scripts/lib/foundry-workflow-authorization.js +3 -0
  34. package/package-dist/scripts/lib/foundry-workflow-interaction.js +22 -3
  35. package/package-dist/scripts/lib/foundry-workflow-object-scope.d.ts +53 -0
  36. package/package-dist/scripts/lib/foundry-workflow-object-scope.js +326 -0
  37. package/package-dist/scripts/lib/foundry-workflow-semantic.d.ts +5 -0
  38. package/package-dist/scripts/lib/foundry-workflow-semantic.js +200 -6
  39. package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +1 -1
  40. package/package.json +2 -2
  41. package/specs/import-profiles.json +1 -1
  42. package/specs/schemas/foundry-interaction-input.schema.json +29 -2
  43. package/specs/schemas/foundry-managed-runtime.schema.json +1 -1
  44. package/specs/schemas/foundry-package-descriptor.schema.json +2 -2
  45. package/specs/schemas/runtime-qualification.schema.json +1 -1
package/README.md CHANGED
@@ -159,15 +159,15 @@ checkPaths:
159
159
  - test/unit/zero-javascript-ratchet.test.mts
160
160
  - test/scenarios/foundry-package-consumer.test.mts
161
161
  lastReviewedAt: 2026-09-24
162
- lastReviewedCommit: 05e4bd11b08276d092d10051b3f4f376c2af52ef
163
- lastReviewedNote: "Reviewed for Foundry #197: release-only 0.1.12 identity projection from exact merged #200 main 05e4bd11b08276d092d10051b3f4f376c2af52ef; #196 early-question continuation and #200 indexed, human-readable blocked-queue behavior are already in the base. This projection changes no runtime behavior, CLI pin, dependencies, scientific or permission gates. Signed publication and installed qualification remain separate release gates."
162
+ lastReviewedCommit: be60f69ae57c45c4278b1744195f32aa3237af9d
163
+ lastReviewedNote: "Reviewed for Foundry #205 version-only 0.1.13: the canonical three-file package projection advances over merged #204/#206 source. Public CLI 0.1.22, SDK 0.4.1 and Toolkit 0.3.3 locks, public behavior and documentation body remain unchanged; publication and root integration stay separate."
164
164
  ---
165
165
 
166
166
  # TianGong LCA Data Foundry
167
167
 
168
168
  The ordinary user entry is the independently installed [TianGong Foundry skill](https://github.com/tiangong-lca/agent-skills/tree/main/foundry-tidas-import). Its qualified release lock selects the managed runtime for a separate user workspace. The internal authoring role is maintained in the same Skills repository and loads for current semantic work items. This source checkout retains the developer commands and runtime owners described below; it carries no second maintained copy of either skill.
169
169
 
170
- The public task protocol can retain a short goal and scope, register evidence-bound questions and raw answers, reassess only affected dataset types, and present a derived decision recap with the completed result. The entry skill explains human decisions in plain language and accepts natural answers; Foundry preserves the exact task evidence and the CLI keeps scientific validation and write permission separate. A source checkout implementing this protocol does not itself update the independently qualified installed skill/runtime lock.
170
+ The public task protocol can retain a short goal and scope, register evidence-bound questions and raw answers, and distinguish task-wide, dataset-type-wide and exact registered-object choices. An object choice carries a versioned identity and current row hash; independent Process work can continue while another Process awaits an answer. Semantic results record only applicable decision IDs and their indexed before/after row hashes, while a concise recap points back to full evidence. The entry skill explains human decisions in plain language and accepts natural answers; Foundry presents the question, impact and next step before the exact record locator while preserving full evidence in indexed artifacts. The CLI keeps scientific validation and write permission separate. A source checkout implementing this protocol does not itself update the independently qualified installed skill/runtime lock.
171
171
 
172
172
  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.
173
173
 
@@ -342,9 +342,9 @@ pnpm case:production:contact-draft -- \
342
342
 
343
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.
344
344
 
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
+ 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.22 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.
346
346
 
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
+ 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.22, 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.
348
348
 
349
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.
350
350
 
@@ -153,8 +153,8 @@ checkPaths:
153
153
  - test/unit/lint-suppression-audit.test.mts
154
154
  - docs/incremental-change-set-contract.md
155
155
  lastReviewedAt: 2026-09-24
156
- lastReviewedCommit: 05e4bd11b08276d092d10051b3f4f376c2af52ef
157
- lastReviewedNote: "Reviewed for Foundry #197: release-only 0.1.12 identity projection from exact merged #200 main 05e4bd11b08276d092d10051b3f4f376c2af52ef; #196 early-question continuation and #200 indexed, human-readable blocked-queue behavior are already in the base. This projection changes no runtime behavior, CLI pin, dependencies, scientific or permission gates. Signed publication and installed qualification remain separate release gates."
156
+ lastReviewedCommit: be60f69ae57c45c4278b1744195f32aa3237af9d
157
+ lastReviewedNote: "Reviewed for Foundry #205 version-only 0.1.13: package version metadata changes, while the merged #204 runtime inputs and #206 object interaction architecture remain unchanged. Publication and root inclusion require separate exact-source evidence."
158
158
  ---
159
159
 
160
160
  # Architecture
@@ -167,7 +167,9 @@ Migration transfer planning is governed by [the workspace migration contract](wo
167
167
 
168
168
  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 compiles that facade into the descriptor-bound `@tiangong-lca/foundry` candidate; W08 still owns F1 publication and platform components. See `docs/public-runtime-contract.md`, `docs/runtime-context-contract.md`, `docs/package-distribution-contract.md`, `docs/task-authorization-contract.md` and `docs/foundry-task-contracts.md`.
169
169
 
170
- Task-local interaction is a small owner over the existing facade and artifact transaction. The optional brief stays in the immutable request revision; question, raw-answer, interpreted-decision and AI-assumption events are indexed under the task lock. A graph-leaf interaction type module lets assessment read applicable projections without depending back on the input/store owner. Assessment projects one dataset type per resume, retains unchanged set reports through exact row/context/queue/applicable-decision bindings and exposes incomplete coverage immediately. Current user decisions and AI assumptions enter the type's authoring context; semantic apply binds the exact current decision ids before invoking the existing owner. Foundry derives a readable recap source from actual task/completion evidence, while Skills writes the human-facing wording. These records supply context, not scientific data or remote write authority.
170
+ Task-local interaction is a small owner over the existing facade and artifact transaction. The optional brief stays in the immutable request revision; question, raw-answer, interpreted-decision and AI-assumption events are indexed under the task lock. Legacy task/type-wide events retain their meaning; an optional object scope identifies one current registered dataset by type, id, version and exact source-row hash. Registration and the task lock verify that proof against unique indexed rows, never a caller-provided name alone. Assessment still projects one type per resume, but its reusable type digest excludes object-only changes; status projects a fresh context for each current authoring item so another Process does not receive or wait for a Process-specific answer. Semantic apply binds exactly applicable decision IDs to each selected patch object or registered decision-task queue object and records before/after row hashes. An old row proof may follow only an indexed decision-bound successor; a new answer after prior object work still needs its own adoption, an assumption on changed bytes needs explicit re-review, and an unproven identity rewrite blocks the affected scope. The type-level write gate requires adoption of every current narrow answer at authorization, prepared-approval continuation and owner execution under current indexed evidence. Initial answers still permit local assessment before this boundary; an authorized task cannot quietly replace its interaction history. Foundry derives a readable recap source from task/completion evidence, while Skills writes the human-facing wording. These records supply context, not scientific data or remote write authority.
171
+
172
+ Native validation failure evidence is a separate assessment result, not a partially valid schema report. `foundry-native-validation-failure.ts` checks the TIDAS exit/report and bounds full diagnostics/stderr against the selected row set before the task transaction indexes them. The facade rechecks the registered result, active row manifest and file hashes, then projects an actionable blocker after restart without retrying the same operation or reaching write planning. The native path fix itself belongs to the TIDAS Toolkit; this Foundry adapter preserves the evidence and prevents the generic error from hiding it.
171
173
 
172
174
  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.
173
175
 
@@ -179,7 +181,7 @@ The public task facade delegates sealed owner execution to `foundry-workflow-exe
179
181
 
180
182
  ## OAuth identity boundary
181
183
 
182
- 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.
184
+ 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.22 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.
183
185
 
184
186
  ## Qualified execution boundary
185
187
 
@@ -344,7 +346,7 @@ Build and test resolution must be worktree-local. A clean arbitrary Git worktree
344
346
 
345
347
  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.
346
348
 
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.
349
+ 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.22, 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.
348
350
 
349
351
  `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.
350
352
 
@@ -29,8 +29,8 @@ checkPaths:
29
29
  - specs/import-profiles.json
30
30
  - tasks/**
31
31
  lastReviewedAt: 2026-09-24
32
- lastReviewedCommit: abd80f28c1eff58c19ae40c929cf130b8b7d2431
33
- lastReviewedNote: "Reviewed for Foundry #200: blocked CLI queue manifest and exact missing-reference rows are registered with current assessment while unchanged resume cannot re-run exhausted local stages."
32
+ lastReviewedCommit: 2b9558a568c8a89232d9c49fdaa78aa6e79fd643
33
+ lastReviewedNote: "Reviewed for Foundry #206: object-scoped interaction events require a unique versioned registered row hash, while per-object semantic bindings and indexed row successors avoid same-type decision leakage. Base retains #204 public CLI 0.1.22, SDK 0.4.1 and Toolkit 0.3.3 qualification."
34
34
  related:
35
35
  - AGENTS.md
36
36
  - WORKFLOW.md
@@ -82,11 +82,11 @@ Local native-import and CLI context-pack stages use the existing operation plan,
82
82
 
83
83
  Row materialization and assessment also use this local transaction. Materialized rows preserve domain payloads and row metadata, normalize typed API payload wrappers to the CLI-compatible `json` slot, and retain a producer chain to the original selected seed or primary native dataset. Original wrappers remain in the frozen source; bundled copies are excluded from row selection. Assessment reads only selected indexed rows/context, then registers native validation, local QA, queue, curation and authoring outputs. Its report records the owner's resolution base for relative references. Pending work is a current artifact state, not permission to execute a rendered command or dispatch a remote write.
84
84
 
85
- The public assessment advances one dataset type per resume and records cumulative coverage. A prior set is reusable only while its row file, schema/QA/curation/authoring artifacts, contract pack, process closure queue and applicable interaction digest still match current registered facts. A changed applicable answer or assumption makes only affected sets due for re-assessment; a task-wide item affects every set. Each new generation binds the previous report and retains source receipts for reused outputs. An `in_progress` report is visible for prompt human follow-up and independent work, but cannot prove finalization or completion. A pending question before rows exist still permits independently registered native import, contract context and row materialization; a pending question before explicit cleanup permits that one local preparation. Repeated resume after local work is exhausted retains the same indexed evidence and cannot enter account or owner-write stages.
85
+ The public assessment advances one dataset type per resume and records cumulative coverage. A prior set is reusable only while its row file, schema/QA/curation/authoring artifacts, contract pack, process closure queue and applicable task/type interaction digest still match current registered facts. An object-only answer or assumption changes that object's live authoring context and semantic ID gate without making another Process set or work item stale; a task-wide item affects every set. Row revisions still require current assessment of their changed type, while independently unchanged rows retain their identity and cannot inherit another object's choice. Each new generation binds the previous report and retains source receipts for reused outputs. An `in_progress` report is visible for prompt human follow-up and independent work, but cannot prove finalization or completion. A pending question before rows exist still permits independently registered native import, contract context and row materialization; a pending question before explicit cleanup permits that one local preparation. Repeated resume after local work is exhausted retains the same indexed evidence and cannot enter account or owner-write stages.
86
86
 
87
87
  A valid CLI curation queue may be `blocked` with exit 1. Assessment binds that report to the current registered row paths and hashes, verifies the bounded queue output tree, then indexes its manifest, blocker JSONL and closure files before projecting a concise missing-reference explanation. Schema, QA and curation may still record other local findings; blocked queue closure and its full Flow IDs remain visible evidence, never permission, waiver or completion. Changed selected source files create a new request revision rather than editing the frozen task, while independent row types can retain their assessed receipts.
88
88
 
89
- `dataset-workflow-interaction` uses the same metadata lock, immutable output generation and hash-chained index. Its selected input descriptor binds task, actor and current interaction-state SHA; question, raw answer, interpreted decision and AI assumption events are append-only. Its evidence hashes must name frozen sources or indexed task artifacts. A duplicate accepted descriptor reuses its result; stale compare-and-swap or changed selected bytes fail. The current `interaction-state.json` is a task-scoped decision source for assessment and semantic work. It does not mutate the frozen source manifest, grant write authority or clear a consumed attempt. The user-facing `decision_recap` is derived from that state for current and partial results, with `completion_proven` true only after current completion evidence; it is not a second task truth source.
89
+ `dataset-workflow-interaction` uses the same metadata lock, immutable output generation and hash-chained index. Its selected input descriptor binds task, actor and current interaction-state SHA; question, raw answer, interpreted decision and AI assumption events are append-only. Task/type-wide events retain their v1 meaning. An optional `object_scope` on a question or assumption binds one explicit type/id/version and the hash of exactly one current registered row; an answer inherits that scope. Input parsing and the task lock reject missing, duplicate, changed or caller-invented row bindings. The current `interaction-state.json` supplies per-object authoring context and exact semantic decision IDs, without mutating frozen source, granting write authority or clearing a consumed attempt. Patch work binds one assessed object. Classification/location decision owners derive every target identity from the registered task and queue, verify applicable IDs over the batch and record adoption per object; unresolved questions in the target batch block it, while disjoint work continues. Identity rewrites that cannot preserve an actively reviewed object or may indirectly rewrite its references fail closed for separate review. A semantic result records each work item and exact before/after row hashes when it cites a scoped decision. A later row differs from the question's proof only through a matching indexed decision-bound successor; other changes or assumptions on the old row need targeted review. Every current object answer needs its own indexed adoption before completion or write handoff. During local assessment, an initial answer still permits independent preparation; a new answer after earlier indexed object work immediately needs scoped reassessment, including a corrected answer or a replacement question and even when the prior row transition was a no-op. Facade, authorization, prepared-approval continuation and owner execution recheck the current interaction under their locks. An indexed authorization freezes later interaction edits; a changed choice then needs a separately reviewed task revision. The user-facing `decision_recap` identifies object scope and applied row successors, while `completion_proven` remains false until current completion proof. It is not a second task truth source.
90
90
 
91
91
  Identity preflight runs its qualified, account-bound remote reads before a local transaction captures the resulting files. Each capture has a distinct invocation identity and rechecks current rows under the task lock; the receipt cannot replay a query. A completed identity report binds the current row manifest and its combined preflight index, invalidating earlier assessments until curation consumes that index. Failed reads retain diagnostics and can be retried by a later resume; status remains read-only over stored files. Current-account write admission still requires fresh identity and separate authorization.
92
92
 
@@ -1,7 +1,7 @@
1
1
  ---
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."
2
+ lastReviewedAt: 2026-09-24
3
+ lastReviewedCommit: 894b471a1da4f1eece401f5f86db9937f3000d28
4
+ lastReviewedNote: "Reviewed for Foundry #204: operator CLI pin advances to public 0.1.22; Worldsteel selection, source evidence, authorization, coverage and write policy remain unchanged."
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-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."
2
+ lastReviewedAt: 2026-09-24
3
+ lastReviewedCommit: 894b471a1da4f1eece401f5f86db9937f3000d28
4
+ lastReviewedNote: "Reviewed for Foundry #204: operator CLI pin advances to public 0.1.22; Worldsteel selection, source evidence, authorization, coverage and write policy remain unchanged."
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-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."
2
+ lastReviewedAt: 2026-09-24
3
+ lastReviewedCommit: 894b471a1da4f1eece401f5f86db9937f3000d28
4
+ lastReviewedNote: "Reviewed for Foundry #204: operator CLI pin advances to public 0.1.22; Worldsteel selection, source evidence, authorization, coverage and write policy 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.19`; 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.22`; 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-21
3
- lastReviewedCommit: 208f520f0771f2aacdde9422133255a76f0cc2fb
4
- lastReviewedNote: "Reviewed for Foundry #171: CLI 0.1.19 leaves Worldsteel selection, authorization and write gates unchanged."
2
+ lastReviewedAt: 2026-09-24
3
+ lastReviewedCommit: 894b471a1da4f1eece401f5f86db9937f3000d28
4
+ lastReviewedNote: "Reviewed for Foundry #204: operator CLI pin advances to public 0.1.22; Worldsteel selection, source evidence, authorization, coverage and write policy remain unchanged."
5
5
  title: worldsteel Import Profile
6
6
  docType: profile
7
7
  scope: import-profile
@@ -35,8 +35,8 @@ checkPaths:
35
35
  - test/unit/runtime-layout.test.mts
36
36
  - test/scenarios/foundry-package-consumer.test.mts
37
37
  lastReviewedAt: 2026-09-24
38
- lastReviewedCommit: 05e4bd11b08276d092d10051b3f4f376c2af52ef
39
- lastReviewedNote: "Reviewed for Foundry #197: release-only 0.1.12 identity projection from exact merged #200 main 05e4bd11b08276d092d10051b3f4f376c2af52ef; #196 early-question continuation and #200 indexed, human-readable blocked-queue behavior are already in the base. This projection changes no runtime behavior, CLI pin, dependencies, scientific or permission gates. Signed publication and installed qualification remain separate release gates."
38
+ lastReviewedCommit: be60f69ae57c45c4278b1744195f32aa3237af9d
39
+ lastReviewedNote: "Reviewed for Foundry #205 version-only 0.1.13: the canonical three-file version projection uses unchanged release, signing, npm, four-platform, runtime-manifest and recovery contracts; publication evidence is still required."
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.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.
51
+ CLI 0.1.22 is independently verified at exact source/tag `ba286d42db5a48f8b70fd649162fb45586e7cfa2` with registry signatures, signed provenance and immutable npm integrity. Its POSIX and PowerShell bootstrap bytes remain unchanged and were re-hashed at the new tag. The exact source/script identities in `specs/release/runtime-inputs.json` and runtime descriptor/schema expectations advance with the CLI lock; its transitive SDK becomes 0.4.1 and the separate native Toolkit input becomes the published 0.3.3 release at `4f1be37fa3a9c9e939321e0d40776a63a2e005c8`. The frozen production closure remains sixteen packages, with exact new CLI/SDK archive integrities.
52
52
 
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.
53
+ The package depends exactly on public `@tiangong-lca/cli@0.1.22`. 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
 
@@ -90,7 +90,7 @@ Minimum-host data is frozen in `specs/release/runtime-inputs.json`. [The pinned
90
90
 
91
91
  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.
92
92
 
93
- 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.
93
+ The qualified TIDAS0.3.3 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.3 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.
94
94
 
95
95
  ## Build and staging roots
96
96
 
@@ -168,7 +168,7 @@ Source CI preserves each successful native result under a run-attempt-specific a
168
168
 
169
169
  ## CI qualification and verified build reuse
170
170
 
171
- The local `pnpm prepush:gate` remains the complete developer gate. Full source CI partitions the complete test-file inventory into four duration-balanced groups on each supported platform. Test files execute in isolated Node processes; shared environment and process mocks never require concurrent tests within one process. New unprofiled files remain included. Every shard binds the exact clean source and plan digest, records Node-owned counters and per-file execution evidence, and hashes its event report. Aggregation requires every platform/group exactly once with matching source, inventory and successful outcomes. Missing, duplicate, failed or stale results block qualification.
171
+ The local `pnpm prepush:gate` remains the complete developer gate. Full source CI partitions the complete test-file inventory into four duration-balanced groups on each supported platform. Test files execute in isolated Node processes; shared environment and process mocks never require concurrent tests within one process. New unprofiled files remain included. Hosted Windows per-file summaries and a conservative weight for an incompletely measured long repair test rebalance the four shards without changing the complete inventory or 40-minute job limit; a timed-out partial event log supplies only duration evidence, never a passing shard receipt. Every shard binds the exact clean source and plan digest, records Node-owned counters and per-file execution evidence, and hashes its event report. Aggregation requires every platform/group exactly once with matching source, inventory and successful outcomes. Missing, duplicate, failed or stale results block qualification.
172
172
 
173
173
  Only a pull request whose exact ancestor-related diff passes `inspectFoundryRelease` may use the version-only lane. It allows the same three version fields and permitted single-line review metadata, then runs type/lint/toolchain, build/surface/audit, release/package contracts and the real packed consumer. Mixed source, dependencies, lock changes, document bodies or invalid Git evidence cannot select this lane. Every final release `workflow_call` supplies its exact source SHA and requires complete four-platform tests, native qualification, aggregation and copied bootstrap, either freshly executed or restored from a verified complete source capsule. Tests and the complete read-only native path run in parallel after the shared package build. Native aggregation and copied-bootstrap checks do not wait for tests; the final qualification gate joins all test and native-path results before signing. Required platform checks run their dependency guard even after a failed or skipped prerequisite. Full aggregation and bootstrap use explicit cancellation/result guards so an intentionally skipped version-only job cannot suppress them transitively. An always-running terminal gate requires every stage selected by the mode to succeed; missing or skipped full-qualification stages fail the workflow. Publication continuations likewise require successful prerequisites and respect cancellation.
174
174
 
@@ -306,15 +306,15 @@ The production dependency payload is an input to complete runtime-component asse
306
306
 
307
307
  `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.
308
308
 
309
- 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.
309
+ 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.3 is pinned to actual release target `4f1be37fa3a9c9e939321e0d40776a63a2e005c8`, 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.
310
310
 
311
- 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.
311
+ 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.3 executable uses static CRT linkage: independent PE import inspection finds only Windows OS DLLs, and the exact-tag [native workflow](https://github.com/tiangong-lca/tidas-toolkit/actions/runs/35987905049) passed packaged smoke. The reviewed input profile records an empty external-runtime DLL list and the independently hashed public executable. Separate [Toolkit #232](https://github.com/tiangong-lca/tidas-toolkit/issues/232) runs the downloaded public zip on a Windows runner with the same 400-row synthetic input at short and deep Unicode paths, checks byte-identical issue/batch spools, and retains genuine I/O classification; it does not change this immutable binary. [TIDAS #181](https://github.com/tiangong-lca/tidas-toolkit/issues/181) and [release #220](https://github.com/tiangong-lca/tidas-toolkit/issues/220) retain the release and publication evidence. Complete Node/CLI/Foundry/TIDAS cold-start qualification remains a further F1 gate.
312
312
 
313
313
  ## Qualification
314
314
 
315
315
  `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.
316
316
 
317
- 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. The installed bin additionally preserves a task brief, a human question, an investigation reply and its corrected answer across fresh processes; the recap remains partial and keeps the raw answer in the indexed task state. 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.
317
+ 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.22 runtime identity, shebang/bin, source/installed operation equivalence, arbitrary Unicode CWD, read-only package bytes, isolated workspace writes and all six facade operations. The installed bin additionally preserves a task brief, a human question, an investigation reply and its corrected answer across fresh processes; the recap remains partial and keeps the raw answer in the indexed task state. 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.
318
318
 
319
319
  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.
320
320
 
@@ -35,8 +35,8 @@ checkPaths:
35
35
  - test/scenarios/foundry-interaction-workflow.test.mts
36
36
  - docs/public-runtime-contract.md
37
37
  lastReviewedAt: 2026-09-24
38
- lastReviewedCommit: 05e4bd11b08276d092d10051b3f4f376c2af52ef
39
- lastReviewedNote: "Reviewed for Foundry #197: release-only 0.1.12 identity projection from exact merged #200 main 05e4bd11b08276d092d10051b3f4f376c2af52ef; #196 early-question continuation and #200 indexed, human-readable blocked-queue behavior are already in the base. This projection changes no runtime behavior, CLI pin, dependencies, scientific or permission gates. Signed publication and installed qualification remain separate release gates."
38
+ lastReviewedCommit: be60f69ae57c45c4278b1744195f32aa3237af9d
39
+ lastReviewedNote: "Reviewed for Foundry #205 version-only 0.1.13: no public facade, object-scope, runtime-input or write-handoff behavior changes; the package identity projection alone advances."
40
40
  related:
41
41
  - docs/runtime-context-contract.md
42
42
  - docs/task-authorization-contract.md
@@ -86,6 +86,8 @@ The qualified CLI returns exit 1 with a valid `blocked` curation-queue report wh
86
86
 
87
87
  The compatibility report retains native diagnostic fields and supplies curation's `code` and JSON-pointer `path` from the native issue code/location. Row normalization uses the canonical `json` payload slot for typed API wrappers so native validation, curation and CLI patch application address the same domain payload while preserving row metadata and source lineage.
88
88
 
89
+ When qualified native row validation exits outside success/data-issues, the assessment retains its authentic bounded TIDAS operation report in `native-validation-failure.json`, including exit code/class, all native diagnostics, bounded stderr, the exact selected row file/hash/count and current row-manifest binding. A separate registered assessment-failure result points to that evidence; no schema/QA/curation set is marked complete. Fresh status and unchanged resume expose a plain-language blocker with the affected dataset type, native diagnostic code, I/O or other failure, what remains unassessed and the indexed evidence path. They do not silently rerun the failed local operation or advance toward identity, approval or write. The full task-local report remains available when the default message is shortened. Malformed, oversized or changed failure evidence is refused rather than relabeled as a data issue or success. A replacement qualified runtime requires an explicitly reviewed task revision; this evidence does not authorize one.
90
+
89
91
  Curation blockers or authoring tasks produce `needs_input` with references to the registered reports and task manifests. Active row, schema, QA, curation and authoring files are checked before presenting that state; changed bytes block continuation. Public authoring artifacts omit developer-runner execution commands and retain full source/context evidence plus the required English guidance. Assessment readiness is distinct from semantic input acceptance, write authorization and final completion.
90
92
 
91
93
  When a current blocker truly needs a person, the entry skill turns its evidence into one plain-language question: what is missing, what it affects, what is recommended, and what decision is needed. The result exposes the exact pending question and its few choices while retaining full evidence in indexed artifacts. An answered question is not repeated. An `investigate` answer remains unresolved and directs investigation rather than silently accepting the recommendation. While waiting, the result retains a bound continuation for independent native conversion, contract context, row materialization, an unattempted explicit cleanup, or due dataset assessment. Once those local steps are exhausted, it returns only the pending human action. The question still blocks identity preflight, finalization, approval and owner execution; consumed owner attempts retain readback priority and cannot be replayed.
@@ -156,11 +158,11 @@ For a ready `final_rows` scope, the runtime rebuilds the original owner handoff
156
158
 
157
159
  ## Task interaction input
158
160
 
159
- `task resume --interaction-input <file>` selects a bounded `tiangong-foundry.interaction-input.v1` descriptor with exact `task_id`, `actor_id`, `expected_state_sha256` and 1–16 `events`. The first submission uses `expected_state_sha256: null`; later submissions name the current indexed `interaction-state.json` artifact SHA-256. A question event records a stable id, task-wide or dataset-type scope, what is missing, result impact, recommendation, the actual short question, up to four choices, registered evidence hashes and an optional superseded question id. A `support` scope applies to its concrete contact/source/unitgroup/flowproperty sets. An answer records the question id, a unique decision id, `supersedes_decision_id` (`null` first, then the exact previous decision id), the raw reply, its interpreted decision or `null`, `decided` or `investigate`, and registered evidence hashes. An AI assumption records its own id, scope, statement, impact, evidence and optional superseded assumption id in the same scope. Required nullable/list fields are explicit, as defined in `specs/schemas/foundry-interaction-input.schema.json`.
161
+ `task resume --interaction-input <file>` selects a bounded `tiangong-foundry.interaction-input.v1` descriptor with exact `task_id`, `actor_id`, `expected_state_sha256` and 1–16 `events`. The first submission uses `expected_state_sha256: null`; later submissions name the current indexed `interaction-state.json` artifact SHA-256. A question event records a stable id, task-wide or dataset-type scope, what is missing, result impact, recommendation, the actual short question, up to four choices, registered evidence hashes and an optional superseded question id. A `support` scope applies to its concrete contact/source/unitgroup/flowproperty sets. To ask about one object, a question or AI assumption adds `object_scope: {entity_id,version,row_sha256}` under a concrete `dataset_type`; the exact current row hash and unique explicit identity must be proven by the indexed task rows. Compute `row_sha256` from the entire parsed registered row object (including its outer identity, version and `json` payload), not the raw JSONL line: recursively sort object keys in JavaScript `Object.keys(...).sort()` order, preserve array order, serialize with `JSON.stringify` without added whitespace or newline, then take lowercase-hex SHA-256 of the UTF-8 bytes (`sha256Json(row)`). Missing, duplicate, positional-fallback or unmaterialized row identity cannot form a narrow scope: materialize/review the row first or deliberately use the existing broader scope. The answer inherits its question's scope through `question_id`; it does not invent a second target. An answer records a unique decision id, `supersedes_decision_id` (`null` first, then the exact previous decision id), the raw reply, its interpreted decision or `null`, `decided` or `investigate`, and registered evidence hashes. Required nullable/list fields are explicit, as defined in `specs/schemas/foundry-interaction-input.schema.json`.
160
162
 
161
- The descriptor and exact raw reply are captured as immutable task artifacts under the existing lock and hash-chained index, with a bounded state-file size. Duplicate identical submissions are idempotent; a stale state digest, altered input, unknown question, invented evidence hash, duplicate id, or out-of-task dataset scope is refused. Corrected answers append a new decision with an explicit predecessor while retaining the original reply; `investigate` does not become consent. New question text is supplied by the entry skill from current evidence, and Foundry projects it immediately in a human-readable `next_action` with decision-critical missing facts, impact, recommendation and response choices. The full evidence remains available as indexed artifacts. A pending question or investigation prevents write approval and completion while independent local assessment continues. Once an owner execution request is registered, new interaction events require a separately reviewed task revision; the request and consumed attempt remain bound to their original evidence.
163
+ The descriptor and exact raw reply are captured as immutable task artifacts under the existing lock and hash-chained index, with a bounded state-file size. Duplicate identical submissions are idempotent; a stale state digest, altered input, unknown question, invented evidence hash, duplicate id, wrong row hash or out-of-task scope is refused. The row proof is checked again under the task lock; an answer to one object's older row may continue only through an indexed, decision-bound before/after row successor. A different or missing row without that proof needs renewed review of that object; independent objects remain available. A scoped assumption also needs explicit same-object re-review after its row changes. Corrected answers append a new decision with an explicit predecessor while retaining the original reply; an earlier adopted decision cannot stand in for the corrected one. Replacing an already adopted question and answering its successor also requires current adoption, even though the successor answer has no predecessor decision ID. Local assessment remains available for an initial answer, but every current narrow answer requires indexed adoption before completion or write handoff. A new answer after earlier object work immediately raises a scoped review blocker; if no matching work remains, start a revised task. `investigate` does not become consent. Foundry asks the concrete question first, then states the missing information, impact and suggested next step; the affected object ID comes afterward, while exact row hashes and full source evidence remain in indexed artifacts. The recap and current authoring context still identify the exact object and available independent work. The full raw reply and evidence remain indexed. A pending question or investigation prevents write approval and completion; independent local assessment and unaffected semantic work can continue. Authorization and owner execution recheck these conditions against the indexed state under their task locks. Once authorization is indexed, new interaction events require a separately reviewed task revision; the grant and any later attempt remain bound to their original evidence.
162
164
 
163
- The interaction state is separate from `semantic-input`, scientific source facts and write authorization. Each assessed set may register `interaction-context.json` containing only applicable questions, user choices and AI assumptions; task-wide items apply to every set. A set-level digest controls reuse, so changing a Process choice does not invalidate an unrelated Flow assessment. Semantic submissions after an interaction exists name its current state SHA-256 and exactly the applicable `decision_ids` for each selected work item. The runtime verifies these bindings before applying a patch or decision, then records them with the existing owner result; a user choice still cannot replace evidence required by the CLI and scientific gates. Tasks with a brief or interaction state project a concise derived `decision_recap` source at every stage, including partial local results; it carries a raw-answer hash and points back to the indexed full state instead of repeating long private text in the default result. `completion_proven` becomes true only on verified completion. The entry skill turns that source into short prose with actual completion limits. Legacy tasks without new context retain their prior result shape, and the recap adds no approval or completion gate.
165
+ The interaction state is separate from `semantic-input`, scientific source facts and write authorization. Each assessed set may register `interaction-context.json` for task/type-wide items; object-only changes do not invalidate another item through the type-level digest. Current status additionally projects an `object_interaction_context` for each bounded assessed work item, excluding unrelated objects' questions, text and decisions and marking current row/decision evidence. Semantic submissions name the global current interaction SHA-256 and exactly the decisions applicable to each verified work item; the global CAS can require a descriptor refresh after another object's answer even when the unchanged patch needs no scientific reassessment. Classification and location decision tasks derive their complete affected object set from the registered task and queue, then validate the union of required IDs while indexing adoption separately for each object. A batch containing an unanswered object waits for that answer; a registered P2-only queue may proceed while P1 waits. Cross-type identity/reference rewrites that could affect a scoped Process without a provable successor fail closed for separate review. The runtime records object identity, decision IDs and indexed before/after row hashes in `semantic-result.json`; this proves which row transition cited the decision, not that AI-generated values scientifically implement its meaning. Tasks with a brief or interaction state project a concise derived `decision_recap` at every stage, including partial results; a narrow decision reports its object proof and indexed applied row successors, and all recaps retain a raw-answer hash and the indexed full state rather than repeating long private text by default. `completion_proven` becomes true only on verified completion. The entry skill turns that source into short prose with actual limits. Legacy tasks without new context retain their prior result shape, and the recap adds no separate approval step.
164
166
 
165
167
  ## Single-result envelope
166
168
 
@@ -219,7 +221,7 @@ Every facade revision also rechecks all retained predecessors in its request cha
219
221
 
220
222
  ## Runtime selection and migration seam
221
223
 
222
- 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.
224
+ 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.22 constraint remains explicit rather than silently accepting a future version.
223
225
 
224
226
  `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.
225
227
 
@@ -41,8 +41,8 @@ checkPaths:
41
41
  - test/scenarios/foundry-execution-admission.test.mts
42
42
  - test/scenarios/foundry-package-consumer.test.mts
43
43
  lastReviewedAt: 2026-09-24
44
- lastReviewedCommit: 05e4bd11b08276d092d10051b3f4f376c2af52ef
45
- lastReviewedNote: "Reviewed for Foundry #197: release-only 0.1.12 identity projection from exact merged #200 main 05e4bd11b08276d092d10051b3f4f376c2af52ef; #196 early-question continuation and #200 indexed, human-readable blocked-queue behavior are already in the base. This projection changes no runtime behavior, CLI pin, dependencies, scientific or permission gates. Signed publication and installed qualification remain separate release gates."
44
+ lastReviewedCommit: be60f69ae57c45c4278b1744195f32aa3237af9d
45
+ lastReviewedNote: "Reviewed for Foundry #205 version-only 0.1.13: no runtime selection, cache, context, credential or owner admission change; installed component identities remain pinned."
46
46
  related:
47
47
  - docs/architecture.md
48
48
  - docs/task-authorization-contract.md
@@ -66,7 +66,7 @@ The public workflow selects derived row/context facts from the current verified
66
66
 
67
67
  For queue build alone, the exact CLI's exit 1 can carry a valid `blocked` data report. Foundry verifies its schema/status pair, current selected row paths and SHA-256 values, and the complete regular-file queue output tree before indexing those artifacts. Other CLI exits retain their existing fail-closed treatment. A blocked closure is a local evidence gap; it cannot grant authorization, finalization or a replay of any owner attempt.
68
68
 
69
- `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.
69
+ `qualifyFoundryRuntime` compares an independently selected CLI expectation with the exact installed `@tiangong-lca/cli@0.1.22` 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.
70
70
 
71
71
  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.
72
72
 
@@ -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-23
33
- lastReviewedCommit: 649385e48ad75e91031efec4b592ad55d18cf121
34
- lastReviewedNote: "Reviewed for Foundry #190: human choices guide semantic work but are not QA waivers or write grants; owner attempt consumption rechecks current decision state."
32
+ lastReviewedAt: 2026-09-24
33
+ lastReviewedCommit: 894b471a1da4f1eece401f5f86db9937f3000d28
34
+ lastReviewedNote: "Reviewed for Foundry #204: exact public CLI 0.1.22 and native Toolkit 0.3.3 input identities advance; environment, task ledger, scientific and write authorization boundaries remain unchanged."
35
35
  related:
36
36
  - docs/architecture.md
37
37
  - docs/safety-policy.md