Repository navigation
Conversation
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Real ingestion gap, fixed at the root (document-order XML walk), proportionate, spec updated in the same commit, pinned by real-file regression tests. [DESIGN-REVIEWED] af6c70d |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of All checks complete. Here is the review. First-Principles-Verdict: PASS The walker bypasses python-docx's public API for oxml internals ( What this change shipsIntent: make facts that live only in DOCX tables retrievable from the Knowledge library — a FIX, with provenance (three added tests that fail on base: Inventory (6 items)
No deleted pins: the existing DOCX tests ( [FIRST-PRINCIPLES-REVIEWED] af6c70d |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsI have enough to decide. Let me verify my reasoning on the candidate's core claim about the observable outcome. The candidate concerns empty table-cell paragraphs producing blank lines and an "inflated"
The candidate resolves to a cosmetic, unconfirmed-consequence tradeoff — its own confidence is "low." It does not clear Step 1. No security, crash, corruption, or data-loss angle exists, and nothing else in the diff grounds a new finding at 80+ (the DFS walk preserves order, skips section/table-property elements safely, and excludes revision wrappers consistently). No findings. [OPUS-REVIEWED] af6c70d |
|
Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days with a failing readiness check. I have assessed the blockers and they appear resolvable, so I will push fixes directly to this branch as a co-author. Assessment: The board is green except one lane. mergeable=MERGEABLE (no conflict); all backend test shards (Linux + Windows) pass; all 5 AI review lanes pass with zero blocking findings. The sole failing lane, Backend Lint & Type Check (3.12), was CANCELLED mid-run on the 2026-09-08 merge ref (concurrency cancellation, not a real lint/type error), and PR Readiness is red only because it aggregates that cancelled lane. Fix plan: rebase onto current main to cut a fresh merge ref so the lane re-runs to completion; fix mechanically only if the lane surfaces something real on the current base. No design change. If you would prefer I do not touch this PR, add the |
|
Thanks for this fix, @leonlaiyc — retaining DOCX table content during knowledge ingestion is a real gap worth closing. To land it against current
The replacement carries your Closing this one in favor of the replacement. Full credit for the fix is yours. |
Problem / Motivation
Knowledge ingestion reads only
Document.paragraphs, which excludes every table cell. A DOCX price list containing only a table is extracted as an empty string; a report with paragraphs around a table silently loses the table's values before hashing, chunking and indexing.Why it matters
The Knowledge library cannot retrieve facts that exist only in document tables, despite accepting DOCX files as a supported format.
What changed (motivation → approach → change)
Walk physical body/table/row/cell nodes in document order and pass their paragraphs through the existing text/heading conversion. This retains nested table content and avoids repeating merged-cell proxies. Keep revision wrappers excluded and preserve the existing top-level
paragraph_countmetadata. Update the reader specification.Tests
c02cdd67cd811e24b136efcc531da1bbdfb47082: three real DOCX fixtures fail because table-only/merged content is empty and interleaved/nested text is missing.TestFileReader*/TestDocxContentTypetests intest/test_knowledge.py, using Python 3.13.5 and two xdist workers without coverage.tmp_path.Manual verification
N/A — real DOCX archives are written and reopened through
FileReader.read, the production extraction boundary. Tests assert extracted values, ordering and metadata without network or host-state changes.Related Issues
No linked issue. Fresh main, open PRs, both contributor handoffs and local claims/worktrees have no equivalent fix or owner of
knowledge/readers.py. Other open changes to the shared Knowledge specification affect unrelated sections; their patches do not touch the DOCX reader entry.Pattern harvest
Rule candidate: review-prompt
Pattern: Document paragraph collections may exclude table content; verify extraction with table-only documents and interleaved body/table content.
Checklist
Contribution License Agreement