Skip to content

Commit b9c6f0b

Browse files
test: Fix D1ContextRepository save() test for Layer 3 propagation fields
Update test to expect 18 parameters instead of 14: - 7 original fields - 4 causality fields (Layer 1) - 3 memory fields (Layer 2) - 4 propagation fields (Layer 3) Fixes CI test failure where bind() was called with 18 parameters but test only expected 14. All 109 tests now passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2ec57fd commit b9c6f0b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/infrastructure/adapters/D1ContextRepository.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ describe('D1ContextRepository', () => {
7777
expect(mockDb.prepare).toHaveBeenCalledWith(
7878
expect.stringContaining('memory_tier, last_accessed, access_count')
7979
);
80+
expect(mockDb.prepare).toHaveBeenCalledWith(
81+
expect.stringContaining('prediction_score, last_predicted, predicted_next_access, propagation_reason')
82+
);
8083

81-
// Expect 14 parameters (7 original + 4 causality + 3 memory)
84+
// Expect 18 parameters (7 original + 4 causality + 3 memory + 4 propagation)
8285
expect(bindSpy).toHaveBeenCalledWith(
8386
snapshot.id,
8487
snapshot.project,
@@ -93,7 +96,11 @@ describe('D1ContextRepository', () => {
9396
null, // caused_by
9497
snapshot.memoryTier, // memory_tier (Layer 2)
9598
snapshot.lastAccessed, // last_accessed (Layer 2)
96-
snapshot.accessCount // access_count (Layer 2)
99+
snapshot.accessCount, // access_count (Layer 2)
100+
null, // prediction_score (Layer 3)
101+
null, // last_predicted (Layer 3)
102+
null, // predicted_next_access (Layer 3)
103+
null // propagation_reason (Layer 3)
97104
);
98105

99106
expect(runSpy).toHaveBeenCalled();

0 commit comments

Comments
 (0)