P0-E: End-to-end integration tests for ingest→query pipeline#53
Merged
P0-E: End-to-end integration tests for ingest→query pipeline#53
Conversation
…ser harness) - Add tests/integration/IngestQuery.test.ts with 4 test cases: - Multi-topic corpus ingest and query retrieval - Metadata accessibility verification - Persistence across sessions (reopen IndexedDB) - Multiple ingest-then-query cycles - Add tests/runtime/ingest-query-browser.spec.mjs for P0-E2: - IndexedDB CRUD and persistence validation - OPFS availability check - Vector compute backend availability - Update PLAN.md and TODO.md to mark P0-E complete Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [P0-E] Implement end-to-end integration tests for system validation
P0-E: End-to-end integration tests for ingest→query pipeline
Mar 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end validation for the ingest → persist → query vertical slice (Node/Vitest) and extends the browser runtime lane with additional storage/compute probes to support the v0.1 “soup-to-nuts” completeness goal.
Changes:
- Adds
tests/integration/IngestQuery.test.tsVitest suite covering multi-topic ingest+query, metadata round-trip, reopen/persistence, and incremental ingest. - Adds
tests/runtime/ingest-query-browser.spec.mjsPlaywright checks for IndexedDB CRUD/persistence plus OPFS/provider availability assertions. - Marks P0-E tasks complete in
TODO.mdand updates testing status inPLAN.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tests/runtime/ingest-query-browser.spec.mjs | New Playwright spec probing IndexedDB CRUD/persistence and runtime capability signals (OPFS + backend availability). |
| tests/integration/IngestQuery.test.ts | New Vitest integration tests exercising ingest → metadata/vector persistence → query ranking and reopen behavior. |
| TODO.md | Marks P0-E1/P0-E2 as completed. |
| PLAN.md | Updates “Integration Tests” status to complete and bumps testing completeness count. |
Comment on lines
+14
to
+17
| test("IndexedDB supports CORTEX CRUD and persistence patterns", async ({ page }) => { | ||
| await page.goto("/"); | ||
| await page.waitForFunction(() => globalThis.__cortexHarnessReady === true); | ||
|
|
Comment on lines
+8
to
+9
| * - IndexedDB supports the CRUD and indexing patterns used by | ||
| * IndexedDbMetadataStore (write, read, reopen, index query). |
Comment on lines
+40
to
+48
| // Helper to perform a transaction operation | ||
| function txPut(db, storeName, record) { | ||
| return new Promise((resolve, reject) => { | ||
| const tx = db.transaction(storeName, "readwrite"); | ||
| const store = tx.objectStore(storeName); | ||
| const request = store.put(record); | ||
| request.onsuccess = () => resolve(request.result); | ||
| request.onerror = () => reject(request.error); | ||
| }); |
Comment on lines
+256
to
+262
| it("persists data across sessions (reopen metadata store)", async () => { | ||
| const dbName = freshDbName(); | ||
| const vectorStore = new MemoryVectorStore(); | ||
| const keyPair = await generateKeyPair(); | ||
| const profile = makeProfile(); | ||
| const backend = makeBackend(); | ||
| const runner = makeRunner(backend); |
Comment on lines
+193
to
201
| - [x] **P0-E1:** Implement `tests/integration/IngestQuery.test.ts` | ||
| - Ingest sample text corpus (e.g., Wikipedia articles) | ||
| - Query for specific topics | ||
| - Verify expected pages returned | ||
| - Verify persistence (restart session, query again) | ||
|
|
||
| - [ ] **P0-E2:** Run integration test in browser harness | ||
| - [x] **P0-E2:** Run integration test in browser harness | ||
| - Ensure real IndexedDB and OPFS work correctly | ||
| - Verify WebGPU/WebGL/WASM backends function |
Owner
|
@copilot apply changes based on the comments in this thread |
- Wire ingest-query-browser.spec.mjs into test:browser by using playwright test (matches all *.spec.mjs via playwright.config.mjs) - Add hotpath_index object store with by-tier index + index lookup validation to browser spec (matches comment about index patterns) - Fix txPut/txGet/txIndexGetAll to resolve on tx.oncomplete instead of request.onsuccess for transaction-level safety - Clarify persistence test name and add comment explaining that MemoryVectorStore is intentionally shared (metadata-only persistence) Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Contributor
Author
All review comments addressed in bfa8db4:
|
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.
tests/integration/IngestQuery.test.ts— 4 integration teststests/runtime/ingest-query-browser.spec.mjs— browser harness testsPLAN.md,TODO.mdingest-query-browser.spec.mjsintotest:browserscript (useplaywright testto match all*.spec.mjsvia config)hotpath_indexstore withby-tierindex +txIndexGetAlllookup in browser spectxPut/txGet/txIndexGetAllto wait ontx.oncomplete+ handletx.onabortOriginal prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.