Audience

Verification level

COMPILE-ONLY AND INTEGRITY PASS. The program resolves three local resources, checks the dependency DAG and SHA-256 values, writes a temporary lock, and verifies all three resources. It does not load the OBJ files in PyBullet or claim native rendering/physics acceptance.

Files

  • run.yaml creates one instance of the bundled object.
  • main.py inspects resources and performs lock verification through public APIs.
  • ../catalog/resource_bundle.yaml declares resource roles, formats, digests, and dependencies.
  • ../catalog/assets/bundle/ contains the small demonstration OBJ/MTL files.

Read the Manifest

yaml
resources:
  material:
    uri: assets/bundle/visual.mtl
    format: model/mtl
    role: material
    sha256: ...
  visual:
    uri: assets/bundle/visual.obj
    format: model/obj
    role: visual
    sha256: ...
    dependencies: [material]
  collision:
    uri: assets/bundle/collision.obj
    format: model/obj
    role: collision
    sha256: ...

Resource names are stable local keys. role tells the consumer how a resource is used; format is explicit instead of guessed from a filename. dependencies names sibling resources and must form an acyclic graph. Here visual → material; collision is independent. Every SHA-256 pins the exact file contents.

Read the Run

yaml
bundled_prop:
  use: object://fastsim/component-demo-resource-bundle

The Run selects the logical product, not individual files. Compilation resolves the whole selected Variant under the Project's trusted roots and stores exact resources in the immutable plan.

Run it

bash
fastsim config validate run.yaml --json
mkdir -p output
fastsim config lock run.yaml --output output/component-bundle.lock.yaml
fastsim config verify-lock output/component-bundle.lock.yaml --json
python main.py

Expected Python output lists collision, material, and visual; only visual depends on material. It ends with:

text
Lock valid: True
Checked resources: 3

The Python program uses a temporary directory, so it leaves no generated lock beside the source files.

Common errors

  • Listing a dependency that is not a sibling resource: compilation rejects it.
  • Creating a dependency cycle: resource ordering must be a DAG.
  • Updating an asset without updating its Manifest and Registry digests: loading or lock verification fails by design.
  • Using one model resource for visually concave objects without an intentional collision asset: visual geometry and collision geometry have different jobs.
  • Treating a valid lock as native acceptance: it proves identity and bytes, not simulator behavior.

Previous: 11 — Backend variants · Back to the Components guide