Skip to content

chore: release packages (beta) - #419

Merged
btravers merged 1 commit into
mainfrom
changeset-release/main
Sep 2, 2026
Merged

chore: release packages (beta)#419
btravers merged 1 commit into
mainfrom
changeset-release/main

Conversation

@btravers

@btravers btravers commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@temporal-contract/worker@8.0.0-beta.8

Minor Changes

  • 274e340: context.saga(): steps with compensating undos, unwound LIFO — with the
    machinery failures exempt by default.

    declareWorkflow handed a workflow context.activities and context.errors
    and nothing for the walk-back, so every saga wrote its own. The LIFO machinery
    is now @unthrown/saga's. What this adds is the decision that belongs to
    Temporal rather than to a Result combinator: which failures compensate.

    const fulfilled = await context
      .saga()
      .step(
        () => context.activities.reserveStock(order),
        (reservation) => context.activities.releaseStock({ id: reservation.id }),
      )
      .step(
        () => context.activities.chargeCard(order),
        (charge) => context.activities.refund({ id: charge.id }),
      )
      .step(() => context.activities.ship(order))
      .run();

    The undos run on a declared contract error — a permanent domain answer,
    where what the step did before saying no is knowable. They do not run on an
    ActivityError, a ChildWorkflowError or a defect: a step that failed
    unmodelled left state nobody can see, and un-deciding what you cannot see is a
    second bug. That failure propagates untouched, so propagateActivityFailure
    still re-raises Temporal's original failure — which deletes the per-step

    .with(P.tag(ACTIVITY_ERROR_TAG), P.tag(ACTIVITY_CANCELLED_ERROR_TAG), (error) => ErrAsync(error))

    arm that had to be repeated, was easy to omit, and was invisible when omitted.

    Cancellation is the one case a caller may opt back in to, with
    saga({ compensateOnCancellation: true }). Every undo runs inside a
    non-cancellable scope: a cancelled scope schedules no activity at all, so
    without one that opt-in could never compensate for the failure it exists for.
    A compensation that itself fails
    becomes a defect carrying its own failure, which outranks the failure that
    triggered the unwind — a refund that never happened is worse news than the order
    that could not ship — and the remaining undos still run first.

    workflowSaga is the same function, exported from
    @temporal-contract/worker/workflow for a workflow that composes its steps in a
    helper.

    Closes feat(worker): compensation in declareWorkflow — the saga, with the machinery tags exempt by default #413.

Patch Changes

  • @temporal-contract/contract@8.0.0-beta.8

@temporal-contract/client@8.0.0-beta.8

Patch Changes

  • @temporal-contract/contract@8.0.0-beta.8

@temporal-contract/testing@8.0.0-beta.8

Patch Changes

  • Updated dependencies [274e340]
    • @temporal-contract/worker@8.0.0-beta.8
    • @temporal-contract/client@8.0.0-beta.8
    • @temporal-contract/contract@8.0.0-beta.8

@temporal-contract/contract@8.0.0-beta.8

Summary by CodeRabbit

  • New Features

    • Added saga support for workflow operations, including LIFO compensating actions.
    • Contract errors trigger compensation by default, with optional compensation for cancellations.
    • Compensation actions continue running after individual failures and execute without cancellation.
  • Documentation

    • Documented saga behavior, error handling, cancellation options, and the workflow saga helper.
  • Release Updates

    • Published beta.8 updates across the client, contract, testing, and worker packages.

Copilot AI lite review requested due to automatic review settings September 2, 2026 22:48
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 1f79083e-a84b-4895-abe9-ba1f74e6a773

📥 Commits

Reviewing files that changed from the base of the PR and between 0e7172d and 6214cf0.

📒 Files selected for processing (9)
  • .changeset/pre/workflow-saga.md
  • packages/client/CHANGELOG.md
  • packages/client/package.json
  • packages/contract/CHANGELOG.md
  • packages/contract/package.json
  • packages/testing/CHANGELOG.md
  • packages/testing/package.json
  • packages/worker/CHANGELOG.md
  • packages/worker/package.json

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The change documents the worker saga API and advances the client, contract, testing, and worker packages from beta.7 to beta.8 with aligned changelogs and dependencies.

Changes

Saga release documentation

Layer / File(s) Summary
Saga API release documentation
.changeset/pre/workflow-saga.md, packages/worker/CHANGELOG.md
Documents context.saga() and workflowSaga, LIFO compensation, failure filtering, optional cancellation compensation, non-cancellable undos, and compensation-failure precedence.

Package beta.8 alignment

Layer / File(s) Summary
Package version and dependency alignment
packages/client/*, packages/contract/*, packages/testing/*, packages/worker/*
Updates package versions, beta.8 changelog entries, and testing peer dependency ranges.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 6214c

This PR publishes beta package versions and updates their changelogs and dependency metadata; no actionable merge-blocking risk remains beyond normal release checks.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR changes only package metadata, changelogs, and release notes. They do not include the declareWorkflow saga implementation required by issue #413, such as compensation policy handling, cancell… Include the implementation changes required by issue #413, or link this PR to the appropriate release issue and provide explicit evidence that the complete saga implementation is already present in the beta.8 packages being released.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies a beta package release. This matches the main changes: prerelease version updates and changelog entries for four packages.
Out of Scope Changes check ✅ Passed The changes are limited to the automated beta release: package versions, dependency ranges, changelogs, and the worker saga release note. No unrelated code changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The PR changes only package metadata, changelogs, and release notes. They do not include the declareWorkflow saga implementation required by issue #413, such as compensation policy handling, cancellation opt-in, or deterministic LIFO compensation.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (9 skipped: 9 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch changeset-release/main

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are limited to consistent version bumps and changelog/changeset updates with no functional code modifications in this PR.

Pull request overview

This Changesets-generated release PR prepares the monorepo packages for publishing 8.0.0-beta.8, including a new @temporal-contract/worker minor prerelease that documents the new context.saga() API behavior and updates dependent package versions/changelogs.

Changes:

  • Bump package versions to 8.0.0-beta.8 for @temporal-contract/{worker,client,contract,testing}.
  • Update changelogs to include the 8.0.0-beta.8 release notes and dependency bump notes.
  • Add the prerelease changeset entry for the workflow saga feature.
File summaries
File Description
packages/worker/package.json Bumps @temporal-contract/worker version to 8.0.0-beta.8.
packages/worker/CHANGELOG.md Adds 8.0.0-beta.8 release notes for context.saga() and dependency bump.
packages/testing/package.json Bumps version and updates peer dependency ranges to ^8.0.0-beta.8.
packages/testing/CHANGELOG.md Adds 8.0.0-beta.8 entry noting updated internal dependencies.
packages/contract/package.json Bumps @temporal-contract/contract version to 8.0.0-beta.8.
packages/contract/CHANGELOG.md Adds 8.0.0-beta.8 header entry for the prerelease.
packages/client/package.json Bumps @temporal-contract/client version to 8.0.0-beta.8.
packages/client/CHANGELOG.md Adds 8.0.0-beta.8 entry noting the contract dependency bump.
.changeset/pre/workflow-saga.md Adds the prerelease changeset describing the saga/compensation behavior.
Review details
  • Files reviewed: 8/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@btravers
btravers merged commit 25a3187 into main Sep 2, 2026
14 checks passed
@btravers
btravers deleted the changeset-release/main branch September 2, 2026 23:19
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.

feat(worker): compensation in declareWorkflow — the saga, with the machinery tags exempt by default

2 participants