Repository navigation
check_names: call-shape method prefixes (walk_, stream_, fetch_) and a get_/walk_ pair - #11
Merged
Merged
Conversation
…m_, fetch_) and allow a get_ and walk_ pair A paged read of an API like lda.gov's filings is often wanted twice: one page (get_filings) and the whole walk (walk_filings). check_names derived get_ for every read, so a client could not name both. It now reads the call shape from the body and accepts get_ or the shape's prefix, with method-prefixes to restrict it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What changes
check_namesread every read asget_*, so a client could not keep a single-pageget_filingsbeside awalk_filingsover the same endpoint, nor name a stream or raw-bytes read for what it does.walk_forself.paginate(...),stream_forself.stream(...),fetch_for a verb call withexpect=as_bytes.get_stays valid for every shape; aget_and awalk_may read one path. Two methods of one shape on a path both keep the plain name; a prefix that is not the method's own shape is reported.method-prefixeskey (andprefixes=argument) lists the allowed prefixes;[]keeps every readget_.Tests first: acceptance for each shape and the pair, plus the misnamings that must still fire. Docs:
naming.md, generatedverifier.md, CHANGELOG.All gates pass locally (coverage 97.0%).
🤖 Generated with Claude Code