Skip to content

verify-with-user-fixture: real thesis docx roundtrip for #94 / che-word-mcp#94 #27

Description

@kiki830621

Problem

From verification of PsychQuant/che-word-mcp#94 (regression + devils-advocate finding):
「Issue-vs-fix mismatch: original issue diagnosed pStyle=Caption filter as root cause, but actual root cause was container traversal gap (different bug). Fix is the right kind of fix and plausibly correct for the user's specific docx (thesis caption commonly inside the table they describe), but not verified against a real fixture. The test suite proves the fix is correct for what it does; whether it makes Adam's specific docx now report Figure: 12, Table: 7 is unverified by this PR.」
— Source: regression, devils-advocate

Type

verification gap (not a bug)

Background

Original #94 was filed against Adam's thesis pipeline (kiki830621/collaboration_guo_analysis#5) where update_all_fields returned "no SEQ fields found" despite 19 SEQ fields visible via get_paragraph_runs. The issue body diagnosed pStyle=Caption filter as the cause, but verification showed processParagraph is style-agnostic — actual root cause was the container traversal gap (body loop only handled top-level .paragraph).

The v0.21.9 fix correctly closes the container gap, and assuming Adam's caption paragraphs are inside table cells (highly plausible for thesis figures-as-tables layout), the user-reported scenario IS fixed. But this is unverified — no real-docx roundtrip test exists.

Why this matters

If Adam's caption was actually at body top level (not inside a table cell), then:

  • Pre-fix processParagraph (style-agnostic) would have updated it
  • update_all_fields returning "no SEQ found" would indicate a different root cause (FieldParser pattern mismatch? rawXML format ambiguity? old che-word-mcp dep version?)
  • v0.21.9 wouldn't actually fix Adam's scenario

Suggested fix

Add a real-docx fixture roundtrip test:

  1. Obtain a redactable thesis sample from Adam (or construct one mimicking the described layout: 12 figure tables + 7 data tables, each with caption inside or below).
  2. Add fixture to Tests/OOXMLSwiftTests/test-files/issue94_thesis_sample.docx.
  3. Test: open → updateAllFields → assert dict matches ["Figure": 12, "Table": 7].

Alternatively, if no fixture is available, the closing analysis on #94 should explicitly note "fix is plausible but unverified for the original user scenario" and ask Adam to retest with v0.21.9 + bumped che-word-mcp.

Severity

P3 — unverified plausibility claim, not a bug. Worth tracking so it doesn't fall through.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions