Skip to content

fix: the search postings read each document's whole text, so a term past the index's 5,000-character excerpt finds its document - #15

Merged
jddunn merged 5 commits into
masterfrom
fix/search-postings-whole-documents
Oct 21, 2026
Merged

jddunn merged 5 commits into
masterfrom
fix/search-postings-whole-documents

Conversation

@jddunn

@jddunn jddunn commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

The keyword postings in codex-search.json came from the index's content field, which scripts/auto-index.js cuts at a document's first 5,000 characters. A term past that point never found its document, the cut kept a fragment of the word it fell in as a term, and an edit near a document's top pushed later terms out of search. #13 added 231 characters to docs/DEVELOPMENT.md and 215 to docs/RECATALOG_GUIDE.md above the cut, and Qodo's thread on #14 names what that cost. Read against the index at d19e45b, the index of #14 (3167841):

  • docs/DEVELOPMENT.md lost architecture, sqlite3, storage, adapter, incremental, indexing, intelligent, better and framers. Its "SQL Cache Architecture" section held them at characters 4,765 to 4,990 and moved to 4,996 to 5,221, and the excerpt ends at "SQL Cache Arch", so it gained the term arch. It also lost manually, which ci: the search index reaches master through a pull request opened with FRAMERS_BUMP_TOKEN, since master is protected #13 took out of the guide, so that one is intended.
  • docs/RECATALOG_GUIDE.md lost generated, autogenerated, reviewing, warnings and suggestions. Its "Only auto-generated" line and "Reviewing Re-Catalog PRs" heading moved from characters 4,780 and 4,925 to 4,995 and 5,140, and the excerpt ends at "Only auto-gener", so it gained the term gener.

sqlite3, autogenerated and reviewing left the vocabulary altogether. Frame.dev's BM25 (lib/search/bm25.ts in framerslab/frame.dev) looks up vocabulary[term] for each query term, so a search for any of these terms stopped finding the guide that holds it. Every guide still covers every term above except manually.

The change

  • scripts/search-index.mjs (new) holds the search build, moved from scripts/build-search-index.mjs, which runs it (npm run build:search is unchanged). buildSearchIndex({ root, createEmbedder }) takes the embedding model as a function and loads @huggingface/transformers only when none is passed, so a test runs the build without the model download.
  • buildPostings reads each listed document under the root as auto-index.js parses it: the body after the frontmatter for Markdown, the whole file for YAML. A document's postings and its length cover its title, summary and whole text, with no cut, so no fragment term. It compares real paths before a read, so a document it cannot read under the root, whose path leads outside the root, or that is a link under the root to a file outside it, keeps the content field's postings, and a warning names it.
  • The embeddings read the same text as before: the title and summary, or the start of the excerpt when there is no summary.
  • README.md and docs/DEVELOPMENT.md say the postings cover each document's whole text; DEVELOPMENT.md names @huggingface/transformers, the library the build uses; the comment on the content field no longer calls it the text search reads; coverage counts scripts/search-index.mjs.

Built from this branch by its own Build and Publish Codex Index runs (39572673413 on a3d5093, 39574155679 on 283783e, the same file), codex-search.json holds 5,123 terms against #14's 2,627 and weighs 255,589 bytes against 176,829, and the average document length goes from 354.9 terms to 1,018.8; every listed document was read, with no excerpt warning. The largest document, a 93,248-character course, had its first 5% searchable.

Tests, first

tests/search-index.test.js (new, 3 cases) indexes documents with the indexer, writes codex-index.json as it does, runs the build with a stand-in for the model, and searches the codex-search.json it writes:

  • The two guides, copied from the tree, are found by architecture, sqlite3, storage, adapter and incremental, and by generated, autogenerated, reviewing, warnings and suggestions. For each term, the case first checks that the guide still holds it.
  • A document with "architecture" across the 5,000-character cut and "zeppelin" past character 9,000 is found by both and not by "arch", and its length equals the terms its postings count.
  • A listed document missing under the root, one whose path leads outside it, and a link under it to a file outside it keep their excerpt's postings, the file outside is not read, and a warning names each.

