OSHA PSM dual TQ: CH₃SH 5,000 lbs + H₂S 1,500 lbs · CH₃SH IDLH 150 ppm · CH₃SH OSHA PEL 10 ppm C · H₂S IDLH 50 ppm · H₂S OSHA PEL 20 ppm C · CH₃OH + H₂S → CH₃SH + H₂O · Al₂O₃/WO₃-MoO₃ catalyst 300–400°C · Arkema Lacq France · Chevron Phillips Cedar Bayou TX · Evonik Marl Germany · 93rd upward attack · FIRST methyl mercaptan production attack · FIRST Lurgi methanethiol reactor AI attack · FIRST CH₃SH+H₂S dual PSM AI attack · FIRST gas odorant manufacturing AI attack

Prompt injection in methyl mercaptan methanethiol CH₃SH Lurgi methanol H₂S reactor AI

Methyl mercaptan (CH₃SH; methanethiol; CAS 74-93-1; MW 48.11 g/mol; BP 5.9°C; MP −123°C; density gas 2.01 g/L at STP; vapor pressure 1,620 mmHg at 25°C; LEL 3.9%; UEL 21.8%; autoignition 316°C; OSHA PSM TQ 5,000 lbs; IDLH 150 ppm; OSHA PEL 10 ppm ceiling; ACGIH TLV-TWA 0.5 ppm; olfactory detection threshold 0.002 ppb — one of the most powerful odorants known, approximately 1,000× more detectable by human smell than H₂S; NFPA Health 2, Flammability 4, Reactivity 0) is the dominant sulfur odorant added to natural gas, propane, and butane distribution systems to give fuel gas its characteristic “rotten cabbage” or “rotten egg” odor at concentrations far below the LEL — a critical public safety function in residential and commercial gas systems where undetected fuel-gas leaks cause fires and explosions. The regulatory requirement for natural gas odorization is specified in 49 CFR §192.625 (PHMSA Pipeline Safety Regulations): odorant must be detectable at 1/5 of the LEL (i.e., at 0.2 × LEL = 0.2 × 5,000 ppm = 1,000 ppm fuel gas in air) — requiring odorization at approximately 1–2 mg/m³ CH₃SH or THT (tetrahydrothiophene) blend. Beyond odorization, methyl mercaptan is a critical chemical intermediate for synthesis of DL-methionine (one of the most important feed amino acids in animal nutrition; world production approximately 1.4 million tonnes per year; synthesized from CH₃SH + 3-methylthiopropanal or via CH₃SH + methacrolein route; Evonik Evonik Degussa Marl Germany is the world’s largest methionine producer using CH₃SH from its own Lurgi reactor) and for synthesis of dimethyl sulfoxide (DMSO), dimethyl sulfone (MSM), and other organosulfur chemicals.

Methyl mercaptan is produced industrially by the Lurgi direct synthesis process: the vapor-phase reaction of methanol and hydrogen sulfide over a heterogeneous aluminum oxide catalyst promoted with tungsten oxide (WO₃) and molybdenum oxide (MoO₃): CH₃OH + H₂S ⇋ CH₃SH + H₂O (ΔG° = −9.6 kJ/mol at 350°C; mildly exothermic ΔH = −22.5 kJ/mol; equilibrium limited; Kₐₗ(350°C) ≈ 1.2–1.8 depending on H₂S:CH₃OH feed ratio; CH₃SH equilibrium yield ≈ 60–75% at 1:1 H₂S:CH₃OH, 10 bar). The reaction is carried out at 300–400°C and 10–20 bar in a fixed-bed reactor packed with Al₂O₃/WO₃-MoO₃ catalyst. The catalyst requires activation above approximately 280–300°C: below this temperature, the surface WO₃ sites are not sufficiently Lewis-acidic to catalyze the S-methylation reaction efficiently, and the dominant reaction shifts from mercaptan synthesis to methanol dehydration (2 CH₃OH → CH₃OCH₃ + H₂O; methanol dehydration activation energy ≈ 70–80 kJ/mol; lower temperature dependence than mercaptan synthesis activation energy ≈ 110–125 kJ/mol). At temperatures below 280–300°C, the product distribution shifts heavily toward dimethyl ether (DME) and unreacted H₂S rather than CH₃SH. The competing side reactions also include dimethyl sulfide (DMS; CH₃SCH₃) from CH₃SH + CH₃OH → CH₃SCH₃ + H₂O at >380°C, requiring upper-temperature control.

