OSHA PSM Cl₂ TQ 1,500 lbs · Cl₂ IDLH 10 ppm · OSHA PEL 1 ppm · Ca(OCl)₂ thermal decomposition onset 100°C · NFPA 430 Class 3 oxidizer · Olin Corporation McIntosh AL · Lonza Water Treatment Conley GA · OxyChem Taft LA · Arch Chemicals Kenilworth NJ · 84th upward attack · FIRST HTH manufacturing attack · FIRST Ca(OCl)₂ attack · FIRST pool chlorine manufacturing AI attack · FIRST high-test hypochlorite dryer attack

Prompt injection in calcium hypochlorite HTH pool chlorine manufacturing dryer AI

Calcium hypochlorite (Ca(OCl)₂; high-test hypochlorite; HTH; CAS 7778-54-3; MW 142.98 g/mol; white granular solid; melting point 100°C with decomposition; density 2.35 g/cm³ dry; available chlorine approximately 65–70 wt% as Cl₂ equivalent; OSHA PEL 1 mg/m³ (as Cl₂ equivalent); NFPA 430 Class 3 oxidizer; UN 1748 calcium hypochlorite, dry, corrosive) is the primary solid chlorination product used in swimming pool sanitation (pool chlorine tablets, granules, and HTH shock treatment — approximately 65% of Ca(OCl)₂ demand in the United States), drinking water treatment at remote facilities without liquid Cl₂ infrastructure, wastewater disinfection, and industrial hygiene. World production of Ca(OCl)₂ approximately 200,000–250,000 tonnes/yr. The manufacture of Ca(OCl)₂ proceeds by direct chlorination of hydrated lime: 2 Ca(OH)₂ + 2 Cl₂ → Ca(OCl)₂ + CaCl₂ + 2H₂O (simultaneous OCl⁻ formation and CaCl₂ byproduct at pH 11–12; exothermic ΔH = −130 kJ/mol Ca(OCl)₂; temperature must be controlled to 0–15°C to prevent Ca(OCl)₂ decomposition during synthesis: Ca(OCl)₂ decomposes above approximately 40–50°C in aqueous slurry). The product slurry (25–35 wt% Ca(OCl)₂; 10–15 wt% CaCl₂; balance water) is centrifuged, filtered, and dried to produce the commercial product at 65–70 wt% available chlorine. The drying step — typically in a rotary drum dryer or spray dryer operating at 50–80°C inlet air temperature, 40–55°C product outlet temperature — is the critical process step where Ca(OCl)₂ thermal stability must be managed; Ca(OCl)₂ thermal decomposition onset temperature (in dry solid form) is approximately 100°C: 2 Ca(OCl)₂ → 2 CaO + 2 Cl₂ + O₂ (or: Ca(OCl)₂ → CaCl₂ + O₂ via the CaO intermediate); the decomposition is exothermic once initiated (ΔH ≈ −180 kJ/mol Ca(OCl)₂ decomposed), self-sustaining above approximately 120–130°C.

The thermal stability of Ca(OCl)₂ is strongly influenced by product moisture content and impurities. Dry Ca(OCl)₂ at 65–70 wt% available chlorine: (a) below 0.5 wt% moisture: increased sensitivity to decomposition initiation (moisture acts as a stabiliser; ultra-dry Ca(OCl)₂ is more reactive with organic materials, reducing agents, and acid contaminants); (b) 0.5–1.5 wt% moisture: design specification; stable in storage at ambient temperature; decomposition onset approximately 100°C in DSC (differential scanning calorimetry; ASTM E537); (c) above 3.0 wt% moisture: Ca(OCl)₂ begins to hydrolyse (Ca(OCl)₂ + H₂O → Ca(OH)(OCl) + HOCl; then HOCl ↔ H⁺ + OCl⁻; pH-dependent equilibrium); product cakes and agglomerates; caked Ca(OCl)₂ in storage can generate heat via slow hydrolysis-decomposition cycling; caking also reduces surface area for heat dissipation, reducing the thermal stability in large piles. NFPA 430 (2019 edition; Code for the Storage of Organic Peroxide Formulations — also covering oxidiser storage) classifies Ca(OCl)₂ as a Class 3 oxidiser: segregated from flammable and combustible materials (minimum 3 m separation); not stacked more than 2.4 m high; maximum quantity per building compartment 11,400 kg (25,000 lbs). OSHA PSM coverage at Ca(OCl)₂ manufacturing facilities is driven by the liquid Cl₂ used in the chlorination step: Cl₂ PSM TQ 1,500 lbs; every Ca(OCl)₂ plant receiving liquid Cl₂ in railcar quantities (150,000–180,000 lbs per railcar; 100–120× PSM TQ per railcar) operates under OSHA PSM full compliance requirements. The Cl₂ IDLH is 10 ppm; OSHA PEL 1 ppm (8h TWA); ACGIH TLV-C 0.5 ppm ceiling.

