Skip to content

Sync: search partial reasons, faster diff pages, request log filters, catalog objects - #35

Merged
qiansc merged 1 commit into
mainfrom
sync/internal-20261204
Dec 4, 2026
Merged

qiansc merged 1 commit into
mainfrom
sync/internal-20261204

Conversation

@qiansc

@qiansc qiansc commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Background

Brings the community edition up to date with the remaining service changes that apply outside the original deployment.

Changes

  • Search
    • Case-insensitive literals stay on the index path. A whole-pattern case-folded literal used to match only its upper-case form, e.g. -i fuzzy found far fewer files than -F fuzzy.
    • One engine pass gets at most 2 s, within the 5 s request budget.
    • Word-boundary and byte-glob verification now pages through further candidates, instead of checking only the first page.
    • A partial answer now carries Meta.PartialReasons (deadline, match_limit, engine_error, filter_candidates, files_skipped, scan_stopped) and Meta.Hint. MCP text and the CLI show both.
    • Hybrid answers report counts as numbers.
  • Diff
    • A patch page runs one --numstat and one git diff for all its files, split at the file headers. Before, it ran two processes per file.
    • It stops reading once the page budget is spent.
    • Results are unchanged. Tests compare the page with the previous per-file implementation under five budgets: quoted and non-ASCII names, type change, mode change, binary, non-UTF-8 and over-share patches. If the stream passes 32 MiB, it falls back to reading the remaining files one at a time.
    • On network storage, a 100-file page went from 22–31 s to about 1 s on the server.
  • Admin logs
    • category=access reads the request log, and contains= filters lines.
    • Also available as CLI admin logs --access --contains and as MCP site_admin access/contains.
  • Catalog and tag list
    • GET /v1/repo/catalog returns {items, next_after} and GET /v1/tag/list returns {items}.
    • They are the existing catalog and tag counts as objects, for clients that cannot take a top-level array.
  • Tests: the sitesettings Mongo load test now checks every defined section; it was stale and failed with MongoDB.
  • Version: CLI and plugin 0.8.2. Docs: docs/interfaces.md, the CLI README and the skill.

Compatibility

No request or response field changes meaning. New fields and routes are additive.

Tests

  • go test -p 1 ./... with MongoDB: all packages pass.
  • bun run build:web, bun run check:web and cd cli && bun test pass.

🤖 Generated with Claude Code

… catalog objects

- search: case-insensitive literals stay indexed (a whole-pattern
  case-folded literal used to match only its upper case), one engine pass
  is capped at 2 s within the 5 s request budget, word-boundary and glob
  verification pages through further candidates, and a partial answer
  explains itself in Meta.PartialReasons and Meta.Hint (MCP text and CLI
  too). Hybrid answers count files and matches as numbers.
- diff: a patch page runs one numstat and one git diff for all files,
  split at file headers, instead of two processes per file; it stops once
  the page budget is spent. Results are unchanged (tests compare with the
  per-file implementation); on network storage a 100-file page went from
  tens of seconds to about one.
- admin logs: category=access reads the request log, contains= filters
  lines (CLI --access/--contains, MCP site_admin access/contains).
- GET /v1/repo/catalog and GET /v1/tag/list: the catalog and tag counts as
  objects for clients that cannot take a top-level array.
- sitesettings: the Mongo load test checks every defined section.
- CLI 0.8.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit 76b3cf5 into main Dec 4, 2026
3 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.

1 participant