From 84db45c8897f749a2b6e3dcdfe009a0b5e22ff2b Mon Sep 17 00:00:00 2001 From: Jorge Rivera Date: Tue, 20 Oct 2026 17:56:51 +0200 Subject: [PATCH 1/2] feat(registry): map the datasets file selector and versions refusals `GET /api/datasets/{id}/{content_version}/file` serves under `datasets.files` and refuses `request_invalid` (400), `excel_limit`, `excel_illegal_character`, `parquet_size_bound`, `rollup_not_summable` and `capability_unavailable` (422), and `internal_error` (500). The open `GET /api/datasets/{id}/versions` serves under `datasets.snapshot` and refuses `request_invalid` (400). The registry README names both routes. --- .../src/dfo_spec_kit/registry/codes.json | 40 +++++++++++++++++++ registries/codes.json | 40 +++++++++++++++++++ schemas/registry/README.md | 2 +- 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/python/spec-kit/src/dfo_spec_kit/registry/codes.json b/python/spec-kit/src/dfo_spec_kit/registry/codes.json index 42fce0e..ae24ee6 100644 --- a/python/spec-kit/src/dfo_spec_kit/registry/codes.json +++ b/python/spec-kit/src/dfo_spec_kit/registry/codes.json @@ -283,6 +283,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 501 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -1194,6 +1199,11 @@ "endpoint": "datasets.definition", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -1215,6 +1225,11 @@ "endpoint": "datasets.definition", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -1644,6 +1659,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 500 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 500 } ], "lifecycle": "active" @@ -2594,6 +2614,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -3269,6 +3294,16 @@ "endpoint": "datasets.description", "channel": "problem_details", "http_status": 400 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 400 + }, + { + "endpoint": "datasets.snapshot", + "channel": "problem_details", + "http_status": 400 } ], "lifecycle": "active" @@ -3584,6 +3619,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" diff --git a/registries/codes.json b/registries/codes.json index 42fce0e..ae24ee6 100644 --- a/registries/codes.json +++ b/registries/codes.json @@ -283,6 +283,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 501 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -1194,6 +1199,11 @@ "endpoint": "datasets.definition", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -1215,6 +1225,11 @@ "endpoint": "datasets.definition", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -1644,6 +1659,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 500 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 500 } ], "lifecycle": "active" @@ -2594,6 +2614,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" @@ -3269,6 +3294,16 @@ "endpoint": "datasets.description", "channel": "problem_details", "http_status": 400 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 400 + }, + { + "endpoint": "datasets.snapshot", + "channel": "problem_details", + "http_status": 400 } ], "lifecycle": "active" @@ -3584,6 +3619,11 @@ "endpoint": "datasets.refresh", "channel": "problem_details", "http_status": 422 + }, + { + "endpoint": "datasets.files", + "channel": "problem_details", + "http_status": 422 } ], "lifecycle": "active" diff --git a/schemas/registry/README.md b/schemas/registry/README.md index 6a4fb60..64825ab 100644 --- a/schemas/registry/README.md +++ b/schemas/registry/README.md @@ -59,7 +59,7 @@ Retiring a door is a schema change, reviewed as one: dropping a value from `code - **`endpoint`** lists the Search endpoints `search.resolve` (`POST /api/search/resolve`) and `search.options` (`POST /api/search/options`). - The Datasets endpoints are `datasets.register` (`POST /api/datasets/register`), `datasets.mint` (`POST /api/datasets`), `datasets.definition` (`GET /api/datasets/{id}`), `datasets.options` (`GET /api/datasets/{id}/options`, the write-free preview door), `datasets.members` (`POST /api/datasets/{id}/members`, the write-free member read), `datasets.snapshot` (`GET /api/datasets/{id}/{content_version}`), `datasets.files` (`GET /api/datasets/{id}/{content_version}/files/{digest}`, which answers a stored artifact with a 302 redirect to its download link), `datasets.description` (`GET /api/datasets/{id}/{content_version}/description`, a stored version's description, for a `spec_` id with a `cv_` version or an `ops_` id with an `ocv_` version, and `GET .../description/values`, which pages one dimension's values), `datasets.observations` (`GET /api/datasets/{id}/{content_version}/observations`, a stored version's observations), `datasets.pin` (`POST /api/datasets/{id}/{content_version}/pin`), `datasets.publish` (`POST /api/datasets/frames/publish`, the door an analysis service uses to publish an already-computed frame under its own identity pair), `datasets.recipe` (`PUT` and `GET /api/datasets/frames/{spec_id}/{content_version}/recipe`, the recorded computation behind a published frame, and `GET /api/datasets/recipes/replays/{replay_key}`, the frame stored under a replay key), `datasets.refresh` (`POST /api/datasets/frames/refresh`, which rebuilds a dataset frame's rendering on current data), and `datasets.operations` (`GET /api/datasets/operations/{operation_id}`). + The Datasets endpoints are `datasets.register` (`POST /api/datasets/register`), `datasets.mint` (`POST /api/datasets`), `datasets.definition` (`GET /api/datasets/{id}`), `datasets.options` (`GET /api/datasets/{id}/options`, the write-free preview door), `datasets.members` (`POST /api/datasets/{id}/members`, the write-free member read), `datasets.snapshot` (`GET /api/datasets/{id}/{content_version}`, and `GET /api/datasets/{id}/versions`, which pages a dataset's servable versions), `datasets.files` (`GET /api/datasets/{id}/{content_version}/files/{digest}`, which answers a stored artifact with a 302 redirect to its download link, and `GET /api/datasets/{id}/{content_version}/file`, which selects a stored version's file by format, bundle and layout, renders it when it is missing, and answers the same redirect), `datasets.description` (`GET /api/datasets/{id}/{content_version}/description`, a stored version's description, for a `spec_` id with a `cv_` version or an `ops_` id with an `ocv_` version, and `GET .../description/values`, which pages one dimension's values), `datasets.observations` (`GET /api/datasets/{id}/{content_version}/observations`, a stored version's observations), `datasets.pin` (`POST /api/datasets/{id}/{content_version}/pin`), `datasets.publish` (`POST /api/datasets/frames/publish`, the door an analysis service uses to publish an already-computed frame under its own identity pair), `datasets.recipe` (`PUT` and `GET /api/datasets/frames/{spec_id}/{content_version}/recipe`, the recorded computation behind a published frame, and `GET /api/datasets/recipes/replays/{replay_key}`, the frame stored under a replay key), `datasets.refresh` (`POST /api/datasets/frames/refresh`, which rebuilds a dataset frame's rendering on current data), and `datasets.operations` (`GET /api/datasets/operations/{operation_id}`). The Presentation endpoints are `presentation.write` (`POST /api/presentation/components`, `PATCH /api/presentation/components/{component_id}`) and `presentation.render` (`POST /api/presentation/components/{component_id}/revisions/{revision}/render` and `GET .../render/data`, which draw a stored revision on a named target frame and mint no revision). Search's and Datasets' `schema`, `capabilities`, and `healthz` routes and Presentation's read routes carry no permanent codes. From 0f1a106d35aed1b11aea90cb2d11040326b58bd6 Mon Sep 17 00:00:00 2001 From: Jorge Rivera Date: Tue, 20 Oct 2026 18:08:38 +0200 Subject: [PATCH 2/2] fix(registry): map capability_unavailable on datasets.files to 501 The platform resolves one status per code, and every other endpoint answers capability_unavailable with 501. --- python/spec-kit/src/dfo_spec_kit/registry/codes.json | 2 +- registries/codes.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/spec-kit/src/dfo_spec_kit/registry/codes.json b/python/spec-kit/src/dfo_spec_kit/registry/codes.json index ae24ee6..12f73b8 100644 --- a/python/spec-kit/src/dfo_spec_kit/registry/codes.json +++ b/python/spec-kit/src/dfo_spec_kit/registry/codes.json @@ -287,7 +287,7 @@ { "endpoint": "datasets.files", "channel": "problem_details", - "http_status": 422 + "http_status": 501 } ], "lifecycle": "active" diff --git a/registries/codes.json b/registries/codes.json index ae24ee6..12f73b8 100644 --- a/registries/codes.json +++ b/registries/codes.json @@ -287,7 +287,7 @@ { "endpoint": "datasets.files", "channel": "problem_details", - "http_status": 422 + "http_status": 501 } ], "lifecycle": "active"