Support setting task ID on creation - #56
Closed
snopoke wants to merge 5 commits into
Closed
Conversation
Adds a `task_id` argument to create_task/Task.create, letting callers assign a UUID or shortened UUID. The ID is passed through to the server, which validates uniqueness. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
snopoke
marked this pull request as ready for review
July 22, 2026 15:32
# Conflicts: # taskbadger/sdk.py
Lets callers obtain a task's short ID before creating the task (e.g. to correlate a queued job with its task), matching the server's short-ID form. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generate the task ID with generate_task_id() before creating the pending task, so the id is known independently of the create response. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Lets callers assign their own task ID at creation time (
Task.create(..., task_id=...)), rather than always using a server-generated one — useful when the caller already has a stable identifier and wants to correlate without a round-trip.The ID (UUID or shortened UUID) is passed straight to the server; uniqueness/immutability are enforced there, so there's no client-side validation to second-guess. The
internal/models/*changes are regenerated client output from thetaskbadger.yamlschema update (idis now a writable, optional field on the request/response models).