Skip to content

check_names: call-shape method prefixes (walk_, stream_, fetch_) and a get_/walk_ pair - #11

Merged
kelsayed17 merged 1 commit into
mainfrom
s1-call-shape-prefixes
Oct 29, 2026
Merged

kelsayed17 merged 1 commit into
mainfrom
s1-call-shape-prefixes

Conversation

@kelsayed17

Copy link
Copy Markdown
Owner

What changes

check_names read every read as get_*, so a client could not keep a single-page get_filings beside a walk_filings over the same endpoint, nor name a stream or raw-bytes read for what it does.

  • The call shape is read from the method body (also through a one-level delegate): walk_ for self.paginate(...), stream_ for self.stream(...), fetch_ for a verb call with expect=as_bytes.
  • get_ stays valid for every shape; a get_ and a walk_ 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.
  • New method-prefixes key (and prefixes= argument) lists the allowed prefixes; [] keeps every read get_.

Tests first: acceptance for each shape and the pair, plus the misnamings that must still fire. Docs: naming.md, generated verifier.md, CHANGELOG.

All gates pass locally (coverage 97.0%).

🤖 Generated with Claude Code

…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>
@kelsayed17
kelsayed17 merged commit 2275f61 into main Oct 29, 2026
12 checks passed
@kelsayed17
kelsayed17 deleted the s1-call-shape-prefixes branch October 29, 2026 06:54
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