Repository navigation
feat(registry): register the share import route's refusal codes - #36
Merged
Merged
Conversation
dfo-apis' PUT /api/presentation/shares/{id}/import, which the website's
share migration job calls once per share, refuses with share_id_taken
(409) when the id holds another share or the same share under another
write-token digest, and share_import_not_permitted (403) when the caller
lacks the import principal. Both sit on presentation.shares, with
actions.json rows fix_request and request_scope.
This was referenced Oct 29, 2026
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.
dfo-apis gains
PUT /api/presentation/shares/{share_id}/import, which the website's share migration job calls once per share to move the website's existing shares into the Presentation store. It refuses with two codes the registry did not list, so dfo-apis' registry binding test fails until they are registered.share_id_taken(409) answers an import whose id holds another share, or the same share stored under another write-token digest.share_import_not_permitted(403) answers a caller without the import principal, aspublish_not_permittedandrefresh_not_permittedanswer their doors. Both sit onpresentation.sharesinregistries/codes.jsonand its mirror inpython/spec-kit. The client contract checks every active code has anactions.jsonrow, soshare_id_takenisfix_requestandshare_import_not_permittedisrequest_scope, like its sibling principal codes. No SDK calls the route.Testing:
python/spec-kit(259 passed) andpython/client-contract(244 passed) with ruff, format and ty clean;tools/tests(607 passed); all eighttools/validate_*.pychecks pass.