Skip to content

Support setting task ID on creation - #56

Closed
snopoke wants to merge 5 commits into
mainfrom
sk/task-id
Closed

Support setting task ID on creation#56
snopoke wants to merge 5 commits into
mainfrom
sk/task-id

Conversation

@snopoke

@snopoke snopoke commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

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 the taskbadger.yaml schema update (id is now a writable, optional field on the request/response models).

snopoke and others added 2 commits July 22, 2026 17:30
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
snopoke marked this pull request as ready for review July 22, 2026 15:32
snopoke and others added 3 commits July 22, 2026 17:33
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>
@snopoke snopoke closed this Jul 23, 2026
@snopoke
snopoke deleted the sk/task-id branch July 23, 2026 08:51
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