Skip to content

feat: add unified top-level grep - #429

Merged
jlitola merged 6 commits into
mainfrom
jlitola/design-unified-grep-tool
Sep 29, 2026
Merged

jlitola merged 6 commits into
mainfrom
jlitola/design-unified-grep-tool

Conversation

@jlitola

@jlitola jlitola commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds githits grep <pattern> <targets...> for one backend Query.grep page across ordered package, repository and hosted-document targets. Defaults are regex, case-sensitive matching and zero context, with familiar -F, -i/-s, and -A/-B/-C controls. Text and JSON preserve scope coverage, exact read actions and continuation.

Small page limits can stop before visiting every scope. The client accepts the documented UNSPECIFIED readiness, retains the scope and its input attribution, and explains continuation through nextCursor. Unknown readiness and malformed output still fail validation. Compact/detailed regressions cover source-first and hosted-doc continuation pages without dropping metadata or changing limits.

Core transport and shared workspace helpers serve the CLI without changing the public MCP catalog or legacy githits code grep. Phase 2 replaces MCP code_grep after Phase 1 merges. The plan, CLI guidance and implementation documentation describe the verified contract.

Dev backend PR #2832 resolved the original small-page protocol failure. The exact source repro and mixed two-page client acceptance now pass, including compact/detailed queries, both hit kinds and selected/explicit site attribution [0,1]. Production deployment completed on 2026-09-29. Fresh production verification also passes the exact source repro, mixed two-page CLI acceptance and compact/detailed service pagination, retaining both scopes and source/site hits. Authenticated production CLI smoke passes all 154 steps in stable/experimental cohorts; production local MCP smoke passes all 65 steps. No authenticated coverage was skipped.

Validation:

  • bun test: 5,098 passed, 0 failed; focused grep tests: 28 passed. Typecheck, formatting/Biome, build and public-package validation passed.
  • Authenticated dev CLI smoke passed all 154 steps in stable/experimental cohorts, including the previously failing limit-1 JSON check, exact read replay and text. Authenticated dev MCP smoke passed.
  • Built Node CLI/MCP smoke passed after package validation completed its rebuild.
  • Eight complete captured backend pages parse with exact field equality; fresh client compact/detailed limit-1 continuations preserve every scope, status, attribution, hit and cursor. Unknown enum rejection remains covered.
  • Prior live evidence also covers complete zero hits, case handling for both hit kinds, and repository corpus narrowing. Original proof artifacts are preserved.

All recorded dev commands unset GITHITS_API_TOKEN and use GITHITS_ENV=dev with explicit GITHITS_MCP_URL=https://mcp-dev.githits.com, GITHITS_API_URL=https://api-dev.githits.com, and GITHITS_CODE_NAV_URL=https://pkgseer-backend-dev.fly.dev.

Review: initial feature clean in round 2; correction internal review and Claude round 3 clean, including its fresh-context final check. The reviewer is retained through merge approval. Correction Main CI and MCP package validation passed. Final-head CI is green, including Linux/Windows tests and Bun/Node 20/22/24/26 compatibility.

Production verification uses env -u GITHITS_API_TOKEN GITHITS_ENV=prod with explicit GITHITS_MCP_URL=https://mcp.githits.com, GITHITS_API_URL=https://api.githits.com, and GITHITS_CODE_NAV_URL=https://oss.githits.dev. Public proof is preserved under /tmp/nuckelavee-grep-prod-*; the original dev artifacts remain intact. The production verification follow-up changes documentation only.

Search ordered repository, package and hosted-document targets through Query.grep with regex and case-sensitive defaults. Preserve exact reads, coverage and continuation while retaining legacy CLI and MCP behavior. Record the dev small-page backend protocol blocker in the governing plan.
Preserve backslashes in matched and context lines, provide retryable preparation wait guidance, and share neutral cursor recovery. Use one ordered selector path and the canonical shared site classifier; record focused and full verification and the unchanged backend signoff blocker.
Record clean external round two and its fresh-context final check alongside current validation and orchestration evidence. Keep Phase 1 live signoff pending backend small-page correction and replay; Phase 2 remains pending merge.
@jlitola jlitola added the enhancement New feature or request label Sep 28, 2026
@jlitola
jlitola marked this pull request as ready for review September 28, 2026 17:21
Accept the documented UNSPECIFIED readiness value while retaining strict malformed-output validation. Preserve scope attribution and continuation, explain unvisited scopes in CLI output and guidance, and cover compact/detailed one-match pages and live dev acceptance after the backend fix.
Record the clean correction review, passing dev acceptance and CI. Keep production deployment blocked and MCP replacement pending the CLI phase merge.
Record successful production source and mixed pagination replays plus authenticated CLI and MCP smoke. Replace the resolved deployment blocker with the verified production contract without changing implementation.
@jlitola
jlitola merged commit 9f96f74 into main Sep 29, 2026
10 checks passed
jlitola added a commit that referenced this pull request Sep 29, 2026
Mark PR #429 merged at the refreshed main baseline and retain its observed validation and production deployment evidence. Remove completed CLI implementation steps and record that MCP replacement remains ready without changing the remaining plan structure.
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