{ "original_protected_helper": { "path": "browser/preprocess.mjs", "bytes": 9084, "sha256": "ecac4508ce345ccc0dde47b51e1692f1c3f43348181f52d1551814fcbcbd6a13" }, "new_helper": { "source": "../../webbrain/src/chrome/src/providers/d1-preprocess.js", "destination": "runtime/d1-preprocess.js", "bytes": 9407, "sha256": "00569ab7cae839e0e3b54b92a319aa0b5591a87c5dec67dac48cabe2d1464d9e" }, "changes": [ { "before": "const no=c.false ?? c.no,yes=c.true ?? c.yes;", "after": "const no=Object.hasOwn(c,'false')?c.false:c.no,yes=Object.hasOwn(c,'true')?c.true:c.yes;", "purpose": "Python dict.get present-null false/true criteria semantics" }, { "before": " return JSON.stringify(value);\n}", "after": " if(typeof value==='number') {\n if(!Number.isFinite(value)) throw new Error('D1 JSON numbers must be finite');\n if(!Number.isInteger(value)&&Math.abs(value)<1e-4) return value.toExponential().replace(/e([+-])(\\d+)$/,(all,sign,digits)=>'e'+sign+digits.padStart(2,'0'));\n }\n return JSON.stringify(value);\n}", "purpose": "Finite small fractional Python-style exponent serialization" } ], "numeric_type_caveat": "JS Number cannot recover Python int versus integral-float distinctions; use preformatted strings for exact source lexical semantics", "old_helper_untouched": true, "other_helper_bytes_exact": true }