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

@ -73,7 +73,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -88,7 +88,7 @@
"logprobs": null
}
],
"created": 1759441666,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -99,7 +99,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -114,7 +114,7 @@
"logprobs": null
}
],
"created": 1759441666,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -125,7 +125,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -140,7 +140,7 @@
"logprobs": null
}
],
"created": 1759441666,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -151,7 +151,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -166,7 +166,7 @@
"logprobs": null
}
],
"created": 1759441666,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -177,7 +177,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -192,7 +192,7 @@
"logprobs": null
}
],
"created": 1759441666,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -203,7 +203,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -218,7 +218,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -229,7 +229,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -244,7 +244,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -255,7 +255,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -270,7 +270,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -281,7 +281,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -296,7 +296,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -307,7 +307,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -322,7 +322,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -333,7 +333,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -348,7 +348,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -359,7 +359,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -374,7 +374,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -385,7 +385,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-214",
"id": "rec-cb0e0321c53c",
"choices": [
{
"delta": {
@ -400,7 +400,7 @@
"logprobs": null
}
],
"created": 1759441667,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,