1.7 KiB
1.7 KiB
| id | ticket | title | created | tags | |||
|---|---|---|---|---|---|---|---|
| LSN-0009 | packer-docs-import | Packer mental model legacy lesson | 2026-03-26 |
|
Context
Legacy import from docs/packer/learn/mental-model-packer.md.
This lesson preserves the high-level didactic framing of what the packer is and is not.
Key Decisions
The packer turns asset workspaces into stable asset artifacts
What: The packer is neither cartridge shipper, runtime reader, nor generic file janitor. It is the system that turns a managed asset workspace into stable runtime-facing and tool-facing artifacts. Why: Contributors drift quickly when they treat packer behavior as a mix of authoring convenience, runtime semantics, and shipping responsibilities rather than one explicit artifact-producing domain. Trade-offs: This framing forces sharper boundaries between packer, runtime, shipper, and Studio, but it keeps contracts and responsibilities legible.
Patterns and Algorithms
- Treat the managed asset root as the unit of management.
- Split source-of-truth responsibilities between registry state and per-asset declaration.
- Keep
asset_idandasset_nameas separate concepts. - Treat
assets.paas the authoritative runtime-facing artifact. - Prefer determinism, explicit declaration, and canonical serialization.
Pitfalls
- Treating the packer like a generic filesystem janitor.
- Collapsing
asset_idandasset_nameinto one concept. - Forgetting that determinism is part of the artifact contract chain.
Takeaways
- The packer owns artifact production, not runtime reading or shipping.
- Stable asset identity and deterministic output are central to the whole domain.
- Legacy source attribution:
docs/packer/learn/mental-model-packer.md.