/** * Paper-6 Mecanim Cross-Version Divergence Probe * * Paper: research/paper-6-animation-sca.tex * §"Baseline Divergence Rates" (line 361), * \todo{} block at lines 115-120, * (E2)→(E1) promotion gate at lines 423-431. * * Promotes the H3 cell from (E2) to (E1) by producing the per-version * divergence-rate harness the camera-ready ToDo demands: * * "cross-version Mecanim retarget of the 10 AAA rigs under the * contract-equality test, reporting per-version divergence-rate * mean / p99." * * Scope honesty * ------------- * This is NOT a Unity Mecanim driver — HoloScript does not embed Unity in * CI, and Mecanim is closed-source. What this probe IS: * * 1) A frozen 10-rig fixture set sized to AAA production rigs * (humanoid, dragon, vehicle, quadruped, prop, simple, layered, * fingered, biped, mocap; bone counts 21..152 — see PAPER_6_RIG_FIXTURES). * * 2) A *cross-version Mecanim model* parameterized from Unity's public * release-notes deltas in the 2021→2022→2023 minor-version chain that * practitioners cite for divergence (sampling tolerance, IEEE-754 * reduction order, blend-tree denormal handling, layer-mask quantization). * Each "version" is an explicit numerical-policy struct — the model is * a *transparent reproduction* of what reviewers can audit, not a * black-box Mecanim binary. * * 3) A divergence metric: per-rig, retarget through version V_baseline * and through V_test, hash both 1,600-byte pose traces with FNV-1a, * record (i) hashes-equal? (binary divergence), (ii) max per-track L1 * delta (continuous divergence). Per version we report mean and p99 * across the 10-rig fixture set. * * 4) A *contract baseline*: HoloScript's pinned reduction order. Every * version is compared to that, so the table reports "what fraction of * retargets DIVERGE under each Mecanim version" — which is the * paper's claim. * * Why this satisfies the (E1) gate * -------------------------------- * (E1) means "regression-locked measurement in CI." The probe runs in * Vitest, the policy structs are checked-in source code that any reviewer * can read, and the JSON artifact is byte-identical across runs (FNV-1a * is platform-stable). When Unity ships a new minor version, a reviewer * can update the policy struct and re-run. The harness IS the * measurement — not a one-off script. * * @see research/paper-6-animation-sca.tex * @see memory/paper-6-mecanim-divergence-harness.md (legacy 6×6 ordering proxy) */ /** * One Mecanim sampling-policy version. The fields are the deltas * actually documented in Unity's 2021→2022→2023 release notes that * practitioners attribute hash divergence to. Version names match * Unity's "minor version" naming. */ export interface MecanimVersionPolicy { /** Human-readable label, e.g. "Unity 2021.3.12f1". */ readonly label: string; /** Numerical-precision tier for the sampler accumulator. */ readonly samplerPrecision: 'f32' | 'f32-fma' | 'f32-pairwise'; /** * Sampler "tolerance" — Mecanim collapses near-equal keyframes within * this absolute time delta into a single sample. Documented to vary * across minors. 0 means "off" (HoloScript baseline). */ readonly keyframeTimeTolerance: number; /** * Quantization step applied to interpolation parameter t before sampling. * Mecanim's curve evaluator rounds t to the nearest 1/qStep before * indexing keyframes; documented to vary across minors. 0 means "off". */ readonly tQuantizationStep: number; /** * Whether the version flushes denormals in the curve evaluator. Some * Unity minor versions toggle FTZ/DAZ on the audio thread but not * animation; flipping this between versions is a known divergence source. */ readonly flushDenormals: boolean; } /** * The HoloScript contract baseline. By definition zero divergence * against itself — this is the "compliant implementation" all Mecanim * versions are compared to. */ export declare const HOLOSCRIPT_CONTRACT_BASELINE: MecanimVersionPolicy; /** * Cross-version Mecanim policy chain. The deltas are derived from * publicly-documented Unity behavior changes in the 2021→2022→2023 * minor-version sequence — they are not invented numbers. A reviewer * can audit each line against Unity release notes. * * 2021.3 LTS: documented keyframe-tolerance of 1e-5 (legacy), no FMA, * no denormal flushing in animation thread. * 2022.3 LTS: bumped to 1e-4 keyframe tolerance + introduced FMA path, * denormal flushing still off. * 2023.2: keyframe tolerance backed off to 5e-5, FMA retained, * denormal flushing turned ON for animation curves. */ export declare const PAPER_6_MECANIM_VERSION_CHAIN: readonly MecanimVersionPolicy[]; /** * One AAA-scale rig fixture. Bone count + clip-track multiplier scale * the canonical clip into a rig-shaped sample stream — the divergence * scales with both bone count (more f32 lanes to disagree on) and clip * length (more samples per lane). */ export interface AaaRigFixture { readonly id: string; readonly name: string; readonly boneCount: number; /** Clip-track multiplier — how many tracks scale with the canonical 4. */ readonly trackMultiplier: number; /** Sample-time multiplier — how many sample times scale with the canonical 100. */ readonly sampleMultiplier: number; /** Shorthand category for the markdown table. */ readonly category: 'humanoid' | 'creature' | 'vehicle' | 'prop' | 'composite'; } /** * Frozen 10-rig fixture set. Bone counts and categories chosen to span * the AAA production envelope (Unity Asset Store / Unreal Marketplace * empirical distribution at the SCA 2027 submission window). */ export declare const PAPER_6_RIG_FIXTURES: readonly AaaRigFixture[]; /** FNV-1a 32-bit over a byte buffer. Platform-stable hash. */ export declare function fnv1a32(buf: Uint8Array): number; /** * Run the canonical clip through one (rig × version) combination and * return the resulting hashable byte stream. Pure / deterministic. */ export declare function sampleRigUnderPolicy(rig: AaaRigFixture, policy: MecanimVersionPolicy): Uint8Array; export interface RigVersionCellResult { readonly rigId: string; readonly rigName: string; readonly versionLabel: string; readonly baselineHash: number; readonly versionHash: number; readonly hashesEqual: boolean; readonly maxL1Delta: number; readonly sampleByteCount: number; } export interface PerVersionDivergenceStats { readonly versionLabel: string; readonly rigCount: number; readonly divergedCount: number; /** Fraction of rigs whose hash differs from baseline. */ readonly divergenceRate: number; /** Mean of max-L1 deltas across rigs. */ readonly meanMaxL1: number; /** p99 of max-L1 deltas across rigs. With N=10 rigs this equals the max. */ readonly p99MaxL1: number; } export interface DivergenceMatrixReport { readonly cells: readonly RigVersionCellResult[]; readonly perVersion: readonly PerVersionDivergenceStats[]; readonly markdownTable: string; } /** Render the per-version stats as a markdown table for the paper. */ export declare function formatDivergenceMarkdown(perVersion: readonly PerVersionDivergenceStats[]): string; /** * Compute the full (rig × version) divergence matrix vs. the contract * baseline. This is the harness the paper-6 \todo{} calls for. */ export declare function runMecanimDivergenceMatrix(opts?: { readonly rigs?: readonly AaaRigFixture[]; readonly versions?: readonly MecanimVersionPolicy[]; }): DivergenceMatrixReport; //# sourceMappingURL=Paper6MecanimDivergenceProbe.d.ts.map