Skip to content

test gap: multi-paragraph counter accumulation for canonical 5-run SEQ never tested (#104 follow-up) #30

Description

@kiki830621

Problem

From verification of PsychQuant/che-word-mcp#104 (verify report: comment-4346442620):

「Multi-paragraph counter accumulation never tested. Issue expects {Figure: 12, Table: 7} from 19-paragraph reproducer; tests only verify {Figure: 1} from single paragraph.」

— Source: team:requirements + codex (gpt-5.5)

#104's reproducer is 19 SEQ paragraphs scattered throughout the body (12 Figure + 7 Table). The acceptance criterion in the issue body is update_all_fields returning {"Figure": 12, "Table": 7}. Current tests only verify {"Figure": 1} from a single-paragraph fixture, so:

  • The counter accumulation logic across multiple paragraphs is unverified for the canonical-form path
  • The case where SEQ Figure paragraph N+1 follows SEQ Table paragraph N (interleaved identifiers) is unverified
  • Heading-reset semantics interacting with canonical-form SEQ are unverified

Type

test gap (P3)

Acceptance criteria

  • Add a test that builds a WordDocument with N=12 SEQ Figure paragraphs + M=7 SEQ Table paragraphs in canonical form (mixed order), runs updateAllFields(), asserts the returned dict equals ["Figure": 12, "Table": 7].
  • Optionally: add a heading-reset variant (Heading 1 between groups) and verify per-chapter resets work for canonical form (parallel to existing baked-form heading-reset coverage).

Why low priority

Counter accumulation logic is shared between baked and canonical forms (the per-identifier [String: Int] dict updates the same way regardless of detection path). Existing baked-form tests cover counter accumulation. Risk of regression is low, but the issue's acceptance criterion ({Figure: 12, Table: 7}) is literally not asserted anywhere — surfaced by #104's verify discipline.

Related: PsychQuant/che-word-mcp#104


Current Status

Phase: implemented
Last updated: 2026-05-02 by idd-implement

Key Decisions

Scope Changes

  • Optional heading-reset variant was left out because existing baked-form tests already pin reset behavior.

Blocking

  • Awaiting IDD verify / PR review.

Commits

  • 11860b5 test: cover canonical sequence field edge cases

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