You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c8e7f7e
Browse filesBrowse the repository at this point in the historyBrowse files
Indexing accepts whatever a repository contains. A tree carrying a vendored
monorepo, a generated dump, or a runaway build directory is discovered in
full, and the first sign of trouble is a host under memory pressure with
nothing that attributes it to indexing.
Add two opt-in limits evaluated during discovery against accepted source
files only: index_max_files and index_max_source_mb. Both default to off, so
nothing changes until an operator sets one. Crossing a limit fails the whole
attempt with a structured resource_limit_exceeded result naming the resource,
the observed value and the limit; no partial graph is published, and an
existing serving index keeps answering.
Limits are read from the CLI-managed _config.db and are not MCP request
arguments. A supervised parent replaces any caller-supplied policy before
spawning its worker, and the worker rejects a missing or incomplete contract,
so the CLI, the daemon and the supervised worker all enforce the same
decision.
Both keys reach an operator through the existing config get/set/list/reset
with no new subcommand. `set` suppresses its own generic message for them
because the policy writer names the precise reason -- so that writer speaks
on every failure it can return, including a validated value whose write then
fails on a database that cannot be written. Exiting non-zero in silence is
not an acceptable answer from a CLI.
The two shell regressions that hand-roll the supervisor's worker argv carry
that contract as well. Without it the worker exits before either guard can
observe anything, and the guard would go quietly vacuous.
Signed-off-by: 刘冲 <mail@liuchong.dev>
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,8 @@ Current keys:
89
89
|`auto_index_limit`|`50000`| Maximum file count allowed for automatic indexing of a new project. |
90
90
|`auto_watch`|`true`| Register the session's project with the background git watcher on connect. Set `false` to keep a session from registering its project (the watcher still runs for other projects). |
91
91
|`watcher_enabled`|`true`| Master switch for the background watcher subsystem. Set `false` to stop the watcher from starting at all — no poll thread and no project registration. Reindex manually with `index_repository` when disabled. |
92
+
|`index_max_files`|`off`| Optional maximum number of accepted source files in one discovery run. |
93
+
|`index_max_source_mb`|`off`| Optional maximum accepted source size in MiB in one discovery run. |
92
94
93
95
> **`watcher_enabled` vs `auto_watch`.**`watcher_enabled` controls whether the
94
96
> watcher *subsystem* starts at all (the background poll thread). `auto_watch` is
@@ -116,6 +118,14 @@ Current keys:
116
118
>`auto_index` still runs, and `index_repository` stays available for manual
117
119
> reindexing.
118
120
121
+
The two `index_max_*` settings are independent and disabled by default. They
122
+
apply to explicit indexing, automatic indexing, and watcher re-indexing, but not
123
+
to `cross-repo-intelligence`, which does not scan repository source files.
124
+
Equality is allowed; exceeding either setting fails the complete index request
125
+
and preserves any previously serving database. See
126
+
[Index resource limits](INDEX_RESOURCE_LIMITS.md) for counting, validation, and
127
+
error-response details.
128
+
119
129
## 3. UI Settings
120
130
121
131
The optional built-in graph UI stores its settings in:
0 commit comments