Skip to content

server: export ObserveWarmupRoutingEmbedding for enterprise - #5791

Closed
kohlivrinda wants to merge 1 commit into
08-03-weaviate_map_404_to_errnotfoundfrom
08-03-server_export_observewarmuproutingembedding_for_enterprise
Closed

server: export ObserveWarmupRoutingEmbedding for enterprise#5791
kohlivrinda wants to merge 1 commit into
08-03-weaviate_map_404_to_errnotfoundfrom
08-03-server_export_observewarmuproutingembedding_for_enterprise

Conversation

@kohlivrinda

@kohlivrinda kohlivrinda commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

observeWarmupRoutingEmbedding was unexported, making it unreachable from embedder packages that reimplement Bootstrap rather than delegating to it. Those embedders could not wire the warmup embedding usage observer, causing warmup embed token usage to be silently dropped with no recovery path.

Changes

  • Exported observeWarmupRoutingEmbeddingObserveWarmupRoutingEmbedding so embedders in external packages can reference it directly through the embedded server when setting up their own Bootstrap logic.
  • Updated both call sites (Bootstrap and ReloadPlugin) to reference the exported name.
  • Expanded the method comment to explain why it is exported and the consequence of missing this wiring.

Type of change

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

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Verify that an embedder package that embeds BifrostHTTPServer and calls SetWarmupEmbedUsageObserver with s.ObserveWarmupRoutingEmbedding compiles successfully, and that warmup embedding token usage is recorded in Prometheus routing overhead counters after a governance plugin reload or server bootstrap.

go test ./...

Breaking changes

  • Yes
  • No

Related issues

Security considerations

None. This is a visibility change on an internal telemetry observer; no auth, secrets, or PII are involved.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f63e0eb8-2131-4072-998c-1ee7bed6d846

📥 Commits

Reviewing files that changed from the base of the PR and between f5ea618 and 8e397a9.

📒 Files selected for processing (1)
  • transports/bifrost-http/server/server.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • transports/bifrost-http/server/server.go

📝 Walkthrough

Summary by CodeRabbit

  • Refactor

    • Improved consistency in warmup embedding monitoring across supported integrations.
    • Existing monitoring behavior, results, and operational workflows remain unchanged.
    • No user-facing functionality, configuration, or performance changes are expected from this maintenance update.
  • Documentation

    • Added guidance for custom bootstrap integrations to preserve warmup monitoring behavior.
    • Custom integrations replacing the default bootstrap process can explicitly connect the warmup monitoring callback.

Walkthrough

The warmup embedding observer is exported as ObserveWarmupRoutingEmbedding. Plugin reload and bootstrap wiring use the exported callback. Observer behavior remains unchanged.

Changes

Warmup embedding observer

Layer / File(s) Summary
Export observer and update callbacks
transports/bifrost-http/server/server.go
The observer method is exported and documented. Plugin reload and bootstrap wiring pass the exported callback. Its parameters and behavior remain unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Mergeability Score: ⚪ Minimal · up to 8e397

This localized visibility change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related PRs

  • maximhq/bifrost#5686: Adds the warmup embedding observer wiring that this PR exposes for bootstrap and plugin reload.

Suggested reviewers: akshaydeo, pratham-mishra04

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the server change: exporting ObserveWarmupRoutingEmbedding for external enterprise embedders.
Description check ✅ Passed The description follows the template and explains the purpose, changes, affected areas, testing, breaking changes, and security impact.
✨ 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 08-03-server_export_observewarmuproutingembedding_for_enterprise

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.

kohlivrinda commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

@kohlivrinda
kohlivrinda changed the base branch from 08-03-weaviate_map_404_to_errnotfound to graphite-base/5791 August 3, 2026 11:51
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 1868e93 to 73b407e Compare August 3, 2026 13:04
@kohlivrinda
kohlivrinda changed the base branch from graphite-base/5791 to 08-03-weaviate_map_404_to_errnotfound August 3, 2026 13:04
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 73b407e to 9979d93 Compare August 3, 2026 13:40
@kohlivrinda
kohlivrinda force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from b061380 to 2a885cb Compare August 3, 2026 13:40
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 9979d93 to 377cb6b Compare August 3, 2026 17:08
@kohlivrinda
kohlivrinda force-pushed the 08-03-weaviate_map_404_to_errnotfound branch 2 times, most recently from e0424c7 to a7391d2 Compare August 3, 2026 17:54
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from c412e5a to 4be3a06 Compare August 11, 2026 10:44
@kohlivrinda
kohlivrinda force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from 3567e87 to 443aacc Compare August 11, 2026 10:44
@Madhuvod
Madhuvod force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 4be3a06 to 6378bbc Compare August 11, 2026 12:48
@Madhuvod
Madhuvod force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from 443aacc to 719888b Compare August 11, 2026 12:48
@kohlivrinda
kohlivrinda force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from 719888b to edd6be0 Compare August 11, 2026 17:43
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 6378bbc to 784e4db Compare August 11, 2026 17:43
@Madhuvod
Madhuvod force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from edd6be0 to 42bf619 Compare August 11, 2026 19:10
@Madhuvod
Madhuvod force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 784e4db to 2bdbf54 Compare August 11, 2026 19:10
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 2bdbf54 to a092bbd Compare August 12, 2026 09:55
@kohlivrinda
kohlivrinda force-pushed the 08-03-weaviate_map_404_to_errnotfound branch 2 times, most recently from 093aecb to e7feea6 Compare August 12, 2026 15:04
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from a092bbd to a748b1c Compare August 12, 2026 15:04
@Madhuvod
Madhuvod force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from a748b1c to dc3578b Compare August 12, 2026 19:25
@Madhuvod
Madhuvod force-pushed the 08-03-weaviate_map_404_to_errnotfound branch 2 times, most recently from 3a56d9f to da79e00 Compare August 12, 2026 21:16
@Madhuvod
Madhuvod force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from dc3578b to 094caf4 Compare August 12, 2026 21:16
@Madhuvod
Madhuvod force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from da79e00 to e075344 Compare August 12, 2026 22:06
@Madhuvod
Madhuvod force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 094caf4 to b847350 Compare August 12, 2026 22:06
@Madhuvod
Madhuvod force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from e075344 to 932e6c1 Compare August 12, 2026 22:20
@Madhuvod
Madhuvod force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from b847350 to 0fd9205 Compare August 12, 2026 22:20
@kohlivrinda
kohlivrinda force-pushed the 08-03-weaviate_map_404_to_errnotfound branch from 932e6c1 to f5ea618 Compare August 13, 2026 13:43
@kohlivrinda
kohlivrinda force-pushed the 08-03-server_export_observewarmuproutingembedding_for_enterprise branch from 0fd9205 to 8e397a9 Compare August 13, 2026 13:43
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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