Skip to content

fixes bedrock test#1631

Merged
akshaydeo merged 1 commit intomainfrom
02-13-fixes_bedrock_test
Feb 12, 2026
Merged

fixes bedrock test#1631
akshaydeo merged 1 commit intomainfrom
02-13-fixes_bedrock_test

Conversation

@akshaydeo
Copy link
Contributor

@akshaydeo akshaydeo commented Feb 12, 2026

Summary

This PR updates MIME type mappings for DOCX and XLSX files to use their correct OpenXML format identifiers and adds a new method to the semantic cache plugin to wait for pending operations, which is useful for testing.

Changes

  • Updated MIME type for DOCX files from "application/msword" to "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  • Updated MIME type for XLSX files from "application/vnd.ms-excel" to "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  • Added a new WaitForPendingOperations() method to the semantic cache plugin to properly wait for background operations to complete in tests
  • Increased the wait time in WaitForCache() from 1 second to 2 seconds to ensure more reliable test behavior

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

Run the Bedrock provider tests and semantic cache plugin tests to verify the changes:

# Test Bedrock provider
go test ./core/providers/bedrock/...

# Test semantic cache plugin
go test ./plugins/semanticcache/...

Breaking changes

  • Yes
  • No

Related issues

Fixes incorrect MIME type mappings for modern Office document formats and improves test reliability for the semantic cache plugin.

Security considerations

No security implications.

Checklist

  • I added/updated tests where appropriate
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Corrected MIME type mappings for DOCX and XLSX file formats.
  • Tests

    • Updated async cache operation timeout for improved test reliability.

Walkthrough

Three files across two modules were modified: MIME type mappings in Bedrock provider tests were corrected from legacy to modern formats, two public lifecycle management methods (WaitForPendingOperations and Cleanup) were added to the semantic cache plugin for resource management, and test timing for cache operations was increased from 1 to 2 seconds.

Changes

Cohort / File(s) Summary
Bedrock Test Corrections
core/providers/bedrock/bedrock_test.go
Fixed MIME type mappings: DOCX and XLSX types corrected to modern OpenXML formats (from legacy application/msword and application/vnd.ms-excel).
Semantic Cache Lifecycle Methods
plugins/semanticcache/main.go
Added WaitForPendingOperations method to block until pending cache operations complete, and Cleanup method to handle resource teardown including stream accumulator cleanup, embedding client shutdown, conditional cache purge, and namespace deletion.
Semantic Cache Test Timing
plugins/semanticcache/test_utils.go
Increased WaitForCache sleep duration from 1 second to 2 seconds for async operation polling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Old MIME types hop away,
Cleanup methods save the day—
Waiting, sweeping, tearing down,
Our cache cache gets scrubbed around! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 02-13-fixes_bedrock_test

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

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@akshaydeo akshaydeo marked this pull request as ready for review February 12, 2026 18:41
@github-actions
Copy link
Contributor

🧪 Test Suite Available

This PR can be tested by a repository admin.

Run tests for PR #1631

@akshaydeo akshaydeo merged commit 8ce25f4 into main Feb 12, 2026
7 of 8 checks passed
@akshaydeo akshaydeo deleted the 02-13-fixes_bedrock_test branch February 12, 2026 18:41
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