Lesson 240: Unity Sentis NPC Inference Batch Receipt on BUILD_RECEIPT (2026)
Direct answer: Before summer playtest promotion, file sentis_npc_batch_receipt_v1.json proving max_batch_playtest = 1, CPU backend on min-spec soak, Profiler peak RSS under team cap, and Yarn fallback when Worker.Schedule fails—then promote BUILD_RECEIPT sentis_npc_batch_receipt. Distinct from Sentis deploy preflight (sentis_deploy_receipt_v1) and Lesson 216 dialogue moderation (content policy only).

Why this matters now (June 2027 playtest OOM spikes)
June 2027 playtesters stack tavern dialogue, combat barks, and Sentis classifiers in one scene—laptops with 8 GB RAM OOM while dev machines stay green. Lesson 238 fixes save bleed; Lesson 237 fixes audio Init—this lesson files sentis_npc_batch_receipt_v1 so inference policy is on BUILD_RECEIPT before facilitators scale the cohort.
The Sentis NPC batch playtest preflight is the ninety-second gate—240 is the course milestone. Lesson 216 remains required for generative text changes—orthogonal column.
Beginner path (tavern soak)
| Step | Action | Success check |
|---|---|---|
| 1 | Confirm sentis_deploy_receipt_v1 GREEN |
N1 cousin pass |
| 2 | Set max_batch_playtest = 1 in playtest build |
N2 pass |
| 3 | Force CPU backend on playtest profile | N3 pass |
| 4 | 10-minute tavern soak with Profiler | N4 RSS under cap |
| 5 | Verify Yarn fallback on forced failure | N5 pass |
| 6 | File receipt + BUILD_RECEIPT | playtest_inference_ok: true |
Time: ~66 minutes first min-spec soak; ~20 minutes when batch cap is code-pinned.
Developer path (gates N1–N6)
| Gate | Check | Fail when |
|---|---|---|
| N1 | sentis_deploy_receipt_v1 pass |
Deploy smoke missing |
| N2 | max_batch_playtest enforced |
batch > 1 on playtest |
| N3 | CPU backend on playtest | GPUCompute default |
| N4 | Profiler peak RSS ≤ cap | OOM in soak |
| N5 | Fallback on schedule fail | Soft-lock tavern |
| N6 | Receipt + BUILD_RECEIPT | Promote without soak |
N2–N3 — Playtest inference policy
public BackendType GetPlaytestBackend() => BackendType.CPU;
public int GetPlaytestBatchSize() => 1;
Document in receipt—do not rely on #if DEVELOPMENT_BUILD alone if playtest uses Release profile.
sentis_npc_batch_receipt_v1.json
{
"schema": "sentis_npc_batch_receipt_v1",
"build_label": "summer-playtest-2027-rc1",
"model_id": "npc_intent_v1",
"max_batch_playtest": 1,
"backend_playtest": "CPU",
"concurrent_workers_cap": 2,
"profiler_peak_rss_mb": 5200,
"ten_minute_tavern_soak": "pass",
"fallback_on_failure": "yarn_node_NPC_DIALOGUE_FALLBACK",
"parent_receipt": "release-evidence/ai/SENTIS_DEPLOY_RECEIPT.json",
"gates": {
"N1_deploy_cousin": "pass",
"N2_batch_cap": "pass",
"N3_cpu_backend": "pass",
"N4_profiler_soak": "pass",
"N5_fallback": "pass",
"N6_build_receipt": "pass"
},
"playtest_inference_ok": true,
"promotion_allowed": true,
"cousin_receipts": {
"ai_dialogue_patch": "release-evidence/ai/AI_DIALOGUE_PATCH_RECEIPT.json"
}
}
Pin under release-evidence/ai/SENTIS_NPC_BATCH_RECEIPT.json.
BUILD_RECEIPT row (N6)
| Column | Pass when |
|---|---|
sentis_npc_batch_receipt |
playtest_inference_ok: true |
sentis_deploy_receipt |
Deploy cousin GREEN |
ai_dialogue_patch |
Lesson 216 when LLM lines change |
ALTER TABLE release_publish_gate ADD COLUMN IF NOT EXISTS
sentis_npc_batch_blocked BOOLEAN NOT NULL DEFAULT false;
Relationship to guide vs Lesson 216
| Artifact | Role |
|---|---|
| Sentis batch preflight | N1–N6 checklist |
| Sentis deploy preflight | sentis_deploy_receipt_v1 |
| Lesson 216 | Moderation / hotfix policy |
| This lesson | BUILD_RECEIPT sentis_npc_batch_receipt |
Key takeaways
- Deploy GREEN ≠ playtest GREEN—cap batch and backend separately.
sentis_npc_batch_receipt_v1≠sentis_deploy_receipt_v1—cousin columns.- Lesson 216 — what NPCs say; 240 — how inference runs.
- Q3 capstone 244 wires 236–243 including this row.
- ShapeInference help when batch>1 fails compile.
- CPU-first on 8 GB playtest laptops—promote GPU only with N4 proof.
- Lesson 238 — saves; 240 — AI inference.
- Thursday review — AI / Sentis row.
Common mistakes
- Filing from 32 GB dev soak only—min-spec not exercised.
- batch=4 because “tavern has four NPCs”—use concurrent worker cap instead.
- Skipping N5 fallback test—playtest soft-lock on API 529.
- Replacing Lesson 216 with this receipt—both required when generative dialogue ships.
- Merging deploy + batch JSON—schemas stay separate.
Troubleshooting
| Symptom | Lane |
|---|---|
| OOM tavern | N2 + N4 |
| ShapeInference | ShapeInference help |
| Toxic lines | Lesson 216 |
| Works Editor, fails player | Playtest profile flags |
Mini exercise (60 minutes)
- Set batch=4—reproduce OOM on 8 GB loaner laptop.
- Pin batch=1 + CPU—pass N4 soak.
- Force schedule failure—confirm Yarn fallback (N5).
- File receipt; BUILD_RECEIPT GREEN.
- Link parent
SENTIS_DEPLOY_RECEIPT.jsonpath in JSON.
Continuity — Q3 2027 summer playtest wave (236–244)
| Lesson | Receipt focus |
|---|---|
| 236–238 | Art, audio, saves |
| 239 | Feedback tag taxonomy |
| 240 (this) | Sentis NPC batch inference |
| 241–244 | Analytics → capstone |
Previous: Lesson 239 — Steam playtest feedback tag taxonomy.
Next: Lesson 241 — Construct playtest analytics event receipt.
FAQ
Same as Sentis batch preflight guide?
Guide = checklist; 240 = BUILD_RECEIPT column.
Same as Sentis deploy receipt?
No—deploy proves compile/ladder; batch proves playtest memory policy.
Need Lesson 216 if only classifiers change?
216 applies when LLM dialogue text changes; batch receipt still required for Sentis path.
Playtest tavern OOM is usually batch policy—cap batch, CPU soak, fallback wired, file sentis_npc_batch_receipt, then promote on BUILD_RECEIPT.