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

@ -97,7 +97,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -112,7 +112,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -123,7 +123,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -138,7 +138,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -149,7 +149,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -164,7 +164,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -175,7 +175,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -190,7 +190,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -201,7 +201,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -216,7 +216,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -227,7 +227,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -242,7 +242,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -253,7 +253,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -268,7 +268,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -279,7 +279,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -294,7 +294,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -305,7 +305,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -320,7 +320,7 @@
"logprobs": null
}
],
"created": 1759437845,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -331,7 +331,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -346,7 +346,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -357,7 +357,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -372,7 +372,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -383,7 +383,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -398,7 +398,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -409,7 +409,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -424,7 +424,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -435,7 +435,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -450,7 +450,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -461,7 +461,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -476,7 +476,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -487,7 +487,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -502,7 +502,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,
@ -513,7 +513,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl-714",
"id": "rec-08a21ab74e0a",
"choices": [
{
"delta": {
@ -528,7 +528,7 @@
"logprobs": null
}
],
"created": 1759437846,
"created": 0,
"model": "llama3.2:3b-instruct-fp16",
"object": "chat.completion.chunk",
"service_tier": null,