Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions python/spec-kit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ and this package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`https://raw.githubusercontent.com/DevelopmentFinanceObservatory/spec-kit/main/`,
with each file's path unchanged. The previous prefix named a private
repository and did not resolve.
- On `presentation.write`, codes `binding_invalid`, `constraint_violation`
and `resource_exhausted` map at 400, `frame_unavailable` at 404 and
`release_mismatch` at 503, the statuses the Presentation write routes
serve. `presentation.render` keeps 422 for the first two and 409 for the
rest. `frame_unavailable` covers a frame that is not held in a state
Presentation can load, and its definition names each case. A frame store
that fails to answer is `service_unavailable`.
- Code `edit_conflict` maps to `presentation.render` at 409, for a render
of a component that has no current revision, and its definition names
that case.
- Codes `identity_quarantined` (500), `service_unavailable` (503) and
`internal_error` (500) map to `datasets.description` at the statuses they
have on `datasets.snapshot`.
Expand Down
19 changes: 12 additions & 7 deletions python/spec-kit/src/dfo_spec_kit/registry/codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 422
"http_status": 400
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -557,7 +557,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 422
"http_status": 400
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -905,7 +905,7 @@
{
"code": "edit_conflict",
"classification": "refusal",
"definition": "A revise_component request targets a revision that is no longer the component's current one.",
"definition": "The component's current revision is not the one the request reads or targets: a revise_component request names a revision that is no longer current, or the component has no current revision.",
"owning_contract": "presentation",
"owner": "platform",
"introduced_in": "v1",
Expand All @@ -914,6 +914,11 @@
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
},
{
"endpoint": "presentation.render",
"channel": "problem_details",
"http_status": 409
}
],
"lifecycle": "active"
Expand Down Expand Up @@ -1447,15 +1452,15 @@
{
"code": "frame_unavailable",
"classification": "refusal",
"definition": "The frame the intent's frame_ref names cannot be read at request time.",
"definition": "The frame a request names is not held in a state Presentation can load: it was never stored or published, it has expired or been revoked, its spec is quarantined, or its stored artifact is missing, fails its digest check, does not decode, or holds more rows than Presentation loads.",
"owning_contract": "presentation",
"owner": "platform",
"introduced_in": "v1",
"mappings": [
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
"http_status": 404
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -3107,7 +3112,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
"http_status": 503
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -3318,7 +3323,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
"http_status": 400
},
{
"endpoint": "presentation.render",
Expand Down
19 changes: 12 additions & 7 deletions registries/codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 422
"http_status": 400
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -557,7 +557,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 422
"http_status": 400
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -905,7 +905,7 @@
{
"code": "edit_conflict",
"classification": "refusal",
"definition": "A revise_component request targets a revision that is no longer the component's current one.",
"definition": "The component's current revision is not the one the request reads or targets: a revise_component request names a revision that is no longer current, or the component has no current revision.",
"owning_contract": "presentation",
"owner": "platform",
"introduced_in": "v1",
Expand All @@ -914,6 +914,11 @@
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
},
{
"endpoint": "presentation.render",
"channel": "problem_details",
"http_status": 409
}
],
"lifecycle": "active"
Expand Down Expand Up @@ -1447,15 +1452,15 @@
{
"code": "frame_unavailable",
"classification": "refusal",
"definition": "The frame the intent's frame_ref names cannot be read at request time.",
"definition": "The frame a request names is not held in a state Presentation can load: it was never stored or published, it has expired or been revoked, its spec is quarantined, or its stored artifact is missing, fails its digest check, does not decode, or holds more rows than Presentation loads.",
"owning_contract": "presentation",
"owner": "platform",
"introduced_in": "v1",
"mappings": [
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
"http_status": 404
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -3107,7 +3112,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
"http_status": 503
},
{
"endpoint": "presentation.render",
Expand Down Expand Up @@ -3318,7 +3323,7 @@
{
"endpoint": "presentation.write",
"channel": "problem_details",
"http_status": 409
"http_status": 400
},
{
"endpoint": "presentation.render",
Expand Down
Loading