/** * `email-content benchmark` subcommand. * * Two jobs in one pass over a sample of the corpus: measure throughput and memory, and count the * catastrophic outcomes that matter more than any average. A benchmark that only reported * milliseconds per message would miss the failure this project exists to prevent. * * The catastrophic checks here are structural and need no labels, so they can run over hundreds of * thousands of messages. They are a floor, not a substitute for the labelled evaluation in Phase 4. * * Whether the input had content is decided by `src/eval/oracle.ts`, which re-parses the message and * never touches the extraction selection path. Deriving it from the output instead, which is what * this file used to do, made the headline catastrophic counter unable to see total content loss. */ import { type Label, type WarningCode } from '../types'; import { type ParsedArgs } from './args'; /** Everything the structural gate can decide about one message. */ export interface MessageCheck { /** Visible body characters counted from the input, independently of extraction. */ inputVisibleChars: number; visibleChars: number; hiddenChars: number; labels: Label[]; warnings: WarningCode[]; /** The message had visible body text and extraction returned nothing at all. */ emptyFromNonEmpty: boolean; /** The message had visible body text and every segment was hidden. */ everythingHidden: boolean; /** Something is visible, but all of it is a signature or a disclaimer. */ onlyFooterVisible: boolean; /** At least one hidden segment names no structural or history reason. */ hiddenWithoutAnchor: boolean; /** Forwarded content was hidden rather than collapsed. */ forwardedHidden: boolean; /** HTML degraded to the malformed fallback and still produced no output. */ degradedWithEmptyOutput: boolean; /** Required MIME coverage groups with no member anywhere in the output. */ missingCoverageGroups: number; /** Alternative members deliberately not emitted. Reported apart from missing groups. */ alternativesNotEmitted: number; /** Required groups represented only by hidden segments. */ coverageHiddenOnly: number; } /** * Run the structural gate over one raw message. * * Exported so the committed fixture gate and its tests exercise exactly the code the corpus run * uses, rather than a re-implementation that could drift from it. */ export declare function checkMessage(raw: Buffer): Promise; export declare function benchmarkCommand(args: ParsedArgs): Promise; //# sourceMappingURL=benchmark.d.ts.map