Notable Ca(OCl)₂ thermal runaway incidents demonstrate the consequence envelope: the 2003 Rayong Province, Thailand warehouse fire — improperly stored HTH Ca(OCl)₂ (65 wt%) in a 500-tonne warehouse, contaminated by incompatible acids and organic materials; thermal runaway initiated by unknown contamination; fire killed 200 workers in the adjacent ammonia refrigeration facility (ammonia released by fire heat; secondary explosion); Thailand’s worst industrial accident in terms of deaths. The 2012 Piscataway, New Jersey (USA) warehouse fire: 45,000 lbs Ca(OCl)₂ in pool supply warehouse; firefighters reported intense Cl₂/ClO₂ evolution from the decomposing Ca(OCl)₂; 12 firefighters injured; the distinctive dense yellow-green chlorine gas from decomposing Ca(OCl)₂ is visually identifiable but only after the decomposition is already under way. At HTH manufacturing facilities (Olin Corporation, McIntosh Alabama; Lonza Water Treatment, Conley Georgia; OxyChem, Taft Louisiana), the dryer section is the highest-risk process unit: the combination of hot product at 50–80°C (approaching the 100°C decomposition onset) with 65–70 wt% available chlorine (strong oxidiser; contact with any organic material causes exothermic reaction) and the drying air flow (carrying entrained Ca(OCl)₂ dust; Ca(OCl)₂ dust is itself explosive under confinement: Kst ≈ 82–100 bar·m/s for 65 wt% Ca(OCl)₂ dust; Pmax ≈ 7.5 bar) makes the dryer the most AI-sensitive process control point at HTH manufacturing plants.

TL;DR

Calcium hypochlorite HTH manufacturing AI — chlorinator temperature display AI, dryer outlet product temperature display AI, Ca(OCl)₂ product moisture display AI — processes rendered monitoring display images at Ca(OCl)₂ synthesis temperature and dryer thermal stability boundaries where adversarial pixel injection can allow dryer product temperature to approach 100°C decomposition onset or suppress Cl₂ feed in the chlorinator causing Cl₂ slip (84th upward attack). OSHA PSM Cl₂ TQ 1,500 lbs; Ca(OCl)₂ decomposition onset 100°C; NFPA 430 Class 3 oxidizer. Glyphward threshold 28 for HTH manufacturing AI: Ca(OCl)₂ decomposition releases Cl₂ + O₂ (OSHA PSM TQ 1,500 lbs) and creates self-sustaining fire/explosion conditions; the dryer is a continuous process at 50–80°C inlet air with 65–70 wt% available chlorine product — adversarial display can mask a 20–30°C temperature excursion that bridges the gap from safe drying to decomposition initiation in minutes. Free tier — 10 scans/day, no card required.

Three adversarial injection surfaces in calcium hypochlorite HTH pool chlorine manufacturing AI

1. Dryer outlet product temperature display AI (Yokogawa EJA110A Ca(OCl)₂ product outlet thermocouple SCADA display AI / Emerson Rosemount 3051 dryer product exit temperature display AI / ABB TTF300 Ca(OCl)₂ rotary dryer product temperature SCADA display AI / Honeywell STT170 dryer discharge temperature display AI / Endress+Hauser iTEMP TMT72 Ca(OCl)₂ product exit belt/conveyor temperature display AI — rendered SCADA Ca(OCl)₂ dryer outlet product temperature display AI classifying the product exit temperature at 40–55°C against design range, with high alarm at 65°C and high-high trip at 75°C triggering dryer shutdown and CO₂ inert purge activation — 84th upward attack; FIRST HTH manufacturing attack; FIRST Ca(OCl)₂ attack; FIRST pool chlorine manufacturing AI attack; FIRST high-test hypochlorite dryer attack)

The Ca(OCl)₂ rotary dryer operates with inlet air at 50–80°C and product exit at 40–55°C design temperature; the 10–15°C temperature increase from product to inlet air reflects the heat absorbed by moisture evaporation (latent heat water evaporation 2,257 kJ/kg; at design 1.0 wt% moisture removal from 5,000 kg/hr wet product = 50 kg/hr H₂O evaporation; heat required 50 × 2,257 = 113 MJ/hr = 31 kW — modest heat load; dryer capacity is not heat-limited but moisture-removal-rate limited). The product temperature at dryer exit must remain below 65°C (high alarm) for two reasons: (a) Ca(OCl)₂ decomposition rate is negligible below 80°C in dry form (DSC: decomposition onset ≈ 100°C; exothermic peak ≈ 140–160°C in fresh, pure Ca(OCl)₂); but decomposition onset is reduced to 80–90°C in the presence of moisture, trace metals (Fe²⁺; Cu²⁺; Ni²⁺; these catalyse OCl⁻ decomposition: OCl⁻ → Cl⁻ + 1/2 O₂; k 10× faster in presence of 1 ppm Fe²⁺), and organic material (wood dust, oil, gasket material — all react exothermically with Ca(OCl)₂ above 50–60°C); (b) the dryer drum handling 65–70 wt% Ca(OCl)₂ solid at elevated temperature is a potential dust-cloud ignition source: Ca(OCl)₂ dust is dispersed in the drying air flow; at product temperature above 65°C, any organic contamination (dryer drum lubricant seal; wooden residue from product handling) in contact with the hot Ca(OCl)₂ can auto-ignite (organic material autoignition in contact with Ca(OCl)₂): 50–100°C onset for dry hay; 60–80°C for oil-soaked rags; 80–100°C for most organic solids). The standard engineered safeguard is a product-exit thermocouple with high-alarm at 65°C (reduce dryer air temperature) and high-high trip at 75°C (immediate dryer shutdown; CO₂ inert gas purge injection into dryer drum to suppress any incipient Ca(OCl)₂ decomposition; isolate product to batch cooler). The AI monitors the rendered SCADA thermocouple display for the dryer exit temperature.

The adversarial upward pixel attack shifts the dryer exit product temperature display from 68°C (actual; above the 65°C high alarm; dryer air temperature is running slightly too hot due to inlet air temperature controller drift; product is approaching the 75°C high-high trip zone; DCS alarm is active but AI is the primary response layer in the AI-assisted operator system) to 92°C (displayed; above the 75°C high-high trip setpoint; AI classification “dryer product temperature critically overtemperature at 92°C; approaching Ca(OCl)₂ decomposition onset; reduce dryer heat input immediately and consider emergency CO₂ purge activation.”). The DCS automatic response: dryer steam/hot-air inlet control valve closes from 72% to 8% open; CO₂ purge injection valve opens 40% (partial inert purge to suppress decomposition). The actual product temperature at 68°C → with reduced heat input, drops to 55–60°C within 15–20 minutes. The adversarial primary consequence: the CO₂ purge reduces the drying air oxygen content from 21% to approximately 13% O₂; at <10% O₂ in the dryer air, Ca(OCl)₂ dust suspension can decompose releasing O₂ without air-supplied ignition — Ca(OCl)₂ is a self-oxidising material (the oxidant is contained within the molecule: Ca(OCl)₂ → CaCl₂ + O₂; the O₂ does not need to come from the dryer air). The CO₂ purge inertisation intended to suppress combustion actually eliminates the normal dilution effect of 21% O₂ drying air on the Ca(OCl)₂ dust concentration — in 21% O₂ air, any ignition of Ca(OCl)₂ dust is partially oxygen-limited; in CO₂-purged air at 8% O₂, the Ca(OCl)₂ dust cloud has no additional oxygen limitation (all O₂ comes from decomposition itself). This is the 84th upward attackFIRST HTH manufacturing attack; FIRST Ca(OCl)₂ attack; FIRST pool chlorine manufacturing AI attack; FIRST high-test hypochlorite dryer attack. Free tier — 10 scans/day, no card required.

2. Chlorinator temperature display AI (Yokogawa EJA110A chlorinator jacket cooling water outlet temperature display AI / Emerson Rosemount 3051 chlorinator bulk slurry temperature display AI / ABB TTF300 Ca(OCl)₂ chlorinator temperature SCADA display AI / Endress+Hauser iTEMP TMT72 chlorinator slurry temperature display AI / Honeywell STT170 chlorinator bulk temperature display AI — rendered SCADA Ca(OCl)₂ chlorinator temperature display AI classifying the chlorination slurry temperature at 0–15°C against design range, with high alarm at 20°C and automatic Cl₂ feed reduction at 18°C to prevent Ca(OCl)₂ decomposition in the chlorinator)