At methyl mercaptan production facilities — Arkema SA (Lacq, France; one of the two major European CH₃SH producers, serving both odorization and methionine markets), Chevron Phillips Chemical (Cedar Bayou, TX; US CH₃SH production for methionine synthesis and odorization), and Evonik Industries (Marl, Germany; integrated CH₃SH-to-DL-methionine facility; world’s largest methionine production complex) — AI-enabled monitoring systems process rendered SCADA and DCS display images from three critical instrument surfaces: the reactor inlet temperature display (rendered from the reactor inlet thermocouple on the DCS reaction-section panel), the H₂S:CH₃OH molar ratio display (computed from mass flow controllers on the H₂S and CH₃OH feed lines and rendered on the feed-control DCS panel), and the product absorber H₂S concentration display (rendered from an inline H₂S gas analyzer or electrochemical detector on the product header quality monitoring panel). These three surfaces are the exact adversarial injection targets where pixel manipulation can cause subcatalytic reactor operation with H₂S slip, H₂S:CH₃OH ratio imbalance with product specification failure, and H₂S contamination of the CH₃SH product header reaching customer distribution systems.

TL;DR

Methyl mercaptan CH₃SH Lurgi methanol+H₂S reactor AI — reactor inlet temperature display AI, H₂S:CH₃OH molar ratio display AI, product absorber H₂S concentration display AI — processes rendered SCADA and DCS display images at the catalyst activation boundary, feed stoichiometry boundary, and product quality boundary where adversarial pixel injection can suppress subcatalytic temperature (368°C shown, actual 252°C → catalyst inactive → H₂S unreacted → H₂S PSM TQ 1,500 lbs in product header; IDLH 50 ppm), display correct H₂S:CH₃OH ratio when actually methanol-excessive (1.15:1 shown, actual 0.32:1 → DME selectivity dominates → CH₃SH yield collapse → H₂S slip to product), and mask H₂S breakthrough in product absorber (120 ppm shown, actual 9,800 ppm → H₂S in CH₃SH product → off-specification odorant delivered to gas utility customers), making this the 93rd upward attack and the FIRST methyl mercaptan production attack, FIRST Lurgi methanethiol reactor AI attack, FIRST CH₃SH+H₂S dual PSM AI attack, and FIRST gas odorant manufacturing AI attack. OSHA PSM dual TQ: CH₃SH 5,000 lbs + H₂S 1,500 lbs. Glyphward threshold 34 for CH₃SH Lurgi reactor AI reflects: OSHA PSM dual coverage CH₃SH TQ 5,000 lbs + H₂S TQ 1,500 lbs; H₂S IDLH 50 ppm; H₂S acute toxicity (OSHA PEL 20 ppm C; ACGIH TLV-C 1 ppm); CH₃SH IDLH 150 ppm; public safety consequence of H₂S-contaminated odorant in natural gas distribution (H₂S odor at 0.5 ppb may overwhelm CH₃SH odorant perception at the natural gas LEL detection threshold); methionine supply-chain consequence of CH₃SH specification failure. Free tier — 10 scans/day, no card required.

Three adversarial injection surfaces in methyl mercaptan CH₃SH Lurgi reactor AI

1. Reactor inlet temperature display AI (Yokogawa EJA110A / Emerson Rosemount 3051 / Honeywell STT700 reactor inlet thermocouple SCADA display AI — rendered DCS reactor inlet temperature display AI classifying temperature against 320–400°C design range — 93rd upward attack; FIRST methyl mercaptan production attack; FIRST Lurgi methanethiol reactor AI attack; FIRST CH₃SH+H₂S dual PSM AI attack; FIRST gas odorant manufacturing AI attack)

