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

@ -21,7 +21,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -36,7 +36,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -53,7 +53,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -68,7 +68,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -85,7 +85,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -100,7 +100,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -117,7 +117,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -132,7 +132,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -149,7 +149,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -164,7 +164,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -181,7 +181,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -196,7 +196,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -213,7 +213,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -228,7 +228,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -245,7 +245,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -260,7 +260,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -277,7 +277,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -292,7 +292,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -309,7 +309,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -324,7 +324,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -341,7 +341,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -356,7 +356,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -373,7 +373,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -388,7 +388,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -405,7 +405,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -420,7 +420,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -437,7 +437,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -452,7 +452,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -469,7 +469,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -484,7 +484,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -501,7 +501,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -516,7 +516,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -533,7 +533,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -548,7 +548,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -565,7 +565,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -580,7 +580,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -597,7 +597,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -612,7 +612,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -629,7 +629,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -644,7 +644,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -661,7 +661,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -676,7 +676,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,
@ -693,7 +693,7 @@
{
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
"__data__": {
"id": "chatcmpl_7268e4ee-3b8e-461e-80dc-608e76f3801d",
"id": "rec-121a72d1c4cf",
"choices": [
{
"delta": {
@ -708,7 +708,7 @@
"logprobs": null
}
],
"created": 1758326500,
"created": 0,
"model": "meta-llama-3.3-70b-instruct-121024",
"object": "chat.completion.chunk",
"service_tier": null,