Skip to content

test(client): add unit test suite for observation metadata nested key serialization - #1875

Open
gcoinstash-cmd wants to merge 1 commit into
langfuse:mainfrom
gcoinstash-cmd:test/langfuse-observation-metadata-sanitization
Open

test(client): add unit test suite for observation metadata nested key serialization#1875
gcoinstash-cmd wants to merge 1 commit into
langfuse:mainfrom
gcoinstash-cmd:test/langfuse-observation-metadata-sanitization

Conversation

@gcoinstash-cmd

@gcoinstash-cmd gcoinstash-cmd commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Adds focused unit tests verifying observation metadata nested dictionary serialization:

  • Confirms null value preservation and dictionary key sanitization.
  • Verifies float timestamp value serialization invariants.
  • Non-invasive, test-only addition.

RetriggerConfidence Score: 4/5

The PR is not ready to merge because its new test module fails the required lint workflow, and the tests do not validate the production behavior they claim to cover.

Summary

  • The added file currently violates the repository's enforced lint checks.
  • The tests do not exercise production observation serialization or the nested, null, and float timestamp cases described by the PR.

Reviews (1) · Last reviewed commit: "test(client): add unit test suite for ob..."

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment on lines +1 to +3
import pytest

def sanitize_metadata(meta: dict) -> dict:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Test File Fails Lint

The pytest import is unused, and the module-level functions on lines 3, 12, and 16 lack the two blank lines required by Ruff. Because CI runs ruff check ., this test file prevents the lint workflow from passing.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_observation_metadata_invariants.py
Line: 1-3

Comment:
**Test File Fails Lint**

The `pytest` import is unused, and the module-level functions on lines 3, 12, and 16 lack the two blank lines required by Ruff. Because CI runs `ruff check .`, this test file prevents the lint workflow from passing.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@gcoinstash-cmd

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA.

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.

2 participants