Files
Calic a9bfca1ffe feat: lib-core.crafting-test v0.1.0 — 12 TAP asserts
Test suite for lib-core.crafting v0.1.0. Covers:

  1. define_recipe + list_recipes round-trip; shallow-copy isolation
     (mutating the returned list does not affect the registry).
  2. define_recipe missing id → Loud-Error.
  3. define_recipe duplicate id → Loud-Error.
  4. define_recipe empty inputs → Loud-Error.
  5. get_recipe known/unknown.
  6. is_known propagates ctx-identity to recipe.is_known(ctx).
  7. can_craft happy-path → ok=true.
  8. can_craft missing inputs → error='missing_inputs' +
     missing-array with {template, needed, have}.
  9. craft happy-path: consumes 2, crafts 1, container has only output.
 10. craft unknown recipe → ok=false, error='unknown_recipe',
     container untouched.
 11. craft is_known=false → ok=false, error='unknown_recipe',
     container untouched.
 12. count-form: 2-of-3 reports missing={template, needed=3, have=2}.

Uses engine.test.assert with string.find for pattern matching
loud-error messages (engine.test has no assert_match helper).
Per-test isolation via crafting._test_clear_all; composition templates
are defined once at module-scope (composition has no clear-all hook).

Depends on lib-core.crafting 0.1.0, lib-core.inventory-list 0.1.0,
lib-core.composition 0.3.0 (all three direct, per non-transitive
engine resolver).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-14 12:20:53 +02:00

25 lines
1.2 KiB
Plaintext

Copyright (c) 2026 Calic. All rights reserved.
This software is part of the Sporel platform — **Tier 1 (Official /
Proprietary)** content per the Three-Tier Licensing Model documented in
`meta/docs/archive/design/vision.md §Licensing Model` (current source;
migration to `meta/docs/architecture/licensing-model.md` pending).
⚠ **WIP — Legal review required before public launch.** The terms below
reflect design intent only; the formalized license framework will be
finalized through legal counsel before the first public release. Until
then, this notice serves as a placeholder defending the platform owner's
rights against unintentional re-licensing.
No license is granted to copy, modify, distribute, sublicense, or otherwise
use this software in any form without prior written permission from the
copyright holder.
References:
- Tier 1 (this file): all rights reserved, proprietary, sold/distributed
via official channels (Steam, etc.)
- Tier 2 (Semi-Commercial Co-Development): bilateral contracts, revenue-
share — see vision.md §Licensing Model
- Tier 3 (Community Content): CC BY-NC-SA 4.0 + asymmetric CLA — applies
to community-uploaded libs/modules/assets, not this repo