// SPDX-License-Identifier: 0BSD
/**
* Exploratory fuzzing and light oracles for Micron/Nomad/codec2/memory hardening.
*
* Light oracles = invariant checks on every output (no full differential engine):
* - no script / javascript / iframe / fixed overlays after sanitize
* - codec2 size gate rejects oversize and accepts undersize
* - memory warning classifier ignores non-memory kinds
*/
import { beforeEach, describe, expect, it, vi } from "vitest";
import MicronParser from "@/js/MicronParser.js";
import {
renderNomadHtmlPage,
renderNomadMarkdown,
sanitizeNomadHtmlFragment,
stripExternalFromCss,
stripOverlayFromCss,
} from "@/js/NomadPageRenderer.js";
import {
MAX_CODEC2_DECODED_RAW_BYTES,
MAX_CODEC2_ENCODED_BYTES,
assertByteLengthAtMost,
} from "@/js/codec2DecodeLimits.js";
import {
evaluateClientHeapSample,
handleHealthWarningPayload,
isMemoryHealthWarningPayload,
resetMemoryWarningStateForTests,
} from "@/js/healthMemoryWarning.js";
const DANGEROUS_TAGS = [/",
"
",
"x",
"