feat(suggest): enumerate methods + report zero-match globs (#27, #29, #30)#32
Merged
Merged
Conversation
Closes #27, #29, #30. `suggest` is the adoption on-ramp, but it only proposed top-level functions — on method-oriented Python/Go codebases that surfaced ~1% of the public API. And a typo'd glob printed the same "all good" message as a clean run. - Add `surf_core::public_symbols`, returning resolvable anchor segment paths. Python class methods (`Class > method`, async/sync mirrors de-duped, leading-underscore excluded) and Go methods (`Type > Method`, matched by exported receiver type, pointer and value receivers) are now enumerated. Rust `impl`/TS class methods remain out of scope (top-level only). - suggest keys coverage on the full `file > seg > seg` anchor path, so anchoring one method no longer hides its siblings. - suggest tallies per-glob matches: a glob matching no files warns on stderr, and exits non-zero only when every glob was empty; a glob matching only unsupported-language files gets a softer note. JSON stdout stays clean. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
surf suggestis the adoption on-ramp, but two gaps undercut it:no unanchored ...success as a clean run, so mistakes looked like "all good" (suggest: typo'd / zero-match globs report "no unanchored functions" (look like success) #30).Changes
surf_core::public_symbols— new enumeration returning resolvable anchor segment paths:Class > method(async/sync mirrors de-duped, leading-underscore excluded, decorated methods included).Type > Method, matched by exported receiver type (pointer*Tand valueTreceivers both work).impl/ TS class methods remain out of scope — top-level only (conscious boundary; the resolver already handles them when hand-anchored).file > seg > segpath, so anchoring one method no longer hides its siblings.public_fns(used bylint's under-coverage warning) is unchanged.Verification
src/store.go > Builder > Set,src/api.py > Client > fetch) resolve,verify, andcheckclean.surf checkon this repo stays green (thesuggesthub prose was updated to match).Closes #27, closes #29, closes #30.
🤖 Generated with Claude Code