<commit_before>diff --git i/lib/k3/Core/Optimization.k3 w/lib/k3/Core/Optimization.k3
index 19f1b1f..6b03345 100644
--- i/lib/k3/Core/Optimization.k3
+++ w/lib/k3/Core/Optimization.k3
@@ -8,8 +8,8 @@ control ManualFusion {
   ) : collection ?t @IntMap
   => ( ($.[e].fold @:AccumulatingTransformer)
                    (\acc2 -> \v ->
-                     if $.[filterF] v then
-                     ( let k  = $.[gbF1] v in
+                     if ($.[filterF] v) @:NoBetaReduce then
+                     ( let k  = ($.[gbF1] v) @:{FusionSource, NoBetaReduce} in
                        let k2 = $.[gbF2] {key: k, value: $.[z1]} in
                        ((acc2.upsert_with {key: k2, value: $.[fz1]}
                            (\_ -> let ncz1 = $.[fz1] in
@@ -17,8 +17,8 @@ control ManualFusion {
                                    {key: k2, value: ncz1})
                            )
                            (\acc -> ((acc.value.upsert_with {key:k, value: $.[z1]}
-                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v)})
-                                        (\old -> {key: k, value: (($.[accF1] old.value) v)}));
+                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v) @: {FusionSource, NoBetaReduce}})
+                                        (\old -> {key: k, value: (($.[accF1] old.value) v) @: {FusionSource, NoBetaReduce}}));
                                      acc)
                            ));
                          acc2)
@@ -37,8 +37,8 @@ control ManualFusion {
   ) : collection ?t @StrMap
   => ( ($.[e].fold @:AccumulatingTransformer)
                    (\acc2 -> \v ->
-                     if $.[filterF] v then
-                     ( let k  = $.[gbF1] v in
+                     if ($.[filterF] v) @:{FusionSource, NoBetaReduce} then
+                     ( let k  = ($.[gbF1] v) @:{FusionSource, NoBetaReduce} in
                        let k2 = $.[gbF2] {key: k, value: $.[z1]} in
                        ((acc2.upsert_with {key: k2, value: $.[fz1]}
                            (\_ -> let ncz1 = $.[fz1] in
@@ -46,8 +46,8 @@ control ManualFusion {
                                    {key: k2, value: ncz1})
                            )
                            (\acc -> ((acc.value.upsert_with {key:k, value: $.[z1]}
-                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v)})
-                                        (\old -> {key: k, value: (($.[accF1] old.value) v)}));
+                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v) @: {FusionSource, NoBetaReduce}})
+                                        (\old -> {key: k, value: (($.[accF1] old.value) v) @: {FusionSource, NoBetaReduce}}));
                                      acc)
                            ));
                          acc2)
@@ -66,8 +66,8 @@ control ManualFusion {
   ) : collection ?t @Map
   => ( ($.[e].fold @:AccumulatingTransformer)
                    (\acc2 -> \v ->
-                     if $.[filterF] v then
-                     ( let k  = $.[gbF1] v in
+                     if ($.[filterF] v) @:{FusionSource, NoBetaReduce} then
+                     ( let k  = ($.[gbF1] v) @:{FusionSource, NoBetaReduce} in
                        let k2 = $.[gbF2] {key: k, value: $.[z1]} in
                        ((acc2.upsert_with {key: k2, value: $.[fz1]}
                            (\_ -> let ncz1 = $.[fz1] in
@@ -75,8 +75,8 @@ control ManualFusion {
                                    {key: k2, value: ncz1})
                            )
                            (\acc -> ((acc.value.upsert_with {key:k, value: $.[z1]}
-                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v)})
-                                        (\old -> {key: k, value: (($.[accF1] old.value) v)}));
+                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v) @: {FusionSource, NoBetaReduce}})
+                                        (\old -> {key: k, value: (($.[accF1] old.value) v) @: {FusionSource, NoBetaReduce}}));
                                      acc)
                            ));
                          acc2)
<commit_msg>Fix manual fusion source patch to attach to function.<commit_after>diff --git i/lib/k3/Core/Optimization.k3 w/lib/k3/Core/Optimization.k3
index 19f1b1f..ff23368 100644
--- i/lib/k3/Core/Optimization.k3
+++ w/lib/k3/Core/Optimization.k3
@@ -8,8 +8,8 @@ control ManualFusion {
   ) : collection ?t @IntMap
   => ( ($.[e].fold @:AccumulatingTransformer)
                    (\acc2 -> \v ->
-                     if $.[filterF] v then
-                     ( let k  = $.[gbF1] v in
+                     if ($.[filterF] v) @:NoBetaReduce then
+                     ( let k  = ($.[gbF1] v) @:{FusionSource, NoBetaReduce} in
                        let k2 = $.[gbF2] {key: k, value: $.[z1]} in
                        ((acc2.upsert_with {key: k2, value: $.[fz1]}
                            (\_ -> let ncz1 = $.[fz1] in
@@ -17,8 +17,8 @@ control ManualFusion {
                                    {key: k2, value: ncz1})
                            )
                            (\acc -> ((acc.value.upsert_with {key:k, value: $.[z1]}
-                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v)})
-                                        (\old -> {key: k, value: (($.[accF1] old.value) v)}));
+                                        (\_   -> {key: k, value: ((($.[accF1]) @:FusionSource $.[z1]) v) @: {NoBetaReduce}})
+                                        (\old -> {key: k, value: ((($.[accF1]) @:FusionSource  old.value) v) @: {NoBetaReduce}}));
                                      acc)
                            ));
                          acc2)
@@ -37,8 +37,8 @@ control ManualFusion {
   ) : collection ?t @StrMap
   => ( ($.[e].fold @:AccumulatingTransformer)
                    (\acc2 -> \v ->
-                     if $.[filterF] v then
-                     ( let k  = $.[gbF1] v in
+                     if (($.[filterF]) @:FusionSource v) @:NoBetaReduce then
+                     ( let k  = ($.[gbF1] v) @:{FusionSource, NoBetaReduce} in
                        let k2 = $.[gbF2] {key: k, value: $.[z1]} in
                        ((acc2.upsert_with {key: k2, value: $.[fz1]}
                            (\_ -> let ncz1 = $.[fz1] in
@@ -46,8 +46,8 @@ control ManualFusion {
                                    {key: k2, value: ncz1})
                            )
                            (\acc -> ((acc.value.upsert_with {key:k, value: $.[z1]}
-                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v)})
-                                        (\old -> {key: k, value: (($.[accF1] old.value) v)}));
+                                        (\_   -> {key: k, value: ((($.[accF1]) @:FusionSource $.[z1]) v) @: {NoBetaReduce}})
+                                        (\old -> {key: k, value: ((($.[accF1]) @:FusionSource  old.value) v) @: {NoBetaReduce}}));
                                      acc)
                            ));
                          acc2)
@@ -66,8 +66,8 @@ control ManualFusion {
   ) : collection ?t @Map
   => ( ($.[e].fold @:AccumulatingTransformer)
                    (\acc2 -> \v ->
-                     if $.[filterF] v then
-                     ( let k  = $.[gbF1] v in
+                     if (($.[filterF]) @:FusionSource v) @:NoBetaReduce then
+                     ( let k  = ($.[gbF1] v) @:{FusionSource, NoBetaReduce} in
                        let k2 = $.[gbF2] {key: k, value: $.[z1]} in
                        ((acc2.upsert_with {key: k2, value: $.[fz1]}
                            (\_ -> let ncz1 = $.[fz1] in
@@ -75,8 +75,8 @@ control ManualFusion {
                                    {key: k2, value: ncz1})
                            )
                            (\acc -> ((acc.value.upsert_with {key:k, value: $.[z1]}
-                                        (\_   -> {key: k, value: (($.[accF1] $.[z1]) v)})
-                                        (\old -> {key: k, value: (($.[accF1] old.value) v)}));
+                                        (\_   -> {key: k, value: ((($.[accF1]) @:FusionSource $.[z1]) v) @: {NoBetaReduce}})
+                                        (\old -> {key: k, value: ((($.[accF1]) @:FusionSource  old.value) v) @: {NoBetaReduce}}));
                                      acc)
                            ));
                          acc2)

{'fraction_non_alphanumeric': 0.18002105509416305, 'fraction_numerical': 0.028190431629430343, 'mean_word_length': 0.9777931991672449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '13067', 'n_tokens_mistral': 2779, 'n_tokens_neox': 2646, 'n_words': 594}