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

@ -34,7 +34,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -49,7 +49,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -60,7 +60,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -75,7 +75,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -86,7 +86,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -101,7 +101,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -112,7 +112,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -127,7 +127,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -138,7 +138,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -153,7 +153,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -164,7 +164,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -179,7 +179,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -190,7 +190,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -205,7 +205,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -216,7 +216,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -231,7 +231,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -242,7 +242,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -257,7 +257,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -268,7 +268,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -283,7 +283,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -294,7 +294,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -309,7 +309,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -320,7 +320,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -335,7 +335,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -346,7 +346,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -361,7 +361,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -372,7 +372,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -387,7 +387,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -398,7 +398,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -413,7 +413,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -424,7 +424,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -439,7 +439,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -450,7 +450,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -465,7 +465,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -476,7 +476,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -491,7 +491,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -502,7 +502,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -517,7 +517,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -528,7 +528,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -543,7 +543,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -554,7 +554,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -569,7 +569,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -580,7 +580,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-827",
"id": "rec-0002a233aedd",
"choices": [
{
"delta": {
@ -595,7 +595,7 @@
"logprobs": null
}
],
"created": 1759368459,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,