fix(apiproxy): configure session export compression

Session-log ZIP entries always used DEFLATE level 6 even though compression level is a deployment tradeoff: CPU-constrained hosts may prefer low latency while bandwidth-constrained hosts may prefer smaller archives. A hardcoded level also violated the repository rule that deployment-varying plugin choices live in validated Config.

Add sessionExportCompressionLevel to ApiProxyService.Config as an integer 0-9 with default 6, resolve the same default once for direct createApiProxy callers, and pass the required level into the streaming module. Tests prove schema defaulting and rejection as well as a level-0 versus level-9 archive-size difference with identical extracted content. The generated config catalog, bilingual gateway README, and feature note document the knob and its tradeoff.
This commit is contained in:
Tianyi Cui
2026-08-11 15:24:14 +08:00
parent 1419671f3f
commit 8a2a22db84
13 changed files with 101 additions and 21 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/host/apiproxy/README.md
README.md: 3c301b48cc92762fc1dff07a9442a1d48e66b1cc
README.zh.md: 79240941348783070b955162325fccf25c33aaae
README.md: 2101c785a613477c04ecbfec6a39a0f403af40ef
README.zh.md: 3ba37967ff88ca89911017945aeed857e4b4ff19