Skip to content

πŸ› οΈ Crafting β€” System Guarantees Matrix

This page defines the behavioural contract of the Crafting system.

No marketing. No implication. Just guarantees β€” and explicit non-guarantees.


πŸ”Ž Quick Navigation

  • Core Service
  • Preflight
  • Accept / Enqueue
  • Jobs / Scheduling
  • Delivery
  • Refunds / Compensation
  • Escrow Path
  • Authority
  • Time / Offline Progress
  • Persistence / Restore
  • Events
  • Modifiers / Validators
  • Routing
  • Determinism / RNG
  • Public API
  • Non‑Guarantees
  • Final Summary

1️⃣ Core Service

CraftingServiceCore

Aspect Guarantee
Orchestration root βœ” Single service owns crafting truth
Job creation βœ” Service-only
Job mutation βœ” Service-only
Runtime usage Main thread
Adapter-driven βœ” Yes
Inspector required ❌ No
UI required ❌ No

2️⃣ Preflight

Aspect Guarantee
Mutates state ❌ Never
Safe for UI / tools / teachables βœ” Yes
Check order Inputs β†’ Currency β†’ Space
Validators run βœ” Only after core checks succeed
No-space override via validator ❌ Not guaranteed
Routing included in space check βœ” Yes
Chance-output space policy applied βœ” Yes

3️⃣ Accept / Enqueue

Aspect Guarantee
Authority checked before mutation βœ” Yes
Inputs consumed immediately (default path) βœ” Yes
Currency debited immediately (default path) βœ” Yes
Job created only after accept succeeds βœ” Yes
Partial failure compensation βœ” Best-effort
Batch support βœ” Yes
Timed craft support βœ” Yes
Cross-system atomicity ❌ Not guaranteed

4️⃣ Jobs / Scheduling

Aspect Guarantee
Queued jobs supported βœ” Yes
Running jobs supported βœ” Yes
Paused jobs supported βœ” Yes
Per-station caps βœ” Yes
Global parallel cap βœ” Yes
Queue reorder support βœ” MoveQueuedFirst
Scheduler fairness Basic fairness
Deterministic scheduling across external state changes ❌ Not guaranteed

5️⃣ Delivery

Aspect Guarantee
Modifiers re-evaluated at delivery βœ” Yes
Output routing resolved at delivery βœ” Yes
Outputs added immediately on success βœ” Yes
Delivery failure possible after accept βœ” Yes
Timed jobs deliver later βœ” Yes
Delivery atomicity (default path) ❌ Not guaranteed

6️⃣ Refunds / Compensation

Aspect Guarantee
Currency refund on delivery failure βœ” Attempted
Input refund on delivery failure Optional
Input refund success Best-effort
Currency refund success Depends on adapter
Refunds outside service ❌ Not supported
Net-zero guarantee ❌ Not guaranteed

7️⃣ Escrow Path

TryCraftImmediateEscrow

Aspect Guarantee
Scope Immediate (zero-duration) crafts
Job created ❌ No
Inventory reservations required βœ” Yes
Currency holds required βœ” Yes
Routing used ❌ No
Timed crafts supported ❌ No
Refuses missing escrow seams βœ” Yes
Atomicity Depends on adapter

8️⃣ Authority

Aspect Guarantee
Mutation gating supported βœ” Yes
Enqueue gated βœ” Yes
Cancel / Pause / Resume gated βœ” Yes
Scheduler control gating Optional
Read queries gated ❌ No
Multiplayer replication ❌ Not provided

9️⃣ Time / Offline Progress

Aspect Guarantee
Gameplay time abstraction βœ” ITimeProvider
Wall-clock abstraction βœ” IWallClockProvider
Offline progress optional βœ” Yes
Paused jobs tick offline ❌ Never
Offline elapsed cap Optional
acceptedAtUtc captured βœ” Yes

πŸ”Ÿ Persistence / Restore

Aspect Guarantee
Snapshot type Active jobs
Queued jobs restorable βœ” Yes
Running jobs restorable βœ” Yes
Paused jobs restorable βœ” Yes
Inputs/currency re-consumed on restore ❌ No
Offline completion applied during restore βœ” When enabled
Idempotent completion across repeated restore ❌ Not guaranteed (integration-dependent)
Save system provided ❌ Not provided
Persistence storage (files/cloud) ❌ Not provided
Save/restore timing responsibility Developer-defined

Crafting defines what job data means and how it resumes β€”
your game defines when, where, and how it is persisted.


11️⃣ Events

Aspect Guarantee
Lifecycle events exposed βœ” Yes
Progress events throttled βœ” Yes
Preflight rejection event βœ” Yes
Designer UnityEvent mirrors βœ” Yes

12️⃣ Modifiers / Validators

Aspect Guarantee
Modifiers supported βœ” Yes
Validators supported βœ” Yes
Owner/parent discovery βœ” Yes
Modifiers run at accept βœ” Yes
Modifiers run at delivery βœ” Yes
Validators mutate state ❌ Never
Modifier/validator ordering contract ❌ Not guaranteed

13️⃣ Routing

Aspect Guarantee
Output router supported βœ” Yes
Routing used in preflight βœ” Yes
Routing used at delivery βœ” Yes
Router auto-discovered ❌ No
Router used by escrow ❌ No

14️⃣ Determinism / RNG

Aspect Guarantee
Deterministic RNG supported βœ” Yes
Seeded results repeat with same call sequence βœ” Yes
Binomial approximation deterministic ❌ No
Exact chance rolls available βœ” Yes
Identical results if call order changes ❌ Not guaranteed

15️⃣ Public API

Aspect Guarantee
Stable supported service surface βœ” Yes
Public recipe construction seam βœ” RecipeCore.Create
Public adapter seams βœ” Yes
Internal hooks public ❌ No
Integration adapters public ❌ No

🚨 Non‑Guarantees

Crafting does not guarantee:

  • True multi-operation atomicity on the default job path
  • Multiplayer replication
  • Prediction / reconciliation
  • Server authority implementation
  • Validator execution after failed space preflight
  • Escrow support for timed crafts
  • Routing support in escrow path
  • Stable completion idempotency across repeated restores
  • Deterministic outcomes if RNG call order changes
  • Safe mutation outside CraftingServiceCore

  • Built-in save system or storage layer

  • Automatic cross-session identity resolution (owner / recipe)
  • Automatic save/load timing or lifecycle integration

🎯 Final Summary

Layer Strong Guarantee Best Effort Not Guaranteed
Preflight purity βœ”
Single-service job ownership βœ”
Default-path compensation βœ”
Escrow immediate craft βœ”*
Timed craft delivery atomicity ❌
Multiplayer replication ❌
Cross-system atomicity ❌
Persistence integration ❌

*Depends on reservation/hold adapter correctness.


System Philosophy

Crafting is:

  • Explicit
  • Job-driven
  • Adapter-based
  • Authority-aware
  • Honest about guarantees