From 9ff4bef8944d7fc62552adff23a8b75c9c6671be Mon Sep 17 00:00:00 2001 From: sorte1 Date: Fri, 20 Nov 2026 08:02:38 +0100 Subject: [PATCH 1/6] fix: under --unsafe, fold a control-flow object whose escapes and writes all sit in branches, and rerun without it unless those uses are gone at the end --- .../src/control_flow_object/declared.rs | 33 +++++++++++++++++-- crates/untwist-deobfuscate/src/driver.rs | 1 + .../untwist-deobfuscate/src/legacy_reach.rs | 31 +++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/crates/untwist-deobfuscate/src/control_flow_object/declared.rs b/crates/untwist-deobfuscate/src/control_flow_object/declared.rs index 300bd554..ecb26179 100644 --- a/crates/untwist-deobfuscate/src/control_flow_object/declared.rs +++ b/crates/untwist-deobfuscate/src/control_flow_object/declared.rs @@ -13,6 +13,7 @@ use untwist_core::ast_util::search::expressions_at; use untwist_core::pass::{Cx, NoteKind, RepeatedSites}; use untwist_core::semantic::is_constant_binding; +use crate::branch_reach::in_branches; use crate::init_order::{ reads_are_initialised, refuse_read_before_declaration, scan_init_order, InitOrder, }; @@ -298,7 +299,12 @@ fn substitutable_uses<'u>( let branches = located.branches(cx.scoping()); let dead = dead_branch_parts(branches, candidate.symbol, &props, &*cx); if dead.is_empty() { - return None; + return speculated_mutations(located.program, candidate, uses, cx).then_some( + Substitutable { + uses, + dead: Vec::new(), + }, + ); } let only_dead = !uses.reads.is_empty() && mutations_only_in_dead_parts( @@ -308,7 +314,7 @@ fn substitutable_uses<'u>( &mutation_spans(uses), cx.scoping(), ); - if !only_dead { + if !only_dead && !speculated_mutations(located.program, candidate, uses, cx) { cx.note(notes::CONTROL_FLOW_LIVE_MUTATION, Some(candidate.statement)); return None; } @@ -320,6 +326,29 @@ fn substitutable_uses<'u>( Some(Substitutable { uses, dead }) } +fn speculated_mutations( + program: &Program<'_>, + candidate: &DeclaredObject, + uses: &ObjectUses, + cx: &Cx<'_, '_>, +) -> bool { + if !cx.opts.unsafe_transforms + || !crate::legacy_reach::speculates_escapes() + || uses.reads.is_empty() + { + return false; + } + let mutations = mutation_spans(uses); + let spans: FxHashSet = mutations.iter().copied().collect(); + if spans.is_empty() || in_branches(program, cx.scoping(), &spans).len() != spans.len() { + return false; + } + let mut deferred = vec![cx.scoping().symbol_span(candidate.symbol)]; + deferred.extend(mutations); + crate::legacy_reach::defer_escapes(&deferred); + true +} + fn is_redeclared(scoping: &Scoping, symbol: SymbolId) -> bool { !scoping.symbol_redeclarations(symbol).is_empty() } diff --git a/crates/untwist-deobfuscate/src/driver.rs b/crates/untwist-deobfuscate/src/driver.rs index 6317ada8..35104615 100644 --- a/crates/untwist-deobfuscate/src/driver.rs +++ b/crates/untwist-deobfuscate/src/driver.rs @@ -978,6 +978,7 @@ fn deobfuscate_with<'a>( sem.scoping .symbol_ids() .any(|symbol| decoders.contains(&sem.scoping.symbol_span(symbol))) + || crate::legacy_reach::identifiers_survive(program, decoders) }); let sem = finalize_unresolved_machinery(alloc, program, sem, (opts, &shared), &mut aggregate); let sem = match &before { diff --git a/crates/untwist-deobfuscate/src/legacy_reach.rs b/crates/untwist-deobfuscate/src/legacy_reach.rs index 072fa6d6..1dd47775 100644 --- a/crates/untwist-deobfuscate/src/legacy_reach.rs +++ b/crates/untwist-deobfuscate/src/legacy_reach.rs @@ -1,5 +1,7 @@ use std::cell::RefCell; +use oxc_ast::ast::{BindingIdentifier, CallExpression, IdentifierReference, Program}; +use oxc_ast_visit::VisitJs; use oxc_span::Span; use crate::mutants::deferred_legacy_reach_trusted; @@ -97,6 +99,35 @@ pub(crate) fn defer_escapes(decoders: &[Span]) { DEFERRAL.with(|deferral| deferral.borrow_mut().escapes.extend_from_slice(decoders)); } +struct Surviving<'s> { + spans: &'s [Span], + found: bool, +} + +impl<'a> VisitJs<'a> for Surviving<'_> { + fn visit_identifier_reference(&mut self, it: &IdentifierReference<'a>) { + self.found |= self.spans.contains(&it.span); + } + + fn visit_binding_identifier(&mut self, it: &BindingIdentifier<'a>) { + self.found |= self.spans.contains(&it.span); + } + + fn visit_call_expression(&mut self, it: &CallExpression<'a>) { + self.found |= self.spans.contains(&it.span); + oxc_ast_visit::walk_js::walk_call_expression(self, it); + } +} + +pub(crate) fn identifiers_survive(program: &Program<'_>, spans: &[Span]) -> bool { + let mut surviving = Surviving { + spans, + found: false, + }; + surviving.visit_program(program); + surviving.found +} + pub(crate) fn settle_escapes(survives: impl FnOnce(&[Span]) -> bool) { let escapes = DEFERRAL.with(|deferral| std::mem::take(&mut deferral.borrow_mut().escapes)); if !escapes.is_empty() && survives(&escapes) { From 63c0f610f92c72391d7e30fa8a95f410a9af7e4c Mon Sep 17 00:00:00 2001 From: sorte1 Date: Fri, 20 Nov 2026 08:02:38 +0100 Subject: [PATCH 2/6] test: sweep rows for a control-flow object that escapes in a dead branch and one that escapes in a live branch --- .../obfuscator_sweep/cfo-escape-in-branch.js | 1 + .../cfo-escape-in-branch.source.js | 45 ++++++ .../data/obfuscator_sweep/cfo-live-escape.js | 137 ++++++++++++++++++ crates/untwist/tests/obfuscator_sweep_rows.rs | 9 ++ 4 files changed, 192 insertions(+) create mode 100644 crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.js create mode 100644 crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.source.js create mode 100644 crates/untwist/tests/data/obfuscator_sweep/cfo-live-escape.js diff --git a/crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.js b/crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.js new file mode 100644 index 00000000..22cf2abd --- /dev/null +++ b/crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.js @@ -0,0 +1 @@ +function obfh(a,b){a=a-0x0;const c=obfg();let d=c[a];return d;}function obfi(a,b){a=a-0x0;const c=obfg();let d=c[a];if(obfi['\x6f\x52\x78\x69\x78\x4d']===undefined){var e=function(h){const i='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let j='',l='';for(let m=0x0,n,o,p=0x0;o=h['\x63\x68\x61\x72\x41\x74'](p++);~o&&(n=m%0x4?n*0x40+o:o,m++%0x4)?j+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&n>>(-0x2*m&0x6)):0x0){o=i['\x69\x6e\x64\x65\x78\x4f\x66'](o);}for(let q=0x0,r=j['\x6c\x65\x6e\x67\x74\x68'];q>(-0x2*n&0x6)):0x0){p=j['\x69\x6e\x64\x65\x78\x4f\x66'](p);}for(let r=0x0,s=l['\x6c\x65\x6e\x67\x74\x68'];r>s;},'\x4b\x62\x5a\x41\x79':function(r,s){return r&s;},'\x74\x6f\x79\x63\x69':bm(0x237,'\x63\x4a\x6e\x57'),'\x50\x76\x67\x72\x6e':bo('\x30\x78\x39\x64'),'\x68\x66\x54\x46\x4c':function(r,s){return r>q;},'\x74\x49\x4c\x62\x6a':function(p,q){return p*q;},'\x6c\x48\x59\x79\x57':function(p,q){return p===q;},'\x72\x4b\x6a\x55\x48':d2('\x30\x78\x66\x65'),'\x4e\x70\x73\x48\x53':d2(0x27c),'\x50\x68\x68\x54\x65':'\x69\x6e\x64\x65\x78\x4f\x66','\x6c\x4a\x6c\x4a\x4b':d5(0x9d),'\x65\x6f\x45\x70\x57':function(p,q){return pb*0x2,increment=b=>b+0x1,pipeline=compose(double,increment);function sum(...d){const dj=obfh,dl=obfh,dh=obfi,di=obfi,dg=obfj,dk=obfj,e={'\x45\x6c\x6b\x54\x45':function(i,j){return i===j;},'\x74\x6c\x65\x58\x6a':dg('\x30\x78\x64','\x58\x4f\x38\x48'),'\x66\x76\x4e\x53\x66':dh('\x30\x78\x32\x64'),'\x6a\x6d\x54\x63\x4b':dh('\x30\x78\x31\x33\x34'),'\x62\x56\x76\x6d\x54':di('\x30\x78\x31\x63\x64'),'\x49\x65\x58\x78\x69':dj(0x1b7),'\x6f\x77\x56\x65\x61':dh('\x30\x78\x32\x63\x62'),'\x69\x68\x55\x56\x4e':di('\x30\x78\x32\x39\x66'),'\x69\x6b\x46\x75\x79':dk('\x30\x78\x31\x63\x35','\x67\x28\x35\x32'),'\x58\x79\x7a\x51\x6f':function(i,j){return ii+j,0x0);}function greetAll(c='\x68\x69',...d){const dv=obfh,du=obfi,e={'\x75\x76\x72\x4d\x73':function(h,i){return h(i);},'\x69\x65\x50\x52\x65':function(h,i,j){return h(i,j);},'\x66\x68\x69\x5a\x69':'\x54\x73\x34\x37'},f=obff,g=obfe;return d[e[du(0x17e)](g,0x2f)](h=>c+'\x20'+h)[e[dv('\x30\x78\x32\x37\x62')](f,0x2e,e['\x66\x68\x69\x5a\x69'])]('\x3b\x20');}const counter=makeCounter(0xa);counter[obfa9(0xa)](),counter[obfaa(obfdw(0x1e2))](),console[obfdx('\x30\x78\x62')](obfab(obfdy('\x30\x78\x31\x32\x38','\x31\x38\x45\x26')),factorial(0x7)),console[obfab(obfdz(0x15c,'\x30\x70\x44\x23'))](obfdA('\x30\x78\x32\x38\x65'),pipeline(0x14)),console[obfac(0x9)](obfad('\x30\x78\x31\x66','\x31\x52\x24\x62'),counter[obfac(0xa)](),counter[obfad(obfdB('\x30\x78\x31\x62\x34'),obfdy(0xeb,'\x75\x77\x36\x66'))]()),console[obfdA(0x2d)](obfab(0x1a),sum(0x4,0x8,0xf,0x10,0x17,0x2a)),console[obfdB('\x30\x78\x32\x64')](obfac(0x29),greetAll(undefined,'\x6e\x6f\x72\x74\x68',obfad(obfdw('\x30\x78\x31\x37\x32'),'\x29\x6f\x67\x26'))),console[obfdB(0x2d)](obfdz('\x30\x78\x65\x33','\x55\x75\x36\x5d'),Math[obfaa(obfdz(0x279,'\x67\x28\x35\x32'))][obfaa(obfdA(0xc2))](null,[0x3,0x9,0x1])); diff --git a/crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.source.js b/crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.source.js new file mode 100644 index 00000000..d7df4acc --- /dev/null +++ b/crates/untwist/tests/data/obfuscator_sweep/cfo-escape-in-branch.source.js @@ -0,0 +1,45 @@ +function factorial(n) { + return n <= 1 ? 1 : n * factorial(n - 1); +} + +function compose(first, second) { + return function (value) { + return second(first(value)); + }; +} + +function makeCounter(start) { + var count = start; + return { + next: function () { + count += 1; + return count; + }, + reset: function () { + count = start; + return count; + }, + }; +} + +const double = (x) => x * 2; +const increment = (x) => x + 1; +const pipeline = compose(double, increment); + +function sum(...values) { + return values.reduce((total, value) => total + value, 0); +} + +function greetAll(greeting = "hi", ...names) { + return names.map((name) => greeting + " " + name).join("; "); +} + +const counter = makeCounter(10); +counter.next(); +counter.next(); +console.log("factorial", factorial(7)); +console.log("pipeline", pipeline(20)); +console.log("counter", counter.next(), counter.reset()); +console.log("sum", sum(4, 8, 15, 16, 23, 42)); +console.log("greet", greetAll(undefined, "north", "south")); +console.log("apply", Math.max.apply(null, [3, 9, 1])); diff --git a/crates/untwist/tests/data/obfuscator_sweep/cfo-live-escape.js b/crates/untwist/tests/data/obfuscator_sweep/cfo-live-escape.js new file mode 100644 index 00000000..9baca2bc --- /dev/null +++ b/crates/untwist/tests/data/obfuscator_sweep/cfo-live-escape.js @@ -0,0 +1,137 @@ +function l(a) { + if (a <= 1) { + return 1; + } else { + return a * l(a - 1); + } +} +function m(a, b) { + const f = { + q: function (i, j) { + return i(j); + }, + o: function (i, j) { + return i !== j; + }, + k: 396 + }; + return function (d) { + if (f.o(d, 20)) { + return f.q(b, a(d)); + } else { + return f.q(String, f.k) + [f].length + d; + } + }; +} +function n() { + const a = ["sCkmBq", "W57dMZzE", "CKFdJSkSWPy", "W6hdGmkWymkudq", "krpcNa", "imk7W5PQ", "hfFcR8ot", "WORdLMu", "FSkala", "ev3cOSojWQBdPLK", "kmoKW4tdMG", "auFcUG", "DSoRW65Exa", "dvldOLxcQa", "WR1MW7G", "WRDMhCokbq"]; + n = function () { + return a; + }; + return n(); +} +function o(a) { + let b = a; + return { + next: function () { + b += 1; + return b; + }, + reset: function () { + if (s(398, "8Xtm") !== "oLSdd") { + r = a; + return s; + } else { + b = a; + return b; + } + } + }; +} +const p = (a) => a * 2; +const q = (a) => a + 1; +function r(y, z) { + return s(y - 540, z); +} +function s(b, d) { + b = b - 396; + const e = n(); + let f = e[b]; + if (s.g === undefined) { + var y = function (G) { + const H = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/="; + let I = ""; + let J = ""; + for (let K = 0, M, O, P = 0; O = G.charAt(P++); ~O && (M = K % 4 ? M * 64 + O : O, K++ % 4) ? I += String.fromCharCode(M >> (K * -2 & 6) & 255) : 0) { + O = H.indexOf(O); + } + for (let Q = 0, R = I.length; Q < R; Q++) { + J += "%" + ("00" + I.charCodeAt(Q).toString(16)).slice(-2); + } + return decodeURIComponent(J); + }; + const C = function (G, H) { + const I = []; + let J = 0; + let K; + let M = ""; + G = y(G); + let N; + for (N = 0; N < 256; N++) { + I[N] = N; + } + for (N = 0; N < 256; N++) { + J = (J + I[N] + H.charCodeAt(N % H.length)) % 256; + K = I[N]; + I[N] = I[J]; + I[J] = K; + } + N = 0; + J = 0; + for (let O = 0; O < G.length; O++) { + N = (N + 1) % 256; + J = (J + I[N]) % 256; + K = I[N]; + I[N] = I[J]; + I[J] = K; + M += String.fromCharCode(G.charCodeAt(O) ^ I[(I[N] + I[J]) % 256]); + } + return M; + }; + s.h = C; + s.i = {}; + s.g = true; + } + const z = e[0]; + if (s.j !== z) { + s.i = {}; + s.j = z; + } + const A = s.i[b]; + if (A === undefined) { + if (s.k === undefined) { + s.k = true; + } + f = s.h(f, d); + s.i[b] = f; + } else { + f = A; + } + return f; +} +const t = m(p, q); +function u(...a) { + return a[s(399, "tGUI")]((d, e) => d + e, 0); +} +function v(a = "hi", ...b) { + return b[s(400, "*K8E")]((e) => a + " " + e).join("; "); +} +const w = o(10); +w[r(941, "9rMg")](); +w[r(942, "Thtg")](); +console[r(943, "7[SN")]("factorial", l(7)); +console.log("pipeline", t(20)); +console[r(944, "0BiL")](r(945, "Thtg"), w[r(946, "&cNR")](), w.reset()); +console.log(r(947, "Thtg"), u(4, 8, 15, 16, 23, 42)); +console.log(r(948, "tfR)"), v(undefined, r(949, "si0]"), "south")); +console[r(950, "WQxH")](r(951, "4*4b"), Math.max.apply(null, [3, 9, 1])); diff --git a/crates/untwist/tests/obfuscator_sweep_rows.rs b/crates/untwist/tests/obfuscator_sweep_rows.rs index 22645576..e19aad60 100644 --- a/crates/untwist/tests/obfuscator_sweep_rows.rs +++ b/crates/untwist/tests/obfuscator_sweep_rows.rs @@ -29,6 +29,7 @@ const DECODED_UNDER_UNSAFE: &[&str] = &[ "wrapper-in-inner-decoder", "strict-block-wrapper", "block-wrapper-dead-write", + "cfo-escape-in-branch", ]; const FINGERPRINTS: &[&str] = &[ @@ -122,6 +123,14 @@ fn dead_code_and_control_flow_cases_print_the_source_output_under_unsafe() { } } +#[test] +fn a_control_flow_object_that_escapes_in_a_live_branch_prints_like_node_under_unsafe() { + let source = read("cfo-live-escape.js"); + let output = unsafe_lane(&source); + assert!(output.contains("[f].length"), "{output}"); + prints_the_same(&source, &output); +} + #[test] fn a_self_defending_block_a_later_layer_put_in_a_control_flow_function_is_removed() { let output = unsafe_lane(&read("sd-controller-survives.js")); From e52cb3da476a98e97d5b7fb7deb61601a817f1eb Mon Sep 17 00:00:00 2001 From: sorte1 Date: Fri, 20 Nov 2026 08:12:27 +0100 Subject: [PATCH 3/6] fix: speculate on a control-flow object only when its calls pass a decoder, so other programs are not run twice --- .../src/control_flow_object/declared.rs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/crates/untwist-deobfuscate/src/control_flow_object/declared.rs b/crates/untwist-deobfuscate/src/control_flow_object/declared.rs index ecb26179..b735d9e1 100644 --- a/crates/untwist-deobfuscate/src/control_flow_object/declared.rs +++ b/crates/untwist-deobfuscate/src/control_flow_object/declared.rs @@ -338,6 +338,9 @@ fn speculated_mutations( { return false; } + if !hides_decoder_calls(program, cx.scoping(), candidate.symbol) { + return false; + } let mutations = mutation_spans(uses); let spans: FxHashSet = mutations.iter().copied().collect(); if spans.is_empty() || in_branches(program, cx.scoping(), &spans).len() != spans.len() { @@ -349,6 +352,51 @@ fn speculated_mutations( true } +struct DecoderArguments<'s> { + scoping: &'s Scoping, + object: SymbolId, + found: bool, +} + +impl DecoderArguments<'_> { + fn on_object(&self, callee: &Expression<'_>) -> bool { + let Some(member) = callee.without_parentheses().as_member_expression() else { + return false; + }; + let Expression::Identifier(id) = member.object().without_parentheses() else { + return false; + }; + id.reference_id + .get() + .and_then(|reference| self.scoping.get_reference(reference).symbol_id()) + == Some(self.object) + } +} + +impl<'a> VisitJs<'a> for DecoderArguments<'_> { + fn visit_call_expression(&mut self, it: &CallExpression<'a>) { + if self.found { + return; + } + self.found = self.on_object(&it.callee) + && it.arguments.iter().any(|argument| { + matches!(argument, Argument::Identifier(id) + if untwist_core::machinery_name::decoder_index(id.name.as_str()).is_some()) + }); + walk_js::walk_call_expression(self, it); + } +} + +fn hides_decoder_calls(program: &Program<'_>, scoping: &Scoping, object: SymbolId) -> bool { + let mut search = DecoderArguments { + scoping, + object, + found: false, + }; + search.visit_program(program); + search.found +} + fn is_redeclared(scoping: &Scoping, symbol: SymbolId) -> bool { !scoping.symbol_redeclarations(symbol).is_empty() } From 3445b805821ed20daad024e755b040f0f943b1ad Mon Sep 17 00:00:00 2001 From: sorte1 Date: Fri, 20 Nov 2026 09:59:49 +0100 Subject: [PATCH 4/6] fix: open the control-flow object speculation when the program passes a decoder to any member call --- .../src/control_flow_object/declared.rs | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/crates/untwist-deobfuscate/src/control_flow_object/declared.rs b/crates/untwist-deobfuscate/src/control_flow_object/declared.rs index b735d9e1..0c6c4d2d 100644 --- a/crates/untwist-deobfuscate/src/control_flow_object/declared.rs +++ b/crates/untwist-deobfuscate/src/control_flow_object/declared.rs @@ -338,7 +338,7 @@ fn speculated_mutations( { return false; } - if !hides_decoder_calls(program, cx.scoping(), candidate.symbol) { + if !passes_decoders_to_members(program) { return false; } let mutations = mutation_spans(uses); @@ -352,33 +352,17 @@ fn speculated_mutations( true } -struct DecoderArguments<'s> { - scoping: &'s Scoping, - object: SymbolId, +#[derive(Default)] +struct DecoderArguments { found: bool, } -impl DecoderArguments<'_> { - fn on_object(&self, callee: &Expression<'_>) -> bool { - let Some(member) = callee.without_parentheses().as_member_expression() else { - return false; - }; - let Expression::Identifier(id) = member.object().without_parentheses() else { - return false; - }; - id.reference_id - .get() - .and_then(|reference| self.scoping.get_reference(reference).symbol_id()) - == Some(self.object) - } -} - -impl<'a> VisitJs<'a> for DecoderArguments<'_> { +impl<'a> VisitJs<'a> for DecoderArguments { fn visit_call_expression(&mut self, it: &CallExpression<'a>) { if self.found { return; } - self.found = self.on_object(&it.callee) + self.found = it.callee.without_parentheses().is_member_expression() && it.arguments.iter().any(|argument| { matches!(argument, Argument::Identifier(id) if untwist_core::machinery_name::decoder_index(id.name.as_str()).is_some()) @@ -387,12 +371,8 @@ impl<'a> VisitJs<'a> for DecoderArguments<'_> { } } -fn hides_decoder_calls(program: &Program<'_>, scoping: &Scoping, object: SymbolId) -> bool { - let mut search = DecoderArguments { - scoping, - object, - found: false, - }; +fn passes_decoders_to_members(program: &Program<'_>) -> bool { + let mut search = DecoderArguments::default(); search.visit_program(program); search.found } From b6395adaaeb4f97cb9d204f42701b18d02624af6 Mon Sep 17 00:00:00 2001 From: sorte1 Date: Fri, 20 Nov 2026 11:51:23 +0100 Subject: [PATCH 5/6] ci(web): wasm baseline 14,925,000 (cap 16,417,500) with the control-flow object speculation on top of main --- web/scripts/size.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/scripts/size.ts b/web/scripts/size.ts index 1cb96155..f54e8911 100644 --- a/web/scripts/size.ts +++ b/web/scripts/size.ts @@ -12,7 +12,7 @@ const INITIAL_JS_GZIP = 190_000; const CSS_GZIP = 15_000; const FONT_BYTES = 120_000; const SW_GZIP = 4_000; -const WASM_BASELINE_BYTES = 14_910_000; +const WASM_BASELINE_BYTES = 14_925_000; const WASM_GROWTH = 0.1; const gzip = (bytes: Buffer): number => gzipSync(bytes, { level: 9 }).length; From d6de4e1cd8c01ca51825e369e3bb3190a52ecf22 Mon Sep 17 00:00:00 2001 From: sorte1 Date: Fri, 20 Nov 2026 15:03:19 +0100 Subject: [PATCH 6/6] ci(web): wasm baseline 14,926,000 (cap 16,418,600) for 16,417,910 bytes on top of main --- web/scripts/size.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/scripts/size.ts b/web/scripts/size.ts index f54e8911..2cd045ea 100644 --- a/web/scripts/size.ts +++ b/web/scripts/size.ts @@ -12,7 +12,7 @@ const INITIAL_JS_GZIP = 190_000; const CSS_GZIP = 15_000; const FONT_BYTES = 120_000; const SW_GZIP = 4_000; -const WASM_BASELINE_BYTES = 14_925_000; +const WASM_BASELINE_BYTES = 14_926_000; const WASM_GROWTH = 0.1; const gzip = (bytes: Buffer): number => gzipSync(bytes, { level: 9 }).length;