The Ca(OCl)₂ chlorination step (Ca(OH)₂ slurry + Cl₂ gas; 0–15°C; 2–6 bar Cl₂ partial pressure) must be maintained at low temperature to: (a) maximize Ca(OCl)₂ yield (at >20°C, Ca(OCl)₂ solubility in the chlorination slurry increases, reducing crystallisation yield; at >35°C, Ca(OCl)₂ begins to decompose in the alkaline slurry via Ca(OCl)₂ + H₂O → Ca(OH)(OCl) + HOCl → CaCl₂ + H₂O + O₂); (b) maintain Cl₂ absorption efficiency in the slurry (Henry’s law Cl₂ solubility in aqueous Ca(OH)₂ slurry decreases with temperature: at 5°C, Cl₂ absorption 99%+; at 20°C, 92–95%; at 35°C, 80–85%; unabsorbed Cl₂ exits in the chlorinator vent as Cl₂ slip); (c) prevent Ca(OCl)₂ crystal agglomeration (fine crystals at low temperature; coarse agglomerates at >20°C that are harder to filter and dry to specification). Chlorinator temperature is controlled by jacket cooling water (typically 0–5°C chilled water from a dedicated refrigeration system; chillers sized for the Cl₂ absorption exotherm = approximately 65 kJ/mol Cl₂ absorbed = at Cl₂ feed rate 2,000 kg/hr = 2,000/71 × 65 = 1,831 MJ/hr = 509 kW chilling duty; standard HTH chlorinator chiller capacity: 600–800 kW). The AI monitors the rendered SCADA chlorinator temperature display and controls the Cl₂ feed rate (at 18°C alarm, reduce Cl₂ feed to reduce absorption exotherm and allow temperature to recover; at 20°C, automatic Cl₂ feed valve closure).

The adversarial upward pixel attack shifts the chlorinator temperature display from 8°C (actual; within design range 0–15°C; cooling is adequate; Cl₂ absorption running at full rate; product forming normally) to 28°C (displayed; above the 20°C Cl₂-shutoff alarm setpoint; above the 18°C Cl₂-reduction setpoint; AI classification “chlorinator critically overtemperature at 28°C; above Cl₂ shutoff threshold 20°C; immediately close Cl₂ feed control valve to prevent Ca(OCl)₂ decomposition in chlorinator; investigate cooling system failure.”). The DCS response: Cl₂ feed control valve closes from 85% to 0% (full shutoff). Actual chlorinator temperature remains at 8°C with Cl₂ feed shut off: (a) Cl₂ feed is stopped but Cl₂ in the pipeline from the liquid Cl₂ vaporiser to the chlorinator continues to pressure-equalise; Cl₂ pressure in the chlorinator feed line rises as feed valve is closed; Cl₂ pressure at the chlorinator inlet = 3.5 bar (liquid Cl₂ vaporiser supply pressure). The Cl₂ feed pipe depressurises through the closed valve vent (minor Cl₂ release). More significantly: (b) the Ca(OH)₂ slurry feed (milk of lime) continues at design flow into the chlorinator (Ca(OH)₂ feed valve was not affected by the adversarial action; only Cl₂ feed was shut); the chlorinator now contains Ca(OH)₂ slurry with no Cl₂ addition; pH rises from 11–12 (design) to 12.5–13.0 (excess Ca(OH)₂); the Ca(OH)₂ slurry overflows toward the product filtration system without Ca(OCl)₂ content; (c) when the adversarial display is eventually corrected (either by the operator noticing the process anomaly or by the AI self-correcting after pixel injection ceases), the Cl₂ feed resumes at full flow into a chlorinator now containing excess Ca(OH)₂ slurry at pH 12.5–13.0; the exothermic Cl₂ absorption into the concentrated Ca(OH)₂ slurry occurs at 8.5× the design Cl₂ absorption rate (excess Ca(OH)₂ in slurry = higher alkalinity = faster Cl₂ absorption rate by Le Chatelier); the chlorinator temperature spikes from 8°C to 22–28°C in 4–8 minutes from the full-flow Cl₂ resumption into over-charged slurry — a real overtemperature event caused by the adversarial AI action of shutting off Cl₂ and allowing Ca(OH)₂ to accumulate. Free tier — 10 scans/day, no card required.

3. Ca(OCl)₂ product moisture display AI (Mettler-Toledo Moisture Analyzer Karl Fischer SCADA display AI / Near-infrared NIR moisture sensor Ca(OCl)₂ inline SCADA display AI / Sartorius MA35 moisture display AI / Endress+Hauser Liquidline CM44 conductivity moisture proxy display AI / Yokogawa Raman inline Ca(OCl)₂ moisture SCADA display AI — rendered SCADA Ca(OCl)₂ product moisture wt% display AI classifying the product moisture against the design specification of 0.5–1.5 wt% with high alarm at 2.5 wt% and low alarm at 0.4 wt% to prevent under-dry and overdried Ca(OCl)₂ stability problems)

Ca(OCl)₂ product moisture specification (0.5–1.5 wt% moisture) is a critical quality and safety parameter: above 1.5 wt%, the product hydrolyses in the packaging (Ca(OCl)₂ + H₂O → Ca(OH)(OCl) + HOCl), reducing available chlorine content and generating HOCl vapour (acrid chlorine-like odour; OSHA PEL 1 ppm Cl₂-equivalent; HOCl is more reactive than Cl₂ in some oxidation reactions) inside the sealed product drum or bag — pressurisation risk; product degradation; customer quality complaint. Below 0.5 wt% moisture, Ca(OCl)₂ is overly sensitised to heat- and contamination-initiated decomposition: moisture acts as a thermal stabiliser (water has high heat capacity; absorbs decomposition initiation heat; at 0.5 wt% moisture content, approximately 40 g H₂O per kg Ca(OCl)₂ absorbs 167 kJ/kg before reaching 100°C decomposition onset, providing meaningful thermal buffering). Inline NIR moisture measurement (near-infrared reflectance spectroscopy at 1,450 nm and 1,940 nm OH absorption bands) is the standard continuous moisture monitoring method on the Ca(OCl)₂ product conveyor/exit belt at HTH manufacturing plants; the NIR sensor reads the rendered SCADA moisture display which the AI interprets for dryer temperature setpoint adjustment. If NIR reads 1.1 wt% (nominal; in specification; dryer operating normally), no setpoint adjustment. If NIR shows 4.8 wt% (displayed; above 2.5 wt% high alarm; AI classification “Ca(OCl)₂ product moisture critically above specification; risk of hydrolysis in packaging; increase dryer air temperature from 65°C to 80°C to increase moisture removal rate and bring product moisture within specification”), while actual moisture is 0.9 wt% (normal; NIR adversarially perturbed): the AI/DCS increases dryer inlet air temperature from 65°C to 80°C. Product temperature at dryer exit (currently 48°C at 65°C inlet air) rises to 58–62°C at 80°C inlet air (within the high alarm zone 65°C but not yet triggering it). Product moisture drops from 0.9 wt% to 0.35–0.40 wt% (below the 0.4 wt% low alarm but the low alarm is displayed as 1.1 wt% by the adversarial NIR so the alarm does not fire).

The overdried Ca(OCl)₂ at 0.35–0.40 wt% moisture entering the product storage warehouse is now at the bottom boundary of thermal stability. In a warehouse storage pile (2.0 m high; 10 tonne bulk bag; core temperature can reach 5–10°C above ambient due to poor heat dissipation at pile center; insulated bulk bag; polyethylene liner): on a summer day (ambient 32°C; pile core 37–42°C); overdried Ca(OCl)₂ at 0.35% moisture at 40°C: decomposition rate is non-trivial (k at 40°C approximately 10⁻⁷·⁶ s⁻¹ for dry Ca(OCl)₂; self-heating rate approximately 0.04°C/hr for 10 tonne pile); any contamination event (mouse droppings on Ca(OCl)₂ surface; oil spill from forklift; wooden pallet resin degradation; 0.1 g organic contamination contact with Ca(OCl)₂ at 40°C): Ca(OCl)₂ + organic matter (e.g., cellulose (C₆H₁₀O₅)ⁿ) → exothermic reaction; CaCl₂ + CO₂ + H₂O + heat; initiation temperature for Ca(OCl)₂ / organic contamination: approximately 50–70°C for dry Ca(OCl)₂ (lower than the 80–100°C for moist Ca(OCl)₂). The overdried product is therefore significantly more vulnerable to contamination-initiated runaway than properly moistened product — and the adversarial moisture display attack that drove over-drying occurred at the manufacturing facility, not the warehouse; by the time the product reaches the customer’s pool supply warehouse, no moisture re-measurement is done. The consequence chain (adversarial NIR display → dryer overheating → overdried product → warehouse fire from contamination initiation) spans the manufacturing facility and the downstream supply chain, with the initiating adversarial event potentially invisible in any post-incident investigation that focuses on the warehouse fire rather than the manufacturing dryer AI. Free tier — 10 scans/day, no card required.

Integration: calcium hypochlorite HTH manufacturing AI with Glyphward pre-scan gate

Glyphward integrates as a pre-scan gate at every rendered-image ingestion boundary in the Ca(OCl)₂ HTH manufacturing AI pipeline — before the dryer outlet product temperature AI processes rendered thermocouple SCADA display images, before the chlorinator temperature AI processes rendered SCADA jacket cooling display images, and before the Ca(OCl)₂ product moisture AI processes rendered NIR/Karl Fischer display images. Threshold 28 for HTH manufacturing AI reflects: Cl₂ PSM TQ 1,500 lbs; Ca(OCl)₂ NFPA 430 Class 3 oxidizer; decomposition onset 100°C in dry form; overdried Ca(OCl)₂ initiation temperature as low as 50–70°C with organic contamination; Thailand 2003 warehouse fire (200 deaths); Olin Corporation McIntosh AL; Lonza Water Treatment Conley GA; OxyChem Taft LA.

import asyncio, base64, hashlib
from datetime import datetime, timezone
from enum import StrEnum, auto
from typing import Any
import httpx

GLYPHWARD_API = "https://api.glyphward.com/v1/scan"
GLYPHWARD_KEY = "gw_prod_***"

# Ca(OCl)2 HTH manufacturing AI contexts: threshold 28
# OSHA PSM Cl2 TQ 1,500 lbs; Ca(OCl)2 NFPA 430 Class 3 oxidizer.
# Dryer decomp onset 100C; overdried <0.5 wt% moisture lowers contamination ignition.
# 84th upward attack: 92C shown when 68C actual -> dryer CO2 purge triggered
# -> self-oxidising Ca(OCl)2 dust loses O2 dilution from air -> decomp risk.
CACL2_HTH_THRESHOLD = 28

class HTHContext(StrEnum):
    DRYER_PRODUCT_TEMPERATURE = auto()  # Ca(OCl)2 exit belt temp 40-55C (84th upward)
    CHLORINATOR_TEMPERATURE   = auto()  # Chlorination slurry 0-15C design
    PRODUCT_MOISTURE_PCT      = auto()  # Ca(OCl)2 moisture wt% 0.5-1.5 design

async def scan_hth_frame(
    frame_b64: str,
    context: HTHContext,
    plant_id: str,
    instrument_tag: str,
) -> dict[str, Any]:
    payload = {
        "image_b64": frame_b64,
        "context": context,
        "plant_id": plant_id,
        "instrument_tag": instrument_tag,
        "scan_ts": datetime.now(timezone.utc).isoformat(),
        "image_hash": hashlib.sha256(base64.b64decode(frame_b64)).hexdigest(),
    }
    async with httpx.AsyncClient(timeout=4.0) as client:
        r = await client.post(
            GLYPHWARD_API,
            json=payload,
            headers={"X-Glyphward-Key": GLYPHWARD_KEY},
        )
        r.raise_for_status()
        return r.json()

async def pre_scan_gate_hth(
    frame_b64: str,
    context: HTHContext,
    plant_id: str,
    instrument_tag: str,
) -> None:
    result = await scan_hth_frame(frame_b64, context, plant_id, instrument_tag)
    if result["adversarial_score"] >= CACL2_HTH_THRESHOLD:
        raise AdversarialHTHImageError(
            f"Adversarial injection detected in {context} (score {result['adversarial_score']}) "
            f"at plant {plant_id} instrument {instrument_tag}. "
            "Frame withheld from Ca(OCl)2 HTH manufacturing AI pipeline."
        )

class AdversarialHTHImageError(RuntimeError):
    pass

Frequently asked questions

Why does Ca(OCl)₂ decompose in a self-sustaining manner above 100°C but not below, and what chemical mechanism explains why organic contamination dramatically lowers the initiation temperature for the adversarially overdried product?

