Skip to content

feat!: Speak service schema v6, add leak guard - #23

Merged
shackmann merged 3 commits into
mainfrom
stefan/next13
Oct 16, 2026
Merged

shackmann merged 3 commits into
mainfrom
stefan/next13

Conversation

@shackmann

@shackmann shackmann commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moves the SDK to JointFM service schema v6 and adds a leak guard that keeps private material out of this repository.

Breaking change: schema v6

Services on schema v6 no longer report sampler_type in the data_generation block of the health payload. The block now holds only the capacity fields a client uses to size and split requests: min_series, max_series, n_input, n_output, t_input, and t_output.

  • SCHEMA_VERSION is now "v6". DataGenerationCapabilities drops sampler_type and no longer requires it when parsing health metadata.
  • This SDK version refuses v5 services with UnsupportedSchemaVersionError. Releases up to 0.12 refuse v6 services the same way. A mismatch now fails at the version check instead of inside health parsing.
  • README, docs/api-reference.md, config.sample.yaml, and all test fixtures now use v6.

Migration: set JOINTFM_SCHEMA_VERSION=v6 (or schema_version: v6 in YAML), and remove any code that reads DataGenerationCapabilities.sampler_type. Upgrade a client only after the services it calls report schema_version: v6 on /healthz. Stay on 0.12 for services that still report v5.

Leak guard

  • scripts/leak_guard.py scans file paths, file contents, and commit messages for private material: internal hostnames, private IP addresses, DataRobot object IDs and hosts, credentials, proprietary headers, and planning labels.
  • It runs as a pre-commit hook and a commit-msg hook (task leak-guard). CI scans only the commits a pull request or push adds, through a revision range, so history that was published before the guard existed does not fail every build.
  • Maintainers can link an extra, git-ignored patterns file (task leak-guard:link). CI runs the public rules alone and says that it did.
  • The guard's test samples are built at runtime from synthetic values, so the test file never matches its own rules.

Chore

  • Example notebooks use the Python (joint-client-python) kernel.

Release

Breaking, so the next minor release (task release on main after merge).

Testing

task pre-commit (Commitizen, Ruff, ty, typos, leak guard, tests).


Note

Medium Risk
Breaking service schema pin and health payload shape affect every deployment integration; leak guard changes contributor/CI workflow but not runtime SDK behavior.

Overview
This PR bumps the SDK to JointFM service schema v6 and adds a leak guard so private material is harder to commit or push to this public repo.

Schema v6 (breaking): SCHEMA_VERSION becomes "v6" everywhere (config, docs, fixtures, tests). DataGenerationCapabilities no longer parses or exposes sampler_type from /healthz data_generation; capacity fields (min_series, max_series, t_input, t_output, n_input, n_output) stay. Clients pinned to v5 or code that read sampler_type must move to JOINTFM_SCHEMA_VERSION=v6 and drop that field before upgrading.

Leak guard: New scripts/leak_guard.py with public regex rules (credentials, internal hosts, object IDs, etc.) plus optional git-ignored .leak-patterns.private. Wired through task leak-guard / task leak-guard:history, pre-commit (working tree + commit-msg), task pre-commit, and a separate CI job that scans only new commits (origin/base..HEAD on PRs) so old history is not blanket-failed. README and AGENTS.md document maintainer expectations.

Smaller updates: example notebooks point at the Python (joint-client-python) kernel; VS Code uses ${workspaceFolder} for the venv path; pytest/ty pick up scripts/ for leak-guard tests.

Reviewed by Cursor Bugbot for commit ac1faf1. Configure here.

… version 3.13.3

- Changed kernelspec display name and name in forecast_mean.ipynb, forecast_quantiles.ipynb, forecast_samples.ipynb, and service_health.ipynb to "Python (joint-client-python)".
- Updated Python version to "3.13.3" in the metadata of the aforementioned notebooks.
- Added execution counts and outputs to service_health.ipynb and forecast_quantiles.ipynb for improved logging and debugging.
- Included detailed output data in service_health.ipynb to reflect the current state of the service and its capabilities.
- Added a new script `leak_guard.py` to scan for private material in file paths, contents, and commit messages.
- Integrated leak guard checks into CI workflows and pre-commit hooks.
- Updated `.gitignore` to include a private patterns file for maintainers.
- Enhanced `README.md` with leak guard usage instructions.
- Created tests for leak guard functionality to ensure it correctly identifies private material.
…es and related code

- Changed schema_version in forecast_samples_request.json, forecast_samples_response.json, health_metadata.json, input_size_exceeded_response.json, model_version_mismatch_response.json, schema_version_mismatch_response.json, and validation_error_response.json to v6.
- Updated test cases in test_capabilities.py, test_cli.py, test_condition_mode.py, test_configuration.py, test_contract.py, test_contract_models.py, test_feature_importance.py, test_leak_guard.py, test_metadata_traits.py, test_pool.py, test_result_arrays.py, test_sample_batch_merge.py, test_settings.py, test_surfaces.py, test_transport.py, and test_utilization.py to reflect the new schema version.
@shackmann
shackmann merged commit 847782e into main Oct 16, 2026
3 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ac1faf1. Configure here.

Comment thread scripts/leak_guard.py
"private-repository-link",
re.compile(
rf"(?i)github\.com/datarobot/(?!(?:{_alternatives(PUBLIC_DATAROBOT_REPOSITORIES)})(?![\w.-]))[\w.-]+"
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public clone URLs fail leak guard

Medium Severity

The private-repository-link allowlist treats a public DataRobot repo followed by .git as a different private repository. Standard HTTPS clone URLs such as github.com/datarobot/joint-client-python.git therefore fail the guard and block an otherwise publishable change.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ac1faf1. Configure here.

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