import { test } from "node:test"; import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { ICON_PALETTES, markSvg } from "./brand"; // common/brand/archilyzer-avatar.svg + archilyzer-avatar-1024.png: the profile // picture the operator chose on 9 Nov (PLAIN over Signal), copied verbatim from // the approved pair. They are the source of truth for the avatar on every // account; nothing renders them. This holds the SVG to the mark's geometry so a // change to MARK cannot leave the picture silently off-model: it is markSvg's // maskable variant (full-bleed ground, lines at 0.8 in the safe zone) on the // parent slate, lit achromatic, with the dim the pair was drawn with before // 2026-09-27's 3:1 bump (#3f4c56; the live mark's is ICON_PALETTES.archilyzer.dim). const AVATAR_DIM = "#3f4c56"; const file = (name: string) => fileURLToPath(new URL(`../brand/${name}`, import.meta.url)); test("the avatar SVG is the parent mark, maskable, plain (achromatic lit)", () => { const svg = readFileSync(file("archilyzer-avatar.svg"), "utf8").trimEnd(); assert.equal( svg, markSvg({ ground: ICON_PALETTES.archilyzer.ground, dim: AVATAR_DIM, lit: ICON_PALETTES.archilyzer.lit }, { variant: "maskable" }), ); }); test("the avatar PNG is a 1024 x 1024 PNG", () => { const png = readFileSync(file("archilyzer-avatar-1024.png")); assert.deepEqual([...png.subarray(0, 8)], [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]); assert.equal(png.subarray(12, 16).toString("ascii"), "IHDR"); assert.equal(png.readUInt32BE(16), 1024); assert.equal(png.readUInt32BE(20), 1024); });