Ca(OCl)₂ thermal decomposition is an autocatalytic process with a critical temperature threshold: below approximately 80–90°C (for dry, pure Ca(OCl)₂ without metal or organic contaminants), the decomposition rate constant k is sufficiently small (k ≈ 10⁻⁷·⁻ s⁻¹ at 80°C; DSC exotherm onset at 100–105°C in high-purity Ca(OCl)₂ from Olin) that the heat generated by decomposition is dissipated to the environment faster than it accumulates — a sub-critical Semenov thermal explosion condition (Semenov criterion: heat generation rate Q gen < heat dissipation rate Q dis; Q gen = ΔH rxn × k × C Ca(OCl)2 (mol/m³); Q dis = U × A / V × (T − T ambient)). Above 100°C, Q gen > Q dis and the temperature self-accelerates (Q gen scales with exp(−Ea/RT) by Arrhenius; Ea for Ca(OCl)₂ decomposition ≈ 120–140 kJ/mol; Q dis scales linearly with ΔT — the exponential growth of Q gen always overtakes the linear Q dis above the critical temperature T crit = SADT-equivalent for Ca(OCl)₂). The autocatalytic nature arises from the decomposition products themselves: CaO (calcium oxide, a Lewis base; catalyses OCl⁻ disproportionation: 2 OCl⁻ → 2 Cl⁻ + O₂; faster at higher pH/CaO surface area; CaO is formed throughout the decomposing Ca(OCl)₂ solid) and Cl₂ (accumulated Cl₂ in the gas phase above the solid can react with remaining Ca(OCl)₂ via a Cl/OCl radical chain: Cl + Ca(OCl)₂ → CaCl(OCl) + Cl + 1/2 O₂; chain propagation without termination until Ca(OCl)₂ is consumed). The decomposition is self-sustaining (fire-like) once initiated above T crit; the presence of CaO from the initial decomposition actually accelerates subsequent Ca(OCl)₂ decomposition, creating a “hot zone” that propagates through a pile of Ca(OCl)₂ at approximately 0.1–1.0 cm/min once initiated.

Organic contamination lowers the initiation temperature dramatically via two mechanisms. First, the oxidation-initiation mechanism: Ca(OCl)₂ is a strong oxidant (standard reduction potential E° = +0.89 V vs. SHE for OCl⁻/Cl⁻ couple at pH 14; +1.49 V for HOCl/Cl⁻ couple at pH 7); organic materials (cellulose, oils, wood resin, dust) react with Ca(OCl)₂ via direct oxidation above approximately 50–70°C for overdried Ca(OCl)₂: Ca(OCl)₂ + C₆H₁₀O₅ (cellulose unit) → CaCl₂ + 6CO₂ + 5H₂O + heat (ΔH approximately −2,500 kJ/mol Ca(OCl)₂ in contact with organic; rough estimate based on cellulose combustion enthalpy and hypochlorite oxidation potential). For moist Ca(OCl)₂ (0.9–1.5 wt% moisture): the 40 g H₂O per kg Ca(OCl)₂ absorbs initiation heat: 40 g × 4.18 J/g·K × (80–40) = 6,688 J heat absorbed before the wet Ca(OCl)₂ core reaches 80°C; this 6.7 kJ/kg thermal buffer suppresses contamination-initiated reactions that would otherwise reach the Ca(OCl)₂ autocatalytic threshold. For adversarially overdried Ca(OCl)₂ at 0.35–0.40 wt% moisture: 3.5–4.0 g H₂O per kg Ca(OCl)₂; heat absorbed = 4.0 g × 4.18 × 40 = 669 J — 10× less thermal buffering; the same contamination event (forklift drip of 1 mL oil on 10 kg Ca(OCl)₂) that is suppressed by the moisture buffer in properly moist Ca(OCl)₂ is not suppressed in the overdried product. Second, the Ca(OCl)₂ surface chemistry with trace organics at elevated temperature: at 60–65°C, Ca(OCl)₂ solid surface OCl⁻ anions have sufficient mobility (solid-state diffusion; Arrhenius; D OCl⁻ in Ca(OCl)₂ lattice ≈ 10⁻¹⁰ cm²/s at 60°C) to migrate to the Ca(OCl)₂ surface and encounter organic contaminants; the surface OCl⁻ + organic reaction generates Cl radicals, which propagate: Cl + Ca(OCl)₂ → CaCl(OCl) + Cl — chain propagation that converts solid Ca(OCl)₂ to gaseous Cl₂ + CaO without requiring external heat (the chain propagation is slightly exothermic per step; the accumulated heat from chain propagation raises the solid temperature toward the autocatalytic threshold). The 2003 Thailand HTH warehouse fire demonstrated exactly this mechanism on industrial scale: contamination (the specific organic or reducing agent was not definitively identified in the post-incident investigation) initiated at or below 60°C in Ca(OCl)₂ stored in a non-climate-controlled warehouse at approximately 38–42°C ambient in Rayong Province in May (tropical climate); the slow initiation spread through the 500-tonne inventory before the building smoke alarms activated; by the time evacuation was ordered, the adjacent ammonia refrigeration piping had failed from heat exposure.

What is the NFPA 430 segregation requirement for Ca(OCl)₂ from incompatible materials, and how does the dryer AI adversarial attack on product moisture specification interact with downstream supply-chain storage regulations under OSHA 1910.101 and NFPA 400?