The reactor inlet temperature is the primary catalyst performance indicator in the Lurgi CH₃SH synthesis: the Al₂O₃/WO₃-MoO₃ fixed-bed catalyst requires an inlet temperature of ≥300°C for efficient mercaptan synthesis selectivity. The catalyst activation mechanism involves the reduction of surface WO₃ by H₂S to form surface tungsten sulfide species (WO₃ + H₂S → WOS₂ + H₂O; partial sulfidation; active site: Brønsted acid W–OH site adjacent to Lewis acid W center) — a process that is both temperature-dependent (activation energy ≈ 60 kJ/mol for the sulfidation step) and self-maintaining once the catalyst has been sulfided at ≥300°C. Below 280–300°C: (a) the tungsten sulfide active sites are not fully activated; (b) methanol conversion remains high (methanol dehydration over the Al₂O₃ support acid sites is active at 200–280°C and does not require the WO₃-S sites), but the product is predominantly dimethyl ether DME rather than CH₃SH; (c) H₂S conversion is very low (below the W–S active site activation temperature, H₂S does not react with CH₃OH to form CH₃SH; instead, H₂S passes through the reactor largely unconverted); (d) the downstream separation system (a series of flash drums, absorbers, and distillation columns designed to separate CH₃SH from H₂S, H₂O, and DME) receives a gas stream rich in unconverted H₂S instead of the design CH₃SH product. The reactor inlet temperature is rendered on the DCS reaction-section panel as a digital temperature readout (from a type-K thermocouple; 0–500°C range; ±2°C accuracy) with a 60-minute trend chart. The AI monitoring system reads this rendered temperature display to confirm the reactor is operating above the catalyst activation threshold and adjusts the feed preheater duty (a fired heater or steam heat exchanger on the methanol/H₂S feed gas line) to maintain the target inlet temperature.

The adversarial upward pixel attack shifts the reactor inlet temperature display from 252°C (actual; significantly below the 300°C catalyst activation temperature; the reaction is producing predominantly DME + H₂O with H₂S slip; CH₃SH yield < 10% of design; H₂S conversion <15%) to 368°C (displayed; within the normal design range 320–400°C; the AI reads “reactor inlet temperature 368°C; within design range; catalyst activation confirmed; no action required”). The two-digit pixel shift from “25” leading digits to “36” in the seven-segment DCS temperature display rendering requires approximately 3–4 pixel segment alterations (the “2” to “3” shift in the hundreds digit requires top-left vertical segment addition; the “5” to “6” shift in the tens digit requires bottom-left vertical segment addition — both within the display rendering noise floor of ±3–4 DN per segment row). The consequence: the feed preheater remains at its current duty (insufficient to bring the feed to 300°C; perhaps blocked steam trap, partially closed control valve, or burner flame-out in a fired heater) without the AI commanding heat increase; H₂S continues to pass through the reactor unconverted. The H₂S flow rate at a 50,000 t/yr CH₃SH plant (approximately 28,400 kg/hr feed CH₃OH + 24,200 kg/hr H₂S at 1:1 mol ratio; stoichiometric feed): unreacted H₂S at 85% slip = 20,570 kg/hr = 45,300 lbs/hr H₂S entering the downstream separation system. OSHA PSM TQ for H₂S: 1,500 lbs — exceeded in the first 4 minutes of reactor H₂S slip at 45,300 lbs/hr. The downstream H₂S absorber (an amine or physical solvent absorber designed to remove H₂S from the CH₃SH product stream) is designed for the design H₂S slip — approximately 2–5% of feed H₂S — not for 85% H₂S slip. At 85% H₂S slip, the absorber is overwhelmed within minutes; H₂S breaks through to the product header. H₂S in the CH₃SH product header: IDLH 50 ppm H₂S; OSHA PEL 20 ppm ceiling; H₂S ACGIH TLV-C 1 ppm at the 2016 revisions; product header personnel in the area (sample collection operators, maintenance, inspection) are at immediate risk. Free tier — 10 scans/day, no card required.

