component-qa
A Rust + WASI-P2 Greentic component scaffolded via greentic-component new.
Canonical world target: greentic:component/component@0.6.0.
Legacy compatibility notes: docs/vision/legacy.md in the greentic-component repo.
Requirements
- Rust 1.91+
wasm32-wasip2target (rustup target add wasm32-wasip2)cargo-component(cargo install cargo-component --locked)
Getting Started
The generated component.manifest.json references the release artifact at
target/wasm32-wasip2/release/component_qa.wasm.
Update the manifest hash by running greentic-component hash component.manifest.json.
Validate the artifact by running
greentic-component doctor target/wasm32-wasip2/release/component_qa.wasm --manifest component.manifest.json.
i18n Workflow
tools/i18n.shreadsassets/i18n/locales.jsonand generates locale JSON files fromassets/i18n/en.json.build.rsembeds allassets/i18n/*.jsonlocale dictionaries into the WASM as a CBOR bundle.
QA Setup Workflow (Pack Assets)
- Generate a real form with
greentic-qa new(orgreentic-qa generate). - Copy the generated form file into pack assets, for example:
qa/forms/support.form.json
- Add locale dictionaries for that form under pack assets, for example:
qa/i18n/en.jsonqa/i18n/nl.json
- Configure
component-qawith:
component-qa loads the form from assets at runtime (WASI filesystem). If no
qa_form_asset_path is configured, setup fails fast with a guidance error.
When a form question uses title_i18n / description_i18n, component-qa
resolves defaults from the selected locale and falls back to en. On load,
all referenced i18n keys are validated against qa/i18n/en.json.
QA Ops Local Test
qa-spec: emit/expect setup-mode DTO semantics (setup|update|remove); input acceptsdefault|setup|install|update|upgrade|remove.apply-answers: invoke with{ "mode": "setup", "answers": {...}, "current_config": {...} }(installaccepted as alias).i18n-keys: invoke with{}to list keys referenced by QA/setup paths.
Notes
qa_form_asset_pathis the canonical setup hook for real pack deployments.- The placeholder fixture is kept for tests only and is no longer used as a runtime default.