zcbot/tests
caoqianming b70b993257 feat(preview): pptx 在线预览 —— LibreOffice→PDF + 复用 PDF iframe(DESIGN §8.3 Stage 1)
文件区点 .pptx 不再只能下载。后端转 PDF,前端复用现成 PDF iframe。

- web/pptx_render.py: pptx_to_pdf() 调 soffice,独立临时 profile 绕单 profile
  锁、60s 超时 kill;缓存 .preview/<stem>.<hash>.pdf(hash=mtime+size,源改即
  失效,prune 旧 hash);soffice 缺失抛 SofficeNotFoundError
- web/app.py: GET /v1/files/preview_pdf —— _safe_join 防穿越 + 仅 .ppt(x) +
  per-path asyncio.Lock 防并发重转 + run_in_executor 不堵事件循环;缺失 501/失败 500
- preview.js: ppt 组 + main/mini 共用 _showPptAsPdf(spinner loading + 失败回退下载)
- dev.html: .preview-spinner(复用 @keyframes spin)
- 转换跑 web host 进程不进沙盒;部署 host 装 libreoffice-impress + fonts-noto-cjk
  (sandbox Dockerfile 不动)
- tests/test_pptx_render.py: 10 例(缓存命中跳 soffice/源变失效+prune/缺失降级/越界拒绝)
- 文档:RUN.md(host 装 + 故障兜底 2 行)、PROGRESS.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 13:04:02 +08:00
..
frontend_task_progress.test.mjs Show task progress above composer 2026-06-08 09:04:43 +08:00
test_context_compaction.py fix(progress): 停压 task_progress 参数修进度还原 + 进度区移到对话区顶部 2026-06-08 09:52:44 +08:00
test_disk_quota.py Stage C 收尾包:资源 yaml + 磁盘配额 + 网络放开 + 容器内源持久化 2026-05-27 08:35:53 +08:00
test_executor_docker.py Reduce chat context token usage 2026-06-04 16:41:14 +08:00
test_load_skill.py fix(skill_tool): docker backend 下返回容器路径而非 host 绝对路径 2026-05-28 13:37:19 +08:00
test_loop_repeat_guard.py feat(tools+loop): 批量抓取 + 重复调用守卫 —— 治高轮数烧 token 2026-06-08 16:47:56 +08:00
test_pptx_render.py feat(preview): pptx 在线预览 —— LibreOffice→PDF + 复用 PDF iframe(DESIGN §8.3 Stage 1) 2026-06-09 13:04:02 +08:00
test_run_python_script_path.py Reduce chat context token usage 2026-06-04 16:41:14 +08:00
test_sandbox_check.py Stage C Step 5: main.py sandbox check + lifespan fs quota WARN 2026-05-26 16:41:16 +08:00
test_secret_host_tools.py feat(tools+loop): 批量抓取 + 重复调用守卫 —— 治高轮数烧 token 2026-06-08 16:47:56 +08:00
test_static_vendor.py Disable static asset caching 2026-06-08 09:16:31 +08:00
test_system_prompt_paths.py test(prompt): 锁住 docker 下 system prompt 不漏宿主路径(药3 复核收口) 2026-06-09 11:30:32 +08:00
test_task_progress_tool.py Add task progress tool 2026-06-08 08:44:16 +08:00
test_tool_output_compaction.py Reduce chat context token usage 2026-06-04 16:41:14 +08:00
test_usage_accounting.py feat(usage): 记账给前缀缓存命中折价 + 前端体现缓存命中/真实成本 2026-06-05 08:26:09 +08:00