Skip to content

Upgrade office_oxide to v0.1.16 and drop temporary caption/table fixes - #12

Closed
xugangqiang wants to merge 24 commits into
mainfrom
upgrade-office-oxide-0.1.16
Closed

xugangqiang wants to merge 24 commits into
mainfrom
upgrade-office-oxide-0.1.16

Conversation

@xugangqiang

@xugangqiang xugangqiang commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Upgrade the office_oxide Go binding from v0.1.12 to v0.1.16 and remove two temporary Go-side workarounds that are now obsolete because upstream fixed both underlying issues.

office_oxide v0.1.16 (yfedoseev/office_oxide) now:

Changes

  • Removed internal/parser/parser/docx_caption_scan.go (and its test): the temporary Caption-styled-paragraph detection that re-parsed word/document.xml is gone. The parser now reads the style directly from the IR "style" field.
  • Removed the #456 one-row-table merge inside buildDOCXJSONSectionsCore: the native converter keeps .doc tables intact, so the structural proxy is no longer needed.
  • A "Caption"-styled paragraph now attaches to the following top-level table as its caption (overriding the synthesized heading-location caption) and is not emitted as a standalone text section. An orphan Caption paragraph with no following table is emitted as normal text.
  • Bumped go.mod office_oxide binding to v0.1.16 and tidied go.sum.

Test plan

  • New style-based unit tests in docx_ir_caption_style_test.go: case-insensitive match, preferred over heading-location caption, orphan emitted as text, non-Caption paragraphs ignored, and adjacent tables stay separate (Unnecessary repetition infiniflow/ragflow#456 regression).
  • Updated the cgo end-to-end test TestDOCXParser_CaptionStyledParagraphBecomesTableCaption_EndToEnd to exercise the real IR "style" field through the v0.1.16 native library (passes against the actual liboffice_oxide.a).
  • bash build.sh --test ./internal/parser/... passes under cgo with the real v0.1.16 native library.

ccclucky and others added 24 commits October 28, 2026 10:44
## What

Compile the claims a retrieved chunk carries into an evidence page, and
rule on
that page statement by statement before it reaches the answer model.

1. **Claim page** (`compiled_evidence.go`) — page the claims compiled
from each
anchored chunk, union a claim-text search leg on top, and serve a chunk
with
no claims as its own text. Statements carry ref handles, so a deep read
is only
   needed for a fact the page does not state.
2. **Statement-level filter** (`decision_filter.go`) — judge the page
line by line,
with a per-chunk floor and a page-relative threshold so a correctly
recalled
statement below the absolute cutoff survives. The page is bounded to a
judge cap
(default 16) first: a several-hundred-statement page would otherwise be
dozens
   of judge round trips for one retrieval round.

The older claim recall inside the navigate tool is removed; the page and
its
retrieval legs own it now.

---------

Co-authored-by: Yingfeng Zhang <[email protected]>
Co-authored-by: Hermes Agent <hermes-agent@localhost>
office_oxide v0.1.16 (yfedoseev/office_oxide) now exposes the Word
paragraph style name via the IR "style" field (yfedoseev/office_oxide#455)
and no longer splits .doc tables whose first row is a header
(yfedoseev/office_oxide#456). Both temporary Go-side workarounds are
therefore obsolete:

- Remove docx_caption_scan.go / extractDOCXTableCaptions: Caption-styled
  paragraph detection is now read directly from the IR "style" field
  instead of re-parsing word/document.xml.
- Drop the infiniflow#456 one-row-table merge in buildDOCXJSONSectionsCore: the
  native converter keeps .doc tables intact, so the structural proxy is
  no longer needed.
- A "Caption"-styled paragraph now attaches to the following top-level
  table as its caption (overriding the heading-location caption) and is
  not emitted as a standalone text section. An orphan Caption paragraph
  with no following table is emitted as normal text.
- Bump go.mod office_oxide binding to v0.1.16.

Tests: replace the obsolete buildDOCXJSONSectionsWithCaptions tests with
style-based cases (case-insensitive, preferred over heading, orphan
emitted as text, adjacent tables stay separate) and update the cgo
end-to-end test to exercise the real IR "style" field.
@xugangqiang

Copy link
Copy Markdown
Owner Author

Relocating this PR to infiniflow/ragflow (upstream).

@xugangqiang xugangqiang closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.