chiguyong
|
3337589395
|
fix(review): document-processing code review fixes — validation, tests, formatting
Deploy to Production / deploy (push) Waiting to run
Details
- SkillConfig._validate_v2: validate fallback_strategies against
ReWOOEngine.VALID_STRATEGIES (lazy import, #20)
- test_skill_config: +4 tests for fallback_strategies validation
- test_document_loader: +8 xlsx edge case tests (empty workbook,
malformed bytes, column mismatch, row/cell truncation, multi-sheet,
file size limit, None cells, #16)
- test_execution_modes: fix ReWOOEngine patch path (lazy import ->
patch at source) + FakeReWOOEngine.execute return .output attribute
- config_driven: ruff formatting (quotes, blank lines after imports)
- project_rules: remove stale "known failing test" note (now passes)
|
2026-06-23 20:21:19 +08:00 |
chiguyong
|
47f3bfecfc
|
feat(documents): add document processing capability (U1-U9)
Implements end-to-end document generation, template filling, and reading:
- DocumentService: unified business layer for create/query/download
- Renderers: Word (Markdown->docx), Excel (Markdown/JSON->xlsx),
PDF (Markdown->pdf with CJK font), Template (Jinja2 sandbox .docx fill)
- DocumentLoader: read PDF/Word/Excel/Markdown/HTML/text -> Document
- DocumentTool: Agent tool with action=create|read
- REST API: /api/v1/documents (create, upload-template, list, download)
- Frontend: DocumentPanel, DocumentCard, documents Pinia store,
chat store tool_result detection
- Security: path traversal guard (Path.resolve + relative_to),
SSTI guard (SandboxedEnvironment), API key auth, 50MB upload limit
- Bug fixes: template path traversal (400 not 500), TemplateRenderer
lazy-load (no external registration dependency)
- Tests: 168 tests (unit + security + E2E F1/F2/F3 + bug hunt)
- Docs: README section 17, requirements + plan + test-plan docs
Requirements R1-R28 verified, F1-F3 user flows pass.
|
2026-06-23 15:05:01 +08:00 |