Skip to content

fix(tests): repair specs broken by #278 ranking/dream-cycle changes#279

Open
heybeaux wants to merge 1 commit into
stagingfrom
fix/post-278-test-failures
Open

fix(tests): repair specs broken by #278 ranking/dream-cycle changes#279
heybeaux wants to merge 1 commit into
stagingfrom
fix/post-278-test-failures

Conversation

@heybeaux

@heybeaux heybeaux commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes 31 unit-test failures introduced by PR #278 (merge commit 825b557). All changes are spec-only — no production code was modified.

Root causes per suite

Test/features — prisma-postgres.provider.spec.ts (27 failures)

Test/intelligence — dream-cycle-consolidation.stage.spec.ts (2 failures)

  • consolidateCluster now calls tx.memory.update (to mark searchable: true after the embedding is written) in addition to create and updateMany. Three test tx mocks were missing update, causing TypeError: tx.memory.update is not a function.
  • Fix: add update: jest.fn().mockResolvedValue({}) to all transaction mocks.

Test/memory — memory-query-context.service.spec.ts (1 failure)

  • The sessionId filter on the SESSION layer changed from a direct { sessionId } field to a relation join { session: { OR: [{ id }, { externalId }] } } to support external session IDs.
  • Fix: update the toMatchObject expectation to assert the new session.OR shape.

Test/memory — memory-job-processor.service.spec.ts (1 failure)

  • The RLS path for accounts no longer wraps extractAndEmbed in a $transaction. It now issues SET app.current_account_id = '...' via $executeRawUnsafe then runs outside any transaction, avoiding pool exhaustion under bulk load.
  • Fix: replace expect($transaction).toHaveBeenCalled() with expect($executeRawUnsafe).toHaveBeenCalledWith(expect.stringContaining('SET app.current_account_id')).

Production bugs found

None. All failures were specs not updated to match intentional behavior changes landed in #278.

Test plan

  • pnpm jest src/storage/prisma-postgres.provider.spec.ts --forceExit → 27/27 pass
  • pnpm jest src/consolidation/stages/dream-cycle-consolidation.stage.spec.ts --forceExit → 14/14 pass
  • pnpm jest src/memory/memory-query-context.service.spec.ts --forceExit → 19/19 pass
  • pnpm jest src/memory/memory-job-processor.service.spec.ts --forceExit → 3/3 pass
  • All four specs together: 63/63 pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated test assertions to align with current code behavior and improved mock configurations across memory management and storage service tests.

- dream-cycle-consolidation.stage.spec.ts: add tx.memory.update mock
  (production now calls update to mark searchable:true after embedding write)
- memory-query-context.service.spec.ts: update sessionId filter assertion
  to match new session relation OR clause (id | externalId)
- memory-job-processor.service.spec.ts: replace $transaction assertion with
  $executeRawUnsafe — RLS path now sets app.current_account_id directly
- prisma-postgres.provider.spec.ts: inject EmbeddingWriteService mock and
  update embedding assertions to use writeLegacyInlineEmbedding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates four test files to align mock expectations with implementation changes. Changes include extending consolidation transaction mocks with memory update methods, adjusting job processor assertions for RLS context setup, updating query context sessionId filter expectations, and integrating embedding service mocks into provider tests.

Changes

Test Expectations Alignment

Layer / File(s) Summary
Consolidation memory update mock setup
src/consolidation/stages/dream-cycle-consolidation.stage.spec.ts
Three test cases extend the mocked tx.memory object with an update method returning an empty object, aligning with code paths that now invoke memory.update.
Memory job processor RLS context assertion
src/memory/memory-job-processor.service.spec.ts
Test assertion changes to verify that processing a job with an accountId triggers mockPrisma.$executeRawUnsafe with SQL containing SET app.current_account_id, replacing the prior $transaction expectation.
Memory query context sessionId filtering
src/memory/memory-query-context.service.spec.ts
SESSION-layer where clause assertion updated to expect a nested where.session.OR filter matching either id or externalId, replacing the prior direct where.sessionId property check.
Embedding service integration and assertions
src/storage/prisma-postgres.provider.spec.ts
Test suite imports EmbeddingWriteService, registers it as a mocked provider, and updates embedding assertions in createMemory and updateMemory to expect writeLegacyInlineEmbedding calls instead of raw SQL embedding updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • heybeaux/engram#250: The PR's sessionId filtering assertion update directly aligns with query-context and session recall work.

Poem

🐰 Mock expectations dance and sway,
To match the code's new SQL play,
Embeddings flow through service calls,
Sessions filter through where clauses' halls,
Tests now speak what truth fulfills!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: repairing broken test specs caused by a previous PR (#278) that made ranking/dream-cycle changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/post-278-test-failures

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/memory/memory-query-context.service.spec.ts (1)

290-290: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update property check to match new filter shape.

The test checks for the absence of sessionId, but the implementation now uses a session relation filter. When sessionId is omitted, the session property should not be present in the where clause.

🔧 Proposed fix
-      expect(sessionCall![0].where).not.toHaveProperty('sessionId');
+      expect(sessionCall![0].where).not.toHaveProperty('session');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/memory/memory-query-context.service.spec.ts` at line 290, Update the
assertion to reflect the new filter shape: replace the check for absence of
'sessionId' with a check that sessionCall[0].where does not have the 'session'
property (i.e., expect(sessionCall![0].where).not.toHaveProperty('session')), so
the test verifies the implementation's relation-based filter rather than the old
sessionId field.
🧹 Nitpick comments (1)
src/memory/memory-job-processor.service.spec.ts (1)

87-89: ⚡ Quick win

Optional: Strengthen the assertion to verify the accountId is included.

The current assertion checks that the SQL contains SET app.current_account_id but doesn't verify that the sanitized accountId value (acc-123) is actually included. Consider making the assertion more specific to ensure the full SQL string is correct.

💚 More specific assertion
     expect(mockPrisma.$executeRawUnsafe).toHaveBeenCalledWith(
-      expect.stringContaining('SET app.current_account_id'),
+      expect.stringContaining("SET app.current_account_id = 'acc-123'"),
     );

Or verify the exact string:

     expect(mockPrisma.$executeRawUnsafe).toHaveBeenCalledWith(
-      expect.stringContaining('SET app.current_account_id'),
+      "SET app.current_account_id = 'acc-123'",
     );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/memory/memory-job-processor.service.spec.ts` around lines 87 - 89, The
test assertion for mockPrisma.$executeRawUnsafe is too generic; update the
expectation in memory-job-processor.service.spec.ts to assert the sanitized
accountId appears (e.g., 'acc-123') — either by changing
expect.stringContaining('SET app.current_account_id') to
expect.stringContaining("SET app.current_account_id = 'acc-123'") or by
asserting the exact SQL string passed to mockPrisma.$executeRawUnsafe so the
test verifies the full SQL includes the accountId value; reference the
mockPrisma.$executeRawUnsafe call and the existing expect(...) matcher when
making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/memory/memory-query-context.service.spec.ts`:
- Line 290: Update the assertion to reflect the new filter shape: replace the
check for absence of 'sessionId' with a check that sessionCall[0].where does not
have the 'session' property (i.e.,
expect(sessionCall![0].where).not.toHaveProperty('session')), so the test
verifies the implementation's relation-based filter rather than the old
sessionId field.

---

Nitpick comments:
In `@src/memory/memory-job-processor.service.spec.ts`:
- Around line 87-89: The test assertion for mockPrisma.$executeRawUnsafe is too
generic; update the expectation in memory-job-processor.service.spec.ts to
assert the sanitized accountId appears (e.g., 'acc-123') — either by changing
expect.stringContaining('SET app.current_account_id') to
expect.stringContaining("SET app.current_account_id = 'acc-123'") or by
asserting the exact SQL string passed to mockPrisma.$executeRawUnsafe so the
test verifies the full SQL includes the accountId value; reference the
mockPrisma.$executeRawUnsafe call and the existing expect(...) matcher when
making the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 90537c54-ef94-4185-a032-b9d26847eeb5

📥 Commits

Reviewing files that changed from the base of the PR and between 825b557 and 3890807.

📒 Files selected for processing (4)
  • src/consolidation/stages/dream-cycle-consolidation.stage.spec.ts
  • src/memory/memory-job-processor.service.spec.ts
  • src/memory/memory-query-context.service.spec.ts
  • src/storage/prisma-postgres.provider.spec.ts

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

✅ Recall Benchmark Results

╔══════════════════════════════════════════════════════════════╗
    ║              ENGRAM RECALL BENCHMARK REPORT                 ║
    ╚══════════════════════════════════════════════════════════════╝
    
      Git SHA:    155fa34
      Branch:     HEAD
      Timestamp:  2026-06-12T05:52:41.898Z
    
    ┌─────────────────────────────────────────────────────────────┐
    │  OVERALL SCORES                                            │
    ├─────────────────────────────────────────────────────────────┤
    │  Total Queries:   81                                        │
    │  Passed:          78 / 81 (96.3%)                                        
    │  Precision@5:     95.7%  ✅  (threshold: 70%)
    │  Recall@20:       97.5%
    │  MRR:             0.8235
    │  Isolation:       100.0%  ✅  (threshold: 100%)
    └─────────────────────────────────────────────────────────────┘
    
    ┌──────────────────┬───────┬────────┬──────────┬──────────┬──────────┬───────────┐
    │ Category         │ Total │ Passed │ Prec@5   │ Rec@20   │ MRR      │ Isolation │
    ├──────────────────┼───────┼────────┼──────────┼──────────┼──────────┼───────────┤
    │ adversarial      │ 10    │ 10     │ 100.0%   │ 100.0%   │ 1.0000   │ 100.0%    │
    │ cross_feature    │ 10    │ 8      │ 80.0%    │ 100.0%   │ 0.6810   │ 100.0%    │
    │ edge_case        │ 16    │ 16     │ 100.0%   │ 100.0%   │ 0.9323   │ 100.0%    │
    │ emotional        │ 10    │ 10     │ 95.0%    │ 100.0%   │ 0.7238   │ 100.0%    │
    │ rls_isolation    │ 10    │ 10     │ 100.0%   │ 100.0%   │ 0.8083   │ 100.0%    │
    │ semantic         │ 14    │ 13     │ 92.9%    │ 100.0%   │ 0.7077   │ 100.0%    │
    │ temporal         │ 11    │ 11     │ 100.0%   │ 81.8%    │ 0.8864   │ 100.0%    │
    └──────────────────┴───────┴────────┴──────────┴──────────┴──────────┴───────────┘
    
    ❌ FAILED QUERIES (3):
    
      [semantic_002] "Tell me about my morning routine" (user: alice)
        ⚠️  ZERO HITS: expected alice_coffee_002 in top 5
        📊 Precision@5: 0.0% — hit: [], missed: [alice_coffee_002]
        📋 Actual top 5: [alice_family_001, alice_health_001, alice_last_week_work_001, alice_recent_convo_001, alice_anxiety_001]
    
      [cross_001] "medication I need to take every morning" (user: alice)
        ⚠️  ZERO HITS: expected alice_health_001 in top 5
        📊 Precision@5: 0.0% — hit: [], missed: [alice_health_001]
        📋 Actual top 5: [alice_coffee_001, alice_coffee_002, alice_emotion_change_001, alice_cooking_001, alice_calm_001]
    
      [cross_006] "Who am I and what do I do?" (user: alice)
        ⚠️  ZERO HITS: expected alice_identity_project_001 in top 5
        📊 Precision@5: 0.0% — hit: [], missed: [alice_identity_project_001]
        📋 Actual top 5: [alice_anxiety_001, alice_stress_001, alice_oldest_memory_001, alice_calm_001, alice_work_002]
    
    
    ✅ ALL THRESHOLDS PASSED

      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:147:15)

  console.log
    📁 Report saved: /home/runner/work/engram/engram/test/benchmark/results/benchmark-2026-06-12T05-52-41-923Z.json

      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:151:15)

  console.warn
    ⚠️  3 zero-hit queries (tracked, not blocking): semantic_002, cross_001, cross_006

    �[0m �[90m 198 |�[39m   �[90m// Zero-hit queries are tracked as warnings — P@5 threshold is the hard gate.�[39m
     �[90m 199 |�[39m   �[36mif�[39m (zeroHitQueries�[33m.�[39mlength �[33m>�[39m �[35m0�[39m) {
    �[31m�[1m>�[22m�[39m�[90m 200 |�[39m     console�[33m.�[39mwarn(
     �[90m     |�[39m             �[31m�[1m^�[22m�[39m
     �[90m 201 |�[39m       �[32m`⚠️  ${zeroHitQueries.length} zero-hit queries (tracked, not blocking): ${zeroHitQueries.map((q) => q.queryId).join(', ')}`�[39m�[33m,�[39m
     �[90m 202 |�[39m     )�[33m;�[39m
     �[90m 203 |�[39m   }�[0m

      at checkThresholds (benchmark/scoring.ts:200:13)
      at buildReport (benchmark/scoring.ts:181:23)
      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:172:33)

  console.warn
    ⚠️  Zero-hit queries (3): semantic_002, cross_001, cross_006

    �[0m �[90m 194 |�[39m         �[36mif�[39m (zeroHitQueries�[33m.�[39mlength �[33m>�[39m �[35m0�[39m) {
     �[90m 195 |�[39m           �[36mconst�[39m ids �[33m=�[39m zeroHitQueries�[33m.�[39mmap((q) �[33m=>�[39m q�[33m.�[39mqueryId)�[33m.�[39mjoin(�[32m', '�[39m)�[33m;�[39m
    �[31m�[1m>�[22m�[39m�[90m 196 |�[39m           console�[33m.�[39mwarn(
     �[90m     |�[39m                   �[31m�[1m^�[22m�[39m
     �[90m 197 |�[39m             �[32m`⚠️  Zero-hit queries (${zeroHitQueries.length}): ${ids}`�[39m�[33m,�[39m
     �[90m 198 |�[39m           )�[33m;�[39m
     �[90m 199 |�[39m         }�[0m

      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:196:19)

PASS test/benchmark/recall-benchmark.e2e-spec.ts (136.765 s)
  Recall Benchmark
    Category: semantic
      ✓ [semantic_001] What kind of coffee do I like? (176 ms)
      ✓ [semantic_002] Tell me about my morning routine (92 ms)
      ✓ [semantic_003] What tech stack am I using? (61 ms)
      ✓ [semantic_004] coffee preferences (973 ms)
      ✓ [semantic_005] What books have I been reading? (74 ms)
      ✓ [semantic_006] favorite dinner recipe (195 ms)
      ✓ [semantic_007] house savings goal (57 ms)
      ✓ [semantic_008] What framework am I using for the frontend? (1100 ms)
      ✓ [semantic_009] flight seat preference (72 ms)
      ✓ [semantic_010] ensemble search architecture decision (58 ms)
      ✓ [semantic_011] What coffee roast do I prefer? (62 ms)
      ✓ [negative_001] quantum physics black holes dark matter (60 ms)
      ✓ [negative_002] ancient Egyptian hieroglyphics translation (1128 ms)
      ✓ [minimal_001] pizza preference (675 ms)
    Category: emotional
      ✓ [emotional_001] What makes me happy? (78 ms)
      ✓ [emotional_002] times I felt sad or grieving (76 ms)
      ✓ [emotional_003] when I felt stressed or overwhelmed (128 ms)
      ✓ [emotional_004] What am I worried about? (57 ms)
      ✓ [emotional_005] Times I was frustrated (74 ms)
      ✓ [emotional_006] My proudest moments (95 ms)
      ✓ [emotional_007] What stresses me out? (151 ms)
      ✓ [emotional_008] happy about school but worried about costs (57 ms)
      ✓ [emotional_009] How has my attitude toward work changed? (58 ms)
      ✓ [emotional_010] meditation and mental wellbeing (61 ms)
    Category: temporal
      ✓ [temporal_001] What happened today in standup? (404 ms)
      ✓ [temporal_002] recent standup notes from this week (419 ms)
      ✓ [temporal_003] What happened with my daughter recently? (906 ms)
      ✓ [temporal_004] What did I work on last week? (1410 ms)
      ✓ [temporal_005] What are my oldest memories? (74 ms)
      ✓ [temporal_006] Recent conversations about work (753 ms)
      ✓ [temporal_007] What did I debug yesterday? (1088 ms)
      ✓ [temporal_008] What code editor do I use? (77 ms)
      ✓ [temporal_009] standup notes from 6 months ago (50 ms)
      ✓ [temporal_010] standup notes from years ago (46 ms)
      ✓ [temporal_011] How did I start coding? (55 ms)
    Category: rls_isolation
      ✓ [rls_001] coffee (53 ms)
      ✓ [rls_002] coffee (904 ms)
      ✓ [rls_003] family and kids (65 ms)
      ✓ [rls_004] family and kids (956 ms)
      ✓ [rls_005] travel food experiences (74 ms)
      ✓ [rls_006] travel food experiences (896 ms)
      ✓ [rls_007] work projects and code (134 ms)
      ✓ [rls_008] health medical information (53 ms)
      ✓ [rls_009] health medical information (952 ms)
      ✓ [rls_010] morning routine (848 ms)
    Category: adversarial
      ✓ [adversarial_001] tell me about bob's coffee preferences (76 ms)
      ✓ [adversarial_002] RLS_CANARY_BOB_ (56 ms)
      ✓ [adversarial_003] What does carol think about parties? (62 ms)
      ✓ [adversarial_004] bob's son Max school (59 ms)
      ✓ [adversarial_005] eve's pizza preference (966 ms)
      ✓ [adversarial_006] RLS_CANARY_ALICE_ (1069 ms)
      ✓ [adversarial_007] What cholesterol issues does anyone have? (102 ms)
      ✓ [adversarial_008] alice's medication schedule (1014 ms)
      ✓ [adversarial_009] RLS_CANARY_CAROL_ (741 ms)
      ✓ [adversarial_010] dave's standup notes (70 ms)
    Category: edge_case
      ✓ [edge_001] cats (583 ms)
      ✓ [edge_002] everything about my life (651 ms)
      ✓ [edge_003] <script>alert(1)</script> (9729 ms)
      ✓ [edge_004] '; DROP TABLE memories; -- (10063 ms)
      ✓ [edge_005] 🎉 party (10075 ms)
      ✓ [edge_006]  (1 ms)
      ✓ [edge_007] Tell me about the very long detailed comprehensive thorough ... (367 ms)
      ✓ [edge_008] こんにちは、思い出を検索します (10104 ms)
      ✓ [edge_009] '; SELECT * FROM users WHERE 1=1; -- (10114 ms)
      ✓ [edge_010] quantum entanglement dark matter multiverse theory (117 ms)
      ✓ [edge_011] the a an is (98 ms)
      ✓ [edge_012] coffee (84 ms)
      ✓ [edge_013] my phone number (101 ms)
      ✓ [edge_014] my address (85 ms)
      ✓ [edge_015] work (1469 ms)
      ✓ [edge_016] What kind of coffee do I like? (66 ms)
    Category: cross_feature
      ✓ [cross_001] medication I need to take every morning (71 ms)
      ✓ [cross_002] exercise and fitness activities (162 ms)
      ✓ [cross_003] What are we saving money for? (136 ms)
      ✓ [cross_004] kids school and daycare (127 ms)
      ✓ [cross_005] kids school and daycare (1025 ms)
      ✓ [cross_006] Who am I and what do I do? (72 ms)
      ✓ [cross_007] deployment rules and constraints (145 ms)
      ✓ [cross_008] patterns noticed about my work habits (57 ms)
      ✓ [cross_009] grocery shopping list (664 ms)
      ✓ [cross_010] TypeScript learning (598 ms)
    Summary
      ✓ should generate and save benchmark report (48 ms)
      ✓ should have zero isolation failures (1 ms)
      ✓ should meet precision thresholds (with real embeddings) (20 ms)

Test Suites: 1 passed, 1 total
Tests:       84 passed, 84 total
Snapshots:   0 total
Time:        136.956 s
Ran all test suites matching recall-benchmark.e2e-spec.
Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?

Full output

> engram@1.5.0 benchmark /home/runner/work/engram/engram
> jest --config ./test/jest-e2e.json --testPathPatterns=recall-benchmark\.e2e-spec --runInBand --forceExit

[05:51:25.210] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 149
[05:51:25.309] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 85
[05:51:25.370] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 57
[05:51:26.343] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 969
[05:51:26.417] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 69
[05:51:26.613] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 192
[05:51:26.670] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 54
[05:51:27.770] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1096
[05:51:27.842] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 68
[05:51:27.901] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 54
[05:51:27.963] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 59
[05:51:28.024] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 57
[05:51:29.152] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1126
[05:51:29.827] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 671
[05:51:29.906] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 75
[05:51:29.981] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 72
[05:51:30.109] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 123
[05:51:30.167] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 53
[05:51:30.241] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 71
[05:51:30.336] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 93
[05:51:30.488] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 149
[05:51:30.545] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 54
[05:51:30.600] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 52
[05:51:30.663] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 57
[05:51:31.068] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-dave-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 401
[05:51:31.488] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-dave-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 415
[05:51:32.394] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 902
[05:51:33.804] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1407
[05:51:33.879] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 72
[05:51:34.632] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 749
[05:51:35.720] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1084
[05:51:35.797] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 74
[05:51:35.847] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-dave-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 47
[05:51:35.893] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-dave-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 43
[05:51:35.948] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 52
[05:51:35.997] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 46
[05:51:36.906] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 902
[05:51:36.971] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 63
[05:51:37.927] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 953
[05:51:38.002] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 72
[05:51:38.898] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 894
[05:51:39.032] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 131
[05:51:39.085] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 51
[05:51:40.037] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 950
[05:51:40.886] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 845
[05:51:40.962] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 74
[05:51:41.017] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 52
[05:51:41.080] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 60
[05:51:41.140] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 57
[05:51:42.107] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 964
[05:51:43.176] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1066
[05:51:43.278] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 99
[05:51:44.293] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1013
[05:51:45.034] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 739
[05:51:45.104] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 67
[05:51:45.688] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 581
[05:51:46.340] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 649
[05:51:56.069] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-carol-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 9726
[05:52:06.132] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-carol-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 10058
[05:52:16.206] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-carol-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 10071
[05:52:16.574] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 363
[05:52:26.678] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-carol-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 10100
[05:52:36.792] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-carol-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 10106
[05:52:36.910] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 111
[05:52:37.008] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 94
[05:52:37.092] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 80
[05:52:37.189] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 94
[05:52:37.279] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 83
[05:52:38.747] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1463
[05:52:38.815] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 63
[05:52:38.886] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 67
[05:52:39.048] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 160
[05:52:39.184] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 133
[05:52:39.311] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 124
[05:52:40.336] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-bob-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 1023
[05:52:40.409] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 70
[05:52:40.554] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 139
[05:52:40.612] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-alice-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 54
[05:52:41.276] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 661
[05:52:41.875] �[32mINFO�[39m (3174): �[36mrequest completed�[39m
    �[35mreq�[39m: {
      "method": "POST",
      "url": "/v1/memories/query"
    }
    �[35maccountId�[39m: "eng_test..."
    �[35muserId�[39m: "test-corpus-user-eve-1781243431684"
    �[35mres�[39m: {
      "statusCode": 201
    }
    �[35mresponseTime�[39m: 596
  console.warn
    ⚠️  3 zero-hit queries (tracked, not blocking): semantic_002, cross_001, cross_006

    �[0m �[90m 198 |�[39m   �[90m// Zero-hit queries are tracked as warnings — P@5 threshold is the hard gate.�[39m
     �[90m 199 |�[39m   �[36mif�[39m (zeroHitQueries�[33m.�[39mlength �[33m>�[39m �[35m0�[39m) {
    �[31m�[1m>�[22m�[39m�[90m 200 |�[39m     console�[33m.�[39mwarn(
     �[90m     |�[39m             �[31m�[1m^�[22m�[39m
     �[90m 201 |�[39m       �[32m`⚠️  ${zeroHitQueries.length} zero-hit queries (tracked, not blocking): ${zeroHitQueries.map((q) => q.queryId).join(', ')}`�[39m�[33m,�[39m
     �[90m 202 |�[39m     )�[33m;�[39m
     �[90m 203 |�[39m   }�[0m

      at checkThresholds (benchmark/scoring.ts:200:13)
      at buildReport (benchmark/scoring.ts:181:23)
      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:144:33)

  console.log
    
    ╔══════════════════════════════════════════════════════════════╗
    ║              ENGRAM RECALL BENCHMARK REPORT                 ║
    ╚══════════════════════════════════════════════════════════════╝
    
      Git SHA:    155fa34
      Branch:     HEAD
      Timestamp:  2026-06-12T05:52:41.898Z
    
    ┌─────────────────────────────────────────────────────────────┐
    │  OVERALL SCORES                                            │
    ├─────────────────────────────────────────────────────────────┤
    │  Total Queries:   81                                        │
    │  Passed:          78 / 81 (96.3%)                                        
    │  Precision@5:     95.7%  ✅  (threshold: 70%)
    │  Recall@20:       97.5%
    │  MRR:             0.8235
    │  Isolation:       100.0%  ✅  (threshold: 100%)
    └─────────────────────────────────────────────────────────────┘
    
    ┌──────────────────┬───────┬────────┬──────────┬──────────┬──────────┬───────────┐
    │ Category         │ Total │ Passed │ Prec@5   │ Rec@20   │ MRR      │ Isolation │
    ├──────────────────┼───────┼────────┼──────────┼──────────┼──────────┼───────────┤
    │ adversarial      │ 10    │ 10     │ 100.0%   │ 100.0%   │ 1.0000   │ 100.0%    │
    │ cross_feature    │ 10    │ 8      │ 80.0%    │ 100.0%   │ 0.6810   │ 100.0%    │
    │ edge_case        │ 16    │ 16     │ 100.0%   │ 100.0%   │ 0.9323   │ 100.0%    │
    │ emotional        │ 10    │ 10     │ 95.0%    │ 100.0%   │ 0.7238   │ 100.0%    │
    │ rls_isolation    │ 10    │ 10     │ 100.0%   │ 100.0%   │ 0.8083   │ 100.0%    │
    │ semantic         │ 14    │ 13     │ 92.9%    │ 100.0%   │ 0.7077   │ 100.0%    │
    │ temporal         │ 11    │ 11     │ 100.0%   │ 81.8%    │ 0.8864   │ 100.0%    │
    └──────────────────┴───────┴────────┴──────────┴──────────┴──────────┴───────────┘
    
    ❌ FAILED QUERIES (3):
    
      [semantic_002] "Tell me about my morning routine" (user: alice)
        ⚠️  ZERO HITS: expected alice_coffee_002 in top 5
        📊 Precision@5: 0.0% — hit: [], missed: [alice_coffee_002]
        📋 Actual top 5: [alice_family_001, alice_health_001, alice_last_week_work_001, alice_recent_convo_001, alice_anxiety_001]
    
      [cross_001] "medication I need to take every morning" (user: alice)
        ⚠️  ZERO HITS: expected alice_health_001 in top 5
        📊 Precision@5: 0.0% — hit: [], missed: [alice_health_001]
        📋 Actual top 5: [alice_coffee_001, alice_coffee_002, alice_emotion_change_001, alice_cooking_001, alice_calm_001]
    
      [cross_006] "Who am I and what do I do?" (user: alice)
        ⚠️  ZERO HITS: expected alice_identity_project_001 in top 5
        📊 Precision@5: 0.0% — hit: [], missed: [alice_identity_project_001]
        📋 Actual top 5: [alice_anxiety_001, alice_stress_001, alice_oldest_memory_001, alice_calm_001, alice_work_002]
    
    
    ✅ ALL THRESHOLDS PASSED

      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:147:15)

  console.log
    📁 Report saved: /home/runner/work/engram/engram/test/benchmark/results/benchmark-2026-06-12T05-52-41-923Z.json

      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:151:15)

  console.warn
    ⚠️  3 zero-hit queries (tracked, not blocking): semantic_002, cross_001, cross_006

    �[0m �[90m 198 |�[39m   �[90m// Zero-hit queries are tracked as warnings — P@5 threshold is the hard gate.�[39m
     �[90m 199 |�[39m   �[36mif�[39m (zeroHitQueries�[33m.�[39mlength �[33m>�[39m �[35m0�[39m) {
    �[31m�[1m>�[22m�[39m�[90m 200 |�[39m     console�[33m.�[39mwarn(
     �[90m     |�[39m             �[31m�[1m^�[22m�[39m
     �[90m 201 |�[39m       �[32m`⚠️  ${zeroHitQueries.length} zero-hit queries (tracked, not blocking): ${zeroHitQueries.map((q) => q.queryId).join(', ')}`�[39m�[33m,�[39m
     �[90m 202 |�[39m     )�[33m;�[39m
     �[90m 203 |�[39m   }�[0m

      at checkThresholds (benchmark/scoring.ts:200:13)
      at buildReport (benchmark/scoring.ts:181:23)
      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:172:33)

  console.warn
    ⚠️  Zero-hit queries (3): semantic_002, cross_001, cross_006

    �[0m �[90m 194 |�[39m         �[36mif�[39m (zeroHitQueries�[33m.�[39mlength �[33m>�[39m �[35m0�[39m) {
     �[90m 195 |�[39m           �[36mconst�[39m ids �[33m=�[39m zeroHitQueries�[33m.�[39mmap((q) �[33m=>�[39m q�[33m.�[39mqueryId)�[33m.�[39mjoin(�[32m', '�[39m)�[33m;�[39m
    �[31m�[1m>�[22m�[39m�[90m 196 |�[39m           console�[33m.�[39mwarn(
     �[90m     |�[39m                   �[31m�[1m^�[22m�[39m
     �[90m 197 |�[39m             �[32m`⚠️  Zero-hit queries (${zeroHitQueries.length}): ${ids}`�[39m�[33m,�[39m
     �[90m 198 |�[39m           )�[33m;�[39m
     �[90m 199 |�[39m         }�[0m

      at Object.<anonymous> (benchmark/recall-benchmark.e2e-spec.ts:196:19)

PASS test/benchmark/recall-benchmark.e2e-spec.ts (136.765 s)
  Recall Benchmark
    Category: semantic
      ✓ [semantic_001] What kind of coffee do I like? (176 ms)
      ✓ [semantic_002] Tell me about my morning routine (92 ms)
      ✓ [semantic_003] What tech stack am I using? (61 ms)
      ✓ [semantic_004] coffee preferences (973 ms)
      ✓ [semantic_005] What books have I been reading? (74 ms)
      ✓ [semantic_006] favorite dinner recipe (195 ms)
      ✓ [semantic_007] house savings goal (57 ms)
      ✓ [semantic_008] What framework am I using for the frontend? (1100 ms)
      ✓ [semantic_009] flight seat preference (72 ms)
      ✓ [semantic_010] ensemble search architecture decision (58 ms)
      ✓ [semantic_011] What coffee roast do I prefer? (62 ms)
      ✓ [negative_001] quantum physics black holes dark matter (60 ms)
      ✓ [negative_002] ancient Egyptian hieroglyphics translation (1128 ms)
      ✓ [minimal_001] pizza preference (675 ms)
    Category: emotional
      ✓ [emotional_001] What makes me happy? (78 ms)
      ✓ [emotional_002] times I felt sad or grieving (76 ms)
      ✓ [emotional_003] when I felt stressed or overwhelmed (128 ms)
      ✓ [emotional_004] What am I worried about? (57 ms)
      ✓ [emotional_005] Times I was frustrated (74 ms)
      ✓ [emotional_006] My proudest moments (95 ms)
      ✓ [emotional_007] What stresses me out? (151 ms)
      ✓ [emotional_008] happy about school but worried about costs (57 ms)
      ✓ [emotional_009] How has my attitude toward work changed? (58 ms)
      ✓ [emotional_010] meditation and mental wellbeing (61 ms)
    Category: temporal
      ✓ [temporal_001] What happened today in standup? (404 ms)
      ✓ [temporal_002] recent standup notes from this week (419 ms)
      ✓ [temporal_003] What happened with my daughter recently? (906 ms)
      ✓ [temporal_004] What did I work on last week? (1410 ms)
      ✓ [temporal_005] What are my oldest memories? (74 ms)
      ✓ [temporal_006] Recent conversations about work (753 ms)
      ✓ [temporal_007] What did I debug yesterday? (1088 ms)
      ✓ [temporal_008] What code editor do I use? (77 ms)
      ✓ [temporal_009] standup notes from 6 months ago (50 ms)
      ✓ [temporal_010] standup notes from years ago (46 ms)
      ✓ [temporal_011] How did I start coding? (55 ms)
    Category: rls_isolation
      ✓ [rls_001] coffee (53 ms)
      ✓ [rls_002] coffee (904 ms)
      ✓ [rls_003] family and kids (65 ms)
      ✓ [rls_004] family and kids (956 ms)
      ✓ [rls_005] travel food experiences (74 ms)
      ✓ [rls_006] travel food experiences (896 ms)
      ✓ [rls_007] work projects and code (134 ms)
      ✓ [rls_008] health medical information (53 ms)
      ✓ [rls_009] health medical information (952 ms)
      ✓ [rls_010] morning routine (848 ms)
    Category: adversarial
      ✓ [adversarial_001] tell me about bob's coffee preferences (76 ms)
      ✓ [adversarial_002] RLS_CANARY_BOB_ (56 ms)
      ✓ [adversarial_003] What does carol think about parties? (62 ms)
      ✓ [adversarial_004] bob's son Max school (59 ms)
      ✓ [adversarial_005] eve's pizza preference (966 ms)
      ✓ [adversarial_006] RLS_CANARY_ALICE_ (1069 ms)
      ✓ [adversarial_007] What cholesterol issues does anyone have? (102 ms)
      ✓ [adversarial_008] alice's medication schedule (1014 ms)
      ✓ [adversarial_009] RLS_CANARY_CAROL_ (741 ms)
      ✓ [adversarial_010] dave's standup notes (70 ms)
    Category: edge_case
      ✓ [edge_001] cats (583 ms)
      ✓ [edge_002] everything about my life (651 ms)
      ✓ [edge_003] <script>alert(1)</script> (9729 ms)
      ✓ [edge_004] '; DROP TABLE memories; -- (10063 ms)
      ✓ [edge_005] 🎉 party (10075 ms)
      ✓ [edge_006]  (1 ms)
      ✓ [edge_007] Tell me about the very long detailed comprehensive thorough ... (367 ms)
      ✓ [edge_008] こんにちは、思い出を検索します (10104 ms)
      ✓ [edge_009] '; SELECT * FROM users WHERE 1=1; -- (10114 ms)
      ✓ [edge_010] quantum entanglement dark matter multiverse theory (117 ms)
      ✓ [edge_011] the a an is (98 ms)
      ✓ [edge_012] coffee (84 ms)
      ✓ [edge_013] my phone number (101 ms)
      ✓ [edge_014] my address (85 ms)
      ✓ [edge_015] work (1469 ms)
      ✓ [edge_016] What kind of coffee do I like? (66 ms)
    Category: cross_feature
      ✓ [cross_001] medication I need to take every morning (71 ms)
      ✓ [cross_002] exercise and fitness activities (162 ms)
      ✓ [cross_003] What are we saving money for? (136 ms)
      ✓ [cross_004] kids school and daycare (127 ms)
      ✓ [cross_005] kids school and daycare (1025 ms)
      ✓ [cross_006] Who am I and what do I do? (72 ms)
      ✓ [cross_007] deployment rules and constraints (145 ms)
      ✓ [cross_008] patterns noticed about my work habits (57 ms)
      ✓ [cross_009] grocery shopping list (664 ms)
      ✓ [cross_010] TypeScript learning (598 ms)
    Summary
      ✓ should generate and save benchmark report (48 ms)
      ✓ should have zero isolation failures (1 ms)
      ✓ should meet precision thresholds (with real embeddings) (20 ms)

Test Suites: 1 passed, 1 total
Tests:       84 passed, 84 total
Snapshots:   0 total
Time:        136.956 s
Ran all test suites matching recall-benchmark.e2e-spec.
Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?

Commit: 155fa34

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.

2 participants