Skip to content

feat(workflow)!: carry the manifest version through every workflow - #322

Merged
lokewate merged 1 commit into
mainfrom
feat/manifest-version-engine
Oct 27, 2026
Merged

lokewate merged 1 commit into
mainfrom
feat/manifest-version-engine

Conversation

@lokewate

@lokewate lokewate commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A host starts each top-level workflow with VarManifestVersion (_manifest_version) set to the artifact manifest version current at that moment. The engine carries it unchanged to every child workflow and reports it to the host wherever the host resolves templates. The engine never resolves artifacts itself, so this PR does not depend on the artifact changes before it.

Stack

Manifest versioning, in five PRs to review and merge in order. Each one builds and passes its tests on its own.

  1. feat(artifact)!: load versioned manifests as a set #305 artifact: load versioned manifests as a set
  2. feat(artifact)!: resolve explicitly versioned rows across manifests #346 artifact: resolve explicitly versioned rows across manifests
  3. feat(artifact): load newer manifests on demand #319 artifact: load newer manifests on demand
  4. feat(workflow)!: carry the manifest version through every workflow #322 workflow: carry the manifest version through every workflow ← this PR
  5. feat(taskflow)!: resolve a task's templates through its manifest version #306 taskflow: resolve a task's templates through its manifest version

#320 (validate every artifact a manifest lists) and #321 (manifestcheck) are parked: pinning doesn't need them, and a release job can bring validation back later.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Other (please describe):

Changes Made

  • ActivationRef and TaskPayload carry ManifestVersion, so every task activation names it.
  • FetchWorkflowDefinitionActivity takes the version as a second argument, and RegisterDefinitionHandler takes a DefinitionHandler(manifestVersion, templateID), so a dynamic split's branches come from the calling workflow's manifest.
  • AdminParkPayload carries the version, so a park handler can show the parked node's template from the flow's own manifest.
  • Children. Dynamic-split children get the variable explicitly. Batch and parallel children already copy the engine's underscore variables.
  • Temporal's JSON. A whole number that came back as a float64 is read as the integer. Anything that is not a positive whole number counts as no version (0).
  • Breaking: the RegisterDefinitionHandler and FetchWorkflowDefinitionActivity signatures. taskflow's test mock is updated to match.

Testing

  • I have tested this change locally
  • I have added tests that prove my fix is effective or that my feature works
  • I have tested edge cases
  • All existing tests pass

Run with go test -race ./workflow/. The tests cover the version reaching every task activation in batch and parallel children, and the dynamic split's fetch and branches. A mutation check confirmed that dropping it from the split's children fails the test. They also cover manifestVersion() value forms (int, float64, json.Number, negative, fractional and string) and the admin park payload.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked that there are no merge conflicts

Related Issues

Part of OpenNSW/one-trade-artifacts#243. Host: OpenNSW/nsw-srilanka#660.

Screenshots/Demo

N/A

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: accbd30f-f7fd-41bd-b491-8681f5a5ffe1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@lokewate
lokewate force-pushed the feat/manifest-version-engine branch from 189b003 to 8ab1233 Compare October 23, 2026 09:22
@lokewate
lokewate changed the base branch from feat/manifestcheck to feat/manifest-on-demand October 23, 2026 09:22
@lokewate
lokewate marked this pull request as ready for review October 23, 2026 09:57
@lokewate
lokewate added this pull request to stack #347 October 23, 2026 11:38
@lokewate
lokewate force-pushed the feat/manifest-version-engine branch from 8ab1233 to 32b3d0e Compare October 23, 2026 16:09
@mushrafmim
mushrafmim force-pushed the feat/manifest-version-engine branch from 32b3d0e to aea2015 Compare October 24, 2026 19:20
@lokewate
lokewate force-pushed the feat/manifest-version-engine branch from aea2015 to c3098d3 Compare October 25, 2026 05:00
@lokewate
lokewate requested a review from mushrafmim October 25, 2026 18:04
@mushrafmim
mushrafmim force-pushed the feat/manifest-version-engine branch from c3098d3 to ba2d581 Compare October 26, 2026 14:38
mushrafmim
mushrafmim previously approved these changes Oct 26, 2026
@lokewate
lokewate dismissed mushrafmim’s stale review October 27, 2026 02:43

The merge-base changed after approval.

@lokewate
lokewate force-pushed the feat/manifest-version-engine branch from ba2d581 to bd4a9eb Compare October 27, 2026 02:43
mushrafmim
mushrafmim previously approved these changes Oct 27, 2026
@lokewate
lokewate dismissed mushrafmim’s stale review October 27, 2026 03:49

The merge-base changed after approval.

@lokewate
lokewate force-pushed the feat/manifest-version-engine branch from bd4a9eb to 114d877 Compare October 27, 2026 03:49
Base automatically changed from feat/manifest-on-demand to main October 27, 2026 03:56
A host starts each top-level workflow with VarManifestVersion
(_manifest_version) set to the artifact manifest version current at
that moment. The engine carries it unchanged to every child workflow
and reports it to the host wherever the host resolves templates:

- ActivationRef and TaskPayload carry ManifestVersion, so every task
  activation names it.
- FetchWorkflowDefinitionActivity takes it as a second argument, and
  DefinitionHandler is func(manifestVersion, templateID), so a dynamic
  split's branches come from the calling workflow's manifest.
- AdminParkPayload carries it, so a park handler can show the parked
  node's template from the flow's own manifest.
- Dynamic-split children get the variable explicitly. Batch and
  parallel children already copy the engine's underscore variables.

The variable round-trips through Temporal's JSON, so a whole number
that comes back as a float64 is read as the integer. Anything that is
not a positive whole number counts as no version (0). The engine never
resolves artifacts itself.

BREAKING CHANGE: RegisterDefinitionHandler takes a DefinitionHandler
(manifestVersion, templateID), and FetchWorkflowDefinitionActivity takes
the version as a second argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lokewate
lokewate force-pushed the feat/manifest-version-engine branch from 114d877 to e978bad Compare October 27, 2026 03:56
@lokewate
lokewate merged commit e470207 into main Oct 27, 2026
27 checks passed
@lokewate
lokewate deleted the feat/manifest-version-engine branch October 27, 2026 04:34
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.

3 participants