On ca56a15, which moves the build unchanged, Test Suite run 39572303595 failed all 3 (a search for "architecture": expected [] to include 'docs/DEVELOPMENT.md') with 303 others passing; on a3d5093, run 39572679753 passed all 306. The link case came from review: on 6ed9de6, run 39574061528 failed it (expected [] to deeply equal [ 'docs/leak.md' ], the read followed the link); on the head, 283783e, Test Suite run 39574162669 passed all 306 and rename-guard passed. Line coverage went from 30% to 32.5% and branch coverage from 75.85% to 77.53%. In the branch build's codex-search.json, docs/DEVELOPMENT.md is found by architecture, sqlite3, storage, adapter, incremental, indexing, intelligent, better and framers, and docs/RECATALOG_GUIDE.md by generated, autogenerated, reviewing, warnings and suggestions; arch and gener are gone.

Reviews

  • Codex on a3d5093: one P1, "Resolve symlinks before accepting in-root documents": a link under the root to a file outside it passed the path check and the read followed it, so the whole target reached the vocabulary. Fixed in 283783e, test first in 6ed9de6; answered in its thread and resolved. Its review of 283783e, requested by comment: "Didn't find any major issues."
  • Qodo on a3d5093: the same finding, "Search leaks words from external files"; answered in its thread, which Qodo marked resolved after 283783e. Its review of the head lists 0 bugs.
  • CodeRabbit on a3d5093: no actionable comments. On 283783e it first stopped at its review limit ("Review limit reached"); asked again by comment once its hourly allowance came back, it reviewed a3d5093 to 283783e at 10:15 UTC: "No actionable comments were generated in the recent review."
  • Sourcery: its weekly review budget is used, so it wrote its reviewer's guide and no review: missing.
  • Every review thread (two) is answered and resolved.

After the merge

The merge changes scripts/, so the Build and Publish Codex Index workflow runs on master and updates #14's branch with an index built this way. The two guides' entries on its new head go in a comment here, and the answer to Qodo's thread on #14 links this pull request.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Search indexing now builds BM25 postings from complete document text, while retaining indexed excerpts as a fallback when files are unavailable.
    • Search index generation now includes document metadata, length statistics, and semantic embeddings.
  • Bug Fixes

    • Improved handling of missing, unreadable, malformed, out-of-root, or symlinked files during indexing.
  • Documentation

    • Updated search artifact and development documentation to reflect full-text indexing and the current transformer package.

…ex's 5,000-character excerpt too

The search build moves unchanged to scripts/search-index.mjs, which exports it with the embedding model passed in, and
scripts/build-search-index.mjs runs it. tests/search-index.test.js indexes documents with the indexer and runs the build
with a stand-in model. It fails here: the postings come from the index's content field, a document's first 5,000
characters, so docs/DEVELOPMENT.md is not found by architecture, sqlite3, storage, adapter or incremental,
docs/RECATALOG_GUIDE.md not by generated, autogenerated, reviewing, warnings or suggestions, a term past character 9,000
is not found, and the cut leaves the fragment arch as a term.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 9f52b5ec-74af-4f9b-990f-2ccfdea2a987
📥 Commits

Reviewing files that changed from the base of the PR and between a3d5093 and 283783e.

📒 Files selected for processing: 2
  • scripts/search-index.mjs
  • tests/search-index.test.js

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📝 Walkthrough

The search index now builds BM25 postings from complete source files when they can be read safely, with fallback to indexed excerpts. The build script delegates index construction to a new module, which also generates embeddings and writes the search artifact.

Changes: Search index construction

Layer / File(s) Summary
Postings and search artifact generation
scripts/search-index.mjs, tests/search-index.test.js, vitest.config.js
The new module tokenizes document fields, reads safe source files, builds BM25 postings and document statistics, generates embeddings, and writes codex-search.json. Tests cover full-text terms, fallback behavior, and generated index data.
Build script and descriptions
scripts/build-search-index.mjs, README.md, docs/DEVELOPMENT.md, scripts/auto-index.js
The build script delegates to buildSearchIndex and exits with status 1 on failure. Documentation describes full-file postings and names @huggingface/transformers. The indexed entry excerpt remains limited to 5,000 characters.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant BuildScript
  participant buildSearchIndex
  participant buildPostings
  participant SourceFiles
  participant codex-search.json
  BuildScript->>buildSearchIndex: Start index construction
  buildSearchIndex->>buildPostings: Build postings from indexed entries
  buildPostings->>SourceFiles: Read safe full-text files
  buildPostings-->>buildSearchIndex: Return postings and statistics
  buildSearchIndex->>codex-search.json: Write postings, metadata, and embeddings
Loading
Merge Risk: ⚪ Minimal · up to 28378

The full-text search build has no established merge-blocking issue. Normal build and test checks remain appropriate before merging.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly states the main change: search postings now use each document's full text, including terms beyond the 5,000-character excerpt. It is somewhat long but remains specific and understand…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 5 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is detailed and directly explains the indexing changes, affected files, tests, validation results, review findings, and follow-up actions. It does not use the repository template headi…
Full details: Title check

Explanation

The title clearly states the main change: search postings now use each document's full text, including terms beyond the 5,000-character excerpt. It is somewhat long but remains specific and understandable.

Full details: Description check

Explanation

The description is detailed and directly explains the indexing changes, affected files, tests, validation results, review findings, and follow-up actions. It does not use the repository template headings or checklist format, and it omits explicit license and metadata checklist confirmations, but the required technical context is substantially covered.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR separates search-index generation from its CLI wrapper and makes BM25 postings read full source documents, with a safe indexed-excerpt fallback when files cannot be read. New injectable dependencies and temporary-directory tests validate recovery of terms beyond the 5,000-character excerpt, boundary token behavior, warnings, and document-length consistency.

Sequence diagram for search index generation

sequenceDiagram
    participant CLI as build-search-index.mjs
    participant Builder as search-index.mjs
    participant Postings as buildPostings
    participant Embedder as createEmbedder
    participant Files as Filesystem

    CLI->>Builder: buildSearchIndex()
    Builder->>Files: readFileSync(codex-index.json)
    Builder->>Postings: buildPostings(entries)
    Postings-->>Builder: docs, avgDocLength, vocabulary
    Builder->>Embedder: createEmbedder()
    Embedder-->>Builder: embedding function
    loop each entry
        Builder->>Embedder: embedder(embeddingInput, options)
        Embedder-->>Builder: tensor.data
    end
    Builder->>Files: writeFileSync(codex-search.json)
    Builder-->>CLI: searchIndex
Loading

File-Level Changes

Change Details Files
Extracted search-index construction into a reusable, testable module while preserving the CLI entry point.
  • Moved tokenization, BM25 posting generation, embedding generation, and output serialization into exported functions.
  • Added configurable root and embedding-factory inputs so tests can use temporary files and a stand-in model.
  • Retained lazy loading of the production embedding dependency and the existing CLI error handling.
scripts/build-search-index.mjs
scripts/search-index.mjs
Changed BM25 indexing to read each source document in full instead of relying solely on the indexer's 5,000-character content excerpt, with an excerpt fallback for unavailable files.
  • Builds postings from the complete document text when the indexed path can be read.
  • Preserves excerpt content when a document is missing or outside the build root and emits a warning identifying it.
  • Keeps excerpt-cut words out of postings while allowing terms beyond the excerpt to be indexed.
scripts/search-index.mjs
Added regression coverage for lost terms, long-document behavior, fallback handling, and BM25 document-length accounting.
  • Runs indexing and search generation against representative documentation and verifies terms beyond the excerpt are searchable.
  • Verifies a word split by the excerpt boundary is not indexed as a fragment.
  • Checks missing or inaccessible documents fall back to indexed content and produce warnings.
  • Uses a fake embedder to keep tests deterministic and avoid downloading the model.
tests/search-index.test.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

The postings came from the index's content field, a document's first 5,000 characters, so a term past that point never
found its document, the cut kept a fragment of the word it fell in as a term, and an edit near a guide's top pushed terms
out of search: the index of #14 no longer finds docs/DEVELOPMENT.md by architecture or sqlite3, nor
docs/RECATALOG_GUIDE.md by generated or reviewing. buildPostings reads each listed document under the root as
scripts/auto-index.js parses it, the body after the frontmatter for Markdown and the whole file for YAML. A document it
cannot read there, or whose path leads outside the root, keeps the content field's postings, with a warning naming it.
The embeddings read the same text as before.
… its file

README.md and docs/DEVELOPMENT.md say so, and DEVELOPMENT.md names the embedding library the build uses,
@huggingface/transformers. The comment on the index's content field no longer calls it the text search reads, and
coverage counts scripts/search-index.mjs beside the two other .mjs modules it names.
@jddunn
jddunn marked this pull request as ready for review October 21, 2026 08:59
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Sorry @jddunn, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 13 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T09:06:54.638824Z 283783e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Index whole documents for keyword search

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Build BM25 postings from whole documents so terms beyond the 5,000-character excerpt remain
 searchable.
• Fall back to the excerpt with a warning when a listed file cannot be read safely.
• Add regression tests for displaced terms, cut words, and unreadable or out-of-root files.
Diagram

graph TD
  FILES["Document files"] --> READ["Parse full text"] --> CHECK{"Readable under root?"} -->|yes| POST["BM25 postings"] --> OUT["Search JSON"]
  CHECK -->|no| FALL["Index excerpt"] --> POST
  IDX["Codex index"] --> READ
  IDX --> EMB["Short-text embeddings"] --> OUT
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Store complete text in codex-index.json
  • ➕ The search build would not need to reopen document files.
  • ➕ The two build steps would use the same captured text.
  • ➖ Substantially enlarges the intermediate index.
  • ➖ Changes the index artifact for consumers that only need excerpts.

Recommendation: Keep the PR's approach: it fixes keyword coverage without enlarging or changing codex-index.json, and preserves embedding behavior. Reviewers should verify that the build runs with document files present and that excerpt-fallback warnings are visible.

Files changed (7) +420 / -232

Bug fix (1) +284 / -0
search-index.mjsBuild postings from complete document text +284/-0

Build postings from complete document text

• Reads listed Markdown bodies and YAML files for BM25 postings, falling back to index excerpts with warnings when files cannot be read under the root. Exports the build with an injectable, lazily loaded embedder and preserves the previous embedding input.

scripts/search-index.mjs

Refactor (1) +4 / -228
build-search-index.mjsRetain a thin search-build CLI +4/-228

Retain a thin search-build CLI

• Moves the build implementation into an importable module while keeping the npm command and CLI error handling.

scripts/build-search-index.mjs

Tests (1) +127 / -0
search-index.test.jsCover full-text postings and excerpt fallback +127/-0

Cover full-text postings and excerpt fallback

• Builds search artifacts with a stand-in embedder and checks guide terms lost beyond the excerpt, a word split at the cutoff, and document-length accounting. Also verifies warnings and excerpt fallback for missing and out-of-root paths.

tests/search-index.test.js

Documentation (3) +4 / -4
README.mdClarify whole-text BM25 coverage +1/-1

Clarify whole-text BM25 coverage

• States that postings use each thread's whole text read from its file.

README.md

DEVELOPMENT.mdDocument search inputs and model dependency +2/-2

Document search inputs and model dependency

• Explains why postings read files rather than the truncated index content. Corrects the documented transformer package to @huggingface/transformers.

docs/DEVELOPMENT.md

auto-index.jsClarify the index content excerpt's purpose +1/-1

Clarify the index content excerpt's purpose

• Updates the content-field comment to distinguish its 5,000-character excerpt from the full text used for search postings.

scripts/auto-index.js

Other (1) +1 / -0
vitest.config.jsInclude the search-build module in coverage +1/-0

Include the search-build module in coverage

• Adds scripts/search-index.mjs to Vitest's coverage include list.

vitest.config.js

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3d50934f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/search-index.mjs Resolved
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Search leaks words from external files ✓ Resolved
Description
readDocumentText checks the lexical path with path.relative but then follows symlinks when
fs.readFileSync reads the file. If an indexed Markdown or YAML symlink inside the root points
outside it, the published search vocabulary includes terms and frequencies from the target's entire
contents, including text beyond the previously published 5,000-character excerpt.
Code

