mlcommons / mlcommons/endpoints

test: KVStore, ServiceLauncher, and MetricsAggregator services lack integration tests

Open
#222 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: core-engine priority: P1 type: chore
Dominant language
Python
Stars
21
Forks
28
Avg merge
3d 17h
Merged PRs (30d)
13

Description

Problem

Three new infrastructure services were added in late March 2026 with no integration test coverage:

  • KVStore + ServiceLauncher + ready-check mechanism — added in commit fd7b4ed ("Add KVStore, ready-check mechanism, and ServiceLauncher")
  • MetricsAggregator service — added in commit 08476d7 ("add metrics_aggregator service for real-time metric computation")

These are located under src/inference_endpoint/async_utils/services/. Issue #213 already shows a production failure (psycopg.errors.DuplicatePreparedStatement) originating from this layer, demonstrating that the lack of test coverage is causing real bugs.

Expected Behavior

Integration tests should cover:

  • KVStore read/write lifecycle
  • ServiceLauncher startup, ready-check, and teardown
  • MetricsAggregator receiving events and computing metrics correctly
  • PostgreSQL/psycopg interaction (the source of #213)

Related

  • #213 — PostgreSQL DuplicatePreparedStatement bug in recorder (same service layer)

Files

  • src/inference_endpoint/async_utils/services/
  • tests/integration/ — new test files needed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the services under src/inference_endpoint/async_utils/services/ and the related failure in issue #213, then inspect existing tests under tests/integration/. Add integration coverage for the KVStore lifecycle, ServiceLauncher startup and teardown, MetricsAggregator event processing, and PostgreSQL interaction, and run the integration tests to verify the scenarios pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
backend, databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.