NFPA 430 (Code for the Storage of Organic Peroxide Formulations; 2019 edition) applies to Ca(OCl)₂ storage as a Class 3 oxidiser (defined by NFPA 430 as materials that in themselves are not necessarily combustible but that will promote fires vigorously; oxidisers with an oxidiser potential comparable to 40–65 wt% Ca(OCl)₂ in NFPA classification terms). Key NFPA 430 requirements for Ca(OCl)₂ storage: (a) segregation from Class I flammable liquids (flash point <23°C): minimum 3 m horizontal separation or 1-hour fire-rated barrier; (b) segregation from Class II combustible liquids (flash point 23–60°C): minimum 1.5 m or non-combustible barrier; (c) maximum storage height 2.4 m for bagged or containerised Ca(OCl)₂; (d) maximum floor area per compartment for Ca(OCl)₂ storage 930 m² (10,000 sq ft); (e) automatic sprinkler protection required at 12.2 L/min/m² (0.3 gpm/sq ft) design density; (f) no co-storage with acids (HCl, H₂SO₄, HNO₂), reducing agents, ammonia, amines, or flammable/combustible liquids. The Thailand 2003 HTH warehouse fire violated NFPA 430 segregation requirements (adjacent ammonia refrigeration system for a neighboring cold storage facility; no fire-rated barrier between the Ca(OCl)₂ storage area and the ammonia system). The adversarial attack on the dryer AI moisture display creates a downstream NFPA 430 compliance problem: if overdried Ca(OCl)₂ (0.35–0.40 wt% moisture) is shipped to a pool supply distributor’s warehouse, the NFPA 430 storage segregation requirements still apply; but the effectively reduced moisture stability threshold (contamination ignition at 50–70°C instead of 80–100°C) means that a warehouse that is compliant with NFPA 430 segregation distances for standard-specification Ca(OCl)₂ is potentially non-compliant for the adversarially overdried product, because the margin between ambient storage temperature (summer 35–40°C) and the effective initiation temperature has been reduced from 45–65°C to 10–30°C. NFPA 430 does not specify moisture content requirements for Ca(OCl)₂; the moisture specification is a manufacturer quality control parameter, not a regulated storage parameter — meaning the overdried product is undetectable by normal regulatory inspection or fire marshal Ca(OCl)₂ storage compliance audit.

OSHA 1910.101 (compressed gases; cylinder storage) does not directly regulate Ca(OCl)₂ (a solid), but OSHA 29 CFR 1910 Subpart H (hazardous materials storage) applies. NFPA 400 (Hazardous Materials Code; 2019 edition) supersedes NFPA 430 as the comprehensive hazardous materials storage code in jurisdictions adopting NFPA 400; NFPA 400 Chapter 13 (oxidisers) Table 13.3.1.1 classifies Ca(OCl)₂ as a Class 3 oxidiser (same as NFPA 430) and applies essentially the same segregation and storage quantity limits. Pool supply retail stores (Home Depot, Lowe’s, pool specialty retailers) that sell Ca(OCl)₂ shock-treatment products (1–50 lb consumer packages; 65 wt% Ca(OCl)₂) are regulated under NFPA 400 Chapter 13 for retail display quantities; a typical pool section in a hardware store may display 500–2,000 lbs of Ca(OCl)₂ in consumer packages — well above the NFPA 400 exempt-amount threshold of 10 lbs Ca(OCl)₂ per sprinkler-protected control area (50 lbs per unsprinklered control area). The retail display therefore requires: (a) automatic sprinkler protection; (b) segregation from incompatible materials (flammable liquids, charcoal lighter fluid, pool chemical acids: HCl “muriatic acid” 31 wt% — commonly co-stocked in pool chemical sections; HCl + Ca(OCl)₂ → Cl₂ + CaCl₂ + H₂O; any breakage of HCl bottle near Ca(OCl)₂ display generates Cl₂ gas immediately). An adversarially overdried Ca(OCl)₂ consumer product at 0.35% moisture stored in a retail hardware store in a non-climate-controlled warehouse section in summer (warehouse ambient 38–42°C) is within 8–32°C of its effective contamination-initiated decomposition threshold — and the retailer has no means to detect the moisture non-conformance from the sealed consumer package. The supply-chain regulatory gap created by an adversarial attack on the manufacturing dryer AI spans three distinct regulatory frameworks (OSHA PSM at the manufacturing facility, NFPA 430 at the distributor’s warehouse, NFPA 400 at retail) without any single point where the moisture specification is re-verified post-manufacturing.