fix(translate): fix batch sizing — use real available input budget, respect job.batch_size, lazy playwright in docker

- _batch_sizer.py: compute per_batch_budget from actual available_input_budget
  (context_window - max_output_tokens) instead of sum of first N rows
- _batch_sizer.py: cap max_rows_hard_cap with job.batch_size (user config)
- _token_budget.py: add available_input_budget and max_output_tokens to return
- preview.py: validate required config fields before preview
- requirements-docker.txt: add playwright pip package (~5 MB)
- backend.entrypoint.sh: lazy playwright install chromium on first start
- build.sh: switch tar to tar.xz (-T0 -9), 5.5x smaller bundles
- README.md: add offline bundle deployment instructions
- playwright.config.js: add testMatch for *.e2e.js files
- frontend: preview tab config validation, i18n keys, translationRun store
This commit is contained in:
2026-05-17 23:32:00 +03:00
parent 6988e63967
commit 9228d071ef
15 changed files with 195 additions and 46 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# [DEF:BuildOfflineDockerBundle:Module]
# @PURPOSE: Thin wrapper — delegates to ./build.sh bundle
# @PURPOSE: Thin wrapper — delegates to ./build.sh bundle (.tar.xz output)
# @COMPLEXITY: 1
# @RATIONALE: Unified into build.sh to avoid confusion; kept for backward compat.
# [/DEF:BuildOfflineDockerBundle:Module]