Skip to content

[PTDT-5210] Add Tool.Type.MARKER for marker ontologies#2067

Open
gramos-lb wants to merge 2 commits into
developfrom
gerry/ptdt-5210-sdk-marker-tool-type
Open

[PTDT-5210] Add Tool.Type.MARKER for marker ontologies#2067
gramos-lb wants to merge 2 commits into
developfrom
gerry/ptdt-5210-sdk-marker-tool-type

Conversation

@gramos-lb

@gramos-lb gramos-lb commented Jul 21, 2026

Copy link
Copy Markdown

PTDT-5210: Add Tool.Type.MARKER so marker ontologies stop raising

What was broken

The platform is shipping a new video marker ontology tool (normalized kind marker). Any SDK code that fetches an ontology containing one currently dies in Tool.from_dict:

ValueError: 'marker' is not a valid Tool.Type

— which breaks project.ontology(), ontology listing, and anything downstream, for the whole ontology.

What changed

  • Tool.Type.MARKER = "marker" in schema/ontology.py. Construction, from_dict/asdict round trips, and ontology creation all work through the base Tool class — no dispatch changes needed, and the unrelated tool-building enum is untouched.
  • The version bump + changelog entry are deliberately not in this PR — they'll land in a separate release-prep PR per repo practice. Marker ontologies will require that next release (older SDKs still raise until upgraded).

How to test

  • Unit: 267 passed (includes a new explicit marker from_dictasdict round trip; the existing all-enum-members parametrization covers construction). mypy (175 files) and Ruff clean.
  • Live: verified against a local environment — project.ontology().tools() on a marker project returns the marker tools typed as Tool.Type.MARKER instead of raising, and project.export() on that project works end-to-end.

Note

Low Risk
Single enum value plus tests; behavior is additive and unblocks ontology fetch/export for marker projects without changing other tool types.

Overview
Adds Tool.Type.MARKER ("marker") so ontologies that include the platform’s video marker tool deserialize via existing Tool.from_dict / asdict instead of raising ValueError: 'marker' is not a valid Tool.Type.

No separate tool class or dispatch changes—marker tools use the base Tool like other simple tool kinds. A unit test asserts marker from_dictasdict round-trip with schema IDs and metadata.

Reviewed by Cursor Bugbot for commit 9ddadfc. Bugbot is set up for automated code reviews on this repo. Configure here.

Ontologies containing the new video marker tool currently make
Tool.from_dict raise ValueError('marker' is not a valid Tool.Type),
breaking any SDK code that fetches such an ontology. Adds
Tool.Type.MARKER = 'marker' (matching the platform's normalized ontology
kind); construction, from_dict/asdict round-trips, and ontology creation
work through the base Tool class with no dispatch changes.

Bumps the SDK to 7.10.0; the changelog notes that marker ontologies
require 7.10.0 or later.
@gramos-lb gramos-lb changed the title [PTDT-5210] Add Tool.Type.MARKER for marker ontologies (7.10.0) [PTDT-5210] Add Tool.Type.MARKER for marker ontologies Jul 21, 2026
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