Skip to content

feat(registry): register the share import route's refusal codes - #36

Merged
jm-rivera merged 1 commit into
devfrom
feat/share-import-codes
Oct 29, 2026
Merged

jm-rivera merged 1 commit into
devfrom
feat/share-import-codes

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

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, as publish_not_permitted and refresh_not_permitted answer their doors. Both sit on presentation.shares in registries/codes.json and its mirror in python/spec-kit. The client contract checks every active code has an actions.json row, so share_id_taken is fix_request and share_import_not_permitted is request_scope, like its sibling principal codes. No SDK calls the route.

Testing: python/spec-kit (259 passed) and python/client-contract (244 passed) with ruff, format and ty clean; tools/tests (607 passed); all eight tools/validate_*.py checks pass.

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.
@jm-rivera
jm-rivera merged commit 5132aa0 into dev Oct 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant