Skip to content

docs: match 0.24.1 public API; drop python-docx from comments - #367

Merged
mikolaj92 merged 4 commits into
mainfrom
cursor/docs-and-comments-ownership-33a5
Sep 29, 2026
Merged

mikolaj92 merged 4 commits into
mainfrom
cursor/docs-and-comments-ownership-33a5

Conversation

@mikolaj92

@mikolaj92 mikolaj92 commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

README and host docs were still selling a pre-0.24 public surface. This PR makes them match the code on main (0.24.1 Pack-only) and fixes a suite inconsistency in comment parsing.

Docs (#333–#338)

The 0.24.1 host path is typed Pack + DecisionClient, then:

  • review_tree — already-parsed ReviewDocument, no file I/O
  • review_source — inject a DocumentParser, then review_tree
  • review_document — DOCX load + optional reviewed.docx / corrected.docx
  • TaktReviewer.review
  • CLI: reviewkit input.docx --profile … --pack … --decision … --llm …

LLMClient is documented as the real Protocol: capabilities: LLMCapabilities and complete_json(..., options: LLMRequestOptions | None = None). Dead ParagraphInserter / InsertionValidator claims are gone. The unimplemented takt source-checkout environment knob is gone; ReviewKit imports the pinned takt package only.

Contract tests now:

  • require advertised from reviewkit import … names to exist on the package root
  • blacklist the dead insertion-engine symbols in README (not only src/ + FALLBACKS.md)
  • require review_tree / review_source / LLMCapabilities / LLMRequestOptions in README and the host guide
  • fail if README or src/reviewkit advertise TAKT_HOME

Comments / ownership

comments.py still computes balloon start_offset / end_offset from Docxtor-resolved paragraph XML so repeated sentences keep a unique range. It no longer imports python-docx, which the ownership test forbids. python-docx is not added as a product dependency.

Typing

uv run mypy (the CONTRIBUTING / [tool.mypy] command) is clean. The remaining assignment error was in renderer_docx.py: PhysicalReviewComment.anchor_text is str | None, but the local quote was inferred as str from a resolved span and then assigned ReviewAction.original_text (str | None). Runtime is unchanged.

Closes #333
Closes #334
Closes #335
Closes #336
Closes #337
Closes #338

Open in Web Open in Cursor 

cursoragent and others added 4 commits September 29, 2026 19:00
README and the host guide now describe the real Pack path:
review_tree / review_source / review_document / TaktReviewer / CLI,
DecisionClient.decide, and LLMClient with capabilities plus
LLMRequestOptions. Dead insertion-engine names and the unimplemented
takt source-checkout knob are gone, and tests pin that contract.

Comment balloon offsets still come from Docxtor-resolved paragraphs,
without importing python-docx, so the package-ownership suite is
consistent.

Co-authored-by: Patryk Mikołajczyk <mikolaj92@users.noreply.github.com>
Ruff FURB167 rejects the re.S alias.

Co-authored-by: Patryk Mikołajczyk <mikolaj92@users.noreply.github.com>
PhysicalReviewComment.anchor_text already allows None. The local quoted
string was inferred as str from the resolved span, then assigned
ReviewAction.original_text (str | None). Annotate it as str | None so
uv run mypy is clean.

Co-authored-by: Patryk Mikołajczyk <mikolaj92@users.noreply.github.com>
Co-authored-by: Patryk Mikołajczyk <mikolaj92@users.noreply.github.com>
@mikolaj92
mikolaj92 marked this pull request as ready for review September 29, 2026 19:22
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mikolaj92
mikolaj92 merged commit a65d7bd into main Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment