Skip to content

Review one DOCX by walking that same file - #372

Closed
mikolaj92 wants to merge 2 commits into
mainfrom
cursor/one-docx-stay-or-go-3cc8
Closed

mikolaj92 wants to merge 2 commits into
mainfrom
cursor/one-docx-stay-or-go-3cc8

Conversation

@mikolaj92

@mikolaj92 mikolaj92 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

ReviewKit can now review one DOCX by walking that same file. The review is not an abstract tree that writes a different reviewed.docx only after both scans.

On each unit the host stays or goes. A side effect on that same file may add a comment, update a comment, delete a comment, or change the text. Many comments can sit on one sentence because a later pass adds another while earlier ones stay.

Walk order:

  1. zdanie (sentence by sentence)
  2. akapit (then every paragraph)
  3. rozdział (then every chapter / section cut)
  4. całość (then the whole document, n times)

Entry point: review_one_docx(path, reviewer, document_passes=n).

Pack tree reviews (review_tree / review_document + two scans) are unchanged. Takt is not used on this path.

Test

tests/test_docx_review.py starts from one DOCX, stays on the first sentence and adds two comments before the second sentence, then runs a paragraph pass, a chapter pass, and more than one pass over the whole document. A comment update, a comment delete, and a text change land on that same file during the walk.

Verified locally: uv run pytest tests/test_docx_review.py tests/test_docs_pack_canon.py tests/test_host_exports.py plus advertised-import and DOCX-ownership checks, ruff, and mypy.

Docs

README describes this walk and includes one mermaid diagram of the stay-or-go loop at each level.

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 4, 2026 08:24
Replace the abstract two-scan copy with a stay-or-go walk of one DOCX.
Side effects (add, update, or delete a comment, or change the text) land
on that file during the walk. Order is zdanie, then akapit, then rozdział,
then całość n times.

Co-authored-by: Patryk Mikołajczyk <mikolaj92@users.noreply.github.com>
Use Docxtor's physical review comments so a later stay on the same
zdanie can add another balloon without dropping the earlier one.

Co-authored-by: Patryk Mikołajczyk <mikolaj92@users.noreply.github.com>

@mikolaj92 mikolaj92 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alfred (Grok Bot) — review COMMENT

Co robi: Alternatywna implementacja walk-same-file DOCX (review_one_docx, docx_live/docx_units/stay_or_go). Ten sam produktowy cel co #371.

OK: stay-or-go na jednostkach; wiele komentarzy na zdaniu; Pack tree osobno.

Ryzyka:

  1. Kolizja z #371 — inna nazwa entrypointu i inny układ modułów. Main nie powinien dostać obu. Preferuj jeden eksport (review_docx jest nazwą używaną w Temida/#6862).
  2. CONFLICTING vs main.
  3. Po wyborze: pin w Temida musi wskazać ten head, bez emulacji courses po stronie Temidy.

Blocker: wybór zwycięskiego API vs #371 + rebase. Nie merge.

@PSyron

PSyron commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

The same-file one-DOCX review is already merged through #373/#374 and strengthened with provider-bound physical comment regions in #375. This conflicting alternative predates the actual supported physical span contract. Closing it as superseded without merging the older writers. Branch preserved.

Disposition is based on independent exact-head source review against main fc1e5340a69e122e51720a36cd8b0764a06e904c; no local tests, application imports or runtime scenarios were run.

@PSyron PSyron closed this Oct 6, 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.

3 participants