-
Notifications
You must be signed in to change notification settings - Fork 7
Comparing changes
Open a pull request
base repository: datarhei/core-client-python
base: test-infrastructure-refactor
head repository: datarhei/core-client-python
compare: main
- 20 commits
- 176 files changed
- 2 contributors
Commits on Jul 3, 2026
-
Implement CLIENT-TODO: cluster endpoints, probe fix, client robustness
§1 endpoints (needed by core-mcp Phase-1 tools): - Add v3_cluster_get_healthy, v3_cluster_get_deployments, v3_cluster_process_get_metadata, v3_cluster_db_get_process_map, v3_cluster_fs_get_file_list (+ ClusterDeployments/ClusterDeploymentsProcess) - §1a Fix v3_cluster_process_get_probe using POST instead of GET §1b/§2.7 README: - Note on domain vs. domainpattern; document new cluster endpoints - Fix the "GET processes" example variable typo §2 robustness: - §2.1 Lock around the token refresh path (thread-safety) - §2.2 Async login/refresh path (alogin) so AsyncClient no longer blocks the event loop on token refresh during requests - §2.3 Reuse a pooled httpx client per instance instead of one per request; add close()/aclose() and (async) context-manager support - §2.4 Enable HTTP/2 consistently on sync and async paths - §2.6 Opt-in raise_on_error that turns an Error response into CoreAPIError - §2.5 setup.py: long_description, license, project_urls for PyPI All 96 API modules routed through a shared executor (core_client/base/api/_http.py). Tests: add unit coverage for the new cluster endpoints (request building, probe-GET regression guard) and the robustness features. Update CHANGELOG. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 880c8a0 - Browse repository at this point
Copy the full SHA 880c8a0View commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 87a6d78 - Browse repository at this point
Copy the full SHA 87a6d78View commit details
Commits on Jul 4, 2026
-
Add process probe-by-config endpoint and fix probe stream types
- Add v3_process_post_probe for POST /api/v3/process/probe (probe a process config directly; the cluster sibling v3_cluster_process_post_probe already existed). Requires Core v16.20.0+. - Add optional coreid query parameter to v3_cluster_process_post_probe - Fix ProcessProbeStream fps/bitrate_kbps/duration_sec from int to float to match the Core API; fractional values no longer raise a validation error - Add unit tests (request building + fractional-number parsing); update README and CHANGELOG Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 674067c - Browse repository at this point
Copy the full SHA 674067cView commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 89e3221 - Browse repository at this point
Copy the full SHA 89e3221View commit details
Commits on Jul 5, 2026
-
Add missing OpenAPI routes and fix two HTTP-method bugs
Audit of core-openapi.json against the client surfaced 2 method bugs and several uncovered routes. Method bugs (GET -> PUT, copy-paste like the earlier probe bug): - v3_cluster_put_reallocation - v3_process_put_playout_input_stream New endpoints: - v3_fs_delete_file_list (DELETE /api/v3/fs/{storage}, delete by glob) - v3_process_post_validate, v3_process_put_report - v3_cluster_get_snapshot, v3_cluster_put_transfer, v3_cluster_post_events - v3_cluster_db_get_kv, v3_cluster_db_get_reallocate_map, v3_cluster_db_get_node_list, v3_cluster_db_get_process - v3_events_post, v3_events_post_media, graph_query New models: EventFilters, LogEventFilter, LogEvent, MediaEvent, GraphQuery, GraphResponse, ClusterKVSValue, ClusterStoreNode. graph_query verified live against Core 16.16.0; the process/validate and fs bulk-delete routes require Core v16.20.0+ (404 on 16.16.0). Cluster/event routes need a cluster and are covered by request-building unit tests. Update README and CHANGELOG. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>Configuration menu - View commit details
-
Copy full SHA for 690af8a - Browse repository at this point
Copy the full SHA 690af8aView commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ed25209 - Browse repository at this point
Copy the full SHA ed25209View commit details -
Fix v3_fs_get_file_exists to return HEAD headers instead of empty body
The endpoint issues a HEAD request, whose body is always empty, so returning response.content yielded useless empty bytes. Return the response headers (dict) with the file metadata (content-type, last-modified, ...) on success, or an Error if the file does not exist. Update the integration test. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8eaa09b - Browse repository at this point
Copy the full SHA 8eaa09bView commit details
Commits on Jul 6, 2026
-
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e2d9996 - Browse repository at this point
Copy the full SHA e2d9996View commit details -
Fix ClusterReallocation model to be a list root model
ClusterReallocation was modeled as a BaseModel with a single field literally named `RootModel: ClusterReallocationNode`, so v3_cluster_put_reallocation serialized the body as {"RootModel": {...}} instead of the documented array [{target_node_id, process_ids}]. Model it as RootModel[list[ClusterReallocationNode]]. Also fix _build_response: the endpoint returns a string, not a ClusterReallocation. Add a regression test asserting the array body. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>Configuration menu - View commit details
-
Copy full SHA for e1cfd0f - Browse repository at this point
Copy the full SHA e1cfd0fView commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f01745e - Browse repository at this point
Copy the full SHA f01745eView commit details -
Fix model/schema mismatches found by auditing against core-openapi.json
- Fix 10 *List models modeled as `class X(BaseModel): RootModel: Y` (same bug as ClusterReallocation) to `RootModel[list[Y]]`: IamUserPolicyList, IamUserList, ProcessList, FilesystemFileList, FilesystemList, RtmpList, ClusterNodeList, ClusterDbLockList, ConfigStorageS3List, ReportProcessList - Fix Srt.socketid from str to int (OpenAPI api.SRTChannel) - Fix ProcessStateProgressIOTee.fifo_recovery_attempts_total from int to float (OpenAPI api.ProgressIOTee); fractional values no longer raise A field-type audit of all models against the OpenAPI schemas now reports zero remaining mismatches. Add regression unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9e9295a - Browse repository at this point
Copy the full SHA 9e9295aView commit details -
Add missing model fields found by field-completeness audit
Audited every model's field set against the OpenAPI schemas. Real fixes (live-confirmed against Core): - SessionToken.extras -> extra (the Core API expects `extra`; old key ignored) - Config: add update_check, compress (+ new ConfigCompress model) Spec-completeness additions (present in OpenAPI 16.20.0, added as optional): - About.resources (+ new AboutResources model) - ProcessState.pid/limit_mode - ProcessStateProgressIO.level/profile/sample_fmt - ProcessStateProgressMappingGraph.id/dst_id - FilesystemFile.core_id, FilesystemOperation.bandwidth_limit_kbit - ReportProcess.domain, ProcessReportHistory.resources - ClusterNodeCore.version, ClusterNodeResources.{cpu_core,error,gpu, memory_core_bytes,memory_total_bytes} Live-parsing verified the additions land on the correct models; the audit's SkillsFormat/SkillsProtocol hits were a name-collision false positive (id/name already live on SkillsFormatMuxer/SkillsProtocolIO) and were not changed. Add regression tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>Configuration menu - View commit details
-
Copy full SHA for f8581e3 - Browse repository at this point
Copy the full SHA f8581e3View commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f32e82 - Browse repository at this point
Copy the full SHA 6f32e82View commit details -
Fix endpoints parsing a string 200 response as a model
Per core-openapi.json both endpoints return a string on 200, but the client parsed the body into a model (same bug class as v3_cluster_put_reallocation): - v3_cluster_node_put_state parsed ClusterNodeState - v3_iam_delete_user parsed IamUser Both now return the response string. Found via a repo-wide scan comparing each module's 200 handling against the OpenAPI 200 schema. Add regression tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e35549c - Browse repository at this point
Copy the full SHA e35549cView commit details -
Add PlayoutStatus model and type the playout status response
v3_process_get_playout_input_status returned an untyped dict; per the OpenAPI its 200 response is api.PlayoutStatus. Add PlayoutStatus (+ PlayoutStatusIO, PlayoutStatusSwap) and parse the response into it. Add a regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 495dcdd - Browse repository at this point
Copy the full SHA 495dcddView commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b0db004 - Browse repository at this point
Copy the full SHA b0db004View commit details
Commits on Jul 26, 2026
-
Add async event streaming, ProcessEventFilter, refresh/401-retry (2.1…
…1.0) Event-streaming & robustness build-out (verified against a live Core cluster): - Streaming core `core_client/base/api/_stream.py`: async generator over the endless SSE/NDJSON event endpoints. HTTP/1.1 (the cluster terminates HTTP/2 stream connections with GOAWAY), no read timeout, SSE + NDJSON frame logic, abort-safe (finally-close), connect!=200 -> CoreAPIError, no per-event validation on the hot path (~200k events/s in the benchmark). - Stream methods on AsyncClient: v3_events_stream, v3_cluster_events_stream, v3_cluster_events_process_stream (the process endpoint was missing). Registered via a new _make_stream_method/_add_stream_method (async-generator functions can't go through the await-based proxy). - ProcessEventFilter model; EventFilters.filters is now list[LogEventFilter | ProcessEventFilter] (both use extra="forbid" for unambiguous union resolution). Event bodies use model_dump(exclude_none=True); raw dict filters still accepted. - Public Client.refresh() / AsyncClient.arefresh(); one-shot 401 auto-retry in the sync and async proxies (streaming exempt). - Tests: streaming (MockTransport), filter serialization, 401 retry, refresh, throughput benchmark (>=800/s floor, marked slow). README + CHANGELOG. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e92ac58 - Browse repository at this point
Copy the full SHA e92ac58View commit details -
Docs: source-verified ProcessEventFilter, regex filters, drop experim…
…ental labels - ProcessEventFilter docstring: fields match Core api.ProcessEventFilter exactly (pid, domain, type, core_id); document values are case-insensitive unanchored regex, AND-combined (verified in datarhei/core vod http/api/event.go) - README streaming section: note regex filter semantics + all four process filter fields - README: remove "(experimental)" TOC tags and the "Do not use in production / upcoming feature" blocks from the cluster sections (endpoints are live) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a419aab - Browse repository at this point
Copy the full SHA a419aabView commit details -
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dec7d8b - Browse repository at this point
Copy the full SHA dec7d8bView commit details -
Official Python 3.14 support (classifier); verified import + full unit suite on 3.11-3.14. Test uses a 32+ byte JWT key to avoid PyJWT's InsecureKeyLengthWarning. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9be77bc - Browse repository at this point
Copy the full SHA 9be77bcView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff test-infrastructure-refactor...main