Repository navigation
Conversation
A frame store that fails to answer, a FrameUnavailable with reason io, refuses service_unavailable (503, retryable) on every Presentation route. Every other FrameUnavailable reason refuses frame_unavailable at 404. Stored bytes that do not decode as a frame refuse missing_rendering, since no retry can load them. The render routes read each refusal's status from the code registry on presentation.render, which retires the hand-kept _RENDER_STATUS table. The Presentation surface binds create and revise to presentation.write and the two render routes to presentation.render. The Skills surface binds skills.list, skills.fetch and skills.resource. The five spec-kit pins move to 4f927c0, which maps the Presentation write refusals at the statuses the write routes serve and edit_conflict on presentation.render. tests/presentation_api/test_refusal_registry.py and tests/skills_api/test_refusal_registry.py check that every endpoint is bound and that every exemplar goes out at its registered status.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One refusal changes on the wire. A frame store that fails to answer, a
FrameUnavailablewith reasonio, refusesservice_unavailable(503, retryable) on every Presentation route. It refusedframe_unavailableat 503 on the write and read routes and at 409 on the render routes. Every otherFrameUnavailablereason refusesframe_unavailableat 404, as before. Stored bytes that pass their digest check and do not decode as a frame refusemissing_rendering(404, not retryable) in_decode_frame(src/presentation_store/frame_store.py). They refusedio, which a client would retry forever. A reason outside_FRAME_UNAVAILABLE_OUTCOMEfails classification and answersinternal_error.DevelopmentFinanceObservatory/spec-kit#13 moves the code registry to the statuses the write routes serve (
binding_invalid,constraint_violationandresource_exhausted400,frame_unavailable404,release_mismatch503) and mapsedit_conflictonpresentation.render. The five spec-kit pins move to its commit 4f927c0. The registry holds one status per endpoint, which is why theiocause leavesframe_unavailable.The render routes read each refusal's status from the registry on
presentation.renderinsrc/presentation_api/doors/render.py, which retires the hand-kept_RENDER_STATUStable. Component data refusals on/render/datapass through the same restatement, at the statuses they already had._FRAME_UNAVAILABLE_OUTCOMEinsrc/presentation_api/refusals.pynames the code for each reason, andcompute_presentation_capability_versionhashes it, so the Presentation capability version moves.The Presentation surface declares
registry_endpoints: create and revise map topresentation.write, and the two render routes topresentation.render. The component read shares revise's path, so it runs withpresentation.writebound, and its classifiers set their own statuses. The frames, component data, release and meta routes stay unbound. The Skills surface bindsskills.list,skills.fetchandskills.resource, whose exemplars already agree with the registry.tests/presentation_api/test_refusal_registry.pyandtests/skills_api/test_refusal_registry.py, modelled on the Graph registry test, check that every endpoint is bound and that every exemplar goes out at its registered status. All four tests fail against dev with the new pin.The website and presentation-mcp read
codeandretryablefrom the problem body, and aniofailure stays retryable under its new code, so neither needs a change.Merge after DevelopmentFinanceObservatory/spec-kit#13. This PR and #72 both move the spec-kit pins, so whichever merges second moves them to the spec-kit release commit.
Testing:
just checkunder CI's environment withDFO_SPEC_KIT_DIRat the pin gives 38,945 passed, 131 skipped and 5 xfailed. One order-dependent test intests/graph_release/test_views.pyfails. The file passes on its own, and #65 fixes the cause. The newtests/presentation_store/test_frame_store.pycase for undecodable bytes failed before the fix.