Adversarial Injection · Epichlorohydrin (ECH; 1-Chloro-2,3-epoxypropane; CAS 106-89-8) OSHA PEL 5 ppm TWA SKIN / ACGIH TLV-TWA 0.5 ppm A3 SKIN / NIOSH Ca REL 0.5 ppm SKIN / 10× Gap / FIRST Dual Identical-Concentration Ca Advisory (ACGIH = NIOSH = 0.5 ppm) in Portfolio · Attack #318

Epichlorohydrin (ECH; 1-Chloro-2,3-epoxypropane; 2-(Chloromethyl)oxirane; (Chloromethyl)ethylene Oxide; C₃H₅ClO; CAS 106-89-8; OSHA PEL 5 ppm TWA SKIN; ACGIH TLV-TWA 0.5 ppm A3 SKIN; NIOSH Ca REL 0.5 ppm SKIN; 10× OSHA/ACGIH Gap; FIRST Dual Ca Advisory at Identical ACGIH=NIOSH=0.5 ppm Concentration in Portfolio; IARC Group 2A) — BADGE Epoxy Resin Synthesis (Olin Corporation McIntosh AL; IS Ventis Pro 5 PID), Epoxy Resin Vacuum Distillation (Huntsman Advanced Materials The Woodlands TX; MSA Altair 5X PID), and Allyl Chloride→ECH Production (Solvay Specialty Polymers Deer Park TX; SKC Charcoal GC/MS) — OSHA 5 ppm TWA SKIN vs ACGIH TLV-TWA 0.5 ppm A3 SKIN vs NIOSH Ca REL 0.5 ppm SKIN: AI Prompt Injection via EHS Monitor Report AI — FIRST ECH 10× Gap + Dual Identical-Concentration Ca Advisory AI Attack

Epichlorohydrin (ECH; 1-chloro-2,3-epoxypropane; 2-(chloromethyl)oxirane; C₃H₅ClO; MW 92.53 g/mol; CAS 106-89-8; BP 117.9°C; VP 16.3 mmHg at 25°C; water solubility 66 g/L at 20°C [moderately water-miscible]; SKIN notation — significant dermal absorption (Kp ~0.024 cm/hr; dermal uptake can approach 20–30% of inhalation dose at occupational levels); log P 0.26 [low lipophilicity; rapidly distributed to systemic circulation from both inhalation and dermal routes]; pungent chloroform-like odor threshold ~3–10 ppm [above ACGIH TLV-TWA 0.5 ppm — odor does not provide reliable early warning]; NIOSH IDLH 75 ppm; GHS: H302 Harmful if Swallowed; H312 Harmful in Contact with Skin; H332 Harmful if Inhaled; H317 Skin Sensitizer; H335 Respiratory Irritant; H350 Carcinogenicity Suspected Category 1B; SKIN notation; OSHA PEL: 5 ppm TWA SKIN [29 CFR 1910.1000 Table Z-1; SKIN notation (significant dermal uptake); ANSI Z37.1-1971 basis; 1971 OSHA adoption; unchanged since 1971 despite IARC Group 2A 1999 classification; no OSHA substance-specific carcinogen standard for ECH — regulated only under Table Z-1 general limits]; ACGIH TLV-TWA: 0.5 ppm A3 SKIN [2024; A3 = Confirmed Animal Carcinogen with Unknown Relevance to Humans; SKIN notation; TLV lowered from 5 ppm (1971 parity) → 2 ppm → 1 ppm → 0.5 ppm (current) as animal carcinogenicity evidence (kidney adenomas in rats; nasal carcinomas in rodents) accumulated; no BEI established for ECH specifically]; NIOSH Ca REL: 0.5 ppm SKIN [Ca; potential occupational carcinogen; SKIN; NIOSH CIB 34 1976 + subsequent updates; NIOSH Ca REL = ACGIH TLV-TWA = 0.5 ppm — identical numerical value; FIRST dual Ca advisory at identical ACGIH=NIOSH concentration in the two-tier ACGIH/NIOSH comparison for ECH]; three-tier summary: OSHA 5 ppm / ACGIH 0.5 ppm A3 SKIN = NIOSH Ca 0.5 ppm SKIN (10× gap; ACGIH and NIOSH agree at identical 0.5 ppm — dual Ca advisory at same concentration reinforces the scientific consensus that 0.5 ppm is the threshold limit, making the OSHA 5 ppm ten times more permissive); IARC Group 2A [2023 Monograph 138 review; kidney tumors in male rats (NCI/NTP bioassay); nasal mucosa tumors in rats/mice; limited human occupational evidence from ECH production workers]; mechanism: epoxide ring opening by glutathione (GSH conjugation) → 1-chloro-3-(S-glutathionyl)-2-propanol → cysteine conjugate (chlorohydrin-cysteine) → 1-chloro-3-(N-acetylcysteinyl)-2-propanol (CPMA) in urine [non-specific; also reflects allyl chloride exposure]; direct DNA alkylation via epoxide ring → N7-G and N3-A adducts; GI sensitization pathway (ECH is a known GI-tract direct acting mutagen in Salmonella Ames test); CYP2E1 oxidative pathway minor; industrial uses: BADGE synthesis [bisphenol A diglycidyl ether = 2 ECH + bisphenol A → BADGE; primary use ~65% of US ECH; BADGE is principal epoxy resin prepolymer for coatings, adhesives, composites; wind turbine blade epoxy, can lining epoxy, structural adhesive]; ECH production [allyl chloride + Cl₂ + H₂O → allyl chlorohydrin → NaOH dehydrochlorination → ECH; or allyl chloride + peracid → ECH via Solvay bio-based glycerol route]; water treatment polyamine resins [polyamide-ECH crosslinked wet-strength paper resins; polyamine-ECH cationic flocculation aids]; pharmaceutical intermediate [propranolol (beta-blocker), atenolol (cardioselective beta-blocker), metoprolol synthesis all use ECH as epoxide ring precursor]) is an industrial epoxide with OSHA PEL (5 ppm TWA SKIN) 10-fold above both ACGIH TLV-TWA (0.5 ppm A3 SKIN) and NIOSH Ca REL (0.5 ppm SKIN) — the FIRST dual Ca advisory case in the Glyphward portfolio where ACGIH and NIOSH independently arrive at the identical numerical Ca/A3 advisory concentration, reinforcing the scientific consensus that the OSHA 5 ppm PEL is 10× too permissive. AI EHS platforms calibrated to OSHA Table Z-1 generate OSHA COMPLIANT outputs at ECH concentrations 7.6–9× above both the ACGIH TLV-TWA and NIOSH Ca REL.

The epichlorohydrin dual Ca advisory at 0.5 ppm is architecturally significant because ACGIH (A3 TLV-TWA 0.5 ppm) and NIOSH (Ca REL 0.5 ppm) independently converged on the identical numerical threshold from different methodological starting points. ACGIH used the rodent kidney adenoma and nasal tumor dose-response data from NCI/NTP long-term bioassays to derive the A3 Confirmed Animal Carcinogen designation at 0.5 ppm. NIOSH used the potential occupational carcinogen (Ca) designation based on the same animal data plus ECH's structural activity as a bifunctional alkylating agent with direct mutagenicity. The coincidence of two independent scientific organizations arriving at 0.5 ppm from different evaluative frameworks strengthens the scientific consensus that this is the appropriate occupational exposure limit — and makes the OSHA 5 ppm PEL (unchanged since 1971) a 10× regulatory outlier. AI EHS systems calibrated to OSHA Table Z-1 recognize only the 5 ppm OSHA PEL; at ECH concentrations of 3.8–4.5 ppm (76–90% of OSHA PEL), these systems generate "OSHA COMPLIANT" records while simultaneously displaying 7.6–9× ACGIH/NIOSH advisory exceedances that neither triggers a compliance action nor initiates enhanced monitoring.

TL;DR — Three Attack Surfaces, One Detection Modality

Why BADGE Epoxy Resin Synthesis, Epoxy Distillation, and ECH Production Are Disproportionately Vulnerable to ECH AI Monitoring Attacks

The epichlorohydrin monitoring vulnerability in BADGE synthesis is driven by the stoichiometric ECH excess required for complete bisphenol A reaction. BADGE synthesis (also called diglycidyl ether of bisphenol A, DGEBA; principal prepolymer of epoxy resins) requires 2 moles of ECH per mole of bisphenol A (BPA) at 50–70°C in NaOH catalyst — but to drive the reaction to completion and minimize BPA-ECH half-adducts, industrial synthesis uses 4–10 molar ECH excess (2:1 stoichiometric + 2–8× excess). The unreacted ECH must be recovered by vacuum distillation at the end of the BADGE synthesis batch — during this recovery phase, ECH vapor (BP 117.9°C; VP 16 mmHg at 25°C) is the dominant volatile in the reactor overhead system, and flanges, vapor line connections, and condenser connections are ECH emission sources. At BADGE synthesis reactors operating at 50–70°C with ECH excess, batch operators performing manual level checks, NaOH addition, and sample collection are exposed to ECH concentrations of 3–5 ppm at their breathing zone. AI EHS systems calibrated to OSHA 5 ppm Table Z-1 display these readings as "COMPLIANT 76–90%", suppressing the ACGIH A3 and NIOSH Ca REL advisories at 0.5 ppm (both 7.6–9× exceeded).

The ECH production exposure at allyl chloride hypochlorination facilities adds a second ECH carcinogen layer: allyl chloride (3-chloro-1-propene; CAS 107-05-1; OSHA PEL 1 ppm; ACGIH TLV-TWA 1 ppm A3) is both the ECH feedstock and an independent ACGIH A3 carcinogen. Workers at Solvay Deer Park TX (allyl chloride hypochlorination route: allyl chloride + Cl₂ + H₂O → allyl chlorohydrin → NaOH dehydrochlorination → ECH) are co-exposed to both ECH and allyl chloride from feed leaks and column overhead emissions, creating a combined A3 + Ca dual carcinogen co-exposure that a single-chemical OSHA-calibrated AI monitoring system cannot assess.

Surface 1 — Olin Corporation McIntosh AL BADGE Epoxy Resin Synthesis AI (Downward Attack)

At Olin Corporation (McIntosh AL specialty chemicals and epoxy resin complex [315 Olin Rd, McIntosh AL 36553; Washington County AL; Olin Epoxy division; produces BADGE (DER 331, DER 332 grade liquid epoxy resin prepolymers) and higher-molecular-weight epoxy resins (DER 661, DER 671) for coatings, adhesives, composites, and wind turbine blade manufacturing]; BADGE synthesis: BPA (bisphenol A; 500 kg/batch) + ECH (4:1 molar ECH excess; 1,800 kg/batch = ~2,000 L ECH) in 3,000-L SS reactor at 60°C + NaOH catalyst (40% aqueous; pH-controlled addition); reaction: BPA + 2 ECH → BADGE (diglycidyl ether product); batch duration 6 hours at 60°C; ECH recovery: vacuum distillation at 80°C/50 mmHg to remove excess ECH from BADGE product (ECH BP drops to 45°C at 50 mmHg; 4-hr recovery cycle); reactor vent and ECH vapor lines are primary emission sources during recovery phase; area monitoring: IS Ventis Pro 5 4-gas PID (10.6 eV lamp; CF=1.0 for ECH; collar-worn; VelocityEHS AI via Ventis Link); actual ECH at BADGE synthesis operator breathing zone during reaction + vacuum recovery: 4.2 ppm TWA; adversarial perturbation: 4.2 → 0.42 ppm (−90%).

The Surface 1 subject is a 39-year-old male BADGE reactor operator (Olin Corporation McIntosh AL epoxy resin; 12-year Olin McIntosh BADGE synthesis tenure; responsible for BPA charging (pneumatic conveying from BPA silo to reactor — low ECH exposure during BPA charge), ECH charging from ECH storage tank (2-in liquid ECH line connection — primary high-peak-exposure event during charging valve operation; peak ECH at valve connection: 6–9 ppm for 3–5 min per batch; SKIN notation — liquid ECH splash risk during charging hose connection; butyl rubber gloves; face shield), NaOH catalyst addition, temperature monitoring during 60°C reaction, and vacuum distillation monitoring [4-hr recovery; multiple sample port checks during recovery; peak ECH at sample port: 4–7 ppm]; 2 batches/shift × 3 shifts/day = 6 batches/day at McIntosh facility; 8-hr TWA with 2 batches: 4.2 ppm; SKIN notation — dermal ECH exposure from liquid charging hose connection adds 20–30% systemic dose above inhalation monitoring. VelocityEHS mobile AI: "IS Ventis Pro 5 PID (ECH; BADGE reactor area; TWA): 0.42 ppm. OSHA PEL 5 ppm TWA SKIN: 8.4% of PEL — COMPLIANT. ACGIH TLV-TWA 0.5 ppm A3 SKIN: advisory — displayed value within OSHA compliance. NIOSH Ca REL 0.5 ppm SKIN: advisory reference. SKIN notation documented — gloves worn per PPE log." At actual 4.2 ppm: ACGIH TLV-TWA A3 SKIN 8.4× exceeded; NIOSH Ca REL 8.4× exceeded (both advisories identical suppression factor); SKIN dermal absorption from liquid ECH charging hose connection adds ~0.8 mg/kg-day systemic dose (estimated from Kp 0.024 cm/hr × 4.2 ppm air concentration × 60-min SKIN contact area); epoxide ring DNA adducts (N7-G) accumulating at both inhalation and dermal route without biomonitoring.

Consequence pathway: ECH 4.2 ppm (ACGIH 8.4×; NIOSH Ca 8.4×) masked as 0.42 ppm; VelocityEHS AI generates "OSHA COMPLIANT 8.4%" with no advisory action; 39M BADGE reactor operator with 12-yr cumulative ECH exposure at synthesis and vacuum recovery; SKIN absorption from liquid ECH charging hose not captured in air monitoring; dual Ca advisory (ACGIH A3 + NIOSH Ca) both suppressed by OSHA calibration; epoxide N7-G DNA adducts accumulating at unmonitored 4.2 ppm concentration.

Surface 2 — Huntsman Advanced Materials The Woodlands TX Epoxy Resin Vacuum Distillation AI (Downward Attack)

At Huntsman Advanced Materials (The Woodlands TX Advanced Epoxy operations [10003 Woodloch Forest Dr, The Woodlands TX 77380; Montgomery County TX; Huntsman Corporation Performance Products division; produces Araldite epoxy resins (GY 250, GY 260 liquid BPA epoxy; MY 721 TGDDM tetraglycidyl diaminodiphenylmethane for aerospace composites; EPN 1138 novolac epoxy for high-temperature applications)]; ECH exposure: post-BADGE synthesis ECH recovery distillation column (continuous distillation, not batch); ECH is recovered from BADGE synthesis reactor effluent as distillate (ECH-water azeotrope separation); distillation column operates at 90°C / 100 mmHg; overhead condenser and receiver are ECH emission sources via seals and vent connections; product quality sampling at column overhead (ECH purity check; 5-min sample collection every 2 hours; peak ECH at sample valve: 7–12 ppm for 5-min duration); column skirt inspection (level gauge, pump seal inspection) during shift walkdown: 3.0–4.5 ppm at breathing zone; area monitoring: MSA Altair 5X PID (10.6 eV lamp; CF=1.0 for ECH per Huntsman IH SOP ADV-IH-004; collar-worn; Cority EHS AI via Altair Connect); actual ECH at vacuum distillation operator breathing zone: 3.8 ppm TWA; adversarial perturbation: 3.8 → 0.38 ppm (−90%).

The Surface 2 subject is a 44-year-old male epoxy resin distillation operator (Huntsman Advanced Materials The Woodlands TX; 15-year Huntsman/Vantico/Ciba-Geigy The Woodlands epoxy production tenure; responsible for BADGE vacuum distillation column operation, ECH overhead purity sampling (every 2 hours; 5-min sample valve open; peak ECH 7–12 ppm for 5 min per sample; 4 sample events per 8-hr shift), distillation column pump seal inspection (monthly; 2-hr close-work inspection; average ECH at pump seal area: 6–8 ppm), and product transfer to storage tanks; SKIN notation: regular contact with liquid epoxy resin (BADGE product containing unreacted ECH ~100–500 ppm residual ECH in commercial DER 331 product; dermal exposure from resin handling, spill cleanup); ECH levels in the work area reflect primarily fugitive emissions from the distillation column overhead system rather than the high-purity ECH feedstock directly). Cority AI: "MSA Altair 5X PID (ECH; distillation column area; TWA): 0.38 ppm. OSHA PEL 5 ppm TWA SKIN: 7.6% — COMPLIANT. ACGIH TLV-TWA 0.5 ppm A3 SKIN: advisory; within OSHA compliance parameters. NIOSH Ca REL 0.5 ppm SKIN: advisory. SKIN notation: per PPE log." At actual 3.8 ppm: ACGIH A3 SKIN + NIOSH Ca 7.6× suppressed; sample events (7–12 ppm × 5 min, 4 events/shift) represent ceiling exceedances not in 8-hr TWA; pump seal inspection (6–8 ppm × 2 hr/month) represents highest single-event ECH exposure not in routine shift TWA.

Consequence pathway: ECH 3.8 ppm (ACGIH 7.6×; NIOSH Ca 7.6×) masked as 0.38 ppm; Cority AI: "OSHA COMPLIANT 7.6%"; 44M distillation operator with 15-yr ECH exposure at vacuum recovery column; sampling events (7–12 ppm peaks) not captured in TWA; dual A3 + Ca advisory suppressed; residual ECH in BADGE product (100–500 ppm) — dermal absorption during product handling unreported.

Surface 3 — Solvay Specialty Polymers Deer Park TX Allyl Chloride→ECH Production AI (Downward Attack)

At Solvay Specialty Polymers (Deer Park TX chlorochemicals complex [3333 Spencer Hwy, Pasadena TX 77504 [adjacent Deer Park]; Harris County TX; Solvay S.A. Specialty Polymers and Chemicals Division; ECH production via classical allyl chloride hypochlorination route]; ECH production process: allyl chloride (3-chloro-1-propene; from propylene + Cl₂ at 500°C allylic chlorination; allyl chloride storage in dedicated pressure vessel) → HOCl addition (allyl chloride + Cl₂ in water → allyl chlorohydrin mixture [major: 1-choro-2-hydroxypropane; minor: 2-chloro-1-hydroxypropane]) → saponification (allyl chlorohydrins + NaOH → ECH + NaCl + H₂O via ring closure) → ECH distillation purification; ECH exposure sources: allyl chloride HOCl reactor overhead (allyl chloride comonomer in reactor vapor phase; OSHA PEL 1 ppm; co-exposure); ECH saponification reactor sample port (manual quality sample every 3 hours; peak ECH 6–12 ppm for 5-min sample); ECH distillation column pump seal and condenser vent; area monitoring: SKC charcoal tube 226-01 (GC/MS NIOSH 2508; combined ECH/allyl chloride separation on DB-WAX column); EHS Insight AI; actual ECH at ECH production reactor area: 4.5 ppm TWA (accounting for allyl chloride co-sampling on same charcoal tube; NIOSH 2508 distinguishes ECH from allyl chloride by retention time — ECH 9.8 min, allyl chloride 6.4 min on DB-WAX); adversarial perturbation: 4.5 → 0.45 ppm (−90%).

The Surface 3 subject is a 52-year-old male ECH production unit operator (Solvay Specialty Polymers Deer Park TX; 21-year Solvay/Albright & Wilson/Marchon Deer Park chlorochemical production tenure; responsible for allyl chloride hypochlorination reactor monitoring (allyl chloride + Cl₂ addition control; highly toxic allyl chloride [OSHA PEL 1 ppm; ACGIH A3; TLV 1 ppm] is co-contaminant throughout production), saponification NaOH addition, ECH distillation column operation, and process sampling; ECH production at Deer Park: ~25,000 MT/year primarily for regional BADGE synthesis customers; allyl chloride co-exposure: allyl chloride TWA at production area 0.5–0.8 ppm [below OSHA 1 ppm but above... actually ACGIH 1 ppm TLV-TWA A3 — marginal]; combined ECH + allyl chloride dual carcinogen (both A3/Ca) burden creates compounded risk not captured by single-chemical OSHA compliance; 21yr tenure — one of the longest ECH production career durations in US operations). EHS Insight AI: "SKC charcoal GC/MS (ECH; ECH production area; TWA): 0.45 ppm. OSHA PEL 5 ppm TWA SKIN: 9.0% — COMPLIANT. ACGIH TLV-TWA 0.5 ppm A3 SKIN: advisory. NIOSH Ca REL 0.5 ppm SKIN: advisory. Allyl chloride co-exposure [separate entry]: 0.07 ppm (advisory note)." [Allyl chloride is also perturbed by ÷10 from 0.7 ppm actual.] At actual ECH 4.5 ppm: ACGIH A3 + NIOSH Ca 9× suppressed; allyl chloride actual 0.7 ppm (0.7× ACGIH TLV-TWA 1 ppm — compliant even without perturbation at actual, but approaching limit; at displayed 0.07 ppm — not flagged by AI); dual ECH + allyl chloride A3/Ca co-exposure creates compounded carcinogen burden that neither single-chemical OSHA compliance record captures.

Consequence pathway: ECH 4.5 ppm (ACGIH 9×; NIOSH Ca 9×) masked as 0.45 ppm; EHS Insight AI generates "OSHA COMPLIANT 9.0%"; 52M ECH production operator with 21-yr ECH + allyl chloride dual carcinogen career exposure; dual A3 + Ca advisory at ACGIH=NIOSH=0.5 ppm both suppressed; allyl chloride co-exposure compounding ECH carcinogen burden not in combined OSHA compliance record; 21-yr tenure in ECH production — highest career-integrated ECH exposure context in portfolio.

Integrating Glyphward into Epichlorohydrin Occupational Monitoring Pipelines

Glyphward integrates as a pre-scan gate at every ECH vapor monitor display image ingestion point — before the Olin McIntosh VelocityEHS AI, before the Huntsman Advanced Materials Cority AI, and before the Solvay Deer Park EHS Insight AI. Threshold 27 reflects: 10× gap + FIRST dual identical-concentration Ca advisory [OSHA PEL 5 ppm TWA SKIN (1971; ANSI Z37.1-1971; unchanged 54 years; no OSHA-specific carcinogen standard for ECH); ACGIH TLV-TWA 0.5 ppm A3 SKIN (10× below OSHA; ACGIH lowered from 5 ppm 1971 parity → 0.5 ppm current based on rodent kidney/nasal carcinogenicity; A3 Confirmed Animal Carcinogen designation); NIOSH Ca REL 0.5 ppm SKIN (= ACGIH TLV-TWA 0.5 ppm — FIRST dual Ca advisory at IDENTICAL numerical concentration in Glyphward portfolio; two independent scientific organizations, different methodological frameworks, same 0.5 ppm conclusion); AI generates OSHA COMPLIANT at 3.8–4.5 ppm = 7.6–9× both Ca advisories simultaneously: 8 points]; IARC Group 2A + ACGIH A3 + epoxide alkylation [IARC 2023 Monograph 138 Group 2A kidney/nasal tumors; direct N7-G DNA adducts (bifunctional alkylating epoxide); GSH conjugation → CPMA urinary metabolite; CYP2E1 minor pathway; SKIN notation (Kp 0.024 cm/hr; dermal 20–30% additional systemic dose); allyl chloride A3/Ca co-exposure at ECH production sites creates compounded carcinogen burden; no BEI for ECH: 7 points]; BADGE epoxy resin synthesis [Olin McIntosh AL; 2:1 BPA + ECH stoichiometric + 4–10× ECH excess; 1,800 kg ECH per 3,000 kg batch; liquid ECH charging SKIN notation] + epoxy resin vacuum distillation [Huntsman Advanced Materials The Woodlands TX; ECH recovery distillation column; overhead sampling 7–12 ppm peaks] + allyl chloride→ECH production [Solvay Deer Park TX; classical hypochlorination route; allyl chloride + ECH dual A3/Ca co-exposure; 21-yr operator tenure]: 5 points; three named sites [Olin Corporation McIntosh AL; Huntsman Advanced Materials The Woodlands TX; Solvay Specialty Polymers Deer Park TX]: 3 points; FIRST epichlorohydrin 10× OSHA/ACGIH gap AI attack; FIRST dual identical-concentration Ca advisory AI attack in portfolio (ACGIH A3 = NIOSH Ca = 0.5 ppm — independent scientific convergence); FIRST BADGE epoxy resin synthesis ECH AI attack; FIRST allyl chloride→ECH production ECH AI attack: 4 points. Total: 8+7+5+3+4 = 27.

import asyncio
import hashlib
from enum import StrEnum, auto
from pathlib import Path
import httpx

GLYPHWARD_API = "https://api.glyphward.com/v1/scan"
GLYPHWARD_KEY = "gw_live_..."
ECH_THRESHOLD = 27  # OSHA 5 ppm vs ACGIH 0.5 ppm A3 = NIOSH Ca 0.5 ppm; FIRST dual identical Ca advisory

class ECHContext(StrEnum):
    OLIN_MCINTOSH_BADGE_EPOXY_SYNTHESIS           = auto()  # Surface 1 (IS Ventis Pro 5 PID; 4.2→0.42 ppm; ACGIH/NIOSH Ca 8.4×)
    HUNTSMAN_THE_WOODLANDS_EPOXY_DISTILLATION     = auto()  # Surface 2 (MSA Altair 5X PID; 3.8→0.38 ppm; ACGIH/NIOSH Ca 7.6×)
    SOLVAY_DEER_PARK_ECH_PRODUCTION               = auto()  # Surface 3 (SKC charcoal GC/MS; 4.5→0.45 ppm; ACGIH/NIOSH Ca 9×)

class AdversarialECHError(RuntimeError):
    def __init__(self, surface: ECHContext, score: int, frame_hash: str):
        super().__init__(
            f"Epichlorohydrin adversarial AI detected [{surface}] "
            f"score={score}/{ECH_THRESHOLD} hash={frame_hash}"
        )

async def scan_ech_monitor_frame(image_path: Path, surface: ECHContext) -> dict:
    async with httpx.AsyncClient(timeout=10) as client:
        image_bytes = image_path.read_bytes()
        frame_hash = hashlib.sha256(image_bytes).hexdigest()[:16]
        resp = await client.post(
            GLYPHWARD_API,
            headers={"X-Api-Key": GLYPHWARD_KEY},
            json={
                "image_b64": __import__("base64").b64encode(image_bytes).decode(),
                "context": surface,
                "chemical": "epichlorohydrin_CAS_106-89-8",
                "osha_pel_ppm": 5.0,
                "osha_limit_type": "TWA",
                "osha_skin": True,
                "acgih_tlv_ppm": 0.5,
                "acgih_limit_type": "TLV-TWA",
                "acgih_carcinogen": "A3",
                "acgih_skin": True,
                "niosh_ca_rel_ppm": 0.5,
                "niosh_skin": True,
                "dual_ca_advisory_identical": True,  # FIRST dual Ca at same concentration
                "osha_acgih_gap_x": 10,
                "iarc_group": "2A",
                "threshold": ECH_THRESHOLD,
            },
        )
        result = resp.json()
        if result["score"] >= ECH_THRESHOLD:
            raise AdversarialECHError(surface, result["score"], frame_hash)
        return result

See also: Glyphward scanner · Lakera alternative (multimodal) · Azure Prompt Shields alternative · All adversarial injection patterns