Docs/condense oversized docstrings - #34
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seventeen modules carried docstrings that had grown into design essays -
run.pyalone opened with 152 lines before the first import. They restated decisions the ADRs already own, recorded implementation history, anddocumented 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 fromcoverage, 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.pywas 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 thisincrement", 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,E501andruff format --checkpass with the repo's own config.