Skip to content

Remove module indexing#3984

Open
habdelra wants to merge 4 commits intomainfrom
cs-9987-remove-module-indexing
Open

Remove module indexing#3984
habdelra wants to merge 4 commits intomainfrom
cs-9987-remove-module-indexing

Conversation

@habdelra
Copy link
Contributor

This PR removes module indexing. This PR is meant to be backwards compatible so that if there are still module index entries we can ignore them safely.

After this PR gets deployed to staging and production, I'll create a followup PR to remove all the module index entries and streamline the queries since we can safely assume those wont exist.

@github-actions
Copy link

Preview deployments

Copy link

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

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: c4d4043e92

ℹ️ 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".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes “module” rows from the search index flow while remaining tolerant of existing type='module' rows in boxel_index. Module dependency/error information is now sourced from the modules cache (via DefinitionLookup) and instance deps are expanded transitively so module rows are no longer needed for invalidation.

Changes:

  • Stop writing/querying type='module' index entries; filter out existing module rows in boxel_index queries and counts.
  • Expand instance deps (and instance error deps) with transitive module dependencies using the module cache; switch dependency-error collection to read from cached module errors.
  • Plumb definitionLookup through worker/task args and add DefinitionLookup.getModuleCacheEntries() to support batched cache reads.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/runtime-common/worker.ts Creates and passes a CachingDefinitionLookup into task args.
packages/runtime-common/tasks/index.ts Extends TaskArgs to include definitionLookup.
packages/runtime-common/tasks/indexer.ts Passes definitionLookup and realmOwnerUserId into IndexRunner.
packages/runtime-common/index-runner.ts Removes module indexing; expands instance deps transitively via module cache; reads module errors from cache instead of index.
packages/runtime-common/definition-lookup.ts Exports cache types and adds getModuleCacheEntries() for batched module cache retrieval.
packages/runtime-common/index-writer.ts Removes module entry support; filters out module rows in reads/copy/counts; rejects module-error writes.
packages/runtime-common/index-structure.ts Removes 'module' from BoxelIndexTable.type.
packages/runtime-common/index-query-engine.ts Removes getModule() and associated module result types.
packages/runtime-common/realm-index-query-engine.ts Removes module() query surface.
packages/runtime-common/realm-index-updater.ts Drops module stats fields from initializer.
packages/realm-server/worker-manager.ts Stops emitting module-error index entries for failed paths.
packages/realm-server/tests/server-endpoints/maintenance-endpoints-test.ts Updates expected stats shape (no module counters).
packages/realm-server/tests/indexing-test.ts Updates tests away from module index queries; validates behavior via instance deps and module cache rows.
packages/realm-server/tests/full-reindex-test.ts Updates task args construction for definitionLookup.
packages/realm-server/tests/billing-test.ts Updates task args construction for definitionLookup.
packages/host/tests/unit/index-writer-test.ts Updates invalidation expectations to rely on instance deps instead of module rows; adjusts copy assertions.
packages/host/tests/unit/index-query-engine-test.ts Adds getModuleCacheEntries to the mock DefinitionLookup.
packages/host/tests/integration/components/ai-module-creation-test.gts Switches from module index assertions to file index assertions for module files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Feb 12, 2026

Host Test Results

 1 files  ±    0   1 suites  ±0   1m 10s ⏱️ - 1h 38m 18s
97 tests  - 1 741  28 ✅  - 1 797  0 💤  - 13  23 ❌ +23  46 🔥 +46 
97 runs   - 1 756  -18 ✅  - 1 858  0 💤  - 13  69 ❌ +69  46 🔥 +46 

For more details on these failures and errors, see this check.

Results for commit c9ed4be. ± Comparison against base commit e58dcc0.

This pull request removes 1764 and adds 23 tests. Note that renamed tests count towards both.
Chrome ‑ Acceptance | AI Assistant tests: "Add Same Skills" copies skill configuration to new session
Chrome ‑ Acceptance | AI Assistant tests: ai assistant panel width persists to localStorage
Chrome ‑ Acceptance | AI Assistant tests: auto-attached cards behaviour
Chrome ‑ Acceptance | AI Assistant tests: auto-attached spec card can be removed
Chrome ‑ Acceptance | AI Assistant tests: auto-attaches spec card when spec panel is open and spec is selected
Chrome ‑ Acceptance | AI Assistant tests: can display and remove auto attached file
Chrome ‑ Acceptance | AI Assistant tests: can open attach file modal
Chrome ‑ Acceptance | AI Assistant tests: clicking auto-attached card makes it a chosen card
Chrome ‑ Acceptance | AI Assistant tests: clicking auto-attached file makes it a chosen file
Chrome ‑ Acceptance | AI Assistant tests: code mode context sent with message
…
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | Code patches tests: can patch code 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | Spec preview: view when there is a single spec instance 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | code submode | create-file tests > when user has permissions to both test realms: new file button has options to create card def, field def, card instance, and text files 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | code submode | editor tests: card instance JSON displayed in monaco editor 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | code submode | head format preview: head format preview updates when editing card json 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | code submode | schema editor tests: schema editor lists the inheritance chain 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | code-submode | card playground > single realm: can render playground panel when an exported card def is selected 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  After execution of test: Acceptance | code-submode | field playground > single realm: can preview compound field instance 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  While executing test: Acceptance | AI Assistant tests: can open attach file modal 
Chrome ‑ Global error: Uncaught TypeError: Failed to fetch at http://localhost:7357/assets/chunk.b312d2e75dd270910c26.js, line 156670  While executing test: Acceptance | Code patches tests: can patch code 
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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