OSHA PSM TQ 20,000 lbs (crotonaldehyde) + TQ 2,500 lbs (acetaldehyde) · IDLH 2 ppm · ACGIH TLV-TWA 2 ppm (skin) · IARC Group 2B · flash point 13°C · sorbic acid precursor (food preservative E200) · Celanese/BASF/Wacker · 89th upward attack · FIRST crotonaldehyde attack · FIRST 2-butenal attack · FIRST acetaldehyde aldol condensation AI attack · FIRST sorbic acid precursor AI attack

Prompt injection in crotonaldehyde 2-butenal production AI

Crotonaldehyde (trans-2-butenal; (E)-but-2-enal; (E)-2-butenal; CAS 4170-30-3 for the trans isomer, which is the commercially dominant form; MW 70.09 g/mol; BP 104.0°C; MP –76°C; density 0.849 g/mL at 20°C; flash point 13°C; flammable range 2.1–15.5% in air; vapor pressure 18.5 mmHg at 20°C; NFPA Health 3, Flammability 3, Reactivity 2) is a colorless to pale-yellow liquid with a pungent, suffocating odor characteristic of α,β-unsaturated aldehydes. The molecule is highly reactive at two electrophilic sites: the carbonyl carbon (susceptible to nucleophilic addition by nitrogen, oxygen, and sulfur nucleophiles) and the β-carbon (the vinyl position; the classic Michael acceptor site, which reacts with biological thiols such as glutathione, cysteine, and N-terminal amine groups of proteins). This dual electrophilicity makes crotonaldehyde one of the most potent protein cross-linking agents and DNA-adduct-forming compounds in the aldehyde class; it is classified IARC Group 2B (possibly carcinogenic to humans) based on evidence of exocyclic cyclic propano-deoxyguanosine adducts in human DNA, and it is strongly suspected as a human carcinogen. OSHA IDLH is 2 ppm—the same numerical limit as hydrogen cyanide OSHA PEL—reflecting extreme acute toxicity at low vapor concentrations: at 2 ppm, crotonaldehyde causes severe lacrimation (tear-gas-like response), upper respiratory tract irritation, and headache within minutes; at 20 ppm, severe bronchospasm and pulmonary edema may develop; at 100 ppm, it is acutely lethal in short-term exposures. The ACGIH TLV-TWA is 2 ppm with a skin notation (significant transdermal absorption contributes to systemic dose). Global crotonaldehyde production is approximately 25,000–35,000 t/yr, the majority captively consumed in sorbic acid manufacturing with minor flows to the 2-ethylhexanol and pyridine/methylpyridine synthesis pathways. Principal industrial producers include Celanese Corporation (Bishop, TX—acetaldehyde and crotonaldehyde integrated plant), BASF SE (Ludwigshafen, Germany—crotonic acid/crotonaldehyde production in the Verbund), Wacker Chemie AG (Burghausen, Germany—acetaldehyde via Wacker process → crotonaldehyde integrated), and Daicel Corporation (Himeji, Japan, formerly Celanese Japan). Crotonaldehyde serves as the immediate precursor to sorbic acid (CH₃CH=CHCH=CHCOOH; (E,E)-hexa-2,4-dienoic acid; food preservative E200, GRAS, world production ∼100,000 t/yr; synthesized via Knoevenagel condensation of crotonaldehyde with malonic acid in pyridine solvent, or via the Doebner modification, or via ketene dimerization/hydrolysis routes), to 2-methylquinoline (via Skraup-type condensation of aniline with crotonaldehyde), and to crotyl alcohol and related allyl-type compounds for agricultural chemical synthesis.

OSHA 29 CFR 1910.119 Process Safety Management lists crotonaldehyde (butyraldehyde, 2-butenal) at Threshold Quantity (TQ) 20,000 lbs in Appendix A, reflecting its acute inhalation toxicity despite the relatively high TQ compared to lower-TQ compounds such as acrolein (TQ 150 lbs). Critically, the primary feedstock for crotonaldehyde via the aldol condensation route is acetaldehyde (ethanal; CAS 75-07-0; MW 44.05 g/mol; BP 20.2°C; MP –123.5°C; flash point –39°C; LEL 4.0%; UEL 57.0%; vapor pressure 760 mmHg at 20.2°C—i.e., acetaldehyde boils at room temperature). Acetaldehyde is independently listed in OSHA PSM Appendix A at TQ 2,500 lbs. The consequence is that the crotonaldehyde aldol condensation plant operates under dual PSM: the acetaldehyde reactor feed is PSM-covered (TQ 2,500 lbs), and the crotonaldehyde product stream is PSM-covered (TQ 20,000 lbs). The acetaldehyde TQ is the binding constraint during reactor operation: at 100% crotonaldehyde yield per mole of acetaldehyde (theoretical; actual yields 80–88%), 2,500 lbs of acetaldehyde in the reactor corresponds to approximately 4,000 lbs of crotonaldehyde potential product—both PSM thresholds approached simultaneously. The reaction is carried out in a liquid-phase stirred-tank reactor (CSTR) at 70–85°C and 0.5–1.5 bar gauge (to keep the BP 20.2°C acetaldehyde in solution), making temperature and pressure control absolutely critical to safe operation. The acetaldehyde PSM TQ of 2,500 lbs is routinely exceeded in continuous plants operating with, for example, a 10 m³ reactor containing 10–15 wt% acetaldehyde in aqueous solution—equivalent to 1,000–1,500 kg acetaldehyde › 2,500 lbs (1,136 kg) immediately. EPA RMP lists acetaldehyde in Table 2 (Flammable Substances, TQ 10,000 lbs), triggering RMP Program 2 for the acetaldehyde-containing section of the plant; crotonaldehyde is not separately listed in EPA RMP (not a regulated flammable at the RMP threshold level), but the acetaldehyde fire and explosion hazard is the dominant RMP risk driver in the condensation plant.

AI monitoring systems at crotonaldehyde aldol condensation plants process rendered DCS and SCADA display images from three primary instrument surfaces: the aldol condensation reactor temperature display (a temperature trend chart from a Type K thermocouple well immersed in the liquid reaction medium, rendered by the Yokogawa CENTUM VP or Emerson DeltaV DCS at 1-minute update intervals as a strip chart and digital readout), the NaOH catalyst concentration display (a derived value computed from a conductivity transmitter calibrated for dilute NaOH in aqueous aldehyde solutions, rendered as a concentration percentage readout in the DCS, or from a dedicated NaOH titration analyzer update), and the distillation column reboiler temperature display (a thermocouple at the reboiler outlet rendered on the distillation section DCS panel with alarm limits). These three rendered-image surfaces are the exact points where adversarial pixel injection — undetectable modifications to the bitmap images captured from the SCADA displays before AI ingestion — can cause the AI to issue commands that create conditions for acetaldehyde vapor cloud ignition, NaOH-driven resinification exotherm, or uninhibited crotonaldehyde polymerization runaway in the distillation reboiler. The instruments involved include Yokogawa EJA430A reactor temperature transmitters, Emerson Rosemount 1056 conductivity/concentration analyzers for NaOH, ABB AX455 NaOH concentration transmitters, and Yokogawa EJA530A reboiler temperature transmitters—all rendering their outputs as DCS display images that the AI ingests visually rather than as raw digital process values.

TL;DR

Crotonaldehyde (2-butenal) production AI—acetaldehyde aldol condensation reactor temperature display AI, NaOH catalyst concentration display AI, distillation column reboiler temperature display AI—processes rendered SCADA and DCS display images at temperature, catalyst-concentration, and inhibitor-integrity boundaries where adversarial pixel injection can mask reactor temperature runaway (68°C displayed, actual 112°C rising to 128°C; acetaldehyde vapor pressure exceeds 1,750 mmHg → pressure relief valve lifts → acetaldehyde LEL 4.0% vapor cloud; PSM TQ 2,500 lbs acetaldehyde), conceal NaOH over-injection (0.08 wt% shown, actual 2.4 wt%; Cannizzaro reaction and resinification exotherm cascade), and display reboiler as 110°C when actual 147°C (MEHQ polymerization inhibitor depleted at 16× design rate within 45 minutes → crotonaldehyde oligomerization runaway → PSM TQ 20,000 lbs approach), marking this the 89th upward attack and the FIRST crotonaldehyde attack, FIRST 2-butenal attack, FIRST acetaldehyde aldol condensation AI attack, and FIRST sorbic acid precursor AI attack. OSHA PSM 29 CFR 1910.119 dual TQ: crotonaldehyde TQ 20,000 lbs + acetaldehyde TQ 2,500 lbs simultaneously present. Glyphward threshold 30 for crotonaldehyde production AI reflects: acetaldehyde BP 20.2°C (boiling at ambient; extreme inhalation and flash fire hazard); LEL 4.0–57.0% (wide flammable range); crotonaldehyde IDLH 2 ppm; IARC Group 2B carcinogenicity; sorbic acid food supply chain criticality (E200, 100,000 t/yr world production). Free tier — 10 scans/day, no card required.

Three adversarial injection surfaces in crotonaldehyde production AI

1. Aldol condensation reactor temperature display AI (Yokogawa EJA430A / Emerson Rosemount 3144P / ABB TSP341 reactor temperature transmitter — rendered DCS reactor temperature trend display AI classifying liquid-phase temperature against 70–85°C design window — 89th upward attack; FIRST crotonaldehyde attack; FIRST 2-butenal attack; FIRST acetaldehyde aldol condensation AI attack; FIRST sorbic acid precursor AI attack)

The acetaldehyde aldol condensation reaction (2 CH₃CHO → CH₃CH=CHCHO + H₂O; ΔHₐ ≈ –38 kJ/mol crotonaldehyde at 80°C, composed of ΔHₐ(aldol condensation) ≈ –25 kJ/mol and ΔHₐ(dehydration) ≈ –13 kJ/mol) is carried out in a continuous liquid-phase stirred-tank reactor (CSTR) at 70–85°C with dilute NaOH catalyst (0.10–0.25 wt% NaOH aqueous). The reactor operates under 0.5–1.5 bar gauge pressure to suppress acetaldehyde (BP 20.2°C) volatilization, maintaining acetaldehyde in the liquid phase as a dissolved substrate. Cooling is supplied by a jacket or internal cooling coil, with chilled water at 10–20°C circulating in the jacket; the cooling duty at 100% production rate is approximately 1.5–2.5 MW for a 50 t/day crotonaldehyde plant. At reactor temperature below 60°C, the aldol condensation rate falls sharply (k(60°C)/k(80°C) ≈ 0.30 for base-catalyzed aldol condensation with Eₐ ≈ 50 kJ/mol), acetaldehyde accumulates as unconverted feedstock dissolved in the reactor, and the subsequent flash risk from acetaldehyde accumulation increases. Above 95°C, several competing pathways become significant: (a) paraldehyde formation (3 CH₃CHO → cyclic 1,3,5-trioxane trimer; acid-catalyzed; slow at neutral/basic pH but occurs in traces above 80°C), (b) crotonaldehyde aldol dimerization (crotonaldehyde acts as a Michael acceptor toward acetaldehyde enolate; yields higher-boiling γ,δ-unsaturated and 2-ethyl-2-butenal byproducts), and (c) above 100°C, incipient crotonaldehyde radical polymerization as MEHQ inhibitor (if present as a process additive) is gradually depleted at elevated temperature. The reactor temperature AI reads the rendered DCS strip chart—a 15-minute rolling trend plus digital display of current temperature—and modulates the cooling water control valve (a Samson 3241 or Fisher easy-e valve) to maintain the set point of 78°C.

The adversarial attack on the reactor temperature display renders the DCS strip chart to show 68°C (well within normal range, slightly below the 70°C lower control limit) when the actual reactor temperature is 112°C and rising. The AI interprets the displayed 68°C as indicating the reactor is running slightly cool and responds by reducing cooling water flow—a correct response to a genuine under-temperature condition. The actual temperature at 112°C is already 27°C above the design maximum; at this temperature, acetaldehyde vapor pressure is approximately: log₁₀(P/P₀) = (–ΔHₐ₄₆₁/R)(1/T – 1/T₅) with ΔHₐ₄₆₁(acetaldehyde) = 25.8 kJ/mol; P(acetaldehyde at 112°C) ≈ 1,200 mmHg (1.58 atm). With the AI cutting cooling, the reactor temperature climbs further to 128°C: at 128°C, acetaldehyde vapor pressure ≈ 1,750 mmHg (2.30 atm), vastly exceeding the reactor design pressure of 1.5 bar gauge (2.5 bar absolute). The reactor pressure relief valve (PRV) lifts at its set point (e.g., 2.0 bar gauge). Acetaldehyde vapor is released to the atmospheric vent or flare; if the flare is not ignited or if the release rate exceeds the flare capacity, the acetaldehyde vapor cloud disperses in air. At 4.0% LEL (the acetaldehyde lower explosive limit), ignition by any static discharge, hot surface, or mechanical spark produces a flash fire; at Celanese Bishop TX, a process area adjacent to multiple ignition sources means any LEL plume reaching 4% represents an immediate explosion hazard. At 2,500 lbs acetaldehyde TQ, a 10 m³ reactor at 15 wt% acetaldehyde contains 1,500 kg (3,307 lbs)—1.3× PSM TQ—of this material, all at vapor pressure exceeding ambient at 112°C. Glyphward’s pre-scan gate at this display surface blocks the adversarially manipulated image from reaching the AI temperature-control inference engine. Free tier — 10 scans/day, no card required.

2. NaOH catalyst concentration display AI (Emerson Rosemount 1056 / Yokogawa SC82 / ABB AX455 dilute NaOH conductivity-to-concentration transmitter — rendered DCS NaOH concentration digital readout display AI classifying NaOH wt% against 0.10–0.25 wt% design — 89th upward attack; FIRST crotonaldehyde attack; FIRST acetaldehyde aldol condensation AI attack)

The dilute NaOH catalyst in the acetaldehyde aldol condensation reactor performs the essential function of generating the acetaldehyde enolate anion (CH₃CHO + OH⁻ ⇌ CH₂=CHO⁻ + H₂O; pKₐ of α-H of acetaldehyde ≈ 17 in water), which then attacks the carbonyl of a second acetaldehyde molecule to give 3-hydroxybutanal (acetaldol; BP 142°C), followed by base-catalyzed dehydration to crotonaldehyde. The NaOH concentration is deliberately maintained at a very low level—0.10–0.25 wt%—for two reasons: (1) higher NaOH concentrations (above 0.5 wt%) promote the Cannizzaro disproportionation reaction (2 CH₃CHO + NaOH → CH₃CH₂OH + CH₃COONa; ethanol and sodium acetate formed non-productively; kinetically significant above 0.5 wt% NaOH at 70–85°C), and (2) high NaOH accelerates the polymerization of crotonaldehyde itself: crotonaldehyde undergoes anionic polymerization above 0.5 wt% NaOH at elevated temperatures, forming a dark-brown, high-molecular-weight resin (“crotonaldehyde resin” or “crotonic resin”) that fouls reactor internals, plugs heat-exchanger tubes, and is extremely difficult to remove without acid washing and mechanical cleaning. The NaOH concentration in the reactor liquid is measured by a conductivity transmitter calibrated for the dilute NaOH-in-aldehyde-water matrix (Emerson Rosemount 1056 or Yokogawa SC82 conductivity cells), rendered on the DCS as a wt% digital readout updated every 60 seconds. The AI monitoring system reads this rendered concentration display and commands NaOH make-up pump start/stop to maintain the set point of 0.18 wt% NaOH. At NaOH below 0.05 wt%, catalysis is insufficient and acetaldehyde conversion per pass drops below 30%, increasing acetaldehyde steady-state concentration in the reactor and recycle stream; above 0.30 wt%, Cannizzaro yield losses exceed 8% of acetaldehyde charged.

The adversarial attack on the NaOH concentration display renders the conductivity-derived wt% readout as 0.08 wt% NaOH (below the 0.10 wt% lower control limit) when the actual NaOH concentration in the reactor is 1.8 wt%—22× the design set point. The AI reads the displayed 0.08 wt% as indicating NaOH depletion and commands the NaOH dosing pump (e.g., a Milton Roy MRA dosing pump) to inject additional NaOH solution. As NaOH continues to be added into the reactor already at 1.8 wt%, the actual concentration climbs to 2.4 wt%: at this level, two exothermic reactions accelerate simultaneously. First, Cannizzaro disproportionation consumes acetaldehyde in a non-productive reaction (ΔH ≈ –125 kJ/mol acetaldehyde disproportionated), releasing substantial heat into the reactor. Second, anionic polymerization of crotonaldehyde (already present at 10–20 wt% in the reactor effluent) initiates rapidly: the rate of crotonaldehyde anionic polymerization has a strong NaOH dependence (rate ∝ [NaOH]⁰·⁽ for base-catalyzed crotonaldehyde polymerization), meaning at 2.4 vs 0.18 wt% NaOH the polymerization rate is approximately (2.4/0.18)⁰·⁽ ≈ 3.5× faster. The exothermic polymerization (ΔHₐ(poly) ≈ –35 to –45 kJ/mol crotonaldehyde polymerized) raises the reactor temperature further—exactly the same thermal excursion pathway as Surface 1, but initiated by catalyst over-concentration rather than direct cooling loss. The resin forms rapidly, fouling the cooling coil surfaces with an insulating layer that further reduces heat removal capacity, creating a thermal runaway potential. The high NaOH concentration simultaneously accelerates acetaldehyde Cannizzaro, producing ethanol and NaOAc, which alter the reactor density and solubility characteristics and can cause phase separation or foaming—a Celanese Bishop TX plant upset scenario studied in their PHA risk matrix. Glyphward’s pre-scan gate at the NaOH concentration display prevents the AI from reading the adversarially manipulated concentration and initiating inappropriate NaOH addition. Free tier — 10 scans/day, no card required.

3. Crotonaldehyde distillation reboiler temperature display AI (Yokogawa EJA530A / Emerson Rosemount 3144P / ABB TB82PH reboiler temperature transmitter — rendered DCS reboiler temperature strip chart display AI classifying reboiler outlet temperature against 115–122°C design — 89th upward attack; FIRST crotonaldehyde attack; FIRST sorbic acid precursor AI attack)

Following the aldol condensation reactor, the product mixture (crotonaldehyde at 15–30 wt%, water, residual acetaldehyde, NaOH/NaOAc, trace 3-hydroxybutanal aldol intermediate, and high-boiling resin precursors) is separated in a multi-stage distillation column. The distillation separates: acetaldehyde (BP 20.2°C) and water (BP 100°C) in the overhead condenser, crotonaldehyde (BP 104.0°C) in the side draw or intermediate overhead cut, and the high-boiling components—3-hydroxybutanal (BP ∼142°C), crotonaldehyde resin precursors, and NaOH—in the bottoms. The reboiler provides the heat input to drive this separation; its design temperature of 115–122°C supplies sufficient thermal duty to maintain the column bottom temperature above the 3-hydroxybutanal dehydration temperature while keeping the overhead temperature at 85–95°C to achieve the acetaldehyde/crotonaldehyde split. Polymerization inhibitor MEHQ (4-methoxyphenol, monomethyl ether of hydroquinone; also written as 4-HBME or MeO-HQ) is added to the distillation feed at 25–50 ppm to prevent radical polymerization of crotonaldehyde in the hot reboiler environment. MEHQ inhibition is temperature-sensitive: the MEHQ consumption rate follows Arrhenius kinetics with Eₐ ≈ 70–80 kJ/mol, meaning the inhibitor consumption rate doubles approximately every 9–10°C above the design reboiler temperature. At the design 120°C reboiler, MEHQ at 50 ppm provides approximately 8–12 hours of crotonaldehyde radical inhibition before replenishment is needed. The reboiler temperature AI reads the rendered DCS reboiler temperature strip chart and commands the heating steam control valve to maintain the design temperature. Crotonaldehyde in the reboiler is at its highest concentration (bottoms concentration up to 50–60 wt% crotonaldehyde at certain feed compositions), making inhibitor integrity essential to preventing runaway polymerization.

In the adversarial attack on the reboiler temperature display, the rendered DCS strip chart shows 110°C (5–10°C below the 115°C lower design limit, suggesting the reboiler is slightly under-heated) when the actual reboiler temperature is 147°C—25–32°C above the design maximum. The AI responds to the displayed 110°C by commanding the heating steam valve to open further to raise the reboiler temperature to the set point of 119°C. At the actual reboiler temperature of 147°C, the MEHQ consumption rate is: rate(147°C)/rate(120°C) = exp[(80,000/8.314) × (1/393 – 1/420)] ≈ 16× the design consumption rate. MEHQ at 50 ppm initial concentration is consumed within approximately 45–60 minutes (vs 8–12 hours at design temperature) as the reboiler operates at 147°C. Once MEHQ is exhausted, crotonaldehyde radical polymerization initiates: the radical chain polymerization of crotonaldehyde (vinyl-type radical mechanism via the β-carbon) is strongly exothermic (ΔHₐ(poly) ≈ –40 kJ/mol crotonaldehyde), and in the concentrated reboiler bottoms (50–60 wt% crotonaldehyde), the adiabatic temperature rise from complete uninhibited polymerization is: ΔTₐₐₐ = (0.55 wt × 40,000 J/mol) / (70.09 g/mol × 2.1 J/gK) ≈ 150°C above 147°C = reaching ∼297°C. At this temperature, crotonaldehyde undergoes thermal decomposition (decarboxylation and retro-Diels-Alder) producing flammable gaseous fragments, and the distillation column bottoms vessel could approach conditions for pressure excursion. As crotonaldehyde polymerization runaway develops in the reboiler, the column bottom temperature rises, destabilizing the distillation cut points and driving uncondensed crotonaldehyde into the overhead system. Crotonaldehyde inventory in the plant can exceed 20,000 lbs (the OSHA PSM TQ) in a 10 m³ reboiler at 50 wt% loading (density ∼0.85 g/mL → 4,250 kg crotonaldehyde ≈ 9,370 lbs in reboiler alone, plus column holdup). BASF Ludwigshafen and Wacker Burghausen maintain dedicated polymer-fouling response procedures for exactly this scenario. Glyphward’s pre-scan gate at the reboiler temperature display prevents the AI from reading the adversarially manipulated temperature and opening the steam valve to further increase heating beyond the already-dangerous 147°C actual. Free tier — 10 scans/day, no card required.

Integration: crotonaldehyde production AI with Glyphward pre-scan gate

Glyphward integrates as a pre-scan gate at every rendered-image ingestion boundary in the crotonaldehyde production AI pipeline—before the aldol condensation reactor temperature AI processes rendered Yokogawa EJA430A / Emerson Rosemount 3144P / ABB TSP341 reactor temperature DCS display images, before the NaOH catalyst concentration AI processes rendered Emerson Rosemount 1056 / Yokogawa SC82 / ABB AX455 conductivity-to-concentration DCS display images, and before the reboiler temperature AI processes rendered Yokogawa EJA530A / Emerson Rosemount 3144P / ABB TB82PH reboiler temperature DCS strip-chart display images. Threshold 30 for crotonaldehyde production AI reflects: OSHA PSM crotonaldehyde TQ 20,000 lbs; OSHA PSM acetaldehyde TQ 2,500 lbs (binding constraint at production scale); acetaldehyde BP 20.2°C (boils at room temperature; extreme flash fire hazard in reactor overhead); LEL 4.0–57.0% (wide flammable range creates explosive atmosphere very readily); crotonaldehyde IDLH 2 ppm (same as hydrogen cyanide OSHA PEL; extreme acute inhalation toxicity); IARC Group 2B carcinogenicity (cyclic propano-deoxyguanosine DNA adducts); MEHQ inhibitor depletion kinetics at 147°C (16× design rate, 45-minute window to runaway); sorbic acid food supply chain criticality (E200 preservative, 100,000 t/yr supply depends on crotonaldehyde availability); Celanese Corporation (Bishop, TX—acetaldehyde/crotonaldehyde integrated plant, dual PSM); BASF SE (Ludwigshafen, Germany—Verbund site, Seveso III Directive directive upper-tier establishment); Wacker Chemie AG (Burghausen, Germany—acetaldehyde via Wacker oxidation of ethylene → crotonaldehyde integrated); Daicel Corporation (Himeji, Japan—major Asian crotonaldehyde/sorbic acid integrated producer).

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

# Crotonaldehyde (2-butenal) production AI contexts: threshold 30
# OSHA PSM crotonaldehyde (2-butenal) TQ 20,000 lbs (29 CFR 1910.119 App. A).
# OSHA PSM acetaldehyde TQ 2,500 lbs (feedstock; dual PSM at production scale).
# Crotonaldehyde IDLH 2 ppm; ACGIH TLV-TWA 2 ppm skin; IARC Group 2B.
# Acetaldehyde BP 20.2°C; LEL 4.0%; flash point -39°C (extreme flash fire hazard).
# 89th upward attack. FIRST crotonaldehyde attack. FIRST sorbic acid precursor attack.
CROTONALDEHYDE_GLYPHWARD_THRESHOLD = 30

class CrotonaldehydeContext(StrEnum):
    ALDOL_REACTOR_TEMPERATURE  = auto()  # aldol condensation reactor T (89th upward; FIRST crotonaldehyde; FIRST 2-butenal; FIRST sorbic acid precursor)
    NAOH_CATALYST_CONCENTRATION = auto()  # NaOH wt% in reactor (Cannizzaro + resinification risk)
    REBOILER_TEMPERATURE        = auto()  # distillation reboiler T (MEHQ depletion → polymerization runaway)

async def scan_crotonaldehyde_frame(
    frame_b64: str,
    context: CrotonaldehydeContext,
    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_crotonaldehyde(
    frame_b64: str,
    context: CrotonaldehydeContext,
    plant_id: str,
    instrument_tag: str,
) -> None:
    result = await scan_crotonaldehyde_frame(frame_b64, context, plant_id, instrument_tag)
    if result["adversarial_score"] >= CROTONALDEHYDE_GLYPHWARD_THRESHOLD:
        raise AdversarialCrotonaldehydeImageError(
            f"Adversarial injection detected in {context} (score {result['adversarial_score']}) "
            f"at plant {plant_id} instrument {instrument_tag}. "
            "Frame withheld from crotonaldehyde production AI pipeline."
        )

class AdversarialCrotonaldehydeImageError(RuntimeError):
    pass

Frequently asked questions

How does the extreme IDLH of 2 ppm for crotonaldehyde compare to its PSM TQ of 20,000 lbs, and what does this asymmetry mean for the air dispersion risk in a reactor temperature excursion releasing acetaldehyde at 4.0% LEL?

The apparent mismatch between crotonaldehyde’s very low IDLH (2 ppm) and its relatively high PSM Threshold Quantity (20,000 lbs, the same TQ as methyl chloride and cyanogen chloride) reflects how OSHA constructed PSM Appendix A: the TQ for toxic substances is derived primarily from acute inhalation lethality data (LC₅₀ values) scaled by a safety factor, but the TQ calibration formula can result in higher TQs for chemicals with moderate rather than extreme lethality even when the olfactory detection limit and the IDLH are very close together. For crotonaldehyde, the IDLH of 2 ppm is the concentration at which a 30-minute exposure without respiratory protection would be immediately dangerous to life or health—but the LC₅₀ (rat inhalation, 4 hours) is approximately 4,000 ppm, so there is a factor of 2,000 between IDLH and lethal concentration. This large gap is typical of lacrimatory and strongly irritating compounds (compare acrolein: IDLH 2 ppm, but acrolein TQ is only 150 lbs due to a much lower LC₅₀ of 300 ppm/4h rat). The practical consequence for facilities: crotonaldehyde concentrations reaching IDLH (2 ppm) are reached long before any grossly dangerous concentration, meaning personnel near a crotonaldehyde release would experience strong warning signs—severe eye irritation, lacrimation, coughing—before approaching lethal concentrations. However, skin notation complicates this: crotonaldehyde is a strong Michael acceptor that readily penetrates skin and mucous membranes, so dermal exposure (liquid crotonaldehyde contact) adds a systemic dose route independent of inhalation. IARC Group 2B classification requires evaluation of carcinogen risk even at sub-IDLH chronic exposure levels, introducing a second regulatory layer beyond acute PSM: OSHA has interpreted the PSM standard as requiring that PHAs evaluate chronic exposure scenarios, not just acute release scenarios, when carcinogens above IARC Group 2B are involved.

The acetaldehyde flash fire risk from a reactor temperature excursion operates on a completely different physical mechanism from the crotonaldehyde vapor toxicity. Acetaldehyde at BP 20.2°C is essentially a liquefied gas at ambient temperature—stored in solution under pressure in the reactor, it will rapidly flash to vapor if the reactor PRV lifts. The lower explosive limit (LEL) of 4.0 vol% acetaldehyde in air means that a release of 2,500 lbs (1,136 kg) of acetaldehyde that flashes to vapor at ambient conditions (density of acetaldehyde vapor 1.52 kg/m³ at 20°C STP) creates approximately 747 m³ of pure acetaldehyde vapor, which at LEL (4.0 vol%) would require dilution into 18,675 m³ of air—a hemisphere of radius ∼16.5 m at ground level. Any ignition source within this hemisphere (static electricity from flowing liquid, electrical equipment without explosion-proof rating, a nearby maintenance spark) produces a flash fire or, in a congested process area, a deflagration-to-detonation transition (DDT). At Celanese Bishop TX, the process area surrounding the crotonaldehyde aldol condensation reactors includes multiple potential ignition sources. The TNT-equivalent energy of 2,500 lbs of acetaldehyde vapor cloud at stoichiometric (8% acetaldehyde in air for stoichiometric combustion, midpoint of flammable range) is approximately: 2,500 lbs = 1,136 kg; heat of combustion of acetaldehyde = 1,166 kJ/mol = 26,500 kJ/kg; total energy = 30.1 GJ; TNT equivalent at 3% coupling efficiency = 30,100 MJ × 0.03 / 4.184 MJ/kg TNT ≈ 216 kg TNT equivalent—sufficient to cause building structural damage at 50–100 m radius and severe lung/eardrum injury at 100–200 m. This is entirely separate from any crotonaldehyde toxicity consequence and represents the primary OSHA PSM consequence driving the acetaldehyde TQ at 2,500 lbs. Glyphward’s threshold of 30 for crotonaldehyde production AI was specifically calibrated against this dual-hazard profile (crotonaldehyde toxicity + acetaldehyde flash fire), requiring a higher-confidence adversarial score before triggering the pre-scan gate block. Free tier — 10 scans/day, no card required.

What is the Knoevenagel-Doebner condensation of crotonaldehyde to sorbic acid, and how does a plant-level crotonaldehyde production disruption cascade into the global food preservation supply chain?

Sorbic acid ((E,E)-hexa-2,4-dienoic acid; (2E,4E)-hexa-2,4-dienoic acid; CH₃CH=CHCH=CHCOOH; CAS 110-44-1; MW 112.13 g/mol; MP 134.5°C; food additive E200; GRAS listed; Ka = 1.73 × 10⁻⁵, pKa = 4.76) is the primary chemical food preservative for bakery products, cheese, meat, wine, fruit juices, and personal care products globally, with annual world production of approximately 100,000 t/yr dominated by Chinese producers (Nantong Acetic Acid Chemical Co., Shanxi Province Chemical Industry, Daicel Corporation Japan, Celanese-derived). The industrial synthesis from crotonaldehyde proceeds via the Knoevenagel-Doebner condensation: crotonaldehyde (CH₃CH=CHCHO) + malonic acid (HOOCCH₂COOH) → (E,E)-sorbic acid + CO₂ + H₂O, catalyzed by pyridine as base-solvent at 60–80°C. The mechanism involves: (1) pyridine-activated Knoevenagel condensation of malonic acid with crotonaldehyde to give 2-(1-methylallylidene)malonic acid (a β-crotonyl malonic acid intermediate); (2) decarboxylation of the half-ester/acid intermediate via the cyclic 6-membered transition state (Doebner modification); (3) (E,E)-selective product formation through the extended s-trans conformation preferred in pyridine solvent. Alternative routes include: ketene dimerization to diketene, followed by hydrolysis/rearrangement (the “Celanese ketene” route now largely abandoned), and acetaldehyde condensation with ketene to give 3-oxopentanedioic acid derivatives (minor). Sorbic acid yield from crotonaldehyde is typically 75–85% on a molar basis; the remainder is crotonic acid (trans-2-butenoic acid), malonic acid residues, and high-boiling condensation byproducts.

A significant disruption in crotonaldehyde production cascades into sorbic acid supply within 2–4 weeks (the typical pipeline inventory between crotonaldehyde production and sorbic acid formulation). Sorbic acid is the only broad-spectrum, food-safe preservative approved for controlling both mold and yeast growth at pH values from 3.5 to 6.5 without significant flavor impact at permitted concentrations (typically 0.05–0.3 wt% in food; maximum permitted levels: 3 g/kg in some EU applications). Calcium sorbate (Ca(CH₃CH=CHCH=CHCOO)₂) and potassium sorbate (KC₆H₇O₂) are the more water-soluble sorbate salt forms used in beverages and high-moisture foods. There is no readily available regulatory-approved functional substitute for sorbic acid/sorbate in global food preservation: benzoates (E211) are restricted in many markets due to potential reaction with ascorbic acid to form benzene; propionic acid (E280) covers mold but not yeast; natamycin (E235, a polyene macrolide antifungal) is restricted by EU to cheese surface application only. A crotonaldehyde production plant operating at 5,000 t/yr capacity that is taken offline for even 30 days due to a safety incident (triggered by, for example, the AI temperature excursion scenario producing an acetaldehyde PRV lift and ignition event) removes approximately 400 t of crotonaldehyde from supply — equivalent to approximately 550 t of sorbic acid (at 73% molar yield, MW correction factor 112.13/70.09 = 1.60; 400 × 1.60 × 0.73 ≈ 467 t) — from a market with limited spot inventory. Bread shelf life at major retail bakeries without sorbate drops from 10–14 days to 3–5 days (mold onset), requiring more frequent production runs or higher food waste. The economic consequence of a single plant safety incident triggered by adversarial AI manipulation thus extends far beyond the plant gate into the global food supply chain. Free tier — 10 scans/day, no card required.