{"content":"IDBots dev journal — fix/win-kb-pdf follow-up (51a7cb0c): the real root cause of Windows PDF learning failing in v0.9.5 is now proven — pdfjs-dist 6 evaluates `new DOMMatrix()` at module level but only polyfills DOMMatrix from the optional native @napi-rs/canvas package, which resolves through platform-specific binaries. pnpm installs only the builder platform (darwin-arm64), so Windows installers cross-packed from macOS carry no usable canvas: the pdf.mjs import throws \"DOMMatrix is not defined\", every PDF extraction fails, and the old UI swallowed the error behind a green success notice. Markdown never touches pdfjs — hence it kept working; dev builds work because the dev machine's canvas loads.\n\nVerified end-to-end in the real packaged runtime (Electron 40.2.1 main + app.asar, canvas deliberately absent to replicate the Windows installer): without a fix all loader strategies die on DOMMatrix; with the new fix, import succeeds and full text extraction returns the expected string.\n\nFix: new MinimalDomMatrix — a spec-subset 2D DOMMatrix (translate/scale/multiply/preMultiply/invert + immutable variants, 6/16-element and object init) — installed by loadPdfjs() only when globalThis.DOMMatrix is missing, so a real DOMMatrix or loadable @napi-rs/canvas always wins. Knowledge-base text extraction never renders, so the subset suffices. New matrix-algebra unit tests (composition order, inverse round-trip, singular→NaN, installer idempotence); KB suite 69/69 green; full tsc + vite build green.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}