Skip to content

v1.6.1 — four languages reduce, and the dials that did nothing are gone

Choose a tag to compare

@ojassug ojassug released this 29 Aug 20:53
· 123 commits to main since this release
83d570a

Four languages reduce instead of three, and four Gateway defects that reached provider traffic are fixed. This release closes Lane A of oxaudit.md and all of Lane B except two items held open for a decision.

The one thing that can break a script

--trace-output is now Unknown argument, and explain is rejected rather than ignored from --mode, TOKENDAMPER_APP_MODE and the config file. Nothing that took effect stops taking effect — neither dial was ever read by anything — but a wrapper passing --trace-output stderr will now exit non-zero. A config file still carrying a traceOutput key keeps loading, and the trace itself has not moved: stderr, as always.

Numbered as a patch, but the output moved

Two changes here alter what the same command emits for the same input — Go now elides, and debtScore reports a measurement rather than a constant pinned at its clamp. Pin exactly if your tooling depends on byte-stable output or parses debtScore out of the trace.

What ships

§62 --trace-output / TOKENDAMPER_TRACE_OUTPUT withdrawn; explain rejected from --mode / TOKENDAMPER_APP_MODE / the config file. Both were parsed, validated and frozen onto ResolvedConfig — and read by nothing.
§59–§61 Go elides. 27.46% on application Go, 19.42% on the stdlib at target 0.3, against this repo's TypeScript at 21.22%. The 287-file main corpus is 574/574 byte-identical, because every Go path is gated on the language. _test.go is where most of the saving is: 26.88% against 14.42% for source.
§64 debtScore read exactly 35.00 on 317 of 317 rows carrying debt — the clamp ceiling — whether the file lost 4.7% or 66.8%. It now tracks the measured byte cut with correlation 1.0000, and all 578 rows stay byte-identical.
§65 One content: null message no longer zeroes a whole request's Gateway saving. The standard OpenAI tool-call shape produced a search string of "null" with quotes, missed, and discarded every other message's replacement — 8,685 bytes sent, 8,685 forwarded. Array content failed identically, which is why the fix is a structural span scan.
§66 The Gateway no longer truncates streaming responses after 30 seconds. A fetch signal keeps governing the response body stream after the promise resolves, so "stream": true answers died mid-generation — on precisely the traffic the Gateway intercepts by default. The budget is now time-to-first-byte.
§67 Within-payload deduplication works on the first turn. It was gated on the block also having been seen in a previous turn, a condition doing no safety work.
§68 Pricing a candidate region no longer registers it with the block store — 12 blocks registered against 5 emitted on a 12-region file.
§58 --keep-docstrings keeps a Python function's docstring when its body is elided. Off by default; measured at 14.2%–21.1% of the saving. Plus a CLI warning when the knapsack drops whole files to meet the budget.
§63, §69 The float pool and the OX LOW table, each closed against its own list — including the rows that were not fixed, recorded with the reason.

Also in this release

Nine post-v1.6.0 changelog entries had been written into the already-released ## [v1.6.0] section instead of [Unreleased]. Found by diffing that section against the v1.6.0 tag; it is now byte-identical to what v1.6.0 actually shipped, and those entries appear under the release that contains them.

Verification

npm run typecheck, npm run lint, npm run build clean; 91 files / 826 tests passing. The built artifact reports 1.6.1 three ways: dist/src/version.js, package.json, and MCP serverInfo.version.

Full changelog: https://github.com/Epichlo/TokenDamper/blob/v1.6.1/CHANGELOG.md