scripts/search-index.mjs[R129-132]

+  const relative = path.relative(root, filePath)
+  if (!relative || relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) return null
+  try {
+    const raw = fs.readFileSync(filePath, 'utf8')
Evidence
The new check compares path strings, whereas the subsequent read follows the symlink. The indexer
admits file symlinks and previously stored only their first 5,000 characters; the new vocabulary
serializes terms from the full read into the artifact published by the workflow.

scripts/search-index.mjs[126-134]
scripts/search-index.mjs[160-166]
scripts/search-index.mjs[265-280]
scripts/auto-index.js[782-788]
scripts/auto-index.js[862-862]
scripts/auto-index.js[1055-1072]
.github/workflows/auto-index.yml[150-165]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new whole-file postings read through symlinks whose targets lie outside the search root, publishing terms from beyond the index's existing excerpt.
## Fix Focus Areas
- scripts/search-index.mjs[126-139]
## Recommended Fix
Resolve the real paths of the root and document before reading. If the document's resolved path is outside the resolved root, return null so the existing excerpt fallback and warning apply; add a test using an in-root symlink to an outside file.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread scripts/search-index.mjs Resolved
…de it keeps its excerpt's postings

The indexer lists a .md or .yaml link by its own name and reads its target. The postings check the listed path, which
lies under the root, then read through the link, so the whole outside file reaches the published vocabulary. This case
links docs/leak.md to a file beside the root: the search must not find the file's word, must find the excerpt's, and
the warning must name the link. It fails here.
…ocument, so a link under the root to a file outside it is not read

The check compared the listed path, which lies under the root, and the read followed the link to its target, so a
checked-in docs/leak.md linking outside the repository put the whole target in the published vocabulary. The root and
the document now resolve to their real paths first; a document outside the root keeps its excerpt's postings and the
warning names it. The Markdown or YAML parse follows the listed name, as the indexer's does.
@jddunn

jddunn commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

@codex review

The head, 283783e, answers the P1 on scripts/search-index.mjs line 130 (a link under the root to a file outside it): real paths are compared before a read, test first in 6ed9de6.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 283783e172

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jddunn

jddunn commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

The head, 283783e, adds one change after a3d5093, which you reviewed: readDocumentText in scripts/search-index.mjs compares real paths before a read, so a link under the root to a file outside it keeps the excerpt's postings (test first in 6ed9de6).

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jddunn jddunn added the landing Checks and guards passed; lands after the comment pass label Oct 21, 2026
@jddunn
jddunn merged commit 8041bea into master Oct 21, 2026
15 checks passed
@jddunn
jddunn deleted the fix/search-postings-whole-documents branch October 21, 2026 10:22
@jddunn

jddunn commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

Merged at 10:22:56 UTC as 8041bea; master's Test Suite passed on it (run 39584175180). The Build and Publish Codex Index run it started (39584174987) read every listed document in full, with no excerpt warning, and updated #14 to 4901545. On that head codex-search.json holds 5,123 terms (2,627 at 3167841), with an average document length of 1,018.8 terms (354.9):

  • docs/DEVELOPMENT.md: 1,966 terms (550); found by architecture, sqlite3, storage, adapter, incremental, indexing, intelligent, better and framers; not by arch.
  • docs/RECATALOG_GUIDE.md: 818 terms (525); found by generated, autogenerated, reviewing, warnings and suggestions; not by gener.

Against the index at d19e45b, no document lost a word it still holds. The terms documents lost are six fragments of words the old excerpts cut (assi, eleuthe, fil, intermedia, org, sugge) and two words docs/DEVELOPMENT.md no longer holds: manually (#13) and xenova (this pull request names @huggingface/transformers in its place). The content field of codex-index.json keeps each document's first 5,000 characters, as before; on 4901545 the excerpt of docs/DEVELOPMENT.md ends at "entirely in Node" and that of docs/RECATALOG_GUIDE.md at "Only auto-gener", and the postings no longer read either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

landing Checks and guards passed; lands after the comment pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant