Skip to content

MAINT: Update Registry APIs - #2550

Merged
Richard Lundeen (richlundeen) merged 13 commits into
microsoft:mainfrom
richlundeen:rlundeen2-registry-api-foundation
Sep 16, 2026
Merged

Richard Lundeen (richlundeen) merged 13 commits into
microsoft:mainfrom
richlundeen:rlundeen2-registry-api-foundation

Conversation

@richlundeen

@richlundeen Richard Lundeen (richlundeen) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make component registries own named construction, instance storage, lookup, duplicate and reserved-name validation, and removal
  • add registry-backed converter lifecycle and /api/converters/types APIs, plus the target registry consistency needed by later stack layers
  • support pathlib.Path constructor metadata and uploaded data-URI persistence without exposing server paths
  • keep /api/converters/catalog and /api/targets/catalog as temporary compatibility projections for the unchanged main UI; the higher chat-migration layer will remove them

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c9eafadc-3a00-471c-a08b-28df698d8109
Type converter file inputs as Path instead of special-casing strings in the
backend: AddImageVideoConverter.video_path is now a Path, so the registry
describes it as an input file and REST treats it as an upload like every other
Path parameter.

Drop the per-parameter MIME/signature allowlist. Uploads are stored verbatim
because any file type is a legitimate payload; the generated file name means a
declared MIME type only picks an extension. Content restrictions now live only
in the media route, which serves active document types as neutralized downloads
without renaming stored files.

Mark the temporary catalog projections consistently so reviewers can see the
whole concept is deleted once the UI moves to /types.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
@richlundeen Richard Lundeen (richlundeen) changed the title Add registry API foundation MAINT: Update Registry APIs Sep 3, 2026
Preserve registry-backed target type metadata while adopting main's strict
auth-mode validation and concurrency cleanup. Reset the technique registry in
the pre-registration test so it tests custom-first registration under strict
duplicate-name rejection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Treat the media extension allowlist as an inline-rendering allowlist rather
than an access allowlist. Any stored file type, including executables and
active documents, can be downloaded as opaque bytes while only known-safe
media types receive renderable content types.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Keep constructor inputs in a backend-owned temporary directory, independent of result storage. Clean partial writes on failure and remove owned inputs and dependent registry entries at shutdown.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Add a typed registry base that builds and stores named instances. Use it for converter, target, and scorer registries while keeping the instance container storage-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Comment thread pyrit/backend/services/converter_service.py Outdated
Comment thread pyrit/registry/instance_registry.py
Comment thread pyrit/backend/services/target_service.py Outdated
Comment thread pyrit/backend/services/converter_service.py Outdated
Comment thread pyrit/converter/add_image_to_video_converter.py Outdated
Comment thread pyrit/backend/routes/converters.py
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577

# Conflicts:
#	pyrit/converter/add_image_to_video_converter.py
#	tests/unit/backend/test_converter_service.py
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c9eafadc-3a00-471b-b61b-68ba4d656577
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Sep 16, 2026
Merged via the queue into microsoft:main with commit 9738cf3 Sep 16, 2026
49 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.

2 participants