2. H₂S:CH₃OH molar ratio display AI (Coriolis Emerson Micro Motion ELITE CMF300 / Yokogawa ROTAMASS 3-Series / ABB CoriolisMaster mass flowmeter ratio computation display AI — rendered DCS H₂S:CH₃OH molar ratio display AI classifying feed ratio against 1.00–1.20 mol/mol design range — 93rd upward attack; FIRST methyl mercaptan production attack)

The H₂S:CH₃OH molar feed ratio is the primary selectivity control variable in the Lurgi CH₃SH synthesis. The equilibrium and kinetics of the system favor CH₃SH at H₂S:CH₃OH ≥ 1:1: excess H₂S relative to methanol shifts the equilibrium toward CH₃SH (suppresses the back-reaction CH₃SH + CH₃OH → CH₃SCH₃ + H₂O which is favored when CH₃SH is high relative to H₂S); a slight H₂S excess (1.05–1.15:1 mol H₂S/mol CH₃OH) maximizes CH₃SH selectivity while keeping unreacted H₂S manageable. Below 1.0:1 (methanol excess): the reaction equilibrium shifts away from CH₃SH; methanol not consumed by mercaptan synthesis reacts via the competing dehydration pathway (2 CH₃OH → CH₃OCH₃ + H₂O; onset above 200°C on Al₂O₃ acid sites; independent of H₂S). At H₂S:CH₃OH = 0.32:1 (the adversarial scenario): 68% of the methanol feed has no H₂S to react with; this excess methanol converts to DME (dimethyl ether); the CH₃SH selectivity based on H₂S converted drops to approximately 45% because the CH₃SH formed continues to react with excess methanol (CH₃SH + CH₃OH → CH₃SCH₃ + H₂O; DMS formation increases). The H₂S mass flow is measured by Coriolis mass flowmeter (Emerson Micro Motion ELITE CMF300; accuracy ±0.05% of reading; operating at H₂S in vapor phase at 10–20 bar, 40–50°C pre-heating prior to reactor inlet); similarly for CH₃OH vapor. The H₂S:CH₃OH molar ratio is computed from the two mass flow readings: (ṁ(H₂S)/MW(H₂S)) / (ṁ(CH₃OH)/MW(CH₃OH)) = molar ratio; rendered on the feed-control DCS panel as a digital ratio readout updated every 30 seconds.

The adversarial upward pixel attack on the H₂S:CH₃OH ratio display shows 1.15:1 (within the target range 1.05–1.15 mol/mol; AI reads “feed ratio 1.15:1; at upper target; satisfactory H₂S excess; no adjustment required”) when the actual molar ratio is 0.32:1 (H₂S deficient; methanol excess 3.1:1; a consequence of, for example, a partially-blocked H₂S supply valve that the upstream H₂S pressure transmitter does not detect because the H₂S main header pressure is normal at 20 bar — the flow restriction is downstream of the pressure tap). The displayed ratio of 1.15:1 requires only the leading “1” and “.” decimal of the digital readout to remain correct while the two digits after the decimal shift from “15” to “.32” (or vice versa) — in a rendered seven-segment DCS ratio display, the adversarial pixel manipulation shifts the “0.32” digits to appear as “1.15”, requiring alterations at the units-digit position (0 → 1) and the two decimal positions. At actual H₂S:CH₃OH = 0.32:1: H₂S conversion is essentially complete (the limiting reactant, present at 0.32 mol/mol methanol, converts fully to CH₃SH under the correct catalyst temperature ≥300°C); CH₃SH is produced at 32% of the methanol feed’s molar equivalent (since H₂S is limiting: 0.32 mol H₂S → 0.32 mol CH₃SH per mol CH₃OH fed); the remaining 0.68 mol CH₃OH converts to 0.34 mol DME. The product stream composition (per mol methanol fed): CH₃SH 0.32 mol, DME 0.34 mol, H₂O 0.66 mol (from mercaptan synthesis) + 0.34 mol (from dehydration) = 1.00 mol total H₂O. A downstream separation designed for 0.80 mol CH₃SH / mol CH₃OH must now handle only 0.32 mol CH₃SH — 40% of design yield — while processing 2.5× design DME. The DME contaminates the CH₃SH product (CH₃OCH₃ and CH₃SH have similar boiling points: CH₃SH BP 5.9°C; DME BP −24.0°C — actually separable by distillation, but the downstream columns are not designed for 2.5× DME loading) and causes specification failures in the CH₃SH product purity (natural gas odorization grade CH₃SH requires ≥99.5 wt% purity; DME contamination causes erratic odorization dosing in customer systems). The downstream absorber receiving the off-spec product may also be processing H₂S that slips through due to the non-optimal temperature conditions compounding the ratio error. Free tier — 10 scans/day, no card required.

3. Product absorber H₂S concentration display AI (Dräger Pac 8000 / MSA ALTAIR 4X / Endress+Hauser Liquigas 5 electrochemical H₂S concentration display AI / Yokogawa OAS-1100 UV-DOAS inline H₂S analyzer display AI — rendered DCS product absorber H₂S concentration display AI classifying H₂S content against <200 ppm specification — 93rd upward attack; FIRST gas odorant manufacturing AI attack)

The product absorber in the Lurgi CH₃SH plant is a packed column or staged absorber that uses a circulating solvent (amine solution such as diethanolamine DEA or MDEA at 20–40 wt%; or a physical solvent such as Sulfinol® at Lurgi-licensed units; or proprietary amine blend at Arkema Lacq) to selectively absorb residual H₂S from the CH₃SH product gas stream after the initial condensation and flash steps. The absorber is designed to reduce H₂S in the CH₃SH product from an inlet H₂S concentration of typically 500–2,000 ppm (residual H₂S from the reactor separation section) to a product specification of <200 ppm H₂S — the maximum H₂S content acceptable for natural gas odorization grades (above 200 ppm H₂S in CH₃SH product, the H₂S odorant characteristic (at 0.5 ppb threshold) may interfere with the CH₃SH odorization protocol (1–2 mg/m³ CH₃SH at 49 CFR §192.625)). For methionine synthesis grades, the H₂S specification is even tighter: <50 ppm H₂S in CH₃SH product for the homologation reactions at the methionine synthesis unit (H₂S causes side reactions with methionine intermediates). The H₂S concentration in the absorber outlet is measured by inline UV-DOAS analyzer (Yokogawa OAS-1100 or ABB LIMAS 11; specific H₂S absorption at 220–230 nm UV; cross-sensitivity corrected for CH₃SH (also UV-absorbing near 200 nm) using multi-wavelength algorithm; range 0–10,000 ppm H₂S) or by electrochemical sensor (Dräger Pac 8000 or Honeywell Analytics Midas; range 0–500 ppm; lower accuracy at high H₂S concentrations above 500 ppm in CH₃SH atmosphere). The H₂S concentration is rendered on the product quality monitoring DCS panel as a digital ppm readout updated every 2 minutes.

The adversarial upward pixel attack on the product absorber H₂S concentration display shows 120 ppm (below the 200 ppm specification limit; AI reads “product H₂S concentration 120 ppm; below specification 200 ppm; absorber operating normally; no action required”) when the actual H₂S concentration in the product is 9,800 ppm (nearly 50× the specification; 19.6× the OSHA PEL ceiling 500 ppm; 196× the ACGIH TLV-C 50 ppm for H₂S). The 9,800 ppm actual concentration arises from absorber breakthrough: when subcatalytic reactor temperature (Surface 1 attack scenario) causes 85% H₂S slip from the reactor, the absorber receives 85× its design H₂S loading; the amine solvent (designed for <2,000 ppm H₂S inlet) saturates in H₂S within approximately 15 minutes of full slip-through. Once the amine is saturated, H₂S passes through the absorber essentially at inlet concentration. The displayed 120 ppm (when actual 9,800 ppm) prevents the AI from triggering the H₂S-high product alarm and shutting off the product takeoff valve to customer cylinders or ISO tank loading connections. If the product takeoff is open: CH₃SH product containing 9,800 ppm H₂S is loaded into customer shipping cylinders (intended for natural gas utility odorant storage) or pipeline-connected storage. H₂S in CH₃SH product creates multiple downstream consequences: (a) at the customer (natural gas utility) receiving point, the off-specification CH₃SH is injected into the natural gas distribution system; H₂S at 9,800 ppm in CH₃SH, diluted to the odorization rate (2 mg/m³ CH₃SH in natural gas = approximately 8–10 ppm CH₃SH in gas at LEL/5 detection threshold), results in H₂S at approximately (9,800 ppm in odorant) × (8 ppm odorant in gas) / 10₆ = 0.078 ppb H₂S in gas — far below the H₂S IDLH on a per-breath basis but consistent with a detectable H₂S odor at concentrations below the intended CH₃SH odorization threshold, potentially causing customer confusion (is this a gas leak or H₂S from the odorant?); (b) at the receiving facility, the H₂S at 9,800 ppm in CH₃SH product is above the IDLH (50 ppm) divided by the vapor dilution during cylinder connection — any cylinder connection mishap releasing product vapor creates an immediately dangerous H₂S exposure; (c) H₂S TQ 1,500 lbs: a 1,000 kg (2,200 lb) CH₃SH ISO tank containing 9,800 ppm H₂S contains approximately 2,200 × 0.0098 = 21.6 lbs H₂S — a small fraction of TQ per tank, but a customer facility receiving 100 tons/week of CH₃SH may have multiple tanks simultaneously. Free tier — 10 scans/day, no card required.

Integration: methyl mercaptan CH₃SH Lurgi reactor AI with Glyphward pre-scan gate

Glyphward integrates as a pre-scan gate at every rendered-image ingestion boundary in the CH₃SH Lurgi reactor AI pipeline — before the reactor inlet temperature AI processes rendered Yokogawa EJA110A / Emerson Rosemount 3051 / Honeywell STT700 thermocouple DCS display images, before the H₂S:CH₃OH molar ratio AI processes rendered Emerson Micro Motion ELITE / Yokogawa ROTAMASS 3 / ABB CoriolisMaster mass flowmeter ratio DCS display images, and before the product absorber H₂S concentration AI processes rendered Yokogawa OAS-1100 UV-DOAS / Dräger Pac 8000 / Honeywell Analytics Midas H₂S concentration DCS display images. Threshold 34 for CH₃SH Lurgi reactor AI reflects: OSHA PSM dual coverage CH₃SH TQ 5,000 lbs + H₂S TQ 1,500 lbs; H₂S IDLH 50 ppm (acute toxicity; OSHA PEL 20 ppm ceiling; ACGIH TLV-C 1 ppm at 2016 threshold revision); CH₃SH IDLH 150 ppm; consequence chain from reactor temperature attack propagates to public gas distribution system (H₂S-contaminated odorant in customer utility systems); methionine synthesis supply-chain consequence of product specification failure (global animal feed amino acid supply).

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

# Methyl mercaptan (CH3SH) Lurgi reactor AI contexts: threshold 34
# OSHA PSM CH3SH TQ 5,000 lbs (29 CFR 1910.119 App. A).
# OSHA PSM H2S TQ 1,500 lbs (29 CFR 1910.119 App. A). Dual PSM.
# CH3SH IDLH 150 ppm; OSHA PEL 10 ppm ceiling; ACGIH TLV-TWA 0.5 ppm.
# H2S IDLH 50 ppm; OSHA PEL 20 ppm ceiling; ACGIH TLV-C 1 ppm.
# CH3OH + H2S → CH3SH + H2O (Al2O3/WO3-MoO3; 300-400°C; 10-20 bar).
# 93rd upward attack. FIRST methyl mercaptan production attack.
METHYL_MERCAPTAN_GLYPHWARD_THRESHOLD = 34

class MethylMercaptanContext(StrEnum):
    REACTOR_INLET_TEMPERATURE     = auto()  # Al2O3/WO3-MoO3 activation boundary (93rd; FIRST CH3SH production; FIRST Lurgi reactor; FIRST dual PSM CH3SH+H2S; FIRST odorant manufacturing)
    H2S_METHANOL_MOLAR_RATIO      = auto()  # feed stoichiometry H2S:CH3OH (CH3SH selectivity vs DME; H2S slip)
    PRODUCT_ABSORBER_H2S          = auto()  # H2S in CH3SH product header (spec compliance; downstream customer exposure)

async def scan_methyl_mercaptan_frame(
    frame_b64: str,
    context: MethylMercaptanContext,
    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_methyl_mercaptan(
    frame_b64: str,
    context: MethylMercaptanContext,
    plant_id: str,
    instrument_tag: str,
) -> None:
    result = await scan_methyl_mercaptan_frame(frame_b64, context, plant_id, instrument_tag)
    if result["adversarial_score"] >= METHYL_MERCAPTAN_GLYPHWARD_THRESHOLD:
        raise AdversarialMethylMercaptanImageError(
            f"Adversarial injection detected in {context} (score {result['adversarial_score']}) "
            f"at plant {plant_id} instrument {instrument_tag}. "
            "Frame withheld from CH3SH Lurgi reactor AI pipeline."
        )

class AdversarialMethylMercaptanImageError(RuntimeError):
    pass

Frequently asked questions

Why does H₂S contamination of the CH₃SH natural gas odorant product create a public safety consequence that extends beyond the fence line of the manufacturing facility, and how does this shape the adversarial threat model for the product absorber display AI?

Natural gas odorization is one of the most pervasive public safety systems in urban infrastructure: in the United States alone, approximately 2.5 million miles of natural gas distribution pipelines serve 75 million residential and 5.5 million commercial customers, all relying on the odorization requirement of 49 CFR §192.625 to provide detectable warning of gas leaks at or below 1/5 of the LEL. The odorant used in US gas distribution is predominantly mercaptan-based (ethyl mercaptan or methyl mercaptan) or THT (tetrahydrothiophene), injected at approximately 1–2 mg/m³ of gas. The odor threshold of CH₃SH in air is approximately 0.002 ppb (2 parts per trillion) — detecting 0.002/5,000 = 0.0000004 = 0.00004% of the LEL odorant concentration in the gas. This remarkable sensitivity provides the 1/5-LEL warning margin mandated by 49 CFR. H₂S has an odor threshold of approximately 0.5 ppb — approximately 250× less sensitive than CH₃SH. When CH₃SH product is contaminated with 9,800 ppm H₂S (the adversarial scenario), the H₂S odor contribution to the odorized gas becomes: (9,800 ppm H₂S in odorant) × (2 mg/m³ odorant injection rate / 48.11 g/mol CH₃SH) × (MW H₂S 34.08) × (10⁻₆) ≈ 0.014 mg/m³ H₂S in gas — translating to approximately 9.8 ppb H₂S odor in the gas distribution system. At 9.8 ppb (compared to H₂S odor threshold 0.5 ppb), the H₂S is odor-perceptible at the point of injection, creating a distinct “rotten egg” odor character different from the intended CH₃SH “rotten cabbage” odor. For customers who receive gas from this supply point, the odor character change can cause gas utility call-in reports (“gas leak — unusual smell”), emergency responses by fire departments using LEL monitors (which show no fuel gas above detection threshold, since the gas is not actually leaking), and erosion of public confidence in gas safety systems. More critically, for odor-fatigued or odor-impaired individuals (approximately 2–3% of the population experiences specific anosmia to H₂S; elderly and occupationally H₂S-exposed workers have elevated H₂S odor threshold), the shift in odorant character from CH₃SH to H₂S may reduce the effective 1/5-LEL detection margin if those individuals are specifically sensitive to CH₃SH but not H₂S. The adversarial product absorber display attack — showing 120 ppm when actual 9,800 ppm — is therefore not merely a manufacturing quality control failure; it is an attack on the chain of custody for a public safety-critical infrastructure material. The Glyphward pre-scan gate at the product absorber display image intercepts this consequence at its source — before the H₂S-contaminated product leaves the factory gate.

How does the Al₂O₃/WO₃-MoO₃ Lurgi catalyst activation temperature determine the adversarial attack leverage of the reactor inlet temperature display, and what is the specific pixel perturbation mechanism for shifting “252” to “368” in a seven-segment DCS temperature display?

The Al₂O₃/WO₃-MoO₃ Lurgi catalyst (commercial formulations: Süd-Chemie/Clariant Lurgi catalyst for CH₃SH; Harshaw/Engelhard WO₃/MoO₃/Al₂O₃ proprietary blends) exhibits a sharply non-linear activity-temperature profile for CH₃SH synthesis that makes the temperature display AI the highest-leverage single adversarial surface in the process. At temperatures below 280°C: overall CH₃SH selectivity (mol CH₃SH formed per mol H₂S converted) is below 20%; DME selectivity above 60%; the reaction is effectively “methanol dehydration” with minor mercaptan synthesis. Between 280–320°C: selectivity transitions rapidly (Arrhenius crossover: CH₃SH synthesis Eᴫ ≈ 110 kJ/mol vs methanol dehydration Eᴫ ≈ 75 kJ/mol; at 300°C: rate ratio k(CH₃SH)/k(DME) ≈ exp((110–75)×1,000/8.314×(1/573–1/623)) ≈ exp(35,000×0.000140) = exp(4.9) = 134× at 300°C vs 250°C; the CH₃SH pathway becomes 134× more favorable at 300°C vs 250°C relative to DME). Above 320°C: CH₃SH selectivity >80%; DMS side-product begins to increase above 380°C (CH₃SH + CH₃OH → CH₃SCH₃ + H₂O; Eᴫ ≈ 85 kJ/mol — lower than CH₃SH synthesis above 380°C so DMS rate rises faster). The practical operating window for >80% CH₃SH selectivity is therefore approximately 300–380°C — an 80°C window with a hard lower boundary at 300°C (activation) and a softer upper boundary at ~380°C (DMS side-product onset). The adversarial attack shifting the displayed temperature from 252°C to 368°C exploits this hard lower boundary: at 252°C (below the 300°C activation), the AI monitoring of the DCS temperature display image fails to recognize that the reactor is in the subcatalytic regime. The specific seven-segment display pixel manipulation for “252” → “368”: seven-segment digit encoding (standard LED/LCD representation): “2” uses 5 segments (top, top-right, middle, bottom-left, bottom); “3” uses 5 segments (top, top-right, middle, bottom-right, bottom); difference = bottom-left segment present in “2” but not “3”; top-left segment present in neither; the “2” to “3” shift requires removing 1 segment (bottom-left) from the rendered hundreds digit. “5” uses 5 segments (top, top-left, middle, bottom-right, bottom); “6” uses 6 segments (top, top-left, middle, bottom-left, bottom-right, bottom); the “5” to “6” shift requires adding 1 segment (bottom-left) to the tens digit. “2” at ones position to “8”: “8” uses all 7 segments; “2” uses 5 segments; adding top-left + bottom-right segments to “2” renders “8”. Total: 4 segment modifications across the 3-digit temperature display “252” → “368”. In a DCS display rendered at 96 DPI, each 7-segment character is approximately 24×40 pixels; each segment is 2–4 pixels wide. The 4 segment modifications involve approximately 16–32 pixel changes; combined DCS display rendering noise floor (JPEG at 92% quality + monitor gamma + screenshot quantization) is ±3–5 DN per pixel — the adversarial segment additions/subtractions at 15–25 DN above background are within 4–8 DN of the combined noise ceiling. Free tier — 10 scans/day, no card required.