From bf90ad27690a292407ce710b1ceb6403fe0cf324 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Wed, 14 Jan 2026 09:46:31 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20Mission=202=20scenario=20validation=20err?= =?UTF-8?q?ors=20-=20JSON=20now=20valid=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 2 critical issues preventing validation: 1. JSON newline escaping (line 429): - Changed: "text": "<%= marcus_warning_email %>" - To: "text": <%= marcus_warning_email.to_json %> - Root cause: Ruby \n sequences became literal newlines in JSON - Fix: .to_json properly escapes strings for JSON format 2. Invalid object type (line 561): - Changed: "type": "key_data" - To: "type": "notes" - Issue: "key_data" not in schema's allowed types - Fix: Using "notes" for USB drive with backup encryption keys Validation Results: ✓ ERB renders successfully ✓ JSON parses without errors ✓ Schema validation PASSED ⚠ 8 non-critical warnings/suggestions (optional enhancements) Schema validation summary: - All required fields present - All object types valid - Room dimensions compliant - Connection structure valid - NPC and item placement correct Scenario is now ready for testing and implementation! --- scenarios/m02_ransomed_trust/scenario.json.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scenarios/m02_ransomed_trust/scenario.json.erb b/scenarios/m02_ransomed_trust/scenario.json.erb index 0fd3947..e96490e 100644 --- a/scenarios/m02_ransomed_trust/scenario.json.erb +++ b/scenarios/m02_ransomed_trust/scenario.json.erb @@ -426,7 +426,7 @@ marcus_warning_email = "From: Marcus Webb\nTo: Dr. Sarah Kim\nDate: May 17, 2024 "name": "Marcus's Email Archive", "takeable": true, "readable": true, - "text": "<%= marcus_warning_email %>", + "text": <%= marcus_warning_email.to_json %>, "observations": "Email proving Marcus warned Dr. Kim 6 months ago about vulnerability" }, { @@ -558,7 +558,7 @@ marcus_warning_email = "From: Marcus Webb\nTo: Dr. Sarah Kim\nDate: May 17, 2024 "observations": "4-digit electronic safe - requires PIN code (hospital founding year)", "contents": [ { - "type": "key_data", + "type": "notes", "name": "Offline Backup Encryption Keys", "takeable": true, "observations": "USB drive with offline backup decryption keys - critical for recovery",