Skip to content

feat(job)!: stream typed lifecycle and progress events - #27

Merged
LouisHaftmann merged 3 commits into
mainfrom
feat/job-lifecycle-events
Aug 25, 2026
Merged

feat(job)!: stream typed lifecycle and progress events#27
LouisHaftmann merged 3 commits into
mainfrom
feat/job-lifecycle-events

Conversation

@LouisHaftmann

Copy link
Copy Markdown
Contributor

Jobs are opaque between enqueue and their terminal result. Consumers cannot observe attempts or typed progress, safely subscribe before enqueue, or reconstruct a typed handle from a known job id.

This introduces an eagerly subscribed job.watch() stream for lifecycle, progress, and terminal events. Progress is validated through Standard Schema, nested steps can emit it, runAndWatch() closes the enqueue race, and getJob(jobId) supports producer-only reattachment. Lifecycle and progress records remain transient.

Warning

This release requires a full process restart. WorkflowJob.groupId is removed, and older peers can misread lifecycle or progress records on the shared completion channel. Do not rolling-deploy this version with an older release.

Reviews

Review Found Fixed
Standards 3 3
Spec 5 5
Ponytail ultra 1 1

All follow-up review passes are clean.

Verification

  • pnpm type-check
  • pnpm lint
  • pnpm test with 90 passing tests
  • pnpm build

Closes #23
Closes #24
Closes #25
Closes #26

LouisHaftmann and others added 3 commits August 25, 2026 11:27
Jobs now expose eagerly subscribed lifecycle and validated progress streams, including run-and-watch and id-only reattachment.

BREAKING CHANGE: WorkflowJob no longer exposes groupId. This release requires a full process restart because older peers can misread lifecycle or progress records on the completion channel.

Closes #23

Closes #24

Closes #25

Closes #26

Created with AI. Verified by a human.

Co-authored-by: Codex <codex@openai.com>
@LouisHaftmann
LouisHaftmann merged commit f1791dd into main Aug 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant