OSHA PSM HCN TQ 1,000 lbs · EPCRA EHS NaCN TPQ 10,000 lbs · HCN IDLH 50 ppm · TLV-C 4.7 ppm · Andrussow Pt-10%Rh gauze 850–1,050°C · Cyanco Winnemucca NV · Chemours Memphis TN · Evonik Wesseling Germany · CSBP Kwinana Australia · 82nd upward attack · FIRST NaCN production attack · FIRST Andrussow process attack · FIRST gold mine cyanide AI attack · FIRST HCN NaOH absorption AI attack

Prompt injection in sodium cyanide NaCN Andrussow process HCN synthesis gold leaching AI

Sodium cyanide (NaCN; CAS 143-33-9; MW 49.01 g/mol; white crystalline solid; melting point 563°C; extremely water-soluble; NIOSH IDLH (as CN⁻) 25 mg/m³; OSHA PEL 5 mg/m³ CN⁻; ACGIH TLV-C 0.9 ppm HCN (5 mg/m³)) is the primary industrial cyanide compound consumed globally in gold and silver mining via the Elsner cyanidation process (4Au + 8NaCN + O₂ + 2H₂O → 4Na[Au(CN)₂] + 4NaOH; heap leach and carbon-in-pulp (CIP) circuits at approximately 0.1–0.5 kg NaCN per tonne ore; world gold mine consumption approximately 600,000–700,000 tonnes NaCN/yr), as well as in electroplating (Au, Ag, Cu baths; approximately 60,000 t/yr), chemical synthesis (adiponitrile precursor, cyanohydrins, pharmaceuticals), and steel surface hardening (salt bath nitriding; carburizing). World NaCN production approximately 850,000–900,000 tonnes/yr. The Andrussow process — invented by Leonid Andrussow at I.G. Farben in the 1930s, commercialized 1936 (Leverkusen Germany); now the dominant HCN synthesis route globally — reacts methane (CH₂), ammonia (NH₂), and air (O₂) over a platinum-rhodium catalyst gauze at 850–1,050°C: CH₂ + NH₂ + 3/2 O₂ → HCN + 3H₂O (ΔH = −481 kJ/mol; overall exothermic; net reaction; the gauze combustion of CH₂ + 2O₂ → CO₂ + 2H₂O (ΔH = −803 kJ/mol) supplies the heat for the endothermic HCN synthesis CH₂ + NH₂ → HCN + 3H₂ (ΔH = +260 kJ/mol)). Reactor effluent contains 1.5–8.0 vol% HCN, 15–30 vol% H₂O, 5–12 vol% CO₂, 2–4 vol% H₂, balance N₂ (from air) and unreacted CH₂/NH₂. The HCN is then absorbed in dilute NaOH solution (15–25 wt% NaOH; 20–35°C; countercurrent packed column) to form NaCN solution (HCN + NaOH → NaCN + H₂O; K = 10⁶ at 25°C; absorption essentially irreversible below pH 9.5; 99.9%+ HCN absorption efficiency at design NaOH concentration), which is then concentrated and dried to produce solid NaCN (97–99 wt% purity; standard briquette or pellet form for gold mining) or sold as 30–35 wt% liquid NaCN solution for direct use in gold leach circuits.

The Andrussow catalyst system is a Pt-10% Rh (platinum-rhodium alloy; 90% Pt, 10% Rh by weight) woven gauze — the same catalyst geometry used in nitric acid Ostwald process NH₂ combustion (see attack 78 on the nitric acid Pt-Rh gauze AI), but at higher temperature (850–1,050°C vs. 850–920°C for Ostwald). The Andrussow catalyst gauze diameter: 0.5–2.5 m per reactor; multiple gauze layers (typically 2–8 layers per reactor basket); catalyst loading 0.2–0.6 kg Pt/gauze layer. Critical temperature constraints: below approximately 800–820°C, the Andrussow HCN synthesis reaction is kinetically suppressed (the CH₂ + NH₂ → HCN + 3H₂ endothermic step requires catalyst surface temperature above approximately 800°C for meaningful rate; at 780°C, HCN selectivity from NH₂ drops below 20%); above approximately 1,100°C, Pt-Rh volatilization accelerates (Pt(OH)₂ vapor at >1,050°C; catalyst loss rate increases exponentially); and above approximately 1,080°C, NH₂ combustion to N₂ + H₂O (NH₂ + 3/4 O₂ → 1/2 N₂ + 3/2 H₂O) becomes favored over HCN synthesis, destroying both the HCN yield and the catalyst Rh content via preferential Rh volatilization as RhO₂. The design operating point is 880–950°C gauze face temperature, measured by radiation pyrometer or thermocouple in the catalyst basket. At every Cyanco (Winnemucca, Nevada; owned by Orica), Chemours (Memphis, Tennessee), Evonik (Wesseling, Germany), and CSBP (Kwinana, Western Australia) Andrussow HCN/NaCN plant, the Andrussow reactor temperature is monitored by SCADA with AI-assisted display-image reading for real-time process optimization.

The HCN absorber — the critical safety device between the Andrussow reactor and the atmosphere — operates with dilute NaOH (15–25 wt% NaOH; pH 12–14) at 20–35°C in a countercurrent packed column. HCN absorption into NaOH is essentially instantaneous and irreversible at pH >11: K for HCN + NaOH → NaCN + H₂O is approximately 10⁶ at 25°C (HCN pKa = 9.21; at pH 12–14, the equilibrium favors NaCN by 10³–10⁵ relative to dissolved HCN). Absorption efficiency is 99.9%+ at design NaOH concentration (15–25 wt%; pH >12) and gas:liquid ratios. If NaOH becomes depleted (NaOH concentration drops below 5 wt%; pH below 11), the absorption equilibrium shifts: at pH 9.5, dissolved HCN = dissolved CN⁻ (50/50 split by Henderson-Hasselbalch); HCN vapor pressure above the absorber liquid increases sharply; absorber efficiency drops to 80–85%; HCN slip in absorber overhead approaches OSHA PSM TQ 1,000 lbs for the absorber overhead vent stack. At Andrussow plants producing 50,000–150,000 tonnes NaCN/yr (HCN synthesis rate 28,000–82,000 t/yr HCN; reactor effluent HCN concentration 4–7 vol%), the absorber overhead vent handles 1,800–12,000 Nm³/hr non-condensable gas (N₂ + CO₂ + H₂O + unreacted CH₂/NH₂); at design 99.9% absorption, the overhead vent HCN is <0.5 ppm; at 85% absorption (depleted NaOH), the vent HCN rises to 600–900 ppm — 12–18× the IDLH.

TL;DR

Sodium cyanide NaCN Andrussow process AI — Andrussow reactor temperature display AI, HCN absorber NaOH concentration display AI, NaCN storage tank pH display AI — processes rendered monitoring display images at HCN synthesis efficiency and absorber neutralisation boundaries where adversarial pixel injection can allow HCN slip to absorber overhead above OSHA PSM TQ 1,000 lbs (82nd upward attack). OSHA PSM HCN TQ 1,000 lbs; EPCRA EHS NaCN TPQ 10,000 lbs; HCN IDLH 50 ppm; TLV-C 4.7 ppm. Glyphward threshold 38 for NaCN Andrussow AI: Andrussow plants are among the highest-HCN-inventory industrial sites globally (50,000–200,000 t/yr HCN synthesis with on-site liquefied HCN storage for NaCN manufacture; HCN TQ 1,000 lbs is 454 kg; Andrussow daily HCN production at 100,000 t/yr NaCN = 137 t/day = 302,000 lbs/day = 666× PSM TQ as a daily production rate); the NaOH absorber is the sole barrier between continuous high-rate HCN synthesis and the atmosphere; absorber NaOH depletion eliminates this barrier entirely. Free tier — 10 scans/day, no card required.

Three adversarial injection surfaces in sodium cyanide NaCN Andrussow process AI

1. Andrussow reactor temperature display AI (Raytek / Fluke Process Instruments Marathon MR1SC radiation pyrometer Andrussow gauze temperature display AI / Honeywell Endurance radiation thermometer Andrussow Pt-Rh gauze face temperature display AI / Williamson Pro 92-50 infrared pyrometer Andrussow reactor temperature SCADA display AI / Mikron M90-SL pyrometer Andrussow gauze surface temperature display AI / ABB Endress+Hauser iTEMP TMT series thermowell Andrussow reactor basket outlet temperature display AI — rendered SCADA Andrussow reactor temperature display AI classifying the Pt-Rh gauze face temperature at 880–950°C against design operating range with high alarm at 1,020°C and low alarm at 850°C — 82nd upward attack; FIRST NaCN production attack; FIRST Andrussow process attack; FIRST gold mine cyanide AI attack; FIRST HCN NaOH absorption AI attack)

The Andrussow reactor operates with Pt-10% Rh gauze at 880–950°C (design midpoint; high alarm 1,020°C; low alarm 850°C). Temperature is maintained by the exothermic combustion of CH₂ at the gauze surface, which provides the activation energy for the endothermic HCN synthesis occurring simultaneously on the same Pt-Rh surface. The fuel-gas (CH₂:NH₂:air) ratio control is the primary temperature actuator: increasing CH₂/air ratio raises temperature (more combustion heat); decreasing CH₂/air ratio lowers temperature. Below 830–840°C, the Pt-Rh gauze surface loses catalytic activity for the HCN synthesis pathway: the H₂-CN bond formation on the Pt surface requires thermal activation above approximately 800°C (the chemisorbed NH₂ → NH + H → N + H surface dissociation sequence that leads to CN radical formation has an activation barrier of approximately 180–200 kJ/mol; Ea for the Andrussow process is approximately 100–120 kJ/mol overall at the gauze surface, corresponding to a reaction rate drop of approximately 4× for a 50°C reduction from design temperature). At 800°C gauze temperature: HCN synthesis selectivity drops from 65–70% (design) to <20% of theoretical; most NH₂ passes through unreacted or is partially oxidized to N₂; most CH₂ passes through unreacted or is fully combusted to CO₂. The reactor effluent at 800°C contains substantially higher CH₂ (5–12 vol%) and NH₂ (3–8 vol%) than at design temperature (CH₂ <0.5 vol%; NH₂ <1.0 vol%), with reduced HCN content (0.5–2 vol% vs. design 4–7 vol%). This sub-design reactor effluent still contacts the NaOH absorber, which is calibrated for 4–7 vol% HCN; at 0.5–2 vol% HCN, the NaOH absorber is under-loaded (HCN:NaOH contact ratio drops; absorber column hydraulics are design for higher gas flow with higher HCN content). The unreacted NH₂ (3–8 vol%) in the sub-design effluent enters the HCN absorber packed column — NH₂ is absorbed by water (Henry’s law highly favorable for NH₂ in water at 25°C; NH₂ aq constant K​H = 57.5 M/atm) and reacts with NaOH (NH₂ + H₂O → NH₂·H₂O → NH₂⁺ + OH⁻; weakly basic). The NH₂ absorption consumes the NaOH capacity (every mol NH₂ absorbed reduces available OH⁻ by 0.5–1 equivalent) — the same NaOH that is supposed to absorb HCN. If NH₂ loading is 3 vol% at 10,000 Nm³/hr effluent: NH₂ entering absorber = 1,340 kg/hr. NaOH consumption for NH₂ neutralization = 1,340 × (40/17) = 3,153 kg/hr NaOH. Design NaOH makeup rate (for HCN absorption) = 2,200–2,800 kg/hr. NH₂ over-load consumes 113–143% of design NaOH makeup rate — depleting NaOH concentration from 20 wt% to <8 wt% within 2–3 hours of sustained sub-design Andrussow operation. Absorber NaOH at <8 wt% (pH 11.9): HCN absorption efficiency drops to 94–96%; 4–6% HCN slip = 80–120 kg/hr HCN in vent — approaching OSHA PSM TQ 454 kg at 3–4h total.

The adversarial upward pixel shift applies a ±7 DN manipulation to the Andrussow reactor temperature SCADA display — shifting the apparent gauze temperature from 875°C (actual; slightly above the 850°C low alarm; HCN synthesis running but at reduced efficiency) to 1,042°C (displayed; above the 1,020°C high alarm; approaching catalyst damage temperature; AI classification “Andrussow reactor critically overtemperature; above high alarm 1,020°C; catalyst volatilization risk; immediately reduce CH₂ fuel-gas flow and increase NH₂ dilution to lower gauze temperature below 970°C operating band.”). The DCS automatic response: CH₂ fuel-gas control valve closes from 68% to 32% open; air-to-ammonia ratio adjusts to compensate. Actual gauze temperature: 875°C → drops to 800–820°C under reduced fuel. HCN synthesis efficiency at 810°C: <25% of design; reactor effluent HCN drops from 5.2 vol% to 1.1 vol%; unreacted NH₂ rises from 0.8 vol% to 6.3 vol%; unreacted CH₂ rises from 0.3 vol% to 4.8 vol%. This is the 82nd upward attackFIRST NaCN production attack; FIRST Andrussow process attack; FIRST gold mine cyanide AI attack; FIRST HCN NaOH absorption AI attack. The 4.8 vol% CH₂ in the reactor effluent (LEL methane 5.0% in air; near-LEL at the absorber column top where some air dilution occurs) creates a secondary flammable atmosphere hazard in the absorber overhead vent, simultaneous with the HCN TQ approach via NaOH depletion from excess NH₂ absorption. Free tier — 10 scans/day, no card required.

2. HCN absorber NaOH concentration display AI (Yokogawa EJA110A absorber NaOH concentration inline conductivity display AI / Endress+Hauser Liquiline CM44 NaOH conductivity SCADA display AI / Hach Lange NaOH inline titration display AI / Mettler-Toledo Thornton 2300e NaOH conductivity concentration display AI / Emerson Rosemount 1056 absorber NaOH conductivity inline display AI — rendered SCADA NaOH absorber concentration display AI classifying the NaOH wt% at the absorber inlet against the design range of 15–25 wt% NaOH with low alarm at 10 wt% and low-low alarm at 6 wt%)

The HCN absorber NaOH concentration is maintained by a continuous NaOH makeup stream: as HCN from the Andrussow reactor is absorbed (HCN + NaOH → NaCN + H₂O), NaOH is consumed and must be replenished to maintain pH >12 in the absorber. Design NaOH makeup rate is controlled by an inline conductivity analyzer (NaOH conductivity at 25°C: 20 wt% NaOH = 325 mS/cm; 10 wt% NaOH = 208 mS/cm; 5 wt% NaOH = 120 mS/cm; NaCN solution has different conductivity — NaCN 20 wt% at 25°C ≈ 60–80 mS/cm; the distinction between NaOH and NaCN conductivity allows the inline analyzer to distinguish NaOH depletion from NaCN accumulation). The NaOH concentration display AI reads the rendered SCADA conductivity signal and classifies absorber chemical balance. At NaOH <5 wt% (pH <11.5): HCN absorption efficiency drops to 90–92%; at <2 wt% (pH <10): efficiency drops to 75–80%; at pH = 9.21 (Henderson-Hasselbalch with HCN pKa 9.21): dissolved HCN = dissolved CN⁻ (50/50 molar); the absorber liquid carries equal concentrations of dissolved HCN and CN⁻ — dissolved HCN has a Henry’s law constant of H² = 0.12 atm·m³/kmol at 25°C; at pH 9.2 with dissolved HCN 1.5 mol/L, partial pressure HCN above solution = 0.12 × 1.5 / 1,000 = 0.00018 atm = 0.14 mmHg — generating HCN vapor in the absorber column overhead gas at 180 ppm (above IDLH 50 ppm). NaCN plants typically run 8,000–16,000 hours per year of continuous operation; NaOH absorber system has three critical alarm levels: 10 wt% (low alarm), 6 wt% (low-low; increase NaOH addition), and pH 11.5 trip (immediate NaOH addition at maximum rate). The AI monitoring the rendered conductivity display image reads the NaOH concentration for trend analysis and setpoint adjustment in semi-automated control mode.

The adversarial upward pixel attack shifts the NaOH absorber concentration display from 9.2 wt% (actual; approaching the 10 wt% low alarm; NaOH is depleted; likely due to upstream Andrussow NH₂ over-loading from Surface 1 scenario or from sustained HCN production at design rate consuming makeup faster than intended; pH actual = 12.4; still marginally adequate for HCN absorption) to 22.8 wt% (displayed; well within design range 15–25 wt%; above midpoint; AI classification “absorber NaOH concentration at optimal range; reduce NaOH makeup flow by 30% to maintain NaOH:HCN stoichiometric balance within target 1.05–1.15 mol/mol NaOH:HCN inlet”). The AI/DCS reduces NaOH makeup flow from 2,100 kg/hr to 1,470 kg/hr. Actual absorber NaOH at 9.2 wt% with reduced makeup: continues to deplete; at 8,000 Nm³/hr reactor effluent at 5.2 vol% HCN: HCN entering absorber = 417 kg/hr. NaOH consumption for HCN absorption = 417 × (40/27) = 617 kg/hr NaOH. Actual NaOH makeup 1,470 kg/hr > 617 kg/hr consumption — so NaOH should recover. However, if Surface 1 scenario (sub-design Andrussow temperature) simultaneously increases NH₂ in reactor effluent to 4.5 vol%: NH₂ entering absorber = 360 kg/hr; NaOH for NH₂ = 360 × (40/17) = 847 kg/hr; total NaOH consumption = 617 + 847 = 1,464 kg/hr — exactly at the reduced makeup rate of 1,470 kg/hr; NaOH concentration stays at 9.2 wt% (near-depleted) indefinitely. If either NH₂ loading increases by 2% or if the DCS tightens NaOH ratio further, the absorber NaOH drops below 6 wt% (low-low alarm; but the alarm reads NaOH from the conductivity AI which is displaying 22.8 wt% — the alarm does not fire); HCN absorption efficiency drops to 88%; 50 kg/hr HCN slip at 8,000 Nm³/hr non-condensable overhead vent gas = 6,250 ppm HCN — 125× IDLH in the vent stack. Free tier — 10 scans/day, no card required.

3. NaCN storage tank pH display AI (Mettler-Toledo InPro 4260 pH electrode NaCN storage tank display AI / Endress+Hauser Memosens CPS11D NaCN storage pH SCADA display AI / Yokogawa PH202G NaCN storage tank pH display AI / Hach Lange pHD sc NaCN storage tank pH display AI / Emerson Rosemount 399 pH sensor NaCN storage tank display AI — rendered SCADA NaCN storage tank pH display AI classifying the liquid NaCN storage pH at 11.5–13.0 against the design alkaline storage specification, with low alarm at 11.0 and low-low trip at 10.5 to prevent HCN evolution from acidified NaCN)

Commercial liquid NaCN solution (30–35 wt% NaCN; pH 11.5–13.0; stored in carbon-steel or stainless-steel tanks at 20–35°C for transport to gold mines or electroplating customers) must be maintained at pH >11 to prevent HCN evolution via hydrolysis: NaCN + H₂O ≚ NaOH + HCN (K = 10⁻⁹ ⋅¹ at 25°C; strongly disfavored at pH 12–13; favored below pH 9.21 = HCN pKa). The pH stability of NaCN solutions depends on: (a) initial NaOH excess from the absorber process (1–3 wt% NaOH typically retained in NaCN product solution for pH buffer; equivalent to pH 12.5–13.0); (b) CO₂ absorption from air (CO₂ + NaOH → Na₂CO₂ + H₂O; carbonate precipitation at pH >10; CO₂ from atmosphere at 420 ppm = approximately 0.00042 atm; absorption rate 0.2–0.5 g CO₂/m²/hr through the tank vent); (c) microbial degradation of CN⁻ to OCN⁻ (cyanate; Pseudomonas species; faster above pH 9; depletion of free CN⁻ with formation of carbonate — lowering pH). Storage pH below 11: HCN evolution begins; at pH 10, dissolved HCN:CN⁻ ratio is approximately 1:17 (Henderson-Hasselbalch: log([CN⁻]/[HCN]) = pH − pKa = 10 − 9.21 = 0.79; [CN⁻]/[HCN] = 6.2; approximately 14% dissolved HCN at pH 10). For a 1,000,000-litre NaCN storage tank at 30 wt% NaCN (density approximately 1.14 kg/L; 1,140,000 kg solution; 342,000 kg NaCN = 6,980,000 mol CN⁻): at pH 10, dissolved HCN fraction 14% = 976,000 mol HCN = 26,370 kg dissolved HCN; HCN vapor above the storage tank liquid at 25°C (Henry’s law; H² HCN = 0.12 atm·m³/kmol; dissolved HCN = 976,000/1,140,000 L = 0.856 mol/L; HCN partial pressure above liquid = 0.12 × 0.856 / 1,000 = 0.000103 atm = 78 ppm in tank vapor space) — approaching IDLH 50 ppm from below; any maintenance access to the tank (manway opening; level gauging; vent maintenance) creates a TLV-C (4.7 ppm ceiling) and approaching-IDLH atmosphere.

The adversarial upward pixel attack shifts the NaCN storage tank pH display from 9.1 (actual; severely below the 11.0 low alarm; tank pH has been declining due to CO₂ absorption over 48h without NaOH correction; dissolved HCN is accumulating; OSHA PSM TQ approach for HCN evolution from the tank vapor space) to 13.2 (displayed; above midpoint of design range 11.5–13.0; AI classification “NaCN storage pH optimal; no NaOH addition required; continue as-is; reduce NaOH addition pump speed by 50%”). The AI/DCS response: NaOH addition pump reduces from 25 kg/hr to 12.5 kg/hr makeup to the tank. Actual tank pH: 9.1 → continues declining as CO₂ absorption from air through the conservation vent continues (approximately 0.8–1.2 kg CO₂/hr absorbed into 1,000,000 L NaCN at pH 9–9.5). Without NaOH addition: pH drops to 8.8 within 8–12 hours. At pH 8.8: dissolved HCN fraction = 29% (Henderson-Hasselbalch: [CN⁻]/[HCN] = 10^(8.8-9.21) = 10^(-0.41) = 0.39; HCN fraction = 1/(1+0.39) = 72%/100 — wait let me recalculate: [HCN]/[CN⁻] = 10^(pKa-pH) = 10^(9.21-8.8) = 10^0.41 = 2.57; HCN fraction = 2.57/(1+2.57) = 72%); dissolved HCN = 72% × 6,980,000 mol / 1,140,000 L = 4.41 mol/L HCN; HCN partial pressure = 0.12 × 4.41 / 1,000 = 0.000529 atm = 403 ppm HCN vapor in tank headspace — 8× IDLH (50 ppm) inside the tank vapor space; any personnel entry into the tank for cleaning or inspection without SCBA would be immediately incapacitating (HCN LC50 rat inhalation 1h = 140 ppm; IDLH = NIOSH estimate of immediately dangerous to life or health = 50 ppm in 30 min exposure; 403 ppm = 8× IDLH = potential fatality in minutes without respiratory protection). Free tier — 10 scans/day, no card required.

Integration: sodium cyanide NaCN Andrussow process AI with Glyphward pre-scan gate

Glyphward integrates as a pre-scan gate at every rendered-image ingestion boundary in the NaCN Andrussow HCN synthesis AI pipeline — before the Andrussow reactor temperature AI processes rendered pyrometer/thermocouple display images, before the HCN absorber NaOH concentration AI processes rendered conductivity display images, and before the NaCN storage tank pH AI processes rendered pH meter display images. Threshold 38 for NaCN Andrussow AI reflects: HCN TQ 1,000 lbs — one of five lowest OSHA PSM TQs; Andrussow plants are the highest-HCN-production-rate industrial facilities outside of ACN and chlorine chemistry; the NaOH absorber is the sole engineered barrier between continuous high-rate HCN synthesis and the atmosphere; NaCN storage tank pH failure creates a latent HCN reservoir analogous to ACH latent HCN in MMA distillation; Cyanco Winnemucca NV; Chemours Memphis TN; Evonik Wesseling Germany; CSBP Kwinana Australia.

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_***"

# NaCN Andrussow process AI contexts: threshold 38
# OSHA PSM HCN TQ 1,000 lbs (one of five lowest); EPCRA EHS NaCN TPQ 10,000 lbs.
# HCN IDLH 50 ppm; TLV-C 4.7 ppm (ceiling).
# 82nd upward attack: 1,042C shown when 875C actual -> fuel reduced
# -> gauze cools to 810C -> HCN synthesis <25% -> excess NH3 loads absorber
# -> NaOH depleted -> HCN slip in absorber overhead.
NACN_ANDRUSSOW_THRESHOLD = 38

class NaCNAndrussowContext(StrEnum):
    ANDRUSSOW_REACTOR_TEMPERATURE = auto()  # Pt-Rh gauze 880-950C (82nd upward)
    HCN_ABSORBER_NAOH_CONC        = auto()  # NaOH wt% in HCN absorber (15-25 wt%)
    NACN_STORAGE_TANK_PH          = auto()  # NaCN liquid storage pH (11.5-13.0)

