Products
Products are the service contract between client intent and provider execution in Market 2.0.
This section documents the currently supported product families, how they fit into the common deal model, and how to evolve product behavior without breaking compatibility.
In practice, products answer one question: what operation should Curio perform for this deal.
Current Products
Product Model Basics
Product-specific payloads live under
deal.products.Product-specific validation must be explicit and deterministic.
Product behavior should map cleanly to Market 2.0 lifecycle/status behavior.
Product errors should map to existing MK20 error codes where possible.
Product Definition Checklist
A product definition should clearly specify:
Payload schema under
products.<name>.Product name and compatibility scope.
Required vs optional fields.
Validation rules and rejection conditions.
Source/format assumptions (if data is required).
Lifecycle/status effects.
Error mapping expectations.
Operational controls required by storage providers.
Extending Products
When to Extend an Existing Product
Extend an existing product when:
Behavior remains backward compatible.
Existing clients can continue to parse and use payloads safely.
JSON marshal/unmarshal compatibility is preserved.
When to Add a New Product
Add a new product when:
Behavior or lifecycle differs materially.
Compatibility contracts diverge from existing product semantics.
Overloading an existing product would create ambiguous behavior.
Implementation Checklist
Add product type in MK20 deal/product types.
Register product name and validation rules.
Add intake/processing/finalize handling.
Add upload-path handling if product supports
source_http_put.Extend status derivation if lifecycle differs.
Add DB migrations for product state.
Add WebRPC/UI support if operator controls are required.
Add/update product docs in this directory.
Compatibility Rules
Do not weaken auth and deal ownership guarantees.
Keep piece identity invariants intact.
Avoid breaking existing product behavior.
Documentation Requirements
For each product, document:
Use case
Payload fields
Validation rules
Lifecycle/status effects
Common rejection scenarios
Last updated