diff --git a/core/fixtures/retention_release_oracle.json b/core/fixtures/retention_release_oracle.json index a48d9fc6a..34f91b9e8 100644 --- a/core/fixtures/retention_release_oracle.json +++ b/core/fixtures/retention_release_oracle.json @@ -28,7 +28,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "analyzed", "reason_code": "ok", @@ -55,7 +55,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "analyzed", "reason_code": "ok", @@ -86,7 +86,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": "absent", + "sidecar": "header-only", "analysis_row": { "start": 0.0, "end": 1.0, @@ -110,7 +110,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": "absent", + "sidecar": "header-only", "analysis_row": null }, "reference_gate": "incomplete", @@ -130,7 +130,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "state": "empty" }, "analysis_row": null @@ -152,7 +152,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "bogus.v9", "state": "empty", "reason_code": "ok", @@ -178,7 +178,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "empty", "reason_code": "ok", @@ -204,7 +204,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "empty", "reason_code": "ok", @@ -231,7 +231,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "state": "empty", "reason_code": "ok", "handler": "transcribe", @@ -256,7 +256,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "empty", "reason_code": "ok", @@ -281,7 +281,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "empty", "reason_code": "ok", @@ -306,7 +306,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "state": "analyzed" }, "analysis_row": null @@ -327,7 +327,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "state": "banana" }, "analysis_row": { @@ -352,7 +352,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": {}, + "sidecar": {}, "analysis_row": { "start": 0.0, "end": 1.0, @@ -376,7 +376,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": "absent", + "sidecar": "header-only", "analysis_row": { "start": 0.0 } @@ -398,7 +398,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": "absent", + "sidecar": "header-only", "analysis_row": { "text": "hello" } @@ -419,7 +419,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "failed", "reason_code": "ok", @@ -445,7 +445,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "failed", "reason_code": "ok", @@ -476,7 +476,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "analyzed", "reason_code": "ok", @@ -507,7 +507,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "analyzed", "reason_code": "ok", @@ -538,7 +538,7 @@ "shape": { "media": "chunk_audio.flac", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "empty", "reason_code": "no_decodable_audio", @@ -565,7 +565,7 @@ "shape": { "media": "photo.png", "size": 104, - "record": { + "sidecar": { "schema": "solstone.processing.v1", "state": "empty", "reason_code": "ok", @@ -592,7 +592,7 @@ "shape": { "media": "photo.png", "size": 104, - "record": "absent", + "sidecar": "absent", "analysis_row": null }, "reference_gate": "eligible", diff --git a/scripts/retention_release_oracle.py b/scripts/retention_release_oracle.py index b43420f22..67cca83c4 100644 --- a/scripts/retention_release_oracle.py +++ b/scripts/retention_release_oracle.py @@ -402,7 +402,19 @@ def main() -> int: "shape": { "media": shape.media, "size": SIZE, - "record": "absent" if shape.omit_record_key else shape.record, + # Three distinguishable states, because two of them are + # different on disk and a consumer rebuilding this fixture + # must be able to tell them apart: + # sidecar "absent" -> no .jsonl file at all + # sidecar "header-only" -> the file exists, no record key + # sidecar {...} -> the file exists with that record + "sidecar": ( + "absent" + if shape.omit_sidecar + else "header-only" + if shape.omit_record_key + else shape.record + ), "analysis_row": shape.row, }, "reference_gate": gate,