Repository navigation
feat!: Speak service schema v6, add leak guard - #23
Conversation
… 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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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.
| "private-repository-link", | ||
| re.compile( | ||
| rf"(?i)github\.com/datarobot/(?!(?:{_alternatives(PUBLIC_DATAROBOT_REPOSITORIES)})(?![\w.-]))[\w.-]+" | ||
| ), |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit ac1faf1. Configure here.


Summary
Moves the SDK to JointFM service schema
v6and adds a leak guard that keeps private material out of this repository.Breaking change: schema
v6Services on schema
v6no longer reportsampler_typein thedata_generationblock 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, andt_output.SCHEMA_VERSIONis now"v6".DataGenerationCapabilitiesdropssampler_typeand no longer requires it when parsing health metadata.v5services withUnsupportedSchemaVersionError. Releases up to 0.12 refusev6services the same way. A mismatch now fails at the version check instead of inside health parsing.docs/api-reference.md,config.sample.yaml, and all test fixtures now usev6.Migration: set
JOINTFM_SCHEMA_VERSION=v6(orschema_version: v6in YAML), and remove any code that readsDataGenerationCapabilities.sampler_type. Upgrade a client only after the services it calls reportschema_version: v6on/healthz. Stay on 0.12 for services that still reportv5.Leak guard
scripts/leak_guard.pyscans 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.commit-msghook (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.task leak-guard:link). CI runs the public rules alone and says that it did.Chore
Python (joint-client-python)kernel.Release
Breaking, so the next minor release (
task releaseonmainafter 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
v6and adds a leak guard so private material is harder to commit or push to this public repo.Schema
v6(breaking):SCHEMA_VERSIONbecomes"v6"everywhere (config, docs, fixtures, tests).DataGenerationCapabilitiesno longer parses or exposessampler_typefrom/healthzdata_generation; capacity fields (min_series,max_series,t_input,t_output,n_input,n_output) stay. Clients pinned tov5or code that readsampler_typemust move toJOINTFM_SCHEMA_VERSION=v6and drop that field before upgrading.Leak guard: New
scripts/leak_guard.pywith public regex rules (credentials, internal hosts, object IDs, etc.) plus optional git-ignored.leak-patterns.private. Wired throughtask 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..HEADon PRs) so old history is not blanket-failed. README andAGENTS.mddocument 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 upscripts/for leak-guard tests.Reviewed by Cursor Bugbot for commit ac1faf1. Configure here.