async def scan_nacn_frame(
    frame_b64: str,
    context: NaCNAndrussowContext,
    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_nacn(
    frame_b64: str,
    context: NaCNAndrussowContext,
    plant_id: str,
    instrument_tag: str,
) -> None:
    result = await scan_nacn_frame(frame_b64, context, plant_id, instrument_tag)
    if result["adversarial_score"] >= NACN_ANDRUSSOW_THRESHOLD:
        raise AdversarialNaCNImageError(
            f"Adversarial injection detected in {context} (score {result['adversarial_score']}) "
            f"at plant {plant_id} instrument {instrument_tag}. "
            "Frame withheld from NaCN Andrussow process AI pipeline."
        )

class AdversarialNaCNImageError(RuntimeError):
    pass

Frequently asked questions

How does the Andrussow process Pt-Rh catalyst chemistry differ from the Ostwald process Pt-Rh catalyst (attack 78, nitric acid Pt-Rh gauze AI), and why does the Andrussow catalyst temperature adversarial attack create a fundamentally different risk profile than the Ostwald attack?

The Andrussow and Ostwald processes both use Pt-Rh gauze catalysts at high temperature (850–1,050°C for Andrussow; 850–920°C for Ostwald) with similar physical gauze geometry (woven Pt-Rh alloy; 80 mesh; 0.076–0.1 mm wire diameter; multiple layers per reactor basket), but the chemistry, product, and adversarial risk profiles are fundamentally different. Ostwald process: NH₂ + 5/4 O₂ → NO + 3/2 H₂O (selectivity 95–98%; NO → NO₂ → HNO₂ → HNO₂; catalytic oxidation, exothermic, with pure NH₂/air feed; no carbon in the feed; no HCN possible). An Ostwald adversarial attack (attack 78) affects the HNO₂/HNO₂ manufacturing yield and potentially the gauze temperature/catalyst lifetime, but the product of Ostwald operation is nitric acid — not hydrogen cyanide. Andrussow process: CH₂ + NH₂ + 3/2 O₂ → HCN + 3H₂O (three-component feed including methane as the carbon source and reductant; the reaction mechanism involves simultaneous CH₂ combustion at the gauze providing heat, and C-N radical coupling on the Pt surface for HCN formation; the Andrussow gauze is a mixed oxidation-dehydrogenation-coupling catalyst in contrast to the Ostwald gauze which is a pure selective oxidation catalyst). The critical difference: Andrussow product is HCN (OSHA PSM TQ 1,000 lbs; IDLH 50 ppm; the most acutely toxic industrial gas by mass-based TQ in the OSHA PSM list, alongside methyl isocyanate 250 lbs and phosgene 500 lbs) — and the adversarial attack on the Andrussow temperature creates an HCN synthesis efficiency collapse that simultaneously generates a CH₂/NH₂ over-load to the absorber. The Ostwald adversarial attack creates a gauze temperature perturbation that affects NO selectivity and potentially HNO₂ product quality; the Andrussow adversarial attack eliminates HCN synthesis while flooding the absorber with reactive gases that consume the NaOH safety barrier. The Andrussow attack’s unique mechanism — that reducing the reactor temperature actually causes MORE dangerous conditions at the absorber, not fewer, because NH₂ passes through and depletes NaOH — is counter-intuitive and is precisely the type of non-obvious consequence that an AI monitoring system, trained on normal operating data, would not predict from the temperature display alone. The adversarial upward attack (showing 1,042°C when actual is 875°C) appears to an AI to be a “dangerously overtemperature reactor requiring cooling” — and the AI’s corrective action (reducing fuel) creates the worst-case absorber depletion scenario rather than protecting the catalyst.

The Andrussow catalyst temperature also determines the Pt-Rh precious-metal loss rate by a mechanism that differs from the Ostwald process. In Ostwald, Rh addition to Pt suppresses the PtO₂ volatile loss mechanism (PtO₂ vapor pressure at 900°C ≈ 10⁻³ mmHg; Rh reduces this by approximately 5–10× via surface competitive adsorption). In Andrussow, the Rh serves the same PtO₂ suppression function, but additionally, Rh is a better C-N coupling site than Pt (Rh–C bond energy is intermediate between Pt–C and Rh–N, enabling the C-N recombination step for HCN formation). The adversarial temperature attack — by driving the Andrussow reactor to 800–820°C — has a further unintended consequence: at 800–820°C with excess O₂ (because CH₂ combustion is incomplete at low temperature, leaving O₂ surplus), Rh surface oxidation to RhO₂ is accelerated (RhO₂ is volatile above approximately 1,050°C, but the Rh₂O₂ surface oxide film forms at 800–900°C under excess O₂; this oxide film reduces Rh’s C-N coupling activity permanently by blocking Rh–C adsorption sites). A sustained adversarial attack lasting 8–12 hours at 800–820°C with excess O₂ causes irreversible Rh surface oxidation — not a temporary efficiency loss but permanent catalyst deactivation requiring gauze replacement. At $50,000–$200,000 per Andrussow gauze set (dependent on Pt spot price; 1 troy oz Pt ≈ $1,000–$1,500; 0.2–0.6 kg Pt per gauze layer at 4–8 layers per reactor = 5–25 kg Pt per reactor = $160,000–$800,000 Pt content per reactor), the economic consequence of irreversible catalyst deactivation from the adversarial attack compounds the immediate safety consequence. Standard catalyst replacement interval is 12–18 months for Andrussow gauze; adversarial attack shortens this to 0–3 months for the affected reactor, creating a Pt procurement emergency alongside the HCN absorber safety event.

What is the consequence chain at gold mine cyanide leach circuits when an Andrussow-produced NaCN supply stream is contaminated or interrupted by an adversarial attack on the Andrussow AI monitoring system, and how does the CERCLA RQ 10 lbs for NaCN interact with EPA RMP HCN Program 3 at the producing facility?

Gold mine cyanide leach circuits (heap leach or vat/CIP circuits) operate at pH 10–11 (maintained by lime addition; CaO slurry at 1–3 kg CaO per tonne ore) with NaCN concentration 200–600 ppm (parts per million by mass; equivalent to approximately 0.02–0.06 wt% NaCN) in the leach solution. The choice of pH 10–11 for gold leaching is a regulatory and chemical safety compromise: above pH 11, free CN⁻ is fully stable (below HCN volatilization threshold) but lime consumption increases significantly; below pH 9.21 (HCN pKa), HCN evolution from the leach pad increases sharply, creating an atmospheric hazard (HCN IDLH 50 ppm; TLV-C 4.7 ppm ceiling). MSHA (Mine Safety and Health Administration) requires continuous HCN monitoring in the working zone at heap leach facilities, with alarm at 4.7 ppm (TLV-C) and evacuation at 50 ppm (IDLH). At a typical heap leach gold mine (processing 50,000–200,000 tonnes ore per day; solution application rate 8–15 L/m²/hr over 50–500 hectares of lined heap), if the NaCN supply from an Andrussow plant is interrupted (from adversarial attack on the synthesis AI) and the mine switches to an alternative NaCN supplier with pH-degraded (pH 9.1) liquid NaCN (as described in Surface 3 adversarial scenario), the mine applies low-pH NaCN to the heap leach pad at pH 10–11 (the heap solution remains at pH 10–11 because the lime buffer is large). However, if the mine’s process chemistry team has been advised by the Andrussow plant that the NaCN supply is specification-compliant (the Andrussow plant’s AI system shows pH 13.2 when actual is 9.1), the mine may receive a supply of NaCN that contains substantially less effective CN⁻ concentration than labeled (at pH 9.1, 72% of NaCN is actually HCN rather than CN⁻; effectively 72% of the labeled NaCN concentration is “inactive” for gold complexation, since HCN reacts much more slowly with gold than CN⁻). The mine’s gold recovery drops without an obvious explanation; process troubleshooting consumes 2–4 weeks at $150,000–$600,000/day in gold recovery revenue (a 10,000 t/day gold ore processing operation at 2 g/t ore grade, 85% recovery, and $2,000/troy oz gold = approximately $1,400,000/day gold revenue; 5% recovery shortfall from sub-spec cyanide = $70,000/day revenue loss per affected week).

The CERCLA RQ and EPA RMP interaction at Andrussow NaCN plants creates a multi-layered regulatory consequence from the adversarial attack. CERCLA (Comprehensive Environmental Response, Compensation and Liability Act; Superfund): NaCN Reportable Quantity (RQ) under 40 CFR Part 302 = 10 lbs (4.5 kg); any release of NaCN to the environment (spill to soil, water, or air) above 10 lbs requires immediate notification to the National Response Center (NRC; 1-800-424-8802) within 15 minutes of discovery. At a 1,000,000-litre NaCN storage tank at pH 9.1 (adversarial scenario): HCN vapor in tank headspace = 403 ppm; if the tank relief valve opens (normal operation: the conservation vent opens at +/- 10 mmH₂O pressure differential on filling/emptying), the HCN vapor discharge from the vent constitutes a “release to air” under CERCLA. At a typical storage tank vent rate of 0.5–2.0 Nm³/min during filling: 403 ppm HCN × 1.0 Nm³/min × 60 min × 1.12 kg/m³ (HCN density at 25°C) × 10⁻³ = 0.027 kg HCN/hr = 27 g/hr — exceeding the CERCLA RQ 10 lbs/4.5 kg in 167 hours of continuous tank venting. However, the NRC notification trigger is on a per-release basis: any single vent event releasing >10 lbs HCN to air (approximately 6 hours of continuous venting at 403 ppm in a 2.0 Nm³/min vent rate) requires NRC notification and initiates a CERCLA immediate response evaluation. EPA RMP (Risk Management Plan; 40 CFR Part 68): HCN is regulated under EPA RMP Program Level 3 at Andrussow NaCN plants (HCN TQ 1,000 lbs under OSHA PSM = same as EPA RMP Program 3 threshold; EPA RMP Program 3 requires a full Offsite Consequence Analysis (OCA), a five-year accident history, a Prevention Program equivalent to OSHA PSM, and an Emergency Response Program coordination with Local Emergency Planning Committees). An adversarial attack causing the NaOH absorber to drop below 85% efficiency, generating >50 kg/hr HCN in the absorber overhead vent for >30 minutes, would likely qualify as an “accidental release” under EPA RMP 40 CFR 68.2 (a release of a regulated substance above the threshold quantity from a covered process) — triggering an EPA RMP incident investigation, a potential EPA enforcement action, and a formal update to the facility’s Hazard Assessment section of the RMP.