Check that versions, bundle pins and catalogs stay in step

Merged
PO
14d ago
+323-10

A pull request that changes a component or a bundle must raise its version, so that the change reaches the projects that installed it.

Before: what a repo receives after a change merged under the same version

A change merged under the same version never reaches a repo that has that version, because Spec Kit compares versions.

flowchart LR
	PR["PR changes critique-opsmill,<br>version stays 1.5.0"] --> M["merged"]
	M --> R["repo with critique-opsmill 1.5.0"]
	R -->|"specify bundle update"| X["same version:<br>keeps the old files"]
	classDef preset fill:#ffedd5,stroke:#ea580c,color:#7c2d12
	classDef bad fill:#fee2e2,stroke:#dc2626,color:#7f1d1d
	class PR preset
	class X bad

After: what the Versions check verifies on each pull request

The Versions check blocks the pull request until every changed version is raised. A new pin changes the bundle, so the change goes up to each bundle that includes it.

flowchart TB
	PR["PR changes critique-opsmill"] --> C{"Versions check"}
	C --> V1["critique-opsmill: version raised?"]
	C --> V2["opsmill-sdd pins the new version,<br>and its own version is raised?"]
	C --> V3["opsmill-jira pins the new opsmill-sdd,<br>and its own version is raised?"]
	C --> V4["catalog/ matches the zips<br>built from the branch?"]
	V1 & V2 & V3 & V4 -->|"all yes"| OK["can merge"]
	classDef preset fill:#ffedd5,stroke:#ea580c,color:#7c2d12
	classDef bundle fill:#fef9c3,stroke:#ca8a04,color:#713f12
	classDef good fill:#dcfce7,stroke:#16a34a,color:#14532d
	class V1 preset
	class V2,V3 bundle
	class OK good
  • Bundles pin the current version of each component, and every component is in a bundle
  • The catalog matches the zips built from the branch

How to review

Read the commits in order:

  1. 31181bc adds the command check_versions.py BASE with its first rule: a component or bundle whose zip changed since BASE has a higher version. To review.
  2. e3bc369 adds the second rule: bundles pin the current version of each component, and every component is in a bundle. To review.
  3. a6e4292 adds the third rule: each version listed in catalog/ has the same sha256 as the zip built from the branch. To review.
  4. 1e5ce6e adds the Versions workflow, which runs check_versions.py on each pull request against its target branch. To skim.
  5. 8784cf2 makes the weekly audit compare a repo's opsmill extension with the extension version of the latest release, not with the tag. To review.

Not decided yet: the check compares with the target branch, so two pull requests that change the same component before a release each raise its version.

šŸ¤– Generated with Claude Code