chore(tests): normalize recording IDs and timestamps to reduce git diff noise (#3676)

IDs are now deterministic hashes based on request content, and
timestamps are normalized to constants, eliminating spurious changes
when re-recording tests.

## Changes
- Updated `inference_recorder.py` to normalize IDs and timestamps during
recording
- Added `scripts/normalize_recordings.py` utility to re-normalize
existing recordings
- Created documentation in `tests/integration/recordings/README.md`
- Normalized 350 existing recording files
This commit is contained in:
Ashwin Bharambe 2025-10-03 17:26:11 -07:00 committed by GitHub
parent 6bcd3e25f2
commit 3f36bfaeaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
348 changed files with 10154 additions and 8329 deletions

View file

@ -40,7 +40,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -55,7 +55,7 @@
"logprobs": null
}
],
"created": 1753984048,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -66,7 +66,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -81,7 +81,7 @@
"logprobs": null
}
],
"created": 1753984048,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -92,7 +92,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -107,7 +107,7 @@
"logprobs": null
}
],
"created": 1753984049,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -118,7 +118,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -133,7 +133,7 @@
"logprobs": null
}
],
"created": 1753984049,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -144,7 +144,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -159,7 +159,7 @@
"logprobs": null
}
],
"created": 1753984049,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -170,7 +170,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -185,7 +185,7 @@
"logprobs": null
}
],
"created": 1753984049,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -196,7 +196,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -211,7 +211,7 @@
"logprobs": null
}
],
"created": 1753984049,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -222,7 +222,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-943",
"id": "rec-177ba8517262",
"choices": [
{
"delta": {
@ -237,7 +237,7 @@
"logprobs": null
}
],
"created": 1753984050,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,