Skip to content

feat: add target resolution CLI dogfood surface - #267

Draft
jlitola wants to merge 12 commits into
mainfrom
resolve-target-plan
Draft

feat: add target resolution CLI dogfood surface#267
jlitola wants to merge 12 commits into
mainfrom
resolve-target-plan

Conversation

@jlitola

@jlitola jlitola commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add githits resolve <name> as a CLI-only dogfood surface for package and GitHub repository target resolution.
  • Add an internal resolver service with shared authentication, refresh, transport, and error classification.
  • Keep best and protectedMatches on a lightweight GraphQL reference fragment while fetching full fields only for ranked candidates, keeping the production query below the complexity limit.
  • Render neutral numbered candidates, ambiguity-safe follow-ups, protected-name markers, trust evidence, stable JSON, and sanitized terminal text.
  • Add auto-login metadata, command/container wiring, durable implementation documentation, changelog impact, and source/built smoke coverage.

Production dogfooding

  • Text and detailed JSON resolution now succeed against production; the original query was rejected at complexity 711 against the production limit of 500.
  • A 36-case popular-package matrix across every supported registry selected the expected package in 25 cases.
  • npm, PyPI, Hex, Crates, NuGet, vcpkg, and RubyGems passed 3/3. Remaining Maven, Go, Zig, Packagist, and Swift relevance failures were recorded in the backend issue tracker with exact reproductions.
  • Roughly 50 resolver calls produced no resolver protocol, schema, complexity, or rate-limit errors. Observed latency was about 550-1010 ms per call; this is not a volume benchmark.

Validation

  • bun test: 2,716 passed, 0 failed, 7,748 expectations across 160 files.
  • bun run typecheck, bun run format:check, and bun run lint passed.
  • Root and @githits/mcp builds passed.
  • Public-package validation passed; generated plugin assets validated.
  • bun run smoke:cli: 76 steps passed, including authenticated resolve text and JSON.
  • bun run smoke:mcp: 38 steps passed. A later rerun hit an expected production RATE_LIMITED envelope on the existing back-to-back get_example probes; direct calls succeeded after the returned retry window.
  • Built CLI unauthenticated smoke passed 10 steps; built MCP registration smoke passed.
  • Five-round retained Fable review loop finished clean with all findings resolved.

Release posture

  • Keep this PR draft. Do not publish githits resolve until the production relevance, ambiguity wording, expected-volume latency/rate-limit, and linked-repository trust-evidence gates in docs/implementation/cli-commands.md clear.
  • The pending githits impact is minor. @githits/mcp remains unchanged because Phase 1 exports resolver helpers only through the workspace-only internal surface.
  • MCP resolve_target, agent instructions, parity smoke, and agent eval are explicitly deferred to Phase 2 after CLI dogfooding.

jlitola added 12 commits August 11, 2026 15:37
Introduce the internal GraphQL client with compact and detailed field modes. Reuse package intelligence error classification without changing public MCP service interfaces.
Add shared request normalization and compact response formatting, wire the internal service through both auth paths, and expose the branch-local dogfood command.
Add product smoke and durable CLI documentation, tighten GraphQL field selection for compact output, and cover privacy guidance for both free-text ranking hints.
Capture the production ranking contradiction found during Phase 1 dogfooding so it can be added to the backend evaluation corpus.
Record that package-kind constraints do not break the production tie while Google-specific task context selects the expected artifact.
Show descriptions and available popularity/trust signals for every candidate while keeping inspection off the hot path. Harden terminal rendering for unknown backend values and control sequences.
Render ranked targets as a neutral numbered candidate list with inline trust evidence, canonical repository labels, and safe ambiguous follow-ups. Record the approved size exception and the separate repository-wide terminal sanitization plan.
Reduce resolver query complexity by fetching full candidate fields only for the ranked list. Preserve stable CLI output for lightweight best and protected references, restore auto-login metadata, and carry completed plan decisions into durable documentation.
Carry the approved size exception into durable implementation documentation before deleting the completed temporary plan.
Record the pending CLI release impact, fully pin the lightweight GraphQL reference selection, preserve the backend no-result invariant, and refresh follow-on release guidance. Normalize whitespace after terminal sanitization.
Normalize whitespace before and after terminal control removal so newlines remain separators while stripped controls cannot leave duplicate gaps. Keep the release blocker in mutable changelog impact metadata.
Cover tab separators alongside newlines and stripped controls, and scope the follow-on sanitizer contract to free-text fields without changing identity or echo spacing.
@jlitola
jlitola force-pushed the resolve-target-plan branch from cf760b5 to 92563d4 Compare August 11, 2026 13:12
@jlitola jlitola added the enhancement New feature or request label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant