Skip to content

feat(workspace): adopt independent package versioning policy#1961

Open
josecelano wants to merge 3 commits into
torrust:developfrom
josecelano:1926-1669-si-32-define-package-versioning-strategy
Open

feat(workspace): adopt independent package versioning policy#1961
josecelano wants to merge 3 commits into
torrust:developfrom
josecelano:1926-1669-si-32-define-package-versioning-strategy

Conversation

@josecelano

@josecelano josecelano commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

Define and implement a SemVer policy for all workspace packages, replacing the implicit "everything shares one workspace version" with independent versioning for every crate.

Issue: #1926 (SI-32) — subissue of EPIC #1669 (Overhaul: Packages)

Phase Progress

✅ Phase 1 — Policy Definition (committed)

All policy definition work is complete and ready for review:

  • Issue spec with three-tier versioning model (tracker runtime / API contract / platform-utility / unpublished tooling), release process implications, and Appendix A with version assignment table per crate
  • ADR (20260629000000) documenting the independent versioning decision, alternatives considered, and rationale
  • EPIC and DECISIONS log updated with references
  • .github/workflows/deployment.yaml — refined to publish only torrust-tracker
  • .github/workflows/deployment-packages.yaml — new workflow for per-package publishing
  • docs/release_process.md — split into two paths (tracker release + per-package publish)

✅ Phase 2 — Version Migration (completed)

  • ✅ Removed version.workspace = true from all 26 Cargo.toml manifests
  • ✅ Set explicit initial versions per Appendix A:
    • 4 crates keep 3.0.0 (already on crates.io)
    • 23 crates start at 0.1.0
    • Root binary keeps 3.0.0-develop
  • ✅ Removed version from [workspace.package] in root Cargo.toml
  • ✅ Updated all inter-package dependency version references
  • ✅ Regenerated Cargo.lock for consistency
  • cargo check --workspace passes
  • linter all passes
  • cargo test --doc --workspace passes

✅ Phase 3 — CI/Release Refinements (completed)

Any remaining polish after Phase 2 is committed.


Key Decisions

  1. All packages version independently — path dependencies guarantee workspace compatibility regardless of declared version numbers
  2. Two-concept release model: tracker application release (releases/v*) and per-package publish (releases/pkg/<crate>/v<semver>)
  3. Glob safety: releases/v* does NOT match releases/pkg/... in GitHub Actions
  4. Version by namespace for public contracts (REST API v1/ modules, config v2_0_0/)
  5. 4 crates never published (e2e-tools, persistence-benchmark, torrent-repository-benchmarking, workspace-coupling)

Verification

  • linter all passes
  • cargo test --doc --workspace passes
  • cargo +nightly fmt --check passes
  • cargo +nightly check --tests --benches --examples --workspace --all-targets --all-features passes
  • cargo +stable test --tests --benches --examples --workspace --all-targets --all-features passes
  • GPG-signed commits (all 5 commits)
  • cargo check --workspace passes with new versions
  • All 21 Copilot review comments addressed
  • All 27 files changed (292 insertions, 439 deletions)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR documents and codifies a shift from lockstep workspace versioning to independent per-crate versioning, including corresponding release/publish workflow documentation and CI workflow split for tracker vs. per-package publishing.

Changes:

  • Adds an ADR and updates EPIC/decision logs to formally adopt independent versioning for workspace crates.
  • Updates the tracker deployment workflow to publish only torrust-tracker and introduces a new workflow for publishing individual workspace packages.
  • Extends release-process documentation to include a per-package publishing path and updates project spellcheck dictionary.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
project-words.txt Adds new dictionary terms for cspell.
docs/release_process.md Documents the split release model (tracker release vs. per-package publish).
docs/issues/open/1926-1669-si-32-define-package-versioning-strategy.md Updates the issue spec with the independent-versioning policy and related process details.
docs/issues/open/1669-overhaul-packages/EPIC.md Links the EPIC to the new ADR/issue and updates versioning-policy narrative.
docs/issues/open/1669-overhaul-packages/DECISIONS.md Adds DEC-16 documenting adoption of independent package versioning.
docs/adrs/index.md Registers the new ADR in the ADR index.
docs/adrs/20260629000000_adopt_independent_package_versioning.md New ADR describing the independent-versioning policy and release model split.
docs/adrs/20260623200526_adopt_contract-first_architecture_for_rest_api.md Adds a reference to the new ADR for “version by namespace” rationale.
.github/workflows/deployment.yaml Narrows tracker deployment to releases/v* and publishes only torrust-tracker.
.github/workflows/deployment-packages.yaml New workflow to publish a single crate based on releases/pkg/** branches or manual dispatch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread project-words.txt
Comment thread docs/release_process.md
Comment thread docs/issues/open/1926-1669-si-32-define-package-versioning-strategy.md Outdated
Comment thread docs/issues/open/1926-1669-si-32-define-package-versioning-strategy.md Outdated
Comment thread docs/adrs/20260629000000_adopt_independent_package_versioning.md Outdated
Comment thread docs/adrs/20260629000000_adopt_independent_package_versioning.md Outdated
Comment thread .github/workflows/deployment.yaml
Comment thread .github/workflows/deployment-packages.yaml
Comment thread .github/workflows/deployment-packages.yaml
@josecelano josecelano force-pushed the 1926-1669-si-32-define-package-versioning-strategy branch from a88721d to 4cb1889 Compare June 30, 2026 06:59
@josecelano josecelano requested a review from Copilot June 30, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Comment thread docs/issues/open/1926-1669-si-32-define-package-versioning-strategy.md Outdated
Comment thread docs/issues/open/1669-overhaul-packages/EPIC.md Outdated
Comment thread .github/workflows/deployment-packages.yaml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 37 changed files in this pull request and generated 4 comments.

Comment thread docs/issues/open/1926-1669-si-32-define-package-versioning-strategy.md Outdated
Comment thread docs/issues/open/1926-1669-si-32-define-package-versioning-strategy.md Outdated
Comment thread docs/issues/open/1669-overhaul-packages/EPIC.md
Comment thread packages/torrent-repository-benchmarking/Cargo.toml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 37 changed files in this pull request and generated 4 comments.

Comment thread .github/workflows/deployment-packages.yaml
Comment thread .github/workflows/deployment-packages.yaml Outdated
Comment thread .github/workflows/deployment-packages.yaml
Comment thread docs/adrs/20260629000000_adopt_independent_package_versioning.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 37 changed files in this pull request and generated 4 comments.

Comment thread packages/rest-api-client/Cargo.toml Outdated
Comment thread .github/workflows/deployment.yaml Outdated
Comment thread .github/workflows/deployment-packages.yaml Outdated
Comment thread .github/workflows/deployment-packages.yaml
Define and document the policy that all workspace packages version
independently, replacing the implicit shared workspace version.

Includes:
- Issue spec with four-tier versioning model and Appendix A
- ADR documenting the decision
- EPIC and DECISIONS log updates
- CI workflows (deployment-packages.yaml, deployment.yaml)
- Release process documentation update
- Branch format validation and output injection protection
- Secret scoping and review feedback from all rounds
Remove version.workspace = true from all 26 workspace Cargo.toml
manifests and set explicit versions per the approved version
assignment table (Appendix A in issue spec).

Key changes:
- Root torrust-tracker binary: 3.0.0-develop
- Published crates (4): 3.0.0 (primitives, configuration, test-helpers)
- Unpublished crates (23): 0.1.0
- Removed version from [workspace.package]
- Updated all inter-package dependency version references
- Set publish = false for unpublished tooling crates
- Regenerated Cargo.lock for consistency
@josecelano josecelano force-pushed the 1926-1669-si-32-define-package-versioning-strategy branch from da13b1e to b24149f Compare July 1, 2026 07:33
@josecelano josecelano requested a review from Copilot July 1, 2026 07:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 36 out of 37 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/deployment-packages.yaml Outdated
@josecelano josecelano marked this pull request as ready for review July 1, 2026 08:13
@josecelano josecelano requested a review from a team as a code owner July 1, 2026 08:13
@josecelano

Copy link
Copy Markdown
Member Author

ACK f82f49a

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.

2 participants