Skip to content

Docs/condense oversized docstrings - #34

Merged
brunovicco merged 3 commits into
mainfrom
docs/condense-oversized-docstrings
Jul 28, 2026
Merged

Docs/condense oversized docstrings#34
brunovicco merged 3 commits into
mainfrom
docs/condense-oversized-docstrings

Conversation

@brunovicco

Copy link
Copy Markdown
Owner

Seventeen modules carried docstrings that had grown into design essays -run.py alone opened with 152 lines before the first import. They restated decisions the ADRs already own, recorded implementation history, and
documented parameters by paraphrasing their names.

Docstring lines: 1,091 → 676 (−38%). Nothing else changed.

Kept: observable contracts, Raises, and invariants a caller has to know - fail-closed preflight, the judge factory's thread-safety requirement, the consecutive-error circuit breaker, unanswerable questions never dropped from
coverage, the HNSW ≤2000-dimension constraint behind the Matryoshka request, the checksums-before-manifest ordering that keeps a crashed run from looking complete, and L2 normalization matching pgvector's cosine operator.

Removed: re-explanations of ADR decisions (one reference replaces the paragraph), rejected-alternative narratives, and Args: blocks that only restated parameter names.

chunking/legal_parser.py was deliberately left alone: its notes on legal structure parsing describe behavior no ADR covers.

Also corrects a stale claim in ragas_judge.py, which said the golden set has no reference answers as the reason Factual Correctness is unimplemented - v0.2 has one for all 230 questions. Now scoped as "not wired in this
increment", which makes the metric a live candidate for the next one.

Verified: ASTs with docstrings stripped are identical to the originals, file by file - no code changed. ruff check --select D,E501 and ruff format --check pass with the repo's own config.

@brunovicco
brunovicco merged commit 99ebeb1 into main Jul 28, 2026
1 check passed
@brunovicco
brunovicco deleted the docs/condense-oversized-docstrings branch July 28, 2026 19:27
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.

1 participant