Skip to content

feat(suggest): enumerate methods + report zero-match globs (#27, #29, #30)#32

Merged
Connorrmcd6 merged 1 commit into
mainfrom
feat/suggest-methods-and-glob-feedback
Jun 9, 2026
Merged

feat(suggest): enumerate methods + report zero-match globs (#27, #29, #30)#32
Connorrmcd6 merged 1 commit into
mainfrom
feat/suggest-methods-and-glob-feedback

Conversation

@Connorrmcd6

Copy link
Copy Markdown
Owner

Summary

surf suggest is the adoption on-ramp, but two gaps undercut it:

Changes

  • surf_core::public_symbols — new enumeration returning resolvable anchor segment paths:
    • Python class methods as Class > method (async/sync mirrors de-duped, leading-underscore excluded, decorated methods included).
    • Go methods as Type > Method, matched by exported receiver type (pointer *T and value T receivers both work).
    • Rust impl / TS class methods remain out of scope — top-level only (conscious boundary; the resolver already handles them when hand-anchored).
  • Coverage granularity fix — suggest now keys covered anchors on the full file > seg > seg path, so anchoring one method no longer hides its siblings.
  • Glob feedback — per-glob match tallies: a glob matching no files warns on stderr and exits non-zero only when every glob was empty (partial matches still succeed); a glob matching only unsupported-language files gets a softer note. JSON stdout stays machine-parseable (warnings are stderr-only).

public_fns (used by lint's under-coverage warning) is unchanged.

Verification

  • New unit tests for Python/Go method enumeration, full-path coverage, and glob reporting; full suite green.
  • End-to-end: suggested method anchors (src/store.go > Builder > Set, src/api.py > Client > fetch) resolve, verify, and check clean.
  • Dogfood surf check on this repo stays green (the suggest hub prose was updated to match).

Closes #27, closes #29, closes #30.

🤖 Generated with Claude Code

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>
@Connorrmcd6 Connorrmcd6 merged commit 3d11ed4 into main Jun 9, 2026
2 checks passed
@Connorrmcd6 Connorrmcd6 deleted the feat/suggest-methods-and-glob-feedback branch June 9, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant