Files
pxpipe/src
teamchong c3506e3a2c fix(transform): flip compressHistory default to false
Round-3 measurement on 2026-05-19 with 128-turn history showed the
feature loses money: 21K chars of text replaced with 140K tokens of
imagery, net -250% savings per request on this traffic shape.

The MARGINAL warning has been in the code comments since the feature
shipped - it was opt-in via --history / COMPRESS_HISTORY=1 originally
for exactly this reason. The recent flag-removal commit flipped it on
as default without re-verifying the savings claim against current
traffic.

The math in baselineCost() correctly reports negative savings when
imgTokensEst > txtReplaced, so the dashboard was honest about the
loss - the bug is shipping the feature on by default before measuring
a positive delta on representative traffic.

Re-enable per-deployment via env var when measurement confirms a
positive saved_pct on the specific shape.
2026-05-19 17:33:34 -04:00
..