Skip to content

Keep bundled workflow assets synchronized with the package version #46

Description

@adampoit

Summary

The v0.4.1 release contains several checked-in version references that still report or invoke v0.4.0.

At tag v0.4.1:

  • package.json reports 0.4.1.
  • package-lock.json reports 0.4.0 in both the top-level version and root package entry.
  • examples/sync-upstream.yml invokes patchlane@0.4.0.
  • examples/promote-tested-sync.yml invokes patchlane@0.4.0.
  • The corresponding bundled skill assets also invoke patchlane@0.4.0 because sync-skill-assets.ts copies the examples verbatim.

patchlane@0.4.1 init generates active workflows with the correct 0.4.1 version because the runtime templates interpolate getPackageVersion(). The mismatch is therefore limited to checked-in release metadata, examples, and installed skill assets, but those assets can still lead users or agents to install stale workflow pins.

Expected behavior

All versioned artifacts shipped at a release tag should consistently reference that release's package version, or CI should fail before a mismatched release can be published.

Suggested implementation

Prefer a single source of truth rather than manually editing every occurrence:

  1. Read the version from package.json.
  2. Generate examples/sync-upstream.yml and examples/promote-tested-sync.yml through the existing workflow renderers, passing that package version.
  3. Continue copying the generated examples into the skill asset directories.
  4. Ensure the package-lock root versions match package.json.
  5. Add a validation command that regenerates these artifacts and fails if git diff --exit-code is non-empty.
  6. Run that command in normal CI and before npm publication.

A token-based interpolation step would also work, but generating examples from workflow-templates.ts would reduce duplication and ensure init, examples, and skill assets remain structurally identical.

Acceptance criteria

  • package.json, package-lock.json, examples, and skill assets agree on the Patchlane version.
  • Changing the package version updates generated workflow pins deterministically.
  • CI fails when a checked-in artifact has a stale version.
  • The npm publish workflow cannot publish while generated artifacts or lock metadata are stale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions