Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/calendar-to-sheets/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1509,10 +1509,10 @@ describe('Checkpoint logic (GAS only)', () => {
const configs = freshCode.getConfigs()

// Should fall back to legacy mode when array is empty
expect(configs.length).toBe(1)
expect(configs).toHaveLength(1)
expect(configs[0].sheetName).toBe('Sheet1')
expect(configs[0].spreadsheetId).toBe(null)
expect(configs[0].calendarId).toBe(null)
expect(configs[0].spreadsheetId).toBeNull()
expect(configs[0].calendarId).toBeNull()

delete global.SYNC_CONFIGS
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('Performance and Scalability Benchmarks', () => {
const processed = processThreadBatch(threads, config, services)
const duration = Date.now() - startTime

expect(processed.length).toBe(BATCH_SIZE)
expect(processed).toHaveLength(BATCH_SIZE)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The benchmark only verifies the number of returned entries, so an implementation that duplicates one result, associates results with the wrong threads, or returns 100 unclassified entries would still pass. Assert that each result corresponds to the input thread and has the expected classified status and label so the throughput test also validates the batch-processing contract. [incomplete implementation]

Severity Level: Major ⚠️
- ⚠️ Batch benchmark can pass incorrect per-thread results.
- ⚠️ Thread-to-result association regressions may go undetected.
- ⚠️ Classification status and label regressions lack coverage.

Use CodeAnt Skill

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** src/gmail-ai-classifier/tests/performance-scalability.test.js
**Line:** 124:124
**Comment:**
	*Incomplete Implementation: The benchmark only verifies the number of returned entries, so an implementation that duplicates one result, associates results with the wrong threads, or returns 100 `unclassified` entries would still pass. Assert that each result corresponds to the input thread and has the expected classified status and label so the throughput test also validates the batch-processing contract.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

expect(duration).toBeLessThan(100) // 100 items benchmarked under 100ms
})
})
Loading