Repository navigation
README: correct cold-start serve behavior and --exclude scope - #144
Conversation
…icate exit code table A server started with no index answers from an empty index until the first build is published (serve.rs bootstrap_index_build); only a resumed partial index serves partial data. --exclude is accepted by index and serve but rejected by a search. The second Exit Codes section repeated the first.
There was a problem hiding this comment.
🟡 Changes recommended
Several updated passages still misstate batching, progress reporting, and index flush behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Corrects README guidance for server cold starts, --exclude, and exit codes.
Changes:
- Clarifies cold-start versus resumed partial-index behavior.
- Restricts
--excludedocumentation toindexandserve. - Removes the duplicate exit-code section.
File summaries
| File | Description |
|---|---|
README.md |
Updates CLI and server behavior documentation. |
Review details
Suppressed comments (2)
README.md:704
- The 500-file batching claim does not apply when no index exists: that path uses the core builder's byte-bounded batches of up to 1,024 files. The 500-file constant belongs only to resumed partial builds.
builds one in the background (batches of 500 files, parallel extraction);
README.md:706
- This flush policy is obsolete. The server now saves pending live changes at the default 5,000-mutation threshold or after 10 minutes (
AUTO_SAVE_MUTATIONS/AUTO_SAVE_INTERVAL); there is no 50K-files/5-minute trigger.
partial data only when a partial index is being resumed. The index is flushed to disk
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Andrei <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
A stray carriage return on line 286 creates an unintended paragraph break.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Andrei <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
A blank line splits “partial index” into two malformed paragraphs.
Review details
Suppressed comments (1)
README.md:288
- The blank line splits “a partial index” across two Markdown paragraphs, so the rendered text ends one paragraph with an incomplete phrase and starts the next with lowercase “index.” Keep the phrase in the same paragraph.
`tgrep status` reports that indexing is in progress. When the server resumes a partial
index instead, queries are answered from the files already indexed. Multiple
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Cold-start batching remains inaccurate in two passages, and a blank line breaks one sentence.
Review details
Suppressed comments (3)
README.md:288
- The blank line splits “a partial index” across separate Markdown paragraphs, leaving both paragraphs grammatically incomplete. Keep the wrapped sentence in one paragraph.
`tgrep status` reports that indexing is in progress. When the server resumes a partial
index instead, queries are answered from the files already indexed. Multiple
README.md:705
- This still attributes 500-file batches to the no-index cold-start path, but that path immediately delegates to
bootstrap_index_build, whose builder caps batches at 1,024 files and may split sooner by byte budgets (tgrep-core/src/builder.rs:20,278-305). The 500-file batches only apply to the incremental/resume fallback inserve.rs:6477, so the cold-start parenthetical remains inaccurate.
builds one in the background (batches of 500 files, parallel extraction);
README.md:71
- The bullet now describes cold starts immediately after saying the background indexer works in 500-file batches, but cold starts use
bootstrap_index_buildand the builder’s count cap is 1,024 (with additional byte-based splitting). Only resumed partial builds use the 500-file loop inserve.rs:6477, so distinguish the two paths here.
using rayon; a cold start serves an empty index until the first build is
published, while a resumed partial index serves what it already has
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The resumed index is processed in 500-file batches, not capped at 500 files.
Review details
Suppressed comments (1)
README.md:71
- The 500-file limit applies to each incremental processing batch, not to the resumed partial index itself. The existing reader can already contain any number of files, and every 500-file batch is added to the live overlay, so describing the index as “capped” at 500 is inaccurate.
the first build is published, while a resumed partial index is capped at 500 files
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The rewritten serving section retains obsolete auto-save thresholds and has minor grammatical errors.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
README.md:705
- This parenthetical coordinates “batches” with “may split,” which makes it read as though the index itself may split. State directly that the batches can be smaller because of byte budgets.
README.md:71
- “Processed at 500 files” omits the batching unit and leaves the bullet grammatically incomplete. The resumed path uses 500-file batches.
the first build is published, while a resumed partial index is processed at 500 files
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Andrei <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The new auto-save timing description does not match the implementation’s startup/last-save-based timer.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
README.md:71
- The resumed-build batch size is expressed as “processed at 500 files,” which is grammatically incomplete and obscures that 500 is the number of files per batch. Please state the batching unit explicitly.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Shengyu Fu <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Two newly edited passages contain incomplete or malformed sentences.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
README.md:71
- The phrase “processed at 500 files” is incomplete and obscures that 500 is the resumed build's batch size. Use “processed in batches of 500 files” instead.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
| builds one in the background (batches of 1,024 files and may split sooner | ||
| by byte budgets); queries see an empty index until that first build is published, | ||
| and see partial data only when a partial index is being resumed. The index is | ||
| after the initial build, pending changes are auto-saved when 5,000 content mutations accumulate by default, or on the first periodic check at least 10 minutes after startup or the last successful save. Multiple clients connect simultaneously; | ||
|
|
||
| searches use read locks for zero contention. |
Three accuracy fixes to the README, found while writing an agent-facing usage guide (#143) and checking its claims against the binary and code.
servedoes not serve partial data. The README said in three places that a server with no index serves queries "immediately from partial data".bootstrap_index_buildinserve.rsdeliberately keeps queries on an empty index until the first build is published; only a resumed partial index serves partial data. All three passages now say so.--excludeis not a search flag. The CLI flags table listed it alongside search flags, but the search command rejects it withunexpected argument. The row now notes it isindexandserveonly.## Exit Codesrepeated the table already in### Exit codesunder Usage. Removed the duplicate.Docs only.
make checkandmake testpass.