Repository navigation
Conversation
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
left a comment
There was a problem hiding this comment.
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:
- Kolizja z #371 — inna nazwa entrypointu i inny układ modułów. Main nie powinien dostać obu. Preferuj jeden eksport (
review_docxjest nazwą używaną w Temida/#6862). - CONFLICTING vs main.
- 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.
|
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 |
Summary
ReviewKit can now review one DOCX by walking that same file. The review is not an abstract tree that writes a different
reviewed.docxonly 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:
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.pystarts 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.pyplus advertised-import and DOCX-ownership checks,ruff, andmypy.Docs
README describes this walk and includes one mermaid diagram of the stay-or-go loop at each level.