Repository navigation
Conversation
Documents were inserted without an id, so Orama generated a time-based one that is saved in the index, and the saved index followed the generator's input order, which can change between builds. Use each document's href as its id and sort the documents by href (without a locale) before inserting them. Add generator tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
avivkeller
approved these changes
Oct 26, 2026
ovflowd
approved these changes
Oct 26, 2026
ovflowd
approved these changes
Oct 26, 2026
ovflowd
left a comment
Member
There was a problem hiding this comment.
Thank you for your first contribution!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1190 +/- ##
==========================================
+ Coverage 93.44% 93.58% +0.13%
==========================================
Files 278 279 +1
Lines 27820 27895 +75
Branches 2790 2802 +12
==========================================
+ Hits 25997 26106 +109
+ Misses 1801 1767 -34
Partials 22 22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
| File | Main | PR | Change |
|---|---|---|---|
orama-db.json |
29.24 MB | 29.66 MB | +438.21 KB (+1.5%) |
Performance estimate (single CI run)
- Generation time: 2.9% slower (7.35 s → 7.56 s)
- Peak memory: 2.6% lower (1.28 GB → 1.24 GB)
web Generator
Performance estimate (single CI run)
- Generation time: 31.1% faster (22.42 s → 15.44 s)
- Peak memory: 7.3% higher (1.90 GB → 2.04 GB)
AugustinMauroy
approved these changes
Oct 26, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1184.
orama-db.jsonchanged on every build for two reasons: documents were inserted without anid, so Orama made up a time-based one that is saved in the index, and the saved index follows insertion order, which depends on the order the generator's input arrives in.This follows the approach in the issue, in
packages/react/src/orama-db/generate.mjsonly:id: href;hrefwith</>(no locale), after the existingflatMap, sobuildHierarchicalTitlestill sees each module's headings in document order.Added
packages/react/src/orama-db/__tests__/generate.test.mjs: two runs give identical output, module input order doesn't matter, hierarchical titles are kept, and the saved index still loads and can be searched. The two determinism tests fail without the change. Also added a patch changeset for@doc-kit/generator-react.Checks:
oxlintandoxfmt --checkpass on the changed files.node --run testreports 13 failures on bothmainand this branch (same count; I'm on Windows with Node 25, installed with the engine check relaxed), and 4 more passing tests with this change. I haven't built the full Node.js docs, so I haven't checked for duplicate hrefs in the real input; per the issue, Orama would throwDOCUMENT_ALREADY_EXISTSif there were any.