Skip to content

Interface Parity Track: Phases 137–141#123

Merged
jsilvanus merged 10 commits into
mainfrom
claude/subagents-deploy-phases-137-141-3d6vm5
Jul 2, 2026
Merged

Interface Parity Track: Phases 137–141#123
jsilvanus merged 10 commits into
mainfrom
claude/subagents-deploy-phases-137-141-3d6vm5

Conversation

@jsilvanus

@jsilvanus jsilvanus commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Five phases from the Interface Parity Track (docs/PLAN.md), each built independently and merged together:

  • Phase 137code-search isolates chunk/symbol candidate pools per-level by default (CLI, MCP, Guide), fixing the same cross-pool score-scale crowding-out bug Phase 136 fixed for search. --merge-levels/merge_levels opts back into the old single merged list. Breaking response-shape change for MCP code_search/Guide's code_search tool (results_by_level instead of a flat array), accepted per docs/parity.md §4.
  • Phase 138 — MCP semantic_search/first_seen and HTTP POST /search/POST /search/first-seen gain full CLI search flag parity: per-level result separation (resultsByLevel/mergeLevels), negative-example scoring (notLike/lambda), boolean composition (or/and), explain/explainLlm, expandQuery, annotateClusters, vss (via vectorSearchWithAnn()), repos (multi-repo), per-request model overrides, earlyCut, noCache. POST /analysis/multi-repo-search kept as a thin deprecated alias over the same core call.
  • Phase 139POST /evolution/file gains level (symbol), branch, model overrides, alerts; POST /evolution/concept gains branch and model overrides — branch is now threaded through the core computeEvolution()/computeConceptEvolution() functions, not just route schemas. POST /graph/hotspots gains weightStructural.
  • Phase 140 — a shared modelOverrideSchema Zod fragment + resolveRequestProvider() helper (src/server/lib/modelOverrides.ts), applied once across all 8 analysis.ts routes that were missing --model/--text-model/--code-model parity: clusters, change-points, author, impact, semantic-diff, semantic-blame, triage, workflow.
  • Phase 141POST /analysis/author gains since, detail, includeCommits, hybrid, bm25Weight, plus chunks/level/vss (accepted as documented no-ops, matching the CLI's own dead-flag behavior). Breaking change: response shape is now { authors, commits? } instead of a bare array, to carry includeCommits results.

All five follow docs/parity.md §4's standing principle: parity across interfaces is prioritized over preserving existing response shapes, so several of these are deliberate breaking changes to MCP/HTTP response shapes.

Implementation notes

Each phase was implemented independently (in isolated git worktrees) and merged sequentially. The overlapping files — src/mcp/tools/search.ts (137 + 138) and src/server/routes/analysis.ts (138 + 140 + 141, especially the author route/AuthorBodySchema) — required manual conflict resolution on merge; the underlying route/schema logic from each phase composes cleanly (e.g. AuthorBodySchema now carries both Phase 140's model-override triplet and Phase 141's since/detail/hybrid fields).

Doc maintenance

  • docs/PLAN.md — all five phases marked ✅ complete, with deviation notes.
  • docs/features.md, README.md — updated for new flags/commands.
  • docs/parity.md — gaps closed, flag tables updated for MCP/HTTP parity.
  • docs/deprecations.mdPOST /analysis/multi-repo-search deprecated alias documented.
  • Changesets: code-search-per-level-results.md, search-mcp-http-flag-parity.md, evolution-hotspots-http-parity.md, analysis-routes-model-overrides.md, author-http-route-parity.md (all minor).

Test plan

  • pnpm build clean
  • pnpm test — 1468 passed, 22 skipped, 0 failed
  • New/updated test coverage per phase: tests/integration/codeSearchLevelSeparation.test.ts, tests/mcpSearchToolsPhase138.test.ts, tests/evolutionBranch.test.ts, and new describe blocks in tests/serverRoutes.test.ts for Phase 138/139/140/141 routes

claude added 10 commits July 1, 2026 18:45
POST /analysis/author now accepts since, detail, includeCommits, hybrid,
and bm25Weight, threaded through to the same computeAuthorContributions/
hybridSearch/searchCommits logic the CLI author command uses. Also accepts
chunks/level/vss for flag-surface parity (deliberately no-op, matching the
CLI's own dead-flag behavior for these three). Model-override triplet
stays out of scope (tracked separately in Phase 140).

Breaking change: response shape is now { authors, commits? } instead of a
bare array, to carry includeCommits results, per parity.md's parity-over-
API-stability rule.
CLI's --model/--text-model/--code-model triplet was missing from the HTTP
routes for clusters, change-points, author, impact, semantic-diff,
semantic-blame, triage, and workflow. Fix it once with a shared
modelOverrideSchema Zod fragment + resolveRequestProvider() helper
(src/server/lib/modelOverrides.ts) instead of eight per-route patches.

resolveRequestProvider() deliberately doesn't reuse the CLI's
resolveModels()/buildProviderOrExit() as-is: those mutate process.env and
call process.exit() on failure, unsafe for a concurrently-serving HTTP
process. It threads an explicit ResolvedConfig through buildProvider()
instead and throws a catchable ModelOverrideError that routes turn into a
400.

clusters accepts and validates the triplet for flag-surface parity but it
has no effect on clustering behavior (same as the CLI clusters command),
since computeClusters() doesn't filter by model — documented inline and in
features.md rather than faked.

Updates docs/parity.md §2.3 item 3 to mark the CLI-vs-HTTP gap closed, and
docs/PLAN.md/docs/features.md accordingly. Adds an 11-test
"Phase 140: model overrides on analysis routes" block to
tests/serverRoutes.test.ts.
code-search's default --level symbol was merging the chunk and symbol
candidate pools into one shared-cutoff ranked list on every call (unlike
search's opt-in multi-level combinations), hitting the same cross-pool
crowding-out bug Phase 136 fixed for search. Reuses Phase 136's
resolveExtraLevels()/isMultiLevelActive()/includeFiles mechanism across
all three call sites:

- CLI code-search isolates chunk/symbol pools by default and renders
  them via renderResultsByLevel(); --merge-levels opts back into one
  merged list.
- MCP code_search and Guide's code_search tool return a results_by_level
  object instead of a flat results array when multi-level (breaking
  response-shape change, accepted per parity.md's parity-over-stability
  principle), with a merge_levels param to opt back into the old shape.
- interpretations.ts updated with the new result shape and cross-level
  score-comparability caveat; skill regenerated via pnpm gen:skill.

Adds tests/integration/codeSearchLevelSeparation.test.ts covering the
per-blob dedup invariant and the chunk-vs-symbol crowding-out proof.
Updates docs/PLAN.md, docs/features.md, README.md, and docs/parity.md
(resolves the "code-search never received Phase 136's treatment" gap).
Add level/branch/model-override/alerts params to POST /evolution/file,
branch/model-override params to POST /evolution/concept (threading branch
filtering into computeEvolution/computeConceptEvolution), and
weightStructural to POST /graph/hotspots.
Close the MCP/HTTP flag gap behind CLI `search`/`first-seen` found by the
Phase 138-148 interface parity audit.

- MCP `semantic_search` gains a `module` level option and, when 2+ of
  {chunk, symbol, module} are active, renders labeled per-level text
  sections (`merge_levels` opts back into one list) via the same
  `resolveExtraLevels()`/`isMultiLevelActive()` helpers CLI `search` uses.
  HTTP `POST /search` gets the same plus a `mergeLevels` body param and a
  breaking `resultsByLevel` JSON shape when 2+ levels are active.
- Both interfaces gain the remaining query-shaping flags CLI `search`
  already had: negative-example scoring (`notLike`/`lambda`), boolean
  composition (`or`/`and`), `explain`, `explainLlm`, `expandQuery`,
  `annotateClusters`, `vss` (routes through `vectorSearchWithAnn()`),
  `repos` (multi-repo), per-request `model`/`textModel`/`codeModel`
  overrides, `earlyCut`, `noCache`.
- `first-seen`/`first_seen` gain `vss`, `repos`, and model overrides.
- Added `hasModelOverride()`/`buildProviderForRequest()` to
  `providerFactory.ts` so per-request model overrides don't mutate
  `process.env` (unsafe for a server handling concurrent requests) —
  shared by both MCP and HTTP instead of duplicated.
- `POST /analysis/multi-repo-search` kept as a thin deprecated alias
  (unchanged response shape, `Deprecation` header) over the same
  `multiRepoSearch()` call; `repos` on `POST /search` is the
  parity-complete replacement.
- `code_search` untouched (Phase 137's scope, developed concurrently).

Updates docs/parity.md, docs/features.md, docs/deprecations.md, and
docs/PLAN.md (Phase 138 marked complete with deviation notes).
…-deploy-phases-137-141-3d6vm5

# Conflicts:
#	docs/features.md
#	docs/parity.md
#	src/mcp/tools/search.ts
…-deploy-phases-137-141-3d6vm5

# Conflicts:
#	docs/parity.md
…-deploy-phases-137-141-3d6vm5

# Conflicts:
#	tests/serverRoutes.test.ts
…-deploy-phases-137-141-3d6vm5

# Conflicts:
#	docs/features.md
#	docs/parity.md
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@jsilvanus jsilvanus changed the title Phase 141: author HTTP route full parity Interface Parity Track: Phases 137–141 Jul 2, 2026
@jsilvanus jsilvanus merged commit 1097873 into main Jul 2, 2026
3 of 4 checks passed
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.

2 participants