Skip to content

feat(index): keep agent-facing json - manifests and tool contracts - #156

Merged
ManSio merged 2 commits into
mainfrom
feat/json-agent-manifests
Nov 17, 2026
Merged

ManSio merged 2 commits into
mainfrom
feat/json-agent-manifests

Conversation

@ManSio

@ManSio ManSio commented Nov 17, 2026

Copy link
Copy Markdown
Owner

feat(index): keep agent-facing json - manifests and tool contracts

The blanket .json skip from #154 also dropped the one class an agent actually
uses: manifests (how the project is wired) and tool contracts (what the server
exposes, with annotations and input schemas).

Inventory of the corpus first: 375 .json / 24.5 MB, of which docs/benchmark-
evidence is 284 files / 22.1 MB of frozen artefacts (command, result,
source_sha256), eval/datasets is 56 files with Python source embedded as
strings (their .py oracles are indexed as code anyway), and only 18 files are
contracts or manifests. 40 files carry code-like strings; the real code is
already in the index.

FileGuard now indexes .json when it is a known manifest name (package.json,
package-lock.json, npm-shrinkwrap.json, tsconfig.json, plugin.json,
marketplace.json, *.plugin.json, composer.json, deno.json, renovate.json) or
when its head carries contract keys (inputSchema / surfaces / annotations,
file up to 512 KB). MSCODEBASE_INDEX_DATA=1 still indexes everything.

Measured on the full corpus: 8 of 445 .json pass the allowlist, the index grows
from 18 747 to 18 814 chunks (+67, +0.4%) and the database stays at 143 MB.
The value is real: the query "destructiveHint" now returns
docs/MCP_CONTRACT.json as top-1; before the allowlist the contract was not in
the index at all.

Guards: tests/test_data_files_not_indexed.py (8 tests). Mutations M63-M66
(allowlist ignored, allowlist too wide, contract keys not recognised, size limit
removed) each turn a test red.

Docs: CONFIGURATION.md EN/RU/ZH list both exceptions.
KNOWN_ISSUES entry extended with the inventory and the +67 chunk cost; the two
oldest entries moved to docs/archive/KNOWN_ISSUES_2026_10.md to stay under the
300-line gate.

The blanket .json skip from #154 also dropped the one class an agent actually
uses: manifests (how the project is wired) and tool contracts (what the server
exposes, with annotations and input schemas).

Inventory of the corpus first: 375 .json / 24.5 MB, of which docs/benchmark-
evidence is 284 files / 22.1 MB of frozen artefacts (command, result,
source_sha256), eval/datasets is 56 files with Python source embedded as
strings (their .py oracles are indexed as code anyway), and only 18 files are
contracts or manifests. 40 files carry code-like strings; the real code is
already in the index.

FileGuard now indexes .json when it is a known manifest name (package.json,
package-lock.json, npm-shrinkwrap.json, tsconfig.json, plugin.json,
marketplace.json, *.plugin.json, composer.json, deno.json, renovate.json) or
when its head carries contract keys (inputSchema / surfaces / annotations,
file up to 512 KB). MSCODEBASE_INDEX_DATA=1 still indexes everything.

Measured on the full corpus: 8 of 445 .json pass the allowlist, the index grows
from 18 747 to 18 814 chunks (+67, +0.4%) and the database stays at 143 MB.
The value is real: the query "destructiveHint" now returns
docs/MCP_CONTRACT.json as top-1; before the allowlist the contract was not in
the index at all.

Guards: tests/test_data_files_not_indexed.py (8 tests). Mutations M63-M66
(allowlist ignored, allowlist too wide, contract keys not recognised, size limit
removed) each turn a test red.

Docs: CONFIGURATION.md EN/RU/ZH list both exceptions.
KNOWN_ISSUES entry extended with the inventory and the +67 chunk cost; the two
oldest entries moved to docs/archive/KNOWN_ISSUES_2026_10.md to stay under the
300-line gate.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3647bedf-9b68-4c91-80b4-b584d803db79

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ManSio
ManSio merged commit 25648b3 into main Nov 17, 2026
15 checks passed
@ManSio
ManSio deleted the feat/json-agent-manifests branch November 17, 2026 18:07
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