Runtime
Verification and Hardening Architecture for Deterministic Web-Based Simulation Platforms: A Case Study on Simulation Earth
Report summary
The deployment of deterministic, browser-based simulation platforms into high-stakes environments necessitates an uncompromising separation of state authority, rendering projection, and external augmentation. For the Simulation Earth application hosted on IARPA.org, the technical foundation—comprisi
Key topics
- Runtime
- AI
- Agentic Web
- Rust
- Privacy
- Physics
- Semantic Systems
- Research Archive
Research provenance
For citation, use the report title and canonical URL. Archival presence does not establish authorship or promote report statements into portfolio evidence.
This page renders the archived Markdown as safe, formatted HTML. It is background research and does not become a portfolio claim without evidence review.
Full report
On this page
The deployment of deterministic, browser-based simulation platforms into high-stakes environments necessitates an uncompromising separation of state authority, rendering projection, and external augmentation. For the Simulation Earth application hosted on IARPA.org, the technical foundation—comprising plain PHP, vanilla JavaScript, static JSON, WebGL, and a Web Worker—presents a rigorous verification challenge. Without reliance on third-party runtime frameworks or centralized database state, the architecture relies exclusively on client-side determinism verified through canonical cryptographic hashing. The primary assurance axiom is that the browser Web Worker is the sole authoritative owner of deterministic state. The main thread, encompassing the WebGL renderer, 2D fallback, and DOM interface, functions strictly as a read-only projection of the Worker's state. Furthermore, the optional-AI component operates as an ephemeral, replaceable explanation layer. It possesses zero mutation authority over the simulation's state, chronology, legal framework, or operational targeting. The verification strategy outlined herein establishes a black-box-compatible testing and release architecture that mathematically proves, rather than merely asserts, the immutability of factual records and the absolute containment of fictional or predictive elements.
Authority Invariants and Trust-Boundary Modeling
The security and integrity of Simulation Earth depend on rigid trust boundaries. Contamination across these boundaries—such as fictional what-if scenarios polluting historical archives, or optional-AI hallucinations mutating authoritative coordinate data—constitutes a critical failure. The system is modeled across four distinct trust domains, characterized by strictly unidirectional state authority.
Trust Boundary and Authority Diagram
========================================================================================== TRUST BOUNDARY AND AUTHORITY DIAGRAM
\[DOMAIN 1: ABSOLUTE TRUTH\] (Immutable / Append-Only)
|-- Factual Statistics |-- Historical Source Playback |-- Read-Only Nuclear Archive | | (Unidirectional Load) v
\[DOMAIN 2: DETERMINISTIC ENGINE\] (Authoritative State Owner) |-- Browser Web Worker |-- State Transition Logic (Play, Step, Rewind, Forward, Jump) |-- PRNG & Deterministic Resolution (48 Synthetic Cells) |-- Canonical Hashing (RFC 8785\) | | (Strict Versioned Message Protocol & Transferable ArrayBuffers) | \+------------------------------------------------------------------+
| | v (Read-Only Projection) ^ (Action Requests)
\[DOMAIN 3: PROJECTION & USER INTERFACE\] (Zero State Authority)
|-- Main Thread (Vanilla JS) |-- WebGL Globe & 2D Canvas Fallback |-- Scenario Command Center & Event Studio |-- Accessibility Shadow DOM (NVDA, JAWS, WebXR) | | (Derived Read-Only Envelope) | v |
\[DOMAIN 4: AUGMENTATION LAYER\] (Untrusted / Replaceable)
|-- Same-Origin PHP JSON Endpoint (No-Store, Rate-Limited) |-- External LLM Provider |-- Returns: Deterministic Fallback or Localized Narrative Text |-- Mutation Capabilities: NONE
The architecture enforces absolute boundary invariants. The Main Thread may only request actions via message passing. The Worker evaluates these requests, advances the deterministic simulation, and returns a new state snapshot. Any state snapshot exported from the Worker must be serializable into Canonical JSON conforming to RFC 8785, which ensures deterministic property sorting and ECMAScript-compatible number serialization1. The Optional-AI PHP endpoint accepts only a derived, read-only envelope of the state. The response from the AI must never be parsed as executable logic or numerical authority, acting strictly as a localized text overlay.
Versioned Worker-Message Protocol Specification
To guarantee that the Main Thread and the Web Worker interact deterministically, the message protocol must be strictly typed, versioned, and resilient to tab suspension, worker restarts, and the structural limitations of the browser's structured clone algorithm3. All communication between the Main Thread and the Web Worker occurs via a unified message envelope. To prevent garbage collection pauses and structural cloning overhead during state synchronization, large numerical arrays representing the 48 synthetic cells and normalized indicators must be passed using Transferable Objects5. The structured clone algorithm natively strips functions, DOM nodes, and getter/setter descriptors3. Therefore, the protocol relies exclusively on serializable primitives.
Protocol Request Schema (v1.0.0)
The incoming message format from the Main Thread to the Worker dictates the boundaries of user and projection interaction.
JSON { "$schema": "http://json-schema.org/draft-07/schema\#", "title": "SimulationEarth\_WorkerRequest", "type": "object", "properties": { "protocol\_version": { "type": "string", "const": "1.0.0" }, "request\_id": { "type": "string", "pattern": "^\[a-fA-F0-9\]{64}$" }, "action": { "type": "string", "enum": \[ "INIT", "PLAY", "PAUSE", "SPEED", "STEP", "REWIND", "FORWARD", "SCENARIO", "JUMP", "RESET", "BRANCH", "INTERVENE", "CONTEXT\_EVENT", "CRISIS\_TRIGGER", "RESPONSE", "SAVE", "EXPORT", "IMPORT" \] }, "payload": { "type": "object" }, "timestamp\_seq": { "type": "integer", "minimum": 0 } }, "required": \["protocol\_version", "request\_id", "action", "timestamp\_seq"\], "additionalProperties": false }
Protocol Response and Error Schemas (v1.0.0)
The Worker responds to every valid request with a state acknowledgment or a designated error. The canonical\_state\_hash serves as the cryptographic proof of the simulation's current temporal posture.
JSON { "$schema": "http://json-schema.org/draft-07/schema\#", "title": "SimulationEarth\_WorkerResponse", "type": "object", "properties": { "request\_id": { "type": "string", "pattern": "^\[a-fA-F0-9\]{64}$" }, "status": { "type": "string", "enum": \["ACK", "STATE\_UPDATED"\] }, "canonical\_state\_hash": { "type": "string", "pattern": "^\[a-f0-9\]{64}$" }, "tick": { "type": "integer", "minimum": 0 }, "payload": { "type": "object" } }, "required": \["request\_id", "status", "canonical\_state\_hash", "tick"\], "additionalProperties": false }
When a protocol violation occurs, the Worker emits a standard error schema, halting progression but maintaining the integrity of the previous state hash.
JSON { "$schema": "http://json-schema.org/draft-07/schema\#", "title": "SimulationEarth\_WorkerError", "type": "object", "properties": { "request\_id": { "type": "string" }, "status": { "type": "string", "const": "ERROR" }, "error\_code": { "type": "string", "enum": \[ "INVALID\_SCHEMA", "UNKNOWN\_ACTION", "BACKPRESSURE\_LIMIT", "OUT\_OF\_ORDER\_SEQ", "UNSERIALIZABLE\_PAYLOAD", "CHRONOLOGY\_VIOLATION" \] }, "message": { "type": "string" }, "canonical\_state\_hash": { "type": "string" } }, "required": \["request\_id", "status", "error\_code", "canonical\_state\_hash"\] }
Concurrency, Idempotence, and Lifecycle Management
The protocol must address native browser behaviors to prevent state corruption. The timestamp\_seq attribute acts as a monotonic clock, ensuring idempotence and duplicate delivery rejection. If the Worker receives an out-of-order or duplicate request\_id, it must discard the message and re-emit the ACK for the highest processed state. Browsers frequently suspend inactive tabs to preserve battery and memory. The Main Thread must ping the Worker via a lightweight status check. If the Worker terminates due to memory pressure or tab suspension, the Main Thread instantiates a new Worker using the last verified canonical\_state\_hash and its corresponding local state blob. Furthermore, if the Main Thread requests state mutations faster than the Worker can compute, the Worker queues operations up to a strict limit, beyond which it rejects requests with a BACKPRESSURE\_LIMIT error to maintain UI responsiveness and prevent heap overflow.
Deterministic Architecture and Cross-Browser Tolerances
Achieving bit-exact determinism across varied JavaScript engines—such as Chrome's V8, Firefox's SpiderMonkey, and Safari's JavaScriptCore—is the most mathematically demanding requirement of the simulation8.
Floating-Point Stability and Seeded Randomness
JavaScript mandates 64-bit floating-point arithmetic following the IEEE 754 standard1. However, transcendental mathematical functions such as Math.sin(), Math.cos(), and Math.pow() are implemented differently across browser engines, leading to micro-divergences in the least significant bits of floating-point outputs10. Over thousands of simulation steps, a difference in the 16th decimal place will avalanche, causing wildly diverging state hashes across different devices. To guarantee cross-browser determinism, the Worker must strictly avoid native transcendentals for any operation that mutates state9. Geographic coordinates, vectors, and numerical indicators for the 48 synthetic cells must be processed using scaled integer arithmetic or a custom deterministic mathematics library relying on lookup tables or Taylor series expansions13. Native Math.random() is inherently non-deterministic and highly engine-dependent15. The Worker must utilize a deterministic pseudo-random number generator (PRNG), such as a 64-bit SplitMix or XorShift algorithm15, initialized with a strict seed contained in the INIT or IMPORT payload17. Furthermore, Object.keys() iteration order is not guaranteed to be identical across all engine versions. The simulation must rely on sorted arrays for iteration, ensuring that event processing occurs in a strictly predictable sequence.
Deterministic Replay and Cross-Browser Comparison Protocol
Verification of the simulation's determinism requires an automated cross-browser replay protocol that eliminates hardware and OS-level variability.
| Phase | Action | Verification Standard |
|---|---|---|
| 1\. Seed Injection | Inject identical starting state and PRNG seed into Chrome, Firefox, and Safari headless instances. | Workers acknowledge INIT success with matching origin hashes. |
| 2\. Fuzz Input Execution | Execute a predefined sequence of 5,000 messages (Steps, Jumps, Interventions) in a headless environment. | Messages must be ingested and processed in exact order without backpressure failure. |
| 3\. Canonical Serialization | Extract state, format per RFC 8785 (JSON Canonicalization Scheme)1. | Byte-for-byte identical JSON strings produced across all engines. |
| 4\. Hashing | Compute SHA-256 hash of the canonical JSON string20. | Hashes must match exactly across all tested browsers and architectures (e.g., ARM64 vs x86\_64). |
| 5\. Tolerance & Rendering | Compare rendered WebGL pixel output via headless screenshots. | Acceptable threshold: \< 0.05% pixel variance (accounting for minor GPU anti-aliasing differences). State hashes must have 0.00% variance. |
Canonical JSON (RFC 8785\) is mandatory because standard JSON.stringify() produces non-deterministic outputs based on insertion order and varying whitespace rules2. By enforcing lexicographical sorting of keys and precise ECMA-262 number serialization, RFC 8785 guarantees that logically equivalent states yield identical byte arrays for hashing1.
Exhaustive Verification Test Catalog
The architecture requires an implementation-ready testing specification spanning 200 explicitly named tests. These tests are categorized across ten distinct assurance layers to ensure comprehensive coverage of determinism, protocol bounds, security, rendering, and AI containment.
1. Core Determinism & Playback Verification (T001 - T020)
This layer proves that the underlying mathematical engine generates identical outcomes regardless of the execution environment. The tests ensure that locale data, wall-clock time, and hardware architectures cannot leak into the simulation state.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T001 | Det\_CrossBrowser\_HashEquivalence | Asserts SHA-256 state hashes match across V8, SpiderMonkey, and JavaScriptCore after 1000 steps9. |
| T002 | Det\_MathSin\_Avoidance | Scans worker bundle to assert native Math.sin/Math.cos are not invoked in state mutations11. |
| T003 | Det\_PRNG\_SeedInvariance | Asserts the same PRNG seed produces identical event outcomes over 500 ticks. |
| T004 | Det\_FloatingPoint\_Avalanche | Injects a precision delta into a cell indicator; asserts divergence is mathematically predictable. |
| T005 | Det\_Locale\_Independence | Asserts simulation state ignores Intl.DateTimeFormat and browser locale configurations. |
| T006 | Det\_WallClock\_Isolation | Mocks Date.now() and performance.now() to extreme futures; asserts worker logic remains unaffected. |
| T007 | Det\_Iteration\_Order\_Array | Asserts event resolution processes strictly by array index, independent of object key insertion order21. |
| T008 | Det\_Play\_Pause\_Equivalence | Asserts 10 steps executed via PLAY/PAUSE yield identical state to 10 sequential STEP commands. |
| T009 | Det\_Speed\_Invariance | Asserts state transitions at 1x speed match exact outcomes at 100x speed for identical tick counts. |
| T010 | Det\_Replay\_Identity | Asserts replaying a saved scenario trace produces the exact SHA-256 hash at every historical tick. |
| T011 | Det\_Action\_Sequencing | Asserts identical inputs applied in the exact same tick order produce the same outcome. |
| T012 | Det\_Jump\_Forward\_Accuracy | Asserts a JUMP command to tick N produces the exact state as N sequential STEP commands. |
| T013 | Det\_Rewind\_Accuracy | Asserts a REWIND to tick N-10 accurately restores the historical canonical state for that tick. |
| T014 | Det\_Event\_Resolution\_Ties | Asserts simultaneous crisis events are resolved using the deterministic PRNG, avoiding race conditions. |
| T015 | Det\_Object\_Property\_Sort | Asserts RFC 8785 canonicalization correctly lexicographically sorts all JSON state keys before hashing2. |
| T016 | Det\_Float\_Serialization | Asserts numbers are serialized strictly per ECMA-262 rules during state hashing1. |
| T017 | Det\_State\_Immutability\_Main | Asserts the Main Thread attempting to mutate the projected state array does not alter the Worker's authoritative state. |
| T018 | Det\_Branch\_Copy\_Equivalence | Asserts creating a BRANCH produces a duplicated state hash matching the origin state hash. |
| T019 | Det\_Deep\_Nesting\_Hash | Asserts the hashing algorithm correctly traverses and deterministically hashes 50-level deep historical context objects2. |
| T020 | Det\_ArrayBuffer\_ZeroCopy | Asserts the worker successfully transfers ArrayBuffer ownership without mutating internal state tracking5. |
2. Chronology & Boundary Constraints (T021 - T040)
Simulation Earth relies on precise chronological logic spanning thousands of years. These tests verify the robustness of date calculations, the handling of calendar anomalies, and the strict segregation between factual historical data and fictional projections.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T021 | Chr\_BCE\_CE\_Crossing | Asserts the simulation correctly calculates chronological delta across the 1 BCE to 1 CE boundary (enforcing no year zero). |
| T022 | Chr\_LeapYear\_Handling | Asserts correct tick mapping for February 29th across 400-year Gregorian cycle projections. |
| T023 | Chr\_Observed\_Through\_Cross | Asserts state transitions gracefully from factual historical archive playback into deterministic predictive projection. |
| T024 | Chr\_Projection\_Announcement | Asserts crossing into the predictive future instantly triggers the UI notification boundary warning. |
| T025 | Chr\_First\_Intervention\_Lock | Asserts the very first user intervention irreversibly marks the timeline as a "fictional branch." |
| T026 | Chr\_Baseline\_Return | Asserts a user can discard a fictional branch and return flawlessly to the observed-through baseline. |
| T027 | Chr\_Nuclear\_Archive\_End | Asserts the historical nuclear archive data stops at the verified date; subsequent events use simulation logic. |
| T028 | Chr\_Unsupported\_Dates | Asserts chronological requests prior to the historical origin date return a safe OUT\_OF\_BOUNDS deterministic fallback. |
| T029 | Chr\_End\_of\_Register | Asserts the simulation pauses gracefully upon reaching the maximum defined Unix timestamp bounds. |
| T030 | Chr\_Timeline\_Contamination | Asserts fictional events created in Branch A cannot be queried or resolved in the baseline or Branch B. |
| T031 | Chr\_Historical\_Immutability | Asserts attempts to trigger an INTERVENE action on a historical (factual) date are rejected by the Worker. |
| T032 | Chr\_Scenario\_Switch | Asserts switching scenarios immediately clears previous chronology and resets the PRNG and tick counters. |
| T033 | Chr\_Event\_Lifespan | Asserts context events correctly expire and are pruned from the active state upon reaching their chronological end-date. |
| T034 | Chr\_Playback\_Direction | Asserts reversing playback speed correctly navigates the append-only history without triggering new PRNG evaluations. |
| T035 | Chr\_Leap\_Second\_Ignore | Asserts the simulation standardizes on 86,400-second days, ignoring real-world leap second adjustments to maintain sync. |
| T036 | Chr\_Date\_Format\_Strict | Asserts inputs using non-ISO 8601 date formats are rejected by the worker validation schema. |
| T037 | Chr\_Future\_Factual\_Denial | Asserts the system rejects importing a "factual" database containing events stamped in the future. |
| T038 | Chr\_Epoch\_Rollover | Asserts the 2038 epoch problem is avoided by utilizing 64-bit integer timestamp tracking. |
| T039 | Chr\_Tick\_Rate\_Stability | Asserts the internal chronological tick is completely decoupled from rendering framerates (FPS). |
| T040 | Chr\_Narrative\_Timeline\_Sync | Asserts chronological text logs match the precise exact deterministic tick of the underlying event resolution. |
3. Worker Concurrency & Protocol Adherence (T041 - T060)
The Web Worker must operate as an impregnable state machine. These tests validate the JSON schemas, memory management, and the worker's ability to survive chaotic or hostile message passing from the Main Thread.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T041 | Wrk\_Malformed\_Message | Asserts the Worker rejects missing request\_id or timestamp\_seq with a standard schema error. |
| T042 | Wrk\_Unknown\_Action | Asserts unknown actions return ERROR: UNKNOWN\_ACTION and maintain the canonical state hash. |
| T043 | Wrk\_Backpressure\_Reject | Asserts bombarding the Worker with 10,000 STEP requests results in queued limits and backpressure rejections. |
| T044 | Wrk\_Duplicate\_Delivery | Asserts sending the exact same request\_id twice results in a cached ACK without double-advancing the state. |
| T045 | Wrk\_Out\_Of\_Order\_Seq | Asserts receiving timestamp\_seq N+2 before N+1 correctly buffers or rejects to maintain linear progression. |
| T046 | Wrk\_Tab\_Suspension\_Wake | Asserts a browser tab backgrounding event does not corrupt pending worker queues. |
| T047 | Wrk\_Tab\_Restore\_State | Asserts returning to a suspended tab correctly requests a full state synchronization from the active Worker. |
| T048 | Wrk\_Crash\_Recovery | Asserts terminating the Worker thread allows the Main Thread to instantiate a new Worker using the last known snapshot. |
| T049 | Wrk\_Payload\_Too\_Large | Asserts payloads exceeding the 64 MiB limit are rejected before serialization overhead impacts the UI2. |
| T050 | Wrk\_Transferable\_Validation | Asserts buffers transferred to the worker leave a byteLength of 0 in the main thread5. |
| T051 | Wrk\_Clone\_Error\_Objects | Asserts the structured clone algorithm successfully serializes custom error objects across the boundary3. |
| T052 | Wrk\_Prototype\_Pollution | Asserts the Worker sanitizes \_\_proto\_\_ and constructor keys from all incoming JSON payloads. |
| T053 | Wrk\_Idempotent\_Pause | Asserts multiple consecutive PAUSE messages do not toggle the state back to PLAY. |
| T054 | Wrk\_Cancel\_Operation | Asserts a long-running scenario generation can be gracefully cancelled via a CANCEL request ID. |
| T055 | Wrk\_Type\_Coercion\_Denial | Asserts the JSON schema validation prevents implicit type coercion (e.g., passing string "1" instead of integer 1). |
| T056 | Wrk\_Memory\_Leak\_Check | Asserts memory usage remains stable after 1,000,000 message roundtrips (verifying no detached DOM nodes or uncleared arrays). |
| T057 | Wrk\_Unparseable\_JSON | Asserts raw string inputs that fail JSON.parse are rejected immediately by the endpoint interface. |
| T058 | Wrk\_Unserializable\_Payload | Asserts attempting to pass a proxy object or closure throws a structured clone error caught by the test harness7. |
| T059 | Wrk\_Message\_Latency\_Bound | Asserts the roundtrip for a standard STEP operation completes within 16ms to maintain 60 FPS UI pacing. |
| T060 | Wrk\_Schema\_Version\_Mismatch | Asserts a UI sending protocol version 0.9.0 to a 1.0.0 Worker triggers a hard initialization failure. |
4. Save, Export & Migration Integrity (T061 - T080)
State persistence in a browser environment relies on LocalStorage and JSON file exports. These tests guarantee that files cannot inject malicious code, corrupt the state, or bypass chronological constraints upon import.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T061 | Sav\_Malformed\_JSON | Asserts importing a save file with truncated JSON triggers a validation failure, leaving current state intact. |
| T062 | Sav\_Oversized\_File | Asserts save files over 128MB are rejected by the local FileReader before reaching the Worker. |
| T063 | Sav\_Deep\_Nesting | Asserts save files nested deeper than 50 levels trigger a bound-exceeded rejection to prevent stack overflows2. |
| T064 | Sav\_Duplicate\_IDs | Asserts arrays of entities (synthetic cells, events) with duplicate UUIDs are rejected during import validation. |
| T065 | Sav\_Unknown\_Fields | Asserts unknown JSON keys are strictly stripped/ignored to prevent state-pollution during migration. |
| T066 | Sav\_Unsafe\_Keys | Asserts keys containing executable scripting patterns (e.g., \<script\>) are sanitized. |
| T067 | Sav\_Invalid\_Ranges | Asserts imported numerical indicators falling outside normalized bounds (0.0 to 1.0) are clamped or rejected. |
| T068 | Sav\_Forbidden\_Notes | Asserts prohibited research prose, private keys, or real targeting parameters in metadata trigger a hard failure. |
| T069 | Sav\_Coordinates\_Check | Asserts files containing real-world high-precision coordinates are sanitized to the abstract 48 synthetic cells. |
| T070 | Sav\_Provider\_Content\_Denial | Asserts imported templates containing pre-baked LLM responses strip the AI content, forcing deterministic regeneration. |
| T071 | Sav\_Unsupported\_Schemas | Asserts importing a v0.5 save file into a v1.0 system triggers the designated migration chain rather than raw loading. |
| T072 | Sav\_Interrupted\_Writes | Asserts simulating a crash during a LocalStorage write leaves the previous save slot uncorrupted. |
| T073 | Sav\_Migration\_Chain\_Fuzzing | Asserts sequential migrations (v0.5 \-\> v0.8 \-\> v1.0) yield identical canonical hashes to a direct (v0.5 \-\> v1.0) migration. |
| T074 | Sav\_Export\_Import\_Identity | Asserts exporting a state and immediately importing it produces the exact same deterministic state hash. |
| T075 | Sav\_Local\_Persistence\_Quota | Asserts hitting the 5MB/10MB browser LocalStorage quota gracefully prompts the user to download the JSON instead. |
| T076 | Sav\_Portable\_Template\_Hash | Asserts sharing a template JSON between two distinct browsers generates the exact same origin hash upon initialization. |
| T077 | Sav\_No\_Credentials\_Export | Asserts no user session tokens, JWTs, or local UUIDs are embedded in the exported JSON file. |
| T078 | Sav\_Read\_Only\_Archive | Asserts attempting to overwrite a built-in historical scenario save file fails. |
| T079 | Sav\_Schema\_Downgrade | Asserts attempting to load a v1.1 save file into a v1.0 system throws an UNSUPPORTED\_FUTURE\_VERSION error. |
| T080 | Sav\_Null\_Byte\_Injection | Asserts save files containing null bytes (\\u0000) in string fields are safely sanitized or rejected. |
5. Metamorphic & State Equivalence (T081 - T100)
Metamorphic testing proves that functionally equivalent user operations result in mathematically identical state hashes. If two distinct paths logically arrive at the same scenario, their resulting canonical states must match flawlessly.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T081 | Met\_Input\_Ordering | Asserts adding Intervention A then Intervention B on the same tick yields identical state to B then A (if commutative). |
| T082 | Met\_Pause\_Step\_Playback | Asserts 100 ticks achieved via PLAY is identical to 100 manual STEP clicks. |
| T083 | Met\_Branch\_Equivalence | Asserts a branch left untouched mirrors the baseline timeline exactly at every future tick. |
| T084 | Met\_Restart\_Equivalence | Asserts closing the browser, restarting, and loading a save yields the same next-tick state as continuing without restarting. |
| T085 | Met\_Narrative\_Wording | Asserts changing the descriptive text of a custom event has zero impact on the numerical indicator state hashes. |
| T086 | Met\_Zoom\_Invariance | Asserts panning or zooming the WebGL globe UI has zero impact on the Worker's deterministic state. |
| T087 | Met\_Export\_Upload\_Equiv | Asserts uploading a save file via drag-and-drop yields the same state as uploading via the file picker dialog. |
| T088 | Met\_Speed\_Fluctuation | Asserts fluctuating the simulation speed between 1x, 5x, and 10x repeatedly during playback does not alter the final state. |
| T089 | Met\_Intervention\_Cancel | Asserts opening the intervention dialog and canceling leaves the canonical state hash completely unchanged. |
| T090 | Met\_Crisis\_Trigger\_Origin | Asserts a crisis triggered manually vs. triggered by deterministic indicators resolve identically if at the same tick. |
| T091 | Met\_Data\_Format\_Parity | Asserts loading data initialized from raw JS objects vs parsed JSON strings result in the exact same state array. |
| T092 | Met\_Resolution\_Invariance | Asserts running the simulation on a 4K monitor vs a 720p monitor results in the exact same Worker state. |
| T093 | Met\_Offline\_Equivalence | Asserts the simulation produces identical state hashes when the browser's network adapter is disabled. |
| T094 | Met\_Context\_Lifecycle | Asserts an transient event starting on Tick 10 and ending on Tick 20 leaves the state identical to one that never occurred, post-Tick 20\. |
| T095 | Met\_Save\_Slot\_Equivalence | Asserts saving to Slot 1 vs Slot 3 produces identical JSON byte outputs. |
| T096 | Met\_Locale\_Timezone\_Eq | Asserts a user in Tokyo (UTC+9) generates the same chronology hashes as a user in New York (UTC-5). |
| T097 | Met\_Device\_CPU\_Equivalence | Asserts an ARM64 processor produces the exact same hash as an x86\_64 processor2. |
| T098 | Met\_Fallback\_2D\_3D | Asserts running the UI in 2D fallback mode issues the exact same worker protocol messages as the WebGL UI. |
| T099 | Met\_Scenario\_Reset | Asserts clicking RESET restores the exact same origin hash as a fresh page load. |
| T100 | Met\_Event\_Studio\_DryRun | Asserts designing an event in the Event Studio without committing it produces no changes to the active simulation state. |
6. Rendering Correctness, WebGL & Context Loss (T101 - T120)
Because the UI is a read-only projection, rendering anomalies must not crash the underlying simulation. These tests ensure the WebGL globe and 2D fallbacks handle extreme edge cases—such as pole singularities and context loss—gracefully24.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T101 | Rnd\_Transform\_Math | Asserts world-space to screen-space matrix transformations accurately plot the 48 synthetic cells on the WebGL globe. |
| T102 | Rnd\_North\_Up\_Orientation | Asserts the globe strictly enforces a north-up camera constraint during rotation to prevent gimbal lock or disorientation. |
| T103 | Rnd\_Drag\_Direction | Asserts click-and-drag mechanics map logically to globe rotation vectors across varied aspect ratios. |
| T104 | Rnd\_Antimeridian\_Crossing | Asserts polygons and line renderers do not artifact or stretch when crossing the 180-degree longitude line. |
| T105 | Rnd\_Pole\_Behavior | Asserts rendering at 90 degrees North/South avoids texture pinching or vertex singularity rendering crashes. |
| T106 | Rnd\_Horizon\_Visibility | Asserts UI labels dynamically fade or hide when their associated synthetic cell rotates behind the globe horizon. |
| T107 | Rnd\_Label\_Alignment | Asserts text labels accurately anchor to their 3D coordinates without jitter during camera zoom. |
| T108 | Rnd\_Marker\_Selection | Asserts raycasting accurately identifies clicked cell markers even at oblique viewing angles. |
| T109 | Rnd\_Off\_Screen\_Compass | Asserts active crisis events located off-screen display accurate edge-of-screen directional compass indicators. |
| T110 | Rnd\_Event\_Visual\_Lifecycle | Asserts explosion, spread, or pulse animations strictly initialize and terminate synchronized with the Worker's tick data. |
| T111 | Rnd\_Reduced\_Motion | Asserts checking prefers-reduced-motion instantly disables globe auto-rotation and replaces animations with static visual indicators. |
| T112 | Rnd\_Context\_Loss\_Restore | Emulates WebGL context loss (WEBGL\_lose\_context); asserts the renderer gracefully falls back or rebuilds without crashing the tab24. |
| T113 | Rnd\_2D\_Fallback\_Equiv | Asserts the 2D canvas fallback accurately renders all 48 cells and active events when WebGL initialization fails. |
| T114 | Rnd\_DPR\_Scaling | Asserts rendering on high-DPI (Retina) displays correctly scales the WebGL buffer to prevent blurring. |
| T115 | Rnd\_Z\_Fighting\_Prevention | Asserts overlay meshes (e.g., event radiuses) utilize logarithmic depth buffers or polygon offset to prevent Z-fighting flicker. |
| T116 | Rnd\_Texture\_Memory\_Limit | Asserts total WebGL texture memory stays within 50MB, ensuring compatibility with lower-end mobile devices. |
| T117 | Rnd\_Camera\_Bounds | Asserts the user cannot zoom the camera inside the globe geometry or pan outside the maximum orbital distance. |
| T118 | Rnd\_Color\_Blind\_Modes | Asserts the rendering pipeline supports dynamic shader swaps to accommodate Protanopia, Deuteranopia, and Tritanopia. |
| T119 | Rnd\_Frame\_Pacing | Asserts the requestAnimationFrame loop handles dropped frames smoothly by interpolating visual state without impacting Worker ticks. |
| T120 | Rnd\_Canvas\_Resize | Asserts resizing the browser window dynamically recalculates the projection matrix without squashing the globe aspect ratio. |
7. Accessibility (A11y), WebXR & Automated Evidence (T121 - T140)
To meet public inclusion mandates, the visual canvas must be fully translated into an accessible shadow DOM. Furthermore, WebXR immersive sessions must strictly map controllers to the standard UI paradigms without collecting invasive biometric telemetry26.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T121 | Acc\_Keyboard\_Focus | Asserts every interactive element in the UI and WebGL overlay is reachable via standard Tab navigation. |
| T122 | Acc\_Inert\_Layers | Asserts underlying UI elements are marked inert when a modal (e.g., Event Studio) is open, trapping focus. |
| T123 | Acc\_Escape\_Hierarchy | Asserts the Escape key sequentially closes the topmost modal, then dropdowns, then clears selections. |
| T124 | Acc\_Live\_Announcements | Asserts critical deterministic events (e.g., Crisis Trigger) emit an aria-live="assertive" announcement to screen readers. |
| T125 | Acc\_Screen\_Reader\_Readout | Asserts NVDA, JAWS, VoiceOver, and TalkBack correctly interpret the 48 synthetic cells via hidden DOM shadow elements. |
| T126 | Acc\_Reflow\_200 | Asserts zooming the browser to 200% forces the UI into a mobile-friendly reflow without truncating text or obscuring the canvas. |
| T127 | Acc\_Forced\_Colors | Asserts the UI remains legible and high-contrast when Windows High Contrast Mode (Forced Colors) is activated. |
| T128 | Acc\_XR\_Session\_Init | Asserts requesting an immersive-vr WebXR session successfully transfers the WebGL context to the headset26. |
| T129 | Acc\_XR\_Input\_Mapping | Asserts WebXR controller raycasts map correctly to the standard raycaster used for mouse inputs. |
| T130 | Acc\_XR\_Exit\_Graceful | Asserts exiting WebXR mode gracefully restores the standard browser DOM/WebGL projection. |
| T131 | Acc\_Automated\_vs\_Native | Asserts Playwright/Puppeteer automated accessibility scans match the manual native testing checklist requirements27. |
| T132 | Acc\_Label\_Contrast | Asserts all UI text maintains a minimum 4.5:1 WCAG contrast ratio against dynamic globe backgrounds. |
| T133 | Acc\_Audio\_Mute\_Control | Asserts the application starts muted and respects global volume toggles for all context-event sounds. |
| T134 | Acc\_Skip\_To\_Content | Asserts the presence of a functional "Skip to Simulation" hidden link as the first focusable DOM node. |
| T135 | Acc\_Semantic\_HTML | Asserts all controls utilize native HTML tags rather than div tags with click handlers. |
| T136 | Acc\_XR\_Gaze\_Fallback | Asserts the WebXR implementation does not utilize eye/gaze tracking for targeting, ensuring BIPA compliance29. |
| T137 | Acc\_XR\_Framerate | Asserts the WebXR render loop maintains a strict 72hz+ to prevent simulator sickness, shedding visual complexity if needed. |
| T138 | Acc\_Tooltip\_Hover\_Focus | Asserts all informational tooltips are triggerable by both mouse hover and keyboard focus. |
| T139 | Acc\_Form\_Error\_Announce | Asserts invalid scenario inputs throw inline ARIA errors immediately upon focus loss. |
| T140 | Acc\_ARIA\_Hidden\_Canvas | Asserts the purely visual \<canvas\> is hidden from screen readers, relying entirely on the synchronized shadow DOM structure. |
8. Security, Privacy & Threat Mitigation (T141 - T160)
Simulation Earth faces distinct threats stemming from its deployment architecture. These tests enforce strict Content Security Policies (CSP), mitigate XSS vectors, and mathematically verify that no Personally Identifiable Information (PII) or Illinois biometric data (BIPA/PIPA) is logged29.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T141 | Sec\_CSP\_Strict | Asserts the HTTP Content Security Policy strictly blocks unsafe-inline scripts and restricts connections to same-origin. |
| T142 | Sec\_Cross\_Origin\_Isolation | Asserts Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers are set for SharedArrayBuffer security. |
| T143 | Sec\_XSS\_Scenario\_Name | Asserts injecting \<script\>alert(1)\</script\> into a custom scenario name is escaped properly during DOM rendering. |
| T144 | Sec\_No\_IP\_Logging | Asserts the server telemetry does not record raw client IP addresses, ensuring zero PII collection. |
| T145 | Sec\_Local\_Storage\_Sanitize | Asserts saving a scenario to LocalStorage uses JSON.stringify safely without executing embedded object getters. |
| T146 | Sec\_Rate\_Limiting\_Endpoint | Asserts the Optional-AI PHP endpoint returns HTTP 429 Too Many Requests if triggered more than 5 times per minute. |
| T147 | Sec\_Error\_Fingerprint\_Hide | Asserts stack traces and detailed error messages are suppressed in production console logs. |
| T148 | Sec\_PII\_Denial | Asserts the application actively blocks inputs resembling Social Security Numbers, emails, or phone numbers in scenario text30. |
| T149 | Sec\_BIPA\_Compliance | Asserts absolutely no biometric data (gaze, facial tracking, microphone, camera) is requested or processed by the browser29. |
| T150 | Sec\_PIPA\_Compliance | Asserts the architecture utilizes zero local unencrypted Illinois-resident personal data30. |
| T151 | Sec\_Denial\_Of\_Service\_Save | Asserts importing a "zip bomb" style nested JSON payload terminates parsing before freezing the browser. |
| T152 | Sec\_Third\_Party\_Scripts | Asserts no third-party tracking, analytics, or social media scripts are loaded in the DOM. |
| T153 | Sec\_URL\_Parameter\_Sanitize | Asserts shared links containing malformed or excessive GET parameters do not execute arbitrary code. |
| T154 | Sec\_Signature\_Verification | Asserts official scenario templates contain a valid cryptographic signature verified against a hardcoded public key. |
| T155 | Sec\_Revoked\_Key\_Denial | Asserts templates signed by a known-revoked key are rejected during the import validation phase. |
| T156 | Sec\_Frame\_Busting | Asserts X-Frame-Options: DENY is active, preventing the simulation from being clickjacked in an external iframe. |
| T157 | Sec\_No\_Store\_Headers | Asserts the Optional-AI endpoint strictly utilizes Cache-Control: no-store to prevent caching of sensitive state envelopes. |
| T158 | Sec\_Prototype\_Pollution\_UI | Asserts deeply merging user preferences from LocalStorage does not pollute the global Object.prototype. |
| T159 | Sec\_Pathogen\_Exploit\_Denial | Asserts text inputs containing keywords related to pathogen design or cyber exploits are sanitized and rejected. |
| T160 | Sec\_Targeting\_Denial | Asserts the interface rejects coordinates mimicking real-world sensitive military or civilian infrastructure. |
9. Optional-AI Containment & Fallback (T161 - T180)
The AI component acts purely as a replaceable explanation layer. These tests prove that adversarial prompt injection, provider drift, or hallucinated logic cannot penetrate the Worker's deterministic state envelope.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T161 | AI\_Envelope\_Allowlist | Asserts the PHP endpoint only accepts JSON payloads mapping strictly to the 48 synthetic cells and known event classes. |
| T162 | AI\_State\_Mutation\_Denial | Asserts the returned AI payload is incapable of altering the authoritative state variables of the Worker. |
| T163 | AI\_Prompt\_Injection\_Resist | Asserts the PHP proxy wraps user context in a strict system prompt, ignoring "ignore previous instructions" inputs. |
| T164 | AI\_Output\_Schema\_Valid | Asserts the AI response is strictly validated against a JSON schema; malformed outputs trigger the deterministic fallback. |
| T165 | AI\_Refusal\_Handling | Asserts if the LLM provider triggers a safety refusal, the UI gracefully displays standard fallback text without crashing. |
| T166 | AI\_Hallucinated\_Numbers | Asserts any numeric casualties, probabilities, or coordinates hallucinated by the AI are regex-stripped before rendering. |
| T167 | AI\_Invented\_Authority | Asserts the AI cannot claim legal, operational, targeting, or command authority in its text generation. |
| T168 | AI\_Provider\_Alias\_Drift | Asserts a change in the provider's underlying model (e.g., GPT-4 to GPT-4-turbo) does not break the JSON extraction logic. |
| T169 | AI\_Latency\_Timeout | Asserts the request aborts and triggers the deterministic fallback if the provider takes longer than 3500ms to respond. |
| T170 | AI\_Token\_Accounting | Asserts the PHP endpoint strictly truncates outbound context envelopes to 500 tokens to prevent cost-exhaustion attacks. |
| T171 | AI\_Deterministic\_Fallback | Asserts the system seamlessly uses a pre-calculated template string if the optional AI is disabled by the user. |
| T172 | AI\_Differential\_No\_AI | Asserts playing a scenario with AI disabled yields the exact same deterministic hash as playing with AI enabled. |
| T173 | AI\_Differential\_Malformed | Asserts injecting corrupt JSON into the mock LLM provider response gracefully yields the fallback without altering hashes. |
| T174 | AI\_Chronology\_Isolation | Asserts the AI cannot inject events into the past (Historical) or assert facts about the predictive (Fictional) future. |
| T175 | AI\_Safety\_Policy\_Drift | Asserts the architecture remains stable even if the upstream provider drastically increases its false-positive refusal rate. |
| T176 | AI\_Network\_Failure | Asserts pulling the ethernet cable during an AI request gracefully times out to the fallback string. |
| T177 | AI\_API\_Key\_Secrecy | Asserts the LLM provider API key is stored securely in PHP environment variables and never exposed to the browser. |
| T178 | AI\_Role\_Constraint | Asserts the AI is explicitly instructed to act only as an observer/analyst, never as a participant or commander. |
| T179 | AI\_Endpoint\_Auth | Asserts the PHP endpoint rejects requests that lack a valid same-origin CSRF token generated by the server. |
| T180 | AI\_JSON\_Escape\_Chars | Asserts the AI output handles unicode and escape characters properly without breaking the client-side UI parser. |
10. Release Evidence, Integrity & Observability (T181 - T200)
Final deployment onto IARPA.org requires cryptographic proof that the release artifact has not been tampered with. These tests ensure the build pipeline creates identical outputs and strips internal evidence from the public payload.
| Test ID | Test Name | Objective / Assertion |
|---|---|---|
| T181 | Rel\_Reproducible\_Manifest | Asserts running the build pipeline twice produces bit-for-bit identical JavaScript bundles. |
| T182 | Rel\_File\_Hashes\_Valid | Asserts Subresource Integrity (SRI) hashes match the deployed files exactly. |
| T183 | Rel\_Permission\_Modes | Asserts all deployed files on the static host have strict read-only permissions (644 for files, 755 for directories). |
| T184 | Rel\_Archive\_Overlap | Asserts the deployment package does not contain redundant, overlapping, or conflicting historical database files. |
| T185 | Rel\_Public\_Private\_Sep | Asserts no private keys, internal CI scripts, or test fixtures are included in the public deployment package. |
| T186 | Rel\_Signed\_Artifacts | Asserts the final ZIP artifact is cryptographically signed by the release-assurance lead's key. |
| T187 | Rel\_Independent\_Verify | Asserts an independent auditor can use the public manifest to verify the integrity of the live IARPA.org deployment. |
| T188 | Rel\_Revocation\_Check | Asserts the application actively checks a static revocations.json file to invalidate compromised scenarios. |
| T189 | Rel\_Rollback\_Evidence | Asserts the system can be cleanly rolled back to the previous version via swapping the static directory structure. |
| T190 | Rel\_Observability\_Counters | Asserts privacy-minimizing counters correctly tally UI fallback events without logging user data. |
| T191 | Rel\_Threshold\_Alerting | Asserts reaching 100 worker restarts in an hour triggers a passive stability alert in the aggregate dashboard. |
| T192 | Rel\_Context\_Loss\_Metrics | Asserts WebGL context loss occurrences are tallied to monitor device compatibility issues. |
| T193 | Rel\_A11y\_Error\_Telemetry | Asserts screen-reader failure loops (if detectable) increment a silent generic counter for triage. |
| T194 | Rel\_Live\_Canary\_Auth | Asserts the explicitly authorized live-provider canary test passes before the production deployment is flipped. |
| T195 | Rel\_DNS\_TLS\_Config | Asserts the domain is configured with strict DNSSEC, HSTS, and TLS 1.3 only. |
| T196 | Rel\_Cache\_Busting | Asserts deploying a new version correctly invalidates the browser cache via unique file hashes. |
| T197 | Rel\_No\_Fabricated\_Evidence | Asserts test reports are derived directly from CI runners, rejecting any manual/simulated success reports. |
| T198 | Rel\_Data\_Admission | Asserts all bulk historical world-events added in the release are signed and schema-validated. |
| T199 | Rel\_Operational\_Enable | Asserts the feature-flag configuration strictly enables only verified, stable features for the production environment. |
| T200 | Rel\_Artifact\_Scan | Asserts a final malware/SAST scan of the built artifact returns zero critical vulnerabilities before signing. |
Privacy Engineering and Threat Model (STRIDE)
Simulation Earth processes sensitive, though fictional, geopolitical data. The threat model utilizes the STRIDE methodology to systematically identify and mitigate risks associated with the deployment architecture. A critical component of this threat model is strict adherence to the Illinois Biometric Information Privacy Act (BIPA) and the Personal Information Protection Act (PIPA)29. Legal precedents surrounding XR applications clearly identify gaze tracking, spatial mapping, and headset telemetry as protected biometric identifiers29. Consequently, the simulation's WebXR implementation must explicitly refuse any hooks that request spatial mapping or eye-tracking data, isolating controller input to pure non-biometric raycasting. Because the application requires no database, it stores no personal data, entirely circumventing PIPA breach reporting liabilities30.
| STRIDE Threat Category | Asset at Risk | Actor & Entry Point | Mitigation Strategy & Residual Risk |
|---|---|---|---|
| Spoofing | Deployment Integrity | Malicious server impersonating IARPA.org or a signed scenario template. | Mitigation: Cryptographic signing of the final artifact and template JSONs; strict DNSSEC and TLS 1.3 configurations. |
| Tampering | Deterministic State | User manipulating localStorage or save files to rewrite history. | Mitigation: Canonical hashing via RFC 87851. Any manipulation invalidates the hash, flagging the timeline as non-canonical. |
| Repudiation | Action Ledgers | Lack of non-repudiation in client-side worker logs. | Mitigation: Append-only history ledger validated by the Worker. Actions cannot be undone without rewinding and permanently splitting a branch. |
| Information Disclosure | Privacy / BIPA | XR Telemetry or AI Endpoint logs leaking personal data. | Mitigation: Zero biometric data collection29. PHP endpoint uses no-store headers and retains no logs. Residual risk is confined to local machine compromises. |
| Denial of Service | Application Availability | "Zip bomb" JSON saves or AI prompt exhaustion. | Mitigation: Hard file-size limits (128MB), depth checks on JSON parsing (max 50 layers)2, and strict endpoint rate-limiting (5 requests/minute). |
| Elevation of Privilege | Sandbox Escape | XSS via scenario names or prototype pollution via templates. | Mitigation: Strict CSP blocking unsafe-inline. Data sanitization mapping exclusively to 48 synthetic cells. Worker execution occurs entirely off the main thread. |
AI Containment and Fuzzing-Corpus Design
The optional AI operates in a fundamentally untrusted capacity. To ensure it cannot destabilize the system, it is subjected to an exhaustive Fuzzing-Corpus and a strict Admission/Fallback Matrix.
Fuzzing-Corpus Generation Strategy
1. Saves & Templates: Generate 100,000 malformed JSON save files utilizing bit-flipping, deeply nested arrays2, duplicated UUIDs, and boundary-exceeding integers (e.g., overriding a 0.0 to 1.0 normalization to 999.9). Feed these into the headless IMPORT pipeline to ensure the Worker rejects them gracefully without heap exhaustion.
2. Worker Messages: Blast the Web Worker with out-of-order, structurally invalid, and conceptually impossible message sequences (e.g., sending INTERVENE before INIT). The Worker must remain responsive, returning standardized ERROR schemas without stalling the UI.
3. Consequence Envelopes & Provider Responses: Inject adversarial text, null bytes, and excessively large strings into the localized event text fields. Mock the LLM provider to return malformed JSON, infinite streaming loops, sudden connection drops, and inappropriate content. The PHP proxy must consistently trap these errors and return the deterministic fallback. Ensure all fuzzing strictly excludes real targeting instructions, weapon parameters, or cyber exploits, conforming to the non-negotiable safety rules.
Optional-AI Admission, Drift, and Fallback Matrix
| Condition | PHP Proxy Action | UI Rendering Result | State Authority Impact |
|---|---|---|---|
| Normal Operation | Validates schema, calls LLM, cleans text. | Displays AI narrative overlay. | None. |
| Provider Timeout (\>3.5s) | Aborts connection, logs generic timeout. | Displays pre-calculated template text. | None. |
| Prompt Injection Detected | Drops request, increments security counter. | Displays pre-calculated template text. | None. |
| Safety Refusal / Drift | Catches 400/403/Refusal string from LLM. | Displays pre-calculated template text. | None. |
| Malformed JSON Output | Fails parse, drops payload entirely. | Displays pre-calculated template text. | None. |
| Hallucinated Coordinates | Regex matches numbers, strips them. | Displays sanitized AI text overlay. | None. |
Production Acceptance and Release Evidence
Prior to deploying to IARPA.org, the release-assurance lead must verify cryptographic and functional integrity. No evidence may be simulated or fabricated. Production-Evidence Checklist:
- \[ \] Local Automation: 200/200 tests pass in the headless CI pipeline without retry flakiness.
- \[ \] Browser Automation: Tests pass across Playwright/Puppeteer instances for Chromium, Firefox, and WebKit37.
- \[ \] Native Device Testing: Manual sign-off on iOS Safari, Android Chrome, and Meta Quest Browser.
- \[ \] Assistive Technology: Manual verification of screen reader compatibility using NVDA (Windows), JAWS (Windows), VoiceOver (macOS/iOS), and TalkBack (Android).
- \[ \] Live-Provider Canary: One explicitly authorized integration test against the production LLM endpoint confirms standard connectivity, ensuring the provider has not unexpectedly rotated authentication headers.
- \[ \] Public-Host Evidence: Staging deployment on a segregated IARPA sub-domain passes all TLS 1.3, DNSSEC, and CSP header validations.
- \[ \] Signed Artifacts: The final release package is hashed (SHA-256) and signed using the architect's private key, which remains strictly isolated from the build server.
Triage Plan for Regression Pressure Areas
Historical regression points in simulation platforms require strict oversight and predefined rollback criteria.
| Risk Area | Reproduction Evidence | Severity | Ownership | Rollback & Closure Criteria |
|---|---|---|---|---|
| Chronology Drift | Ticks misaligning with projected calendar dates. | Critical | Core Engine | Immediate rollback. Closure requires mathematical proof of tick-to-date invariance. |
| Save Migration | v1.0 engine failing to parse legacy v0.8 saves. | High | Assurance Lead | Feature flag disable. Closure requires legacy schemas mapping flawlessly to current RFC 8785 canonical form. |
| Event Visualization | WebGL particles stalling during Worker heavy load. | Medium | UI/UX | No rollback. Closure requires decoupling the render loop entirely from Worker blocking calls. |
| Political-Label Alignment | Labels overlapping or misaligning on globe rotation. | Low | UI/UX | No rollback. Closure requires horizon culling and Z-index testing pass. |
| Globe Context-Event Safety | AI text suggesting real-world targets. | Critical | Security | Immediate rollback. Closure requires regex sanitization and strict prompt constraints proven via fuzzing. |
Prioritized Backlog
- SAFE-NOW: Implement canonical JSON hashing (RFC 8785\)2. Isolate Web Worker messaging with strict schemas. Set up Playwright cross-browser harness for testing27.
- PROTOTYPE: WebXR immersive-vr integration for the 48 synthetic cells, restricted strictly to non-biometric controller raycasting to satisfy BIPA constraints26.
- REVIEW-REQUIRED: Custom deterministic Mathematics library for Web Worker execution to completely eliminate floating-point drift across V8 and SpiderMonkey engines9.
- REJECT: Any proposal to store user interaction logs, IP addresses, or AI prompt histories on the PHP server. Any proposal to utilize standard Math.random()15. Any proposal to provide the AI component with exact geographical coordinates or targeting parameters.
This architecture establishes a rigorously verified, fail-closed environment for Simulation Earth. By strictly isolating the Web Worker as the sole deterministic authority and relegating the UI and optional AI to pure read-only projections, the system guarantees that factual records remain unpolluted and that simulations are mathematically reproducible across all platforms. The integration of canonical hashing, stringent privacy-by-design principles, and zero-trust AI containment ensures that the simulation operates securely, without risk of state corruption, biometric data leakage, or narrative hallucination altering objective data.
Works cited
1. RFC 8785 \- JSON Canonicalization Scheme (JCS) \- IETF Datatracker, https://datatracker.ietf.org/doc/rfc8785/
2. json-canon: A Strict RFC 8785 Implementation in Go for Deterministic JSON, https://dev.to/lenny321/json-canon-a-strict-rfc-8785-implementation-in-go-for-deterministic-json-3mfg
3. The structured clone algorithm \- Web APIs | MDN, https://developer.mozilla.org/en-US/docs/Web/API/Web\_Workers\_API/Structured\_clone\_algorithm
4. Deep-copying in JavaScript using structuredClone | Articles \- web.dev, https://web.dev/articles/structured-clone
5. Transferable objects \- Web APIs | MDN, https://developer.mozilla.org/en-US/docs/Web/API/Web\_Workers\_API/Transferable\_objects
6. Transferable objects \- Lightning fast | Blog \- Chrome for Developers, https://developer.chrome.com/blog/transferable-objects-lightning-fast
7. Surviving the Structured Clone algorithm | by Andrea Giammarchi \- Medium, https://webreflection.medium.com/surviving-the-structured-clone-algorithm-130608b69f47
8. Working with Smart Filters \- MultiChain, https://www.multichain.com/developers/smart-filters/
9. multiplayer-guide.md \- NewKrok/nape-js \- GitHub, https://github.com/NewKrok/nape-js/blob/master/docs/guides/multiplayer-guide.md
10. Show HN: A 2D Physics Simulator in JavaScript \- Hacker News, https://news.ycombinator.com/item?id=14865184
11. Determinism \- Rapier.rs, https://rapier.rs/docs/user\_guides/templates\_injected/determinism/
12. Floating point determinism in Unity: Intel vs AMD, https://discussions.unity.com/t/floating-point-determinism-in-unity-intel-vs-amd/813566
13. Electronics, Volume 15, Issue 5 (March-1 2026\) – 232 articles \- MDPI, https://www.mdpi.com/2079-9292/15/5
14. Discovering JavaScript's Hidden Secrets: Understanding Numerical Algorithms., https://dev.to/davidevlops/discovering-javascripts-hidden-secrets-understanding-numerical-algorithms-40a9
15. Webots documentation: Procedural PROTO Nodes, https://www.cyberbotics.com/doc/reference/javascript-procedural-proto?version=omichel:master
16. Algorithms — list of Rust libraries/crates // Lib.rs, https://lib.rs/algorithms
17. Multiplayer Game Programming: Architecting Networked Games, http://sspczundal.com/assets/upload/ck-images/Multiplayer%20Game%20Programming%20Architecting%20Networked%20Games.pdf
18. Insights from Game AI Experts | PDF | Acceleration | Artificial Intelligence \- Scribd, https://www.scribd.com/document/865519580/Game-AI-Uncovered-Volume-Two-Paul-Roberts-Z-Library
19. draft-rundgren-json-canonicalization-scheme-17 \- IETF Datatracker, https://datatracker.ietf.org/doc/draft-rundgren-json-canonicalization-scheme/17/
20. The JSON Canonicalisation Scheme (RFC 8785\) in action and how to secure JSON objects with HMAC \- Connect2id, https://connect2id.com/blog/how-to-secure-json-objects-with-hmac
21. Jackson Tips: sorting JSON using JsonNode \- Medium, https://cowtowncoder.medium.com/jackson-tips-sorting-json-using-jsonnode-ce4476e37aee
22. RFC 8785: JSON Canonicalisation Scheme · nlohmann json · Discussion \#2612 \- GitHub, https://github.com/nlohmann/json/discussions/2612
23. Making browser games more secure with Elm, Part 2 \- Show and Tell, https://discourse.elm-lang.org/t/making-browser-games-more-secure-with-elm-part-2/7764
24. Testing the Invisible: Why Traditional E2E Fails for WebGL | CodeWithMMAK, https://www.codewithmmak.com/blog/testing-the-invisible-why-traditional-e2e-fails-for-webgl
25. Improve handling of webgl context loss · Issue \#120393 · microsoft/vscode \- GitHub, https://github.com/microsoft/vscode/issues/120393
26. WebXR Browser Support in 2026: What Works, What Breaks \- TestMu AI, https://www.testmuai.com/learning-hub/webxr-compatible-browsers/
27. JavaScript and Web Development InfoQ Trends Report 2020, https://www.infoq.com/articles/javascript-web-development-trends-2020/
28. TestMu AI vs Steel.dev: Browser Infrastructure for AI Agents Compared (2026), https://www.testmuai.com/blog/testmuai-vs-steeldev/
29. Extended Reality, Body-Based Data, and Biometric Privacy Regulations: Lessons for Policymakers by Jameson Spivack1 \- AWS, https://fsi9-prod.s3.us-west-1.amazonaws.com/s3fs-public/2024-10/Spivack%20-%20individual%20monograph%20(1).pdf
30. Illinois Privacy Law Compliance: What You Need to Know \- Varonis, https://www.varonis.com/blog/illinois-privacy-law
31. US Illinois Personal Information Protection Act (PIPA) \- SmartSuite, https://www.smartsuite.com/framework/illinois-personal-information-protection-act-815-ilcs-530
32. Personal Information Protection Act (PIPA) \- SSN \- University of Illinois System, https://www.ssn.uillinois.edu/personal\_information\_protection\_act\_pipa
33. What is the Illinois Data Breach Reporting Law? \- Compliancy Group, https://compliancy-group.com/illinois-data-breach-reporting-law/
34. Augmented Reality in E-Commerce and Virtual Shopping Experiences \- IJFMR, https://www.ijfmr.com/papers/2025/4/54346.pdf
35. EXISTING LAW AND EXTENDED REALITY \- AWS, https://fsi9-prod.s3.us-west-1.amazonaws.com/s3fs-public/2024-10/Existing%20Law%20and%20Extended%20Reality%20Volume.pdf
36. BUSINESS TRANSACTIONS (815 ILCS 530/) Personal Information Protection Act. \- Illinois Compiled Statutes, https://www.ilga.gov/Legislation/ILCS/Articles?ActID=2702\&ChapterID=67
37. Npms.io, https://npms.io/search?q=firefox-headless
38. Firefox \- InfoQ, https://www.infoq.com/firefox/
39. rfc8785 \- Hex.pm, https://hex.pm/packages/rfc8785