Repository navigation
Conversation
Checks the caller's LowResponseCount capability (userinfo claims) before any upload and raises LowResponseCountError with the backend's message. Ranking is not gated. Validation errors now render one 'field: message' line each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: luca@rapidata.ai <25279790+LucStr@users.noreply.github.com>
LucStr
marked this pull request as ready for review
October 26, 2026 15:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: luca@rapidata.ai <25279790+LucStr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The backend now rejects jobs with fewer than 10 responses per datapoint unless the organization holds the
LowResponseCountcapability (sibling PR: RapidataAI/rapidata-backend#5733). The SDK posts the job definition only after every datapoint is uploaded, so a backend-only check would fail after the whole upload. This checks first and tells the customer how to get it enabled.Flow
flowchart LR sdk["create_*_job_definition / job_def.responses_per_datapoint = n"]:::changed ==>|"n < 10: GET /connect/userinfo (capabilities, platform_relations)"| auth["Identity: userinfo"] sdk -->|"POST /dataset + datapoints"| ds[("Dataset")] sdk -->|"POST /job/definition, POST revision"| order["Order: job definition"] order ==>|"400: At least 10 responses per datapoint ..."| err["RapidataError.__str__"]:::changed classDef new fill:#d3f9d8,stroke:#2f9e44,color:#000 classDef changed fill:#fff3bf,stroke:#f08c00,color:#000 classDef removed fill:#ffe3e3,stroke:#e03131,color:#000,stroke-dasharray:4LowResponseCountError(exported fromrapidata)ValueErrorsubclass withrequested,minimum; message ends with the backend's exact textRapidataError.__str__Reasons: {"errors": {...}}→ oneField: messageline per validation messageDecisions
capabilitiesclaim of/connect/userinfo, notGET /customers/{id}/capabilities— that endpoint is staff-only (Platform.Viewer), so customers would always get 403. Userinfo returns the grants of the token'sorg, the same scope the backend enforces; platform admins (platform_relations: admin) pass, as on the backend.RapidataClient; a refusal raises anyway.SimpleWorkflowjobs are gated, matching the backend; ranking (responses_per_comparison) is permanently exempt. The generated client is untouched — the enum value arrives with the next automated OpenAPI update.Verified
tests/rapidata_client/job/test_response_minimum.pycovers the gate, cache, no-upload-before-raise and setter paths, plus error rendering;pyright src/rapidata/rapidata_clientclean;mkdocs buildclean. Skill updated (SKILL.md task design rule 1, reference.md).🔗 Session: node-4d496828
🤖 Generated with Claude Code